diff -Nru grep-3.1/aclocal.m4 grep-3.3/aclocal.m4 --- grep-3.1/aclocal.m4 2017-07-02 20:12:53.000000000 +0000 +++ grep-3.3/aclocal.m4 2018-12-21 03:59:29.000000000 +0000 @@ -1,6 +1,6 @@ -# generated automatically by aclocal 1.99a -*- Autoconf -*- +# generated automatically by aclocal 1.16a -*- Autoconf -*- -# Copyright (C) 1996-2015 Free Software Foundation, Inc. +# Copyright (C) 1996-2018 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -14,13 +14,13 @@ m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl -m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69.185-b502e],, -[m4_warning([this file was generated for autoconf 2.69.185-b502e. +m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69.197-b8fd7],, +[m4_warning([this file was generated for autoconf 2.69.197-b8fd7. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically 'autoreconf'.])]) -# Copyright (C) 2002-2015 Free Software Foundation, Inc. +# Copyright (C) 2002-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -32,10 +32,10 @@ # generated from the m4 files accompanying Automake X.Y. # (This private macro should not be called outside this file.) AC_DEFUN([AM_AUTOMAKE_VERSION], -[am__api_version='1.99a' +[am__api_version='1.16' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. -m4_if([$1], [1.99a], [], +m4_if([$1], [1.16a], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) @@ -51,14 +51,14 @@ # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], -[AM_AUTOMAKE_VERSION([1.99a])dnl +[AM_AUTOMAKE_VERSION([1.16a])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- -# Copyright (C) 2001-2015 Free Software Foundation, Inc. +# Copyright (C) 2001-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -110,7 +110,7 @@ # AM_CONDITIONAL -*- Autoconf -*- -# Copyright (C) 1997-2015 Free Software Foundation, Inc. +# Copyright (C) 1997-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -141,7 +141,7 @@ Usually this means the macro was only invoked conditionally.]]) fi])]) -# Copyright (C) 1999-2015 Free Software Foundation, Inc. +# Copyright (C) 1999-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -302,7 +302,10 @@ # ------------- # Choose a directory name for dependency files. # This macro is AC_REQUIREd in _AM_DEPENDENCIES. -AC_DEFUN([AM_SET_DEPDIR], [AC_SUBST([DEPDIR], [.deps])]) +AC_DEFUN([AM_SET_DEPDIR], +[AC_REQUIRE([AM_SET_LEADING_DOT])dnl +AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl +]) # AM_DEP_TRACK @@ -329,7 +332,7 @@ # Generate code to set up dependency tracking. -*- Autoconf -*- -# Copyright (C) 1999-2015 Free Software Foundation, Inc. +# Copyright (C) 1999-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -395,7 +398,7 @@ # Do all the work for Automake. -*- Autoconf -*- -# Copyright (C) 1996-2015 Free Software Foundation, Inc. +# Copyright (C) 1996-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -423,8 +426,6 @@ # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], [AC_PREREQ([2.65])dnl -dnl Without this, packages using Gettext 0.18.2 might break horribly. -AC_SUBST([mkdir_p], ['$(MKDIR_P)'])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl @@ -482,10 +483,16 @@ AC_REQUIRE([AM_PROG_INSTALL_SH])dnl AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl AC_REQUIRE([AC_PROG_MKDIR_P])dnl +# For better backward compatibility. To be removed once Automake 1.9.x +# dies out for good. For more background, see: +# +# +AC_SUBST([mkdir_p], ['$(MKDIR_P)']) # We need awk for the "check" target (and possibly the TAP driver). The # system "awk" is bad on some platforms. AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl +AC_REQUIRE([AM_SET_LEADING_DOT])dnl _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], [_AM_PROG_TAR([v7])])]) @@ -546,7 +553,7 @@ Aborting the configuration process, to ensure you take notice of the issue. You can download and install GNU coreutils to get an 'rm' implementation -that behaves properly: . +that behaves properly: . If you want to complete the configuration process using your problematic 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM @@ -588,7 +595,7 @@ done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) -# Copyright (C) 2001-2015 Free Software Foundation, Inc. +# Copyright (C) 2001-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -609,9 +616,28 @@ fi AC_SUBST([install_sh])]) +# Copyright (C) 2003-2018 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. + +# Check whether the underlying file-system supports filenames +# with a leading dot. For instance MS-DOS doesn't. +AC_DEFUN([AM_SET_LEADING_DOT], +[rm -rf .tst 2>/dev/null +mkdir .tst 2>/dev/null +if test -d .tst; then + am__leading_dot=. +else + am__leading_dot=_ +fi +rmdir .tst 2>/dev/null +AC_SUBST([am__leading_dot])]) + # Check to see how 'make' treats includes. -*- Autoconf -*- -# Copyright (C) 2001-2015 Free Software Foundation, Inc. +# Copyright (C) 2001-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -654,7 +680,7 @@ # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- -# Copyright (C) 1997-2015 Free Software Foundation, Inc. +# Copyright (C) 1997-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -693,7 +719,7 @@ # Helper functions for option handling. -*- Autoconf -*- -# Copyright (C) 2001-2015 Free Software Foundation, Inc. +# Copyright (C) 2001-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -722,7 +748,7 @@ AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) -# Copyright (C) 1999-2015 Free Software Foundation, Inc. +# Copyright (C) 1999-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -769,7 +795,7 @@ # For backward compatibility. AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) -# Copyright (C) 2001-2015 Free Software Foundation, Inc. +# Copyright (C) 2001-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -788,7 +814,7 @@ # Check to make sure that the build environment is sane. -*- Autoconf -*- -# Copyright (C) 1996-2015 Free Software Foundation, Inc. +# Copyright (C) 1996-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -869,7 +895,7 @@ rm -f conftest.file ]) -# Copyright (C) 2009-2015 Free Software Foundation, Inc. +# Copyright (C) 2009-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -929,7 +955,7 @@ _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl ]) -# Copyright (C) 2001-2015 Free Software Foundation, Inc. +# Copyright (C) 2001-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -957,7 +983,7 @@ INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) -# Copyright (C) 2006-2015 Free Software Foundation, Inc. +# Copyright (C) 2006-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -976,7 +1002,7 @@ # Check how to create a tarball. -*- Autoconf -*- -# Copyright (C) 2004-2015 Free Software Foundation, Inc. +# Copyright (C) 2004-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1108,11 +1134,14 @@ ]) # _AM_PROG_TAR m4_include([m4/00gnulib.m4]) +m4_include([m4/__inline.m4]) m4_include([m4/absolute-header.m4]) m4_include([m4/alloca.m4]) +m4_include([m4/arpa_inet_h.m4]) m4_include([m4/assert.m4]) m4_include([m4/btowc.m4]) m4_include([m4/builtin-expect.m4]) +m4_include([m4/c-stack.m4]) m4_include([m4/chdir-long.m4]) m4_include([m4/close-stream.m4]) m4_include([m4/close.m4]) @@ -1124,7 +1153,6 @@ m4_include([m4/cycle-check.m4]) m4_include([m4/d-ino.m4]) m4_include([m4/d-type.m4]) -m4_include([m4/dirent-safer.m4]) m4_include([m4/dirent_h.m4]) m4_include([m4/dirfd.m4]) m4_include([m4/dirname.m4]) @@ -1149,10 +1177,12 @@ m4_include([m4/flexmember.m4]) m4_include([m4/float_h.m4]) m4_include([m4/fnmatch.m4]) +m4_include([m4/fnmatch_h.m4]) m4_include([m4/fpending.m4]) m4_include([m4/fpieee.m4]) m4_include([m4/fstat.m4]) m4_include([m4/fstatat.m4]) +m4_include([m4/ftruncate.m4]) m4_include([m4/fts.m4]) m4_include([m4/getcwd.m4]) m4_include([m4/getdtablesize.m4]) @@ -1160,22 +1190,26 @@ m4_include([m4/getpagesize.m4]) m4_include([m4/getprogname.m4]) m4_include([m4/gettext.m4]) +m4_include([m4/gettimeofday.m4]) m4_include([m4/glibc21.m4]) m4_include([m4/gnulib-common.m4]) m4_include([m4/gnulib-comp.m4]) -m4_include([m4/hard-locale.m4]) +m4_include([m4/host-cpu-c-abi.m4]) m4_include([m4/i-ring.m4]) m4_include([m4/iconv.m4]) m4_include([m4/iconv_h.m4]) m4_include([m4/iconv_open.m4]) m4_include([m4/include_next.m4]) +m4_include([m4/inet_pton.m4]) m4_include([m4/inline.m4]) +m4_include([m4/intl-thread-locale.m4]) m4_include([m4/intlmacosx.m4]) m4_include([m4/intmax_t.m4]) m4_include([m4/inttostr.m4]) m4_include([m4/inttypes-pri.m4]) m4_include([m4/inttypes.m4]) m4_include([m4/inttypes_h.m4]) +m4_include([m4/ioctl.m4]) m4_include([m4/isatty.m4]) m4_include([m4/isblank.m4]) m4_include([m4/iswblank.m4]) @@ -1186,6 +1220,7 @@ m4_include([m4/lib-ld.m4]) m4_include([m4/lib-link.m4]) m4_include([m4/lib-prefix.m4]) +m4_include([m4/libsigsegv.m4]) m4_include([m4/libunistring-base.m4]) m4_include([m4/limits-h.m4]) m4_include([m4/localcharset.m4]) @@ -1196,6 +1231,7 @@ m4_include([m4/locale_h.m4]) m4_include([m4/localeconv.m4]) m4_include([m4/localename.m4]) +m4_include([m4/localtime-buffer.m4]) m4_include([m4/lock.m4]) m4_include([m4/longlong.m4]) m4_include([m4/lseek.m4]) @@ -1221,18 +1257,21 @@ m4_include([m4/msvc-inval.m4]) m4_include([m4/msvc-nothrow.m4]) m4_include([m4/multiarch.m4]) +m4_include([m4/nanosleep.m4]) +m4_include([m4/netinet_in_h.m4]) m4_include([m4/nl_langinfo.m4]) m4_include([m4/nls.m4]) 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-cloexec.m4]) m4_include([m4/open.m4]) m4_include([m4/openat.m4]) m4_include([m4/opendir.m4]) m4_include([m4/pathmax.m4]) m4_include([m4/pcre.m4]) m4_include([m4/perl.m4]) +m4_include([m4/perror.m4]) m4_include([m4/pipe.m4]) m4_include([m4/pkg.m4]) m4_include([m4/po.m4]) @@ -1242,17 +1281,28 @@ m4_include([m4/putenv.m4]) m4_include([m4/quote.m4]) m4_include([m4/quotearg.m4]) +m4_include([m4/raise.m4]) m4_include([m4/read.m4]) m4_include([m4/readdir.m4]) m4_include([m4/realloc.m4]) m4_include([m4/regex.m4]) m4_include([m4/safe-read.m4]) m4_include([m4/save-cwd.m4]) +m4_include([m4/select.m4]) m4_include([m4/setenv.m4]) m4_include([m4/setlocale.m4]) +m4_include([m4/sigaction.m4]) +m4_include([m4/signal_h.m4]) +m4_include([m4/signalblocking.m4]) m4_include([m4/size_max.m4]) +m4_include([m4/sleep.m4]) m4_include([m4/snprintf.m4]) +m4_include([m4/socketlib.m4]) +m4_include([m4/sockets.m4]) +m4_include([m4/socklen.m4]) +m4_include([m4/sockpfaf.m4]) m4_include([m4/ssize_t.m4]) +m4_include([m4/stat-time.m4]) m4_include([m4/stat.m4]) m4_include([m4/std-gnu11.m4]) m4_include([m4/stdalign.m4]) @@ -1266,6 +1316,7 @@ m4_include([m4/stpcpy.m4]) m4_include([m4/strdup.m4]) m4_include([m4/strerror.m4]) +m4_include([m4/strerror_r.m4]) m4_include([m4/string_h.m4]) m4_include([m4/strnlen.m4]) m4_include([m4/strstr.m4]) @@ -1274,9 +1325,13 @@ m4_include([m4/strtoull.m4]) m4_include([m4/strtoumax.m4]) m4_include([m4/symlink.m4]) +m4_include([m4/sys_ioctl_h.m4]) +m4_include([m4/sys_select_h.m4]) m4_include([m4/sys_socket_h.m4]) m4_include([m4/sys_stat_h.m4]) +m4_include([m4/sys_time_h.m4]) m4_include([m4/sys_types_h.m4]) +m4_include([m4/sys_uio_h.m4]) m4_include([m4/threadlib.m4]) m4_include([m4/time_h.m4]) m4_include([m4/unistd-safer.m4]) @@ -1293,6 +1348,7 @@ m4_include([m4/wctomb.m4]) m4_include([m4/wctype_h.m4]) m4_include([m4/wcwidth.m4]) +m4_include([m4/windows-stat-inodes.m4]) m4_include([m4/wint_t.m4]) m4_include([m4/xalloc.m4]) m4_include([m4/xsize.m4]) diff -Nru grep-3.1/AUTHORS grep-3.3/AUTHORS --- grep-3.1/AUTHORS 2017-01-01 11:34:33.000000000 +0000 +++ grep-3.3/AUTHORS 2018-01-07 00:09:11.000000000 +0000 @@ -1,4 +1,4 @@ - Copyright (C) 1992, 1997-2002, 2004-2017 Free Software Foundation, Inc. + Copyright (C) 1992, 1997-2002, 2004-2018 Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright diff -Nru grep-3.1/build-aux/announce-gen grep-3.3/build-aux/announce-gen --- grep-3.1/build-aux/announce-gen 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/build-aux/announce-gen 2018-03-07 13:57:39.000000000 +0000 @@ -3,13 +3,13 @@ if 0; # Generate a release announcement message. -my $VERSION = '2016-01-12 23:09'; # UTC +my $VERSION = '2018-03-07 03:46'; # 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-2017 Free Software Foundation, Inc. +# Copyright (C) 2002-2018 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,7 @@ # 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 . +# along with this program. If not, see . # Written by Jim Meyering @@ -492,17 +492,17 @@ 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/!) + if (@tarballs == 1 && $url_dir_list[0] =~ m!https://ftp\.gnu\.org/gnu/!) { (my $m = "$url_dir_list[0]/$tarballs[0]") - =~ s!http://ftp\.gnu\.org/gnu/!http://ftpmirror\.gnu\.org/!; + =~ s!https://ftp\.gnu\.org/gnu/!https://ftpmirror\.gnu\.org/!; print " $m\n" . " $m.sig\n\n"; } else { - print " http://www.gnu.org/order/ftp.html\n\n"; + print " https://www.gnu.org/order/ftp.html\n\n"; } } @@ -549,7 +549,7 @@ ## perl-label-offset: -2 ## perl-extra-newline-before-brace: t ## perl-merge-trailing-else: nil -## eval: (add-hook 'write-file-hooks 'time-stamp) +## eval: (add-hook 'before-save-hook 'time-stamp) ## time-stamp-start: "my $VERSION = '" ## time-stamp-format: "%:y-%02m-%02d %02H:%02M" ## time-stamp-time-zone: "UTC0" diff -Nru grep-3.1/build-aux/config.guess grep-3.3/build-aux/config.guess --- grep-3.1/build-aux/config.guess 2017-06-10 16:44:24.000000000 +0000 +++ grep-3.3/build-aux/config.guess 2018-12-21 02:51:47.000000000 +0000 @@ -1,8 +1,8 @@ #! /bin/sh # Attempt to guess a canonical system name. -# Copyright 1992-2017 Free Software Foundation, Inc. +# Copyright 1992-2018 Free Software Foundation, Inc. -timestamp='2017-05-27' +timestamp='2018-12-07' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -15,7 +15,7 @@ # 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 . +# along with this program; if not, see . # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a @@ -27,7 +27,7 @@ # Originally written by Per Bothner; maintained since 2000 by Ben Elliston. # # You can get the latest version of this script from: -# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess +# https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess # # Please send patches to . @@ -39,7 +39,7 @@ Output the configuration name of the system \`$me' is run on. -Operation modes: +Options: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit @@ -50,7 +50,7 @@ GNU config.guess ($timestamp) Originally written by Per Bothner. -Copyright 1992-2017 Free Software Foundation, Inc. +Copyright 1992-2018 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -84,8 +84,6 @@ exit 1 fi -trap 'exit 1' 1 2 15 - # CC_FOR_BUILD -- compiler used by this script. Note that the use of a # compiler to aid in system detection is discouraged as it requires # temporary files to be created and, as you can see below, it is a @@ -96,34 +94,38 @@ # Portable tmp directory creation inspired by the Autoconf team. -set_cc_for_build=' -trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; -trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; -: ${TMPDIR=/tmp} ; - { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || - { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || - { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || - { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; -dummy=$tmp/dummy ; -tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; -case $CC_FOR_BUILD,$HOST_CC,$CC in - ,,) echo "int x;" > $dummy.c ; - for c in cc gcc c89 c99 ; do - if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then - CC_FOR_BUILD="$c"; break ; - fi ; - done ; - if test x"$CC_FOR_BUILD" = x ; then - CC_FOR_BUILD=no_compiler_found ; - fi - ;; - ,,*) CC_FOR_BUILD=$CC ;; - ,*,*) CC_FOR_BUILD=$HOST_CC ;; -esac ; set_cc_for_build= ;' +tmp= +# shellcheck disable=SC2172 +trap 'test -z "$tmp" || rm -fr "$tmp"' 0 1 2 13 15 + +set_cc_for_build() { + : "${TMPDIR=/tmp}" + # shellcheck disable=SC2039 + { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || + { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir "$tmp" 2>/dev/null) ; } || + { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir "$tmp" 2>/dev/null) && echo "Warning: creating insecure temp directory" >&2 ; } || + { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } + dummy=$tmp/dummy + case ${CC_FOR_BUILD-},${HOST_CC-},${CC-} in + ,,) echo "int x;" > "$dummy.c" + for driver in cc gcc c89 c99 ; do + if ($driver -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then + CC_FOR_BUILD="$driver" + break + fi + done + if test x"$CC_FOR_BUILD" = x ; then + CC_FOR_BUILD=no_compiler_found + fi + ;; + ,,*) CC_FOR_BUILD=$CC ;; + ,*,*) CC_FOR_BUILD=$HOST_CC ;; + esac +} # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 1994-08-24) -if (test -f /.attbin/uname) >/dev/null 2>&1 ; then +if test -f /.attbin/uname ; then PATH=$PATH:/.attbin ; export PATH fi @@ -132,14 +134,14 @@ UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown -case "${UNAME_SYSTEM}" in +case "$UNAME_SYSTEM" in Linux|GNU|GNU/*) # If the system lacks a compiler, then just pick glibc. # We could probably try harder. LIBC=gnu - eval $set_cc_for_build - cat <<-EOF > $dummy.c + set_cc_for_build + cat <<-EOF > "$dummy.c" #include #if defined(__UCLIBC__) LIBC=uclibc @@ -149,13 +151,20 @@ LIBC=gnu #endif EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'` + eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`" + + # If ldd exists, use it to detect musl libc. + if command -v ldd >/dev/null && \ + ldd --version 2>&1 | grep -q ^musl + then + LIBC=musl + fi ;; esac # Note: order is significant - the case branches are not exclusive. -case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in +case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in *:NetBSD:*:*) # NetBSD (nbsd) targets should (where applicable) match one or # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, @@ -169,30 +178,30 @@ # portion of the name. We always set it to "unknown". sysctl="sysctl -n hw.machine_arch" UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \ - /sbin/$sysctl 2>/dev/null || \ - /usr/sbin/$sysctl 2>/dev/null || \ + "/sbin/$sysctl" 2>/dev/null || \ + "/usr/sbin/$sysctl" 2>/dev/null || \ echo unknown)` - case "${UNAME_MACHINE_ARCH}" in + case "$UNAME_MACHINE_ARCH" in armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; sh5el) machine=sh5le-unknown ;; earmv*) - arch=`echo ${UNAME_MACHINE_ARCH} | sed -e 's,^e\(armv[0-9]\).*$,\1,'` - endian=`echo ${UNAME_MACHINE_ARCH} | sed -ne 's,^.*\(eb\)$,\1,p'` - machine=${arch}${endian}-unknown + arch=`echo "$UNAME_MACHINE_ARCH" | sed -e 's,^e\(armv[0-9]\).*$,\1,'` + endian=`echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p'` + machine="${arch}${endian}"-unknown ;; - *) machine=${UNAME_MACHINE_ARCH}-unknown ;; + *) machine="$UNAME_MACHINE_ARCH"-unknown ;; esac # The Operating System including object format, if it has switched # to ELF recently (or will in the future) and ABI. - case "${UNAME_MACHINE_ARCH}" in + case "$UNAME_MACHINE_ARCH" in earm*) os=netbsdelf ;; arm*|i386|m68k|ns32k|sh3*|sparc|vax) - eval $set_cc_for_build + set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ELF__ then @@ -208,10 +217,10 @@ ;; esac # Determine ABI tags. - case "${UNAME_MACHINE_ARCH}" in + case "$UNAME_MACHINE_ARCH" in earm*) expr='s/^earmv[0-9]/-eabi/;s/eb$//' - abi=`echo ${UNAME_MACHINE_ARCH} | sed -e "$expr"` + abi=`echo "$UNAME_MACHINE_ARCH" | sed -e "$expr"` ;; esac # The OS release @@ -219,46 +228,55 @@ # thus, need a distinct triplet. However, they do not need # kernel version information, so it can be replaced with a # suitable tag, in the style of linux-gnu. - case "${UNAME_VERSION}" in + case "$UNAME_VERSION" in Debian*) release='-gnu' ;; *) - release=`echo ${UNAME_RELEASE} | sed -e 's/[-_].*//' | cut -d. -f1,2` + release=`echo "$UNAME_RELEASE" | sed -e 's/[-_].*//' | cut -d. -f1,2` ;; esac # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. - echo "${machine}-${os}${release}${abi}" + echo "$machine-${os}${release}${abi-}" exit ;; *:Bitrig:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` - echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE} + echo "$UNAME_MACHINE_ARCH"-unknown-bitrig"$UNAME_RELEASE" exit ;; *:OpenBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` - echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} + echo "$UNAME_MACHINE_ARCH"-unknown-openbsd"$UNAME_RELEASE" exit ;; *:LibertyBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'` - echo ${UNAME_MACHINE_ARCH}-unknown-libertybsd${UNAME_RELEASE} + echo "$UNAME_MACHINE_ARCH"-unknown-libertybsd"$UNAME_RELEASE" + exit ;; + *:MidnightBSD:*:*) + echo "$UNAME_MACHINE"-unknown-midnightbsd"$UNAME_RELEASE" exit ;; *:ekkoBSD:*:*) - echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} + echo "$UNAME_MACHINE"-unknown-ekkobsd"$UNAME_RELEASE" exit ;; *:SolidBSD:*:*) - echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} + echo "$UNAME_MACHINE"-unknown-solidbsd"$UNAME_RELEASE" exit ;; macppc:MirBSD:*:*) - echo powerpc-unknown-mirbsd${UNAME_RELEASE} + echo powerpc-unknown-mirbsd"$UNAME_RELEASE" exit ;; *:MirBSD:*:*) - echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} + echo "$UNAME_MACHINE"-unknown-mirbsd"$UNAME_RELEASE" exit ;; *:Sortix:*:*) - echo ${UNAME_MACHINE}-unknown-sortix + echo "$UNAME_MACHINE"-unknown-sortix exit ;; + *:Redox:*:*) + echo "$UNAME_MACHINE"-unknown-redox + exit ;; + mips:OSF1:*.*) + echo mips-dec-osf1 + exit ;; alpha:OSF1:*:*) case $UNAME_RELEASE in *4.0) @@ -310,28 +328,19 @@ # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. - echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz` + echo "$UNAME_MACHINE"-dec-osf"`echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`" # Reset EXIT trap before exiting to avoid spurious non-zero exit code. exitcode=$? trap '' 0 exit $exitcode ;; - Alpha\ *:Windows_NT*:*) - # How do we know it's Interix rather than the generic POSIX subsystem? - # Should we change UNAME_MACHINE based on the output of uname instead - # of the specific Alpha model? - echo alpha-pc-interix - exit ;; - 21064:Windows_NT:50:3) - echo alpha-dec-winnt3.5 - exit ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 exit ;; *:[Aa]miga[Oo][Ss]:*:*) - echo ${UNAME_MACHINE}-unknown-amigaos + echo "$UNAME_MACHINE"-unknown-amigaos exit ;; *:[Mm]orph[Oo][Ss]:*:*) - echo ${UNAME_MACHINE}-unknown-morphos + echo "$UNAME_MACHINE"-unknown-morphos exit ;; *:OS/390:*:*) echo i370-ibm-openedition @@ -343,7 +352,7 @@ echo powerpc-ibm-os400 exit ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) - echo arm-acorn-riscix${UNAME_RELEASE} + echo arm-acorn-riscix"$UNAME_RELEASE" exit ;; arm*:riscos:*:*|arm*:RISCOS:*:*) echo arm-unknown-riscos @@ -370,38 +379,33 @@ sparc) echo sparc-icl-nx7; exit ;; esac ;; s390x:SunOS:*:*) - echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + echo "$UNAME_MACHINE"-ibm-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`" exit ;; sun4H:SunOS:5.*:*) - echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + echo sparc-hal-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" exit ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) - echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + echo sparc-sun-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`" exit ;; i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) - echo i386-pc-auroraux${UNAME_RELEASE} + echo i386-pc-auroraux"$UNAME_RELEASE" exit ;; i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) - eval $set_cc_for_build - 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 (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ - (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ - grep IS_64BIT_ARCH >/dev/null - then - SUN_ARCH=x86_64 - fi - fi - echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + UNAME_REL="`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`" + case `isainfo -b` in + 32) + echo i386-pc-solaris2"$UNAME_REL" + ;; + 64) + echo x86_64-pc-solaris2"$UNAME_REL" + ;; + esac exit ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. - echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + echo sparc-sun-solaris3"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" exit ;; sun4*:SunOS:*:*) case "`/usr/bin/arch -k`" in @@ -410,25 +414,25 @@ ;; esac # Japanese Language versions have a version number like `4.1.3-JL'. - echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` + echo sparc-sun-sunos"`echo "$UNAME_RELEASE"|sed -e 's/-/_/'`" exit ;; sun3*:SunOS:*:*) - echo m68k-sun-sunos${UNAME_RELEASE} + echo m68k-sun-sunos"$UNAME_RELEASE" exit ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` - test "x${UNAME_RELEASE}" = x && UNAME_RELEASE=3 + test "x$UNAME_RELEASE" = x && UNAME_RELEASE=3 case "`/bin/arch`" in sun3) - echo m68k-sun-sunos${UNAME_RELEASE} + echo m68k-sun-sunos"$UNAME_RELEASE" ;; sun4) - echo sparc-sun-sunos${UNAME_RELEASE} + echo sparc-sun-sunos"$UNAME_RELEASE" ;; esac exit ;; aushp:SunOS:*:*) - echo sparc-auspex-sunos${UNAME_RELEASE} + echo sparc-auspex-sunos"$UNAME_RELEASE" exit ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not @@ -439,44 +443,44 @@ # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} + echo m68k-atari-mint"$UNAME_RELEASE" exit ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} + echo m68k-atari-mint"$UNAME_RELEASE" exit ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} + echo m68k-atari-mint"$UNAME_RELEASE" exit ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) - echo m68k-milan-mint${UNAME_RELEASE} + echo m68k-milan-mint"$UNAME_RELEASE" exit ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) - echo m68k-hades-mint${UNAME_RELEASE} + echo m68k-hades-mint"$UNAME_RELEASE" exit ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) - echo m68k-unknown-mint${UNAME_RELEASE} + echo m68k-unknown-mint"$UNAME_RELEASE" exit ;; m68k:machten:*:*) - echo m68k-apple-machten${UNAME_RELEASE} + echo m68k-apple-machten"$UNAME_RELEASE" exit ;; powerpc:machten:*:*) - echo powerpc-apple-machten${UNAME_RELEASE} + echo powerpc-apple-machten"$UNAME_RELEASE" exit ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 exit ;; RISC*:ULTRIX:*:*) - echo mips-dec-ultrix${UNAME_RELEASE} + echo mips-dec-ultrix"$UNAME_RELEASE" exit ;; VAX*:ULTRIX*:*:*) - echo vax-dec-ultrix${UNAME_RELEASE} + echo vax-dec-ultrix"$UNAME_RELEASE" exit ;; 2020:CLIX:*:* | 2430:CLIX:*:*) - echo clipper-intergraph-clix${UNAME_RELEASE} + echo clipper-intergraph-clix"$UNAME_RELEASE" exit ;; mips:*:*:UMIPS | mips:*:*:RISCos) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c + set_cc_for_build + sed 's/^ //' << EOF > "$dummy.c" #ifdef __cplusplus #include /* for printf() prototype */ int main (int argc, char *argv[]) { @@ -485,23 +489,23 @@ #endif #if defined (host_mips) && defined (MIPSEB) #if defined (SYSTYPE_SYSV) - printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); + printf ("mips-mips-riscos%ssysv\\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_SVR4) - printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); + printf ("mips-mips-riscos%ssvr4\\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) - printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); + printf ("mips-mips-riscos%sbsd\\n", argv[1]); exit (0); #endif #endif exit (-1); } EOF - $CC_FOR_BUILD -o $dummy $dummy.c && - dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && - SYSTEM_NAME=`$dummy $dummyarg` && + $CC_FOR_BUILD -o "$dummy" "$dummy.c" && + dummyarg=`echo "$UNAME_RELEASE" | sed -n 's/\([0-9]*\).*/\1/p'` && + SYSTEM_NAME=`"$dummy" "$dummyarg"` && { echo "$SYSTEM_NAME"; exit; } - echo mips-mips-riscos${UNAME_RELEASE} + echo mips-mips-riscos"$UNAME_RELEASE" exit ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax @@ -527,17 +531,17 @@ AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` - if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] + if [ "$UNAME_PROCESSOR" = mc88100 ] || [ "$UNAME_PROCESSOR" = mc88110 ] then - if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ - [ ${TARGET_BINARY_INTERFACE}x = x ] + if [ "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx ] || \ + [ "$TARGET_BINARY_INTERFACE"x = x ] then - echo m88k-dg-dgux${UNAME_RELEASE} + echo m88k-dg-dgux"$UNAME_RELEASE" else - echo m88k-dg-dguxbcs${UNAME_RELEASE} + echo m88k-dg-dguxbcs"$UNAME_RELEASE" fi else - echo i586-dg-dgux${UNAME_RELEASE} + echo i586-dg-dgux"$UNAME_RELEASE" fi exit ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) @@ -554,7 +558,7 @@ echo m68k-tektronix-bsd exit ;; *:IRIX*:*:*) - echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` + echo mips-sgi-irix"`echo "$UNAME_RELEASE"|sed -e 's/-/_/g'`" exit ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id @@ -566,14 +570,14 @@ if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else - IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} + IBM_REV="$UNAME_VERSION.$UNAME_RELEASE" fi - echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} + echo "$UNAME_MACHINE"-ibm-aix"$IBM_REV" exit ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c + set_cc_for_build + sed 's/^ //' << EOF > "$dummy.c" #include main() @@ -584,7 +588,7 @@ exit(0); } EOF - if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` + if $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` then echo "$SYSTEM_NAME" else @@ -598,7 +602,7 @@ exit ;; *:AIX:*:[4567]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` - if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then + if /usr/sbin/lsattr -El "$IBM_CPU_ID" | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 else IBM_ARCH=powerpc @@ -607,18 +611,18 @@ IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | awk -F: '{ print $3 }' | sed s/[0-9]*$/0/` else - IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} + IBM_REV="$UNAME_VERSION.$UNAME_RELEASE" fi - echo ${IBM_ARCH}-ibm-aix${IBM_REV} + echo "$IBM_ARCH"-ibm-aix"$IBM_REV" exit ;; *:AIX:*:*) echo rs6000-ibm-aix exit ;; - ibmrt:4.4BSD:*|romp-ibm:BSD:*) + ibmrt:4.4BSD:*|romp-ibm:4.4BSD:*) echo romp-ibm-bsd4.4 exit ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and - echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to + echo romp-ibm-bsd"$UNAME_RELEASE" # 4.3 with uname added to exit ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx @@ -633,28 +637,28 @@ echo m68k-hp-bsd4.4 exit ;; 9000/[34678]??:HP-UX:*:*) - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` - case "${UNAME_MACHINE}" in - 9000/31? ) HP_ARCH=m68000 ;; - 9000/[34]?? ) HP_ARCH=m68k ;; + HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'` + case "$UNAME_MACHINE" in + 9000/31?) HP_ARCH=m68000 ;; + 9000/[34]??) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) if [ -x /usr/bin/getconf ]; then sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` - case "${sc_cpu_version}" in + case "$sc_cpu_version" in 523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0 528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1 532) # CPU_PA_RISC2_0 - case "${sc_kernel_bits}" in + case "$sc_kernel_bits" in 32) HP_ARCH=hppa2.0n ;; 64) HP_ARCH=hppa2.0w ;; '') HP_ARCH=hppa2.0 ;; # HP-UX 10.20 esac ;; esac fi - if [ "${HP_ARCH}" = "" ]; then - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c + if [ "$HP_ARCH" = "" ]; then + set_cc_for_build + sed 's/^ //' << EOF > "$dummy.c" #define _HPUX_SOURCE #include @@ -687,13 +691,13 @@ exit (0); } EOF - (CCOPTS="" $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` + (CCOPTS="" $CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null) && HP_ARCH=`"$dummy"` test -z "$HP_ARCH" && HP_ARCH=hppa fi ;; esac - if [ ${HP_ARCH} = hppa2.0w ] + if [ "$HP_ARCH" = hppa2.0w ] then - eval $set_cc_for_build + set_cc_for_build # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler @@ -712,15 +716,15 @@ HP_ARCH=hppa64 fi fi - echo ${HP_ARCH}-hp-hpux${HPUX_REV} + echo "$HP_ARCH"-hp-hpux"$HPUX_REV" exit ;; ia64:HP-UX:*:*) - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` - echo ia64-hp-hpux${HPUX_REV} + HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'` + echo ia64-hp-hpux"$HPUX_REV" exit ;; 3050*:HI-UX:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c + set_cc_for_build + sed 's/^ //' << EOF > "$dummy.c" #include int main () @@ -745,11 +749,11 @@ exit (0); } EOF - $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && + $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` && { echo "$SYSTEM_NAME"; exit; } echo unknown-hitachi-hiuxwe2 exit ;; - 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) + 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:*) echo hppa1.1-hp-bsd exit ;; 9000/8??:4.3bsd:*:*) @@ -758,7 +762,7 @@ *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) echo hppa1.0-hp-mpeix exit ;; - hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) + hp7??:OSF1:*:* | hp8?[79]:OSF1:*:*) echo hppa1.1-hp-osf exit ;; hp8??:OSF1:*:*) @@ -766,9 +770,9 @@ exit ;; i*86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then - echo ${UNAME_MACHINE}-unknown-osf1mk + echo "$UNAME_MACHINE"-unknown-osf1mk else - echo ${UNAME_MACHINE}-unknown-osf1 + echo "$UNAME_MACHINE"-unknown-osf1 fi exit ;; parisc*:Lites*:*:*) @@ -793,128 +797,120 @@ echo c4-convex-bsd exit ;; CRAY*Y-MP:*:*:*) - echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + echo ymp-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*[A-Z]90:*:*:*) - echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ + echo "$UNAME_MACHINE"-cray-unicos"$UNAME_RELEASE" \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ -e 's/\.[^.]*$/.X/' exit ;; CRAY*TS:*:*:*) - echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + echo t90-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*T3E:*:*:*) - echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + echo alphaev5-cray-unicosmk"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*SV1:*:*:*) - echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + echo sv1-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' exit ;; *:UNICOS/mp:*:*) - echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + echo craynv-cray-unicosmp"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' exit ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz` FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` + FUJITSU_REL=`echo "$UNAME_RELEASE" | sed -e 's/ /_/'` echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; 5000:UNIX_System_V:4.*:*) FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'` + FUJITSU_REL=`echo "$UNAME_RELEASE" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'` echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) - echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} + echo "$UNAME_MACHINE"-pc-bsdi"$UNAME_RELEASE" exit ;; sparc*:BSD/OS:*:*) - echo sparc-unknown-bsdi${UNAME_RELEASE} + echo sparc-unknown-bsdi"$UNAME_RELEASE" exit ;; *:BSD/OS:*:*) - echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} + echo "$UNAME_MACHINE"-unknown-bsdi"$UNAME_RELEASE" + exit ;; + arm:FreeBSD:*:*) + UNAME_PROCESSOR=`uname -p` + set_cc_for_build + if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ARM_PCS_VFP + then + echo "${UNAME_PROCESSOR}"-unknown-freebsd"`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`"-gnueabi + else + echo "${UNAME_PROCESSOR}"-unknown-freebsd"`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`"-gnueabihf + fi exit ;; *:FreeBSD:*:*) UNAME_PROCESSOR=`/usr/bin/uname -p` - case ${UNAME_PROCESSOR} in + case "$UNAME_PROCESSOR" in amd64) UNAME_PROCESSOR=x86_64 ;; i386) UNAME_PROCESSOR=i586 ;; esac - echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` + echo "$UNAME_PROCESSOR"-unknown-freebsd"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`" exit ;; i*:CYGWIN*:*) - echo ${UNAME_MACHINE}-pc-cygwin + echo "$UNAME_MACHINE"-pc-cygwin exit ;; *:MINGW64*:*) - echo ${UNAME_MACHINE}-pc-mingw64 + echo "$UNAME_MACHINE"-pc-mingw64 exit ;; *:MINGW*:*) - echo ${UNAME_MACHINE}-pc-mingw32 + echo "$UNAME_MACHINE"-pc-mingw32 exit ;; *:MSYS*:*) - echo ${UNAME_MACHINE}-pc-msys - exit ;; - i*:windows32*:*) - # uname -m includes "-pc" on this system. - echo ${UNAME_MACHINE}-mingw32 + echo "$UNAME_MACHINE"-pc-msys exit ;; i*:PW*:*) - echo ${UNAME_MACHINE}-pc-pw32 + echo "$UNAME_MACHINE"-pc-pw32 exit ;; *:Interix*:*) - case ${UNAME_MACHINE} in + case "$UNAME_MACHINE" in x86) - echo i586-pc-interix${UNAME_RELEASE} + echo i586-pc-interix"$UNAME_RELEASE" exit ;; authenticamd | genuineintel | EM64T) - echo x86_64-unknown-interix${UNAME_RELEASE} + echo x86_64-unknown-interix"$UNAME_RELEASE" exit ;; IA64) - echo ia64-unknown-interix${UNAME_RELEASE} + echo ia64-unknown-interix"$UNAME_RELEASE" exit ;; esac ;; - [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) - echo i${UNAME_MACHINE}-pc-mks - exit ;; - 8664:Windows_NT:*) - echo x86_64-pc-mks - exit ;; - i*:Windows_NT*:* | Pentium*:Windows_NT*:*) - # How do we know it's Interix rather than the generic POSIX subsystem? - # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we - # UNAME_MACHINE based on the output of uname instead of i386? - echo i586-pc-interix - exit ;; i*:UWIN*:*) - echo ${UNAME_MACHINE}-pc-uwin + echo "$UNAME_MACHINE"-pc-uwin exit ;; amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) - echo x86_64-unknown-cygwin - exit ;; - p*:CYGWIN*:*) - echo powerpcle-unknown-cygwin + echo x86_64-pc-cygwin exit ;; prep*:SunOS:5.*:*) - echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + echo powerpcle-unknown-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" exit ;; *:GNU:*:*) # the GNU system - echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` + echo "`echo "$UNAME_MACHINE"|sed -e 's,[-/].*$,,'`-unknown-$LIBC`echo "$UNAME_RELEASE"|sed -e 's,/.*$,,'`" exit ;; *:GNU/*:*:*) # other systems with GNU libc and userland - echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC} + echo "$UNAME_MACHINE-unknown-`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`-$LIBC" exit ;; - i*86:Minix:*:*) - echo ${UNAME_MACHINE}-pc-minix + *:Minix:*:*) + echo "$UNAME_MACHINE"-unknown-minix exit ;; aarch64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; aarch64_be:Linux:*:*) UNAME_MACHINE=aarch64_be - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in @@ -928,63 +924,63 @@ esac objdump --private-headers /bin/sh | grep -q ld.so.1 if test "$?" = 0 ; then LIBC=gnulibc1 ; fi - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; arc:Linux:*:* | arceb:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; arm*:Linux:*:*) - eval $set_cc_for_build + set_cc_for_build if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_EABI__ then - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" else if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_PCS_VFP then - echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabi else - echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabihf fi fi exit ;; avr32*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; cris:Linux:*:*) - echo ${UNAME_MACHINE}-axis-linux-${LIBC} + echo "$UNAME_MACHINE"-axis-linux-"$LIBC" exit ;; crisv32:Linux:*:*) - echo ${UNAME_MACHINE}-axis-linux-${LIBC} + echo "$UNAME_MACHINE"-axis-linux-"$LIBC" exit ;; e2k:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; frv:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; hexagon:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; i*86:Linux:*:*) - echo ${UNAME_MACHINE}-pc-linux-${LIBC} + echo "$UNAME_MACHINE"-pc-linux-"$LIBC" exit ;; ia64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; k1om:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; m32r*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; m68*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; mips:Linux:*:* | mips64:Linux:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c + set_cc_for_build + sed 's/^ //' << EOF > "$dummy.c" #undef CPU #undef ${UNAME_MACHINE} #undef ${UNAME_MACHINE}el @@ -998,70 +994,70 @@ #endif #endif EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` - test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; } + eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU'`" + test "x$CPU" != x && { echo "$CPU-unknown-linux-$LIBC"; exit; } ;; mips64el:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; openrisc*:Linux:*:*) - echo or1k-unknown-linux-${LIBC} + echo or1k-unknown-linux-"$LIBC" exit ;; or32:Linux:*:* | or1k*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; padre:Linux:*:*) - echo sparc-unknown-linux-${LIBC} + echo sparc-unknown-linux-"$LIBC" exit ;; parisc64:Linux:*:* | hppa64:Linux:*:*) - echo hppa64-unknown-linux-${LIBC} + echo hppa64-unknown-linux-"$LIBC" exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in - PA7*) echo hppa1.1-unknown-linux-${LIBC} ;; - PA8*) echo hppa2.0-unknown-linux-${LIBC} ;; - *) echo hppa-unknown-linux-${LIBC} ;; + PA7*) echo hppa1.1-unknown-linux-"$LIBC" ;; + PA8*) echo hppa2.0-unknown-linux-"$LIBC" ;; + *) echo hppa-unknown-linux-"$LIBC" ;; esac exit ;; ppc64:Linux:*:*) - echo powerpc64-unknown-linux-${LIBC} + echo powerpc64-unknown-linux-"$LIBC" exit ;; ppc:Linux:*:*) - echo powerpc-unknown-linux-${LIBC} + echo powerpc-unknown-linux-"$LIBC" exit ;; ppc64le:Linux:*:*) - echo powerpc64le-unknown-linux-${LIBC} + echo powerpc64le-unknown-linux-"$LIBC" exit ;; ppcle:Linux:*:*) - echo powerpcle-unknown-linux-${LIBC} + echo powerpcle-unknown-linux-"$LIBC" exit ;; riscv32:Linux:*:* | riscv64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; s390:Linux:*:* | s390x:Linux:*:*) - echo ${UNAME_MACHINE}-ibm-linux-${LIBC} + echo "$UNAME_MACHINE"-ibm-linux-"$LIBC" exit ;; sh64*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; sh*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; sparc:Linux:*:* | sparc64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; tile*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; vax:Linux:*:*) - echo ${UNAME_MACHINE}-dec-linux-${LIBC} + echo "$UNAME_MACHINE"-dec-linux-"$LIBC" exit ;; x86_64:Linux:*:*) - echo ${UNAME_MACHINE}-pc-linux-${LIBC} + echo "$UNAME_MACHINE"-pc-linux-"$LIBC" exit ;; xtensa*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. @@ -1075,34 +1071,34 @@ # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. # Use sysv4.2uw... so that sysv4* matches it. - echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} + echo "$UNAME_MACHINE"-pc-sysv4.2uw"$UNAME_VERSION" exit ;; i*86:OS/2:*:*) # If we were able to find `uname', then EMX Unix compatibility # is probably installed. - echo ${UNAME_MACHINE}-pc-os2-emx + echo "$UNAME_MACHINE"-pc-os2-emx exit ;; i*86:XTS-300:*:STOP) - echo ${UNAME_MACHINE}-unknown-stop + echo "$UNAME_MACHINE"-unknown-stop exit ;; i*86:atheos:*:*) - echo ${UNAME_MACHINE}-unknown-atheos + echo "$UNAME_MACHINE"-unknown-atheos exit ;; i*86:syllable:*:*) - echo ${UNAME_MACHINE}-pc-syllable + echo "$UNAME_MACHINE"-pc-syllable exit ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) - echo i386-unknown-lynxos${UNAME_RELEASE} + echo i386-unknown-lynxos"$UNAME_RELEASE" exit ;; i*86:*DOS:*:*) - echo ${UNAME_MACHINE}-pc-msdosdjgpp + echo "$UNAME_MACHINE"-pc-msdosdjgpp exit ;; - i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) - UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` + i*86:*:4.*:*) + UNAME_REL=`echo "$UNAME_RELEASE" | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then - echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} + echo "$UNAME_MACHINE"-univel-sysv"$UNAME_REL" else - echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} + echo "$UNAME_MACHINE"-pc-sysv"$UNAME_REL" fi exit ;; i*86:*:5:[678]*) @@ -1112,12 +1108,12 @@ *Pentium) UNAME_MACHINE=i586 ;; *Pent*|*Celeron) UNAME_MACHINE=i686 ;; esac - echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} + echo "$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}{$UNAME_VERSION}" exit ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 @@ -1127,9 +1123,9 @@ && UNAME_MACHINE=i686 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 - echo ${UNAME_MACHINE}-pc-sco$UNAME_REL + echo "$UNAME_MACHINE"-pc-sco"$UNAME_REL" else - echo ${UNAME_MACHINE}-pc-sysv32 + echo "$UNAME_MACHINE"-pc-sysv32 fi exit ;; pc:*:*:*) @@ -1149,9 +1145,9 @@ exit ;; i860:*:4.*:*) # i860-SVR4 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then - echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 + echo i860-stardent-sysv"$UNAME_RELEASE" # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. - echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 + echo i860-unknown-sysv"$UNAME_RELEASE" # Unknown i860-SVR4 fi exit ;; mini*:CTIX:SYS*5:*) @@ -1171,9 +1167,9 @@ test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4.3${OS_REL}; exit; } + && { echo i486-ncr-sysv4.3"$OS_REL"; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ - && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; + && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4; exit; } ;; @@ -1182,28 +1178,28 @@ test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4.3${OS_REL}; exit; } + && { echo i486-ncr-sysv4.3"$OS_REL"; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ - && { echo i586-ncr-sysv4.3${OS_REL}; exit; } + && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ - && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; + && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) - echo m68k-unknown-lynxos${UNAME_RELEASE} + echo m68k-unknown-lynxos"$UNAME_RELEASE" exit ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit ;; TSUNAMI:LynxOS:2.*:*) - echo sparc-unknown-lynxos${UNAME_RELEASE} + echo sparc-unknown-lynxos"$UNAME_RELEASE" exit ;; rs6000:LynxOS:2.*:*) - echo rs6000-unknown-lynxos${UNAME_RELEASE} + echo rs6000-unknown-lynxos"$UNAME_RELEASE" exit ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) - echo powerpc-unknown-lynxos${UNAME_RELEASE} + echo powerpc-unknown-lynxos"$UNAME_RELEASE" exit ;; SM[BE]S:UNIX_SV:*:*) - echo mips-dde-sysv${UNAME_RELEASE} + echo mips-dde-sysv"$UNAME_RELEASE" exit ;; RM*:ReliantUNIX-*:*:*) echo mips-sni-sysv4 @@ -1214,7 +1210,7 @@ *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` - echo ${UNAME_MACHINE}-sni-sysv4 + echo "$UNAME_MACHINE"-sni-sysv4 else echo ns32k-sni-sysv fi @@ -1234,23 +1230,23 @@ exit ;; i*86:VOS:*:*) # From Paul.Green@stratus.com. - echo ${UNAME_MACHINE}-stratus-vos + echo "$UNAME_MACHINE"-stratus-vos exit ;; *:VOS:*:*) # From Paul.Green@stratus.com. echo hppa1.1-stratus-vos exit ;; mc68*:A/UX:*:*) - echo m68k-apple-aux${UNAME_RELEASE} + echo m68k-apple-aux"$UNAME_RELEASE" exit ;; news*:NEWS-OS:6*:*) echo mips-sony-newsos6 exit ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if [ -d /usr/nec ]; then - echo mips-nec-sysv${UNAME_RELEASE} + echo mips-nec-sysv"$UNAME_RELEASE" else - echo mips-unknown-sysv${UNAME_RELEASE} + echo mips-unknown-sysv"$UNAME_RELEASE" fi exit ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. @@ -1269,39 +1265,39 @@ echo x86_64-unknown-haiku exit ;; SX-4:SUPER-UX:*:*) - echo sx4-nec-superux${UNAME_RELEASE} + echo sx4-nec-superux"$UNAME_RELEASE" exit ;; SX-5:SUPER-UX:*:*) - echo sx5-nec-superux${UNAME_RELEASE} + echo sx5-nec-superux"$UNAME_RELEASE" exit ;; SX-6:SUPER-UX:*:*) - echo sx6-nec-superux${UNAME_RELEASE} + echo sx6-nec-superux"$UNAME_RELEASE" exit ;; SX-7:SUPER-UX:*:*) - echo sx7-nec-superux${UNAME_RELEASE} + echo sx7-nec-superux"$UNAME_RELEASE" exit ;; SX-8:SUPER-UX:*:*) - echo sx8-nec-superux${UNAME_RELEASE} + echo sx8-nec-superux"$UNAME_RELEASE" exit ;; SX-8R:SUPER-UX:*:*) - echo sx8r-nec-superux${UNAME_RELEASE} + echo sx8r-nec-superux"$UNAME_RELEASE" exit ;; SX-ACE:SUPER-UX:*:*) - echo sxace-nec-superux${UNAME_RELEASE} + echo sxace-nec-superux"$UNAME_RELEASE" exit ;; Power*:Rhapsody:*:*) - echo powerpc-apple-rhapsody${UNAME_RELEASE} + echo powerpc-apple-rhapsody"$UNAME_RELEASE" exit ;; *:Rhapsody:*:*) - echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} + echo "$UNAME_MACHINE"-apple-rhapsody"$UNAME_RELEASE" exit ;; *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown - eval $set_cc_for_build + set_cc_for_build if test "$UNAME_PROCESSOR" = unknown ; then UNAME_PROCESSOR=powerpc fi - if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then + if test "`echo "$UNAME_RELEASE" | sed -e 's/\..*//'`" -le 10 ; then if [ "$CC_FOR_BUILD" != no_compiler_found ]; then if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ @@ -1329,7 +1325,7 @@ # that Apple uses in portable devices. UNAME_PROCESSOR=x86_64 fi - echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} + echo "$UNAME_PROCESSOR"-apple-darwin"$UNAME_RELEASE" exit ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` @@ -1337,22 +1333,25 @@ UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi - echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} + echo "$UNAME_PROCESSOR"-"$UNAME_MACHINE"-nto-qnx"$UNAME_RELEASE" exit ;; *:QNX:*:4*) echo i386-pc-qnx exit ;; NEO-*:NONSTOP_KERNEL:*:*) - echo neo-tandem-nsk${UNAME_RELEASE} + echo neo-tandem-nsk"$UNAME_RELEASE" exit ;; NSE-*:NONSTOP_KERNEL:*:*) - echo nse-tandem-nsk${UNAME_RELEASE} + echo nse-tandem-nsk"$UNAME_RELEASE" exit ;; NSR-*:NONSTOP_KERNEL:*:*) - echo nsr-tandem-nsk${UNAME_RELEASE} + echo nsr-tandem-nsk"$UNAME_RELEASE" + exit ;; + NSV-*:NONSTOP_KERNEL:*:*) + echo nsv-tandem-nsk"$UNAME_RELEASE" exit ;; NSX-*:NONSTOP_KERNEL:*:*) - echo nsx-tandem-nsk${UNAME_RELEASE} + echo nsx-tandem-nsk"$UNAME_RELEASE" exit ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux @@ -1361,18 +1360,19 @@ echo bs2000-siemens-sysv exit ;; DS/*:UNIX_System_V:*:*) - echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} + echo "$UNAME_MACHINE"-"$UNAME_SYSTEM"-"$UNAME_RELEASE" exit ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. + # shellcheck disable=SC2154 if test "$cputype" = 386; then UNAME_MACHINE=i386 else UNAME_MACHINE="$cputype" fi - echo ${UNAME_MACHINE}-unknown-plan9 + echo "$UNAME_MACHINE"-unknown-plan9 exit ;; *:TOPS-10:*:*) echo pdp10-unknown-tops10 @@ -1393,14 +1393,14 @@ echo pdp10-unknown-its exit ;; SEI:*:*:SEIUX) - echo mips-sei-seiux${UNAME_RELEASE} + echo mips-sei-seiux"$UNAME_RELEASE" exit ;; *:DragonFly:*:*) - echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` + echo "$UNAME_MACHINE"-unknown-dragonfly"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`" exit ;; *:*VMS:*:*) UNAME_MACHINE=`(uname -p) 2>/dev/null` - case "${UNAME_MACHINE}" in + case "$UNAME_MACHINE" in A*) echo alpha-dec-vms ; exit ;; I*) echo ia64-dec-vms ; exit ;; V*) echo vax-dec-vms ; exit ;; @@ -1409,32 +1409,47 @@ echo i386-pc-xenix exit ;; i*86:skyos:*:*) - echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE} | sed -e 's/ .*$//'` + echo "$UNAME_MACHINE"-pc-skyos"`echo "$UNAME_RELEASE" | sed -e 's/ .*$//'`" exit ;; i*86:rdos:*:*) - echo ${UNAME_MACHINE}-pc-rdos + echo "$UNAME_MACHINE"-pc-rdos exit ;; i*86:AROS:*:*) - echo ${UNAME_MACHINE}-pc-aros + echo "$UNAME_MACHINE"-pc-aros exit ;; x86_64:VMkernel:*:*) - echo ${UNAME_MACHINE}-unknown-esx + echo "$UNAME_MACHINE"-unknown-esx exit ;; amd64:Isilon\ OneFS:*:*) echo x86_64-unknown-onefs exit ;; + *:Unleashed:*:*) + echo "$UNAME_MACHINE"-unknown-unleashed"$UNAME_RELEASE" + exit ;; +esac + +echo "$0: unable to guess system type" >&2 + +case "$UNAME_MACHINE:$UNAME_SYSTEM" in + mips:Linux | mips64:Linux) + # If we got here on MIPS GNU/Linux, output extra information. + cat >&2 <&2 </dev/null` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` -UNAME_MACHINE = ${UNAME_MACHINE} -UNAME_RELEASE = ${UNAME_RELEASE} -UNAME_SYSTEM = ${UNAME_SYSTEM} -UNAME_VERSION = ${UNAME_VERSION} +UNAME_MACHINE = "$UNAME_MACHINE" +UNAME_RELEASE = "$UNAME_RELEASE" +UNAME_SYSTEM = "$UNAME_SYSTEM" +UNAME_VERSION = "$UNAME_VERSION" EOF exit 1 # Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) +# eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" diff -Nru grep-3.1/build-aux/config.rpath grep-3.3/build-aux/config.rpath --- grep-3.1/build-aux/config.rpath 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/build-aux/config.rpath 2018-01-07 00:07:08.000000000 +0000 @@ -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-2017 Free Software Foundation, Inc. +# Copyright 1996-2018 Free Software Foundation, Inc. # Taken from GNU libtool, 2001 # Originally by Gordon Matzigkeit , 1996 # diff -Nru grep-3.1/build-aux/config.sub grep-3.3/build-aux/config.sub --- grep-3.1/build-aux/config.sub 2017-05-14 01:09:51.000000000 +0000 +++ grep-3.3/build-aux/config.sub 2018-12-21 03:31:37.000000000 +0000 @@ -1,8 +1,8 @@ #! /bin/sh # Configuration validation subroutine script. -# Copyright 1992-2017 Free Software Foundation, Inc. +# Copyright 1992-2018 Free Software Foundation, Inc. -timestamp='2017-04-02' +timestamp='2018-12-16' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -15,7 +15,7 @@ # 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 . +# along with this program; if not, see . # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a @@ -33,7 +33,7 @@ # Otherwise, we print the canonical config type on stdout and succeed. # You can get the latest version of this script from: -# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub +# https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases @@ -57,7 +57,7 @@ Canonicalize a configuration name. -Operation modes: +Options: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit @@ -67,7 +67,7 @@ version="\ GNU config.sub ($timestamp) -Copyright 1992-2017 Free Software Foundation, Inc. +Copyright 1992-2018 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -89,12 +89,12 @@ - ) # Use stdin as input. break ;; -* ) - echo "$me: invalid option $1$help" + echo "$me: invalid option $1$help" >&2 exit 1 ;; *local*) # First pass through any local machine types. - echo $1 + echo "$1" exit ;; * ) @@ -110,1252 +110,1160 @@ exit 1;; esac -# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). -# Here we must recognize all the valid KERNEL-OS combinations. -maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` -case $maybe_os in - nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ - linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ - knetbsd*-gnu* | netbsd*-gnu* | netbsd*-eabi* | \ - kopensolaris*-gnu* | cloudabi*-eabi* | \ - storm-chaos* | os2-emx* | rtmk-nova*) - os=-$maybe_os - basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` - ;; - android-linux) - os=-linux-android - basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown - ;; - *) - basic_machine=`echo $1 | sed 's/-[^-]*$//'` - if [ $basic_machine != $1 ] - then os=`echo $1 | sed 's/.*-/-/'` - else os=; fi - ;; -esac - -### Let's recognize common machines as not being operating systems so -### that things like config.sub decstation-3100 work. We also -### recognize some manufacturers as not being operating systems, so we -### can provide default operating systems below. -case $os in - -sun*os*) - # Prevent following clause from handling this invalid input. - ;; - -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ - -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ - -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ - -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ - -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ - -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ - -apple | -axis | -knuth | -cray | -microblaze*) - os= - basic_machine=$1 - ;; - -bluegene*) - os=-cnk - ;; - -sim | -cisco | -oki | -wec | -winbond) - os= - basic_machine=$1 - ;; - -scout) - ;; - -wrs) - os=-vxworks - basic_machine=$1 - ;; - -chorusos*) - os=-chorusos - basic_machine=$1 - ;; - -chorusrdb) - os=-chorusrdb - basic_machine=$1 - ;; - -hiux*) - os=-hiuxwe2 - ;; - -sco6) - os=-sco5v6 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco5) - os=-sco3.2v5 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco4) - os=-sco3.2v4 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco3.2.[4-9]*) - os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco3.2v[4-9]*) - # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco5v6*) - # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco*) - os=-sco3.2v2 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -udk*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -isc) - os=-isc2.2 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -clix*) - basic_machine=clipper-intergraph - ;; - -isc*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -lynx*178) - os=-lynxos178 - ;; - -lynx*5) - os=-lynxos5 - ;; - -lynx*) - os=-lynxos +# Split fields of configuration type +IFS="-" read field1 field2 field3 field4 <&2 + exit 1 ;; - -ptx*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` + *-*-*-*) + basic_machine=$field1-$field2 + os=$field3-$field4 ;; - -windowsnt*) - os=`echo $os | sed -e 's/windowsnt/winnt/'` + *-*-*) + # Ambiguous whether COMPANY is present, or skipped and KERNEL-OS is two + # parts + maybe_os=$field2-$field3 + case $maybe_os in + nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc \ + | linux-newlib* | linux-musl* | linux-uclibc* | uclinux-uclibc* \ + | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* \ + | netbsd*-eabi* | kopensolaris*-gnu* | cloudabi*-eabi* \ + | storm-chaos* | os2-emx* | rtmk-nova*) + basic_machine=$field1 + os=$maybe_os + ;; + android-linux) + basic_machine=$field1-unknown + os=linux-android + ;; + *) + basic_machine=$field1-$field2 + os=$field3 + ;; + esac ;; - -psos*) - os=-psos + *-*) + # A lone config we happen to match not fitting any pattern + case $field1-$field2 in + decstation-3100) + basic_machine=mips-dec + os= + ;; + *-*) + # Second component is usually, but not always the OS + case $field2 in + # Prevent following clause from handling this valid os + sun*os*) + basic_machine=$field1 + os=$field2 + ;; + # Manufacturers + dec* | mips* | sequent* | encore* | pc533* | sgi* | sony* \ + | att* | 7300* | 3300* | delta* | motorola* | sun[234]* \ + | unicom* | ibm* | next | hp | isi* | apollo | altos* \ + | convergent* | ncr* | news | 32* | 3600* | 3100* \ + | hitachi* | c[123]* | convex* | sun | crds | omron* | dg \ + | ultra | tti* | harris | dolphin | highlevel | gould \ + | cbm | ns | masscomp | apple | axis | knuth | cray \ + | microblaze* | sim | cisco \ + | oki | wec | wrs | winbond) + basic_machine=$field1-$field2 + os= + ;; + *) + basic_machine=$field1 + os=$field2 + ;; + esac + ;; + esac ;; - -mint | -mint[0-9]*) - basic_machine=m68k-atari - os=-mint + *) + # Convert single-component short-hands not valid as part of + # multi-component configurations. + case $field1 in + 386bsd) + basic_machine=i386-pc + os=bsd + ;; + a29khif) + basic_machine=a29k-amd + os=udi + ;; + adobe68k) + basic_machine=m68010-adobe + os=scout + ;; + alliant) + basic_machine=fx80-alliant + os= + ;; + altos | altos3068) + basic_machine=m68k-altos + os= + ;; + am29k) + basic_machine=a29k-none + os=bsd + ;; + amdahl) + basic_machine=580-amdahl + os=sysv + ;; + amiga) + basic_machine=m68k-unknown + os= + ;; + amigaos | amigados) + basic_machine=m68k-unknown + os=amigaos + ;; + amigaunix | amix) + basic_machine=m68k-unknown + os=sysv4 + ;; + apollo68) + basic_machine=m68k-apollo + os=sysv + ;; + apollo68bsd) + basic_machine=m68k-apollo + os=bsd + ;; + aros) + basic_machine=i386-pc + os=aros + ;; + aux) + basic_machine=m68k-apple + os=aux + ;; + balance) + basic_machine=ns32k-sequent + os=dynix + ;; + blackfin) + basic_machine=bfin-unknown + os=linux + ;; + cegcc) + basic_machine=arm-unknown + os=cegcc + ;; + convex-c1) + basic_machine=c1-convex + os=bsd + ;; + convex-c2) + basic_machine=c2-convex + os=bsd + ;; + convex-c32) + basic_machine=c32-convex + os=bsd + ;; + convex-c34) + basic_machine=c34-convex + os=bsd + ;; + convex-c38) + basic_machine=c38-convex + os=bsd + ;; + cray) + basic_machine=j90-cray + os=unicos + ;; + crds | unos) + basic_machine=m68k-crds + os= + ;; + da30) + basic_machine=m68k-da30 + os= + ;; + decstation | pmax | pmin | dec3100 | decstatn) + basic_machine=mips-dec + os= + ;; + delta88) + basic_machine=m88k-motorola + os=sysv3 + ;; + dicos) + basic_machine=i686-pc + os=dicos + ;; + djgpp) + basic_machine=i586-pc + os=msdosdjgpp + ;; + ebmon29k) + basic_machine=a29k-amd + os=ebmon + ;; + es1800 | OSE68k | ose68k | ose | OSE) + basic_machine=m68k-ericsson + os=ose + ;; + gmicro) + basic_machine=tron-gmicro + os=sysv + ;; + go32) + basic_machine=i386-pc + os=go32 + ;; + h8300hms) + basic_machine=h8300-hitachi + os=hms + ;; + h8300xray) + basic_machine=h8300-hitachi + os=xray + ;; + h8500hms) + basic_machine=h8500-hitachi + os=hms + ;; + harris) + basic_machine=m88k-harris + os=sysv3 + ;; + hp300) + basic_machine=m68k-hp + ;; + hp300bsd) + basic_machine=m68k-hp + os=bsd + ;; + hp300hpux) + basic_machine=m68k-hp + os=hpux + ;; + hppaosf) + basic_machine=hppa1.1-hp + os=osf + ;; + hppro) + basic_machine=hppa1.1-hp + os=proelf + ;; + i386mach) + basic_machine=i386-mach + os=mach + ;; + vsta) + basic_machine=i386-pc + os=vsta + ;; + isi68 | isi) + basic_machine=m68k-isi + os=sysv + ;; + m68knommu) + basic_machine=m68k-unknown + os=linux + ;; + magnum | m3230) + basic_machine=mips-mips + os=sysv + ;; + merlin) + basic_machine=ns32k-utek + os=sysv + ;; + mingw64) + basic_machine=x86_64-pc + os=mingw64 + ;; + mingw32) + basic_machine=i686-pc + os=mingw32 + ;; + mingw32ce) + basic_machine=arm-unknown + os=mingw32ce + ;; + monitor) + basic_machine=m68k-rom68k + os=coff + ;; + morphos) + basic_machine=powerpc-unknown + os=morphos + ;; + moxiebox) + basic_machine=moxie-unknown + os=moxiebox + ;; + msdos) + basic_machine=i386-pc + os=msdos + ;; + msys) + basic_machine=i686-pc + os=msys + ;; + mvs) + basic_machine=i370-ibm + os=mvs + ;; + nacl) + basic_machine=le32-unknown + os=nacl + ;; + ncr3000) + basic_machine=i486-ncr + os=sysv4 + ;; + netbsd386) + basic_machine=i386-pc + os=netbsd + ;; + netwinder) + basic_machine=armv4l-rebel + os=linux + ;; + news | news700 | news800 | news900) + basic_machine=m68k-sony + os=newsos + ;; + news1000) + basic_machine=m68030-sony + os=newsos + ;; + necv70) + basic_machine=v70-nec + os=sysv + ;; + nh3000) + basic_machine=m68k-harris + os=cxux + ;; + nh[45]000) + basic_machine=m88k-harris + os=cxux + ;; + nindy960) + basic_machine=i960-intel + os=nindy + ;; + mon960) + basic_machine=i960-intel + os=mon960 + ;; + nonstopux) + basic_machine=mips-compaq + os=nonstopux + ;; + os400) + basic_machine=powerpc-ibm + os=os400 + ;; + OSE68000 | ose68000) + basic_machine=m68000-ericsson + os=ose + ;; + os68k) + basic_machine=m68k-none + os=os68k + ;; + paragon) + basic_machine=i860-intel + os=osf + ;; + parisc) + basic_machine=hppa-unknown + os=linux + ;; + pw32) + basic_machine=i586-unknown + os=pw32 + ;; + rdos | rdos64) + basic_machine=x86_64-pc + os=rdos + ;; + rdos32) + basic_machine=i386-pc + os=rdos + ;; + rom68k) + basic_machine=m68k-rom68k + os=coff + ;; + sa29200) + basic_machine=a29k-amd + os=udi + ;; + sei) + basic_machine=mips-sei + os=seiux + ;; + sequent) + basic_machine=i386-sequent + os= + ;; + sps7) + basic_machine=m68k-bull + os=sysv2 + ;; + st2000) + basic_machine=m68k-tandem + os= + ;; + stratus) + basic_machine=i860-stratus + os=sysv4 + ;; + sun2) + basic_machine=m68000-sun + os= + ;; + sun2os3) + basic_machine=m68000-sun + os=sunos3 + ;; + sun2os4) + basic_machine=m68000-sun + os=sunos4 + ;; + sun3) + basic_machine=m68k-sun + os= + ;; + sun3os3) + basic_machine=m68k-sun + os=sunos3 + ;; + sun3os4) + basic_machine=m68k-sun + os=sunos4 + ;; + sun4) + basic_machine=sparc-sun + os= + ;; + sun4os3) + basic_machine=sparc-sun + os=sunos3 + ;; + sun4os4) + basic_machine=sparc-sun + os=sunos4 + ;; + sun4sol2) + basic_machine=sparc-sun + os=solaris2 + ;; + sun386 | sun386i | roadrunner) + basic_machine=i386-sun + os= + ;; + sv1) + basic_machine=sv1-cray + os=unicos + ;; + symmetry) + basic_machine=i386-sequent + os=dynix + ;; + t3e) + basic_machine=alphaev5-cray + os=unicos + ;; + t90) + basic_machine=t90-cray + os=unicos + ;; + toad1) + basic_machine=pdp10-xkl + os=tops20 + ;; + tpf) + basic_machine=s390x-ibm + os=tpf + ;; + udi29k) + basic_machine=a29k-amd + os=udi + ;; + ultra3) + basic_machine=a29k-nyu + os=sym1 + ;; + v810 | necv810) + basic_machine=v810-nec + os=none + ;; + vaxv) + basic_machine=vax-dec + os=sysv + ;; + vms) + basic_machine=vax-dec + os=vms + ;; + vxworks960) + basic_machine=i960-wrs + os=vxworks + ;; + vxworks68) + basic_machine=m68k-wrs + os=vxworks + ;; + vxworks29k) + basic_machine=a29k-wrs + os=vxworks + ;; + xbox) + basic_machine=i686-pc + os=mingw32 + ;; + ymp) + basic_machine=ymp-cray + os=unicos + ;; + *) + basic_machine=$1 + os= + ;; + esac ;; esac -# Decode aliases for certain CPU-COMPANY combinations. +# Decode 1-component or ad-hoc basic machines case $basic_machine in - # Recognize the basic CPU types without company name. - # Some are omitted here because they have special meanings below. - 1750a | 580 \ - | a29k \ - | aarch64 | aarch64_be \ - | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ - | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ - | am33_2.0 \ - | arc | arceb \ - | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \ - | avr | avr32 \ - | ba \ - | be32 | be64 \ - | bfin \ - | c4x | c8051 | clipper \ - | d10v | d30v | dlx | dsp16xx \ - | e2k | epiphany \ - | fido | fr30 | frv | ft32 \ - | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ - | hexagon \ - | i370 | i860 | i960 | ia16 | ia64 \ - | ip2k | iq2000 \ - | k1om \ - | le32 | le64 \ - | lm32 \ - | m32c | m32r | m32rle | m68000 | m68k | m88k \ - | maxq | mb | microblaze | microblazeel | mcore | mep | metag \ - | mips | mipsbe | mipseb | mipsel | mipsle \ - | mips16 \ - | mips64 | mips64el \ - | mips64octeon | mips64octeonel \ - | mips64orion | mips64orionel \ - | mips64r5900 | mips64r5900el \ - | mips64vr | mips64vrel \ - | mips64vr4100 | mips64vr4100el \ - | mips64vr4300 | mips64vr4300el \ - | mips64vr5000 | mips64vr5000el \ - | mips64vr5900 | mips64vr5900el \ - | mipsisa32 | mipsisa32el \ - | mipsisa32r2 | mipsisa32r2el \ - | mipsisa32r6 | mipsisa32r6el \ - | mipsisa64 | mipsisa64el \ - | mipsisa64r2 | mipsisa64r2el \ - | mipsisa64r6 | mipsisa64r6el \ - | mipsisa64sb1 | mipsisa64sb1el \ - | mipsisa64sr71k | mipsisa64sr71kel \ - | mipsr5900 | mipsr5900el \ - | mipstx39 | mipstx39el \ - | mn10200 | mn10300 \ - | moxie \ - | mt \ - | msp430 \ - | nds32 | nds32le | nds32be \ - | nios | nios2 | nios2eb | nios2el \ - | ns16k | ns32k \ - | open8 | or1k | or1knd | or32 \ - | pdp10 | pdp11 | pj | pjl \ - | powerpc | powerpc64 | powerpc64le | powerpcle \ - | pru \ - | pyramid \ - | riscv32 | riscv64 \ - | rl78 | rx \ - | score \ - | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[234]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ - | sh64 | sh64le \ - | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ - | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ - | spu \ - | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ - | ubicom32 \ - | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ - | visium \ - | wasm32 \ - | we32k \ - | x86 | xc16x | xstormy16 | xtensa \ - | z8k | z80) - basic_machine=$basic_machine-unknown - ;; - c54x) - basic_machine=tic54x-unknown - ;; - c55x) - basic_machine=tic55x-unknown - ;; - c6x) - basic_machine=tic6x-unknown - ;; - leon|leon[3-9]) - basic_machine=sparc-$basic_machine - ;; - m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip) - basic_machine=$basic_machine-unknown - os=-none + # Here we handle the default manufacturer of certain CPU types. It is in + # some cases the only manufacturer, in others, it is the most popular. + w89k) + cpu=hppa1.1 + vendor=winbond ;; - m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) + op50n) + cpu=hppa1.1 + vendor=oki ;; - ms1) - basic_machine=mt-unknown + op60c) + cpu=hppa1.1 + vendor=oki ;; - - strongarm | thumb | xscale) - basic_machine=arm-unknown + ibm*) + cpu=i370 + vendor=ibm ;; - xgate) - basic_machine=$basic_machine-unknown - os=-none + orion105) + cpu=clipper + vendor=highlevel ;; - xscaleeb) - basic_machine=armeb-unknown + mac | mpw | mac-mpw) + cpu=m68k + vendor=apple ;; - - xscaleel) - basic_machine=armel-unknown + pmac | pmac-mpw) + cpu=powerpc + vendor=apple ;; - # We use `pc' rather than `unknown' - # because (1) that's what they normally are, and - # (2) the word "unknown" tends to confuse beginning users. - i*86 | x86_64) - basic_machine=$basic_machine-pc - ;; - # Object if more than one company name word. - *-*-*) - echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 - exit 1 - ;; - # Recognize the basic CPU types with company name. - 580-* \ - | a29k-* \ - | aarch64-* | aarch64_be-* \ - | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ - | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ - | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \ - | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ - | avr-* | avr32-* \ - | ba-* \ - | be32-* | be64-* \ - | bfin-* | bs2000-* \ - | c[123]* | c30-* | [cjt]90-* | c4x-* \ - | c8051-* | clipper-* | craynv-* | cydra-* \ - | d10v-* | d30v-* | dlx-* \ - | e2k-* | elxsi-* \ - | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ - | h8300-* | h8500-* \ - | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ - | hexagon-* \ - | i*86-* | i860-* | i960-* | ia16-* | ia64-* \ - | ip2k-* | iq2000-* \ - | k1om-* \ - | le32-* | le64-* \ - | lm32-* \ - | m32c-* | m32r-* | m32rle-* \ - | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ - | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ - | microblaze-* | microblazeel-* \ - | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ - | mips16-* \ - | mips64-* | mips64el-* \ - | mips64octeon-* | mips64octeonel-* \ - | mips64orion-* | mips64orionel-* \ - | mips64r5900-* | mips64r5900el-* \ - | mips64vr-* | mips64vrel-* \ - | mips64vr4100-* | mips64vr4100el-* \ - | mips64vr4300-* | mips64vr4300el-* \ - | mips64vr5000-* | mips64vr5000el-* \ - | mips64vr5900-* | mips64vr5900el-* \ - | mipsisa32-* | mipsisa32el-* \ - | mipsisa32r2-* | mipsisa32r2el-* \ - | mipsisa32r6-* | mipsisa32r6el-* \ - | mipsisa64-* | mipsisa64el-* \ - | mipsisa64r2-* | mipsisa64r2el-* \ - | mipsisa64r6-* | mipsisa64r6el-* \ - | mipsisa64sb1-* | mipsisa64sb1el-* \ - | mipsisa64sr71k-* | mipsisa64sr71kel-* \ - | mipsr5900-* | mipsr5900el-* \ - | mipstx39-* | mipstx39el-* \ - | mmix-* \ - | mt-* \ - | msp430-* \ - | nds32-* | nds32le-* | nds32be-* \ - | nios-* | nios2-* | nios2eb-* | nios2el-* \ - | none-* | np1-* | ns16k-* | ns32k-* \ - | open8-* \ - | or1k*-* \ - | orion-* \ - | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ - | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ - | 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*-* \ - | tahoe-* \ - | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ - | tile*-* \ - | tron-* \ - | ubicom32-* \ - | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ - | vax-* \ - | visium-* \ - | wasm32-* \ - | we32k-* \ - | x86-* | x86_64-* | xc16x-* | xps100-* \ - | xstormy16-* | xtensa*-* \ - | ymp-* \ - | z8k-* | z80-*) - ;; - # Recognize the basic CPU types without company name, with glob match. - xtensa*) - basic_machine=$basic_machine-unknown - ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. - 386bsd) - basic_machine=i386-unknown - os=-bsd - ;; 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) - basic_machine=m68000-att + cpu=m68000 + vendor=att ;; 3b*) - basic_machine=we32k-att - ;; - a29khif) - basic_machine=a29k-amd - os=-udi - ;; - abacus) - basic_machine=abacus-unknown - ;; - adobe68k) - basic_machine=m68010-adobe - os=-scout - ;; - alliant | fx80) - basic_machine=fx80-alliant - ;; - altos | altos3068) - basic_machine=m68k-altos - ;; - am29k) - basic_machine=a29k-none - os=-bsd - ;; - amd64) - basic_machine=x86_64-pc - ;; - amd64-*) - basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - amdahl) - basic_machine=580-amdahl - os=-sysv - ;; - amiga | amiga-*) - basic_machine=m68k-unknown - ;; - amigaos | amigados) - basic_machine=m68k-unknown - os=-amigaos - ;; - amigaunix | amix) - basic_machine=m68k-unknown - os=-sysv4 - ;; - apollo68) - basic_machine=m68k-apollo - os=-sysv - ;; - apollo68bsd) - basic_machine=m68k-apollo - os=-bsd - ;; - aros) - basic_machine=i386-pc - os=-aros - ;; - asmjs) - basic_machine=asmjs-unknown - ;; - aux) - basic_machine=m68k-apple - os=-aux - ;; - balance) - basic_machine=ns32k-sequent - os=-dynix - ;; - blackfin) - basic_machine=bfin-unknown - os=-linux - ;; - blackfin-*) - basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` - os=-linux + cpu=we32k + vendor=att ;; bluegene*) - basic_machine=powerpc-ibm - os=-cnk - ;; - c54x-*) - basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - c55x-*) - basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - c6x-*) - basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - c90) - basic_machine=c90-cray - os=-unicos - ;; - cegcc) - basic_machine=arm-unknown - os=-cegcc - ;; - convex-c1) - basic_machine=c1-convex - os=-bsd - ;; - convex-c2) - basic_machine=c2-convex - os=-bsd - ;; - convex-c32) - basic_machine=c32-convex - os=-bsd - ;; - convex-c34) - basic_machine=c34-convex - os=-bsd - ;; - convex-c38) - basic_machine=c38-convex - os=-bsd - ;; - cray | j90) - basic_machine=j90-cray - os=-unicos - ;; - craynv) - basic_machine=craynv-cray - os=-unicosmp - ;; - cr16 | cr16-*) - basic_machine=cr16-unknown - os=-elf - ;; - crds | unos) - basic_machine=m68k-crds - ;; - crisv32 | crisv32-* | etraxfs*) - basic_machine=crisv32-axis - ;; - cris | cris-* | etrax*) - basic_machine=cris-axis - ;; - crx) - basic_machine=crx-unknown - os=-elf - ;; - da30 | da30-*) - basic_machine=m68k-da30 - ;; - decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) - basic_machine=mips-dec + cpu=powerpc + vendor=ibm + os=cnk ;; decsystem10* | dec10*) - basic_machine=pdp10-dec - os=-tops10 + cpu=pdp10 + vendor=dec + os=tops10 ;; decsystem20* | dec20*) - basic_machine=pdp10-dec - os=-tops20 + cpu=pdp10 + vendor=dec + os=tops20 ;; delta | 3300 | motorola-3300 | motorola-delta \ | 3300-motorola | delta-motorola) - basic_machine=m68k-motorola - ;; - delta88) - basic_machine=m88k-motorola - os=-sysv3 - ;; - dicos) - basic_machine=i686-pc - os=-dicos - ;; - djgpp) - basic_machine=i586-pc - os=-msdosdjgpp - ;; - dpx20 | dpx20-*) - basic_machine=rs6000-bull - os=-bosx - ;; - dpx2* | dpx2*-bull) - 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" + cpu=m68k + vendor=motorola ;; - ebmon29k) - basic_machine=a29k-amd - os=-ebmon - ;; - elxsi) - basic_machine=elxsi-elxsi - os=-bsd + dpx2*) + cpu=m68k + vendor=bull + os=sysv3 ;; encore | umax | mmax) - basic_machine=ns32k-encore + cpu=ns32k + vendor=encore ;; - es1800 | OSE68k | ose68k | ose | OSE) - basic_machine=m68k-ericsson - os=-ose + elxsi) + cpu=elxsi + vendor=elxsi + os=${os:-bsd} ;; fx2800) - basic_machine=i860-alliant + cpu=i860 + vendor=alliant ;; genix) - basic_machine=ns32k-ns - ;; - gmicro) - basic_machine=tron-gmicro - os=-sysv - ;; - go32) - basic_machine=i386-pc - os=-go32 + cpu=ns32k + vendor=ns ;; h3050r* | hiux*) - basic_machine=hppa1.1-hitachi - os=-hiuxwe2 - ;; - h8300hms) - basic_machine=h8300-hitachi - os=-hms - ;; - h8300xray) - basic_machine=h8300-hitachi - os=-xray - ;; - h8500hms) - basic_machine=h8500-hitachi - os=-hms - ;; - harris) - basic_machine=m88k-harris - os=-sysv3 - ;; - hp300-*) - basic_machine=m68k-hp - ;; - hp300bsd) - basic_machine=m68k-hp - os=-bsd - ;; - hp300hpux) - basic_machine=m68k-hp - os=-hpux + cpu=hppa1.1 + vendor=hitachi + os=hiuxwe2 ;; hp3k9[0-9][0-9] | hp9[0-9][0-9]) - basic_machine=hppa1.0-hp + cpu=hppa1.0 + vendor=hp ;; hp9k2[0-9][0-9] | hp9k31[0-9]) - basic_machine=m68000-hp + cpu=m68000 + vendor=hp ;; hp9k3[2-9][0-9]) - basic_machine=m68k-hp + cpu=m68k + vendor=hp ;; hp9k6[0-9][0-9] | hp6[0-9][0-9]) - basic_machine=hppa1.0-hp + cpu=hppa1.0 + vendor=hp ;; hp9k7[0-79][0-9] | hp7[0-79][0-9]) - basic_machine=hppa1.1-hp + cpu=hppa1.1 + vendor=hp ;; hp9k78[0-9] | hp78[0-9]) # FIXME: really hppa2.0-hp - basic_machine=hppa1.1-hp + cpu=hppa1.1 + vendor=hp ;; hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) # FIXME: really hppa2.0-hp - basic_machine=hppa1.1-hp + cpu=hppa1.1 + vendor=hp ;; hp9k8[0-9][13679] | hp8[0-9][13679]) - basic_machine=hppa1.1-hp + cpu=hppa1.1 + vendor=hp ;; hp9k8[0-9][0-9] | hp8[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hppa-next) - os=-nextstep3 - ;; - hppaosf) - basic_machine=hppa1.1-hp - os=-osf - ;; - hppro) - basic_machine=hppa1.1-hp - os=-proelf - ;; - i370-ibm* | ibm*) - basic_machine=i370-ibm + cpu=hppa1.0 + vendor=hp ;; i*86v32) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv32 + cpu=`echo "$1" | sed -e 's/86.*/86/'` + vendor=pc + os=sysv32 ;; i*86v4*) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv4 + cpu=`echo "$1" | sed -e 's/86.*/86/'` + vendor=pc + os=sysv4 ;; i*86v) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv + cpu=`echo "$1" | sed -e 's/86.*/86/'` + vendor=pc + os=sysv ;; i*86sol2) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-solaris2 - ;; - i386mach) - basic_machine=i386-mach - os=-mach - ;; - i386-vsta | vsta) - basic_machine=i386-unknown - os=-vsta + cpu=`echo "$1" | sed -e 's/86.*/86/'` + vendor=pc + os=solaris2 + ;; + j90 | j90-cray) + cpu=j90 + vendor=cray + os=${os:-unicos} ;; iris | iris4d) - basic_machine=mips-sgi + cpu=mips + vendor=sgi case $os in - -irix*) + irix*) ;; *) - os=-irix4 + os=irix4 ;; esac ;; - isi68 | isi) - basic_machine=m68k-isi - os=-sysv - ;; - leon-*|leon[3-9]-*) - basic_machine=sparc-`echo $basic_machine | sed 's/-.*//'` - ;; - m68knommu) - basic_machine=m68k-unknown - os=-linux - ;; - m68knommu-*) - basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` - os=-linux - ;; - m88k-omron*) - basic_machine=m88k-omron - ;; - magnum | m3230) - basic_machine=mips-mips - os=-sysv - ;; - merlin) - basic_machine=ns32k-utek - os=-sysv - ;; - microblaze*) - basic_machine=microblaze-xilinx - ;; - mingw64) - basic_machine=x86_64-pc - os=-mingw64 - ;; - mingw32) - basic_machine=i686-pc - os=-mingw32 - ;; - mingw32ce) - basic_machine=arm-unknown - os=-mingw32ce - ;; miniframe) - basic_machine=m68000-convergent - ;; - *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) - basic_machine=m68k-atari - os=-mint - ;; - mips3*-*) - basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` - ;; - mips3*) - basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown - ;; - monitor) - basic_machine=m68k-rom68k - os=-coff - ;; - morphos) - basic_machine=powerpc-unknown - os=-morphos - ;; - moxiebox) - basic_machine=moxie-unknown - os=-moxiebox - ;; - msdos) - basic_machine=i386-pc - os=-msdos - ;; - ms1-*) - basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` + cpu=m68000 + vendor=convergent ;; - msys) - basic_machine=i686-pc - os=-msys - ;; - mvs) - basic_machine=i370-ibm - os=-mvs - ;; - nacl) - basic_machine=le32-unknown - os=-nacl - ;; - ncr3000) - basic_machine=i486-ncr - os=-sysv4 - ;; - netbsd386) - basic_machine=i386-unknown - os=-netbsd - ;; - netwinder) - basic_machine=armv4l-rebel - os=-linux - ;; - news | news700 | news800 | news900) - basic_machine=m68k-sony - os=-newsos - ;; - news1000) - basic_machine=m68030-sony - os=-newsos + *mint | mint[0-9]* | *MiNT | *MiNT[0-9]*) + cpu=m68k + vendor=atari + os=mint ;; news-3600 | risc-news) - basic_machine=mips-sony - os=-newsos - ;; - necv70) - basic_machine=v70-nec - os=-sysv - ;; - next | m*-next ) - basic_machine=m68k-next + cpu=mips + vendor=sony + os=newsos + ;; + next | m*-next) + cpu=m68k + vendor=next case $os in - -nextstep* ) + nextstep* ) ;; - -ns2*) - os=-nextstep2 + ns2*) + os=nextstep2 ;; *) - os=-nextstep3 + os=nextstep3 ;; esac ;; - nh3000) - basic_machine=m68k-harris - os=-cxux - ;; - nh[45]000) - basic_machine=m88k-harris - os=-cxux - ;; - nindy960) - basic_machine=i960-intel - os=-nindy - ;; - mon960) - basic_machine=i960-intel - os=-mon960 - ;; - nonstopux) - basic_machine=mips-compaq - os=-nonstopux - ;; np1) - basic_machine=np1-gould - ;; - neo-tandem) - basic_machine=neo-tandem - ;; - nse-tandem) - basic_machine=nse-tandem - ;; - nsr-tandem) - basic_machine=nsr-tandem - ;; - nsx-tandem) - basic_machine=nsx-tandem + cpu=np1 + vendor=gould ;; op50n-* | op60c-*) - basic_machine=hppa1.1-oki - os=-proelf - ;; - openrisc | openrisc-*) - basic_machine=or32-unknown - ;; - os400) - basic_machine=powerpc-ibm - os=-os400 - ;; - OSE68000 | ose68000) - basic_machine=m68000-ericsson - os=-ose - ;; - os68k) - basic_machine=m68k-none - os=-os68k + cpu=hppa1.1 + vendor=oki + os=proelf ;; pa-hitachi) - basic_machine=hppa1.1-hitachi - os=-hiuxwe2 - ;; - paragon) - basic_machine=i860-intel - os=-osf - ;; - parisc) - basic_machine=hppa-unknown - os=-linux - ;; - parisc-*) - basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` - os=-linux + cpu=hppa1.1 + vendor=hitachi + os=hiuxwe2 ;; pbd) - basic_machine=sparc-tti + cpu=sparc + vendor=tti ;; pbb) - basic_machine=m68k-tti + cpu=m68k + vendor=tti ;; - pc532 | pc532-*) - basic_machine=ns32k-pc532 + pc532) + cpu=ns32k + vendor=pc532 ;; - pc98) - basic_machine=i386-pc - ;; - pc98-*) - basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentium | p5 | k5 | k6 | nexgen | viac3) - basic_machine=i586-pc - ;; - pentiumpro | p6 | 6x86 | athlon | athlon_*) - basic_machine=i686-pc - ;; - pentiumii | pentium2 | pentiumiii | pentium3) - basic_machine=i686-pc - ;; - pentium4) - basic_machine=i786-pc + pn) + cpu=pn + vendor=gould ;; - pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) - basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` + power) + cpu=power + vendor=ibm ;; - pentiumpro-* | p6-* | 6x86-* | athlon-*) - basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` + ps2) + cpu=i386 + vendor=ibm ;; - pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) - basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` + rm[46]00) + cpu=mips + vendor=siemens ;; - pentium4-*) - basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` + rtpc | rtpc-*) + cpu=romp + vendor=ibm ;; - pn) - basic_machine=pn-gould + sde) + cpu=mipsisa32 + vendor=sde + os=${os:-elf} + ;; + simso-wrs) + cpu=sparclite + vendor=wrs + os=vxworks ;; - power) basic_machine=power-ibm + tower | tower-32) + cpu=m68k + vendor=ncr ;; - ppc | ppcbe) basic_machine=powerpc-unknown + vpp*|vx|vx-*) + cpu=f301 + vendor=fujitsu ;; - ppc-* | ppcbe-*) - basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` + w65) + cpu=w65 + vendor=wdc ;; - ppcle | powerpclittle) - basic_machine=powerpcle-unknown + w89k-*) + cpu=hppa1.1 + vendor=winbond + os=proelf ;; - ppcle-* | powerpclittle-*) - basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` + none) + cpu=none + vendor=none ;; - ppc64) basic_machine=powerpc64-unknown + leon|leon[3-9]) + cpu=sparc + vendor=$basic_machine ;; - ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` + leon-*|leon[3-9]-*) + cpu=sparc + vendor=`echo "$basic_machine" | sed 's/-.*//'` ;; - ppc64le | powerpc64little) - basic_machine=powerpc64le-unknown + + *-*) + IFS="-" read cpu vendor <&2 - exit 1 + # Recognize the canonical CPU types that are allowed with any + # company name. + case $cpu in + 1750a | 580 \ + | a29k \ + | aarch64 | aarch64_be \ + | abacus \ + | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] \ + | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] \ + | alphapca5[67] | alpha64pca5[67] \ + | am33_2.0 \ + | amdgcn \ + | arc | arceb \ + | arm | arm[lb]e | arme[lb] | armv* \ + | avr | avr32 \ + | asmjs \ + | ba \ + | be32 | be64 \ + | bfin | bs2000 \ + | c[123]* | c30 | [cjt]90 | c4x \ + | c8051 | clipper | craynv | csky | cydra \ + | d10v | d30v | dlx | dsp16xx \ + | e2k | elxsi | epiphany \ + | f30[01] | f700 | fido | fr30 | frv | ft32 | fx80 \ + | h8300 | h8500 \ + | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ + | hexagon \ + | i370 | i*86 | i860 | i960 | ia16 | ia64 \ + | ip2k | iq2000 \ + | k1om \ + | le32 | le64 \ + | lm32 \ + | m32c | m32r | m32rle \ + | m5200 | m68000 | m680[012346]0 | m68360 | m683?2 | m68k | v70 | w65 \ + | m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip \ + | m88110 | m88k | maxq | mb | mcore | mep | metag \ + | microblaze | microblazeel \ + | mips | mipsbe | mipseb | mipsel | mipsle \ + | mips16 \ + | mips64 | mips64el \ + | mips64octeon | mips64octeonel \ + | mips64orion | mips64orionel \ + | mips64r5900 | mips64r5900el \ + | mips64vr | mips64vrel \ + | mips64vr4100 | mips64vr4100el \ + | mips64vr4300 | mips64vr4300el \ + | mips64vr5000 | mips64vr5000el \ + | mips64vr5900 | mips64vr5900el \ + | mipsisa32 | mipsisa32el \ + | mipsisa32r2 | mipsisa32r2el \ + | mipsisa32r6 | mipsisa32r6el \ + | mipsisa64 | mipsisa64el \ + | mipsisa64r2 | mipsisa64r2el \ + | mipsisa64r6 | mipsisa64r6el \ + | mipsisa64sb1 | mipsisa64sb1el \ + | mipsisa64sr71k | mipsisa64sr71kel \ + | mipsr5900 | mipsr5900el \ + | mipstx39 | mipstx39el \ + | mmix \ + | mn10200 | mn10300 \ + | moxie \ + | mt \ + | msp430 \ + | nds32 | nds32le | nds32be \ + | nfp \ + | nios | nios2 | nios2eb | nios2el \ + | none | np1 | ns16k | ns32k \ + | open8 \ + | or1k* \ + | or32 \ + | orion \ + | pdp10 | pdp11 | pj | pjl | pn | power \ + | powerpc | powerpc64 | powerpc64le | powerpcle | powerpcspe \ + | pru \ + | pyramid \ + | riscv | riscv32 | riscv64 \ + | rl78 | romp | rs6000 | rx \ + | score \ + | sh | sh[1234] | sh[24]a | sh[24]ae[lb] | sh[23]e | she[lb] | sh[lb]e \ + | sh[1234]e[lb] | sh[12345][lb]e | sh[23]ele | sh64 | sh64le \ + | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet \ + | sparclite \ + | sparcv8 | sparcv9 | sparcv9b | sparcv9v | sv1 | sx* \ + | spu \ + | tahoe \ + | tic30 | tic4x | tic54x | tic55x | tic6x | tic80 \ + | tron \ + | ubicom32 \ + | v850 | v850e | v850e1 | v850es | v850e2 | v850e2v3 \ + | vax \ + | visium \ + | wasm32 \ + | we32k \ + | x86 | x86_64 | xc16x | xgate | xps100 \ + | xstormy16 | xtensa* \ + | ymp \ + | z8k | z80) + ;; + + *) + echo Invalid configuration \`"$1"\': machine \`"$cpu-$vendor"\' not recognized 1>&2 + exit 1 + ;; + esac ;; esac # Here we canonicalize certain aliases for manufacturers. -case $basic_machine in - *-digital*) - basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` +case $vendor in + digital*) + vendor=dec ;; - *-commodore*) - basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` + commodore*) + vendor=cbm ;; *) ;; @@ -1363,200 +1271,246 @@ # Decode manufacturer-specific aliases for certain operating systems. -if [ x"$os" != x"" ] +if [ x$os != x ] then case $os in - # First match some system type aliases - # that might get confused with valid system types. - # -solaris* is a basic system type, with this one exception. - -auroraux) - os=-auroraux + # First match some system type aliases that might get confused + # with valid system types. + # solaris* is a basic system type, with this one exception. + auroraux) + os=auroraux ;; - -solaris1 | -solaris1.*) - os=`echo $os | sed -e 's|solaris1|sunos4|'` + bluegene*) + os=cnk ;; - -solaris) - os=-solaris2 + solaris1 | solaris1.*) + os=`echo $os | sed -e 's|solaris1|sunos4|'` ;; - -svr4*) - os=-sysv4 + solaris) + os=solaris2 ;; - -unixware*) - os=-sysv4.2uw + unixware*) + os=sysv4.2uw ;; - -gnu/linux*) + gnu/linux*) os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` ;; - # First accept the basic system types. + # es1800 is here to avoid being matched by es* (a different OS) + es1800*) + os=ose + ;; + # Some version numbers need modification + chorusos*) + os=chorusos + ;; + isc) + os=isc2.2 + ;; + sco6) + os=sco5v6 + ;; + sco5) + os=sco3.2v5 + ;; + sco4) + os=sco3.2v4 + ;; + sco3.2.[4-9]*) + os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` + ;; + sco3.2v[4-9]* | sco5v6*) + # Don't forget version if it is 3.2v4 or newer. + ;; + scout) + # Don't match below + ;; + sco*) + os=sco3.2v2 + ;; + psos*) + os=psos + ;; + # Now accept the basic system types. # The portable systems comes first. - # Each alternative MUST END IN A *, to match a version number. - # -sysv* is not here because it comes later, after sysvr4. - -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ - | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ - | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ - | -sym* | -kopensolaris* | -plan9* \ - | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ - | -aos* | -aros* | -cloudabi* | -sortix* \ - | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ - | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ - | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ - | -bitrig* | -openbsd* | -solidbsd* | -libertybsd* \ - | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ - | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ - | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ - | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ - | -chorusos* | -chorusrdb* | -cegcc* | -glidix* \ - | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ - | -midipix* | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ - | -linux-newlib* | -linux-musl* | -linux-uclibc* \ - | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \ - | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ - | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ - | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ - | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ - | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ - | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ - | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* \ - | -onefs* | -tirtos* | -phoenix* | -fuchsia* | -redox*) + # Each alternative MUST end in a * to match a version number. + # sysv* is not here because it comes later, after sysvr4. + gnu* | bsd* | mach* | minix* | genix* | ultrix* | irix* \ + | *vms* | esix* | aix* | cnk* | sunos | sunos[34]*\ + | hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \ + | sym* | kopensolaris* | plan9* \ + | amigaos* | amigados* | msdos* | newsos* | unicos* | aof* \ + | aos* | aros* | cloudabi* | sortix* \ + | nindy* | vxsim* | vxworks* | ebmon* | hms* | mvs* \ + | clix* | riscos* | uniplus* | iris* | isc* | rtu* | xenix* \ + | knetbsd* | mirbsd* | netbsd* \ + | bitrig* | openbsd* | solidbsd* | libertybsd* \ + | ekkobsd* | kfreebsd* | freebsd* | riscix* | lynxos* \ + | bosx* | nextstep* | cxux* | aout* | elf* | oabi* \ + | ptx* | coff* | ecoff* | winnt* | domain* | vsta* \ + | udi* | eabi* | lites* | ieee* | go32* | aux* | hcos* \ + | chorusrdb* | cegcc* | glidix* \ + | cygwin* | msys* | pe* | moss* | proelf* | rtems* \ + | midipix* | mingw32* | mingw64* | linux-gnu* | linux-android* \ + | linux-newlib* | linux-musl* | linux-uclibc* \ + | uxpv* | beos* | mpeix* | udk* | moxiebox* \ + | interix* | uwin* | mks* | rhapsody* | darwin* \ + | openstep* | oskit* | conix* | pw32* | nonstopux* \ + | storm-chaos* | tops10* | tenex* | tops20* | its* \ + | os2* | vos* | palmos* | uclinux* | nucleus* \ + | morphos* | superux* | rtmk* | windiss* \ + | powermax* | dnix* | nx6 | nx7 | sei* | dragonfly* \ + | skyos* | haiku* | rdos* | toppers* | drops* | es* \ + | onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \ + | midnightbsd* | amdhsa* | unleashed*) # Remember, each alternative MUST END IN *, to match a version number. ;; - -qnx*) - case $basic_machine in - x86-* | i*86-*) + qnx*) + case $cpu in + x86 | i*86) ;; *) - os=-nto$os + os=nto-$os ;; esac ;; - -nto-qnx*) + hiux*) + os=hiuxwe2 ;; - -nto*) - os=`echo $os | sed -e 's|nto|nto-qnx|'` + nto-qnx*) ;; - -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ - | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ - | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) + nto*) + os=`echo $os | sed -e 's|nto|nto-qnx|'` ;; - -mac*) - os=`echo $os | sed -e 's|mac|macos|'` + sim | xray | os68k* | v88r* \ + | windows* | osx | abug | netware* | os9* \ + | macos* | mpw* | magic* | mmixware* | mon960* | lnews*) ;; - -linux-dietlibc) - os=-linux-dietlibc + linux-dietlibc) + os=linux-dietlibc ;; - -linux*) + linux*) os=`echo $os | sed -e 's|linux|linux-gnu|'` ;; - -sunos5*) - os=`echo $os | sed -e 's|sunos5|solaris2|'` + lynx*178) + os=lynxos178 ;; - -sunos6*) - os=`echo $os | sed -e 's|sunos6|solaris3|'` + lynx*5) + os=lynxos5 ;; - -opened*) - os=-openedition + lynx*) + os=lynxos ;; - -os400*) - os=-os400 + mac*) + os=`echo "$os" | sed -e 's|mac|macos|'` ;; - -wince*) - os=-wince + opened*) + os=openedition ;; - -osfrose*) - os=-osfrose + os400*) + os=os400 ;; - -osf*) - os=-osf + sunos5*) + os=`echo "$os" | sed -e 's|sunos5|solaris2|'` ;; - -utek*) - os=-bsd + sunos6*) + os=`echo "$os" | sed -e 's|sunos6|solaris3|'` ;; - -dynix*) - os=-bsd + wince*) + os=wince ;; - -acis*) - os=-aos + utek*) + os=bsd ;; - -atheos*) - os=-atheos + dynix*) + os=bsd ;; - -syllable*) - os=-syllable + acis*) + os=aos ;; - -386bsd) - os=-bsd + atheos*) + os=atheos ;; - -ctix* | -uts*) - os=-sysv + syllable*) + os=syllable + ;; + 386bsd) + os=bsd ;; - -nova*) - os=-rtmk-nova + ctix* | uts*) + os=sysv ;; - -ns2 ) - os=-nextstep2 + nova*) + os=rtmk-nova ;; - -nsk*) - os=-nsk + ns2) + os=nextstep2 + ;; + nsk*) + os=nsk ;; # Preserve the version number of sinix5. - -sinix5.*) + sinix5.*) os=`echo $os | sed -e 's|sinix|sysv|'` ;; - -sinix*) - os=-sysv4 - ;; - -tpf*) - os=-tpf + sinix*) + os=sysv4 ;; - -triton*) - os=-sysv3 + tpf*) + os=tpf ;; - -oss*) - os=-sysv3 + triton*) + os=sysv3 ;; - -svr4) - os=-sysv4 + oss*) + os=sysv3 ;; - -svr3) - os=-sysv3 + svr4*) + os=sysv4 ;; - -sysvr4) - os=-sysv4 + svr3) + os=sysv3 ;; - # This must come after -sysvr4. - -sysv*) + sysvr4) + os=sysv4 ;; - -ose*) - os=-ose + # This must come after sysvr4. + sysv*) ;; - -es1800*) - os=-ose + ose*) + os=ose ;; - -xenix) - os=-xenix + *mint | mint[0-9]* | *MiNT | MiNT[0-9]*) + os=mint ;; - -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) - os=-mint + zvmoe) + os=zvmoe ;; - -aros*) - os=-aros + dicos*) + os=dicos ;; - -zvmoe) - os=-zvmoe + pikeos*) + # Until real need of OS specific support for + # particular features comes up, bare metal + # configurations are quite functional. + case $cpu in + arm*) + os=eabi + ;; + *) + os=elf + ;; + esac ;; - -dicos*) - os=-dicos + nacl*) ;; - -nacl*) + ios) ;; - -ios) + none) ;; - -none) + *-eabi) ;; *) - # Get rid of the `-' at the beginning of $os. - os=`echo $os | sed 's/[^-]*-//'` - echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 + echo Invalid configuration \`"$1"\': system \`"$os"\' not recognized 1>&2 exit 1 ;; esac @@ -1572,264 +1526,265 @@ # will signal an error saying that MANUFACTURER isn't an operating # system, and we'll never get to this point. -case $basic_machine in +case $cpu-$vendor in score-*) - os=-elf + os=elf ;; spu-*) - os=-elf + os=elf ;; *-acorn) - os=-riscix1.2 + os=riscix1.2 ;; arm*-rebel) - os=-linux + os=linux ;; arm*-semi) - os=-aout + os=aout ;; c4x-* | tic4x-*) - os=-coff + os=coff ;; c8051-*) - os=-elf + os=elf + ;; + clipper-intergraph) + os=clix ;; hexagon-*) - os=-elf + os=elf ;; tic54x-*) - os=-coff + os=coff ;; tic55x-*) - os=-coff + os=coff ;; tic6x-*) - os=-coff + os=coff ;; # This must come before the *-dec entry. pdp10-*) - os=-tops20 + os=tops20 ;; pdp11-*) - os=-none + os=none ;; *-dec | vax-*) - os=-ultrix4.2 + os=ultrix4.2 ;; m68*-apollo) - os=-domain + os=domain ;; i386-sun) - os=-sunos4.0.2 + os=sunos4.0.2 ;; m68000-sun) - os=-sunos3 + os=sunos3 ;; m68*-cisco) - os=-aout + os=aout ;; mep-*) - os=-elf + os=elf ;; mips*-cisco) - os=-elf + os=elf ;; mips*-*) - os=-elf + os=elf ;; or32-*) - os=-coff + os=coff ;; *-tti) # must be before sparc entry or we get the wrong os. - os=-sysv3 + os=sysv3 ;; sparc-* | *-sun) - os=-sunos4.1.1 + os=sunos4.1.1 ;; pru-*) - os=-elf + os=elf ;; *-be) - os=-beos - ;; - *-haiku) - os=-haiku + os=beos ;; *-ibm) - os=-aix + os=aix ;; *-knuth) - os=-mmixware + os=mmixware ;; *-wec) - os=-proelf + os=proelf ;; *-winbond) - os=-proelf + os=proelf ;; *-oki) - os=-proelf + os=proelf ;; *-hp) - os=-hpux + os=hpux ;; *-hitachi) - os=-hiux + os=hiux ;; i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) - os=-sysv + os=sysv ;; *-cbm) - os=-amigaos + os=amigaos ;; *-dg) - os=-dgux + os=dgux ;; *-dolphin) - os=-sysv3 + os=sysv3 ;; m68k-ccur) - os=-rtu + os=rtu ;; m88k-omron*) - os=-luna + os=luna ;; - *-next ) - os=-nextstep + *-next) + os=nextstep ;; *-sequent) - os=-ptx + os=ptx ;; *-crds) - os=-unos + os=unos ;; *-ns) - os=-genix + os=genix ;; i370-*) - os=-mvs - ;; - *-next) - os=-nextstep3 + os=mvs ;; *-gould) - os=-sysv + os=sysv ;; *-highlevel) - os=-bsd + os=bsd ;; *-encore) - os=-bsd + os=bsd ;; *-sgi) - os=-irix + os=irix ;; *-siemens) - os=-sysv4 + os=sysv4 ;; *-masscomp) - os=-rtu + os=rtu ;; f30[01]-fujitsu | f700-fujitsu) - os=-uxpv + os=uxpv ;; *-rom68k) - os=-coff + os=coff ;; *-*bug) - os=-coff + os=coff ;; *-apple) - os=-macos + os=macos ;; *-atari*) - os=-mint + os=mint + ;; + *-wrs) + os=vxworks ;; *) - os=-none + os=none ;; esac fi # Here we handle the case where we know the os, and the CPU type, but not the # manufacturer. We pick the logical manufacturer. -vendor=unknown -case $basic_machine in - *-unknown) +case $vendor in + unknown) case $os in - -riscix*) + riscix*) vendor=acorn ;; - -sunos*) + sunos*) vendor=sun ;; - -cnk*|-aix*) + cnk*|-aix*) vendor=ibm ;; - -beos*) + beos*) vendor=be ;; - -hpux*) + hpux*) vendor=hp ;; - -mpeix*) + mpeix*) vendor=hp ;; - -hiux*) + hiux*) vendor=hitachi ;; - -unos*) + unos*) vendor=crds ;; - -dgux*) + dgux*) vendor=dg ;; - -luna*) + luna*) vendor=omron ;; - -genix*) + genix*) vendor=ns ;; - -mvs* | -opened*) + clix*) + vendor=intergraph + ;; + mvs* | opened*) vendor=ibm ;; - -os400*) + os400*) vendor=ibm ;; - -ptx*) + ptx*) vendor=sequent ;; - -tpf*) + tpf*) vendor=ibm ;; - -vxsim* | -vxworks* | -windiss*) + vxsim* | vxworks* | windiss*) vendor=wrs ;; - -aux*) + aux*) vendor=apple ;; - -hms*) + hms*) vendor=hitachi ;; - -mpw* | -macos*) + mpw* | macos*) vendor=apple ;; - -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) + *mint | mint[0-9]* | *MiNT | MiNT[0-9]*) vendor=atari ;; - -vos*) + vos*) vendor=stratus ;; esac - basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` ;; esac -echo $basic_machine$os +echo "$cpu-$vendor-$os" exit # Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) +# eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" diff -Nru grep-3.1/build-aux/depcomp grep-3.3/build-aux/depcomp --- grep-3.1/build-aux/depcomp 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/build-aux/depcomp 2018-03-07 13:57:39.000000000 +0000 @@ -1,9 +1,9 @@ #! /bin/sh # depcomp - compile a program generating dependencies as side-effects -scriptversion=2016-01-11.22; # UTC +scriptversion=2018-03-07.03; # UTC -# Copyright (C) 1999-2017 Free Software Foundation, Inc. +# Copyright (C) 1999-2018 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -16,7 +16,7 @@ # 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 . +# along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a @@ -251,6 +251,41 @@ exit 1 ;; +sgi) + if test "$libtool" = yes; then + "$@" "-Wp,-MDupdate,$tmpdepfile" + else + "$@" -MDupdate "$tmpdepfile" + fi + stat=$? + if test $stat -ne 0; then + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + + if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files + echo "$object : \\" > "$depfile" + # Clip off the initial element (the dependent). Don't try to be + # clever and replace this with sed code, as IRIX sed won't handle + # lines with more than a fixed number of characters (4096 in + # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; + # the IRIX cc adds comments like '#:fec' to the end of the + # dependency line. + tr ' ' "$nl" < "$tmpdepfile" \ + | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' \ + | tr "$nl" ' ' >> "$depfile" + echo >> "$depfile" + # The second pass generates a dummy entry for each header file. + tr ' ' "$nl" < "$tmpdepfile" \ + | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ + >> "$depfile" + else + make_dummy_depfile + fi + rm -f "$tmpdepfile" + ;; + xlc) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, @@ -748,7 +783,7 @@ # Local Variables: # mode: shell-script # sh-indentation: 2 -# eval: (add-hook 'write-file-hooks 'time-stamp) +# eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC0" diff -Nru grep-3.1/build-aux/do-release-commit-and-tag grep-3.3/build-aux/do-release-commit-and-tag --- grep-3.1/build-aux/do-release-commit-and-tag 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/build-aux/do-release-commit-and-tag 2018-03-07 13:57:39.000000000 +0000 @@ -3,11 +3,11 @@ # controlled .prev-version file, automate the procedure by which we record # the date, release-type and version string in the NEWS file. That commit # will serve to identify the release, so apply a signed tag to it as well. -VERSION=2016-12-31.14 # UTC +VERSION=2018-03-07.03 # UTC # Note: this is a bash script (could be zsh or dash) -# Copyright (C) 2009-2017 Free Software Foundation, Inc. +# Copyright (C) 2009-2018 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 @@ -20,7 +20,7 @@ # 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 . +# along with this program. If not, see . # Written by Jim Meyering @@ -67,7 +67,7 @@ cat < +License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. EOF @@ -171,7 +171,7 @@ # Local variables: # indent-tabs-mode: nil -# eval: (add-hook 'write-file-hooks 'time-stamp) +# eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "VERSION=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC0" diff -Nru grep-3.1/build-aux/gendocs.sh grep-3.3/build-aux/gendocs.sh --- grep-3.1/build-aux/gendocs.sh 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/build-aux/gendocs.sh 2018-09-19 05:04:26.000000000 +0000 @@ -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=2016-12-31.18 +scriptversion=2018-03-06.19 -# Copyright 2003-2017 Free Software Foundation, Inc. +# Copyright 2003-2018 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 @@ -17,7 +17,7 @@ # 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 . +# along with this program. If not, see . # # Original author: Mohit Agarwal. # Send bug reports and any other correspondence to bug-gnulib@gnu.org. @@ -25,8 +25,8 @@ # The latest version of this script, and the companion template, is # available from the Gnulib repository: # -# http://git.savannah.gnu.org/cgit/gnulib.git/tree/build-aux/gendocs.sh -# http://git.savannah.gnu.org/cgit/gnulib.git/tree/doc/gendocs_template +# https://git.savannah.gnu.org/cgit/gnulib.git/tree/build-aux/gendocs.sh +# https://git.savannah.gnu.org/cgit/gnulib.git/tree/doc/gendocs_template # TODO: # - image importing was only implemented for HTML generated by @@ -37,8 +37,8 @@ prog=`basename "$0"` srcdir=`pwd` -scripturl="http://git.savannah.gnu.org/cgit/gnulib.git/plain/build-aux/gendocs.sh" -templateurl="http://git.savannah.gnu.org/cgit/gnulib.git/plain/doc/gendocs_template" +scripturl="https://git.savannah.gnu.org/cgit/gnulib.git/plain/build-aux/gendocs.sh" +templateurl="https://git.savannah.gnu.org/cgit/gnulib.git/plain/doc/gendocs_template" : ${SETLANG="env LANG= LC_MESSAGES= LC_ALL= LANGUAGE="} : ${MAKEINFO="makeinfo"} @@ -59,6 +59,7 @@ dirargs= # passed to all tools (-I dir). dirs= # -I directories. htmlarg="--css-ref=/software/gnulib/manual.css -c TOP_NODE_UP_URL=/manual" +default_htmlarg=true infoarg=--no-split generate_ascii=true generate_html=true @@ -72,7 +73,7 @@ version="gendocs.sh $scriptversion -Copyright 2017 Free Software Foundation, Inc. +Copyright 2018 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." @@ -82,7 +83,7 @@ Generate output in various formats from PACKAGE.texinfo (or .texi or .txi) source. See the GNU Maintainers document for a more extensive discussion: - http://www.gnu.org/prep/maintain_toc.html + https://www.gnu.org/prep/maintain_toc.html Options: --email ADR use ADR as contact in generated web pages; always give this. @@ -163,7 +164,7 @@ --common) shift; commonarg=$1;; --docbook) docbook=yes;; --email) shift; EMAIL=$1;; - --html) shift; htmlarg=$1;; + --html) shift; default_htmlarg=false; htmlarg=$1;; --info) shift; infoarg=$1;; --no-ascii) generate_ascii=false;; --no-html) generate_ascii=false;; @@ -199,6 +200,11 @@ # For most of the following, the base name is just $PACKAGE base=$PACKAGE +if $default_htmlarg && test -n "$use_texi2html"; then + # The legacy texi2html doesn't support TOP_NODE_UP_URL + htmlarg="--css-ref=/software/gnulib/manual.css" +fi + if test -n "$srcfile"; then # but here, we use the basename of $srcfile base=`basename "$srcfile"` @@ -497,7 +503,7 @@ echo "Done, see $outdir/ subdirectory for new files." # Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) +# eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-end: "$" diff -Nru grep-3.1/build-aux/gitlog-to-changelog grep-3.3/build-aux/gitlog-to-changelog --- grep-3.1/build-aux/gitlog-to-changelog 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/build-aux/gitlog-to-changelog 2018-03-07 13:57:39.000000000 +0000 @@ -3,13 +3,13 @@ if 0; # Convert git log output to ChangeLog format. -my $VERSION = '2016-03-22 21:49'; # UTC +my $VERSION = '2018-03-07 03: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-2017 Free Software Foundation, Inc. +# Copyright (C) 2008-2018 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,7 @@ # 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 . +# along with this program. If not, see . # Written by Jim Meyering @@ -33,7 +33,7 @@ (my $ME = $0) =~ s|.*/||; -# use File::Coda; # http://meyering.net/code/Coda/ +# use File::Coda; # https://meyering.net/code/Coda/ END { defined fileno STDOUT or return; close STDOUT and return; @@ -491,7 +491,7 @@ # Local Variables: # mode: perl # indent-tabs-mode: nil -# eval: (add-hook 'write-file-hooks 'time-stamp) +# eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "my $VERSION = '" # time-stamp-format: "%:y-%02m-%02d %02H:%02M" # time-stamp-time-zone: "UTC0" diff -Nru grep-3.1/build-aux/git-version-gen grep-3.3/build-aux/git-version-gen --- grep-3.1/build-aux/git-version-gen 2017-01-16 17:27:38.000000000 +0000 +++ grep-3.3/build-aux/git-version-gen 2018-03-07 13:57:39.000000000 +0000 @@ -1,8 +1,8 @@ #!/bin/sh # Print a version string. -scriptversion=2017-01-09.19; # UTC +scriptversion=2018-03-07.03; # UTC -# Copyright (C) 2007-2017 Free Software Foundation, Inc. +# Copyright (C) 2007-2018 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,9 +15,9 @@ # 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 . +# along with this program. If not, see . -# This script is derived from GIT-VERSION-GEN from GIT: http://git.or.cz/. +# This script is derived from GIT-VERSION-GEN from GIT: https://git-scm.com/. # It may be run two ways: # - from a git repository in which the "git describe" command below # produces useful output (thus requiring at least one signed tag) @@ -167,9 +167,10 @@ # tag or the previous older version that did not? # Newer: v6.10-77-g0f8faeb # Older: v6.10-g0f8faeb - case $v in - *-*-*) : git describe is okay three part flavor ;; - *-*) + vprefix=`expr "X$v" : 'X\(.*\)-g[^-]*$'` || vprefix=$v + case $vprefix in + *-*) : git describe is probably okay three part flavor ;; + *) : git describe is older two part flavor # Recreate the number of commits and rewrite such that the # result is the same as if we were using the newer version @@ -184,9 +185,9 @@ ;; esac - # Change the first '-' to a '.', so version-comparing tools work properly. - # Remove the "g" in git describe's output string, to save a byte. - v=`echo "$v" | sed 's/-/./;s/\(.*\)-g/\1-/'`; + # Change the penultimate "-" to ".", for version-comparing tools. + # Remove the "g" to save a byte. + v=`echo "$v" | sed 's/-\([^-]*\)-g\([^-]*\)$/.\1-\2/'`; v_from_git=1 elif test "x$fallback" = x || git --version >/dev/null 2>&1; then v=UNKNOWN @@ -218,7 +219,7 @@ printf %s "$v" # Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) +# eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC0" diff -Nru grep-3.1/build-aux/gnupload grep-3.3/build-aux/gnupload --- grep-3.1/build-aux/gnupload 2017-01-01 11:25:46.000000000 +0000 +++ grep-3.3/build-aux/gnupload 2018-12-21 02:52:35.000000000 +0000 @@ -1,9 +1,9 @@ #!/bin/sh # Sign files and upload them. -scriptversion=2016-01-11.22; # UTC +scriptversion=2018-05-19.18; # UTC -# Copyright (C) 2004-2017 Free Software Foundation, Inc. +# Copyright (C) 2004-2018 Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -16,7 +16,7 @@ # 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 . +# along with this program. If not, see . # Originally written by Alexandre Duret-Lutz . # The master copy of this file is maintained in the gnulib Git repository. @@ -24,7 +24,30 @@ set -e -GPG='gpg --batch --no-tty' +GPG=gpg +# Choose the proper version of gpg, so as to avoid a +# "gpg-agent is not available in this session" error +# when gpg-agent is version 3 but gpg is still version 1. +# FIXME-2020: remove, once all major distros ship gpg version 3 as /usr/bin/gpg +gpg_agent_version=`(gpg-agent --version) 2>/dev/null | sed -e '2,$d' -e 's/^[^0-9]*//'` +case "$gpg_agent_version" in + 2.*) + gpg_version=`(gpg --version) 2>/dev/null | sed -e '2,$d' -e 's/^[^0-9]*//'` + case "$gpg_version" in + 1.*) + if (type gpg2) >/dev/null 2>/dev/null; then + # gpg2 is present. + GPG=gpg2 + else + # gpg2 is missing. Ubuntu users should install the package 'gnupg2'. + echo "WARNING: Using 'gpg', which is too old. You should install 'gpg2'." 1>&2 + fi + ;; + esac + ;; +esac + +GPG="${GPG} --batch --no-tty" conffile=.gnuploadrc to= dry_run=false @@ -54,10 +77,10 @@ --user NAME sign with key NAME --replace allow replacements of existing files --symlink-regex[=EXPR] use sed script EXPR to compute symbolic link names - --dry-run do nothing, show what would have been done + -n, --dry-run do nothing, show what would have been done (including the constructed directive file) --version output version information and exit - --help print this help text and exit + -h, --help print this help text and exit If --symlink-regex is given without EXPR, then the link target name is created by replacing the version information with '-latest', e.g.: @@ -78,7 +101,7 @@ actual command line options. Use this to keep your defaults. Comments (#) and empty lines in $conffile are allowed. - + gives some further background. Examples: @@ -108,7 +131,7 @@ gnupload executes a program ncftpput to do the transfers; if you don't happen to have an ncftp package installed, the ncftpput-ftp script in the build-aux/ directory of the gnulib package -(http://savannah.gnu.org/projects/gnulib) may serve as a replacement. +(https://savannah.gnu.org/projects/gnulib) may serve as a replacement. Send patches and bug reports to ." @@ -125,7 +148,7 @@ -*) collect_var= case $1 in - --help) + -h | --help) echo "$usage" exit $? ;; @@ -171,7 +194,7 @@ --symlink) collect_var=symlink_files ;; - --dry-run|-n) + -n | --dry-run) dry_run=: ;; --version) @@ -432,7 +455,7 @@ exit 0 # Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) +# eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC0" diff -Nru grep-3.1/build-aux/gnu-web-doc-update grep-3.3/build-aux/gnu-web-doc-update --- grep-3.1/build-aux/gnu-web-doc-update 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/build-aux/gnu-web-doc-update 2018-03-07 13:57:39.000000000 +0000 @@ -1,10 +1,10 @@ #!/bin/sh # Run this after each non-alpha release, to update the web documentation at -# http://www.gnu.org/software/$pkg/manual/ +# https://www.gnu.org/software/$pkg/manual/ -VERSION=2016-01-12.23; # UTC +VERSION=2018-03-07.03; # UTC -# Copyright (C) 2009-2017 Free Software Foundation, Inc. +# Copyright (C) 2009-2018 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 @@ -17,7 +17,7 @@ # 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 . +# along with this program. If not, see . ME=$(basename "$0") warn() { printf '%s: %s\n' "$ME" "$*" >&2; } @@ -30,7 +30,7 @@ Run this script from top_srcdir (no arguments) after each non-alpha release, to update the web documentation at -http://www.gnu.org/software/\$pkg/manual/ +https://www.gnu.org/software/\$pkg/manual/ This script assumes you're using git for revision control, and requires a .prev-version file as well as a Makefile, from which it @@ -55,7 +55,7 @@ cat < +License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. EOF @@ -202,7 +202,7 @@ ) # Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) +# eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "VERSION=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC0" diff -Nru grep-3.1/build-aux/install-sh grep-3.3/build-aux/install-sh --- grep-3.1/build-aux/install-sh 2016-11-21 17:32:00.000000000 +0000 +++ grep-3.3/build-aux/install-sh 2018-04-21 23:36:13.000000000 +0000 @@ -1,7 +1,7 @@ #!/bin/sh # install - install a program, script, or datafile -scriptversion=2016-01-11.22; # UTC +scriptversion=2018-03-11.20; # UTC # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the @@ -271,15 +271,18 @@ fi dst=$dst_arg - # If destination is a directory, append the input filename; won't work - # if double slashes aren't ignored. + # If destination is a directory, append the input filename. if test -d "$dst"; then if test "$is_target_a_directory" = never; then echo "$0: $dst_arg: Is a directory" >&2 exit 1 fi dstdir=$dst - dst=$dstdir/`basename "$src"` + dstbase=`basename "$src"` + case $dst in + */) dst=$dst$dstbase;; + *) dst=$dst/$dstbase;; + esac dstdir_status=0 else dstdir=`dirname "$dst"` @@ -288,6 +291,11 @@ fi fi + case $dstdir in + */) dstdirslash=$dstdir;; + *) dstdirslash=$dstdir/;; + esac + obsolete_mkdir_used=false if test $dstdir_status != 0; then @@ -324,34 +332,43 @@ # is incompatible with FreeBSD 'install' when (umask & 300) != 0. ;; *) + # Note that $RANDOM variable is not portable (e.g. dash); Use it + # here however when possible just to lower collision chance. tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ - trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 + trap 'ret=$?; rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null; exit $ret' 0 + + # Because "mkdir -p" follows existing symlinks and we likely work + # directly in world-writeable /tmp, make sure that the '$tmpdir' + # directory is successfully created first before we actually test + # 'mkdir -p' feature. if (umask $mkdir_umask && - exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 + $mkdirprog $mkdir_mode "$tmpdir" && + exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1 then if test -z "$dir_arg" || { # Check for POSIX incompatibilities with -m. # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or # other-writable bit of parent directory when it shouldn't. # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. - ls_ld_tmpdir=`ls -ld "$tmpdir"` + test_tmpdir="$tmpdir/a" + ls_ld_tmpdir=`ls -ld "$test_tmpdir"` case $ls_ld_tmpdir in d????-?r-*) different_mode=700;; d????-?--*) different_mode=755;; *) false;; esac && - $mkdirprog -m$different_mode -p -- "$tmpdir" && { - ls_ld_tmpdir_1=`ls -ld "$tmpdir"` + $mkdirprog -m$different_mode -p -- "$test_tmpdir" && { + ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"` test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" } } then posix_mkdir=: fi - rmdir "$tmpdir/d" "$tmpdir" + rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" else # Remove any dirs left behind by ancient mkdir implementations. - rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null + rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null fi trap '' 0;; esac;; @@ -427,8 +444,8 @@ else # Make a couple of temp file names in the proper directory. - dsttmp=$dstdir/_inst.$$_ - rmtmp=$dstdir/_rm.$$_ + dsttmp=${dstdirslash}_inst.$$_ + rmtmp=${dstdirslash}_rm.$$_ # Trap to clean up those temp files at exit. trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 @@ -493,7 +510,7 @@ done # Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) +# eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC0" diff -Nru grep-3.1/build-aux/mdate-sh grep-3.3/build-aux/mdate-sh --- grep-3.1/build-aux/mdate-sh 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/build-aux/mdate-sh 2018-03-07 13:57:39.000000000 +0000 @@ -1,9 +1,9 @@ #!/bin/sh # Get modification time of a file or directory and pretty-print it. -scriptversion=2016-01-11.22; # UTC +scriptversion=2018-03-07.03; # UTC -# Copyright (C) 1995-2017 Free Software Foundation, Inc. +# Copyright (C) 1995-2018 Free Software Foundation, Inc. # written by Ulrich Drepper , June 1995 # # This program is free software; you can redistribute it and/or modify @@ -17,7 +17,7 @@ # 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 . +# along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a @@ -74,6 +74,10 @@ LC_TIME=C export LC_TIME +# Use UTC to get reproducible result. +TZ=UTC0 +export TZ + # GNU ls changes its time format in response to the TIME_STYLE # variable. Since we cannot assume 'unset' works, revert this # variable to its documented default. @@ -216,7 +220,7 @@ # Local Variables: # mode: shell-script # sh-indentation: 2 -# eval: (add-hook 'write-file-hooks 'time-stamp) +# eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC0" diff -Nru grep-3.1/build-aux/missing grep-3.3/build-aux/missing --- grep-3.1/build-aux/missing 2017-07-02 20:12:56.000000000 +0000 +++ grep-3.3/build-aux/missing 2018-12-21 03:32:52.000000000 +0000 @@ -1,9 +1,9 @@ #! /bin/sh # Common wrapper for a few potentially missing GNU programs. -scriptversion=2016-01-11.22; # UTC +scriptversion=2018-03-07.03; # UTC -# Copyright (C) 1996-2015 Free Software Foundation, Inc. +# Copyright (C) 1996-2018 Free Software Foundation, Inc. # Originally written by Fran,cois Pinard , 1996. # This program is free software; you can redistribute it and/or modify @@ -17,7 +17,7 @@ # 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 . +# along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a @@ -101,9 +101,9 @@ exit $st fi -perl_URL=http://www.perl.org/ -flex_URL=http://flex.sourceforge.net/ -gnu_software_URL=http://www.gnu.org/software +perl_URL=https://www.perl.org/ +flex_URL=https://github.com/westes/flex +gnu_software_URL=https://www.gnu.org/software program_details () { @@ -207,7 +207,7 @@ exit $st # Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) +# eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC0" diff -Nru grep-3.1/build-aux/test-driver grep-3.3/build-aux/test-driver --- grep-3.1/build-aux/test-driver 2017-07-02 20:12:56.000000000 +0000 +++ grep-3.3/build-aux/test-driver 2018-12-21 03:32:52.000000000 +0000 @@ -1,9 +1,9 @@ #! /bin/sh # test-driver - basic testsuite driver script. -scriptversion=2016-01-11.22; # UTC +scriptversion=2018-03-07.03; # UTC -# Copyright (C) 2011-2015 Free Software Foundation, Inc. +# Copyright (C) 2011-2018 Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -16,7 +16,7 @@ # 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 . +# along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a @@ -140,7 +140,7 @@ # Local Variables: # mode: shell-script # sh-indentation: 2 -# eval: (add-hook 'write-file-hooks 'time-stamp) +# eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC0" diff -Nru grep-3.1/build-aux/texinfo.tex grep-3.3/build-aux/texinfo.tex --- grep-3.1/build-aux/texinfo.tex 2017-06-10 16:44:24.000000000 +0000 +++ grep-3.3/build-aux/texinfo.tex 2018-12-15 18:14:26.000000000 +0000 @@ -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{2017-06-04.19} +\def\texinfoversion{2018-09-21.20} % % 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, 2016, 2017 +% 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 % Free Software Foundation, Inc. % % This texinfo.tex file is free software: you can redistribute it and/or @@ -21,7 +21,7 @@ % 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 . +% along with this program. If not, see . % % As a special exception, when this file is read by TeX when processing % a Texinfo source document, you may use the result without @@ -30,9 +30,9 @@ % % Please try the latest version of texinfo.tex before submitting bug % reports; you can get the latest version from: -% http://ftp.gnu.org/gnu/texinfo/ (the Texinfo release area), or -% http://ftpmirror.gnu.org/texinfo/ (same, via a mirror), or -% http://www.gnu.org/software/texinfo/ (the Texinfo home page) +% https://ftp.gnu.org/gnu/texinfo/ (the Texinfo release area), or +% https://ftpmirror.gnu.org/texinfo/ (same, via a mirror), or +% https://www.gnu.org/software/texinfo/ (the Texinfo home page) % The texinfo.tex in any given distribution could well be out % of date, so if that's what you're using, please check. % @@ -56,7 +56,7 @@ % extent. You can get the existing language-specific files from the % full Texinfo distribution. % -% The GNU Texinfo home page is http://www.gnu.org/software/texinfo. +% The GNU Texinfo home page is https://www.gnu.org/software/texinfo. \message{Loading texinfo [version \texinfoversion]:} @@ -1528,6 +1528,9 @@ \startlink attr{/Border [0 0 0]}% user{/Subtype /Link /A << /S /URI /URI (#1) >>}% \endgroup} + % \pdfgettoks - Surround page numbers in #1 with @pdflink. #1 may + % be a simple number, or a list of numbers in the case of an index + % entry. \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} @@ -2235,6 +2238,20 @@ \font\smallersy=cmsy8 \def\smallerecsize{0800} +% Fonts for math mode superscripts (7pt). +\def\sevennominalsize{7pt} +\setfont\sevenrm\rmshape{7}{1000}{OT1} +\setfont\seventt\ttshape{10}{700}{OT1TT} +\setfont\sevenbf\bfshape{10}{700}{OT1} +\setfont\sevenit\itshape{7}{1000}{OT1IT} +\setfont\sevensl\slshape{10}{700}{OT1} +\setfont\sevensf\sfshape{10}{700}{OT1} +\setfont\sevensc\scshape{10}{700}{OT1} +\setfont\seventtsl\ttslshape{10}{700}{OT1TT} +\font\seveni=cmmi7 +\font\sevensy=cmsy7 +\def\sevenecsize{0700} + % Fonts for title page (20.4pt): \def\titlenominalsize{20pt} \setfont\titlerm\rmbshape{12}{\magstep3}{OT1} @@ -2369,6 +2386,20 @@ \font\smallersy=cmsy8 \def\smallerecsize{0800} +% Fonts for math mode superscripts (7pt). +\def\sevennominalsize{7pt} +\setfont\sevenrm\rmshape{7}{1000}{OT1} +\setfont\seventt\ttshape{10}{700}{OT1TT} +\setfont\sevenbf\bfshape{10}{700}{OT1} +\setfont\sevenit\itshape{7}{1000}{OT1IT} +\setfont\sevensl\slshape{10}{700}{OT1} +\setfont\sevensf\sfshape{10}{700}{OT1} +\setfont\sevensc\scshape{10}{700}{OT1} +\setfont\seventtsl\ttslshape{10}{700}{OT1TT} +\font\seveni=cmmi7 +\font\sevensy=cmsy7 +\def\sevenecsize{0700} + % Fonts for title page (20.4pt): \def\titlenominalsize{20pt} \setfont\titlerm\rmbshape{12}{\magstep3}{OT1} @@ -2503,13 +2534,20 @@ % 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. +% we have to define the \textfont of the standard families. +% We don't bother to reset \scriptscriptfont; awaiting user need. % \def\resetmathfonts{% \textfont0=\rmfont \textfont1=\ifont \textfont2=\syfont \textfont\itfam=\itfont \textfont\slfam=\slfont \textfont\bffam=\bffont \textfont\ttfam=\ttfont \textfont\sffam=\sffont + % + % Fonts for superscript. Note that the 7pt fonts are used regardless + % of the current font size. + \scriptfont0=\sevenrm \scriptfont1=\seveni \scriptfont2=\sevensy + \scriptfont\itfam=\sevenit \scriptfont\slfam=\sevensl + \scriptfont\bffam=\sevenbf \scriptfont\ttfam=\seventt + \scriptfont\sffam=\sevensf } % @@ -2519,6 +2557,9 @@ % to also set the current \fam for math mode. Our \STYLE (e.g., \rm) % commands hardwire \STYLEfont to set the current font. % +% The fonts used for \ifont are for "math italics" (\itfont is for italics +% in regular text). \syfont is also used in math mode only. +% % Each font-changing command also sets the names \lsize (one size lower) % and \lllsize (three sizes lower). These relative commands are used % in, e.g., the LaTeX logo and acronyms. @@ -2619,26 +2660,11 @@ % Markup style infrastructure. \defmarkupstylesetup\INITMACRO will % define and register \INITMACRO to be called on markup style changes. % \INITMACRO can check \currentmarkupstyle for the innermost -% style and the set of \ifmarkupSTYLE switches for all styles -% currently in effect. -\newif\ifmarkupvar -\newif\ifmarkupsamp -\newif\ifmarkupkey -%\newif\ifmarkupfile % @file == @samp. -%\newif\ifmarkupoption % @option == @samp. -\newif\ifmarkupcode -\newif\ifmarkupkbd -%\newif\ifmarkupenv % @env == @code. -%\newif\ifmarkupcommand % @command == @code. -\newif\ifmarkuptex % @tex (and part of @math, for now). -\newif\ifmarkupexample -\newif\ifmarkupverb -\newif\ifmarkupverbatim +% style. \let\currentmarkupstyle\empty \def\setupmarkupstyle#1{% - \csname markup#1true\endcsname \def\currentmarkupstyle{#1}% \markupstylesetup } @@ -2700,11 +2726,15 @@ % lilypond developers report. xpdf does work with the regular 0x27. % \def\codequoteright{% - \expandafter\ifx\csname SETtxicodequoteundirected\endcsname\relax - \expandafter\ifx\csname SETcodequoteundirected\endcsname\relax - '% + \ifmonospace + \expandafter\ifx\csname SETtxicodequoteundirected\endcsname\relax + \expandafter\ifx\csname SETcodequoteundirected\endcsname\relax + '% + \else \char'15 \fi \else \char'15 \fi - \else \char'15 \fi + \else + '% + \fi } % % and a similar option for the left quote char vs. a grave accent. @@ -2712,13 +2742,17 @@ % the code environments to do likewise. % \def\codequoteleft{% - \expandafter\ifx\csname SETtxicodequotebacktick\endcsname\relax - \expandafter\ifx\csname SETcodequotebacktick\endcsname\relax - % [Knuth] pp. 380,381,391 - % \relax disables Spanish ligatures ?` and !` of \tt font. - \relax`% + \ifmonospace + \expandafter\ifx\csname SETtxicodequotebacktick\endcsname\relax + \expandafter\ifx\csname SETcodequotebacktick\endcsname\relax + % [Knuth] pp. 380,381,391 + % \relax disables Spanish ligatures ?` and !` of \tt font. + \relax`% + \else \char'22 \fi \else \char'22 \fi - \else \char'22 \fi + \else + \relax`% + \fi } % Commands to set the quote options. @@ -5696,10 +5730,13 @@ \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 + % Try to split the text roughly evenly. \dimen@ will be the length of + % the first line. + \dimen@ = 0.7\dimen@ \dimen@ii = \hsize \ifnum\dimen@>\dimen@ii - % If the entry is too long, use the whole line + % If the entry is too long (for example, if it needs more than + % two lines), use all the space in the first line. \dimen@ = \dimen@ii \fi \advance\leftskip by 0pt plus 1fill % ragged right @@ -5709,8 +5746,9 @@ % 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 + % Indent all lines but the first one. + \advance\leftskip by 1em + \advance\parindent by -1em \fi\fi \indent % start paragraph \unhbox\boxA @@ -5965,24 +6003,30 @@ % Split the last of the double-column material. \savemarks \balancecolumns - % + }% + \eject % call the \output just set + \ifdim\pagetotal=0pt % Having called \balancecolumns once, we do not % want to call it again. Therefore, reset \output to its normal % 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. - \global\vsize = \txipageheight % - \pagegoal = \txipageheight % + % + \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. + \global\vsize = \txipageheight % + \pagegoal = \txipageheight % + \else + % We had some left-over material. This might happen when \doublecolumnout + % is called in \balancecolumns. Try again. + \expandafter\enddoublecolumns + \fi } \newbox\balancedcolumns \setbox\balancedcolumns=\vbox{shouldnt see this}% @@ -5997,6 +6041,7 @@ \ifdim\dimen@<5\baselineskip % Don't split a short final column in two. \setbox2=\vbox{}% + \global\setbox\balancedcolumns=\vbox{\pagesofar}% \else \divide\dimen@ by 2 % target to split to \dimen@ii = \dimen@ @@ -6012,15 +6057,15 @@ \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}% + % It appears that we have been called upon to balance too much material. + % Output some of it with \doublecolumnout, leaving the rest on the page. + \setbox\PAGE=\box0 + \doublecolumnout \else % Compare the heights of the two columns. \ifdim4\ht1>5\ht3 @@ -6033,10 +6078,10 @@ \setbox2=\vbox to\ht1{\unvbox3\unskip}% \setbox0=\vbox to\ht1{\unvbox1\unskip}% \fi + \global\setbox\balancedcolumns=\vbox{\pagesofar}% \fi \fi % - \global\setbox\balancedcolumns=\vbox{\pagesofar}% } \catcode`\@ = \other @@ -6943,7 +6988,15 @@ % exist, with an empty box. Let's hope all the numbers have the same width. % Also ignore the page number, which is conventionally not printed. \def\numeralbox{\setbox0=\hbox{8}\hbox to \wd0{\hfil}} -\def\partentry#1#2#3#4{\dochapentry{\numeralbox\labelspace#1}{}} +\def\partentry#1#2#3#4{% + % Add stretch and a bonus for breaking the page before the part heading. + % This reduces the chance of the page being broken immediately after the + % part heading, before a following chapter heading. + \vskip 0pt plus 5\baselineskip + \penalty-300 + \vskip 0pt plus -5\baselineskip + \dochapentry{\numeralbox\labelspace#1}{}% +} % % Parts, in the short toc. \def\shortpartentry#1#2#3#4{% @@ -7951,6 +8004,7 @@ \gdef\boldbrax{\let(=\opnr\let)=\clnr\let[=\lbrb\let]=\rbrb} \gdef\magicamp{\let&=\amprm} } +\let\ampchar\& \newcount\parencount @@ -9434,7 +9488,7 @@ \newif\ifwarnednoepsf \newhelp\noepsfhelp{epsf.tex must be installed for images to work. It is also included in the Texinfo distribution, or you can get - it from ftp://tug.org/tex/epsf.tex.} + it from https://ctan.org/texarchive/macros/texinfo/texinfo/doc/epsf.tex.} % \def\image#1{% \ifx\epsfbox\thisisundefined @@ -11009,7 +11063,6 @@ \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}% @@ -11025,7 +11078,6 @@ \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}% @@ -11034,8 +11086,6 @@ \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}% @@ -11069,8 +11119,6 @@ \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}% @@ -11085,8 +11133,6 @@ \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}% @@ -11102,12 +11148,11 @@ \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{25C7}{\ensuremath\diamond}% \DeclareUnicodeCharacter{2660}{\ensuremath\spadesuit}% \DeclareUnicodeCharacter{2661}{\ensuremath\heartsuit}% \DeclareUnicodeCharacter{2662}{\ensuremath\diamondsuit}% @@ -11129,7 +11174,6 @@ \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}% @@ -11423,9 +11467,11 @@ % \dimen0 = #1\relax \advance\dimen0 by \voffset + \advance\dimen0 by 1in % reference point for DVI is 1 inch from top of page % \dimen2 = \hsize \advance\dimen2 by \normaloffset + \advance\dimen2 by 1in % reference point is 1 inch from left edge of page % \internalpagesizes{#1}{\hsize}% {\voffset}{\normaloffset}% @@ -11673,7 +11719,7 @@ @markupsetuprqdefault @c Local variables: -@c eval: (add-hook 'write-file-hooks 'time-stamp) +@c eval: (add-hook 'before-save-hook 'time-stamp) @c page-delimiter: "^\\\\message\\|emacs-page" @c time-stamp-start: "def\\\\texinfoversion{" @c time-stamp-format: "%:y-%02m-%02d.%02H" diff -Nru grep-3.1/build-aux/update-copyright grep-3.3/build-aux/update-copyright --- grep-3.1/build-aux/update-copyright 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/build-aux/update-copyright 2018-03-07 13:57:39.000000000 +0000 @@ -3,9 +3,9 @@ if 0; # Update an FSF copyright year list to include the current year. -my $VERSION = '2016-01-12.23:13'; # UTC +my $VERSION = '2018-03-07.03:47'; # UTC -# Copyright (C) 2009-2017 Free Software Foundation, Inc. +# Copyright (C) 2009-2018 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,7 +18,7 @@ # 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 . +# along with this program. If not, see . # Written by Jim Meyering and Joel E. Denny @@ -81,6 +81,7 @@ # B. (c) # C. @copyright{} # D. © +# E. © # # 4. The "Copyright" appears at the beginning of a line, except that it # may be prefixed by any sequence (e.g., a comment) of no more than @@ -124,7 +125,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; @@ -263,10 +264,12 @@ print STDERR "$ARGV: warning: copyright statement not found\n"; } +# Hey Emacs! # Local variables: +# coding: utf-8 # mode: perl # indent-tabs-mode: nil -# eval: (add-hook 'write-file-hooks 'time-stamp) +# eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "my $VERSION = '" # time-stamp-format: "%:y-%02m-%02d.%02H:%02M" # time-stamp-time-zone: "UTC0" diff -Nru grep-3.1/build-aux/useless-if-before-free grep-3.3/build-aux/useless-if-before-free --- grep-3.1/build-aux/useless-if-before-free 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/build-aux/useless-if-before-free 2018-03-07 13:57:39.000000000 +0000 @@ -4,13 +4,13 @@ # Detect instances of "if (p) free (p);". # Likewise "if (p != 0)", "if (0 != p)", or with NULL; and with braces. -my $VERSION = '2016-08-01 17:47'; # UTC +my $VERSION = '2018-03-07 03: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-2017 Free Software Foundation, Inc. +# Copyright (C) 2008-2018 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,7 +23,7 @@ # 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 . +# along with this program. If not, see . # Written by Jim Meyering @@ -33,7 +33,7 @@ (my $ME = $0) =~ s|.*/||; -# use File::Coda; # http://meyering.net/code/Coda/ +# use File::Coda; # https://meyering.net/code/Coda/ END { defined fileno STDOUT or return; close STDOUT and return; @@ -202,7 +202,7 @@ ## Local Variables: ## mode: perl ## indent-tabs-mode: nil -## eval: (add-hook 'write-file-hooks 'time-stamp) +## eval: (add-hook 'before-save-hook 'time-stamp) ## time-stamp-start: "my $VERSION = '" ## time-stamp-format: "%:y-%02m-%02d %02H:%02M" ## time-stamp-time-zone: "UTC0" diff -Nru grep-3.1/build-aux/vc-list-files grep-3.3/build-aux/vc-list-files --- grep-3.1/build-aux/vc-list-files 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/build-aux/vc-list-files 2018-03-07 13:57:39.000000000 +0000 @@ -2,9 +2,9 @@ # List version-controlled file names. # Print a version string. -scriptversion=2016-01-11.22; # UTC +scriptversion=2018-03-07.03; # UTC -# Copyright (C) 2006-2017 Free Software Foundation, Inc. +# Copyright (C) 2006-2018 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 @@ -17,7 +17,7 @@ # 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 . +# along with this program. If not, see . # List the specified version-controlled files. @@ -49,7 +49,7 @@ cat < +License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. EOF @@ -65,7 +65,7 @@ for dir do - if test -d .git; then + if test -d .git || test -f .git; then test "x$dir" = x. \ && dir= sed_esc= \ || { dir="$dir/"; sed_esc=`echo "$dir"|env sed 's,\([\\/]\),\\\\\1,g'`; } @@ -105,7 +105,7 @@ done # Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) +# eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC0" diff -Nru grep-3.1/cfg.mk grep-3.3/cfg.mk --- grep-3.1/cfg.mk 2017-05-31 15:09:30.000000000 +0000 +++ grep-3.3/cfg.mk 2018-12-21 03:31:11.000000000 +0000 @@ -1,5 +1,5 @@ # Customize maint.mk -*- makefile -*- -# Copyright (C) 2009-2017 Free Software Foundation, Inc. +# Copyright (C) 2009-2018 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 @@ -12,19 +12,21 @@ # 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 . +# along with this program. If not, see . # Cause the tool(s) built by this package to be used also when running # commands via e.g., "make syntax-check". Doing this a little sooner # would have avoided a grep infloop bug. +ifeq ($(build_triplet), $(host_triplet)) export PATH := $(builddir)/src$(PATH_SEPARATOR)$(PATH) +endif # Used in maint.mk's web-manual rule manual_title = GNU Grep: Print lines matching a pattern # Use the direct link. This is guaranteed to work immediately, while # it can take a while for the faster mirror links to become usable. -url_dir_list = http://ftp.gnu.org/gnu/$(PACKAGE) +url_dir_list = https://ftp.gnu.org/gnu/$(PACKAGE) # Tests not to run as part of "make distcheck". local-checks-to-skip = \ @@ -63,7 +65,7 @@ # 1127556 9e export XZ_OPT = -6e -old_NEWS_hash = a708c1088278e4d60e8e4ad2759228de +old_NEWS_hash = 7623f45d6e457629257ff9a9f8237673 # Many m4 macros names once began with 'jm_'. # Make sure that none are inadvertently reintroduced. diff -Nru grep-3.1/ChangeLog grep-3.3/ChangeLog --- grep-3.1/ChangeLog 2017-07-02 20:22:00.000000000 +0000 +++ grep-3.3/ChangeLog 2018-12-21 04:39:54.000000000 +0000 @@ -1,5 +1,401 @@ +2018-12-20 Jim Meyering + + version 3.3 + * NEWS: Record release date. + + grep: fix \b DFA-bug in C locale + Under some conditions, \b would mistakenly fail to match, e.g. + echo 123-x|LC_ALL=C grep '.\bx' + * NEWS (Bug fixes): Mention it + * gnulib: Update to latest, for DFA regression fix. + * tests/word-delim-multibyte: Add a test for the dfa.c regression. + +2018-12-20 Paul Eggert + + grep: fit --version authorship into 80 + * src/grep.c (AUTHORS): Remove. + (main): Output the authorship info ourselves instead of having + version_etc do it. This is better for i18n anyway. + + build: update gnulib submodule to latest + +2018-12-20 Jim Meyering + + maint: post-release administrivia + * NEWS: Add header line for next release. + * .prev-version: Record previous version. + * cfg.mk (old_NEWS_hash): Auto-update. + + version 3.2 + * NEWS: Record release date. + +2018-12-18 Jim Meyering + + build: update gnulib for c-stack fix + +2018-12-17 Bruno Haible + + tests: stack-overflow: avoid unwarranted test failure on some hosts + * tests/stack-overflow: Use ulimit to limit stack size. Otherwise, + at least on gcc113, grep would fail to overflow its stack, so this + test would fail to find the required diagnostic and would fail. + +2018-12-16 Jim Meyering + + tests: reenable the surrogate-pair test + This reverts commit bdb98cec2e7bf255e1d00eaf8be16299f7bf571e, + but adding the comment changes suggested by Bruno Haible in + https://lists.gnu.org/r/grep-devel/2018-12/msg00037.html + * tests/surrogate-pair: New file. + * tests/Makefile.am (TESTS): List it. + +2018-12-16 Bruno Haible + + tests: stackoverflow: fix test failure on HardenedBSD 11 + * tests/stack-overflow: Try up to 10 million opening parentheses. + +2018-12-16 Jim Meyering + + tests: remove stale surrogate-pair test + The cygwin-specific code for surrogate pairs was first disconnected + via v2.21-62-g936c904 and later removed as part of a then-unused + function via v2.24-12-g704de87. So now I'm removing the test, too. + If someone thinks it important and would like to revive it, please do. + * tests/surrogate-pair: Remove file. + * tests/Makefile.am (TESTS): Remove it. + +2018-12-16 Paul Eggert + + build: update gnulib submodule to latest + +2018-12-15 Jim Meyering + + tests: stack-overflow: handle the case of success without the diagnostic + * tests/stack-overflow: Do not always require a stack + overflow diagnostic. + + build: update gnulib to latest + * gnulib: Update to latest, to pull in code that now compensates for + a bug in glibc-2.27 and prior. + + build: make the autoconf-2.63 requirement explicit + * configure.ac: AC_PREREQ: Require 2.63, not 2.59. And quote properly. + Autoconf-2.63 has been required for some time via gnulib. + This merely makes it explicit. + +2018-12-15 Paul Eggert + + tests: fix diagnostic typo + Fix by Bruno Haible in: + https://lists.gnu.org/r/grep-devel/2018-12/msg00003.html + * tests/init.cfg (envvar_check_fail): Fix diagnostic. + +2018-11-24 Jim Meyering + + tests: stack-overflow: avoid false failure + * tests/stack-overflow: This test would fail to elicit a stack overflow + diagnostic on some OS X systems. Rewrite to iterate, gradually increasing + the size of the input regex, stopping when grep emits the desired diagnostic + or the size reaches a reasonable limit. + +2018-10-16 Jim Meyering + + tests: reduce the sole failing test + * tests/backref-alt: Significantly reduce abort-inducing input. + + build: update gnulib to latest; also update bootstrap and init.sh + +2018-10-13 Jim Meyering + + doc: NEWS: mention performance improvements + * NEWS (Improvements): Mention them. + +2018-10-13 Jim Meyering + + grep: triple initial buffer size: 32k->96k + Changing 32k to 96k gives a 3-23% performance improvement. + All timings ran with this diff on top of commit v3.1-39-g7179b21: + + for n in 32 64 96 128; do + echo n=$n + perl -pi -e 's/(INITIAL_BUFSIZE =) \d+/$1 '$n/ src/grep.c && + make AM_CFLAGS=-O3 WERROR_CFLAGS= >& makerr-$n && + for needle in 1f2 1f298lkjskjhahjklkj34; do + echo " needle=$needle" + for i in $(seq 10); do + env MALLOC_PERTURB_= time -qf%e src/grep $needle w2000 + done 2>&1 |sort -g | tee >(head -1|sed 's/^/ /') > .time-${n}KB-$needle + done + done + + Tested searchs: search for a short literal pattern that is not + present in 9.3GB file containing 2000 copies of /usr/dict/words + created via this: + ln -s /usr/share/dict/words k && cat $(yes k|head -2000) > w2000 + I ran this command: + env MALLOC_PERTURB_= time src/grep 1f2 w2000 + old(32k) vs new elapsed time, best of 10 trials (gcc-9.0.0 20180831, -O3): + 32k 64k 96k(%incr) 128k CPU + 1.25 1.18 1.16( 7.2) 1.20 i7-4770S@3.10GHz cache=8MB + 1.21 1.16 1.17( 3.3) 1.19 Xeon(R) E3-1505M v5 @ 2.80GHz cache=8MB + 2.36 2.29 2.29( 3.0) 2.36 Xeon(R) E5-2680 v4 @ 2.40GHz cache=32MB + 1.40 1.32 1.31( 6.4) 1.33 i5-6260U @ 1.80GHz cache=4MB + 1.31 1.26 1.24( 5.3) 1.23 AMD FX(tm)-4100 cache=2MB (with only 1000 copies) + + Searching for a longer string: 1f298lkjskjhahjklkj34 + 2.03 1.76 1.61(20.7) 1.53 i7-4770S@3.10GHz cache=8MB + 1.95 1.70 1.56(20.0) 1.51 Xeon(R) E3-1505M v5 @ 2.80GHz + 3.27 2.98 2.84(13.1) 3.02 Xeon(R) E5-2680 v4 @ 2.40GHz + 2.48 2.12 1.91(23.0) 1.80 i5-6260U @ 1.80GHz cache=4MB + 1.72 1.54 1.46(15.1) 1.41 AMD FX(tm)-4100 cache=2MB + + * src/grep.c (INITIAL_BUFSIZE): Triple it: 32kB -> 96kB + +2018-09-28 Barret Rhoden (tiny change) + + maint: fix cross-compiling problem + * cfg.mk (PATH): Omit if cross-compiling (Bug#32866). + +2018-09-28 Paul Eggert + + build: update gnulib submodule to latest + + grep: fix usage 80-column glitch + * src/grep.c (usage): Do not go over 80 columns in the source + code, to pacify "make dist". + +2018-09-19 Paul Eggert + + maint: update bootstrap + * bootstrap: Copy from Gnulib. + + maint: fix build failure + Problem found by OpenCSW buildbot; the bug also occurs on GNU/Linux + build platforms. The symptom is “system.h:26:24: fatal error: + configmake.h: No such file or directory”. See: + https://buildfarm.opencsw.org/buildbot/builders/ggrep-solaris10-sparc/builds/107 + * bootstrap.conf: Add configmake, a dependency that was formerly brought + in only by accident. + +2018-09-18 Paul Eggert + + build: update gnulib submodule to latest + +2018-08-09 Paul Eggert + + tests: fix comment + + tests: backref-alt works with glibc 2.28 + Problem reported by Jaroslav Skarvada (Bug#32409). + * tests/Makefile.am (XFAIL_TESTS) [!USE_INCLUDED_REGEX]: + Don’t add backref-alt, since this bug is fixed in glibc 2.28. + +2018-05-11 Paul Eggert + + doc: “pattern” vs “patterns” + * doc/grep.in.1, doc/grep.texi, src/grep.c (usage): Be more + careful about saying that an argument or option specifies one or + more patterns, not just a single pattern. Problem reported by Kaz + Kylheku (Bug#31400). + + build: update gnulib submodule to latest + +2018-04-21 Jim Meyering + + maint: fix new syntax-check (sc_long_lines) failure + * HACKING: Shorten line by one byte to fit in 80 columns. + + build: update gnulib to latest + +2018-04-21 Paul Eggert + + doc: fix font typo + + maint: update URLs + Mostly this is just changing http: to https:. + In one or two places it removes no-longer-useful URLs. + + doc: man-page format fixes + * doc/grep.in.1: Fix minor formatting glitches, e.g., extra + space after [...] because groff thought it was a sentence end. + Problem reported by Ingo Schwarze (Bug#31228#11). + +2018-04-20 Paul Eggert + + doc: mention encoding errors + This attempts to document the encoding-error problem more + precisely (Bug#30326). + * doc/grep.in.1, doc/grep.texi: Mention that the behavior of + patterns like ‘.’ is not specified on encoding errors. + + doc: port better to mandoc + * doc/grep.in.1: Check for groff and its macro packages + independently, as groff can be used with non-groff macro packages. + Use an-ext style macros rather than www.tmac style, as this should + be more portable to mandoc. Problem reported by Laura Morales and + Ingo Schwarze (Bug#31228). + +2018-02-16 Jim Meyering + + maint: avoid new syntax-check failure + * cfg.mk (old_NEWS_hash): Update, to accommodate v3.1-20-g63d4174's + typo fix. + + doc: clarify that PCRE support is here to stay + * doc/grep.texi (grep Programs): Clarify: it's not PCRE support + that is experimental, but its combination with --null-data (-z). + +2018-02-05 Paul Eggert + + maint: fix typo + +2018-01-06 Jim Meyering + + maint: update gnulib and copyright dates for 2018 + * gnulib: Update to latest. + * all files: Run "make update-copyright". + * bootstrap: Update from gnulib. + +2017-12-17 Jim Meyering + + build: link with -lsigsegv, when c-stack module requires it + * src/Makefile.am (grep_LDADD): Add $(LIBCSTACK). + Otherwise, on at least Debian and Arch-based systems, linking would + fail with diagnostics like these: + c-stack.c:207: undefined reference to `stackoverflow_install_handler' + c-stack.c:216: undefined reference to `sigsegv_install_handler' + Reported by Jeremy Feusi. + + build: suppress sig-handler.h's -Wcast-function-type warning + * configure.ac (WERROR_CFLAGS): Add -Wno-cast-function-type + to suppress warning about sig-handler.h's sa_handler_t cast: + sig-handler.h: In function 'get_handler': + sig-handler.h:47:12: error: cast between incompatible function\ + types from 'void (* const)(int, siginfo_t *, void *)'\ + {aka 'void (* const)(int, struct *, void *)'}\ + to 'void (*)(int)' [-Werror=cast-function-type] + return (sa_handler_t) a->sa_sigaction; + +2017-12-16 Jim Meyering + + grep: diagnose stack overflow rather than segfaulting + * bootstrap.conf (gnulib_modules): Add c-stack. + * src/grep.c: Include "c-stack.h". + (main): Call c_stack_action (NULL); + * tests/stack-overflow: New file. + * tests/Makefile.am (TESTS): Add name of new file. + * NEWS (Improvements): Mention it. + Interestingly, this bug does not afflict grep-2.5.4 or prior, + so it appeared to have been introduced with grep-2.6. However, + the origin is in glibc's regexp compiler, and I tracked it to + stack-aware parsing that was removed from glibc's regexp in 2002. + However, grep-2.5.4 was released in 2009. That version worked + (and still works, now) because it included and (by default) used + an old copy of glibc's regexp code. + Jeremy Feusi reported the grep segfault in https://bugs.gnu.org/29666. + I reported the glibc regexp bug in + https://sourceware.org/bugzilla/show_bug.cgi?id=22620 + +2017-11-26 Stephan T. Lavavej + + grep: fix directory recursion on MS-Windows + gnulib recently gained a module, windows-stat-inodes, that fixes + directory recursion on MS-Windows. No changes to grep's C sources are + required; grep simply needs to request the module during configuration. + + When grep requests this module, its configure script will gain the + behavior that was implemented in windows-stat-inodes.m4. This detects + mingw and sets WINDOWS_STAT_INODES=1. All other platforms are + unaffected, setting WINDOWS_STAT_INODES=0 (which is what's happening + in the absence of this patch). + + * bootstrap.conf (gnulib_modules): Add windows-stat-inodes. + * NEWS (Bug fixes): Mention it. + Thanks to Pär Björklund who diagnosed the problem as involving inodes, + and thanks to Václav Haisman who provided the bootstrap.conf patch. + +2017-11-25 Paul Eggert + + grep: port better to Adélie GNU/Linux 64-bit ppc + Problem reported by A. Wilcox (Bug#29446). + * src/pcresearch.c (PCRE_EXTRA_MATCH_LIMIT_RECURSION) + (PCRE_STUDY_EXTRA_NEEDED): Default to 0. + (jit_exec): If we run up against the recursion limit, + double it (if possible) and try again. + (Pcompile): Also specify PCRE_STUDY_EXTRA_NEEDED so that + pc->extra is not null. + +2017-11-03 Paul Eggert + + grep: omit a dup 'const' + * src/grep.c (matchers): Omit duplicate 'const'. + +2017-10-13 Bernhard Voelker + + doc: document the option delimiter '--' + * doc/grep.texi (Other options): Do the above. + Reported in https://lists.opensuse.org/opensuse/2017-03/msg00411.html + This addresses http://bugs.gnu.org/26139 + +2017-08-21 Paul Eggert + + build: update gnulib submodule to latest + + Pacify GCC 5.4 + * src/grep.c (grepdesc): Rework to pacify GCC 5.4 warning + about logical not. + +2017-08-20 Paul Eggert + + build: update gnulib submodule to latest + +2017-08-17 Paul Eggert + + grep: -L exits with status 0 if a file is selected + Problem reported by Anthony Sottile (Bug#28105). + * NEWS, doc/grep.texi (Exit Status), src/grep.c (usage): Document this. + * src/grep.c (grepdesc): Implement it. + * tests/skip-read: Test it. + + build: update gnulib submodule to latest + +2017-08-13 Jim Meyering + + maint: avoid newly-introduced syntax-check failure + * src/grep.c (usage): Shorten --help line to 80, so + "make syntax-check" passes once again. + +2017-08-03 Paul Eggert + + doc: improve -o help + * src/grep.c (usage): Document that -o outputs only nonempty + matches (Bug#27931). + +2017-07-26 Paul Eggert + + tests: add Bug#27838 test case + * tests/backref-alt: New test case from a fuzzer. + +2017-07-25 Paul Eggert + + doc: distinguish -w from \<...\> + * doc/grep.texi (Matching Control): + Give example of why -w differs from \<...\> (Bug#27813). + +2017-07-11 Paul Eggert + + doc: define Dt string in man page + Problem reported by Bjarni I. Gislason via Santiago R.R. (Bug#27651). + * doc/grep.in.1 (dT): New macro. + (Dt): Define this string. + 2017-07-02 Jim Meyering + maint: post-release administrivia + * NEWS: Add header line for next release. + * .prev-version: Record previous version. + * cfg.mk (old_NEWS_hash): Auto-update. + version 3.1 * NEWS: Record release date. diff -Nru grep-3.1/ChangeLog-2009 grep-3.3/ChangeLog-2009 --- grep-3.1/ChangeLog-2009 2017-01-01 11:34:33.000000000 +0000 +++ grep-3.3/ChangeLog-2009 2018-04-21 23:35:48.000000000 +0000 @@ -347,7 +347,7 @@ (GNU Free Documentation License): @include fdl.texi instead. (@copying): update to v1.3 or later. * doc/fdl.texi: new file, copied from - http://www.gnu.org/licenses/fdl.texi. + https://www.gnu.org/licenses/fdl.texi. * doc/Makefile.am (grep_TEXINFOS): new variable to get fdl.texi. Also add usual GPL license statement. @@ -561,9 +561,9 @@ of execute() were not up to it. This set of changes aims to rectify that situation. Previously failing tests relative to left anchors (^ and \<) and -w should now pass. This fixes - , - , - , + , + , + , and possibly part of other, bigger, pending patches. The problem was also compounded by the POSIX requirement to support a pattern list instead of just an individual pattern (for -G and -E as well). @@ -661,7 +661,7 @@ src/grep.h, po/da.po, po/nb.po, po/no.po, po/sv.po: Replace all capitalized "Grep" by a lowercase "grep", except in citations. Reported by Benno Schulenberg - from the + from the entry in the Debian bug tracker. * doc/grep.1, doc/grep.texi: Explain that the "egrep" and "fgrep" commands are deprecated and provided for historical applications. @@ -3648,6 +3648,6 @@ * Version 2.0 released. -Copyright (C) 1998-2017 Free Software Foundation, Inc. +Copyright (C) 1998-2018 Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, are permitted provided the copyright notice and this notice are preserved. diff -Nru grep-3.1/config.hin grep-3.3/config.hin --- grep-3.1/config.hin 2017-07-02 20:12:55.000000000 +0000 +++ grep-3.3/config.hin 2018-12-21 03:59:32.000000000 +0000 @@ -65,6 +65,9 @@ language is requested. */ #undef ENABLE_NLS +/* Define to 1 if an invalid memory address access may yield a SIGBUS. */ +#undef FAULT_YIELDS_SIGBUS + /* Define this to 1 if F_DUPFD behavior does not match POSIX */ #undef FCNTL_DUPFD_BUGGY @@ -80,15 +83,18 @@ /* Define to 1 if nl_langinfo (YESEXPR) returns a non-empty string. */ #undef FUNC_NL_LANGINFO_YESEXPR_WORKS +/* Define if gettimeofday clobbers the localtime buffer. */ +#undef GETTIMEOFDAY_CLOBBERS_LOCALTIME + +/* Define this to 'void' or 'struct timezone' to match the system's + declaration of the second argument to gettimeofday. */ +#undef GETTIMEOFDAY_TIMEZONE + /* Define to a C preprocessor expression that evaluates to 1 or 0, depending whether the gnulib module close-stream shall be considered present. */ #undef GNULIB_CLOSE_STREAM /* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module dirent-safer shall be considered present. */ -#undef GNULIB_DIRENT_SAFER - -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending whether the gnulib module fcntl-safer shall be considered present. */ #undef GNULIB_FCNTL_SAFER @@ -155,6 +161,16 @@ whether the gnulib module strerror shall be considered present. */ #undef GNULIB_STRERROR +/* Define to a C preprocessor expression that evaluates to 1 or 0, depending + whether the gnulib module strerror_r-posix shall be considered present. */ +#undef GNULIB_STRERROR_R_POSIX + +/* Define to 1 when the gnulib module accept should be tested. */ +#undef GNULIB_TEST_ACCEPT + +/* Define to 1 when the gnulib module bind should be tested. */ +#undef GNULIB_TEST_BIND + /* Define to 1 when the gnulib module btowc should be tested. */ #undef GNULIB_TEST_BTOWC @@ -170,6 +186,9 @@ /* Define to 1 when the gnulib module closedir should be tested. */ #undef GNULIB_TEST_CLOSEDIR +/* Define to 1 when the gnulib module connect should be tested. */ +#undef GNULIB_TEST_CONNECT + /* Define to 1 when the gnulib module dirfd should be tested. */ #undef GNULIB_TEST_DIRFD @@ -194,12 +213,18 @@ /* Define to 1 when the gnulib module fdopendir should be tested. */ #undef GNULIB_TEST_FDOPENDIR +/* Define to 1 when the gnulib module fnmatch should be tested. */ +#undef GNULIB_TEST_FNMATCH + /* Define to 1 when the gnulib module fstat should be tested. */ #undef GNULIB_TEST_FSTAT /* Define to 1 when the gnulib module fstatat should be tested. */ #undef GNULIB_TEST_FSTATAT +/* Define to 1 when the gnulib module ftruncate should be tested. */ +#undef GNULIB_TEST_FTRUNCATE + /* Define to 1 when the gnulib module getcwd should be tested. */ #undef GNULIB_TEST_GETCWD @@ -209,6 +234,12 @@ /* Define to 1 when the gnulib module getpagesize should be tested. */ #undef GNULIB_TEST_GETPAGESIZE +/* Define to 1 when the gnulib module gettimeofday should be tested. */ +#undef GNULIB_TEST_GETTIMEOFDAY + +/* Define to 1 when the gnulib module ioctl should be tested. */ +#undef GNULIB_TEST_IOCTL + /* Define to 1 when the gnulib module isatty should be tested. */ #undef GNULIB_TEST_ISATTY @@ -218,9 +249,15 @@ /* Define to 1 when the gnulib module iswctype should be tested. */ #undef GNULIB_TEST_ISWCTYPE +/* Define to 1 when the gnulib module listen should be tested. */ +#undef GNULIB_TEST_LISTEN + /* Define to 1 when the gnulib module localeconv should be tested. */ #undef GNULIB_TEST_LOCALECONV +/* Define to 1 when the gnulib module localename should be tested. */ +#undef GNULIB_TEST_LOCALENAME + /* Define to 1 when the gnulib module lseek should be tested. */ #undef GNULIB_TEST_LSEEK @@ -263,6 +300,9 @@ /* Define to 1 when the gnulib module memrchr should be tested. */ #undef GNULIB_TEST_MEMRCHR +/* Define to 1 when the gnulib module nanosleep should be tested. */ +#undef GNULIB_TEST_NANOSLEEP + /* Define to 1 when the gnulib module nl_langinfo should be tested. */ #undef GNULIB_TEST_NL_LANGINFO @@ -275,12 +315,18 @@ /* Define to 1 when the gnulib module opendir should be tested. */ #undef GNULIB_TEST_OPENDIR +/* Define to 1 when the gnulib module perror should be tested. */ +#undef GNULIB_TEST_PERROR + /* Define to 1 when the gnulib module pipe should be tested. */ #undef GNULIB_TEST_PIPE /* Define to 1 when the gnulib module putenv should be tested. */ #undef GNULIB_TEST_PUTENV +/* Define to 1 when the gnulib module raise should be tested. */ +#undef GNULIB_TEST_RAISE + /* Define to 1 when the gnulib module read should be tested. */ #undef GNULIB_TEST_READ @@ -290,15 +336,33 @@ /* Define to 1 when the gnulib module realloc-posix should be tested. */ #undef GNULIB_TEST_REALLOC_POSIX +/* Define to 1 when the gnulib module select should be tested. */ +#undef GNULIB_TEST_SELECT + /* Define to 1 when the gnulib module setenv should be tested. */ #undef GNULIB_TEST_SETENV /* Define to 1 when the gnulib module setlocale should be tested. */ #undef GNULIB_TEST_SETLOCALE +/* Define to 1 when the gnulib module setsockopt should be tested. */ +#undef GNULIB_TEST_SETSOCKOPT + +/* Define to 1 when the gnulib module sigaction should be tested. */ +#undef GNULIB_TEST_SIGACTION + +/* Define to 1 when the gnulib module sigprocmask should be tested. */ +#undef GNULIB_TEST_SIGPROCMASK + +/* Define to 1 when the gnulib module sleep should be tested. */ +#undef GNULIB_TEST_SLEEP + /* Define to 1 when the gnulib module snprintf should be tested. */ #undef GNULIB_TEST_SNPRINTF +/* Define to 1 when the gnulib module socket should be tested. */ +#undef GNULIB_TEST_SOCKET + /* Define to 1 when the gnulib module stat should be tested. */ #undef GNULIB_TEST_STAT @@ -311,6 +375,9 @@ /* Define to 1 when the gnulib module strerror should be tested. */ #undef GNULIB_TEST_STRERROR +/* Define to 1 when the gnulib module strerror_r should be tested. */ +#undef GNULIB_TEST_STRERROR_R + /* Define to 1 when the gnulib module strnlen should be tested. */ #undef GNULIB_TEST_STRNLEN @@ -359,20 +426,36 @@ /* Define to 1 if works. */ #undef HAVE_ALLOCA_H +/* Define to 1 if you have the header file. */ +#undef HAVE_ARPA_INET_H + /* 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 nanosleep mishandles large arguments. */ +#undef HAVE_BUG_BIG_NANOSLEEP + +/* Define to 1 if you have the `catgets' function. */ +#undef HAVE_CATGETS + /* Define to 1 if you have the Mac OS X function CFLocaleCopyCurrent in the CoreFoundation framework. */ #undef HAVE_CFLOCALECOPYCURRENT +/* Define to 1 if you have the Mac OS X function + CFLocaleCopyPreferredLanguages in the CoreFoundation framework. */ +#undef HAVE_CFLOCALECOPYPREFERREDLANGUAGES + /* Define to 1 if you have the Mac OS X function CFPreferencesCopyAppValue in the CoreFoundation framework. */ #undef HAVE_CFPREFERENCESCOPYAPPVALUE +/* Define to 1 if you have the `chsize' function. */ +#undef HAVE_CHSIZE + /* Define to 1 if you have the `closedir' function. */ #undef HAVE_CLOSEDIR @@ -447,6 +530,10 @@ don't. */ #undef HAVE_DECL_GETDTABLESIZE +/* Define to 1 if you have the declaration of `inet_pton', and to 0 if you + don't. */ +#undef HAVE_DECL_INET_PTON + /* Define to 1 if you have the declaration of `isblank', and to 0 if you don't. */ #undef HAVE_DECL_ISBLANK @@ -495,6 +582,14 @@ */ #undef HAVE_DECL_SETENV +/* Define to 1 if you have the declaration of `sigaltstack', and to 0 if you + don't. */ +#undef HAVE_DECL_SIGALTSTACK + +/* Define to 1 if you have the declaration of `sleep', and to 0 if you don't. + */ +#undef HAVE_DECL_SLEEP + /* Define to 1 if you have the declaration of `snprintf', and to 0 if you don't. */ #undef HAVE_DECL_SNPRINTF @@ -573,31 +668,50 @@ /* Define to 1 if you have the 'dup2' function. */ #undef HAVE_DUP2 +/* Define to 1 if you have the `duplocale' function. */ +#undef HAVE_DUPLOCALE + /* Define if you have the declaration of environ. */ #undef HAVE_ENVIRON_DECL -/* Define to 1 if you have the 'fchdir' function. */ +/* Define if the locale_t type contains insufficient information, as on + OpenBSD. */ +#undef HAVE_FAKE_LOCALES + +/* 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 'fdopendir' function. */ +/* Define to 1 if you have the `fdopendir' function. */ #undef HAVE_FDOPENDIR /* Define to 1 if you have the header file. */ #undef HAVE_FEATURES_H -/* Define to 1 if you have the 'fstatat' function. */ +/* Define to 1 if you have the `fnmatch' function. */ +#undef HAVE_FNMATCH + +/* Define to 1 if you have the header file. */ +#undef HAVE_FNMATCH_H + +/* Define to 1 if you have the `freelocale' function. */ +#undef HAVE_FREELOCALE + +/* Define to 1 if you have the `fstatat' function. */ #undef HAVE_FSTATAT -/* Define to 1 if you have the 'fstatfs' function. */ +/* Define to 1 if you have the `fstatfs' function. */ #undef HAVE_FSTATFS -/* Define to 1 if you have the 'getdtablesize' function. */ +/* Define to 1 if you have the `ftruncate' function. */ +#undef HAVE_FTRUNCATE + +/* Define to 1 if you have the `getdtablesize' function. */ #undef HAVE_GETDTABLESIZE -/* Define to 1 if you have the 'getexecname' function. */ +/* Define to 1 if you have the `getexecname' function. */ #undef HAVE_GETEXECNAME /* Define to 1 if you have the `getlocalename_l' function. */ @@ -609,21 +723,24 @@ /* Define to 1 if you have the `getopt_long_only' function. */ #undef HAVE_GETOPT_LONG_ONLY -/* Define to 1 if you have the `getpagesize' function. */ -#undef HAVE_GETPAGESIZE - -/* Define to 1 if you have the 'getprogname' function. */ +/* Define to 1 if you have the `getprogname' function. */ #undef HAVE_GETPROGNAME /* Define if the GNU gettext() function is already present or preinstalled. */ #undef HAVE_GETTEXT +/* Define to 1 if you have the `gettimeofday' function. */ +#undef HAVE_GETTIMEOFDAY + /* Define if you have the iconv() function and it works. */ #undef HAVE_ICONV /* Define to 1 if you have the header file. */ #undef HAVE_ICONV_H +/* Define to 1 if you have the `inet_pton' function. */ +#undef HAVE_INET_PTON + /* Define to 1 if the compiler supports one of the keywords 'inline', '__inline__', '__inline' and effectively inlines functions marked as such. */ @@ -639,19 +756,28 @@ declares uintmax_t. */ #undef HAVE_INTTYPES_H_WITH_UINTMAX -/* Define to 1 if you have the 'isascii' function. */ +/* Define to 1 if you have the `ioctl' function. */ +#undef HAVE_IOCTL + +/* Define to 1 if defines AF_INET. */ +#undef HAVE_IPV4 + +/* Define to 1 if defines AF_INET6. */ +#undef HAVE_IPV6 + +/* Define to 1 if you have the `isascii' function. */ #undef HAVE_ISASCII -/* 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 'iswblank' function. */ +/* Define to 1 if you have the `iswblank' function. */ #undef HAVE_ISWBLANK -/* 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 if you have and nl_langinfo(CODESET). */ @@ -670,13 +796,16 @@ (-lpcre). */ #undef HAVE_LIBPCRE +/* Define if you have the libsigsegv library. */ +#undef HAVE_LIBSIGSEGV + /* Define to 1 if you have the header file. */ #undef HAVE_LIMITS_H /* 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 @@ -693,19 +822,19 @@ config.h and . */ #undef HAVE_MAP_ANONYMOUS -/* Define to 1 if you have the 'mbrlen' function. */ +/* Define to 1 if you have the `mbrlen' function. */ #undef HAVE_MBRLEN /* 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 'mbslen' function. */ +/* Define to 1 if you have the `mbslen' function. */ #undef HAVE_MBSLEN -/* 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. */ @@ -723,26 +852,36 @@ /* Define to 1 if defines the MIN and MAX macros. */ #undef HAVE_MINMAX_IN_SYS_PARAM_H -/* 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" concept. */ #undef HAVE_MSVC_INVALID_PARAMETER_HANDLER +/* Define if the locale_t type does not contain the name of each locale + category. */ +#undef HAVE_NAMELESS_LOCALES + /* Define to 1 if you have the header file, and it defines `DIR'. */ #undef HAVE_NDIR_H -/* Define to 1 if you have the 'newlocale' function. */ +/* Define to 1 if you have the header file. */ +#undef HAVE_NETDB_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_NETINET_IN_H + +/* Define to 1 if you have the `newlocale' function. */ #undef HAVE_NEWLOCALE -/* 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. */ @@ -751,7 +890,7 @@ /* Define to 1 if you have the header file. */ #undef HAVE_OS_H -/* Define to 1 if you have the 'pipe' function. */ +/* Define to 1 if you have the `pipe' function. */ #undef HAVE_PIPE /* Define if the defines PTHREAD_MUTEX_RECURSIVE. */ @@ -764,567 +903,8 @@ reader. */ #undef HAVE_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER -/* Define to 1 if alphasort is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_ALPHASORT - -/* Define to 1 if atoll is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_ATOLL - -/* Define to 1 if btowc is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_BTOWC - -/* Define to 1 if canonicalize_file_name is declared even after undefining - macros. */ -#undef HAVE_RAW_DECL_CANONICALIZE_FILE_NAME - -/* Define to 1 if chdir is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_CHDIR - -/* Define to 1 if chown is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_CHOWN - -/* Define to 1 if closedir is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_CLOSEDIR - -/* Define to 1 if dirfd is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_DIRFD - -/* Define to 1 if dprintf is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_DPRINTF - -/* Define to 1 if dup is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_DUP - -/* Define to 1 if dup2 is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_DUP2 - -/* Define to 1 if dup3 is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_DUP3 - -/* Define to 1 if duplocale is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_DUPLOCALE - -/* Define to 1 if endusershell is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_ENDUSERSHELL - -/* Define to 1 if environ is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_ENVIRON - -/* Define to 1 if euidaccess is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_EUIDACCESS - -/* Define to 1 if faccessat is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_FACCESSAT - -/* Define to 1 if fchdir is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_FCHDIR - -/* Define to 1 if fchmodat is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_FCHMODAT - -/* Define to 1 if fchownat is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_FCHOWNAT - -/* Define to 1 if fcntl is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_FCNTL - -/* Define to 1 if fdatasync is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_FDATASYNC - -/* Define to 1 if fdopendir is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_FDOPENDIR - -/* Define to 1 if ffsl is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_FFSL - -/* Define to 1 if ffsll is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_FFSLL - -/* Define to 1 if fpurge is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_FPURGE - -/* Define to 1 if fseeko is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_FSEEKO - -/* Define to 1 if fstat is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_FSTAT - -/* Define to 1 if fstatat is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_FSTATAT - -/* Define to 1 if fsync is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_FSYNC - -/* Define to 1 if ftello is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_FTELLO - -/* Define to 1 if ftruncate is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_FTRUNCATE - -/* Define to 1 if futimens is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_FUTIMENS - -/* Define to 1 if getcwd is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_GETCWD - -/* Define to 1 if getdelim is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_GETDELIM - -/* Define to 1 if getdomainname is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_GETDOMAINNAME - -/* Define to 1 if getdtablesize is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_GETDTABLESIZE - -/* Define to 1 if getgroups is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_GETGROUPS - -/* Define to 1 if gethostname is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_GETHOSTNAME - -/* Define to 1 if getline is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_GETLINE - -/* Define to 1 if getloadavg is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_GETLOADAVG - -/* Define to 1 if getlogin is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_GETLOGIN - -/* Define to 1 if getlogin_r is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_GETLOGIN_R - -/* Define to 1 if getpagesize is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_GETPAGESIZE - -/* Define to 1 if gets is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_GETS - -/* Define to 1 if getsubopt is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_GETSUBOPT - -/* Define to 1 if getusershell is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_GETUSERSHELL - -/* Define to 1 if grantpt is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_GRANTPT - -/* Define to 1 if group_member is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_GROUP_MEMBER - -/* Define to 1 if imaxabs is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_IMAXABS - -/* Define to 1 if imaxdiv is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_IMAXDIV - -/* Define to 1 if initstate is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_INITSTATE - -/* Define to 1 if initstate_r is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_INITSTATE_R - -/* Define to 1 if isatty is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_ISATTY - -/* Define to 1 if isblank is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_ISBLANK - -/* Define to 1 if iswctype is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_ISWCTYPE - -/* Define to 1 if lchmod is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_LCHMOD - -/* Define to 1 if lchown is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_LCHOWN - -/* Define to 1 if link is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_LINK - -/* Define to 1 if linkat is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_LINKAT - -/* Define to 1 if lseek is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_LSEEK - -/* Define to 1 if lstat is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_LSTAT - -/* Define to 1 if mbrlen is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_MBRLEN - -/* Define to 1 if mbrtowc is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_MBRTOWC - -/* Define to 1 if mbsinit is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_MBSINIT - -/* Define to 1 if mbsnrtowcs is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_MBSNRTOWCS - -/* Define to 1 if mbsrtowcs is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_MBSRTOWCS - -/* Define to 1 if memmem is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_MEMMEM - -/* Define to 1 if mempcpy is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_MEMPCPY - -/* Define to 1 if memrchr is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_MEMRCHR - -/* Define to 1 if mkdirat is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_MKDIRAT - -/* Define to 1 if mkdtemp is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_MKDTEMP - -/* Define to 1 if mkfifo is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_MKFIFO - -/* Define to 1 if mkfifoat is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_MKFIFOAT - -/* Define to 1 if mknod is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_MKNOD - -/* Define to 1 if mknodat is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_MKNODAT - -/* Define to 1 if mkostemp is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_MKOSTEMP - -/* Define to 1 if mkostemps is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_MKOSTEMPS - -/* Define to 1 if mkstemp is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_MKSTEMP - -/* Define to 1 if mkstemps is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_MKSTEMPS - -/* Define to 1 if nl_langinfo is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_NL_LANGINFO - -/* Define to 1 if openat is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_OPENAT - -/* Define to 1 if opendir is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_OPENDIR - -/* Define to 1 if pclose is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_PCLOSE - -/* Define to 1 if pipe is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_PIPE - -/* Define to 1 if pipe2 is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_PIPE2 - -/* Define to 1 if popen is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_POPEN - -/* Define to 1 if posix_openpt is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_POSIX_OPENPT - -/* Define to 1 if pread is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_PREAD - -/* Define to 1 if ptsname is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_PTSNAME - -/* Define to 1 if ptsname_r is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_PTSNAME_R - -/* 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 - -/* Define to 1 if random_r is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_RANDOM_R - -/* Define to 1 if rawmemchr is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_RAWMEMCHR - -/* Define to 1 if readdir is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_READDIR - -/* Define to 1 if readlink is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_READLINK - -/* Define to 1 if readlinkat is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_READLINKAT - -/* Define to 1 if realpath is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_REALPATH - -/* Define to 1 if renameat is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_RENAMEAT - -/* Define to 1 if rewinddir is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_REWINDDIR - -/* Define to 1 if rmdir is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_RMDIR - -/* Define to 1 if rpmatch is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_RPMATCH - -/* Define to 1 if scandir is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_SCANDIR - -/* Define to 1 if secure_getenv is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_SECURE_GETENV - -/* Define to 1 if setenv is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_SETENV - -/* Define to 1 if sethostname is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_SETHOSTNAME - -/* Define to 1 if setlocale is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_SETLOCALE - -/* Define to 1 if setstate is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_SETSTATE - -/* Define to 1 if setstate_r is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_SETSTATE_R - -/* Define to 1 if setusershell is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_SETUSERSHELL - -/* Define to 1 if sleep is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_SLEEP - -/* Define to 1 if snprintf is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_SNPRINTF - -/* Define to 1 if srandom is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_SRANDOM - -/* Define to 1 if srandom_r is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_SRANDOM_R - -/* Define to 1 if stat is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_STAT - -/* Define to 1 if stpcpy is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_STPCPY - -/* Define to 1 if stpncpy is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_STPNCPY - -/* Define to 1 if strcasestr is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_STRCASESTR - -/* Define to 1 if strchrnul is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_STRCHRNUL - -/* Define to 1 if strdup is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_STRDUP - -/* Define to 1 if strerror_r is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_STRERROR_R - -/* Define to 1 if strncat is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_STRNCAT - -/* Define to 1 if strndup is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_STRNDUP - -/* Define to 1 if strnlen is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_STRNLEN - -/* Define to 1 if strpbrk is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_STRPBRK - -/* Define to 1 if strsep is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_STRSEP - -/* Define to 1 if strsignal is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_STRSIGNAL - -/* Define to 1 if strtod is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_STRTOD - -/* Define to 1 if strtoimax is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_STRTOIMAX - -/* Define to 1 if strtok_r is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_STRTOK_R - -/* Define to 1 if strtoll is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_STRTOLL - -/* Define to 1 if strtoull is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_STRTOULL - -/* Define to 1 if strtoumax is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_STRTOUMAX - -/* Define to 1 if strverscmp is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_STRVERSCMP - -/* Define to 1 if symlink is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_SYMLINK - -/* Define to 1 if symlinkat is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_SYMLINKAT - -/* Define to 1 if tmpfile is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_TMPFILE - -/* 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 - -/* Define to 1 if unlink is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_UNLINK - -/* Define to 1 if unlinkat is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_UNLINKAT - -/* Define to 1 if unlockpt is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_UNLOCKPT - -/* Define to 1 if unsetenv is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_UNSETENV - -/* Define to 1 if usleep is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_USLEEP - -/* Define to 1 if utimensat is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_UTIMENSAT - -/* Define to 1 if vdprintf is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_VDPRINTF - -/* Define to 1 if vsnprintf is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_VSNPRINTF - -/* Define to 1 if wcpcpy is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_WCPCPY - -/* Define to 1 if wcpncpy is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_WCPNCPY - -/* Define to 1 if wcrtomb is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_WCRTOMB - -/* Define to 1 if wcscasecmp is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_WCSCASECMP - -/* Define to 1 if wcscat is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_WCSCAT - -/* Define to 1 if wcschr is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_WCSCHR - -/* Define to 1 if wcscmp is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_WCSCMP - -/* Define to 1 if wcscoll is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_WCSCOLL - -/* Define to 1 if wcscpy is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_WCSCPY - -/* Define to 1 if wcscspn is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_WCSCSPN - -/* 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 - -/* Define to 1 if wcsncasecmp is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_WCSNCASECMP - -/* Define to 1 if wcsncat is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_WCSNCAT - -/* Define to 1 if wcsncmp is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_WCSNCMP - -/* Define to 1 if wcsncpy is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_WCSNCPY - -/* Define to 1 if wcsnlen is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_WCSNLEN - -/* Define to 1 if wcsnrtombs is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_WCSNRTOMBS - -/* Define to 1 if wcspbrk is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_WCSPBRK - -/* Define to 1 if wcsrchr is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_WCSRCHR - -/* Define to 1 if wcsrtombs is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_WCSRTOMBS - -/* Define to 1 if wcsspn is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_WCSSPN - -/* Define to 1 if wcsstr is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_WCSSTR - -/* Define to 1 if wcstok is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_WCSTOK - -/* Define to 1 if wcswidth is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_WCSWIDTH - -/* Define to 1 if wcsxfrm is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_WCSXFRM - -/* Define to 1 if wctob is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_WCTOB - -/* Define to 1 if wctrans is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_WCTRANS - -/* Define to 1 if wctype is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_WCTYPE - -/* Define to 1 if wcwidth is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_WCWIDTH - -/* Define to 1 if wmemchr is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_WMEMCHR - -/* Define to 1 if wmemcmp is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_WMEMCMP - -/* Define to 1 if wmemcpy is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_WMEMCPY - -/* Define to 1 if wmemmove is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_WMEMMOVE - -/* Define to 1 if wmemset is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_WMEMSET - -/* Define to 1 if _Exit is declared even after undefining macros. */ -#undef HAVE_RAW_DECL__EXIT +/* Define to 1 if you have the `raise' function. */ +#undef HAVE_RAISE /* Define to 1 if you have the `readdir' function. */ #undef HAVE_READDIR @@ -1336,18 +916,39 @@ /* Define if the 'realloc' function is POSIX compliant. */ #undef HAVE_REALLOC_POSIX +/* Define to 1 if the system has the type `sa_family_t'. */ +#undef HAVE_SA_FAMILY_T + /* Define to 1 if you have the header file. */ #undef HAVE_SEARCH_H /* Define to 1 if you have the `setdtablesize' function. */ #undef HAVE_SETDTABLESIZE -/* 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 'setlocale' function. */ +/* Define to 1 if you have the `setlocale' function. */ #undef HAVE_SETLOCALE +/* Define to 1 if you have the `setrlimit' function. */ +#undef HAVE_SETRLIMIT + +/* Define to 1 if you have the `shutdown' function. */ +#undef HAVE_SHUTDOWN + +/* Define to 1 if you have the `sigaction' function. */ +#undef HAVE_SIGACTION + +/* Define to 1 if you have the `sigaltstack' function. */ +#undef HAVE_SIGALTSTACK + +/* Define to 1 if the system has the type `siginfo_t'. */ +#undef HAVE_SIGINFO_T + +/* Define to 1 if you have the `siginterrupt' function. */ +#undef HAVE_SIGINTERRUPT + /* Define to 1 if 'sig_atomic_t' is a signed integer type. */ #undef HAVE_SIGNED_SIG_ATOMIC_T @@ -1357,6 +958,12 @@ /* Define to 1 if 'wint_t' is a signed integer type. */ #undef HAVE_SIGNED_WINT_T +/* Define to 1 if the system has the type `sigset_t'. */ +#undef HAVE_SIGSET_T + +/* Define to 1 if you have the `sleep' function. */ +#undef HAVE_SLEEP + /* Define to 1 if you have the `snprintf' function. */ #undef HAVE_SNPRINTF @@ -1365,6 +972,16 @@ buffer had been large enough. */ #undef HAVE_SNPRINTF_RETVAL_C99 +/* Define if the locale_t type is as on Solaris 11.4. */ +#undef HAVE_SOLARIS114_LOCALES + +/* Define to 1 if extending the stack slightly past the limit causes a SIGSEGV + which can be handled on an alternate stack established with sigaltstack. */ +#undef HAVE_STACK_OVERFLOW_HANDLING + +/* Define to 1 if the system has the type `stack_t'. */ +#undef HAVE_STACK_T + /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H @@ -1381,10 +998,10 @@ /* Define to 1 if you have the `stpcpy' function. */ #undef HAVE_STPCPY -/* Define to 1 if you have the 'strdup' function. */ +/* Define to 1 if you have the `strdup' function. */ #undef HAVE_STRDUP -/* Define to 1 if you have the 'strerror_r' function. */ +/* Define to 1 if you have the `strerror_r' function. */ #undef HAVE_STRERROR_R /* Define to 1 if you have the header file. */ @@ -1397,7 +1014,7 @@ /* Define to 1 if you have the `strnlen' function. */ #undef HAVE_STRNLEN -/* Define to 1 if you have the 'strtoimax' function. */ +/* Define to 1 if you have the `strtoimax' function. */ #undef HAVE_STRTOIMAX /* Define to 1 if you have the `strtoll' function. */ @@ -1406,7 +1023,7 @@ /* Define to 1 if you have the `strtoull' function. */ #undef HAVE_STRTOULL -/* Define to 1 if you have the 'strtoumax' function. */ +/* Define to 1 if you have the `strtoumax' function. */ #undef HAVE_STRTOUMAX /* Define if there is a member named d_type in the struct describing directory @@ -1416,10 +1033,40 @@ /* Define to 1 if `decimal_point' is a member of `struct lconv'. */ #undef HAVE_STRUCT_LCONV_DECIMAL_POINT +/* Define to 1 if `sa_sigaction' is a member of `struct sigaction'. */ +#undef HAVE_STRUCT_SIGACTION_SA_SIGACTION + +/* Define to 1 if the system has the type `struct sockaddr_storage'. */ +#undef HAVE_STRUCT_SOCKADDR_STORAGE + +/* Define to 1 if `ss_family' is a member of `struct sockaddr_storage'. */ +#undef HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY + /* Define to 1 if `f_type' is a member of `struct statfs'. */ #undef HAVE_STRUCT_STATFS_F_TYPE -/* Define to 1 if you have the 'symlink' function. */ +/* Define to 1 if `st_atimensec' is a member of `struct stat'. */ +#undef HAVE_STRUCT_STAT_ST_ATIMENSEC + +/* Define to 1 if `st_atimespec.tv_nsec' is a member of `struct stat'. */ +#undef HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC + +/* Define to 1 if `st_atim.st__tim.tv_nsec' is a member of `struct stat'. */ +#undef HAVE_STRUCT_STAT_ST_ATIM_ST__TIM_TV_NSEC + +/* Define to 1 if `st_atim.tv_nsec' is a member of `struct stat'. */ +#undef HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC + +/* Define to 1 if `st_birthtimensec' is a member of `struct stat'. */ +#undef HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC + +/* Define to 1 if `st_birthtimespec.tv_nsec' is a member of `struct stat'. */ +#undef HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC + +/* Define to 1 if `st_birthtim.tv_nsec' is a member of `struct stat'. */ +#undef HAVE_STRUCT_STAT_ST_BIRTHTIM_TV_NSEC + +/* Define to 1 if you have the `symlink' function. */ #undef HAVE_SYMLINK /* Define to 1 if you have the header file. */ @@ -1435,6 +1082,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_SYS_INTTYPES_H +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_IOCTL_H + /* Define to 1 if you have the header file. */ #undef HAVE_SYS_MMAN_H @@ -1445,6 +1095,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_SYS_PARAM_H +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_SELECT_H + /* Define to 1 if you have the header file. */ #undef HAVE_SYS_SOCKET_H @@ -1457,15 +1110,24 @@ /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_UIO_H + /* Define to 1 if you have the header file. */ #undef HAVE_SYS_VFS_H +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_WAIT_H + /* Define to 1 if you have the `towlower' function. */ #undef HAVE_TOWLOWER /* Define to 1 if you have the `tsearch' function. */ #undef HAVE_TSEARCH +/* Define to 1 if you have the header file. */ +#undef HAVE_UCONTEXT_H + /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H @@ -1481,7 +1143,7 @@ /* Define if you have a global __progname variable */ #undef HAVE_VAR___PROGNAME -/* Define to 1 if you have the 'vasnprintf' function. */ +/* Define to 1 if you have the `vasnprintf' function. */ #undef HAVE_VASNPRINTF /* Define to 1 if you have the header file. */ @@ -1499,13 +1161,13 @@ /* Define to 1 if you have the `wcsnlen' function. */ #undef HAVE_WCSNLEN -/* Define to 1 if you have the 'wctob' function. */ +/* Define to 1 if you have the `wctob' function. */ #undef HAVE_WCTOB /* Define to 1 if you have the header file. */ #undef HAVE_WCTYPE_H -/* Define to 1 if you have the 'wcwidth' function. */ +/* Define to 1 if you have the `wcwidth' function. */ #undef HAVE_WCWIDTH /* Define to 1 if you have the header file. */ @@ -1514,13 +1176,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 fstatat (..., 0) works. For example, it does not work in AIX @@ -1533,13 +1195,27 @@ /* Define to 1 if O_NOFOLLOW works. */ #undef HAVE_WORKING_O_NOFOLLOW +/* Define if the uselocale function exists any may safely be called. */ +#undef HAVE_WORKING_USELOCALE + +/* Define to 1 if you have the header file. */ +#undef HAVE_WS2TCPIP_H + /* Define to 1 if you have the header file. */ #undef HAVE_XLOCALE_H +/* Define to 1 if extending the stack slightly past the limit causes a + SIGSEGV, and an alternate stack can be established with sigaltstack, and + the signal handler is passed a context that specifies the run time stack. + This behavior is defined by POSIX 1003.1-2001 with the X/Open System + Interface (XSI) option and is a standardized way to implement a SEGV-based + stack overflow detection heuristic. */ +#undef HAVE_XSI_STACK_OVERFLOW_HEURISTIC + /* Define to 1 if the system has the type `_Bool'. */ #undef HAVE__BOOL -/* 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, @@ -1552,6 +1228,15 @@ #endif +/* Define to 1 if the system has the type `__fsword_t'. */ +#undef HAVE___FSWORD_T + +/* Define to 1 if the compiler supports the keyword '__inline'. */ +#undef HAVE___INLINE + +/* Define to 1 if you have the `__xpg_strerror_r' function. */ +#undef HAVE___XPG_STRERROR_R + /* Define as const if the declaration of iconv() needs const. */ #undef ICONV_CONST @@ -1667,6 +1352,11 @@ /* Define if vasnprintf exists but is overridden by gnulib. */ #undef REPLACE_VASNPRINTF +/* Define if sigaltstack() interprets the stack_t.ss_sp field incorrectly, as + the highest address of the alternate stack range rather than as the lowest + address. */ +#undef SIGALTSTACK_SS_REVERSED + /* Define to l, ll, u, ul, ull, etc., as suitable for constants of type 'sig_atomic_t'. */ #undef SIG_ATOMIC_T_SUFFIX @@ -1699,6 +1389,10 @@ /* Define to 1 if strerror_r returns char *. */ #undef STRERROR_R_CHAR_P +/* Define to 1 if the type of the st_atim member of a struct stat is struct + timespec. */ +#undef TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC + /* Define if the POSIX multithreading library can be used. */ #undef USE_POSIX_THREADS @@ -1732,6 +1426,14 @@ #ifndef _GNU_SOURCE # undef _GNU_SOURCE #endif +/* Enable NetBSD extensions on NetBSD. */ +#ifndef _NETBSD_SOURCE +# undef _NETBSD_SOURCE +#endif +/* Enable OpenBSD extensions on NetBSD. */ +#ifndef _OPENBSD_SOURCE +# undef _OPENBSD_SOURCE +#endif /* Enable threading extensions on Solaris. */ #ifndef _POSIX_PTHREAD_SEMANTICS # undef _POSIX_PTHREAD_SEMANTICS @@ -1774,6 +1476,11 @@ #ifndef _XOPEN_SOURCE # undef _XOPEN_SOURCE #endif +/* Enable X/Open compliant socket functions that do not require linking + with -lxnet on HP-UX 11.11. */ +#ifndef _HPUX_ALT_XOPEN_SOCKET_API +# undef _HPUX_ALT_XOPEN_SOCKET_API +#endif /* Enable general extensions on Solaris. */ #ifndef __EXTENSIONS__ # undef __EXTENSIONS__ @@ -1798,6 +1505,9 @@ 'wchar_t'. */ #undef WCHAR_T_SUFFIX +/* Define if WSAStartup is needed. */ +#undef WINDOWS_SOCKETS + /* Define to l, ll, u, ul, ull, etc., as suitable for constants of type 'wint_t'. */ #undef WINT_T_SUFFIX @@ -1833,12 +1543,15 @@ #undef _NETBSD_SOURCE /* The _Noreturn keyword of C11. */ -#if ! (defined _Noreturn \ - || (defined __STDC_VERSION__ && 201112 <= __STDC_VERSION__)) -# if (3 <= __GNUC__ || (__GNUC__ == 2 && 8 <= __GNUC_MINOR__) \ - || 0x5110 <= __SUNPRO_C) +#ifndef _Noreturn +# if 201103 <= (defined __cplusplus ? __cplusplus : 0) +# define _Noreturn [[noreturn]] +# elif (201112 <= (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) \ + || 4 < __GNUC__ + (7 <= __GNUC_MINOR__)) + /* _Noreturn works as-is. */ +# elif 2 < __GNUC__ + (8 <= __GNUC_MINOR__) || 0x5110 <= __SUNPRO_C # define _Noreturn __attribute__ ((__noreturn__)) -# elif defined _MSC_VER && 1200 <= _MSC_VER +# elif 1200 <= (defined _MSC_VER ? _MSC_VER : 0) # define _Noreturn __declspec (noreturn) # else # define _Noreturn @@ -1850,6 +1563,10 @@ this defined. */ #undef _POSIX_1_SOURCE +/* Define to 1 in order to get the POSIX compatible declarations of socket + functions. */ +#undef _POSIX_PII_SOCKET + /* Define to 1 if you need to in order for 'stat' and other things to work. */ #undef _POSIX_SOURCE @@ -1879,7 +1596,7 @@ /* Please see the Gnulib manual for how to use these macros. Suppress extern inline with HP-UX cc, as it appears to be broken; see - . + . Suppress extern inline with Sun C in standards-conformance mode, as it mishandles inline functions that call each other. E.g., for 'inline void f @@ -1893,20 +1610,32 @@ if isdigit is mistakenly implemented via a static inline function, a program containing an extern inline function that calls isdigit may not work since the C standard prohibits extern inline functions - from calling static functions. This bug is known to occur on: + from calling static functions (ISO C 99 section 6.7.4.(3). + This bug is known to occur on: OS X 10.8 and earlier; see: - http://lists.gnu.org/archive/html/bug-gnulib/2012-12/msg00023.html + https://lists.gnu.org/r/bug-gnulib/2012-12/msg00023.html DragonFly; see http://muscles.dragonflybsd.org/bulk/bleeding-edge-potential/latest-per-pkg/ah-tty-0.3.12.log FreeBSD; see: - http://lists.gnu.org/archive/html/bug-gnulib/2014-07/msg00104.html + https://lists.gnu.org/r/bug-gnulib/2014-07/msg00104.html OS X 10.9 has a macro __header_inline indicating the bug is fixed for C and - for clang but remains for g++; see . - Assume DragonFly and FreeBSD will be similar. */ + for clang but remains for g++; see . + Assume DragonFly and FreeBSD will be similar. + + 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 __APPLE__ && defined __MACH__) \ || defined __DragonFly__ || defined __FreeBSD__) \ && (defined __header_inline \ @@ -1968,8 +1697,8 @@ # define _GL_INLINE_HEADER_END #endif -/* Define to a replacement function name for fnmatch(). */ -#undef fnmatch +/* Define to `int' if doesn't define. */ +#undef gid_t /* A replacement for va_copy, if needed. */ #define gl_va_copy(a,b) ((a) = (b)) @@ -2077,9 +1806,15 @@ /* Define to `unsigned int' if does not define. */ #undef size_t +/* type to use in place of socklen_t if not defined */ +#undef socklen_t + /* Define as a signed type of the same size as size_t. */ #undef ssize_t +/* Define to `int' if doesn't define. */ +#undef uid_t + /* 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. */ @@ -2116,6 +1851,13 @@ # define _GL_ATTRIBUTE_CONST /* empty */ #endif +/* The __malloc__ attribute was added in gcc 3. */ +#if 3 <= __GNUC__ +# define _GL_ATTRIBUTE_MALLOC __attribute__ ((__malloc__)) +#else +# define _GL_ATTRIBUTE_MALLOC /* empty */ +#endif + /* Define as a macro for copying va_list variables. */ #undef va_copy diff -Nru grep-3.1/configure grep-3.3/configure --- grep-3.1/configure 2017-07-02 20:21:11.000000000 +0000 +++ grep-3.3/configure 2018-12-21 04:38:57.000000000 +0000 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69.185-b502e for GNU grep 3.1. +# Generated by GNU Autoconf 2.69.197-b8fd7 for GNU grep 3.3. # # Report bugs to . # @@ -565,10 +565,10 @@ # Identity of this package. PACKAGE_NAME='GNU grep' PACKAGE_TARNAME='grep' -PACKAGE_VERSION='3.1' -PACKAGE_STRING='GNU grep 3.1' +PACKAGE_VERSION='3.3' +PACKAGE_STRING='GNU grep 3.3' PACKAGE_BUGREPORT='bug-grep@gnu.org' -PACKAGE_URL='http://www.gnu.org/software/grep/' +PACKAGE_URL='https://www.gnu.org/software/grep/' ac_unique_file="src/grep.c" # Factoring default headers for most tests. @@ -598,8 +598,7 @@ ac_header_c_list= gl_use_threads_default= -gl_func_list= -gl_header_list= +ac_func_c_list= gl_fnmatch_required=POSIX gl_getopt_required=POSIX gt_needs= @@ -638,7 +637,38 @@ LIBGREPUTILS_LTLIBDEPS LIBGREPUTILS_LIBDEPS abs_aux_dir +HAVE_SYS_UIO_H +NEXT_AS_FIRST_DIRECTIVE_SYS_UIO_H +NEXT_SYS_UIO_H +NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H +NEXT_SYS_IOCTL_H +HAVE_SYS_IOCTL_H +GL_GENERATE_NETINET_IN_H_FALSE +GL_GENERATE_NETINET_IN_H_TRUE +NETINET_IN_H +HAVE_NETINET_IN_H +NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H +NEXT_NETINET_IN_H +LIB_NANOSLEEP +LIB_SELECT +LIBSOCKET +HAVE_SYS_SELECT_H +NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H +NEXT_SYS_SELECT_H +REPLACE_SELECT +REPLACE_PSELECT +HAVE_PSELECT +GNULIB_SELECT +GNULIB_PSELECT INTL_MACOSX_LIBS +INET_PTON_LIB +NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H +NEXT_SYS_TIME_H +REPLACE_STRUCT_TIMEVAL +REPLACE_GETTIMEOFDAY +HAVE_SYS_TIME_H +HAVE_STRUCT_TIMEVAL +HAVE_GETTIMEOFDAY REPLACE_ITOLD GL_GENERATE_FLOAT_H_FALSE GL_GENERATE_FLOAT_H_TRUE @@ -646,6 +676,38 @@ NEXT_AS_FIRST_DIRECTIVE_FLOAT_H NEXT_FLOAT_H LOCALE_TR_UTF8 +NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H +NEXT_ARPA_INET_H +HAVE_ARPA_INET_H +REPLACE_INET_PTON +REPLACE_INET_NTOP +HAVE_DECL_INET_PTON +HAVE_DECL_INET_NTOP +GNULIB_INET_PTON +GNULIB_INET_NTOP +HAVE_WS2TCPIP_H +HAVE_SYS_SOCKET_H +NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H +NEXT_SYS_SOCKET_H +HAVE_ACCEPT4 +HAVE_SA_FAMILY_T +HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY +HAVE_STRUCT_SOCKADDR_STORAGE +GNULIB_ACCEPT4 +GNULIB_SHUTDOWN +GNULIB_SETSOCKOPT +GNULIB_SENDTO +GNULIB_RECVFROM +GNULIB_SEND +GNULIB_RECV +GNULIB_LISTEN +GNULIB_GETSOCKOPT +GNULIB_GETSOCKNAME +GNULIB_GETPEERNAME +GNULIB_BIND +GNULIB_ACCEPT +GNULIB_CONNECT +GNULIB_SOCKET gltests_WITNESS HAVE_FEATURES_H NEXT_AS_FIRST_DIRECTIVE_WCHAR_H @@ -813,19 +875,38 @@ GL_GENERATE_STDALIGN_H_FALSE GL_GENERATE_STDALIGN_H_TRUE STDALIGN_H +NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H +NEXT_SIGNAL_H +GLIBC21 +REPLACE_RAISE +REPLACE_PTHREAD_SIGMASK +HAVE_SIGHANDLER_T +HAVE_TYPE_VOLATILE_SIG_ATOMIC_T +HAVE_STRUCT_SIGACTION_SA_SIGACTION +HAVE_SIGACTION +HAVE_SIGINFO_T +HAVE_SIGSET_T +HAVE_RAISE +HAVE_PTHREAD_SIGMASK +HAVE_POSIX_SIGNALBLOCKING +GNULIB_SIGACTION +GNULIB_SIGPROCMASK +GNULIB_SIGNAL_H_SIGPIPE +GNULIB_RAISE +GNULIB_PTHREAD_SIGMASK PERL UNDEFINE_STRTOK_R -REPLACE_STRTOK_R REPLACE_STRSIGNAL -REPLACE_STRNLEN -REPLACE_STRNDUP -REPLACE_STRNCAT REPLACE_STRERROR_R REPLACE_STRERROR -REPLACE_STRCHRNUL +REPLACE_STRTOK_R REPLACE_STRCASESTR REPLACE_STRSTR +REPLACE_STRNLEN +REPLACE_STRNDUP +REPLACE_STRNCAT REPLACE_STRDUP +REPLACE_STRCHRNUL REPLACE_STPNCPY REPLACE_MEMMEM REPLACE_MEMCHR @@ -849,6 +930,7 @@ HAVE_MEMCHR HAVE_FFSLL HAVE_FFSL +HAVE_EXPLICIT_BZERO HAVE_MBSLEN GNULIB_STRVERSCMP GNULIB_STRSIGNAL @@ -887,6 +969,7 @@ GNULIB_MEMCHR GNULIB_FFSLL GNULIB_FFSL +GNULIB_EXPLICIT_BZERO LOCALE_FR_UTF8 LOCALE_ZH_CN LOCALE_JA @@ -913,11 +996,13 @@ HAVE_STRTOULL HAVE_STRTOLL HAVE_STRTOD +HAVE_DECL_SETSTATE HAVE_DECL_SETENV HAVE_SETENV HAVE_SECURE_GETENV HAVE_RPMATCH HAVE_REALPATH +HAVE_REALLOCARRAY HAVE_RANDOM_R HAVE_RANDOM_H HAVE_RANDOM @@ -930,6 +1015,7 @@ HAVE_MKOSTEMPS HAVE_MKOSTEMP HAVE_MKDTEMP +HAVE_DECL_INITSTATE HAVE_GRANTPT HAVE_GETSUBOPT HAVE_DECL_GETLOADAVG @@ -948,6 +1034,7 @@ GNULIB_RPMATCH GNULIB_REALPATH GNULIB_REALLOC_POSIX +GNULIB_REALLOCARRAY GNULIB_RANDOM_R GNULIB_RANDOM GNULIB_QSORT_R @@ -993,17 +1080,22 @@ HAVE_MAX_ALIGN_T REPLACE_NULL REPLACE_STRUCT_LCONV +REPLACE_FREELOCALE REPLACE_DUPLOCALE +REPLACE_NEWLOCALE REPLACE_SETLOCALE REPLACE_LOCALECONV +HAVE_FREELOCALE HAVE_DUPLOCALE +HAVE_NEWLOCALE +GNULIB_LOCALENAME GNULIB_DUPLOCALE GNULIB_SETLOCALE GNULIB_LOCALECONV LOCALCHARSET_TESTS_ENVIRONMENT -GLIBC21 HAVE_LANGINFO_YESEXPR HAVE_LANGINFO_ERA +HAVE_LANGINFO_ALTMON HAVE_LANGINFO_T_FMT_AMPM HAVE_LANGINFO_CODESET HAVE_LANGINFO_H @@ -1039,6 +1131,7 @@ INT32_MAX_LT_INTMAX_MAX REPLACE_STRTOUMAX REPLACE_STRTOIMAX +HAVE_IMAXDIV_T HAVE_DECL_STRTOUMAX HAVE_DECL_STRTOIMAX HAVE_DECL_IMAXDIV @@ -1143,6 +1236,12 @@ GL_GENERATE_FNMATCH_H_FALSE GL_GENERATE_FNMATCH_H_TRUE FNMATCH_H +HAVE_FNMATCH_H +NEXT_AS_FIRST_DIRECTIVE_FNMATCH_H +NEXT_FNMATCH_H +REPLACE_FNMATCH +HAVE_FNMATCH +GNULIB_FNMATCH NEXT_AS_FIRST_DIRECTIVE_FCNTL_H NEXT_FCNTL_H REPLACE_OPENAT @@ -1200,6 +1299,10 @@ GNULIB_READDIR GNULIB_OPENDIR HAVE_WINSOCK2_H +REPLACE_IOCTL +SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS +SYS_IOCTL_H_HAVE_WINSOCK2_H +GNULIB_IOCTL HAVE_MSVC_INVALID_PARAMETER_HANDLER UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS UNISTD_H_HAVE_WINSOCK2_H @@ -1223,6 +1326,7 @@ REPLACE_LINK REPLACE_LCHOWN REPLACE_ISATTY +REPLACE_GETPASS REPLACE_GETPAGESIZE REPLACE_GETGROUPS REPLACE_GETLOGIN_R @@ -1231,6 +1335,7 @@ REPLACE_GETCWD REPLACE_FTRUNCATE REPLACE_FCHOWNAT +REPLACE_FACCESSAT REPLACE_DUP2 REPLACE_DUP REPLACE_CLOSE @@ -1238,6 +1343,7 @@ HAVE_SYS_PARAM_H HAVE_OS_H HAVE_DECL_TTYNAME_R +HAVE_DECL_TRUNCATE HAVE_DECL_SETHOSTNAME HAVE_DECL_GETUSERSHELL HAVE_DECL_GETPAGESIZE @@ -1249,7 +1355,6 @@ HAVE_DECL_ENVIRON HAVE_USLEEP HAVE_UNLINKAT -HAVE_TRUNCATE HAVE_SYMLINKAT HAVE_SYMLINK HAVE_SLEEP @@ -1264,6 +1369,7 @@ HAVE_LINK HAVE_LCHOWN HAVE_GROUP_MEMBER +HAVE_GETPASS HAVE_GETPAGESIZE HAVE_GETLOGIN HAVE_GETHOSTNAME @@ -1306,6 +1412,7 @@ GNULIB_ISATTY GNULIB_GROUP_MEMBER GNULIB_GETUSERSHELL +GNULIB_GETPASS GNULIB_GETPAGESIZE GNULIB_GETLOGIN_R GNULIB_GETLOGIN @@ -1328,6 +1435,12 @@ GNULIB_CLOSE GNULIB_CHOWN GNULIB_CHDIR +LTLIBCSTACK +LIBCSTACK +LIBSIGSEGV_PREFIX +LTLIBSIGSEGV +LIBSIGSEGV +HAVE_LIBSIGSEGV LOCALE_FR REPLACE_WCSFTIME REPLACE_WCSWIDTH @@ -1469,8 +1582,10 @@ am__untar am__tar AMTAR +am__leading_dot SET_MAKE AWK +mkdir_p MKDIR_P INSTALL_STRIP_PROGRAM STRIP @@ -1487,7 +1602,6 @@ INSTALL_DATA INSTALL_SCRIPT INSTALL_PROGRAM -mkdir_p target_alias host_alias build_alias @@ -1538,6 +1652,7 @@ enable_assert with_gnu_ld enable_rpath +with_libsigsegv_prefix with_libiconv_prefix with_libpth_prefix with_included_regex @@ -2113,7 +2228,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures GNU grep 3.1 to adapt to many kinds of systems. +\`configure' configures GNU grep 3.3 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -2184,7 +2299,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of GNU grep 3.1:";; + short | recursive ) echo "Configuration of GNU grep 3.3:";; esac cat <<\_ACEOF @@ -2212,6 +2327,8 @@ --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-gnu-ld assume the C compiler uses GNU ld [default=no] + --with-libsigsegv-prefix[=DIR] search for libsigsegv in DIR/include and DIR/lib + --without-libsigsegv-prefix don't search for libsigsegv in includedir and libdir --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib --without-libiconv-prefix don't search for libiconv in includedir and libdir --with-libpth-prefix[=DIR] search for libpth in DIR/include and DIR/lib @@ -2248,8 +2365,8 @@ it to find libraries and programs with nonstandard names/locations. Report bugs to . -GNU grep home page: . -General help using GNU software: . +GNU grep home page: . +General help using GNU software: . _ACEOF ac_status=$? fi @@ -2312,8 +2429,8 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -GNU grep configure 3.1 -generated by GNU Autoconf 2.69.185-b502e +GNU grep configure 3.3 +generated by GNU Autoconf 2.69.197-b8fd7 Copyright (C) 2017 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation @@ -2688,11 +2805,11 @@ eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_c_werror_flag=$ac_save_werror_flag fi eval ac_res=\$$3 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 printf "%s\n" "$ac_res" >&6; } - ac_c_werror_flag=$ac_save_werror_flag eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_decl @@ -2945,14 +3062,34 @@ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_member +ac_configure_args_raw= +for ac_arg +do + case $ac_arg in + *\'*) + ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + as_fn_append ac_configure_args_raw " '$ac_arg'" +done + +case $ac_configure_args_raw in + *$as_nl*) + ac_safe_unquote= ;; + *) + ac_unsafe_z='|&;<>()$`\\"*?[ '' ' # This string ends in space, tab. + ac_unsafe_a="$ac_unsafe_z#~" + ac_safe_unquote="s/ '\\([^$ac_unsafe_a][^$ac_unsafe_z]*\\)'/ \\1/g" + ac_configure_args_raw=` printf "%s\n" "$ac_configure_args_raw" | sed "$ac_safe_unquote"`;; +esac + cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by GNU grep $as_me 3.1, which was -generated by GNU Autoconf 2.69.185-b502e. Invocation command line was +It was created by GNU grep $as_me 3.3, which was +generated by GNU Autoconf 2.69.197-b8fd7. Invocation command line was - $ $0 $@ + $ $0$ac_configure_args_raw _ACEOF exec 5>>config.log @@ -3229,71 +3366,90 @@ as_fn_append ac_header_c_list " inttypes.h inttypes_h HAVE_INTTYPES_H" as_fn_append ac_header_c_list " stdint.h stdint_h HAVE_STDINT_H" as_fn_append ac_header_c_list " unistd.h unistd_h HAVE_UNISTD_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 fdopendir" -gl_func_list="$gl_func_list strerror_r" -gl_func_list="$gl_func_list fcntl" -gl_func_list="$gl_func_list symlink" -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 stdio_ext.h" -gl_header_list="$gl_header_list sys/stat.h" -gl_func_list="$gl_func_list fstatat" -gl_func_list="$gl_func_list openat" -gl_func_list="$gl_func_list fstatfs" -gl_header_list="$gl_header_list sys/vfs.h" -gl_func_list="$gl_func_list getdtablesize" +as_fn_append ac_func_c_list " btowc HAVE_BTOWC" +as_fn_append ac_func_c_list " setrlimit HAVE_SETRLIMIT" +as_fn_append ac_header_c_list " ucontext.h ucontext_h HAVE_UCONTEXT_H" +as_fn_append ac_func_c_list " sigaltstack HAVE_SIGALTSTACK" +as_fn_append ac_header_c_list " sys/param.h sys_param_h HAVE_SYS_PARAM_H" +as_fn_append ac_func_c_list " _set_invalid_parameter_handler HAVE__SET_INVALID_PARAMETER_HANDLER" +as_fn_append ac_header_c_list " sys/socket.h sys_socket_h HAVE_SYS_SOCKET_H" +as_fn_append ac_func_c_list " fchdir HAVE_FCHDIR" +as_fn_append ac_header_c_list " dirent.h dirent_h HAVE_DIRENT_H" +as_fn_append ac_func_c_list " strerror_r HAVE_STRERROR_R" +as_fn_append ac_func_c_list " fcntl HAVE_FCNTL" +as_fn_append ac_func_c_list " symlink HAVE_SYMLINK" +as_fn_append ac_func_c_list " fdopendir HAVE_FDOPENDIR" +as_fn_append ac_func_c_list " mempcpy HAVE_MEMPCPY" +as_fn_append ac_header_c_list " fnmatch.h fnmatch_h HAVE_FNMATCH_H" +as_fn_append ac_func_c_list " fnmatch HAVE_FNMATCH" +as_fn_append ac_func_c_list " isblank HAVE_ISBLANK" +as_fn_append ac_func_c_list " iswctype HAVE_ISWCTYPE" +as_fn_append ac_func_c_list " mbsrtowcs HAVE_MBSRTOWCS" +as_fn_append ac_func_c_list " wmemchr HAVE_WMEMCHR" +as_fn_append ac_func_c_list " wmemcpy HAVE_WMEMCPY" +as_fn_append ac_func_c_list " wmempcpy HAVE_WMEMPCPY" +as_fn_append ac_header_c_list " wctype.h wctype_h HAVE_WCTYPE_H" +as_fn_append ac_header_c_list " stdio_ext.h stdio_ext_h HAVE_STDIO_EXT_H" +as_fn_append ac_func_c_list " fstatat HAVE_FSTATAT" +as_fn_append ac_func_c_list " openat HAVE_OPENAT" +as_fn_append ac_func_c_list " fstatfs HAVE_FSTATFS" +as_fn_append ac_header_c_list " sys/vfs.h sys_vfs_h HAVE_SYS_VFS_H" +as_fn_append ac_func_c_list " getdtablesize HAVE_GETDTABLESIZE" gl_getopt_required=GNU -gl_header_list="$gl_header_list getopt.h" -gl_header_list="$gl_header_list sys/cdefs.h" -gl_func_list="$gl_func_list getprogname" -gl_func_list="$gl_func_list getexecname" -gl_header_list="$gl_header_list iconv.h" -gl_header_list="$gl_header_list limits.h" -gl_header_list="$gl_header_list wchar.h" -gl_header_list="$gl_header_list stdint.h" -gl_header_list="$gl_header_list inttypes.h" -gl_func_list="$gl_func_list iswcntrl" -gl_header_list="$gl_header_list crtdefs.h" -gl_func_list="$gl_func_list iswblank" -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_func_list="$gl_func_list mbrlen" -gl_func_list="$gl_func_list mbslen" -gl_header_list="$gl_header_list sys/mman.h" -gl_func_list="$gl_func_list mprotect" -gl_func_list="$gl_func_list nl_langinfo" -gl_header_list="$gl_header_list malloc.h" -gl_func_list="$gl_func_list strdup" -gl_func_list="$gl_func_list strtoimax" -gl_func_list="$gl_func_list strtoumax" -gl_header_list="$gl_header_list sys/time.h" -gl_func_list="$gl_func_list pipe" -gl_header_list="$gl_header_list features.h" -gl_func_list="$gl_func_list wcrtomb" -gl_func_list="$gl_func_list wctob" -gl_func_list="$gl_func_list wcwidth" -gl_func_list="$gl_func_list newlocale" -gl_func_list="$gl_func_list setenv" -gl_func_list="$gl_func_list snprintf" -gl_func_list="$gl_func_list vasnprintf" -gl_func_list="$gl_func_list isascii" -gl_func_list="$gl_func_list setlocale" +as_fn_append ac_header_c_list " getopt.h getopt_h HAVE_GETOPT_H" +as_fn_append ac_header_c_list " sys/cdefs.h sys_cdefs_h HAVE_SYS_CDEFS_H" +as_fn_append ac_func_c_list " getprogname HAVE_GETPROGNAME" +as_fn_append ac_func_c_list " getexecname HAVE_GETEXECNAME" +as_fn_append ac_header_c_list " iconv.h iconv_h HAVE_ICONV_H" +as_fn_append ac_header_c_list " limits.h limits_h HAVE_LIMITS_H" +as_fn_append ac_header_c_list " wchar.h wchar_h HAVE_WCHAR_H" +as_fn_append ac_func_c_list " iswcntrl HAVE_ISWCNTRL" +as_fn_append ac_header_c_list " crtdefs.h crtdefs_h HAVE_CRTDEFS_H" +as_fn_append ac_func_c_list " iswblank HAVE_ISWBLANK" +as_fn_append ac_header_c_list " langinfo.h langinfo_h HAVE_LANGINFO_H" +as_fn_append ac_header_c_list " xlocale.h xlocale_h HAVE_XLOCALE_H" +as_fn_append ac_func_c_list " lstat HAVE_LSTAT" +as_fn_append ac_func_c_list " mbsinit HAVE_MBSINIT" +as_fn_append ac_func_c_list " mbrtowc HAVE_MBRTOWC" +as_fn_append ac_func_c_list " mbrlen HAVE_MBRLEN" +as_fn_append ac_func_c_list " mbslen HAVE_MBSLEN" +as_fn_append ac_header_c_list " sys/mman.h sys_mman_h HAVE_SYS_MMAN_H" +as_fn_append ac_func_c_list " mprotect HAVE_MPROTECT" +as_fn_append ac_func_c_list " nl_langinfo HAVE_NL_LANGINFO" +as_fn_append ac_header_c_list " malloc.h malloc_h HAVE_MALLOC_H" +as_fn_append ac_func_c_list " sigaction HAVE_SIGACTION" +as_fn_append ac_func_c_list " siginterrupt HAVE_SIGINTERRUPT" +as_fn_append ac_header_c_list " sys/time.h sys_time_h HAVE_SYS_TIME_H" +as_fn_append ac_func_c_list " strdup HAVE_STRDUP" +as_fn_append ac_func_c_list " __xpg_strerror_r HAVE___XPG_STRERROR_R" +as_fn_append ac_func_c_list " strtoimax HAVE_STRTOIMAX" +as_fn_append ac_func_c_list " strtoumax HAVE_STRTOUMAX" +as_fn_append ac_func_c_list " pipe HAVE_PIPE" +as_fn_append ac_header_c_list " features.h features_h HAVE_FEATURES_H" +as_fn_append ac_func_c_list " wcrtomb HAVE_WCRTOMB" +as_fn_append ac_func_c_list " wctob HAVE_WCTOB" +as_fn_append ac_func_c_list " wcwidth HAVE_WCWIDTH" +as_fn_append ac_header_c_list " arpa/inet.h arpa_inet_h HAVE_ARPA_INET_H" +as_fn_append ac_func_c_list " ftruncate HAVE_FTRUNCATE" +as_fn_append ac_func_c_list " gettimeofday HAVE_GETTIMEOFDAY" +as_fn_append ac_header_c_list " netdb.h netdb_h HAVE_NETDB_H" +as_fn_append ac_header_c_list " netinet/in.h netinet_in_h HAVE_NETINET_IN_H" +as_fn_append ac_func_c_list " newlocale HAVE_NEWLOCALE" +as_fn_append ac_func_c_list " uselocale HAVE_USELOCALE" +as_fn_append ac_func_c_list " duplocale HAVE_DUPLOCALE" +as_fn_append ac_func_c_list " freelocale HAVE_FREELOCALE" +as_fn_append ac_header_c_list " sys/select.h sys_select_h HAVE_SYS_SELECT_H" +as_fn_append ac_header_c_list " sys/wait.h sys_wait_h HAVE_SYS_WAIT_H" +as_fn_append ac_func_c_list " setenv HAVE_SETENV" +as_fn_append ac_func_c_list " sleep HAVE_SLEEP" +as_fn_append ac_func_c_list " snprintf HAVE_SNPRINTF" +as_fn_append ac_func_c_list " catgets HAVE_CATGETS" +as_fn_append ac_header_c_list " sys/ioctl.h sys_ioctl_h HAVE_SYS_IOCTL_H" +as_fn_append ac_func_c_list " shutdown HAVE_SHUTDOWN" +as_fn_append ac_header_c_list " sys/uio.h sys_uio_h HAVE_SYS_UIO_H" +as_fn_append ac_func_c_list " vasnprintf HAVE_VASNPRINTF" +as_fn_append ac_func_c_list " isascii HAVE_ISASCII" +as_fn_append ac_func_c_list " setlocale HAVE_SETLOCALE" gt_needs="$gt_needs " # Check that the precious variables saved in the cache have kept the same # value. @@ -3440,7 +3596,7 @@ -am__api_version='1.99a' +am__api_version='1.16' # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or @@ -3498,7 +3654,7 @@ echo one > conftest.one echo two > conftest.two mkdir conftest.dir - if "$as_dir$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && + if "$as_dir$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir/" && test -s conftest.one && test -s conftest.two && test -s conftest.dir/conftest.one && test -s conftest.dir/conftest.two @@ -3882,6 +4038,15 @@ SET_MAKE="MAKE=${MAKE-make}" fi +rm -rf .tst 2>/dev/null +mkdir .tst 2>/dev/null +if test -d .tst; then + am__leading_dot=. +else + am__leading_dot=_ +fi +rmdir .tst 2>/dev/null + # Check whether --enable-silent-rules was given. if test ${enable_silent_rules+y} then : @@ -3923,7 +4088,6 @@ fi AM_BACKSLASH='\' -mkdir_p='$(MKDIR_P)' if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." @@ -3946,7 +4110,7 @@ # Define the identity of the package. PACKAGE='grep' - VERSION='3.1' + VERSION='3.3' printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h @@ -3970,6 +4134,12 @@ MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} +# For better backward compatibility. To be removed once Automake 1.9.x +# dies out for good. For more background, see: +# +# +mkdir_p='$(MKDIR_P)' + # We need awk for the "check" target (and possibly the TAP driver). The # system "awk" is bad on some platforms. # Always define AMTAR for backward compatibility. Yes, it's still used @@ -4018,7 +4188,7 @@ Aborting the configuration process, to ensure you take notice of the issue. You can download and install GNU coreutils to get an 'rm' implementation -that behaves properly: . +that behaves properly: . If you want to complete the configuration process using your problematic 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM @@ -5561,7 +5731,7 @@ 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 -DEPDIR=.deps +DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" @@ -5846,6 +6016,10 @@ printf "%s\n" "#define _GNU_SOURCE 1" >>confdefs.h + printf "%s\n" "#define _NETBSD_SOURCE 1" >>confdefs.h + + printf "%s\n" "#define _OPENBSD_SOURCE 1" >>confdefs.h + printf "%s\n" "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h printf "%s\n" "#define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1" >>confdefs.h @@ -5915,6 +6089,8 @@ test $ac_cv_should_define__xopen_source = yes && printf "%s\n" "#define _XOPEN_SOURCE 500" >>confdefs.h + printf "%s\n" "#define _HPUX_ALT_XOPEN_SOCKET_API 1" >>confdefs.h + @@ -6469,7 +6645,7 @@ alpha*) # On Alpha systems, a compiler option provides the behaviour. # See the ieee(3) manual page, also available at - # + # if test -n "$GCC"; then # GCC has the option -mieee. # For full IEEE compliance (rarely needed), use option -mieee-with-inexact. @@ -6754,6 +6930,8 @@ # Code from module absolute-header: + # Code from module accept: + # Code from module accept-tests: # Code from module alignof: # Code from module alignof-tests: # Code from module alloca: @@ -6762,11 +6940,15 @@ # Code from module announce-gen: # Code from module argmatch: # Code from module argmatch-tests: + # Code from module arpa_inet: + # Code from module arpa_inet-tests: # Code from module assert: # Code from module assure: # Code from module at-internal: # Code from module binary-io: # Code from module binary-io-tests: + # Code from module bind: + # Code from module bind-tests: # Code from module bitrotate: # Code from module bitrotate-tests: # Code from module btowc: @@ -6774,6 +6956,8 @@ # Code from module builtin-expect: # Code from module c-ctype: # Code from module c-ctype-tests: + # Code from module c-stack: + # Code from module c-stack-tests: # Code from module c-strcase: # Code from module c-strcase-tests: # Code from module c-strcaseeq: @@ -6789,6 +6973,8 @@ # Code from module closedir: # Code from module closeout: # Code from module configmake: + # Code from module connect: + # Code from module connect-tests: # Code from module ctype: # Code from module ctype-tests: # Code from module cycle-check: @@ -6798,8 +6984,6 @@ # Code from module dfa: # Code from module dfa-tests: # Code from module dirent: - # Code from module dirent-safer: - # Code from module dirent-safer-tests: # Code from module dirent-tests: # Code from module dirfd: # Code from module dirname-lgpl: @@ -6842,6 +7026,8 @@ # Code from module float: # Code from module float-tests: # Code from module fnmatch: + # Code from module fnmatch-h: + # Code from module fnmatch-h-tests: # Code from module fnmatch-tests: # Code from module fpending: # Code from module fpending-tests: @@ -6854,6 +7040,8 @@ # Code from module fstat-tests: # Code from module fstatat: # Code from module fstatat-tests: + # Code from module ftruncate: + # Code from module ftruncate-tests: # Code from module fts: # Code from module fwrite-tests: # Code from module gendocs: @@ -6869,6 +7057,8 @@ # Code from module getprogname: # Code from module getprogname-tests: # Code from module gettext-h: + # Code from module gettimeofday: + # Code from module gettimeofday-tests: # Code from module git-version-gen: # Code from module gitlog-to-changelog: # Code from module gnu-web-doc-update: @@ -6890,6 +7080,8 @@ # Code from module ignore-value: # Code from module ignore-value-tests: # Code from module include_next: + # Code from module inet_pton: + # Code from module inet_pton-tests: # Code from module inline: # Code from module intprops: # Code from module intprops-tests: @@ -6898,6 +7090,8 @@ # Code from module inttypes: # Code from module inttypes-incomplete: # Code from module inttypes-tests: + # Code from module ioctl: + # Code from module ioctl-tests: # Code from module isatty: # Code from module isatty-tests: # Code from module isblank: @@ -6909,15 +7103,21 @@ # Code from module langinfo-tests: # Code from module largefile: + # Code from module libc-config: + # Code from module libsigsegv: # Code from module limits-h: # Code from module limits-h-tests: + # Code from module listen: + # Code from module listen-tests: # Code from module localcharset: + # Code from module localcharset-tests: # Code from module locale: # Code from module locale-tests: # Code from module localeconv: # Code from module localeconv-tests: # Code from module localename: # Code from module localename-tests: + # Code from module localtime-buffer: # Code from module lock: # Code from module lseek: # Code from module lseek-tests: @@ -6956,6 +7156,10 @@ # Code from module msvc-inval: # Code from module msvc-nothrow: # Code from module multiarch: + # Code from module nanosleep: + # Code from module nanosleep-tests: + # Code from module netinet_in: + # Code from module netinet_in-tests: # Code from module nl_langinfo: # Code from module nl_langinfo-tests: # Code from module nocrash: @@ -6969,9 +7173,12 @@ # Code from module openat-safer-tests: # Code from module openat-tests: # Code from module opendir: + # Code from module opendirat: # Code from module pathmax: # Code from module pathmax-tests: # Code from module perl: + # Code from module perror: + # Code from module perror-tests: # Code from module pipe-posix: # Code from module pipe-posix-tests: # Code from module propername: @@ -6980,6 +7187,8 @@ # Code from module quotearg: # Code from module quotearg-simple: # Code from module quotearg-simple-tests: + # Code from module raise: + # Code from module raise-tests: # Code from module read: # Code from module read-tests: # Code from module readdir: @@ -6992,11 +7201,23 @@ # Code from module safe-read: # Code from module same-inode: # Code from module save-cwd: + # Code from module select: + # Code from module select-tests: # Code from module setenv: # Code from module setenv-tests: # Code from module setlocale: # Code from module setlocale-tests: + # Code from module setsockopt: + # Code from module setsockopt-tests: + # Code from module sigaction: + # Code from module sigaction-tests: + # Code from module signal-h: + # Code from module signal-h-tests: + # Code from module sigprocmask: + # Code from module sigprocmask-tests: # Code from module size_max: + # Code from module sleep: + # Code from module sleep-tests: # Code from module snippet/_Noreturn: # Code from module snippet/arg-nonnull: # Code from module snippet/c++defs: @@ -7004,9 +7225,16 @@ # Code from module snippet/warn-on-use: # Code from module snprintf: # Code from module snprintf-tests: + # Code from module socket: + # Code from module socketlib: + # Code from module sockets: + # Code from module sockets-tests: + # Code from module socklen: # Code from module ssize_t: # Code from module stat: # Code from module stat-tests: + # Code from module stat-time: + # Code from module stat-time-tests: # Code from module std-gnu11: # Code from module stdalign: # Code from module stdalign-tests: @@ -7030,6 +7258,8 @@ # Code from module strerror: # Code from module strerror-override: # Code from module strerror-tests: + # Code from module strerror_r-posix: + # Code from module strerror_r-posix-tests: # Code from module striconv: # Code from module striconv-tests: # Code from module string: @@ -7050,10 +7280,20 @@ # Code from module strtoumax-tests: # Code from module symlink: # Code from module symlink-tests: + # Code from module sys_ioctl: + # Code from module sys_ioctl-tests: + # Code from module sys_select: + # Code from module sys_select-tests: + # Code from module sys_socket: + # Code from module sys_socket-tests: # Code from module sys_stat: # Code from module sys_stat-tests: + # Code from module sys_time: + # Code from module sys_time-tests: # Code from module sys_types: # Code from module sys_types-tests: + # Code from module sys_uio: + # Code from module sys_uio-tests: # Code from module test-framework-sh: # Code from module test-framework-sh-tests: # Code from module threadlib: @@ -7101,6 +7341,8 @@ # Code from module wctype-h-tests: # Code from module wcwidth: # Code from module wcwidth-tests: + # Code from module windows-stat-inodes: + # Code from module windows-stat-override: # Code from module xalloc: # Code from module xalloc-die: # Code from module xalloc-die-tests: @@ -7769,7 +8011,8 @@ _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 + if echo '#include "conftest.c"' >conftest1.c && + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 @@ -7790,7 +8033,8 @@ _ACEOF ac_compile=`echo "$save_ac_compile" | sed s/conftest/conftest2/` - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + if echo '#include "conftest.c"' >conftest2.c && + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 @@ -7803,7 +8047,7 @@ fi fi ac_compile="$save_ac_compile" - rm -f conftest1.$ac_objext conftest2.$ac_objext conftest$ac_exeext + rm -f conftest12.c conftest12.$ac_objext conftest$ac_exeext fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_wchar_h_correct_inline" >&5 @@ -7814,34 +8058,26 @@ C99 mode. You have four options: - Add the flag -fgnu89-inline to CC and reconfigure, or - Fix your include files, using parts of - , or + , or - Use a gcc version older than 4.3, or - Don't use the flags -std=c99 or -std=gnu99. Configuration aborted." "$LINENO" 5 fi - - - - - for ac_func in $gl_func_list -do : - as_ac_var=`printf "%s\n" "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -if eval test \"x\$"$as_ac_var"\" = x"yes" -then : - cat >>confdefs.h <<_ACEOF -#define `printf "%s\n" "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - -fi - +ac_func= +for ac_item in $ac_func_c_list +do + if test $ac_func; then + ac_fn_c_check_func "$LINENO" $ac_func ac_cv_func_$ac_func + if eval test \"x\$ac_cv_func_$ac_func\" = xyes; then + echo "#define $ac_item 1" >> confdefs.h + fi + ac_func= + else + ac_func=$ac_item + fi done - - - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5 printf %s "checking for nl_langinfo and CODESET... " >&6; } if test ${am_cv_langinfo_codeset+y} @@ -7900,8 +8136,14 @@ struct tm t; char buf[16]; int main () { + /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl + imitates locale dependent behaviour by looking at the environment + variables, and all locales use the UTF-8 encoding. */ +#if defined __BEOS__ || defined __HAIKU__ + return 1; +#else /* Check whether the given locale name is recognized by the system. */ -#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ +# if defined _WIN32 && !defined __CYGWIN__ /* On native Windows, setlocale(category, "") looks at the system settings, not at the environment variables. Also, when an encoding suffix such as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE @@ -7909,9 +8151,9 @@ if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0) return 1; -#else +# else if (setlocale (LC_ALL, "") == NULL) return 1; -#endif +# endif /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) is empty, and the behaviour of Tcl 8.4 in this locale is not useful. @@ -7920,32 +8162,33 @@ some unit tests fail. On MirBSD 10, when an unsupported locale is specified, setlocale() succeeds but then nl_langinfo(CODESET) is "UTF-8". */ -#if HAVE_LANGINFO_CODESET +# if HAVE_LANGINFO_CODESET { const char *cs = nl_langinfo (CODESET); if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0 || strcmp (cs, "UTF-8") == 0) return 1; } -#endif -#ifdef __CYGWIN__ +# endif +# ifdef __CYGWIN__ /* On Cygwin, avoid locale names without encoding suffix, because the locale_charset() function relies on the encoding suffix. Note that LC_ALL is set on the command line. */ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1; -#endif +# endif /* Check whether in the abbreviation of the second month, the second character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only one byte long. This excludes the UTF-8 encoding. */ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4; if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1; -#if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */ +# if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */ /* Check whether the decimal separator is a comma. On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point are nl_langinfo(RADIXCHAR) are both ".". */ if (localeconv () ->decimal_point[0] != ',') return 1; -#endif +# endif return 0; +#endif } _ACEOF @@ -8014,1513 +8257,2035 @@ - GNULIB_CHDIR=0; - GNULIB_CHOWN=0; - GNULIB_CLOSE=0; - GNULIB_DUP=0; - GNULIB_DUP2=0; - GNULIB_DUP3=0; - GNULIB_ENVIRON=0; - GNULIB_EUIDACCESS=0; - GNULIB_FACCESSAT=0; - GNULIB_FCHDIR=0; - GNULIB_FCHOWNAT=0; - GNULIB_FDATASYNC=0; - GNULIB_FSYNC=0; - GNULIB_FTRUNCATE=0; - GNULIB_GETCWD=0; - GNULIB_GETDOMAINNAME=0; - GNULIB_GETDTABLESIZE=0; - GNULIB_GETGROUPS=0; - GNULIB_GETHOSTNAME=0; - GNULIB_GETLOGIN=0; - GNULIB_GETLOGIN_R=0; - GNULIB_GETPAGESIZE=0; - GNULIB_GETUSERSHELL=0; - GNULIB_GROUP_MEMBER=0; - GNULIB_ISATTY=0; - GNULIB_LCHOWN=0; - GNULIB_LINK=0; - GNULIB_LINKAT=0; - GNULIB_LSEEK=0; - GNULIB_PIPE=0; - GNULIB_PIPE2=0; - GNULIB_PREAD=0; - GNULIB_PWRITE=0; - GNULIB_READ=0; - GNULIB_READLINK=0; - GNULIB_READLINKAT=0; - GNULIB_RMDIR=0; - GNULIB_SETHOSTNAME=0; - 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; - GNULIB_UNLINK=0; - GNULIB_UNLINKAT=0; - GNULIB_USLEEP=0; - GNULIB_WRITE=0; - HAVE_CHOWN=1; - HAVE_DUP2=1; - HAVE_DUP3=1; - HAVE_EUIDACCESS=1; - HAVE_FACCESSAT=1; - HAVE_FCHDIR=1; - HAVE_FCHOWNAT=1; - HAVE_FDATASYNC=1; - HAVE_FSYNC=1; - HAVE_FTRUNCATE=1; - HAVE_GETDTABLESIZE=1; - HAVE_GETGROUPS=1; - HAVE_GETHOSTNAME=1; - HAVE_GETLOGIN=1; - HAVE_GETPAGESIZE=1; - HAVE_GROUP_MEMBER=1; - HAVE_LCHOWN=1; - HAVE_LINK=1; - HAVE_LINKAT=1; - HAVE_PIPE=1; - HAVE_PIPE2=1; - HAVE_PREAD=1; - HAVE_PWRITE=1; - HAVE_READLINK=1; - HAVE_READLINKAT=1; - HAVE_SETHOSTNAME=1; - 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; - HAVE_DECL_SETHOSTNAME=1; - HAVE_DECL_TTYNAME_R=1; - HAVE_OS_H=0; - HAVE_SYS_PARAM_H=0; - REPLACE_CHOWN=0; - REPLACE_CLOSE=0; - REPLACE_DUP=0; - REPLACE_DUP2=0; - REPLACE_FCHOWNAT=0; - REPLACE_FTRUNCATE=0; - REPLACE_GETCWD=0; - REPLACE_GETDOMAINNAME=0; - REPLACE_GETDTABLESIZE=0; - REPLACE_GETLOGIN_R=0; - REPLACE_GETGROUPS=0; - REPLACE_GETPAGESIZE=0; - REPLACE_ISATTY=0; - REPLACE_LCHOWN=0; - REPLACE_LINK=0; - REPLACE_LINKAT=0; - REPLACE_LSEEK=0; - REPLACE_PREAD=0; - REPLACE_PWRITE=0; - REPLACE_READ=0; - REPLACE_READLINK=0; - REPLACE_READLINKAT=0; - REPLACE_RMDIR=0; - REPLACE_SLEEP=0; - REPLACE_SYMLINK=0; - REPLACE_SYMLINKAT=0; - REPLACE_TRUNCATE=0; - REPLACE_TTYNAME_R=0; - REPLACE_UNLINK=0; - REPLACE_UNLINKAT=0; - REPLACE_USLEEP=0; - REPLACE_WRITE=0; - UNISTD_H_HAVE_WINSOCK2_H=0; - UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0; - - - - - - - for ac_header in $gl_header_list -do : - as_ac_Header=`printf "%s\n" "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 `printf "%s\n" "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - - - - - - - - - - - : - - - - - - - - - - - - - - : - - - - - - if test $ac_cv_func__set_invalid_parameter_handler = yes; then - HAVE_MSVC_INVALID_PARAMETER_HANDLER=1 -printf "%s\n" "#define HAVE_MSVC_INVALID_PARAMETER_HANDLER 1" >>confdefs.h - - else - HAVE_MSVC_INVALID_PARAMETER_HANDLER=0 - fi + case "$host_os" in + sunos4* | freebsd* | dragonfly* | openbsd* | mirbsd* | netbsd* | kfreebsd* | knetbsd*) # BSD systems + FAULT_YIELDS_SIGBUS=1 ;; + hpux*) # HP-UX + FAULT_YIELDS_SIGBUS=1 ;; + macos* | darwin*) # Mac OS X + FAULT_YIELDS_SIGBUS=1 ;; + gnu*) # Hurd + FAULT_YIELDS_SIGBUS=1 ;; + *) + FAULT_YIELDS_SIGBUS=0 ;; + esac +printf "%s\n" "#define FAULT_YIELDS_SIGBUS $FAULT_YIELDS_SIGBUS" >>confdefs.h + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working C stack overflow detection" >&5 +printf %s "checking for working C stack overflow detection... " >&6; } +if test ${ac_cv_sys_stack_overflow_works+y} +then : + printf %s "(cached) " >&6 +else + if test "$cross_compiling" = yes +then : + case "$host_os" in + # Guess no on native Windows. + mingw*) ac_cv_sys_stack_overflow_works="guessing no" ;; + *) ac_cv_sys_stack_overflow_works=cross-compiling ;; + esac +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + #include + #include + #if HAVE_SETRLIMIT + # include + # include + # include + #endif + #ifndef SIGSTKSZ + # define SIGSTKSZ 16384 + #endif + static union + { + char buffer[2 * SIGSTKSZ]; + long double ld; + long u; + void *p; + } alternate_signal_stack; + static void + segv_handler (int signo) + { + _exit (0); + } + static int + c_stack_action () + { + stack_t st; + struct sigaction act; + int r; + + st.ss_flags = 0; + /* Use the midpoint to avoid Irix sigaltstack bug. */ + st.ss_sp = alternate_signal_stack.buffer + SIGSTKSZ; + st.ss_size = SIGSTKSZ; + r = sigaltstack (&st, 0); + if (r != 0) + return 1; + + sigemptyset (&act.sa_mask); + act.sa_flags = SA_NODEFER | SA_ONSTACK | SA_RESETHAND; + act.sa_handler = segv_handler; + #if FAULT_YIELDS_SIGBUS + if (sigaction (SIGBUS, &act, 0) < 0) + return 2; + #endif + if (sigaction (SIGSEGV, &act, 0) < 0) + return 3; + return 0; + } + static volatile int * + recurse_1 (volatile int n, volatile int *p) + { + if (n >= 0) + *recurse_1 (n + 1, p) += n; + return p; + } + static int + recurse (volatile int n) + { + int sum = 0; + return *recurse_1 (n, &sum); + } + int + main () + { + int result; + #if HAVE_SETRLIMIT && defined RLIMIT_STACK + /* Before starting the endless recursion, try to be friendly + to the user's machine. On some Linux 2.2.x systems, there + is no stack limit for user processes at all. We don't want + to kill such systems. */ + struct rlimit rl; + rl.rlim_cur = rl.rlim_max = 0x100000; /* 1 MB */ + setrlimit (RLIMIT_STACK, &rl); + #endif + result = c_stack_action (); + if (result != 0) + return result; + return recurse (0); + } +_ACEOF +if ac_fn_c_try_run "$LINENO" +then : + ac_cv_sys_stack_overflow_works=yes +else + ac_cv_sys_stack_overflow_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 - GNULIB_OPENDIR=0; - GNULIB_READDIR=0; - GNULIB_REWINDDIR=0; - GNULIB_CLOSEDIR=0; - GNULIB_DIRFD=0; - GNULIB_FDOPENDIR=0; - GNULIB_SCANDIR=0; - GNULIB_ALPHASORT=0; - HAVE_OPENDIR=1; - HAVE_READDIR=1; - HAVE_REWINDDIR=1; - HAVE_CLOSEDIR=1; - HAVE_DECL_DIRFD=1; - HAVE_DECL_FDOPENDIR=1; - HAVE_FDOPENDIR=1; - HAVE_SCANDIR=1; - HAVE_ALPHASORT=1; - REPLACE_OPENDIR=0; - REPLACE_CLOSEDIR=0; - REPLACE_DIRFD=0; - REPLACE_FDOPENDIR=0; +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_stack_overflow_works" >&5 +printf "%s\n" "$ac_cv_sys_stack_overflow_works" >&6; } - GNULIB_ISBLANK=0; - HAVE_ISBLANK=1; + if test "$ac_cv_sys_stack_overflow_works" = yes; then +printf "%s\n" "#define HAVE_STACK_OVERFLOW_HANDLING 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the preprocessor supports include_next" >&5 -printf %s "checking whether the preprocessor supports include_next... " >&6; } -if test ${gl_cv_have_include_next+y} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for correct stack_t interpretation" >&5 +printf %s "checking for correct stack_t interpretation... " >&6; } +if test ${gl_cv_sigaltstack_low_base+y} then : printf %s "(cached) " >&6 else - rm -rf conftestd1a conftestd1b conftestd2 - mkdir conftestd1a conftestd1b conftestd2 - cat < conftestd1a/conftest.h -#define DEFINED_IN_CONFTESTD1 -#include_next -#ifdef DEFINED_IN_CONFTESTD2 -int foo; -#else -#error "include_next doesn't work" -#endif -EOF - cat < conftestd1b/conftest.h -#define DEFINED_IN_CONFTESTD1 -#include -#include_next -#ifdef DEFINED_IN_CONFTESTD2 -int foo; -#else -#error "include_next doesn't work" -#endif -EOF - cat < conftestd2/conftest.h -#ifndef DEFINED_IN_CONFTESTD1 -#error "include_next test doesn't work" -#endif -#define DEFINED_IN_CONFTESTD2 -EOF - gl_save_CPPFLAGS="$CPPFLAGS" - CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF -if ac_fn_c_try_compile "$LINENO" + + if test "$cross_compiling" = yes then : - gl_cv_have_include_next=yes + gl_cv_sigaltstack_low_base=cross-compiling else - CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include + + +#include +#include +#if HAVE_SYS_SIGNAL_H +# include +#endif +#ifndef SIGSTKSZ +# define SIGSTKSZ 16384 +#endif +volatile char *stack_lower_bound; +volatile char *stack_upper_bound; +static void check_stack_location (volatile char *addr) +{ + if (addr >= stack_lower_bound && addr <= stack_upper_bound) + exit (0); + else + exit (1); +} +static void stackoverflow_handler (int sig) +{ + char dummy; + check_stack_location (&dummy); +} +int main () +{ + char mystack[2 * SIGSTKSZ]; + stack_t altstack; + struct sigaction action; + /* Install the alternate stack. */ + altstack.ss_sp = mystack + SIGSTKSZ; + altstack.ss_size = SIGSTKSZ; + stack_lower_bound = (char *) altstack.ss_sp; + stack_upper_bound = (char *) altstack.ss_sp + altstack.ss_size - 1; + altstack.ss_flags = 0; /* no SS_DISABLE */ + if (sigaltstack (&altstack, NULL) < 0) + exit (2); + /* Install the SIGSEGV handler. */ + sigemptyset (&action.sa_mask); + action.sa_handler = &stackoverflow_handler; + action.sa_flags = SA_ONSTACK; + if (sigaction (SIGSEGV, &action, (struct sigaction *) NULL) < 0) + exit(3); + /* Provoke a SIGSEGV. */ + raise (SIGSEGV); + exit (4); +} _ACEOF -if ac_fn_c_try_compile "$LINENO" +if ac_fn_c_try_run "$LINENO" then : - gl_cv_have_include_next=buggy + gl_cv_sigaltstack_low_base=yes else - gl_cv_have_include_next=no + gl_cv_sigaltstack_low_base=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CPPFLAGS="$gl_save_CPPFLAGS" - rm -rf conftestd1a conftestd1b conftestd2 fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_include_next" >&5 -printf "%s\n" "$gl_cv_have_include_next" >&6; } - PRAGMA_SYSTEM_HEADER= - if test $gl_cv_have_include_next = yes; then - INCLUDE_NEXT=include_next - INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next - if test -n "$GCC"; then - PRAGMA_SYSTEM_HEADER='#pragma GCC system_header' - fi - else - if test $gl_cv_have_include_next = buggy; then - INCLUDE_NEXT=include - INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next - else - INCLUDE_NEXT=include - INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include - fi - fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sigaltstack_low_base" >&5 +printf "%s\n" "$gl_cv_sigaltstack_low_base" >&6; } + if test "$gl_cv_sigaltstack_low_base" = no; then +printf "%s\n" "#define SIGALTSTACK_SS_REVERSED 1" >>confdefs.h + fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether system header files limit the line length" >&5 -printf %s "checking whether system header files limit the line length... " >&6; } -if test ${gl_cv_pragma_columns+y} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for precise C stack overflow detection" >&5 +printf %s "checking for precise C stack overflow detection... " >&6; } +if test ${ac_cv_sys_xsi_stack_overflow_heuristic+y} then : printf %s "(cached) " >&6 else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + case "${host_os}--${host_cpu}" in + linux*--sparc*) + ac_cv_sys_xsi_stack_overflow_heuristic=no + ;; + *) + if test "$cross_compiling" = yes +then : + ac_cv_sys_xsi_stack_overflow_heuristic=cross-compiling +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#ifdef __TANDEM -choke me -#endif + #include + #include + #if HAVE_UCONTEXT_H + # include + #endif + #if HAVE_SETRLIMIT + # include + # include + # include + #endif + #ifndef SIGSTKSZ + # define SIGSTKSZ 16384 + #endif + + static union + { + char buffer[2 * SIGSTKSZ]; + long double ld; + long u; + void *p; + } alternate_signal_stack; + + #if STACK_DIRECTION + # define find_stack_direction(ptr) STACK_DIRECTION + #else + static int + find_stack_direction (char const *addr) + { + char dummy; + return (! addr ? find_stack_direction (&dummy) + : addr < &dummy ? 1 : -1); + } + #endif + + static void + segv_handler (int signo, siginfo_t *info, void *context) + { + if (0 < info->si_code) + { + /* For XSI heuristics to work, we need uc_stack to + describe the interrupted stack (as on Solaris), and + not the currently executing stack (as on Linux). */ + ucontext_t const *user_context = context; + char const *stack_min = user_context->uc_stack.ss_sp; + size_t stack_size = user_context->uc_stack.ss_size; + char const *faulting_address = info->si_addr; + size_t s = faulting_address - stack_min; + size_t page_size = sysconf (_SC_PAGESIZE); + if (find_stack_direction (0) < 0) + s += page_size; + if (s < stack_size + page_size) + _exit (0); + _exit (4); + } + _exit (5); + } + + static int + c_stack_action () + { + stack_t st; + struct sigaction act; + int r; + + st.ss_flags = 0; + /* Use the midpoint to avoid Irix sigaltstack bug. */ + st.ss_sp = alternate_signal_stack.buffer + SIGSTKSZ; + st.ss_size = SIGSTKSZ; + r = sigaltstack (&st, 0); + if (r != 0) + return 1; + + sigemptyset (&act.sa_mask); + act.sa_flags = SA_NODEFER | SA_ONSTACK | SA_RESETHAND | SA_SIGINFO; + act.sa_sigaction = segv_handler; + #if FAULT_YIELDS_SIGBUS + if (sigaction (SIGBUS, &act, 0) < 0) + return 2; + #endif + if (sigaction (SIGSEGV, &act, 0) < 0) + return 3; + return 0; + } + static volatile int * + recurse_1 (volatile int n, volatile int *p) + { + if (n >= 0) + *recurse_1 (n + 1, p) += n; + return p; + } + static int + recurse (volatile int n) + { + int sum = 0; + return *recurse_1 (n, &sum); + } + int + main () + { + int result; + #if HAVE_SETRLIMIT && defined RLIMIT_STACK + /* Before starting the endless recursion, try to be friendly + to the user's machine. On some Linux 2.2.x systems, there + is no stack limit for user processes at all. We don't want + to kill such systems. */ + struct rlimit rl; + rl.rlim_cur = rl.rlim_max = 0x100000; /* 1 MB */ + setrlimit (RLIMIT_STACK, &rl); + #endif + + result = c_stack_action (); + if (result != 0) + return result; + return recurse (0); + } _ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "choke me" >/dev/null 2>&1 +if ac_fn_c_try_run "$LINENO" then : - gl_cv_pragma_columns=yes + ac_cv_sys_xsi_stack_overflow_heuristic=yes else - gl_cv_pragma_columns=no + ac_cv_sys_xsi_stack_overflow_heuristic=no fi -rm -rf conftest* - - +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_pragma_columns" >&5 -printf "%s\n" "$gl_cv_pragma_columns" >&6; } - if test $gl_cv_pragma_columns = yes; then - PRAGMA_COLUMNS="#pragma COLUMNS 10000" - else - PRAGMA_COLUMNS= - fi - - - + ;; + esac +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_xsi_stack_overflow_heuristic" >&5 +printf "%s\n" "$ac_cv_sys_xsi_stack_overflow_heuristic" >&6; } + if test $ac_cv_sys_xsi_stack_overflow_heuristic = yes; then +printf "%s\n" "#define HAVE_XSI_STACK_OVERFLOW_HEURISTIC 1" >>confdefs.h + fi + fi + if test "X$prefix" = "XNONE"; then + acl_final_prefix="$ac_default_prefix" + else + acl_final_prefix="$prefix" + fi + if test "X$exec_prefix" = "XNONE"; then + acl_final_exec_prefix='${prefix}' + else + acl_final_exec_prefix="$exec_prefix" + fi + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" + prefix="$acl_save_prefix" -# The Clang compiler raises a warning for an undeclared identifier that matches -# a compiler builtin function. All extant Clang versions are affected, as of -# Clang 3.6.0. Test a builtin known to every version. This problem affects the -# C and Objective C languages, but Clang does report an error under C++ and -# Objective C++. -# -# Passing -fno-builtin to the compiler would suppress this problem. That -# strategy would have the advantage of being insensitive to stray warnings, but -# it would make tests less realistic. -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how $CC reports undeclared, standard C functions" >&5 -printf %s "checking how $CC reports undeclared, standard C functions... " >&6; } -if test ${ac_cv_c_decl_report+y} +# Check whether --with-gnu-ld was given. +if test ${with_gnu_ld+y} then : - printf %s "(cached) " >&6 + withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ + with_gnu_ld=no +fi -int -main (void) -{ -(void) strchr; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - if test -s conftest.err -then : - # For AC_CHECK_DECL to react to warnings, the compiler must be silent on - # valid AC_CHECK_DECL input. No library function is consistently available - # on freestanding implementations, so test against a dummy declaration. - # Include always-available headers on the off chance that they somehow - # elicit warnings. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +# 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 + +if test -n "$LD"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ld" >&5 +printf %s "checking for ld... " >&6; } +elif test "$GCC" = yes; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 +printf %s "checking for ld used by $CC... " >&6; } +elif test "$with_gnu_ld" = yes; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 +printf %s "checking for GNU ld... " >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 +printf %s "checking for non-GNU ld... " >&6; } +fi +if test -n "$LD"; then + # Let the user override the test with a path. + : +else + if test ${acl_cv_path_LD+y} +then : + printf %s "(cached) " >&6 +else + + acl_cv_path_LD= # Final result of this test + ac_prog=ld # Program to search in $PATH + if test "$GCC" = yes; then + # Check if gcc -print-prog-name=ld gives a path. + case $host in + *-*-mingw*) + # gcc leaves a trailing carriage return which upsets mingw + acl_output=`($CC -print-prog-name=ld) 2>&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 + 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. */ -#include -#include -#include -#include -extern void ac_decl (int, char *); -int -main (void) -{ -#ifdef __cplusplus - (void) ac_decl ((int) 0, (char *) 0); - (void) ac_decl; -#else - (void) ac_decl; -#endif +#if defined __powerpc64__ || defined _ARCH_PPC64 + int ok; + #else + error fail + #endif - ; - return 0; -} _ACEOF if ac_fn_c_try_compile "$LINENO" then : - if test -s conftest.err -then : - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot detect from compiler exit status or warnings -See \`config.log' for more details" "$LINENO" 5; } -else - ac_cv_c_decl_report=warning + # 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 core conftest.err conftest.$ac_objext conftest.$ac_ext + ;; + sparc64-*-netbsd*) + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#if defined __sparcv9 || defined __arch64__ + int ok; + #else + error fail + #endif + +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + else - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot compile a simple declaration test -See \`config.log' for more details" "$LINENO" 5; } + # The compiler produces 32-bit code. Add option '-m elf32_sparc' + # so that the linker groks 32-bit object files. + case "$acl_cv_path_LD " in + *" -m elf32_sparc "*) ;; + *) acl_cv_path_LD="$acl_cv_path_LD -m elf32_sparc" ;; + esac + fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -else - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "compiler does not report undeclared identifiers -See \`config.log' for more details" "$LINENO" 5; } + ;; + esac + fi + + LD="$acl_cv_path_LD" +fi +if test -n "$LD"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LD" >&5 +printf "%s\n" "$LD" >&6; } else - ac_cv_c_decl_report=error + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 +printf %s "checking if the linker ($LD) is GNU ld... " >&6; } +if test ${acl_cv_prog_gnu_ld+y} +then : + printf %s "(cached) " >&6 +else + # I'd rather use --version here, but apparently some GNU lds only accept -v. +case `$LD -v 2>&1 &5 -printf "%s\n" "$ac_cv_c_decl_report" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5 +printf "%s\n" "$acl_cv_prog_gnu_ld" >&6; } +with_gnu_ld=$acl_cv_prog_gnu_ld -case $ac_cv_c_decl_report in - warning) ac_c_decl_warn_flag=yes ;; - *) ac_c_decl_warn_flag= ;; -esac - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5 -printf %s "checking whether // is distinct from /... " >&6; } -if test ${gl_cv_double_slash_root+y} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5 +printf %s "checking for shared library run path origin... " >&6; } +if test ${acl_cv_rpath+y} then : printf %s "(cached) " >&6 else - if test x"$cross_compiling" = xyes ; then - # When cross-compiling, there is no way to tell whether // is special - # short of a list of hosts. However, the only known hosts to date - # that have a distinct // are Apollo DomainOS (too old to port to), - # Cygwin, and z/OS. If anyone knows of another system for which // has - # special semantics and is distinct from /, please report it to - # . - case $host in - *-cygwin | i370-ibm-openedition) - gl_cv_double_slash_root=yes ;; - *) - # Be optimistic and assume that / and // are the same when we - # don't know. - gl_cv_double_slash_root='unknown, assuming no' ;; - esac - else - set x `ls -di / // 2>/dev/null` - if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then - gl_cv_double_slash_root=no - else - gl_cv_double_slash_root=yes - fi - fi -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5 -printf "%s\n" "$gl_cv_double_slash_root" >&6; } - if test "$gl_cv_double_slash_root" = yes; then -printf "%s\n" "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h + CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ + ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh + . ./conftest.sh + rm -f ./conftest.sh + acl_cv_rpath=done - fi +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5 +printf "%s\n" "$acl_cv_rpath" >&6; } + wl="$acl_cv_wl" + acl_libext="$acl_cv_libext" + acl_shlibext="$acl_cv_shlibext" + acl_libname_spec="$acl_cv_libname_spec" + acl_library_names_spec="$acl_cv_library_names_spec" + acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" + acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" + acl_hardcode_direct="$acl_cv_hardcode_direct" + acl_hardcode_minus_L="$acl_cv_hardcode_minus_L" + # Check whether --enable-rpath was given. +if test ${enable_rpath+y} +then : + enableval=$enable_rpath; : +else + enable_rpath=yes +fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for complete errno.h" >&5 -printf %s "checking for complete errno.h... " >&6; } -if test ${gl_cv_header_errno_h_complete+y} + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking 32-bit host C ABI" >&5 +printf %s "checking 32-bit host C ABI... " >&6; } +if test ${gl_cv_host_cpu_c_abi_32bit+y} then : printf %s "(cached) " >&6 else + if test -n "$gl_cv_host_cpu_c_abi"; then + case "$gl_cv_host_cpu_c_abi" in + i386 | x86_64-x32 | arm | armhf | arm64-ilp32 | hppa | ia64-ilp32 | mips | mipsn32 | powerpc | riscv*-ilp32* | s390 | sparc) + gl_cv_host_cpu_c_abi_32bit=yes ;; + *) + gl_cv_host_cpu_c_abi_32bit=no ;; + esac + else + case "$host_cpu" in - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ + i[4567]86 ) + gl_cv_host_cpu_c_abi_32bit=yes + ;; -#include -#if !defined ETXTBSY -booboo -#endif -#if !defined ENOMSG -booboo -#endif -#if !defined EIDRM -booboo -#endif -#if !defined ENOLINK -booboo -#endif -#if !defined EPROTO -booboo -#endif -#if !defined EMULTIHOP -booboo -#endif -#if !defined EBADMSG -booboo -#endif -#if !defined EOVERFLOW -booboo -#endif -#if !defined ENOTSUP -booboo -#endif -#if !defined ENETRESET -booboo -#endif -#if !defined ECONNABORTED -booboo -#endif -#if !defined ESTALE -booboo -#endif -#if !defined EDQUOT -booboo -#endif -#if !defined ECANCELED -booboo -#endif -#if !defined EOWNERDEAD -booboo -#endif -#if !defined ENOTRECOVERABLE -booboo -#endif -#if !defined EILSEQ -booboo -#endif + x86_64 ) + # On x86_64 systems, the C compiler may be generating code in one of + # these ABIs: + # - 64-bit instruction set, 64-bit pointers, 64-bit 'long': x86_64. + # - 64-bit instruction set, 64-bit pointers, 32-bit 'long': x86_64 + # with native Windows (mingw, MSVC). + # - 64-bit instruction set, 32-bit pointers, 32-bit 'long': x86_64-x32. + # - 32-bit instruction set, 32-bit pointers, 32-bit 'long': i386. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#if (defined __x86_64__ || defined __amd64__ \ + || defined _M_X64 || defined _M_AMD64) \ + && !(defined __ILP32__ || defined _ILP32) + int ok; + #else + error fail + #endif _ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "booboo" >/dev/null 2>&1 +if ac_fn_c_try_compile "$LINENO" then : - gl_cv_header_errno_h_complete=no + gl_cv_host_cpu_c_abi_32bit=no else - gl_cv_header_errno_h_complete=yes + gl_cv_host_cpu_c_abi_32bit=yes fi -rm -rf conftest* +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ;; + arm* | aarch64 ) + # Assume arm with EABI. + # On arm64 systems, the C compiler may be generating code in one of + # these ABIs: + # - aarch64 instruction set, 64-bit pointers, 64-bit 'long': arm64. + # - aarch64 instruction set, 32-bit pointers, 32-bit 'long': arm64-ilp32. + # - 32-bit instruction set, 32-bit pointers, 32-bit 'long': arm or armhf. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#if defined __aarch64__ && !(defined __ILP32__ || defined _ILP32) + int ok; + #else + error fail + #endif +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + gl_cv_host_cpu_c_abi_32bit=no +else + gl_cv_host_cpu_c_abi_32bit=yes fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_complete" >&5 -printf "%s\n" "$gl_cv_header_errno_h_complete" >&6; } - if test $gl_cv_header_errno_h_complete = yes; then - ERRNO_H='' - else +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ;; + hppa1.0 | hppa1.1 | hppa2.0* | hppa64 ) + # On hppa, the C compiler may be generating 32-bit code or 64-bit + # code. In the latter case, it defines _LP64 and __LP64__. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef __LP64__ + int ok; + #else + error fail + #endif +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + gl_cv_host_cpu_c_abi_32bit=no +else + gl_cv_host_cpu_c_abi_32bit=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ;; + ia64* ) + # On ia64 on HP-UX, the C compiler may be generating 64-bit code or + # 32-bit code. In the latter case, it defines _ILP32. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef _ILP32 + int ok; + #else + error fail + #endif +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + gl_cv_host_cpu_c_abi_32bit=yes +else + gl_cv_host_cpu_c_abi_32bit=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ;; + mips* ) + # We should also check for (_MIPS_SZPTR == 64), but gcc keeps this + # at 32. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#if defined _MIPS_SZLONG && (_MIPS_SZLONG == 64) + int ok; + #else + error fail + #endif +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + gl_cv_host_cpu_c_abi_32bit=no +else + gl_cv_host_cpu_c_abi_32bit=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ;; + powerpc* ) + # Different ABIs are in use on AIX vs. Mac OS X vs. Linux,*BSD. + # No need to distinguish them here; the caller may distinguish + # them based on the OS. + # On powerpc64 systems, the C compiler may still be generating + # 32-bit code. And on powerpc-ibm-aix systems, the C compiler may + # be generating 64-bit code. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#if defined __powerpc64__ || defined _ARCH_PPC64 + int ok; + #else + error fail + #endif - if test $gl_cv_have_include_next = yes; then - gl_cv_next_errno_h='<'errno.h'>' - else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 -printf %s "checking absolute name of ... " >&6; } -if test ${gl_cv_next_errno_h+y} +_ACEOF +if ac_fn_c_try_compile "$LINENO" then : - printf %s "(cached) " >&6 + gl_cv_host_cpu_c_abi_32bit=no else + gl_cv_host_cpu_c_abi_32bit=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ;; + rs6000 ) + gl_cv_host_cpu_c_abi_32bit=yes + ;; - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + riscv32 | riscv64 ) + # There are 6 ABIs: ilp32, ilp32f, ilp32d, lp64, lp64f, lp64d. + # Size of 'long' and 'void *': + 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 +#if defined __LP64__ + int ok; + #else + error fail + #endif - case "$host_os" in - mingw*) - gl_dirsep_regex='[/\\]' - ;; - *) - gl_dirsep_regex='\/' - ;; - esac - gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' - gl_header_literal_regex=`echo 'errno.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 - }' +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + gl_cv_host_cpu_c_abi_32bit=no +else + gl_cv_host_cpu_c_abi_32bit=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ;; - gl_cv_absolute_errno_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | - sed -n "$gl_absolute_header_sed"` + s390* ) + # On s390x, the C compiler may be generating 64-bit (= s390x) code + # or 31-bit (= s390) code. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#if defined __LP64__ || defined __s390x__ + int ok; + #else + error fail + #endif - gl_header=$gl_cv_absolute_errno_h - gl_cv_next_errno_h='"'$gl_header'"' +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + gl_cv_host_cpu_c_abi_32bit=no +else + gl_cv_host_cpu_c_abi_32bit=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ;; + sparc | sparc64 ) + # UltraSPARCs running Linux have `uname -m` = "sparc64", but the + # C compiler still generates 32-bit code. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#if defined __sparcv9 || defined __arch64__ + int ok; + #else + error fail + #endif +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + gl_cv_host_cpu_c_abi_32bit=no +else + gl_cv_host_cpu_c_abi_32bit=yes fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_errno_h" >&5 -printf "%s\n" "$gl_cv_next_errno_h" >&6; } - fi - NEXT_ERRNO_H=$gl_cv_next_errno_h +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ;; - 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='<'errno.h'>' - else - # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' - gl_next_as_first_directive=$gl_cv_next_errno_h + *) + gl_cv_host_cpu_c_abi_32bit=no + ;; + esac fi - NEXT_AS_FIRST_DIRECTIVE_ERRNO_H=$gl_next_as_first_directive +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_host_cpu_c_abi_32bit" >&5 +printf "%s\n" "$gl_cv_host_cpu_c_abi_32bit" >&6; } + HOST_CPU_C_ABI_32BIT="$gl_cv_host_cpu_c_abi_32bit" - ERRNO_H='errno.h' - fi - if test -n "$ERRNO_H"; then - GL_GENERATE_ERRNO_H_TRUE= - GL_GENERATE_ERRNO_H_FALSE='#' -else - GL_GENERATE_ERRNO_H_TRUE='#' - GL_GENERATE_ERRNO_H_FALSE= -fi - if test -n "$ERRNO_H"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for EMULTIHOP value" >&5 -printf %s "checking for EMULTIHOP value... " >&6; } -if test ${gl_cv_header_errno_h_EMULTIHOP+y} + case "$host_os" in + solaris*) + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for 64-bit host" >&5 +printf %s "checking for 64-bit host... " >&6; } +if test ${gl_cv_solaris_64bit+y} then : printf %s "(cached) " >&6 else - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - -#include -#ifdef EMULTIHOP -yes -#endif +#ifdef _LP64 + int ok; + #else + error fail + #endif _ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "yes" >/dev/null 2>&1 +if ac_fn_c_try_compile "$LINENO" then : - gl_cv_header_errno_h_EMULTIHOP=yes + gl_cv_solaris_64bit=yes else - gl_cv_header_errno_h_EMULTIHOP=no + gl_cv_solaris_64bit=no fi -rm -rf conftest* - - if test $gl_cv_header_errno_h_EMULTIHOP = no; then - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#define _XOPEN_SOURCE_EXTENDED 1 -#include -#ifdef EMULTIHOP -yes -#endif +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "yes" >/dev/null 2>&1 -then : - gl_cv_header_errno_h_EMULTIHOP=hidden fi -rm -rf conftest* +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_solaris_64bit" >&5 +printf "%s\n" "$gl_cv_solaris_64bit" >&6; };; + esac - if test $gl_cv_header_errno_h_EMULTIHOP = hidden; then - if ac_fn_c_compute_int "$LINENO" "EMULTIHOP" "gl_cv_header_errno_h_EMULTIHOP" " -#define _XOPEN_SOURCE_EXTENDED 1 -#include -/* The following two lines are a workaround against an autoconf-2.52 bug. */ -#include -#include -" -then : - -fi - - fi - fi - -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EMULTIHOP" >&5 -printf "%s\n" "$gl_cv_header_errno_h_EMULTIHOP" >&6; } - case $gl_cv_header_errno_h_EMULTIHOP in - yes | no) - EMULTIHOP_HIDDEN=0; EMULTIHOP_VALUE= - ;; - *) - EMULTIHOP_HIDDEN=1; EMULTIHOP_VALUE="$gl_cv_header_errno_h_EMULTIHOP" - ;; - esac - - - fi - - - if test -n "$ERRNO_H"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ENOLINK value" >&5 -printf %s "checking for ENOLINK value... " >&6; } -if test ${gl_cv_header_errno_h_ENOLINK+y} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the common suffixes of directories in the library search path" >&5 +printf %s "checking for the common suffixes of directories in the library search path... " >&6; } +if test ${acl_cv_libdirstems+y} then : printf %s "(cached) " >&6 else + acl_libdirstem=lib + acl_libdirstem2= + case "$host_os" in + solaris*) + 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 + ;; + *) + if test "$HOST_CPU_C_ABI_32BIT" != yes; then + 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 + fi + ;; + esac + test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem" + acl_cv_libdirstems="$acl_libdirstem,$acl_libdirstem2" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $acl_cv_libdirstems" >&5 +printf "%s\n" "$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/.*,//'` -#include -#ifdef ENOLINK -yes -#endif -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "yes" >/dev/null 2>&1 -then : - gl_cv_header_errno_h_ENOLINK=yes -else - gl_cv_header_errno_h_ENOLINK=no -fi -rm -rf conftest* - if test $gl_cv_header_errno_h_ENOLINK = no; then - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#define _XOPEN_SOURCE_EXTENDED 1 -#include -#ifdef ENOLINK -yes -#endif -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "yes" >/dev/null 2>&1 -then : - gl_cv_header_errno_h_ENOLINK=hidden -fi -rm -rf conftest* - if test $gl_cv_header_errno_h_ENOLINK = hidden; then - if ac_fn_c_compute_int "$LINENO" "ENOLINK" "gl_cv_header_errno_h_ENOLINK" " -#define _XOPEN_SOURCE_EXTENDED 1 -#include -/* The following two lines are a workaround against an autoconf-2.52 bug. */ -#include -#include -" -then : -fi - fi - fi -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_ENOLINK" >&5 -printf "%s\n" "$gl_cv_header_errno_h_ENOLINK" >&6; } - case $gl_cv_header_errno_h_ENOLINK in - yes | no) - ENOLINK_HIDDEN=0; ENOLINK_VALUE= - ;; - *) - ENOLINK_HIDDEN=1; ENOLINK_VALUE="$gl_cv_header_errno_h_ENOLINK" - ;; - esac - fi - if test -n "$ERRNO_H"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for EOVERFLOW value" >&5 -printf %s "checking for EOVERFLOW value... " >&6; } -if test ${gl_cv_header_errno_h_EOVERFLOW+y} -then : - printf %s "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ + use_additional=yes -#include -#ifdef EOVERFLOW -yes -#endif + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "yes" >/dev/null 2>&1 -then : - gl_cv_header_errno_h_EOVERFLOW=yes -else - gl_cv_header_errno_h_EOVERFLOW=no -fi -rm -rf conftest* + eval additional_includedir=\"$includedir\" + eval additional_libdir=\"$libdir\" - if test $gl_cv_header_errno_h_EOVERFLOW = no; then - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" -#define _XOPEN_SOURCE_EXTENDED 1 -#include -#ifdef EOVERFLOW -yes -#endif -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "yes" >/dev/null 2>&1 +# Check whether --with-libsigsegv-prefix was given. +if test ${with_libsigsegv_prefix+y} then : - gl_cv_header_errno_h_EOVERFLOW=hidden -fi -rm -rf conftest* + withval=$with_libsigsegv_prefix; + if test "X$withval" = "Xno"; then + use_additional=no + else + if test "X$withval" = "X"; then - if test $gl_cv_header_errno_h_EOVERFLOW = hidden; then - if ac_fn_c_compute_int "$LINENO" "EOVERFLOW" "gl_cv_header_errno_h_EOVERFLOW" " -#define _XOPEN_SOURCE_EXTENDED 1 -#include -/* The following two lines are a workaround against an autoconf-2.52 bug. */ -#include -#include -" -then : + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" -fi + eval additional_includedir=\"$includedir\" + eval additional_libdir=\"$libdir\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + else + additional_includedir="$withval/include" + additional_libdir="$withval/$acl_libdirstem" + if test "$acl_libdirstem2" != "$acl_libdirstem" \ + && test ! -d "$withval/$acl_libdirstem"; then + additional_libdir="$withval/$acl_libdirstem2" fi fi + fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EOVERFLOW" >&5 -printf "%s\n" "$gl_cv_header_errno_h_EOVERFLOW" >&6; } - case $gl_cv_header_errno_h_EOVERFLOW in - yes | no) - EOVERFLOW_HIDDEN=0; EOVERFLOW_VALUE= - ;; - *) - EOVERFLOW_HIDDEN=1; EOVERFLOW_VALUE="$gl_cv_header_errno_h_EOVERFLOW" - ;; - esac - - - 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 - -printf "%s\n" "#define HAVE_DECL_STRERROR_R $ac_have_decl" >>confdefs.h - - - - - - - - - : - - - + LIBSIGSEGV= + LTLIBSIGSEGV= + INCSIGSEGV= + LIBSIGSEGV_PREFIX= + HAVE_LIBSIGSEGV= + rpathdirs= + ltrpathdirs= + names_already_handled= + names_next_round='sigsegv ' + while test -n "$names_next_round"; do + names_this_round="$names_next_round" + names_next_round= + for name in $names_this_round; do + already_handled= + for n in $names_already_handled; do + if test "$n" = "$name"; then + already_handled=yes + break + fi + done + if test -z "$already_handled"; then + names_already_handled="$names_already_handled $name" + uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'` + eval value=\"\$HAVE_LIB$uppername\" + if test -n "$value"; then + if test "$value" = yes; then + eval value=\"\$LIB$uppername\" + test -z "$value" || LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$value" + eval value=\"\$LTLIB$uppername\" + test -z "$value" || LTLIBSIGSEGV="${LTLIBSIGSEGV}${LTLIBSIGSEGV:+ }$value" + else + : + fi + else + found_dir= + found_la= + found_so= + found_a= + eval libname=\"$acl_libname_spec\" # typically: libname=lib$name + if test -n "$acl_shlibext"; then + shrext=".$acl_shlibext" # typically: shrext=.so + else + shrext= + fi + if test $use_additional = yes; then + dir="$additional_libdir" + if test -n "$acl_shlibext"; then + if test -f "$dir/$libname$shrext"; then + found_dir="$dir" + found_so="$dir/$libname$shrext" + else + if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then + ver=`(cd "$dir" && \ + for f in "$libname$shrext".*; do echo "$f"; done \ + | sed -e "s,^$libname$shrext\\\\.,," \ + | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ + | sed 1q ) 2>/dev/null` + if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then + found_dir="$dir" + found_so="$dir/$libname$shrext.$ver" + fi + else + eval library_names=\"$acl_library_names_spec\" + for f in $library_names; do + if test -f "$dir/$f"; then + found_dir="$dir" + found_so="$dir/$f" + break + fi + done + fi + fi + fi + if test "X$found_dir" = "X"; then + if test -f "$dir/$libname.$acl_libext"; then + found_dir="$dir" + found_a="$dir/$libname.$acl_libext" + fi + fi + if test "X$found_dir" != "X"; then + if test -f "$dir/$libname.la"; then + found_la="$dir/$libname.la" + fi + fi + fi + if test "X$found_dir" = "X"; then + for x in $LDFLAGS $LTLIBSIGSEGV; do + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" - : + case "$x" in + -L*) + dir=`echo "X$x" | sed -e 's/^X-L//'` + if test -n "$acl_shlibext"; then + if test -f "$dir/$libname$shrext"; then + found_dir="$dir" + found_so="$dir/$libname$shrext" + else + if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then + ver=`(cd "$dir" && \ + for f in "$libname$shrext".*; do echo "$f"; done \ + | sed -e "s,^$libname$shrext\\\\.,," \ + | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ + | sed 1q ) 2>/dev/null` + if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then + found_dir="$dir" + found_so="$dir/$libname$shrext.$ver" + fi + else + eval library_names=\"$acl_library_names_spec\" + for f in $library_names; do + if test -f "$dir/$f"; then + found_dir="$dir" + found_so="$dir/$f" + break + fi + done + fi + fi + fi + if test "X$found_dir" = "X"; then + if test -f "$dir/$libname.$acl_libext"; then + found_dir="$dir" + found_a="$dir/$libname.$acl_libext" + fi + fi + if test "X$found_dir" != "X"; then + if test -f "$dir/$libname.la"; then + found_la="$dir/$libname.la" + fi + fi + ;; + esac + if test "X$found_dir" != "X"; then + break + fi + done + fi + if test "X$found_dir" != "X"; then + LTLIBSIGSEGV="${LTLIBSIGSEGV}${LTLIBSIGSEGV:+ }-L$found_dir -l$name" + if test "X$found_so" != "X"; then + if test "$enable_rpath" = no \ + || test "X$found_dir" = "X/usr/$acl_libdirstem" \ + || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then + LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$found_so" + else + haveit= + for x in $ltrpathdirs; do + if test "X$x" = "X$found_dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + ltrpathdirs="$ltrpathdirs $found_dir" + fi + if test "$acl_hardcode_direct" = yes; then + LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$found_so" + else + if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then + LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$found_so" + haveit= + for x in $rpathdirs; do + if test "X$x" = "X$found_dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + rpathdirs="$rpathdirs $found_dir" + fi + else + haveit= + for x in $LDFLAGS $LIBSIGSEGV; do + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + if test "X$x" = "X-L$found_dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }-L$found_dir" + fi + if test "$acl_hardcode_minus_L" != no; then + LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$found_so" + else + LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }-l$name" + fi + fi + fi + fi + else + if test "X$found_a" != "X"; then + LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$found_a" + else + LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }-L$found_dir -l$name" + fi + fi + additional_includedir= + case "$found_dir" in + */$acl_libdirstem | */$acl_libdirstem/) + basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'` + if test "$name" = 'sigsegv'; then + LIBSIGSEGV_PREFIX="$basedir" + fi + additional_includedir="$basedir/include" + ;; + */$acl_libdirstem2 | */$acl_libdirstem2/) + basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'` + if test "$name" = 'sigsegv'; then + LIBSIGSEGV_PREFIX="$basedir" + fi + additional_includedir="$basedir/include" + ;; + esac + if test "X$additional_includedir" != "X"; then + if test "X$additional_includedir" != "X/usr/include"; then + haveit= + if test "X$additional_includedir" = "X/usr/local/include"; then + if test -n "$GCC"; then + case $host_os in + linux* | gnu* | k*bsd*-gnu) haveit=yes;; + esac + fi + fi + if test -z "$haveit"; then + for x in $CPPFLAGS $INCSIGSEGV; do + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + if test "X$x" = "X-I$additional_includedir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test -d "$additional_includedir"; then + INCSIGSEGV="${INCSIGSEGV}${INCSIGSEGV:+ }-I$additional_includedir" + fi + fi + fi + fi + fi + if test -n "$found_la"; then + save_libdir="$libdir" + case "$found_la" in + */* | *\\*) . "$found_la" ;; + *) . "./$found_la" ;; + esac + libdir="$save_libdir" + for dep in $dependency_libs; do + case "$dep" in + -L*) + additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` + if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \ + && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then + haveit= + if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \ + || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then + if test -n "$GCC"; then + case $host_os in + linux* | gnu* | k*bsd*-gnu) haveit=yes;; + esac + fi + fi + if test -z "$haveit"; then + haveit= + for x in $LDFLAGS $LIBSIGSEGV; do -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns char *" >&5 -printf %s "checking whether strerror_r returns char *... " >&6; } -if test ${ac_cv_func_strerror_r_char_p+y} -then : - printf %s "(cached) " >&6 -else + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" - 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 (void) -{ + if test "X$x" = "X-L$additional_libdir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test -d "$additional_libdir"; then + LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }-L$additional_libdir" + fi + fi + haveit= + for x in $LDFLAGS $LTLIBSIGSEGV; do - char buf[100]; - char x = *strerror_r (0, buf, sizeof buf); - char *p = strerror_r (0, buf, sizeof buf); - return !p || x; + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" - ; - 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 + if test "X$x" = "X-L$additional_libdir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test -d "$additional_libdir"; then + LTLIBSIGSEGV="${LTLIBSIGSEGV}${LTLIBSIGSEGV:+ }-L$additional_libdir" + fi + fi + fi + fi + ;; + -R*) + dir=`echo "X$dep" | sed -e 's/^X-R//'` + if test "$enable_rpath" != no; then + haveit= + for x in $rpathdirs; do + if test "X$x" = "X$dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + rpathdirs="$rpathdirs $dir" + fi + haveit= + for x in $ltrpathdirs; do + if test "X$x" = "X$dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + ltrpathdirs="$ltrpathdirs $dir" + fi + fi + ;; + -l*) + names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` + ;; + *.la) + names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` + ;; + *) + LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$dep" + LTLIBSIGSEGV="${LTLIBSIGSEGV}${LTLIBSIGSEGV:+ }$dep" + ;; + esac + done + fi + else + LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }-l$name" + LTLIBSIGSEGV="${LTLIBSIGSEGV}${LTLIBSIGSEGV:+ }-l$name" + fi + fi + fi + done + done + if test "X$rpathdirs" != "X"; then + if test -n "$acl_hardcode_libdir_separator"; then + alldirs= + for found_dir in $rpathdirs; do + alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir" + done + acl_save_libdir="$libdir" + libdir="$alldirs" + eval flag=\"$acl_hardcode_libdir_flag_spec\" + libdir="$acl_save_libdir" + LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$flag" 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 (void) -{ -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 - + for found_dir in $rpathdirs; do + acl_save_libdir="$libdir" + libdir="$found_dir" + eval flag=\"$acl_hardcode_libdir_flag_spec\" + libdir="$acl_save_libdir" + LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$flag" + done fi - -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strerror_r_char_p" >&5 -printf "%s\n" "$ac_cv_func_strerror_r_char_p" >&6; } -if test $ac_cv_func_strerror_r_char_p = yes; then - -printf "%s\n" "#define STRERROR_R_CHAR_P 1" >>confdefs.h - -fi - - - XGETTEXT_EXTRA_OPTIONS= - - - - - - 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 - ac_have_decl=0 -fi - -printf "%s\n" "#define HAVE_DECL_FCHDIR $ac_have_decl" >>confdefs.h - - - - GNULIB_FCNTL=0; - GNULIB_NONBLOCKING=0; - GNULIB_OPEN=0; - GNULIB_OPENAT=0; - HAVE_FCNTL=1; - HAVE_OPENAT=1; - REPLACE_FCNTL=0; - REPLACE_OPEN=0; - REPLACE_OPENAT=0; - - - - - - - - - - - - - - - - : + fi + if test "X$ltrpathdirs" != "X"; then + for found_dir in $ltrpathdirs; do + LTLIBSIGSEGV="${LTLIBSIGSEGV}${LTLIBSIGSEGV:+ }-R$found_dir" + done + fi - : + ac_save_CPPFLAGS="$CPPFLAGS" + for element in $INCSIGSEGV; do + haveit= + for x in $CPPFLAGS; do + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + if test "X$x" = "X$element"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" + fi + done - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working fcntl.h" >&5 -printf %s "checking for working fcntl.h... " >&6; } -if test ${gl_cv_header_working_fcntl_h+y} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libsigsegv" >&5 +printf %s "checking for libsigsegv... " >&6; } +if test ${ac_cv_libsigsegv+y} then : printf %s "(cached) " >&6 else - if test "$cross_compiling" = yes -then : - gl_cv_header_working_fcntl_h=cross-compiling -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - #include - #if HAVE_UNISTD_H - # include - #else /* on Windows with MSVC */ - # include - # include - # defined sleep(n) _sleep ((n) * 1000) - #endif - #include - #ifndef O_NOATIME - #define O_NOATIME 0 - #endif - #ifndef O_NOFOLLOW - #define O_NOFOLLOW 0 - #endif - static int const constants[] = - { - O_CREAT, O_EXCL, O_NOCTTY, O_TRUNC, O_APPEND, - O_NONBLOCK, O_SYNC, O_ACCMODE, O_RDONLY, O_RDWR, O_WRONLY - }; + ac_save_LIBS="$LIBS" + case " $LIBSIGSEGV" in + *" -l"*) LIBS="$LIBS $LIBSIGSEGV" ;; + *) LIBS="$LIBSIGSEGV $LIBS" ;; + esac + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include int main (void) { - - int result = !constants; - #if HAVE_SYMLINK - { - static char const sym[] = "conftest.sym"; - if (symlink ("/dev/null", sym) != 0) - result |= 2; - else - { - int fd = open (sym, O_WRONLY | O_NOFOLLOW | O_CREAT, 0); - if (fd >= 0) - { - close (fd); - result |= 4; - } - } - if (unlink (sym) != 0 || symlink (".", sym) != 0) - result |= 2; - else - { - int fd = open (sym, O_RDONLY | O_NOFOLLOW); - if (fd >= 0) - { - close (fd); - result |= 4; - } - } - unlink (sym); - } - #endif - { - static char const file[] = "confdefs.h"; - int fd = open (file, O_RDONLY | O_NOATIME); - if (fd < 0) - result |= 8; - else - { - struct stat st0; - if (fstat (fd, &st0) != 0) - result |= 16; - else - { - char c; - sleep (1); - if (read (fd, &c, 1) != 1) - result |= 24; - else - { - if (close (fd) != 0) - result |= 32; - else - { - struct stat st1; - if (stat (file, &st1) != 0) - result |= 40; - else - if (st0.st_atime != st1.st_atime) - result |= 64; - } - } - } - } - } - return result; +sigsegv_deinstall_handler(); ; return 0; } _ACEOF -if ac_fn_c_try_run "$LINENO" +if ac_fn_c_try_link "$LINENO" then : - gl_cv_header_working_fcntl_h=yes + ac_cv_libsigsegv=yes else - case $? in #( - 4) gl_cv_header_working_fcntl_h='no (bad O_NOFOLLOW)';; #( - 64) gl_cv_header_working_fcntl_h='no (bad O_NOATIME)';; #( - 68) gl_cv_header_working_fcntl_h='no (bad O_NOATIME, O_NOFOLLOW)';; #( - *) gl_cv_header_working_fcntl_h='no';; - esac -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext + ac_cv_libsigsegv='no, consider installing GNU libsigsegv' fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LIBS="$ac_save_LIBS" fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_fcntl_h" >&5 -printf "%s\n" "$gl_cv_header_working_fcntl_h" >&6; } - - case $gl_cv_header_working_fcntl_h in #( - *O_NOATIME* | no | cross-compiling) ac_val=0;; #( - *) ac_val=1;; - esac - -printf "%s\n" "#define HAVE_WORKING_O_NOATIME $ac_val" >>confdefs.h - - - case $gl_cv_header_working_fcntl_h in #( - *O_NOFOLLOW* | no | cross-compiling) ac_val=0;; #( - *) ac_val=1;; - esac - -printf "%s\n" "#define HAVE_WORKING_O_NOFOLLOW $ac_val" >>confdefs.h - +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libsigsegv" >&5 +printf "%s\n" "$ac_cv_libsigsegv" >&6; } + if test "$ac_cv_libsigsegv" = yes; then + HAVE_LIBSIGSEGV=yes -ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default" -if test "x$ac_cv_type_pid_t" = xyes -then : +printf "%s\n" "#define HAVE_LIBSIGSEGV 1" >>confdefs.h -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to link with libsigsegv" >&5 +printf %s "checking how to link with libsigsegv... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LIBSIGSEGV" >&5 +printf "%s\n" "$LIBSIGSEGV" >&6; } + else + HAVE_LIBSIGSEGV=no + CPPFLAGS="$ac_save_CPPFLAGS" + LIBSIGSEGV= + LTLIBSIGSEGV= + LIBSIGSEGV_PREFIX= + fi -printf "%s\n" "#define pid_t int" >>confdefs.h -fi -ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default" -if test "x$ac_cv_type_mode_t" = xyes -then : -else -printf "%s\n" "#define mode_t int" >>confdefs.h -fi + gl_cv_lib_sigsegv="$ac_cv_libsigsegv" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for promoted mode_t type" >&5 -printf %s "checking for promoted mode_t type... " >&6; } -if test ${gl_cv_promoted_mode_t+y} +# The Clang compiler raises a warning for an undeclared identifier that matches +# a compiler builtin function. All extant Clang versions are affected, as of +# Clang 3.6.0. Test a builtin known to every version. This problem affects the +# C and Objective C languages, but Clang does report an error under C++ and +# Objective C++. +# +# Passing -fno-builtin to the compiler would suppress this problem. That +# strategy would have the advantage of being insensitive to stray warnings, but +# it would make tests less realistic. +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how $CC reports undeclared, standard C functions" >&5 +printf %s "checking how $CC reports undeclared, standard C functions... " >&6; } +if test ${ac_cv_c_decl_report+y} then : printf %s "(cached) " >&6 else - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include + int main (void) { -typedef int array[2 * (sizeof (mode_t) < sizeof (int)) - 1]; +(void) strchr; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : - gl_cv_promoted_mode_t='int' -else - gl_cv_promoted_mode_t='mode_t' -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_promoted_mode_t" >&5 -printf "%s\n" "$gl_cv_promoted_mode_t" >&6; } - -printf "%s\n" "#define PROMOTED_MODE_T $gl_cv_promoted_mode_t" >>confdefs.h - - - - - - - - - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for mbstate_t" >&5 -printf %s "checking for mbstate_t... " >&6; } -if test ${ac_cv_type_mbstate_t+y} + if test -s conftest.err then : - printf %s "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + # For AC_CHECK_DECL to react to warnings, the compiler must be silent on + # valid AC_CHECK_DECL input. No library function is consistently available + # on freestanding implementations, so test against a dummy declaration. + # Include always-available headers on the off chance that they somehow + # elicit warnings. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -$ac_includes_default -/* 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 -#include -#include -#include +extern void ac_decl (int, char *); int main (void) { -mbstate_t x; return sizeof x; +#ifdef __cplusplus + (void) ac_decl ((int) 0, (char *) 0); + (void) ac_decl; +#else + (void) ac_decl; +#endif + ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : - ac_cv_type_mbstate_t=yes + if test -s conftest.err +then : + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot detect from compiler exit status or warnings +See \`config.log' for more details" "$LINENO" 5; } else - ac_cv_type_mbstate_t=no + ac_cv_c_decl_report=warning +fi +else + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot compile a simple declaration test +See \`config.log' for more details" "$LINENO" 5; } fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +else + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "compiler does not report undeclared identifiers +See \`config.log' for more details" "$LINENO" 5; } fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_mbstate_t" >&5 -printf "%s\n" "$ac_cv_type_mbstate_t" >&6; } - if test $ac_cv_type_mbstate_t = yes; then - -printf "%s\n" "#define HAVE_MBSTATE_T 1" >>confdefs.h - - else - -printf "%s\n" "#define mbstate_t int" >>confdefs.h - - fi - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +else + ac_cv_c_decl_report=error +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_decl_report" >&5 +printf "%s\n" "$ac_cv_c_decl_report" >&6; } +case $ac_cv_c_decl_report in + warning) ac_c_decl_warn_flag=yes ;; + *) ac_c_decl_warn_flag= ;; +esac - GNULIB_FCHMODAT=0; - GNULIB_FSTAT=0; - GNULIB_FSTATAT=0; - GNULIB_FUTIMENS=0; - GNULIB_LCHMOD=0; - GNULIB_LSTAT=0; - GNULIB_MKDIRAT=0; - GNULIB_MKFIFO=0; - GNULIB_MKFIFOAT=0; - GNULIB_MKNOD=0; - GNULIB_MKNODAT=0; - GNULIB_STAT=0; - GNULIB_UTIMENSAT=0; - GNULIB_OVERRIDES_STRUCT_STAT=0; - HAVE_FCHMODAT=1; - HAVE_FSTATAT=1; - HAVE_FUTIMENS=1; - HAVE_LCHMOD=1; - HAVE_LSTAT=1; - HAVE_MKDIRAT=1; - HAVE_MKFIFO=1; - HAVE_MKFIFOAT=1; - HAVE_MKNOD=1; - HAVE_MKNODAT=1; - HAVE_UTIMENSAT=1; - REPLACE_FSTAT=0; - REPLACE_FSTATAT=0; - REPLACE_FUTIMENS=0; - REPLACE_LSTAT=0; - REPLACE_MKDIR=0; - REPLACE_MKFIFO=0; - REPLACE_MKNOD=0; - REPLACE_STAT=0; - REPLACE_UTIMENSAT=0; + GNULIB_CHDIR=0; + GNULIB_CHOWN=0; + GNULIB_CLOSE=0; + GNULIB_DUP=0; + GNULIB_DUP2=0; + GNULIB_DUP3=0; + GNULIB_ENVIRON=0; + GNULIB_EUIDACCESS=0; + GNULIB_FACCESSAT=0; + GNULIB_FCHDIR=0; + GNULIB_FCHOWNAT=0; + GNULIB_FDATASYNC=0; + GNULIB_FSYNC=0; + GNULIB_FTRUNCATE=0; + GNULIB_GETCWD=0; + GNULIB_GETDOMAINNAME=0; + GNULIB_GETDTABLESIZE=0; + GNULIB_GETGROUPS=0; + GNULIB_GETHOSTNAME=0; + GNULIB_GETLOGIN=0; + GNULIB_GETLOGIN_R=0; + GNULIB_GETPAGESIZE=0; + GNULIB_GETPASS=0; + GNULIB_GETUSERSHELL=0; + GNULIB_GROUP_MEMBER=0; + GNULIB_ISATTY=0; + GNULIB_LCHOWN=0; + GNULIB_LINK=0; + GNULIB_LINKAT=0; + GNULIB_LSEEK=0; + GNULIB_PIPE=0; + GNULIB_PIPE2=0; + GNULIB_PREAD=0; + GNULIB_PWRITE=0; + GNULIB_READ=0; + GNULIB_READLINK=0; + GNULIB_READLINKAT=0; + GNULIB_RMDIR=0; + GNULIB_SETHOSTNAME=0; + 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; + GNULIB_UNLINK=0; + GNULIB_UNLINKAT=0; + GNULIB_USLEEP=0; + GNULIB_WRITE=0; + HAVE_CHOWN=1; + HAVE_DUP2=1; + HAVE_DUP3=1; + HAVE_EUIDACCESS=1; + HAVE_FACCESSAT=1; + HAVE_FCHDIR=1; + HAVE_FCHOWNAT=1; + HAVE_FDATASYNC=1; + HAVE_FSYNC=1; + HAVE_FTRUNCATE=1; + HAVE_GETDTABLESIZE=1; + HAVE_GETGROUPS=1; + HAVE_GETHOSTNAME=1; + HAVE_GETLOGIN=1; + HAVE_GETPAGESIZE=1; + HAVE_GETPASS=1; + HAVE_GROUP_MEMBER=1; + HAVE_LCHOWN=1; + HAVE_LINK=1; + HAVE_LINKAT=1; + HAVE_PIPE=1; + HAVE_PIPE2=1; + HAVE_PREAD=1; + HAVE_PWRITE=1; + HAVE_READLINK=1; + HAVE_READLINKAT=1; + HAVE_SETHOSTNAME=1; + HAVE_SLEEP=1; + HAVE_SYMLINK=1; + HAVE_SYMLINKAT=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; + HAVE_DECL_SETHOSTNAME=1; + HAVE_DECL_TRUNCATE=1; + HAVE_DECL_TTYNAME_R=1; + HAVE_OS_H=0; + HAVE_SYS_PARAM_H=0; + REPLACE_CHOWN=0; + REPLACE_CLOSE=0; + REPLACE_DUP=0; + REPLACE_DUP2=0; + REPLACE_FACCESSAT=0; + REPLACE_FCHOWNAT=0; + REPLACE_FTRUNCATE=0; + REPLACE_GETCWD=0; + REPLACE_GETDOMAINNAME=0; + REPLACE_GETDTABLESIZE=0; + REPLACE_GETLOGIN_R=0; + REPLACE_GETGROUPS=0; + REPLACE_GETPAGESIZE=0; + REPLACE_GETPASS=0; + REPLACE_ISATTY=0; + REPLACE_LCHOWN=0; + REPLACE_LINK=0; + REPLACE_LINKAT=0; + REPLACE_LSEEK=0; + REPLACE_PREAD=0; + REPLACE_PWRITE=0; + REPLACE_READ=0; + REPLACE_READLINK=0; + REPLACE_READLINKAT=0; + REPLACE_RMDIR=0; + REPLACE_SLEEP=0; + REPLACE_SYMLINK=0; + REPLACE_SYMLINKAT=0; + REPLACE_TRUNCATE=0; + REPLACE_TTYNAME_R=0; + REPLACE_UNLINK=0; + REPLACE_UNLINKAT=0; + REPLACE_USLEEP=0; + REPLACE_WRITE=0; + UNISTD_H_HAVE_WINSOCK2_H=0; + UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0; -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5 -printf %s "checking whether stat file-mode macros are broken... " >&6; } -if test ${ac_cv_header_stat_broken+y} -then : - printf %s "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#if defined S_ISBLK && defined S_IFDIR -extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1]; -#endif -#if defined S_ISBLK && defined S_IFCHR -extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1]; -#endif -#if defined S_ISLNK && defined S_IFREG -extern char c3[S_ISLNK (S_IFREG) ? -1 : 1]; -#endif -#if defined S_ISSOCK && defined S_IFREG -extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1]; -#endif -_ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - ac_cv_header_stat_broken=no -else - ac_cv_header_stat_broken=yes -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5 -printf "%s\n" "$ac_cv_header_stat_broken" >&6; } -if test $ac_cv_header_stat_broken = yes; then -printf "%s\n" "#define STAT_MACROS_BROKEN 1" >>confdefs.h -fi + + if test $ac_cv_func__set_invalid_parameter_handler = yes; then + HAVE_MSVC_INVALID_PARAMETER_HANDLER=1 + +printf "%s\n" "#define HAVE_MSVC_INVALID_PARAMETER_HANDLER 1" >>confdefs.h + + else + HAVE_MSVC_INVALID_PARAMETER_HANDLER=0 + fi + GNULIB_IOCTL=0; + SYS_IOCTL_H_HAVE_WINSOCK2_H=0; + SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0; + REPLACE_IOCTL=0; - case "$host_os" in - mingw*) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for 64-bit off_t" >&5 -printf %s "checking for 64-bit off_t... " >&6; } -if test ${gl_cv_type_off_t_64+y} + GNULIB_OPENDIR=0; + GNULIB_READDIR=0; + GNULIB_REWINDDIR=0; + GNULIB_CLOSEDIR=0; + GNULIB_DIRFD=0; + GNULIB_FDOPENDIR=0; + GNULIB_SCANDIR=0; + GNULIB_ALPHASORT=0; + HAVE_OPENDIR=1; + HAVE_READDIR=1; + HAVE_REWINDDIR=1; + HAVE_CLOSEDIR=1; + HAVE_DECL_DIRFD=1; + HAVE_DECL_FDOPENDIR=1; + HAVE_FDOPENDIR=1; + HAVE_SCANDIR=1; + HAVE_ALPHASORT=1; + REPLACE_OPENDIR=0; + REPLACE_CLOSEDIR=0; + REPLACE_DIRFD=0; + REPLACE_FDOPENDIR=0; + + + GNULIB_ISBLANK=0; + HAVE_ISBLANK=1; + + + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the preprocessor supports include_next" >&5 +printf %s "checking whether the preprocessor supports include_next... " >&6; } +if test ${gl_cv_have_include_next+y} then : printf %s "(cached) " >&6 else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + rm -rf conftestd1a conftestd1b conftestd2 + mkdir conftestd1a conftestd1b conftestd2 + cat < conftestd1a/conftest.h +#define DEFINED_IN_CONFTESTD1 +#include_next +#ifdef DEFINED_IN_CONFTESTD2 +int foo; +#else +#error "include_next doesn't work" +#endif +EOF + cat < conftestd1b/conftest.h +#define DEFINED_IN_CONFTESTD1 +#include +#include_next +#ifdef DEFINED_IN_CONFTESTD2 +int foo; +#else +#error "include_next doesn't work" +#endif +EOF + cat < conftestd2/conftest.h +#ifndef DEFINED_IN_CONFTESTD1 +#error "include_next test doesn't work" +#endif +#define DEFINED_IN_CONFTESTD2 +EOF + gl_save_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include - int verify_off_t_size[sizeof (off_t) >= 8 ? 1 : -1]; - -int -main (void) -{ - - ; - return 0; -} +#include _ACEOF if ac_fn_c_try_compile "$LINENO" then : - gl_cv_type_off_t_64=yes + gl_cv_have_include_next=yes else - gl_cv_type_off_t_64=no + CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + gl_cv_have_include_next=buggy +else + gl_cv_have_include_next=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_off_t_64" >&5 -printf "%s\n" "$gl_cv_type_off_t_64" >&6; } - if test $gl_cv_type_off_t_64 = no; then - WINDOWS_64_BIT_OFF_T=1 - else - WINDOWS_64_BIT_OFF_T=0 - fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for 64-bit st_size" >&5 -printf %s "checking for 64-bit st_size... " >&6; } -if test ${gl_cv_member_st_size_64+y} +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CPPFLAGS="$gl_save_CPPFLAGS" + rm -rf conftestd1a conftestd1b conftestd2 + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_include_next" >&5 +printf "%s\n" "$gl_cv_have_include_next" >&6; } + PRAGMA_SYSTEM_HEADER= + if test $gl_cv_have_include_next = yes; then + INCLUDE_NEXT=include_next + INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next + if test -n "$GCC"; then + PRAGMA_SYSTEM_HEADER='#pragma GCC system_header' + fi + else + if test $gl_cv_have_include_next = buggy; then + INCLUDE_NEXT=include + INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next + else + INCLUDE_NEXT=include + INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include + fi + fi + + + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether system header files limit the line length" >&5 +printf %s "checking whether system header files limit the line length... " >&6; } +if test ${gl_cv_pragma_columns+y} then : printf %s "(cached) " >&6 else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + 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 (void) -{ +#ifdef __TANDEM +choke me +#endif - ; - return 0; -} _ACEOF -if ac_fn_c_try_compile "$LINENO" +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "choke me" >/dev/null 2>&1 then : - gl_cv_member_st_size_64=yes + gl_cv_pragma_columns=yes else - gl_cv_member_st_size_64=no + gl_cv_pragma_columns=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -rf conftest* + fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_member_st_size_64" >&5 -printf "%s\n" "$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 - WINDOWS_64_BIT_ST_SIZE=0 - ;; - esac +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_pragma_columns" >&5 +printf "%s\n" "$gl_cv_pragma_columns" >&6; } + if test $gl_cv_pragma_columns = yes; then + PRAGMA_COLUMNS="#pragma COLUMNS 10000" + else + PRAGMA_COLUMNS= + fi + + + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5 +printf %s "checking whether // is distinct from /... " >&6; } +if test ${gl_cv_double_slash_root+y} +then : + printf %s "(cached) " >&6 +else + if test x"$cross_compiling" = xyes ; then + # When cross-compiling, there is no way to tell whether // is special + # short of a list of hosts. However, the only known hosts to date + # that have a distinct // are Apollo DomainOS (too old to port to), + # Cygwin, and z/OS. If anyone knows of another system for which // has + # special semantics and is distinct from /, please report it to + # . + case $host in + *-cygwin | i370-ibm-openedition) + gl_cv_double_slash_root=yes ;; + *) + # Be optimistic and assume that / and // are the same when we + # don't know. + gl_cv_double_slash_root='unknown, assuming no' ;; + esac + else + set x `ls -di / // 2>/dev/null` + if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then + gl_cv_double_slash_root=no + else + gl_cv_double_slash_root=yes + fi + fi +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5 +printf "%s\n" "$gl_cv_double_slash_root" >&6; } + if test "$gl_cv_double_slash_root" = yes; then +printf "%s\n" "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h + fi + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for complete errno.h" >&5 +printf %s "checking for complete errno.h... " >&6; } +if test ${gl_cv_header_errno_h_complete+y} +then : + printf %s "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#if !defined ETXTBSY +booboo +#endif +#if !defined ENOMSG +booboo +#endif +#if !defined EIDRM +booboo +#endif +#if !defined ENOLINK +booboo +#endif +#if !defined EPROTO +booboo +#endif +#if !defined EMULTIHOP +booboo +#endif +#if !defined EBADMSG +booboo +#endif +#if !defined EOVERFLOW +booboo +#endif +#if !defined ENOTSUP +booboo +#endif +#if !defined ENETRESET +booboo +#endif +#if !defined ECONNABORTED +booboo +#endif +#if !defined ESTALE +booboo +#endif +#if !defined EDQUOT +booboo +#endif +#if !defined ECANCELED +booboo +#endif +#if !defined EOWNERDEAD +booboo +#endif +#if !defined ENOTRECOVERABLE +booboo +#endif +#if !defined EILSEQ +booboo +#endif +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "booboo" >/dev/null 2>&1 +then : + gl_cv_header_errno_h_complete=no +else + gl_cv_header_errno_h_complete=yes +fi +rm -rf conftest* - : +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_complete" >&5 +printf "%s\n" "$gl_cv_header_errno_h_complete" >&6; } + if test $gl_cv_header_errno_h_complete = yes; then + ERRNO_H='' + else @@ -9530,23 +10295,20 @@ if test $gl_cv_have_include_next = yes; then - gl_cv_next_sys_stat_h='<'sys/stat.h'>' + gl_cv_next_errno_h='<'errno.h'>' else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 -printf %s "checking absolute name of ... " >&6; } -if test ${gl_cv_next_sys_stat_h+y} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 +printf %s "checking absolute name of ... " >&6; } +if test ${gl_cv_next_errno_h+y} then : printf %s "(cached) " >&6 else - if test $ac_cv_header_sys_stat_h = yes; then - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include +#include _ACEOF case "$host_os" in aix*) gl_absname_cpp="$ac_cpp -C" ;; @@ -9562,7 +10324,7 @@ ;; esac gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' - gl_header_literal_regex=`echo 'sys/stat.h' \ + gl_header_literal_regex=`echo 'errno.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/ @@ -9571,336 +10333,381 @@ q }' - gl_cv_absolute_sys_stat_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | + gl_cv_absolute_errno_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | sed -n "$gl_absolute_header_sed"` - gl_header=$gl_cv_absolute_sys_stat_h - gl_cv_next_sys_stat_h='"'$gl_header'"' - else - gl_cv_next_sys_stat_h='<'sys/stat.h'>' - fi + gl_header=$gl_cv_absolute_errno_h + gl_cv_next_errno_h='"'$gl_header'"' fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5 -printf "%s\n" "$gl_cv_next_sys_stat_h" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_errno_h" >&5 +printf "%s\n" "$gl_cv_next_errno_h" >&6; } fi - NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h + NEXT_ERRNO_H=$gl_cv_next_errno_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='<'sys/stat.h'>' + gl_next_as_first_directive='<'errno.h'>' else # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' - gl_next_as_first_directive=$gl_cv_next_sys_stat_h + gl_next_as_first_directive=$gl_cv_next_errno_h fi - NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive + NEXT_AS_FIRST_DIRECTIVE_ERRNO_H=$gl_next_as_first_directive + ERRNO_H='errno.h' + fi + if test -n "$ERRNO_H"; then + GL_GENERATE_ERRNO_H_TRUE= + GL_GENERATE_ERRNO_H_FALSE='#' +else + GL_GENERATE_ERRNO_H_TRUE='#' + GL_GENERATE_ERRNO_H_FALSE= +fi + if test -n "$ERRNO_H"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for EMULTIHOP value" >&5 +printf %s "checking for EMULTIHOP value... " >&6; } +if test ${gl_cv_header_errno_h_EMULTIHOP+y} +then : + printf %s "(cached) " >&6 +else - WINDOWS_STAT_TIMESPEC=0 - - + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#ifdef EMULTIHOP +yes +#endif +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1 +then : + gl_cv_header_errno_h_EMULTIHOP=yes +else + gl_cv_header_errno_h_EMULTIHOP=no +fi +rm -rf conftest* + if test $gl_cv_header_errno_h_EMULTIHOP = no; then + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#define _XOPEN_SOURCE_EXTENDED 1 +#include +#ifdef EMULTIHOP +yes +#endif +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1 +then : + gl_cv_header_errno_h_EMULTIHOP=hidden +fi +rm -rf conftest* - ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include - #include + if test $gl_cv_header_errno_h_EMULTIHOP = hidden; then + if ac_fn_c_compute_int "$LINENO" "EMULTIHOP" "gl_cv_header_errno_h_EMULTIHOP" " +#define _XOPEN_SOURCE_EXTENDED 1 +#include +/* The following two lines are a workaround against an autoconf-2.52 bug. */ +#include +#include " -if test "x$ac_cv_type_nlink_t" = xyes then : -else +fi -printf "%s\n" "#define nlink_t int" >>confdefs.h + fi + fi fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EMULTIHOP" >&5 +printf "%s\n" "$gl_cv_header_errno_h_EMULTIHOP" >&6; } + case $gl_cv_header_errno_h_EMULTIHOP in + yes | no) + EMULTIHOP_HIDDEN=0; EMULTIHOP_VALUE= + ;; + *) + EMULTIHOP_HIDDEN=1; EMULTIHOP_VALUE="$gl_cv_header_errno_h_EMULTIHOP" + ;; + esac + + fi - for gl_func in fchmodat fstat fstatat futimens lchmod lstat mkdirat mkfifo mkfifoat mknod mknodat stat utimensat; do - as_gl_Symbol=`printf "%s\n" "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5 -printf %s "checking whether $gl_func is declared without a macro... " >&6; } -if eval test \${$as_gl_Symbol+y} + if test -n "$ERRNO_H"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ENOLINK value" >&5 +printf %s "checking for ENOLINK value... " >&6; } +if test ${gl_cv_header_errno_h_ENOLINK+y} then : printf %s "(cached) " >&6 else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include -int -main (void) -{ -#undef $gl_func - (void) $gl_func; - ; - return 0; -} +#include +#ifdef ENOLINK +yes +#endif + _ACEOF -if ac_fn_c_try_compile "$LINENO" +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1 then : - eval "$as_gl_Symbol=yes" + gl_cv_header_errno_h_ENOLINK=yes else - eval "$as_gl_Symbol=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -eval ac_res=\$$as_gl_Symbol - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } - if eval test \"x\$"$as_gl_Symbol"\" = x"yes" -then : - cat >>confdefs.h <<_ACEOF -#define `printf "%s\n" "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 -_ACEOF - - eval ac_cv_have_decl_$gl_func=yes + gl_cv_header_errno_h_ENOLINK=no fi - done - - - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5 -printf %s "checking whether lstat correctly handles trailing slash... " >&6; } -if test ${gl_cv_func_lstat_dereferences_slashed_symlink+y} -then : - printf %s "(cached) " >&6 -else - rm -f conftest.sym conftest.file - echo >conftest.file - if test "$cross_compiling" = yes -then : - case "$host_os" in - *-gnu*) - # Guess yes on glibc systems. - gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;; - *) - # If we don't know, assume the worst. - gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;; - esac +rm -rf conftest* -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + if test $gl_cv_header_errno_h_ENOLINK = no; then + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -$ac_includes_default -int -main (void) -{ -struct stat sbuf; - if (symlink ("conftest.file", "conftest.sym") != 0) - return 1; - /* Linux will dereference the symlink and fail, as required by - POSIX. That is better in the sense that it means we will not - have to compile and use the lstat wrapper. */ - return lstat ("conftest.sym/", &sbuf) == 0; - ; - return 0; -} +#define _XOPEN_SOURCE_EXTENDED 1 +#include +#ifdef ENOLINK +yes +#endif + _ACEOF -if ac_fn_c_try_run "$LINENO" +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1 then : - gl_cv_func_lstat_dereferences_slashed_symlink=yes -else - gl_cv_func_lstat_dereferences_slashed_symlink=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext + gl_cv_header_errno_h_ENOLINK=hidden fi +rm -rf conftest* - rm -f conftest.sym conftest.file + if test $gl_cv_header_errno_h_ENOLINK = hidden; then + if ac_fn_c_compute_int "$LINENO" "ENOLINK" "gl_cv_header_errno_h_ENOLINK" " +#define _XOPEN_SOURCE_EXTENDED 1 +#include +/* The following two lines are a workaround against an autoconf-2.52 bug. */ +#include +#include +" +then : fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_lstat_dereferences_slashed_symlink" >&5 -printf "%s\n" "$gl_cv_func_lstat_dereferences_slashed_symlink" >&6; } - case "$gl_cv_func_lstat_dereferences_slashed_symlink" in - *yes) - -printf "%s\n" "#define LSTAT_FOLLOWS_SLASHED_SYMLINK 1" >>confdefs.h - - ;; - esac - - - + fi + fi +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_ENOLINK" >&5 +printf "%s\n" "$gl_cv_header_errno_h_ENOLINK" >&6; } + case $gl_cv_header_errno_h_ENOLINK in + yes | no) + ENOLINK_HIDDEN=0; ENOLINK_VALUE= + ;; + *) + ENOLINK_HIDDEN=1; ENOLINK_VALUE="$gl_cv_header_errno_h_ENOLINK" + ;; + esac + fi + if test -n "$ERRNO_H"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for EOVERFLOW value" >&5 +printf %s "checking for EOVERFLOW value... " >&6; } +if test ${gl_cv_header_errno_h_EOVERFLOW+y} +then : + printf %s "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#ifdef EOVERFLOW +yes +#endif +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1 +then : + gl_cv_header_errno_h_EOVERFLOW=yes +else + gl_cv_header_errno_h_EOVERFLOW=no +fi +rm -rf conftest* + if test $gl_cv_header_errno_h_EOVERFLOW = no; then + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#define _XOPEN_SOURCE_EXTENDED 1 +#include +#ifdef EOVERFLOW +yes +#endif +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1 +then : + gl_cv_header_errno_h_EOVERFLOW=hidden +fi +rm -rf conftest* + if test $gl_cv_header_errno_h_EOVERFLOW = hidden; then + if ac_fn_c_compute_int "$LINENO" "EOVERFLOW" "gl_cv_header_errno_h_EOVERFLOW" " +#define _XOPEN_SOURCE_EXTENDED 1 +#include +/* The following two lines are a workaround against an autoconf-2.52 bug. */ +#include +#include +" +then : +fi + fi + fi +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EOVERFLOW" >&5 +printf "%s\n" "$gl_cv_header_errno_h_EOVERFLOW" >&6; } + case $gl_cv_header_errno_h_EOVERFLOW in + yes | no) + EOVERFLOW_HIDDEN=0; EOVERFLOW_VALUE= + ;; + *) + EOVERFLOW_HIDDEN=1; EOVERFLOW_VALUE="$gl_cv_header_errno_h_EOVERFLOW" + ;; + esac + 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 +printf "%s\n" "#define HAVE_DECL_STRERROR_R $ac_have_decl" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether getcwd (NULL, 0) allocates memory for result" >&5 -printf %s "checking whether getcwd (NULL, 0) allocates memory for result... " >&6; } -if test ${gl_cv_func_getcwd_null+y} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns char *" >&5 +printf %s "checking whether strerror_r returns char *... " >&6; } +if test ${ac_cv_func_strerror_r_char_p+y} then : printf %s "(cached) " >&6 else - if test "$cross_compiling" = yes -then : - case "$host_os" in - # Guess yes on glibc systems. - *-gnu*) gl_cv_func_getcwd_null="guessing yes";; - # Guess yes on Cygwin. - cygwin*) gl_cv_func_getcwd_null="guessing yes";; - # If we don't know, assume the worst. - *) gl_cv_func_getcwd_null="guessing no";; - esac -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + 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. */ - -# include -# if HAVE_UNISTD_H -# include -# else /* on Windows with MSVC */ -# include -# endif -# ifndef getcwd - char *getcwd (); -# endif - +$ac_includes_default int main (void) { -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ -/* mingw cwd does not start with '/', but getcwd does allocate. - However, mingw fails to honor non-zero size. */ -#else - if (chdir ("/") != 0) - return 1; - else - { - char *f = getcwd (NULL, 0); - if (! f) - return 2; - if (f[0] != '/') - { free (f); return 3; } - if (f[1] != '\0') - { free (f); return 4; } - free (f); - return 0; - } -#endif + 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_run "$LINENO" +if ac_fn_c_try_compile "$LINENO" then : - gl_cv_func_getcwd_null=yes -else - gl_cv_func_getcwd_null=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - + ac_cv_func_strerror_r_char_p=yes fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_null" >&5 -printf "%s\n" "$gl_cv_func_getcwd_null" >&6; } - - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for getcwd with POSIX signature" >&5 -printf %s "checking for getcwd with POSIX signature... " >&6; } -if test ${gl_cv_func_getcwd_posix_signature+y} +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 : - printf %s "(cached) " >&6 + : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include +$ac_includes_default + extern char *strerror_r (); int main (void) { -extern - #ifdef __cplusplus - "C" - #endif - char *getcwd (char *, size_t); - +char buf[100]; + char x = *strerror_r (0, buf, sizeof buf); + return ! isalpha (x); ; return 0; } - _ACEOF -if ac_fn_c_try_compile "$LINENO" +if ac_fn_c_try_run "$LINENO" then : - gl_cv_func_getcwd_posix_signature=yes -else - gl_cv_func_getcwd_posix_signature=no + ac_cv_func_strerror_r_char_p=yes fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_posix_signature" >&5 -printf "%s\n" "$gl_cv_func_getcwd_posix_signature" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strerror_r_char_p" >&5 +printf "%s\n" "$ac_cv_func_strerror_r_char_p" >&6; } +if test $ac_cv_func_strerror_r_char_p = yes; then + +printf "%s\n" "#define STRERROR_R_CHAR_P 1" >>confdefs.h +fi + XGETTEXT_EXTRA_OPTIONS= - ac_fn_c_check_decl "$LINENO" "getdtablesize" "ac_cv_have_decl_getdtablesize" "$ac_includes_default" -if test "x$ac_cv_have_decl_getdtablesize" = xyes +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 ac_have_decl=0 fi -printf "%s\n" "#define HAVE_DECL_GETDTABLESIZE $ac_have_decl" >>confdefs.h - - - - - - - - - - - - - - - +printf "%s\n" "#define HAVE_DECL_FCHDIR $ac_have_decl" >>confdefs.h - : + GNULIB_FCNTL=0; + GNULIB_NONBLOCKING=0; + GNULIB_OPEN=0; + GNULIB_OPENAT=0; + HAVE_FCNTL=1; + HAVE_OPENAT=1; + REPLACE_FCNTL=0; + REPLACE_OPEN=0; + REPLACE_OPENAT=0; @@ -9909,605 +10716,550 @@ - if test $gl_cv_have_include_next = yes; then - gl_cv_next_getopt_h='<'getopt.h'>' - else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 -printf %s "checking absolute name of ... " >&6; } -if test ${gl_cv_next_getopt_h+y} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working fcntl.h" >&5 +printf %s "checking for working fcntl.h... " >&6; } +if test ${gl_cv_header_working_fcntl_h+y} then : printf %s "(cached) " >&6 else + if test "$cross_compiling" = yes +then : + case "$host_os" in + # Guess 'no' on native Windows. + mingw*) gl_cv_header_working_fcntl_h='no' ;; + *) gl_cv_header_working_fcntl_h=cross-compiling ;; + esac - if test $ac_cv_header_getopt_h = yes; then - - - - +else 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 'getopt.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_getopt_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | - sed -n "$gl_absolute_header_sed"` - - gl_header=$gl_cv_absolute_getopt_h - gl_cv_next_getopt_h='"'$gl_header'"' - else - gl_cv_next_getopt_h='<'getopt.h'>' - fi - - -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_getopt_h" >&5 -printf "%s\n" "$gl_cv_next_getopt_h" >&6; } - fi - NEXT_GETOPT_H=$gl_cv_next_getopt_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='<'getopt.h'>' - else - # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' - gl_next_as_first_directive=$gl_cv_next_getopt_h - fi - NEXT_AS_FIRST_DIRECTIVE_GETOPT_H=$gl_next_as_first_directive - - - - - if test $ac_cv_header_getopt_h = yes; then - HAVE_GETOPT_H=1 - else - HAVE_GETOPT_H=0 - fi - +#include + #include + #if HAVE_UNISTD_H + # include + #else /* on Windows with MSVC */ + # include + # include + # defined sleep(n) _sleep ((n) * 1000) + #endif + #include + #ifndef O_NOATIME + #define O_NOATIME 0 + #endif + #ifndef O_NOFOLLOW + #define O_NOFOLLOW 0 + #endif + static int const constants[] = + { + O_CREAT, O_EXCL, O_NOCTTY, O_TRUNC, O_APPEND, + O_NONBLOCK, O_SYNC, O_ACCMODE, O_RDONLY, O_RDWR, O_WRONLY + }; - gl_replace_getopt= - - if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then - for ac_header in getopt.h -do : - ac_fn_c_check_header_compile "$LINENO" "getopt.h" "ac_cv_header_getopt_h" "$ac_includes_default" -if test "x$ac_cv_header_getopt_h" = xyes -then : - printf "%s\n" "#define HAVE_GETOPT_H 1" >>confdefs.h +int +main (void) +{ + int result = !constants; + #if HAVE_SYMLINK + { + static char const sym[] = "conftest.sym"; + if (symlink ("/dev/null", sym) != 0) + result |= 2; + else + { + int fd = open (sym, O_WRONLY | O_NOFOLLOW | O_CREAT, 0); + if (fd >= 0) + { + close (fd); + result |= 4; + } + } + if (unlink (sym) != 0 || symlink (".", sym) != 0) + result |= 2; + else + { + int fd = open (sym, O_RDONLY | O_NOFOLLOW); + if (fd >= 0) + { + close (fd); + result |= 4; + } + } + unlink (sym); + } + #endif + { + static char const file[] = "confdefs.h"; + int fd = open (file, O_RDONLY | O_NOATIME); + if (fd < 0) + result |= 8; + else + { + struct stat st0; + if (fstat (fd, &st0) != 0) + result |= 16; + else + { + char c; + sleep (1); + if (read (fd, &c, 1) != 1) + result |= 24; + else + { + if (close (fd) != 0) + result |= 32; + else + { + struct stat st1; + if (stat (file, &st1) != 0) + result |= 40; + else + if (st0.st_atime != st1.st_atime) + result |= 64; + } + } + } + } + } + return result; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO" +then : + gl_cv_header_working_fcntl_h=yes else - gl_replace_getopt=yes + case $? in #( + 4) gl_cv_header_working_fcntl_h='no (bad O_NOFOLLOW)';; #( + 64) gl_cv_header_working_fcntl_h='no (bad O_NOATIME)';; #( + 68) gl_cv_header_working_fcntl_h='no (bad O_NOATIME, O_NOFOLLOW)';; #( + *) gl_cv_header_working_fcntl_h='no';; + esac +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext fi -done - fi - if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then - for ac_func in getopt_long_only -do : - ac_fn_c_check_func "$LINENO" "getopt_long_only" "ac_cv_func_getopt_long_only" -if test "x$ac_cv_func_getopt_long_only" = xyes +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_fcntl_h" >&5 +printf "%s\n" "$gl_cv_header_working_fcntl_h" >&6; } + + case $gl_cv_header_working_fcntl_h in #( + *O_NOATIME* | no | cross-compiling) ac_val=0;; #( + *) ac_val=1;; + esac + +printf "%s\n" "#define HAVE_WORKING_O_NOATIME $ac_val" >>confdefs.h + + + case $gl_cv_header_working_fcntl_h in #( + *O_NOFOLLOW* | no | cross-compiling) ac_val=0;; #( + *) ac_val=1;; + esac + +printf "%s\n" "#define HAVE_WORKING_O_NOFOLLOW $ac_val" >>confdefs.h + + +ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default" +if test "x$ac_cv_type_pid_t" = xyes then : - printf "%s\n" "#define HAVE_GETOPT_LONG_ONLY 1" >>confdefs.h else - gl_replace_getopt=yes -fi -done - fi +printf "%s\n" "#define pid_t int" >>confdefs.h - if test -z "$gl_replace_getopt"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether getopt is POSIX compatible" >&5 -printf %s "checking whether getopt is POSIX compatible... " >&6; } -if test ${gl_cv_func_getopt_posix+y} +fi + +ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default" +if test "x$ac_cv_type_mode_t" = xyes then : - printf %s "(cached) " >&6 + else - if test $cross_compiling = no; then - if test "$cross_compiling" = yes +printf "%s\n" "#define mode_t int" >>confdefs.h + +fi + + + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for promoted mode_t type" >&5 +printf %s "checking for promoted mode_t type... " >&6; } +if test ${gl_cv_promoted_mode_t+y} then : - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot run test program while cross compiling -See \`config.log' for more details" "$LINENO" 5; } + printf %s "(cached) " >&6 else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include -#include -#include + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include int -main () +main (void) { - static char program[] = "program"; - static char a[] = "-a"; - static char foo[] = "foo"; - static char bar[] = "bar"; - char *argv[] = { program, a, foo, bar, NULL }; - int c; - - c = getopt (4, argv, "ab"); - if (!(c == 'a')) - return 1; - c = getopt (4, argv, "ab"); - if (!(c == -1)) - return 2; - if (!(optind == 2)) - return 3; +typedef int array[2 * (sizeof (mode_t) < sizeof (int)) - 1]; + ; return 0; } - _ACEOF -if ac_fn_c_try_run "$LINENO" +if ac_fn_c_try_compile "$LINENO" then : - gl_cv_func_getopt_posix=maybe + gl_cv_promoted_mode_t='int' else - gl_cv_func_getopt_posix=no + gl_cv_promoted_mode_t='mode_t' fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_promoted_mode_t" >&5 +printf "%s\n" "$gl_cv_promoted_mode_t" >&6; } - if test $gl_cv_func_getopt_posix = maybe; then - if test "$cross_compiling" = yes +printf "%s\n" "#define PROMOTED_MODE_T $gl_cv_promoted_mode_t" >>confdefs.h + + + + + + GNULIB_FNMATCH=0; + HAVE_FNMATCH=1; + REPLACE_FNMATCH=0; + + + + + + + + + + + + + + + + if test $gl_cv_have_include_next = yes; then + gl_cv_next_fnmatch_h='<'fnmatch.h'>' + else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 +printf %s "checking absolute name of ... " >&6; } +if test ${gl_cv_next_fnmatch_h+y} then : - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot run test program while cross compiling -See \`config.log' for more details" "$LINENO" 5; } + printf %s "(cached) " >&6 else + + if test $ac_cv_header_fnmatch_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 'fnmatch.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_fnmatch_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | + sed -n "$gl_absolute_header_sed"` + + gl_header=$gl_cv_absolute_fnmatch_h + gl_cv_next_fnmatch_h='"'$gl_header'"' + else + gl_cv_next_fnmatch_h='<'fnmatch.h'>' + fi + + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_fnmatch_h" >&5 +printf "%s\n" "$gl_cv_next_fnmatch_h" >&6; } + fi + NEXT_FNMATCH_H=$gl_cv_next_fnmatch_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='<'fnmatch.h'>' + else + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' + gl_next_as_first_directive=$gl_cv_next_fnmatch_h + fi + NEXT_AS_FIRST_DIRECTIVE_FNMATCH_H=$gl_next_as_first_directive + + + + + + + + if test $ac_cv_header_fnmatch_h = yes; then + HAVE_FNMATCH_H=1 + else + HAVE_FNMATCH_H=0 + fi + + + FNMATCH_H='' + if false; then + FNMATCH_H=fnmatch.h + else + if test $ac_cv_header_fnmatch_h != yes; then + FNMATCH_H=fnmatch.h + fi + fi + + + if test -n "$FNMATCH_H"; then + GL_GENERATE_FNMATCH_H_TRUE= + GL_GENERATE_FNMATCH_H_FALSE='#' +else + GL_GENERATE_FNMATCH_H_TRUE='#' + GL_GENERATE_FNMATCH_H_FALSE= +fi + + + + + + -#include -#include -#include + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for mbstate_t" >&5 +printf %s "checking for mbstate_t... " >&6; } +if test ${ac_cv_type_mbstate_t+y} +then : + printf %s "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_includes_default +/* 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 int -main () +main (void) { - static char program[] = "program"; - static char donald[] = "donald"; - static char p[] = "-p"; - static char billy[] = "billy"; - static char duck[] = "duck"; - static char a[] = "-a"; - static char bar[] = "bar"; - char *argv[] = { program, donald, p, billy, duck, a, bar, NULL }; - int c; - - c = getopt (7, argv, "+abp:q:"); - if (!(c == -1)) - return 4; - if (!(strcmp (argv[0], "program") == 0)) - return 5; - if (!(strcmp (argv[1], "donald") == 0)) - return 6; - if (!(strcmp (argv[2], "-p") == 0)) - return 7; - if (!(strcmp (argv[3], "billy") == 0)) - return 8; - if (!(strcmp (argv[4], "duck") == 0)) - return 9; - if (!(strcmp (argv[5], "-a") == 0)) - return 10; - if (!(strcmp (argv[6], "bar") == 0)) - return 11; - if (!(optind == 1)) - return 12; +mbstate_t x; return sizeof x; + ; return 0; } - _ACEOF -if ac_fn_c_try_run "$LINENO" +if ac_fn_c_try_compile "$LINENO" then : - gl_cv_func_getopt_posix=maybe + ac_cv_type_mbstate_t=yes else - gl_cv_func_getopt_posix=no + ac_cv_type_mbstate_t=no fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_mbstate_t" >&5 +printf "%s\n" "$ac_cv_type_mbstate_t" >&6; } + if test $ac_cv_type_mbstate_t = yes; then - fi - if test $gl_cv_func_getopt_posix = maybe; then - if test "$cross_compiling" = yes +printf "%s\n" "#define HAVE_MBSTATE_T 1" >>confdefs.h + + else + +printf "%s\n" "#define mbstate_t int" >>confdefs.h + + fi + + + + + + + + + + + GNULIB_FCHMODAT=0; + GNULIB_FSTAT=0; + GNULIB_FSTATAT=0; + GNULIB_FUTIMENS=0; + GNULIB_LCHMOD=0; + GNULIB_LSTAT=0; + GNULIB_MKDIRAT=0; + GNULIB_MKFIFO=0; + GNULIB_MKFIFOAT=0; + GNULIB_MKNOD=0; + GNULIB_MKNODAT=0; + GNULIB_STAT=0; + GNULIB_UTIMENSAT=0; + GNULIB_OVERRIDES_STRUCT_STAT=0; + HAVE_FCHMODAT=1; + HAVE_FSTATAT=1; + HAVE_FUTIMENS=1; + HAVE_LCHMOD=1; + HAVE_LSTAT=1; + HAVE_MKDIRAT=1; + HAVE_MKFIFO=1; + HAVE_MKFIFOAT=1; + HAVE_MKNOD=1; + HAVE_MKNODAT=1; + HAVE_UTIMENSAT=1; + REPLACE_FSTAT=0; + REPLACE_FSTATAT=0; + REPLACE_FUTIMENS=0; + REPLACE_LSTAT=0; + REPLACE_MKDIR=0; + REPLACE_MKFIFO=0; + REPLACE_MKNOD=0; + REPLACE_STAT=0; + REPLACE_UTIMENSAT=0; + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5 +printf %s "checking whether stat file-mode macros are broken... " >&6; } +if test ${ac_cv_header_stat_broken+y} then : - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot run test program while cross compiling -See \`config.log' for more details" "$LINENO" 5; } + printf %s "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ +#include +#include -#include -#include -#include +#if defined S_ISBLK && defined S_IFDIR +extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1]; +#endif -int -main () -{ - static char program[] = "program"; - static char ab[] = "-ab"; - char *argv[3] = { program, ab, NULL }; - if (getopt (2, argv, "ab:") != 'a') - return 13; - if (getopt (2, argv, "ab:") != '?') - return 14; - if (optopt != 'b') - return 15; - if (optind != 2) - return 16; - return 0; -} +#if defined S_ISBLK && defined S_IFCHR +extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1]; +#endif + +#if defined S_ISLNK && defined S_IFREG +extern char c3[S_ISLNK (S_IFREG) ? -1 : 1]; +#endif + +#if defined S_ISSOCK && defined S_IFREG +extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1]; +#endif _ACEOF -if ac_fn_c_try_run "$LINENO" +if ac_fn_c_try_compile "$LINENO" then : - gl_cv_func_getopt_posix=yes + ac_cv_header_stat_broken=no else - gl_cv_func_getopt_posix=no + ac_cv_header_stat_broken=yes fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5 +printf "%s\n" "$ac_cv_header_stat_broken" >&6; } +if test $ac_cv_header_stat_broken = yes; then - fi - else - case "$host_os" in - darwin* | aix* | mingw*) gl_cv_func_getopt_posix="guessing no";; - *) gl_cv_func_getopt_posix="guessing yes";; - esac - fi +printf "%s\n" "#define STAT_MACROS_BROKEN 1" >>confdefs.h fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_posix" >&5 -printf "%s\n" "$gl_cv_func_getopt_posix" >&6; } - case "$gl_cv_func_getopt_posix" in - *no) gl_replace_getopt=yes ;; - esac - fi - if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt function" >&5 -printf %s "checking for working GNU getopt function... " >&6; } -if test ${gl_cv_func_getopt_gnu+y} + + + case "$host_os" in + mingw*) + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for 64-bit off_t" >&5 +printf %s "checking for 64-bit off_t... " >&6; } +if test ${gl_cv_type_off_t_64+y} then : printf %s "(cached) " >&6 else - # Even with POSIXLY_CORRECT, the GNU extension of leading '-' in the - # optstring is necessary for programs like m4 that have POSIX-mandated - # semantics for supporting options interspersed with files. - # Also, since getopt_long is a GNU extension, we require optind=0. - # Bash ties 'set -o posix' to a non-exported POSIXLY_CORRECT; - # so take care to revert to the correct (non-)export state. - gl_awk_probe='BEGIN { if ("POSIXLY_CORRECT" in ENVIRON) print "x" }' - case ${POSIXLY_CORRECT+x}`$AWK "$gl_awk_probe" conftest.$ac_ext /* end confdefs.h. */ -#include - #include - #include - -#include -#if defined __MACH__ && defined __APPLE__ -/* Avoid a crash on Mac OS X. */ -#include -#include -#include -#include -#include -#include -/* The exception port on which our thread listens. */ -static mach_port_t our_exception_port; -/* The main function of the thread listening for exceptions of type - EXC_BAD_ACCESS. */ -static void * -mach_exception_thread (void *arg) -{ - /* Buffer for a message to be received. */ - struct { - mach_msg_header_t head; - mach_msg_body_t msgh_body; - char data[1024]; - } msg; - mach_msg_return_t retval; - /* Wait for a message on the exception port. */ - retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg), - our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL); - if (retval != MACH_MSG_SUCCESS) - abort (); - exit (1); -} -static void -nocrash_init (void) -{ - mach_port_t self = mach_task_self (); - /* Allocate a port on which the thread shall listen for exceptions. */ - if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port) - == KERN_SUCCESS) { - /* See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html. */ - if (mach_port_insert_right (self, our_exception_port, our_exception_port, - MACH_MSG_TYPE_MAKE_SEND) - == KERN_SUCCESS) { - /* The exceptions we want to catch. Only EXC_BAD_ACCESS is interesting - for us. */ - exception_mask_t mask = EXC_MASK_BAD_ACCESS; - /* Create the thread listening on the exception port. */ - pthread_attr_t attr; - pthread_t thread; - if (pthread_attr_init (&attr) == 0 - && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0 - && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) { - pthread_attr_destroy (&attr); - /* Replace the exception port info for these exceptions with our own. - Note that we replace the exception port for the entire task, not only - for a particular thread. This has the effect that when our exception - port gets the message, the thread specific exception port has already - been asked, and we don't need to bother about it. - See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html. */ - task_set_exception_ports (self, mask, our_exception_port, - EXCEPTION_DEFAULT, MACHINE_THREAD_STATE); - } - } - } -} -#elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ -/* Avoid a crash on native Windows. */ -#define WIN32_LEAN_AND_MEAN -#include -#include -static LONG WINAPI -exception_filter (EXCEPTION_POINTERS *ExceptionInfo) -{ - switch (ExceptionInfo->ExceptionRecord->ExceptionCode) - { - case EXCEPTION_ACCESS_VIOLATION: - case EXCEPTION_IN_PAGE_ERROR: - case EXCEPTION_STACK_OVERFLOW: - case EXCEPTION_GUARD_PAGE: - case EXCEPTION_PRIV_INSTRUCTION: - case EXCEPTION_ILLEGAL_INSTRUCTION: - case EXCEPTION_DATATYPE_MISALIGNMENT: - case EXCEPTION_ARRAY_BOUNDS_EXCEEDED: - case EXCEPTION_NONCONTINUABLE_EXCEPTION: - exit (1); - } - return EXCEPTION_CONTINUE_SEARCH; -} -static void -nocrash_init (void) -{ - SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter); -} -#else -/* Avoid a crash on POSIX systems. */ -#include -#include -/* A POSIX signal handler. */ -static void -exception_handler (int sig) -{ - _exit (1); -} -static void -nocrash_init (void) -{ -#ifdef SIGSEGV - signal (SIGSEGV, exception_handler); -#endif -#ifdef SIGBUS - signal (SIGBUS, exception_handler); -#endif -} -#endif - +#include + int verify_off_t_size[sizeof (off_t) >= 8 ? 1 : -1]; int main (void) { - int result = 0; - - nocrash_init(); - - /* This code succeeds on glibc 2.8, OpenBSD 4.0, Cygwin, mingw, - and fails on Mac OS X 10.5, AIX 5.2, HP-UX 11, IRIX 6.5, - OSF/1 5.1, Solaris 10. */ - { - static char conftest[] = "conftest"; - static char plus[] = "-+"; - char *argv[3] = { conftest, plus, NULL }; - opterr = 0; - if (getopt (2, argv, "+a") != '?') - result |= 1; - } - /* This code succeeds on glibc 2.8, mingw, - and fails on Mac OS X 10.5, OpenBSD 4.0, AIX 5.2, HP-UX 11, - IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin 1.5.x. */ - { - static char program[] = "program"; - static char p[] = "-p"; - static char foo[] = "foo"; - static char bar[] = "bar"; - char *argv[] = { program, p, foo, bar, NULL }; - - optind = 1; - if (getopt (4, argv, "p::") != 'p') - result |= 2; - else if (optarg != NULL) - result |= 4; - else if (getopt (4, argv, "p::") != -1) - result |= 6; - else if (optind != 2) - result |= 8; - } - /* This code succeeds on glibc 2.8 and fails on Cygwin 1.7.0. */ - { - static char program[] = "program"; - static char foo[] = "foo"; - static char p[] = "-p"; - char *argv[] = { program, foo, p, NULL }; - optind = 0; - if (getopt (3, argv, "-p") != 1) - result |= 16; - else if (getopt (3, argv, "-p") != 'p') - result |= 16; - } - /* This code fails on glibc 2.11. */ - { - static char program[] = "program"; - static char b[] = "-b"; - static char a[] = "-a"; - char *argv[] = { program, b, a, NULL }; - optind = opterr = 0; - if (getopt (3, argv, "+:a:b") != 'b') - result |= 32; - else if (getopt (3, argv, "+:a:b") != ':') - result |= 32; - } - /* This code dumps core on glibc 2.14. */ - { - static char program[] = "program"; - static char w[] = "-W"; - static char dummy[] = "dummy"; - char *argv[] = { program, w, dummy, NULL }; - optind = opterr = 1; - if (getopt (3, argv, "W;") != 'W') - result |= 64; - } - return result; - ; return 0; } _ACEOF -if ac_fn_c_try_run "$LINENO" +if ac_fn_c_try_compile "$LINENO" then : - gl_cv_func_getopt_gnu=yes + gl_cv_type_off_t_64=yes else - gl_cv_func_getopt_gnu=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext + gl_cv_type_off_t_64=no fi - - case $gl_had_POSIXLY_CORRECT in - exported) ;; - yes) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;}; POSIXLY_CORRECT=1 ;; - *) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;} ;; - esac +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_gnu" >&5 -printf "%s\n" "$gl_cv_func_getopt_gnu" >&6; } - if test "$gl_cv_func_getopt_gnu" != yes; then - gl_replace_getopt=yes - else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt_long function" >&5 -printf %s "checking for working GNU getopt_long function... " >&6; } -if test ${gl_cv_func_getopt_long_gnu+y} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_off_t_64" >&5 +printf "%s\n" "$gl_cv_type_off_t_64" >&6; } + if test $gl_cv_type_off_t_64 = no; then + WINDOWS_64_BIT_OFF_T=1 + else + WINDOWS_64_BIT_OFF_T=0 + fi + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for 64-bit st_size" >&5 +printf %s "checking for 64-bit st_size... " >&6; } +if test ${gl_cv_member_st_size_64+y} then : printf %s "(cached) " >&6 else - if test "$cross_compiling" = yes -then : - case "$host_os" in - openbsd*) gl_cv_func_getopt_long_gnu="guessing no";; - *) gl_cv_func_getopt_long_gnu="guessing yes";; - esac - -else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include - #include - #include +#include + struct stat buf; + int verify_st_size_size[sizeof (buf.st_size) >= 8 ? 1 : -1]; int main (void) { -static const struct option long_options[] = - { - { "xtremely-",no_argument, NULL, 1003 }, - { "xtra", no_argument, NULL, 1001 }, - { "xtreme", no_argument, NULL, 1002 }, - { "xtremely", no_argument, NULL, 1003 }, - { NULL, 0, NULL, 0 } - }; - /* This code fails on OpenBSD 5.0. */ - { - static char program[] = "program"; - static char xtremel[] = "--xtremel"; - char *argv[] = { program, xtremel, NULL }; - int option_index; - optind = 1; opterr = 0; - if (getopt_long (2, argv, "", long_options, &option_index) != 1003) - return 1; - } - return 0; ; return 0; } _ACEOF -if ac_fn_c_try_run "$LINENO" +if ac_fn_c_try_compile "$LINENO" then : - gl_cv_func_getopt_long_gnu=yes + gl_cv_member_st_size_64=yes else - gl_cv_func_getopt_long_gnu=no + gl_cv_member_st_size_64=no fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_member_st_size_64" >&5 +printf "%s\n" "$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 + WINDOWS_64_BIT_ST_SIZE=0 + ;; + esac -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_long_gnu" >&5 -printf "%s\n" "$gl_cv_func_getopt_long_gnu" >&6; } - case "$gl_cv_func_getopt_long_gnu" in - *yes) ;; - *) gl_replace_getopt=yes ;; - esac - fi - fi @@ -10521,306 +11273,332 @@ + if test $gl_cv_have_include_next = yes; then + gl_cv_next_sys_stat_h='<'sys/stat.h'>' + else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 +printf %s "checking absolute name of ... " >&6; } +if test ${gl_cv_next_sys_stat_h+y} +then : + printf %s "(cached) " >&6 +else + + if test $ac_cv_header_sys_stat_h = yes; then - if test "X$prefix" = "XNONE"; then - acl_final_prefix="$ac_default_prefix" - else - acl_final_prefix="$prefix" - fi - if test "X$exec_prefix" = "XNONE"; then - acl_final_exec_prefix='${prefix}' - else - acl_final_exec_prefix="$exec_prefix" - fi - acl_save_prefix="$prefix" - prefix="$acl_final_prefix" - eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" - prefix="$acl_save_prefix" + 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 'sys/stat.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_sys_stat_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | + sed -n "$gl_absolute_header_sed"` -# Check whether --with-gnu-ld was given. -if test ${with_gnu_ld+y} -then : - withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes -else - with_gnu_ld=no -fi + gl_header=$gl_cv_absolute_sys_stat_h + gl_cv_next_sys_stat_h='"'$gl_header'"' + else + gl_cv_next_sys_stat_h='<'sys/stat.h'>' + fi -# 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 -if test -n "$LD"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ld" >&5 -printf %s "checking for ld... " >&6; } -elif test "$GCC" = yes; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 -printf %s "checking for ld used by $CC... " >&6; } -elif test "$with_gnu_ld" = yes; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 -printf %s "checking for GNU ld... " >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 -printf %s "checking for non-GNU ld... " >&6; } fi -if test -n "$LD"; then - # Let the user override the test with a path. - : -else - if test ${acl_cv_path_LD+y} -then : - printf %s "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5 +printf "%s\n" "$gl_cv_next_sys_stat_h" >&6; } + fi + NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h - acl_cv_path_LD= # Final result of this test - ac_prog=ld # Program to search in $PATH - if test "$GCC" = yes; then - # Check if gcc -print-prog-name=ld gives a path. - case $host in - *-*-mingw*) - # gcc leaves a trailing carriage return which upsets mingw - acl_output=`($CC -print-prog-name=ld) 2>&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 - 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 + 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='<'sys/stat.h'>' + else + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' + gl_next_as_first_directive=$gl_cv_next_sys_stat_h + fi + NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive -_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 -rf conftest* - ;; - esac -fi - LD="$acl_cv_path_LD" -fi -if test -n "$LD"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LD" >&5 -printf "%s\n" "$LD" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 -printf %s "checking if the linker ($LD) is GNU ld... " >&6; } -if test ${acl_cv_prog_gnu_ld+y} -then : - printf %s "(cached) " >&6 -else - # I'd rather use --version here, but apparently some GNU lds only accept -v. -case `$LD -v 2>&1 &5 -printf "%s\n" "$acl_cv_prog_gnu_ld" >&6; } -with_gnu_ld=$acl_cv_prog_gnu_ld + WINDOWS_STAT_TIMESPEC=0 - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5 -printf %s "checking for shared library run path origin... " >&6; } -if test ${acl_cv_rpath+y} -then : - printf %s "(cached) " >&6 -else - CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ - ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh - . ./conftest.sh - rm -f ./conftest.sh - acl_cv_rpath=done -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5 -printf "%s\n" "$acl_cv_rpath" >&6; } - wl="$acl_cv_wl" - acl_libext="$acl_cv_libext" - acl_shlibext="$acl_cv_shlibext" - acl_libname_spec="$acl_cv_libname_spec" - acl_library_names_spec="$acl_cv_library_names_spec" - acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" - acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" - acl_hardcode_direct="$acl_cv_hardcode_direct" - acl_hardcode_minus_L="$acl_cv_hardcode_minus_L" - # Check whether --enable-rpath was given. -if test ${enable_rpath+y} + + + + + + ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include + #include +" +if test "x$ac_cv_type_nlink_t" = xyes then : - enableval=$enable_rpath; : + else - enable_rpath=yes + +printf "%s\n" "#define nlink_t int" >>confdefs.h + fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the common suffixes of directories in the library search path" >&5 -printf %s "checking for the common suffixes of directories in the library search path... " >&6; } -if test ${acl_cv_libdirstems+y} + + + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5 +printf %s "checking whether lstat correctly handles trailing slash... " >&6; } +if test ${gl_cv_func_lstat_dereferences_slashed_symlink+y} then : printf %s "(cached) " >&6 else - acl_libdirstem=lib - acl_libdirstem2= - case "$host_os" in - solaris*) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for 64-bit host" >&5 -printf %s "checking for 64-bit host... " >&6; } -if test ${gl_cv_solaris_64bit+y} + rm -f conftest.sym conftest.file + echo >conftest.file + if test "$cross_compiling" = yes +then : + case "$host_os" in + linux-* | linux) + # Guess yes on Linux systems. + gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;; + *-gnu* | gnu*) + # Guess yes on glibc systems. + gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;; + mingw*) + # Guess no on native Windows. + gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;; + *) + # If we don't know, assume the worst. + gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;; + esac + +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_includes_default +int +main (void) +{ +struct stat sbuf; + if (symlink ("conftest.file", "conftest.sym") != 0) + return 1; + /* Linux will dereference the symlink and fail, as required by + POSIX. That is better in the sense that it means we will not + have to compile and use the lstat wrapper. */ + return lstat ("conftest.sym/", &sbuf) == 0; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO" +then : + gl_cv_func_lstat_dereferences_slashed_symlink=yes +else + gl_cv_func_lstat_dereferences_slashed_symlink=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + rm -f conftest.sym conftest.file + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_lstat_dereferences_slashed_symlink" >&5 +printf "%s\n" "$gl_cv_func_lstat_dereferences_slashed_symlink" >&6; } + case "$gl_cv_func_lstat_dereferences_slashed_symlink" in + *yes) + +printf "%s\n" "#define LSTAT_FOLLOWS_SLASHED_SYMLINK 1" >>confdefs.h + + ;; + esac + + + + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for O_CLOEXEC" >&5 +printf %s "checking for O_CLOEXEC... " >&6; } +if test ${gl_cv_macro_O_CLOEXEC+y} then : printf %s "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ +#include + #ifndef O_CLOEXEC + choke me; + #endif -#ifdef _LP64 -sixtyfour bits +int +main (void) +{ +return O_CLOEXEC; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + gl_cv_macro_O_CLOEXEC=yes +else + gl_cv_macro_O_CLOEXEC=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_macro_O_CLOEXEC" >&5 +printf "%s\n" "$gl_cv_macro_O_CLOEXEC" >&6; } + + + + + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether getcwd (NULL, 0) allocates memory for result" >&5 +printf %s "checking whether getcwd (NULL, 0) allocates memory for result... " >&6; } +if test ${gl_cv_func_getcwd_null+y} +then : + printf %s "(cached) " >&6 +else + if test "$cross_compiling" = yes +then : + case "$host_os" in + # Guess yes on glibc systems. + *-gnu* | gnu*) gl_cv_func_getcwd_null="guessing yes";; + # Guess yes on Cygwin. + cygwin*) gl_cv_func_getcwd_null="guessing yes";; + # If we don't know, assume the worst. + *) gl_cv_func_getcwd_null="guessing no";; + esac + +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +# include +# if HAVE_UNISTD_H +# include +# else /* on Windows with MSVC */ +# include +# endif +# ifndef getcwd + char *getcwd (); +# endif + +int +main (void) +{ + +#if defined _WIN32 && ! defined __CYGWIN__ +/* mingw cwd does not start with '/', but getcwd does allocate. + However, mingw fails to honor non-zero size. */ +#else + if (chdir ("/") != 0) + return 1; + else + { + char *f = getcwd (NULL, 0); + if (! f) + return 2; + if (f[0] != '/') + { free (f); return 3; } + if (f[1] != '\0') + { free (f); return 4; } + free (f); + return 0; + } #endif + ; + return 0; +} _ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "sixtyfour bits" >/dev/null 2>&1 +if ac_fn_c_try_run "$LINENO" then : - gl_cv_solaris_64bit=yes + gl_cv_func_getcwd_null=yes else - gl_cv_solaris_64bit=no + gl_cv_func_getcwd_null=no fi -rm -rf conftest* +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_null" >&5 +printf "%s\n" "$gl_cv_func_getcwd_null" >&6; } + + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for getcwd with POSIX signature" >&5 +printf %s "checking for getcwd with POSIX signature... " >&6; } +if test ${gl_cv_func_getcwd_posix_signature+y} +then : + printf %s "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main (void) +{ +extern + #ifdef __cplusplus + "C" + #endif + char *getcwd (char *, size_t); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + gl_cv_func_getcwd_posix_signature=yes +else + gl_cv_func_getcwd_posix_signature=no fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_solaris_64bit" >&5 -printf "%s\n" "$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=`(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" +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $acl_cv_libdirstems" >&5 -printf "%s\n" "$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/.*,//'` +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_posix_signature" >&5 +printf "%s\n" "$gl_cv_func_getcwd_posix_signature" >&6; } +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 + ac_have_decl=0 +fi + +printf "%s\n" "#define HAVE_DECL_GETDTABLESIZE $ac_have_decl" >>confdefs.h @@ -10831,710 +11609,516 @@ - use_additional=yes - acl_save_prefix="$prefix" - prefix="$acl_final_prefix" - acl_save_exec_prefix="$exec_prefix" - exec_prefix="$acl_final_exec_prefix" - eval additional_includedir=\"$includedir\" - eval additional_libdir=\"$libdir\" - exec_prefix="$acl_save_exec_prefix" - prefix="$acl_save_prefix" -# Check whether --with-libiconv-prefix was given. -if test ${with_libiconv_prefix+y} + if test $gl_cv_have_include_next = yes; then + gl_cv_next_getopt_h='<'getopt.h'>' + else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 +printf %s "checking absolute name of ... " >&6; } +if test ${gl_cv_next_getopt_h+y} then : - withval=$with_libiconv_prefix; - if test "X$withval" = "Xno"; then - use_additional=no - else - if test "X$withval" = "X"; then + printf %s "(cached) " >&6 +else - acl_save_prefix="$prefix" - prefix="$acl_final_prefix" - acl_save_exec_prefix="$exec_prefix" - exec_prefix="$acl_final_exec_prefix" + if test $ac_cv_header_getopt_h = yes; then - eval additional_includedir=\"$includedir\" - eval additional_libdir=\"$libdir\" - exec_prefix="$acl_save_exec_prefix" - prefix="$acl_save_prefix" - else - additional_includedir="$withval/include" - additional_libdir="$withval/$acl_libdirstem" - if test "$acl_libdirstem2" != "$acl_libdirstem" \ - && ! test -d "$withval/$acl_libdirstem"; then - additional_libdir="$withval/$acl_libdirstem2" - fi - fi - fi -fi + 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 - LIBICONV= - LTLIBICONV= - INCICONV= - LIBICONV_PREFIX= - HAVE_LIBICONV= - rpathdirs= - ltrpathdirs= - names_already_handled= - names_next_round='iconv ' - while test -n "$names_next_round"; do - names_this_round="$names_next_round" - names_next_round= - for name in $names_this_round; do - already_handled= - for n in $names_already_handled; do - if test "$n" = "$name"; then - already_handled=yes - break - fi - done - if test -z "$already_handled"; then - names_already_handled="$names_already_handled $name" - uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'` - eval value=\"\$HAVE_LIB$uppername\" - if test -n "$value"; then - if test "$value" = yes; then - eval value=\"\$LIB$uppername\" - test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value" - eval value=\"\$LTLIB$uppername\" - test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value" - else - : - fi - else - found_dir= - found_la= - found_so= - found_a= - eval libname=\"$acl_libname_spec\" # typically: libname=lib$name - if test -n "$acl_shlibext"; then - shrext=".$acl_shlibext" # typically: shrext=.so - else - shrext= - fi - if test $use_additional = yes; then - dir="$additional_libdir" - if test -n "$acl_shlibext"; then - if test -f "$dir/$libname$shrext"; then - found_dir="$dir" - found_so="$dir/$libname$shrext" - else - if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then - ver=`(cd "$dir" && \ - for f in "$libname$shrext".*; do echo "$f"; done \ - | sed -e "s,^$libname$shrext\\\\.,," \ - | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ - | sed 1q ) 2>/dev/null` - if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then - found_dir="$dir" - found_so="$dir/$libname$shrext.$ver" - fi - else - eval library_names=\"$acl_library_names_spec\" - for f in $library_names; do - if test -f "$dir/$f"; then - found_dir="$dir" - found_so="$dir/$f" - break - fi - done - fi - fi - fi - if test "X$found_dir" = "X"; then - if test -f "$dir/$libname.$acl_libext"; then - found_dir="$dir" - found_a="$dir/$libname.$acl_libext" - fi - fi - if test "X$found_dir" != "X"; then - if test -f "$dir/$libname.la"; then - found_la="$dir/$libname.la" - fi - fi - fi - if test "X$found_dir" = "X"; then - for x in $LDFLAGS $LTLIBICONV; do + case "$host_os" in + mingw*) + gl_dirsep_regex='[/\\]' + ;; + *) + gl_dirsep_regex='\/' + ;; + esac + gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' + gl_header_literal_regex=`echo 'getopt.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 + }' - acl_save_prefix="$prefix" - prefix="$acl_final_prefix" - acl_save_exec_prefix="$exec_prefix" - exec_prefix="$acl_final_exec_prefix" - eval x=\"$x\" - exec_prefix="$acl_save_exec_prefix" - prefix="$acl_save_prefix" + gl_cv_absolute_getopt_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | + sed -n "$gl_absolute_header_sed"` - case "$x" in - -L*) - dir=`echo "X$x" | sed -e 's/^X-L//'` - if test -n "$acl_shlibext"; then - if test -f "$dir/$libname$shrext"; then - found_dir="$dir" - found_so="$dir/$libname$shrext" - else - if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then - ver=`(cd "$dir" && \ - for f in "$libname$shrext".*; do echo "$f"; done \ - | sed -e "s,^$libname$shrext\\\\.,," \ - | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ - | sed 1q ) 2>/dev/null` - if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then - found_dir="$dir" - found_so="$dir/$libname$shrext.$ver" - fi - else - eval library_names=\"$acl_library_names_spec\" - for f in $library_names; do - if test -f "$dir/$f"; then - found_dir="$dir" - found_so="$dir/$f" - break - fi - done - fi - fi - fi - if test "X$found_dir" = "X"; then - if test -f "$dir/$libname.$acl_libext"; then - found_dir="$dir" - found_a="$dir/$libname.$acl_libext" - fi - fi - if test "X$found_dir" != "X"; then - if test -f "$dir/$libname.la"; then - found_la="$dir/$libname.la" - fi - fi - ;; - esac - if test "X$found_dir" != "X"; then - break - fi - done - fi - if test "X$found_dir" != "X"; then - LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name" - if test "X$found_so" != "X"; then - if test "$enable_rpath" = no \ - || test "X$found_dir" = "X/usr/$acl_libdirstem" \ - || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then - LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" - else - haveit= - for x in $ltrpathdirs; do - if test "X$x" = "X$found_dir"; then - haveit=yes - break - fi - done - if test -z "$haveit"; then - ltrpathdirs="$ltrpathdirs $found_dir" - fi - if test "$acl_hardcode_direct" = yes; then - LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" - else - if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then - LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" - haveit= - for x in $rpathdirs; do - if test "X$x" = "X$found_dir"; then - haveit=yes - break - fi - done - if test -z "$haveit"; then - rpathdirs="$rpathdirs $found_dir" - fi - else - haveit= - for x in $LDFLAGS $LIBICONV; do + gl_header=$gl_cv_absolute_getopt_h + gl_cv_next_getopt_h='"'$gl_header'"' + else + gl_cv_next_getopt_h='<'getopt.h'>' + fi - acl_save_prefix="$prefix" - prefix="$acl_final_prefix" - acl_save_exec_prefix="$exec_prefix" - exec_prefix="$acl_final_exec_prefix" - eval x=\"$x\" - exec_prefix="$acl_save_exec_prefix" - prefix="$acl_save_prefix" - if test "X$x" = "X-L$found_dir"; then - haveit=yes - break - fi - done - if test -z "$haveit"; then - LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir" - fi - if test "$acl_hardcode_minus_L" != no; then - LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" - else - LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name" - fi - fi - fi - fi - else - if test "X$found_a" != "X"; then - LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a" - else - LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name" - fi - fi - additional_includedir= - case "$found_dir" in - */$acl_libdirstem | */$acl_libdirstem/) - basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'` - if test "$name" = 'iconv'; then - LIBICONV_PREFIX="$basedir" - fi - additional_includedir="$basedir/include" - ;; - */$acl_libdirstem2 | */$acl_libdirstem2/) - basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'` - if test "$name" = 'iconv'; then - LIBICONV_PREFIX="$basedir" - fi - additional_includedir="$basedir/include" - ;; - esac - if test "X$additional_includedir" != "X"; then - if test "X$additional_includedir" != "X/usr/include"; then - haveit= - if test "X$additional_includedir" = "X/usr/local/include"; then - if test -n "$GCC"; then - case $host_os in - linux* | gnu* | k*bsd*-gnu) haveit=yes;; - esac - fi - fi - if test -z "$haveit"; then - for x in $CPPFLAGS $INCICONV; do - - acl_save_prefix="$prefix" - prefix="$acl_final_prefix" - acl_save_exec_prefix="$exec_prefix" - exec_prefix="$acl_final_exec_prefix" - eval x=\"$x\" - exec_prefix="$acl_save_exec_prefix" - prefix="$acl_save_prefix" +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_getopt_h" >&5 +printf "%s\n" "$gl_cv_next_getopt_h" >&6; } + fi + NEXT_GETOPT_H=$gl_cv_next_getopt_h - if test "X$x" = "X-I$additional_includedir"; then - haveit=yes - break - fi - done - if test -z "$haveit"; then - if test -d "$additional_includedir"; then - INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir" - fi - fi - fi - fi - fi - if test -n "$found_la"; then - save_libdir="$libdir" - case "$found_la" in - */* | *\\*) . "$found_la" ;; - *) . "./$found_la" ;; - esac - libdir="$save_libdir" - for dep in $dependency_libs; do - case "$dep" in - -L*) - additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` - if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \ - && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then - haveit= - if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \ - || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then - if test -n "$GCC"; then - case $host_os in - linux* | gnu* | k*bsd*-gnu) haveit=yes;; - esac - fi - fi - if test -z "$haveit"; then - haveit= - for x in $LDFLAGS $LIBICONV; do + 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='<'getopt.h'>' + else + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' + gl_next_as_first_directive=$gl_cv_next_getopt_h + fi + NEXT_AS_FIRST_DIRECTIVE_GETOPT_H=$gl_next_as_first_directive - acl_save_prefix="$prefix" - prefix="$acl_final_prefix" - acl_save_exec_prefix="$exec_prefix" - exec_prefix="$acl_final_exec_prefix" - eval x=\"$x\" - exec_prefix="$acl_save_exec_prefix" - prefix="$acl_save_prefix" - if test "X$x" = "X-L$additional_libdir"; then - haveit=yes - break - fi - done - if test -z "$haveit"; then - if test -d "$additional_libdir"; then - LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir" - fi - fi - haveit= - for x in $LDFLAGS $LTLIBICONV; do - acl_save_prefix="$prefix" - prefix="$acl_final_prefix" - acl_save_exec_prefix="$exec_prefix" - exec_prefix="$acl_final_exec_prefix" - eval x=\"$x\" - exec_prefix="$acl_save_exec_prefix" - prefix="$acl_save_prefix" - if test "X$x" = "X-L$additional_libdir"; then - haveit=yes - break - fi - done - if test -z "$haveit"; then - if test -d "$additional_libdir"; then - LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir" - fi - fi - fi - fi - ;; - -R*) - dir=`echo "X$dep" | sed -e 's/^X-R//'` - if test "$enable_rpath" != no; then - haveit= - for x in $rpathdirs; do - if test "X$x" = "X$dir"; then - haveit=yes - break - fi - done - if test -z "$haveit"; then - rpathdirs="$rpathdirs $dir" - fi - haveit= - for x in $ltrpathdirs; do - if test "X$x" = "X$dir"; then - haveit=yes - break - fi - done - if test -z "$haveit"; then - ltrpathdirs="$ltrpathdirs $dir" - fi - fi - ;; - -l*) - names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` - ;; - *.la) - names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` - ;; - *) - LIBICONV="${LIBICONV}${LIBICONV:+ }$dep" - LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep" - ;; - esac - done - fi - else - LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name" - LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name" - fi - fi - fi - done - done - if test "X$rpathdirs" != "X"; then - if test -n "$acl_hardcode_libdir_separator"; then - alldirs= - for found_dir in $rpathdirs; do - alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir" - done - acl_save_libdir="$libdir" - libdir="$alldirs" - eval flag=\"$acl_hardcode_libdir_flag_spec\" - libdir="$acl_save_libdir" - LIBICONV="${LIBICONV}${LIBICONV:+ }$flag" - else - for found_dir in $rpathdirs; do - acl_save_libdir="$libdir" - libdir="$found_dir" - eval flag=\"$acl_hardcode_libdir_flag_spec\" - libdir="$acl_save_libdir" - LIBICONV="${LIBICONV}${LIBICONV:+ }$flag" - done - fi - fi - if test "X$ltrpathdirs" != "X"; then - for found_dir in $ltrpathdirs; do - LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir" - done + if test $ac_cv_header_getopt_h = yes; then + HAVE_GETOPT_H=1 + else + HAVE_GETOPT_H=0 fi + gl_replace_getopt= + if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then + for ac_header in getopt.h +do : + ac_fn_c_check_header_compile "$LINENO" "getopt.h" "ac_cv_header_getopt_h" "$ac_includes_default" +if test "x$ac_cv_header_getopt_h" = xyes +then : + printf "%s\n" "#define HAVE_GETOPT_H 1" >>confdefs.h - - - - - GNULIB_ICONV=0; - ICONV_CONST=; - REPLACE_ICONV=0; - REPLACE_ICONV_OPEN=0; - REPLACE_ICONV_UTF=0; - ICONV_H=''; - if test -n "$ICONV_H"; then - GL_GENERATE_ICONV_H_TRUE= - GL_GENERATE_ICONV_H_FALSE='#' else - GL_GENERATE_ICONV_H_TRUE='#' - GL_GENERATE_ICONV_H_FALSE= + gl_replace_getopt=yes fi +done + fi + if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then + for ac_func in getopt_long_only +do : + ac_fn_c_check_func "$LINENO" "getopt_long_only" "ac_cv_func_getopt_long_only" +if test "x$ac_cv_func_getopt_long_only" = xyes +then : + printf "%s\n" "#define HAVE_GETOPT_LONG_ONLY 1" >>confdefs.h +else + gl_replace_getopt=yes +fi +done + fi + if test -z "$gl_replace_getopt"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether getopt is POSIX compatible" >&5 +printf %s "checking whether getopt is POSIX compatible... " >&6; } +if test ${gl_cv_func_getopt_posix+y} +then : + printf %s "(cached) " >&6 +else + if test $cross_compiling = no; then + if test "$cross_compiling" = yes +then : + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run test program while cross compiling +See \`config.log' for more details" "$LINENO" 5; } +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ - am_save_CPPFLAGS="$CPPFLAGS" - - for element in $INCICONV; do - haveit= - for x in $CPPFLAGS; do - - acl_save_prefix="$prefix" - prefix="$acl_final_prefix" - acl_save_exec_prefix="$exec_prefix" - exec_prefix="$acl_final_exec_prefix" - eval x=\"$x\" - exec_prefix="$acl_save_exec_prefix" - prefix="$acl_save_prefix" +#include +#include +#include - if test "X$x" = "X$element"; then - haveit=yes - break - fi - done - if test -z "$haveit"; then - CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" - fi - done +int +main () +{ + static char program[] = "program"; + static char a[] = "-a"; + static char foo[] = "foo"; + static char bar[] = "bar"; + char *argv[] = { program, a, foo, bar, NULL }; + int c; + c = getopt (4, argv, "ab"); + if (!(c == 'a')) + return 1; + c = getopt (4, argv, "ab"); + if (!(c == -1)) + return 2; + if (!(optind == 2)) + return 3; + return 0; +} - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5 -printf %s "checking for iconv... " >&6; } -if test ${am_cv_func_iconv+y} +_ACEOF +if ac_fn_c_try_run "$LINENO" then : - printf %s "(cached) " >&6 + gl_cv_func_getopt_posix=maybe else + gl_cv_func_getopt_posix=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi - am_cv_func_iconv="no, consider installing GNU libiconv" - am_cv_lib_iconv=no - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + if test $gl_cv_func_getopt_posix = maybe; then + if test "$cross_compiling" = yes +then : + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run test program while cross compiling +See \`config.log' for more details" "$LINENO" 5; } +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ +#include #include -#include +#include int -main (void) +main () { -iconv_t cd = iconv_open("",""); - iconv(cd,NULL,NULL,NULL,NULL); - iconv_close(cd); - ; + static char program[] = "program"; + static char donald[] = "donald"; + static char p[] = "-p"; + static char billy[] = "billy"; + static char duck[] = "duck"; + static char a[] = "-a"; + static char bar[] = "bar"; + char *argv[] = { program, donald, p, billy, duck, a, bar, NULL }; + int c; + + c = getopt (7, argv, "+abp:q:"); + if (!(c == -1)) + return 4; + if (!(strcmp (argv[0], "program") == 0)) + return 5; + if (!(strcmp (argv[1], "donald") == 0)) + return 6; + if (!(strcmp (argv[2], "-p") == 0)) + return 7; + if (!(strcmp (argv[3], "billy") == 0)) + return 8; + if (!(strcmp (argv[4], "duck") == 0)) + return 9; + if (!(strcmp (argv[5], "-a") == 0)) + return 10; + if (!(strcmp (argv[6], "bar") == 0)) + return 11; + if (!(optind == 1)) + return 12; return 0; } + _ACEOF -if ac_fn_c_try_link "$LINENO" +if ac_fn_c_try_run "$LINENO" then : - am_cv_func_iconv=yes + gl_cv_func_getopt_posix=maybe +else + gl_cv_func_getopt_posix=no fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - if test "$am_cv_func_iconv" != yes; then - am_save_LIBS="$LIBS" - LIBS="$LIBS $LIBICONV" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + fi + if test $gl_cv_func_getopt_posix = maybe; then + if test "$cross_compiling" = yes +then : + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run test program while cross compiling +See \`config.log' for more details" "$LINENO" 5; } +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ +#include #include -#include +#include int -main (void) +main () { -iconv_t cd = iconv_open("",""); - iconv(cd,NULL,NULL,NULL,NULL); - iconv_close(cd); - ; + static char program[] = "program"; + static char ab[] = "-ab"; + char *argv[3] = { program, ab, NULL }; + if (getopt (2, argv, "ab:") != 'a') + return 13; + if (getopt (2, argv, "ab:") != '?') + return 14; + if (optopt != 'b') + return 15; + if (optind != 2) + return 16; return 0; } + _ACEOF -if ac_fn_c_try_link "$LINENO" +if ac_fn_c_try_run "$LINENO" then : - am_cv_lib_iconv=yes - am_cv_func_iconv=yes + gl_cv_func_getopt_posix=yes +else + gl_cv_func_getopt_posix=no fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LIBS="$am_save_LIBS" - fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + fi + else + case "$host_os" in + darwin* | aix* | mingw*) gl_cv_func_getopt_posix="guessing no";; + *) gl_cv_func_getopt_posix="guessing yes";; + esac + fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5 -printf "%s\n" "$am_cv_func_iconv" >&6; } - if test "$am_cv_func_iconv" = yes; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working iconv" >&5 -printf %s "checking for working iconv... " >&6; } -if test ${am_cv_func_iconv_works+y} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_posix" >&5 +printf "%s\n" "$gl_cv_func_getopt_posix" >&6; } + case "$gl_cv_func_getopt_posix" in + *no) gl_replace_getopt=yes ;; + esac + fi + + if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt function" >&5 +printf %s "checking for working GNU getopt function... " >&6; } +if test ${gl_cv_func_getopt_gnu+y} then : printf %s "(cached) " >&6 else - - 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 - if test "$cross_compiling" = yes + # Even with POSIXLY_CORRECT, the GNU extension of leading '-' in the + # optstring is necessary for programs like m4 that have POSIX-mandated + # semantics for supporting options interspersed with files. + # Also, since getopt_long is a GNU extension, we require optind=0. + # Bash ties 'set -o posix' to a non-exported POSIXLY_CORRECT; + # so take care to revert to the correct (non-)export state. + gl_awk_probe='BEGIN { if ("POSIXLY_CORRECT" in ENVIRON) print "x" }' + case ${POSIXLY_CORRECT+x}`$AWK "$gl_awk_probe" conftest.$ac_ext /* end confdefs.h. */ +#include + #include + #include -#include -#include - -#ifndef ICONV_CONST -# define ICONV_CONST $ac_iconv_const -#endif - -int -main (void) -{ -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); +#include +#if defined __MACH__ && defined __APPLE__ +/* Avoid a crash on Mac OS X. */ +#include +#include +#include +#include +#include +#include +/* The exception port on which our thread listens. */ +static mach_port_t our_exception_port; +/* The main function of the thread listening for exceptions of type + EXC_BAD_ACCESS. */ +static void * +mach_exception_thread (void *arg) +{ + /* Buffer for a message to be received. */ + struct { + mach_msg_header_t head; + mach_msg_body_t msgh_body; + char data[1024]; + } msg; + mach_msg_return_t retval; + /* Wait for a message on the exception port. */ + retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg), + our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL); + if (retval != MACH_MSG_SUCCESS) + abort (); + exit (1); +} +static void +nocrash_init (void) +{ + mach_port_t self = mach_task_self (); + /* Allocate a port on which the thread shall listen for exceptions. */ + if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port) + == KERN_SUCCESS) { + /* See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html. */ + if (mach_port_insert_right (self, our_exception_port, our_exception_port, + MACH_MSG_TYPE_MAKE_SEND) + == KERN_SUCCESS) { + /* The exceptions we want to catch. Only EXC_BAD_ACCESS is interesting + for us. */ + exception_mask_t mask = EXC_MASK_BAD_ACCESS; + /* Create the thread listening on the exception port. */ + pthread_attr_t attr; + pthread_t thread; + if (pthread_attr_init (&attr) == 0 + && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0 + && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) { + pthread_attr_destroy (&attr); + /* Replace the exception port info for these exceptions with our own. + Note that we replace the exception port for the entire task, not only + for a particular thread. This has the effect that when our exception + port gets the message, the thread specific exception port has already + been asked, and we don't need to bother about it. + See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html. */ + task_set_exception_ports (self, mask, our_exception_port, + EXCEPTION_DEFAULT, MACHINE_THREAD_STATE); } + } } +} +#elif defined _WIN32 && ! defined __CYGWIN__ +/* Avoid a crash on native Windows. */ +#define WIN32_LEAN_AND_MEAN +#include +#include +static LONG WINAPI +exception_filter (EXCEPTION_POINTERS *ExceptionInfo) +{ + switch (ExceptionInfo->ExceptionRecord->ExceptionCode) + { + case EXCEPTION_ACCESS_VIOLATION: + case EXCEPTION_IN_PAGE_ERROR: + case EXCEPTION_STACK_OVERFLOW: + case EXCEPTION_GUARD_PAGE: + case EXCEPTION_PRIV_INSTRUCTION: + case EXCEPTION_ILLEGAL_INSTRUCTION: + case EXCEPTION_DATATYPE_MISALIGNMENT: + case EXCEPTION_ARRAY_BOUNDS_EXCEEDED: + case EXCEPTION_NONCONTINUABLE_EXCEPTION: + exit (1); + } + return EXCEPTION_CONTINUE_SEARCH; +} +static void +nocrash_init (void) +{ + SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter); +} +#else +/* Avoid a crash on POSIX systems. */ +#include +#include +/* A POSIX signal handler. */ +static void +exception_handler (int sig) +{ + _exit (1); +} +static void +nocrash_init (void) +{ +#ifdef SIGSEGV + signal (SIGSEGV, exception_handler); #endif - /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is - provided. */ - { - /* Try standardized names. */ - iconv_t cd1 = iconv_open ("UTF-8", "EUC-JP"); - /* Try IRIX, OSF/1 names. */ - iconv_t cd2 = iconv_open ("UTF-8", "eucJP"); - /* Try AIX names. */ - iconv_t cd3 = iconv_open ("UTF-8", "IBM-eucJP"); - /* Try HP-UX names. */ - iconv_t cd4 = iconv_open ("utf8", "eucJP"); - if (cd1 == (iconv_t)(-1) && cd2 == (iconv_t)(-1) - && cd3 == (iconv_t)(-1) && cd4 == (iconv_t)(-1)) - result |= 16; - if (cd1 != (iconv_t)(-1)) - iconv_close (cd1); - if (cd2 != (iconv_t)(-1)) - iconv_close (cd2); - if (cd3 != (iconv_t)(-1)) - iconv_close (cd3); - if (cd4 != (iconv_t)(-1)) - iconv_close (cd4); - } - return result; +#ifdef SIGBUS + signal (SIGBUS, exception_handler); +#endif +} +#endif + + +int +main (void) +{ + + int result = 0; + + nocrash_init(); + + /* This code succeeds on glibc 2.8, OpenBSD 4.0, Cygwin, mingw, + and fails on Mac OS X 10.5, AIX 5.2, HP-UX 11, IRIX 6.5, + OSF/1 5.1, Solaris 10. */ + { + static char conftest[] = "conftest"; + static char plus[] = "-+"; + char *argv[3] = { conftest, plus, NULL }; + opterr = 0; + if (getopt (2, argv, "+a") != '?') + result |= 1; + } + /* This code succeeds on glibc 2.8, mingw, + and fails on Mac OS X 10.5, OpenBSD 4.0, AIX 5.2, HP-UX 11, + IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin 1.5.x. */ + { + static char program[] = "program"; + static char p[] = "-p"; + static char foo[] = "foo"; + static char bar[] = "bar"; + char *argv[] = { program, p, foo, bar, NULL }; + + optind = 1; + if (getopt (4, argv, "p::") != 'p') + result |= 2; + else if (optarg != NULL) + result |= 4; + else if (getopt (4, argv, "p::") != -1) + result |= 6; + else if (optind != 2) + result |= 8; + } + /* This code succeeds on glibc 2.8 and fails on Cygwin 1.7.0. */ + { + static char program[] = "program"; + static char foo[] = "foo"; + static char p[] = "-p"; + char *argv[] = { program, foo, p, NULL }; + optind = 0; + if (getopt (3, argv, "-p") != 1) + result |= 16; + else if (getopt (3, argv, "-p") != 'p') + result |= 16; + } + /* This code fails on glibc 2.11. */ + { + static char program[] = "program"; + static char b[] = "-b"; + static char a[] = "-a"; + char *argv[] = { program, b, a, NULL }; + optind = opterr = 0; + if (getopt (3, argv, "+:a:b") != 'b') + result |= 32; + else if (getopt (3, argv, "+:a:b") != ':') + result |= 32; + } + /* This code dumps core on glibc 2.14. */ + { + static char program[] = "program"; + static char w[] = "-W"; + static char dummy[] = "dummy"; + char *argv[] = { program, w, dummy, NULL }; + optind = opterr = 1; + if (getopt (3, argv, "W;") != 'W') + result |= 64; + } + return result; ; return 0; @@ -11542,152 +12126,93 @@ _ACEOF if ac_fn_c_try_run "$LINENO" then : - am_cv_func_iconv_works=yes + gl_cv_func_getopt_gnu=yes +else + gl_cv_func_getopt_gnu=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi - test "$am_cv_func_iconv_works" = no || break - done - LIBS="$am_save_LIBS" + case $gl_had_POSIXLY_CORRECT in + exported) ;; + yes) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;}; POSIXLY_CORRECT=1 ;; + *) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;} ;; + esac fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv_works" >&5 -printf "%s\n" "$am_cv_func_iconv_works" >&6; } - 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 - -printf "%s\n" "#define HAVE_ICONV 1" >>confdefs.h - - fi - if test "$am_cv_lib_iconv" = yes; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5 -printf %s "checking how to link with libiconv... " >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5 -printf "%s\n" "$LIBICONV" >&6; } - else - CPPFLAGS="$am_save_CPPFLAGS" - LIBICONV= - LTLIBICONV= - fi - - - - if test "$am_cv_func_iconv" = yes; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5 -printf %s "checking for iconv declaration... " >&6; } - if test ${am_cv_proto_iconv+y} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_gnu" >&5 +printf "%s\n" "$gl_cv_func_getopt_gnu" >&6; } + if test "$gl_cv_func_getopt_gnu" != yes; then + gl_replace_getopt=yes + else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt_long function" >&5 +printf %s "checking for working GNU getopt_long function... " >&6; } +if test ${gl_cv_func_getopt_long_gnu+y} then : printf %s "(cached) " >&6 else + if test "$cross_compiling" = yes +then : + case "$host_os" in + openbsd*) gl_cv_func_getopt_long_gnu="guessing no";; + *) gl_cv_func_getopt_long_gnu="guessing yes";; + esac - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - -#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 +#include + #include + #include int main (void) { +static const struct option long_options[] = + { + { "xtremely-",no_argument, NULL, 1003 }, + { "xtra", no_argument, NULL, 1001 }, + { "xtreme", no_argument, NULL, 1002 }, + { "xtremely", no_argument, NULL, 1003 }, + { NULL, 0, NULL, 0 } + }; + /* This code fails on OpenBSD 5.0. */ + { + static char program[] = "program"; + static char xtremel[] = "--xtremel"; + char *argv[] = { program, xtremel, NULL }; + int option_index; + optind = 1; opterr = 0; + if (getopt_long (2, argv, "", long_options, &option_index) != 1003) + return 1; + } + return 0; ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" +if ac_fn_c_try_run "$LINENO" then : - am_cv_proto_iconv_arg1="" + gl_cv_func_getopt_long_gnu=yes else - am_cv_proto_iconv_arg1="const" + gl_cv_func_getopt_long_gnu=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - 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);" +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext fi - am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: - $am_cv_proto_iconv" >&5 -printf "%s\n" " - $am_cv_proto_iconv" >&6; } - else - am_cv_proto_iconv_arg1="" - fi - -printf "%s\n" "#define ICONV_CONST $am_cv_proto_iconv_arg1" >>confdefs.h - - - if test -n "$am_cv_proto_iconv_arg1"; then - ICONV_CONST="const" - fi - - - - - - - -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 -printf %s "checking for inline... " >&6; } -if test ${ac_cv_c_inline+y} -then : - printf %s "(cached) " >&6 -else - ac_cv_c_inline=no -for ac_kw in inline __inline__ __inline; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifndef __cplusplus -typedef int foo_t; -static $ac_kw foo_t static_foo () {return 0; } -$ac_kw foo_t foo () {return 0; } -#endif - -_ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - ac_cv_c_inline=$ac_kw -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - test "$ac_cv_c_inline" != no && break -done fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5 -printf "%s\n" "$ac_cv_c_inline" >&6; } - -case $ac_cv_c_inline in - inline | yes) ;; - *) - case $ac_cv_c_inline in - no) ac_val=;; - *) ac_val=$ac_cv_c_inline;; - esac - cat >>confdefs.h <<_ACEOF -#ifndef __cplusplus -#define inline $ac_val -#endif -_ACEOF - ;; -esac - - +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_long_gnu" >&5 +printf "%s\n" "$gl_cv_func_getopt_long_gnu" >&6; } + case "$gl_cv_func_getopt_long_gnu" in + *yes) ;; + *) gl_replace_getopt=yes ;; + esac + fi + fi @@ -11699,122 +12224,986 @@ - : + use_additional=yes + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval additional_includedir=\"$includedir\" + eval additional_libdir=\"$libdir\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" - if test $gl_cv_have_include_next = yes; then - gl_cv_next_limits_h='<'limits.h'>' - else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 -printf %s "checking absolute name of ... " >&6; } -if test ${gl_cv_next_limits_h+y} +# Check whether --with-libiconv-prefix was given. +if test ${with_libiconv_prefix+y} then : - printf %s "(cached) " >&6 -else + withval=$with_libiconv_prefix; + if test "X$withval" = "Xno"; then + use_additional=no + else + if test "X$withval" = "X"; then - if test $ac_cv_header_limits_h = yes; then + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval additional_includedir=\"$includedir\" + eval additional_libdir=\"$libdir\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + else + additional_includedir="$withval/include" + additional_libdir="$withval/$acl_libdirstem" + if test "$acl_libdirstem2" != "$acl_libdirstem" \ + && test ! -d "$withval/$acl_libdirstem"; then + additional_libdir="$withval/$acl_libdirstem2" + fi + fi + fi - 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 +fi - 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 - }' + LIBICONV= + LTLIBICONV= + INCICONV= + LIBICONV_PREFIX= + HAVE_LIBICONV= + rpathdirs= + ltrpathdirs= + names_already_handled= + names_next_round='iconv ' + while test -n "$names_next_round"; do + names_this_round="$names_next_round" + names_next_round= + for name in $names_this_round; do + already_handled= + for n in $names_already_handled; do + if test "$n" = "$name"; then + already_handled=yes + break + fi + done + if test -z "$already_handled"; then + names_already_handled="$names_already_handled $name" + uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'` + eval value=\"\$HAVE_LIB$uppername\" + if test -n "$value"; then + if test "$value" = yes; then + eval value=\"\$LIB$uppername\" + test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value" + eval value=\"\$LTLIB$uppername\" + test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value" + else + : + fi + else + found_dir= + found_la= + found_so= + found_a= + eval libname=\"$acl_libname_spec\" # typically: libname=lib$name + if test -n "$acl_shlibext"; then + shrext=".$acl_shlibext" # typically: shrext=.so + else + shrext= + fi + if test $use_additional = yes; then + dir="$additional_libdir" + if test -n "$acl_shlibext"; then + if test -f "$dir/$libname$shrext"; then + found_dir="$dir" + found_so="$dir/$libname$shrext" + else + if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then + ver=`(cd "$dir" && \ + for f in "$libname$shrext".*; do echo "$f"; done \ + | sed -e "s,^$libname$shrext\\\\.,," \ + | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ + | sed 1q ) 2>/dev/null` + if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then + found_dir="$dir" + found_so="$dir/$libname$shrext.$ver" + fi + else + eval library_names=\"$acl_library_names_spec\" + for f in $library_names; do + if test -f "$dir/$f"; then + found_dir="$dir" + found_so="$dir/$f" + break + fi + done + fi + fi + fi + if test "X$found_dir" = "X"; then + if test -f "$dir/$libname.$acl_libext"; then + found_dir="$dir" + found_a="$dir/$libname.$acl_libext" + fi + fi + if test "X$found_dir" != "X"; then + if test -f "$dir/$libname.la"; then + found_la="$dir/$libname.la" + fi + fi + fi + if test "X$found_dir" = "X"; then + for x in $LDFLAGS $LTLIBICONV; do - gl_cv_absolute_limits_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | - sed -n "$gl_absolute_header_sed"` + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" - gl_header=$gl_cv_absolute_limits_h - gl_cv_next_limits_h='"'$gl_header'"' + case "$x" in + -L*) + dir=`echo "X$x" | sed -e 's/^X-L//'` + if test -n "$acl_shlibext"; then + if test -f "$dir/$libname$shrext"; then + found_dir="$dir" + found_so="$dir/$libname$shrext" + else + if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then + ver=`(cd "$dir" && \ + for f in "$libname$shrext".*; do echo "$f"; done \ + | sed -e "s,^$libname$shrext\\\\.,," \ + | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ + | sed 1q ) 2>/dev/null` + if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then + found_dir="$dir" + found_so="$dir/$libname$shrext.$ver" + fi + else + eval library_names=\"$acl_library_names_spec\" + for f in $library_names; do + if test -f "$dir/$f"; then + found_dir="$dir" + found_so="$dir/$f" + break + fi + done + fi + fi + fi + if test "X$found_dir" = "X"; then + if test -f "$dir/$libname.$acl_libext"; then + found_dir="$dir" + found_a="$dir/$libname.$acl_libext" + fi + fi + if test "X$found_dir" != "X"; then + if test -f "$dir/$libname.la"; then + found_la="$dir/$libname.la" + fi + fi + ;; + esac + if test "X$found_dir" != "X"; then + break + fi + done + fi + if test "X$found_dir" != "X"; then + LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name" + if test "X$found_so" != "X"; then + if test "$enable_rpath" = no \ + || test "X$found_dir" = "X/usr/$acl_libdirstem" \ + || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then + LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" + else + haveit= + for x in $ltrpathdirs; do + if test "X$x" = "X$found_dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + ltrpathdirs="$ltrpathdirs $found_dir" + fi + if test "$acl_hardcode_direct" = yes; then + LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" + else + if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then + LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" + haveit= + for x in $rpathdirs; do + if test "X$x" = "X$found_dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + rpathdirs="$rpathdirs $found_dir" + fi + else + haveit= + for x in $LDFLAGS $LIBICONV; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + if test "X$x" = "X-L$found_dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir" + fi + if test "$acl_hardcode_minus_L" != no; then + LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" + else + LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name" + fi + fi + fi + fi + else + if test "X$found_a" != "X"; then + LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a" + else + LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name" + fi + fi + additional_includedir= + case "$found_dir" in + */$acl_libdirstem | */$acl_libdirstem/) + basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'` + if test "$name" = 'iconv'; then + LIBICONV_PREFIX="$basedir" + fi + additional_includedir="$basedir/include" + ;; + */$acl_libdirstem2 | */$acl_libdirstem2/) + basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'` + if test "$name" = 'iconv'; then + LIBICONV_PREFIX="$basedir" + fi + additional_includedir="$basedir/include" + ;; + esac + if test "X$additional_includedir" != "X"; then + if test "X$additional_includedir" != "X/usr/include"; then + haveit= + if test "X$additional_includedir" = "X/usr/local/include"; then + if test -n "$GCC"; then + case $host_os in + linux* | gnu* | k*bsd*-gnu) haveit=yes;; + esac + fi + fi + if test -z "$haveit"; then + for x in $CPPFLAGS $INCICONV; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + if test "X$x" = "X-I$additional_includedir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test -d "$additional_includedir"; then + INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir" + fi + fi + fi + fi + fi + if test -n "$found_la"; then + save_libdir="$libdir" + case "$found_la" in + */* | *\\*) . "$found_la" ;; + *) . "./$found_la" ;; + esac + libdir="$save_libdir" + for dep in $dependency_libs; do + case "$dep" in + -L*) + additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` + if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \ + && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then + haveit= + if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \ + || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then + if test -n "$GCC"; then + case $host_os in + linux* | gnu* | k*bsd*-gnu) haveit=yes;; + esac + fi + fi + if test -z "$haveit"; then + haveit= + for x in $LDFLAGS $LIBICONV; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + if test "X$x" = "X-L$additional_libdir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test -d "$additional_libdir"; then + LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir" + fi + fi + haveit= + for x in $LDFLAGS $LTLIBICONV; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + if test "X$x" = "X-L$additional_libdir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test -d "$additional_libdir"; then + LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir" + fi + fi + fi + fi + ;; + -R*) + dir=`echo "X$dep" | sed -e 's/^X-R//'` + if test "$enable_rpath" != no; then + haveit= + for x in $rpathdirs; do + if test "X$x" = "X$dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + rpathdirs="$rpathdirs $dir" + fi + haveit= + for x in $ltrpathdirs; do + if test "X$x" = "X$dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + ltrpathdirs="$ltrpathdirs $dir" + fi + fi + ;; + -l*) + names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` + ;; + *.la) + names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` + ;; + *) + LIBICONV="${LIBICONV}${LIBICONV:+ }$dep" + LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep" + ;; + esac + done + fi else - gl_cv_next_limits_h='<'limits.h'>' - fi + LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name" + LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name" + fi + fi + fi + done + done + if test "X$rpathdirs" != "X"; then + if test -n "$acl_hardcode_libdir_separator"; then + alldirs= + for found_dir in $rpathdirs; do + alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir" + done + acl_save_libdir="$libdir" + libdir="$alldirs" + eval flag=\"$acl_hardcode_libdir_flag_spec\" + libdir="$acl_save_libdir" + LIBICONV="${LIBICONV}${LIBICONV:+ }$flag" + else + for found_dir in $rpathdirs; do + acl_save_libdir="$libdir" + libdir="$found_dir" + eval flag=\"$acl_hardcode_libdir_flag_spec\" + libdir="$acl_save_libdir" + LIBICONV="${LIBICONV}${LIBICONV:+ }$flag" + done + fi + fi + if test "X$ltrpathdirs" != "X"; then + for found_dir in $ltrpathdirs; do + LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir" + done + fi -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_limits_h" >&5 -printf "%s\n" "$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 + + + + + + GNULIB_ICONV=0; + ICONV_CONST=; + REPLACE_ICONV=0; + REPLACE_ICONV_OPEN=0; + REPLACE_ICONV_UTF=0; + ICONV_H=''; + if false; then + ICONV_H='iconv.h' fi - NEXT_AS_FIRST_DIRECTIVE_LIMITS_H=$gl_next_as_first_directive + + if test -n "$ICONV_H"; then + GL_GENERATE_ICONV_H_TRUE= + GL_GENERATE_ICONV_H_FALSE='#' +else + GL_GENERATE_ICONV_H_TRUE='#' + GL_GENERATE_ICONV_H_FALSE= +fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether limits.h has ULLONG_WIDTH etc." >&5 -printf %s "checking whether limits.h has ULLONG_WIDTH etc.... " >&6; } -if test ${gl_cv_header_limits_width+y} + + + am_save_CPPFLAGS="$CPPFLAGS" + + for element in $INCICONV; do + haveit= + for x in $CPPFLAGS; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + if test "X$x" = "X$element"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" + fi + done + + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5 +printf %s "checking for iconv... " >&6; } +if test ${am_cv_func_iconv+y} then : printf %s "(cached) " >&6 else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + + am_cv_func_iconv="no, consider installing GNU libiconv" + am_cv_lib_iconv=no + 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; + +#include +#include + int main (void) { - +iconv_t cd = iconv_open("",""); + iconv(cd,NULL,NULL,NULL,NULL); + iconv_close(cd); ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" +if ac_fn_c_try_link "$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 + am_cv_func_iconv=yes fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_limits_width" >&5 -printf "%s\n" "$gl_cv_header_limits_width" >&6; } - if test "$gl_cv_header_limits_width" = yes; then - LIMITS_H= - else - LIMITS_H=limits.h - fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + if test "$am_cv_func_iconv" != yes; then + am_save_LIBS="$LIBS" + LIBS="$LIBS $LIBICONV" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include + +int +main (void) +{ +iconv_t cd = iconv_open("",""); + iconv(cd,NULL,NULL,NULL,NULL); + iconv_close(cd); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + am_cv_lib_iconv=yes + am_cv_func_iconv=yes +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LIBS="$am_save_LIBS" + fi + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5 +printf "%s\n" "$am_cv_func_iconv" >&6; } + if test "$am_cv_func_iconv" = yes; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working iconv" >&5 +printf %s "checking for working iconv... " >&6; } +if test ${am_cv_func_iconv_works+y} +then : + printf %s "(cached) " >&6 +else + + 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 + if test "$cross_compiling" = yes +then : + case "$host_os" in + aix* | hpux*) am_cv_func_iconv_works="guessing no" ;; + *) am_cv_func_iconv_works="guessing yes" ;; + esac +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include + +#ifndef ICONV_CONST +# define ICONV_CONST $ac_iconv_const +#endif + +int +main (void) +{ +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. */ + { + /* Try standardized names. */ + iconv_t cd1 = iconv_open ("UTF-8", "EUC-JP"); + /* Try IRIX, OSF/1 names. */ + iconv_t cd2 = iconv_open ("UTF-8", "eucJP"); + /* Try AIX names. */ + iconv_t cd3 = iconv_open ("UTF-8", "IBM-eucJP"); + /* Try HP-UX names. */ + iconv_t cd4 = iconv_open ("utf8", "eucJP"); + if (cd1 == (iconv_t)(-1) && cd2 == (iconv_t)(-1) + && cd3 == (iconv_t)(-1) && cd4 == (iconv_t)(-1)) + result |= 16; + if (cd1 != (iconv_t)(-1)) + iconv_close (cd1); + if (cd2 != (iconv_t)(-1)) + iconv_close (cd2); + if (cd3 != (iconv_t)(-1)) + iconv_close (cd3); + if (cd4 != (iconv_t)(-1)) + iconv_close (cd4); + } + return result; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO" +then : + am_cv_func_iconv_works=yes +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + test "$am_cv_func_iconv_works" = no || break + done + LIBS="$am_save_LIBS" + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv_works" >&5 +printf "%s\n" "$am_cv_func_iconv_works" >&6; } + 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 + +printf "%s\n" "#define HAVE_ICONV 1" >>confdefs.h + + fi + if test "$am_cv_lib_iconv" = yes; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5 +printf %s "checking how to link with libiconv... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5 +printf "%s\n" "$LIBICONV" >&6; } + else + CPPFLAGS="$am_save_CPPFLAGS" + LIBICONV= + LTLIBICONV= + fi + + + + if test "$am_cv_func_iconv" = yes; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5 +printf %s "checking for iconv declaration... " >&6; } + if test ${am_cv_proto_iconv+y} +then : + printf %s "(cached) " >&6 +else + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#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 + +int +main (void) +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + am_cv_proto_iconv_arg1="" +else + am_cv_proto_iconv_arg1="const" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + 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);" +fi + + am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: + $am_cv_proto_iconv" >&5 +printf "%s\n" " + $am_cv_proto_iconv" >&6; } + else + am_cv_proto_iconv_arg1="" + fi + +printf "%s\n" "#define ICONV_CONST $am_cv_proto_iconv_arg1" >>confdefs.h + + + if test -n "$am_cv_proto_iconv_arg1"; then + ICONV_CONST="const" + fi + + + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 +printf %s "checking for inline... " >&6; } +if test ${ac_cv_c_inline+y} +then : + printf %s "(cached) " >&6 +else + ac_cv_c_inline=no +for ac_kw in inline __inline__ __inline; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifndef __cplusplus +typedef int foo_t; +static $ac_kw foo_t static_foo () {return 0; } +$ac_kw foo_t foo () {return 0; } +#endif + +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + ac_cv_c_inline=$ac_kw +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + test "$ac_cv_c_inline" != no && break +done + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5 +printf "%s\n" "$ac_cv_c_inline" >&6; } + +case $ac_cv_c_inline in + inline | yes) ;; + *) + case $ac_cv_c_inline in + no) ac_val=;; + *) ac_val=$ac_cv_c_inline;; + esac + cat >>confdefs.h <<_ACEOF +#ifndef __cplusplus +#define inline $ac_val +#endif +_ACEOF + ;; +esac + + + + + + + + + + + + + if test $gl_cv_have_include_next = yes; then + gl_cv_next_limits_h='<'limits.h'>' + else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 +printf %s "checking absolute name of ... " >&6; } +if test ${gl_cv_next_limits_h+y} +then : + printf %s "(cached) " >&6 +else + + 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 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_limits_h" >&5 +printf "%s\n" "$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 + + + + + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether limits.h has LLONG_MAX, WORD_BIT, ULLONG_WIDTH etc." >&5 +printf %s "checking whether limits.h has LLONG_MAX, WORD_BIT, ULLONG_WIDTH etc.... " >&6; } +if test ${gl_cv_header_limits_width+y} +then : + printf %s "(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 + long long llm = LLONG_MAX; + int wb = WORD_BIT; + int ullw = ULLONG_WIDTH; + +int +main (void) +{ + + ; + 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 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_limits_width" >&5 +printf "%s\n" "$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= @@ -12040,15 +13429,6 @@ - - - - - - - - - gl_cv_c_multiarch=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -12112,12 +13492,6 @@ - : - - - - - if test $ac_cv_header_wchar_h = yes; then HAVE_WCHAR_H=1 else @@ -12145,12 +13519,6 @@ - : - - - - - @@ -12417,7 +13785,12 @@ then : if test "$cross_compiling" = yes then : - gl_cv_header_working_stdint_h=yes + case "$host_os" in + # Guess yes on native Windows. + mingw*) gl_cv_header_working_stdint_h="guessing yes" ;; + # In general, assume it works. + *) gl_cv_header_working_stdint_h="guessing yes" ;; + esac else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -12518,16 +13891,17 @@ HAVE_SYS_BITYPES_H=0 HAVE_SYS_INTTYPES_H=0 STDINT_H=stdint.h - if test "$gl_cv_header_working_stdint_h" = yes; then - HAVE_C99_STDINT_H=1 - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stdint.h predates C++11" >&5 + case "$gl_cv_header_working_stdint_h" in + *yes) + HAVE_C99_STDINT_H=1 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stdint.h predates C++11" >&5 printf %s "checking whether stdint.h predates C++11... " >&6; } if test ${gl_cv_header_stdint_predates_cxx11_h+y} then : printf %s "(cached) " >&6 else gl_cv_header_stdint_predates_cxx11_h=yes - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -12566,30 +13940,30 @@ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_predates_cxx11_h" >&5 printf "%s\n" "$gl_cv_header_stdint_predates_cxx11_h" >&6; } - if test "$gl_cv_header_stdint_predates_cxx11_h" = yes; then + if test "$gl_cv_header_stdint_predates_cxx11_h" = yes; then printf "%s\n" "#define __STDC_CONSTANT_MACROS 1" >>confdefs.h printf "%s\n" "#define __STDC_LIMIT_MACROS 1" >>confdefs.h - fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stdint.h has UINTMAX_WIDTH etc." >&5 + fi + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stdint.h has UINTMAX_WIDTH etc." >&5 printf %s "checking whether stdint.h has UINTMAX_WIDTH etc.... " >&6; } if test ${gl_cv_header_stdint_width+y} then : printf %s "(cached) " >&6 else gl_cv_header_stdint_width=no - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + 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 + /* 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 . */ @@ -12601,7 +13975,7 @@ # include #endif - int iw = UINTMAX_WIDTH; + int iw = UINTMAX_WIDTH; int main (void) @@ -12619,11 +13993,12 @@ fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_width" >&5 printf "%s\n" "$gl_cv_header_stdint_width" >&6; } - if test "$gl_cv_header_stdint_width" = yes; then - STDINT_H= - fi - else - ac_fn_c_check_header_compile "$LINENO" "sys/inttypes.h" "ac_cv_header_sys_inttypes_h" "$ac_includes_default" + if test "$gl_cv_header_stdint_width" = yes; then + STDINT_H= + fi + ;; + *) + ac_fn_c_check_header_compile "$LINENO" "sys/inttypes.h" "ac_cv_header_sys_inttypes_h" "$ac_includes_default" if test "x$ac_cv_header_sys_inttypes_h" = xyes then : printf "%s\n" "#define HAVE_SYS_INTTYPES_H 1" >>confdefs.h @@ -12636,12 +14011,12 @@ fi - if test $ac_cv_header_sys_inttypes_h = yes; then - HAVE_SYS_INTTYPES_H=1 - fi - if test $ac_cv_header_sys_bitypes_h = yes; then - HAVE_SYS_BITYPES_H=1 - fi + if test $ac_cv_header_sys_inttypes_h = yes; then + HAVE_SYS_INTTYPES_H=1 + fi + if test $ac_cv_header_sys_bitypes_h = yes; then + HAVE_SYS_BITYPES_H=1 + fi if test $APPLE_UNIVERSAL_BUILD = 0; then @@ -12941,9 +14316,12 @@ BITSIZEOF_WINT_T=32 fi - fi + ;; + esac - LIMITS_H=limits.h + + + LIMITS_H='limits.h' if test -n "$LIMITS_H"; then GL_GENERATE_LIMITS_H_TRUE= GL_GENERATE_LIMITS_H_FALSE='#' @@ -12957,6 +14335,7 @@ + if test -n "$STDINT_H"; then GL_GENERATE_STDINT_H_TRUE= GL_GENERATE_STDINT_H_FALSE='#' @@ -12967,11 +14346,6 @@ - - - - - GNULIB_IMAXABS=0; GNULIB_IMAXDIV=0; GNULIB_STRTOIMAX=0; @@ -12980,6 +14354,7 @@ HAVE_DECL_IMAXDIV=1; HAVE_DECL_STRTOIMAX=1; HAVE_DECL_STRTOUMAX=1; + HAVE_IMAXDIV_T=1; REPLACE_STRTOIMAX=0; REPLACE_STRTOUMAX=0; INT32_MAX_LT_INTMAX_MAX=1; @@ -12992,21 +14367,9 @@ - : - - - - - - - - - - - : @@ -13089,47 +14452,7 @@ - for gl_func in imaxabs imaxdiv strtoimax strtoumax; do - as_gl_Symbol=`printf "%s\n" "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5 -printf %s "checking whether $gl_func is declared without a macro... " >&6; } -if eval test \${$as_gl_Symbol+y} -then : - printf %s "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main (void) -{ -#undef $gl_func - (void) $gl_func; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - eval "$as_gl_Symbol=yes" -else - eval "$as_gl_Symbol=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -eval ac_res=\$$as_gl_Symbol - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } - if eval test \"x\$"$as_gl_Symbol"\" = x"yes" -then : - cat >>confdefs.h <<_ACEOF -#define `printf "%s\n" "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 -_ACEOF - - eval ac_cv_have_decl_$gl_func=yes -fi - done @@ -13201,20 +14524,6 @@ - - - - - - - - - : - - - - - if test $ac_cv_header_crtdefs_h = yes; then HAVE_CRTDEFS_H=1 else @@ -13227,12 +14536,6 @@ - : - - - - - if test $ac_cv_func_iswcntrl = yes; then HAVE_ISWCNTRL=1 else @@ -13256,12 +14559,6 @@ - : - - - - - @@ -13346,7 +14643,7 @@ if test "$cross_compiling" = yes then : - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #if __GNU_LIBRARY__ == 1 @@ -13423,185 +14720,1416 @@ then : printf "%s\n" "#define HAVE_TOWLOWER 1" >>confdefs.h -fi +fi + + if test $ac_cv_func_towlower = yes; then + REPLACE_TOWLOWER=0 + else + ac_fn_c_check_decl "$LINENO" "towlower" "ac_cv_have_decl_towlower" "/* 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 + #if HAVE_WCTYPE_H + # include + #endif + +" +if test "x$ac_cv_have_decl_towlower" = xyes +then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +printf "%s\n" "#define HAVE_DECL_TOWLOWER $ac_have_decl" >>confdefs.h + + if test $ac_cv_have_decl_towlower = yes; then + REPLACE_TOWLOWER=1 + else + REPLACE_TOWLOWER=0 + fi + fi + fi + + + if test $HAVE_ISWCNTRL = 0 || test $REPLACE_TOWLOWER = 1; then + : + fi + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wctype_t" >&5 +printf %s "checking for wctype_t... " >&6; } +if test ${gl_cv_type_wctype_t+y} +then : + printf %s "(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 + #if HAVE_WCTYPE_H + # include + #endif + wctype_t a; + +int +main (void) +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + gl_cv_type_wctype_t=yes +else + gl_cv_type_wctype_t=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctype_t" >&5 +printf "%s\n" "$gl_cv_type_wctype_t" >&6; } + if test $gl_cv_type_wctype_t = no; then + HAVE_WCTYPE_T=0 + fi + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wctrans_t" >&5 +printf %s "checking for wctrans_t... " >&6; } +if test ${gl_cv_type_wctrans_t+y} +then : + printf %s "(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 + #include + wctrans_t a; + +int +main (void) +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + gl_cv_type_wctrans_t=yes +else + gl_cv_type_wctrans_t=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctrans_t" >&5 +printf "%s\n" "$gl_cv_type_wctrans_t" >&6; } + if test $gl_cv_type_wctrans_t = no; then + HAVE_WCTRANS_T=0 + fi + + + + + + + + GNULIB_NL_LANGINFO=0; + HAVE_NL_LANGINFO=1; + REPLACE_NL_LANGINFO=0; + + + + GNULIB_LOCALECONV=0; + GNULIB_SETLOCALE=0; + GNULIB_DUPLOCALE=0; + GNULIB_LOCALENAME=0; + HAVE_NEWLOCALE=1; + HAVE_DUPLOCALE=1; + HAVE_FREELOCALE=1; + REPLACE_LOCALECONV=0; + REPLACE_SETLOCALE=0; + REPLACE_NEWLOCALE=0; + REPLACE_DUPLOCALE=0; + REPLACE_FREELOCALE=0; + REPLACE_STRUCT_LCONV=0; + + + REPLACE_NULL=0; + HAVE_MAX_ALIGN_T=1; + HAVE_WCHAR_T=1; + + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5 +printf %s "checking for wchar_t... " >&6; } +if test ${gt_cv_c_wchar_t+y} +then : + printf %s "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + wchar_t foo = (wchar_t)'\0'; +int +main (void) +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + gt_cv_c_wchar_t=yes +else + gt_cv_c_wchar_t=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wchar_t" >&5 +printf "%s\n" "$gt_cv_c_wchar_t" >&6; } + if test $gt_cv_c_wchar_t = yes; then + +printf "%s\n" "#define HAVE_WCHAR_T 1" >>confdefs.h + + fi + + + + + STDDEF_H= + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for good max_align_t" >&5 +printf %s "checking for good max_align_t... " >&6; } +if test ${gl_cv_type_max_align_t+y} +then : + printf %s "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + unsigned int s = sizeof (max_align_t); + #if defined __GNUC__ || defined __IBM__ALIGNOF__ + int check1[2 * (__alignof__ (double) <= __alignof__ (max_align_t)) - 1]; + int check2[2 * (__alignof__ (long double) <= __alignof__ (max_align_t)) - 1]; + #endif + +int +main (void) +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + gl_cv_type_max_align_t=yes +else + gl_cv_type_max_align_t=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_max_align_t" >&5 +printf "%s\n" "$gl_cv_type_max_align_t" >&6; } + if test $gl_cv_type_max_align_t = no; then + HAVE_MAX_ALIGN_T=0 + STDDEF_H=stddef.h + fi + + if test $gt_cv_c_wchar_t = no; then + HAVE_WCHAR_T=0 + STDDEF_H=stddef.h + fi + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5 +printf %s "checking whether NULL can be used in arbitrary expressions... " >&6; } +if test ${gl_cv_decl_null_works+y} +then : + printf %s "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + int test[2 * (sizeof NULL == sizeof (void *)) -1]; + +int +main (void) +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + gl_cv_decl_null_works=yes +else + gl_cv_decl_null_works=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5 +printf "%s\n" "$gl_cv_decl_null_works" >&6; } + if test $gl_cv_decl_null_works = no; then + REPLACE_NULL=1 + STDDEF_H=stddef.h + fi + + + if test -n "$STDDEF_H"; then + GL_GENERATE_STDDEF_H_TRUE= + GL_GENERATE_STDDEF_H_FALSE='#' +else + GL_GENERATE_STDDEF_H_TRUE='#' + GL_GENERATE_STDDEF_H_FALSE= +fi + + if test -n "$STDDEF_H"; then + + + + + + + + + if test $gl_cv_have_include_next = yes; then + gl_cv_next_stddef_h='<'stddef.h'>' + else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 +printf %s "checking absolute name of ... " >&6; } +if test ${gl_cv_next_stddef_h+y} +then : + printf %s "(cached) " >&6 +else + + + + 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 'stddef.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_stddef_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | + sed -n "$gl_absolute_header_sed"` + + gl_header=$gl_cv_absolute_stddef_h + gl_cv_next_stddef_h='"'$gl_header'"' + + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5 +printf "%s\n" "$gl_cv_next_stddef_h" >&6; } + fi + NEXT_STDDEF_H=$gl_cv_next_stddef_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='<'stddef.h'>' + else + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' + gl_next_as_first_directive=$gl_cv_next_stddef_h + fi + NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive + + + + + fi + + + + + gl_threads_api=none + LIBTHREAD= + LTLIBTHREAD= + LIBMULTITHREAD= + LTLIBMULTITHREAD= + if test "$gl_use_threads" != no; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether imported symbols can be declared weak" >&5 +printf %s "checking whether imported symbols can be declared weak... " >&6; } +if test ${gl_cv_have_weak+y} +then : + printf %s "(cached) " >&6 +else + gl_cv_have_weak=no + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +extern void xyzzy (); +#pragma weak xyzzy +int +main (void) +{ +xyzzy(); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + gl_cv_have_weak=maybe +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + if test $gl_cv_have_weak = maybe; then + if test "$cross_compiling" = yes +then : + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef __ELF__ + Extensible Linking Format + #endif + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "Extensible Linking Format" >/dev/null 2>&1 +then : + gl_cv_have_weak="guessing yes" +else + gl_cv_have_weak="guessing no" +fi +rm -rf conftest* + + +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#pragma weak fputs +int main () +{ + return (fputs == NULL); +} +_ACEOF +if ac_fn_c_try_run "$LINENO" +then : + gl_cv_have_weak=yes +else + gl_cv_have_weak=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 + case " $LDFLAGS " in + *" -static "*) gl_cv_have_weak=no ;; + esac + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_weak" >&5 +printf "%s\n" "$gl_cv_have_weak" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the linker supports --as-needed" >&5 +printf %s "checking whether the linker supports --as-needed... " >&6; } +if test ${gl_cv_linker_have_as_needed+y} +then : + printf %s "(cached) " >&6 +else + if test -n "$GCC"; then + gl_saved_ldflags="$LDFLAGS" + LDFLAGS="$gl_saved_ldflags -Wl,--as-needed -Wl,--no-as-needed" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main (void) +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + gl_cv_linker_have_as_needed=yes +else + gl_cv_linker_have_as_needed=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS="$gl_saved_ldflags" + else + gl_cv_linker_have_as_needed=no + fi + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_linker_have_as_needed" >&5 +printf "%s\n" "$gl_cv_linker_have_as_needed" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the linker supports --push-state" >&5 +printf %s "checking whether the linker supports --push-state... " >&6; } +if test ${gl_cv_linker_have_push_state+y} +then : + printf %s "(cached) " >&6 +else + if test -n "$GCC"; then + gl_saved_ldflags="$LDFLAGS" + LDFLAGS="$gl_saved_ldflags -Wl,--push-state -Wl,--pop-state" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main (void) +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + gl_cv_linker_have_push_state=yes +else + gl_cv_linker_have_push_state=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS="$gl_saved_ldflags" + else + gl_cv_linker_have_push_state=no + fi + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_linker_have_push_state" >&5 +printf "%s\n" "$gl_cv_linker_have_push_state" >&6; } + if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then + # On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that + # it groks . It's added above, in gl_THREADLIB_EARLY_BODY. + ac_fn_c_check_header_compile "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default" +if test "x$ac_cv_header_pthread_h" = xyes +then : + gl_have_pthread_h=yes +else + gl_have_pthread_h=no +fi + + if test "$gl_have_pthread_h" = yes; then + # Other possible tests: + # -lpthreads (FSU threads, PCthreads) + # -lgthreads + gl_have_pthread= + # Test whether both pthread_mutex_lock and pthread_mutexattr_init exist + # in libc. IRIX 6.5 has the first one in both libc and libpthread, but + # the second one only in libpthread, and lock.c needs it. + # + # If -pthread works, prefer it to -lpthread, since Ubuntu 14.04 + # needs -pthread for some reason. See: + # https://lists.gnu.org/r/bug-gnulib/2014-09/msg00023.html + save_LIBS=$LIBS + for gl_pthread in '' '-pthread'; do + LIBS="$LIBS $gl_pthread" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + pthread_mutex_t m; + pthread_mutexattr_t ma; + +int +main (void) +{ +pthread_mutex_lock (&m); + pthread_mutexattr_init (&ma); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + gl_have_pthread=yes + LIBTHREAD=$gl_pthread LTLIBTHREAD=$gl_pthread + LIBMULTITHREAD=$gl_pthread LTLIBMULTITHREAD=$gl_pthread +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LIBS=$save_LIBS + test -n "$gl_have_pthread" && break + done + + # Test for libpthread by looking for pthread_kill. (Not pthread_self, + # since it is defined as a macro on OSF/1.) + if test -n "$gl_have_pthread" && test -z "$LIBTHREAD"; then + # The program links fine without libpthread. But it may actually + # need to link with libpthread in order to create multiple threads. + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5 +printf %s "checking for pthread_kill in -lpthread... " >&6; } +if test ${ac_cv_lib_pthread_pthread_kill+y} +then : + printf %s "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lpthread $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char pthread_kill (); +int +main (void) +{ +return pthread_kill (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_pthread_pthread_kill=yes +else + ac_cv_lib_pthread_pthread_kill=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5 +printf "%s\n" "$ac_cv_lib_pthread_pthread_kill" >&6; } +if test "x$ac_cv_lib_pthread_pthread_kill" = xyes +then : + LIBMULTITHREAD=-lpthread LTLIBMULTITHREAD=-lpthread + # On Solaris and HP-UX, most pthread functions exist also in libc. + # 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 | solaris2.1-9 | solaris2.1-9.* | hpux*) + +printf "%s\n" "#define PTHREAD_IN_USE_DETECTION_HARD 1" >>confdefs.h + + esac + +fi + + elif test -z "$gl_have_pthread"; then + # Some library is needed. Try libpthread and libc_r. + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5 +printf %s "checking for pthread_kill in -lpthread... " >&6; } +if test ${ac_cv_lib_pthread_pthread_kill+y} +then : + printf %s "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lpthread $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char pthread_kill (); +int +main (void) +{ +return pthread_kill (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_pthread_pthread_kill=yes +else + ac_cv_lib_pthread_pthread_kill=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5 +printf "%s\n" "$ac_cv_lib_pthread_pthread_kill" >&6; } +if test "x$ac_cv_lib_pthread_pthread_kill" = xyes +then : + gl_have_pthread=yes + LIBTHREAD=-lpthread LTLIBTHREAD=-lpthread + LIBMULTITHREAD=-lpthread LTLIBMULTITHREAD=-lpthread +fi + + if test -z "$gl_have_pthread"; then + # For FreeBSD 4. + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lc_r" >&5 +printf %s "checking for pthread_kill in -lc_r... " >&6; } +if test ${ac_cv_lib_c_r_pthread_kill+y} +then : + printf %s "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lc_r $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char pthread_kill (); +int +main (void) +{ +return pthread_kill (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_c_r_pthread_kill=yes +else + ac_cv_lib_c_r_pthread_kill=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_kill" >&5 +printf "%s\n" "$ac_cv_lib_c_r_pthread_kill" >&6; } +if test "x$ac_cv_lib_c_r_pthread_kill" = xyes +then : + gl_have_pthread=yes + LIBTHREAD=-lc_r LTLIBTHREAD=-lc_r + LIBMULTITHREAD=-lc_r LTLIBMULTITHREAD=-lc_r +fi + + fi + fi + if test -n "$gl_have_pthread"; then + gl_threads_api=posix + +printf "%s\n" "#define USE_POSIX_THREADS 1" >>confdefs.h + + if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then + if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then + +printf "%s\n" "#define USE_POSIX_THREADS_WEAK 1" >>confdefs.h + + LIBTHREAD= + LTLIBTHREAD= + case "$LIBMULTITHREAD" in + "") ;; + -pthread) + if test $gl_cv_linker_have_as_needed = yes; then + if test $gl_cv_linker_have_push_state = yes; then + LIBMULTITHREAD="$LIBMULTITHREAD -Wl,--push-state -Wl,--no-as-needed -lpthread -Wl,--pop-state" + else + LIBMULTITHREAD="$LIBMULTITHREAD -Wl,--no-as-needed -lpthread" + fi + fi + ;; + *) + if test $gl_cv_linker_have_as_needed = yes; then + if test $gl_cv_linker_have_push_state = yes; then + LIBMULTITHREAD="-Wl,--push-state -Wl,--no-as-needed $LIBMULTITHREAD -Wl,--pop-state" + else + LIBMULTITHREAD="-Wl,--no-as-needed $LIBMULTITHREAD" + fi + fi + ;; + esac + # TODO: May need to modify LTLIBMULTITHREAD similarly. + fi + fi + fi + fi + fi + if test -z "$gl_have_pthread"; then + if test "$gl_use_threads" = yes || test "$gl_use_threads" = solaris; then + gl_have_solaristhread= + gl_save_LIBS="$LIBS" + LIBS="$LIBS -lthread" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include + +int +main (void) +{ +thr_self(); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + gl_have_solaristhread=yes +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LIBS="$gl_save_LIBS" + if test -n "$gl_have_solaristhread"; then + gl_threads_api=solaris + LIBTHREAD=-lthread + LTLIBTHREAD=-lthread + LIBMULTITHREAD="$LIBTHREAD" + LTLIBMULTITHREAD="$LTLIBTHREAD" + +printf "%s\n" "#define USE_SOLARIS_THREADS 1" >>confdefs.h + + if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then + +printf "%s\n" "#define USE_SOLARIS_THREADS_WEAK 1" >>confdefs.h + + LIBTHREAD= + LTLIBTHREAD= + if test $gl_cv_linker_have_as_needed = yes; then + if test $gl_cv_linker_have_push_state = yes; then + LIBMULTITHREAD="-Wl,--push-state -Wl,--no-as-needed $LIBMULTITHREAD -Wl,--pop-state" + else + LIBMULTITHREAD="-Wl,--no-as-needed $LIBMULTITHREAD" + fi + fi + # TODO: May need to modify LTLIBMULTITHREAD similarly. + fi + fi + fi + fi + if test "$gl_use_threads" = pth; then + gl_save_CPPFLAGS="$CPPFLAGS" + + + + + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to link with libpth" >&5 +printf %s "checking how to link with libpth... " >&6; } +if test ${ac_cv_libpth_libs+y} +then : + printf %s "(cached) " >&6 +else + + + + + + + + use_additional=yes + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + + eval additional_includedir=\"$includedir\" + eval additional_libdir=\"$libdir\" + + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + +# Check whether --with-libpth-prefix was given. +if test ${with_libpth_prefix+y} +then : + withval=$with_libpth_prefix; + if test "X$withval" = "Xno"; then + use_additional=no + else + if test "X$withval" = "X"; then + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + + eval additional_includedir=\"$includedir\" + eval additional_libdir=\"$libdir\" + + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + else + additional_includedir="$withval/include" + additional_libdir="$withval/$acl_libdirstem" + if test "$acl_libdirstem2" != "$acl_libdirstem" \ + && test ! -d "$withval/$acl_libdirstem"; then + additional_libdir="$withval/$acl_libdirstem2" + fi + fi + fi + +fi + + LIBPTH= + LTLIBPTH= + INCPTH= + LIBPTH_PREFIX= + HAVE_LIBPTH= + rpathdirs= + ltrpathdirs= + names_already_handled= + names_next_round='pth ' + while test -n "$names_next_round"; do + names_this_round="$names_next_round" + names_next_round= + for name in $names_this_round; do + already_handled= + for n in $names_already_handled; do + if test "$n" = "$name"; then + already_handled=yes + break + fi + done + if test -z "$already_handled"; then + names_already_handled="$names_already_handled $name" + uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'` + eval value=\"\$HAVE_LIB$uppername\" + if test -n "$value"; then + if test "$value" = yes; then + eval value=\"\$LIB$uppername\" + test -z "$value" || LIBPTH="${LIBPTH}${LIBPTH:+ }$value" + eval value=\"\$LTLIB$uppername\" + test -z "$value" || LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }$value" + else + : + fi + else + found_dir= + found_la= + found_so= + found_a= + eval libname=\"$acl_libname_spec\" # typically: libname=lib$name + if test -n "$acl_shlibext"; then + shrext=".$acl_shlibext" # typically: shrext=.so + else + shrext= + fi + if test $use_additional = yes; then + dir="$additional_libdir" + if test -n "$acl_shlibext"; then + if test -f "$dir/$libname$shrext"; then + found_dir="$dir" + found_so="$dir/$libname$shrext" + else + if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then + ver=`(cd "$dir" && \ + for f in "$libname$shrext".*; do echo "$f"; done \ + | sed -e "s,^$libname$shrext\\\\.,," \ + | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ + | sed 1q ) 2>/dev/null` + if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then + found_dir="$dir" + found_so="$dir/$libname$shrext.$ver" + fi + else + eval library_names=\"$acl_library_names_spec\" + for f in $library_names; do + if test -f "$dir/$f"; then + found_dir="$dir" + found_so="$dir/$f" + break + fi + done + fi + fi + fi + if test "X$found_dir" = "X"; then + if test -f "$dir/$libname.$acl_libext"; then + found_dir="$dir" + found_a="$dir/$libname.$acl_libext" + fi + fi + if test "X$found_dir" != "X"; then + if test -f "$dir/$libname.la"; then + found_la="$dir/$libname.la" + fi + fi + fi + if test "X$found_dir" = "X"; then + for x in $LDFLAGS $LTLIBPTH; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + case "$x" in + -L*) + dir=`echo "X$x" | sed -e 's/^X-L//'` + if test -n "$acl_shlibext"; then + if test -f "$dir/$libname$shrext"; then + found_dir="$dir" + found_so="$dir/$libname$shrext" + else + if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then + ver=`(cd "$dir" && \ + for f in "$libname$shrext".*; do echo "$f"; done \ + | sed -e "s,^$libname$shrext\\\\.,," \ + | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ + | sed 1q ) 2>/dev/null` + if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then + found_dir="$dir" + found_so="$dir/$libname$shrext.$ver" + fi + else + eval library_names=\"$acl_library_names_spec\" + for f in $library_names; do + if test -f "$dir/$f"; then + found_dir="$dir" + found_so="$dir/$f" + break + fi + done + fi + fi + fi + if test "X$found_dir" = "X"; then + if test -f "$dir/$libname.$acl_libext"; then + found_dir="$dir" + found_a="$dir/$libname.$acl_libext" + fi + fi + if test "X$found_dir" != "X"; then + if test -f "$dir/$libname.la"; then + found_la="$dir/$libname.la" + fi + fi + ;; + esac + if test "X$found_dir" != "X"; then + break + fi + done + fi + if test "X$found_dir" != "X"; then + LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-L$found_dir -l$name" + if test "X$found_so" != "X"; then + if test "$enable_rpath" = no \ + || test "X$found_dir" = "X/usr/$acl_libdirstem" \ + || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then + LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so" + else + haveit= + for x in $ltrpathdirs; do + if test "X$x" = "X$found_dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + ltrpathdirs="$ltrpathdirs $found_dir" + fi + if test "$acl_hardcode_direct" = yes; then + LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so" + else + if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then + LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so" + haveit= + for x in $rpathdirs; do + if test "X$x" = "X$found_dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + rpathdirs="$rpathdirs $found_dir" + fi + else + haveit= + for x in $LDFLAGS $LIBPTH; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + if test "X$x" = "X-L$found_dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + LIBPTH="${LIBPTH}${LIBPTH:+ }-L$found_dir" + fi + if test "$acl_hardcode_minus_L" != no; then + LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so" + else + LIBPTH="${LIBPTH}${LIBPTH:+ }-l$name" + fi + fi + fi + fi + else + if test "X$found_a" != "X"; then + LIBPTH="${LIBPTH}${LIBPTH:+ }$found_a" + else + LIBPTH="${LIBPTH}${LIBPTH:+ }-L$found_dir -l$name" + fi + fi + additional_includedir= + case "$found_dir" in + */$acl_libdirstem | */$acl_libdirstem/) + basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'` + if test "$name" = 'pth'; then + LIBPTH_PREFIX="$basedir" + fi + additional_includedir="$basedir/include" + ;; + */$acl_libdirstem2 | */$acl_libdirstem2/) + basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'` + if test "$name" = 'pth'; then + LIBPTH_PREFIX="$basedir" + fi + additional_includedir="$basedir/include" + ;; + esac + if test "X$additional_includedir" != "X"; then + if test "X$additional_includedir" != "X/usr/include"; then + haveit= + if test "X$additional_includedir" = "X/usr/local/include"; then + if test -n "$GCC"; then + case $host_os in + linux* | gnu* | k*bsd*-gnu) haveit=yes;; + esac + fi + fi + if test -z "$haveit"; then + for x in $CPPFLAGS $INCPTH; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + if test "X$x" = "X-I$additional_includedir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test -d "$additional_includedir"; then + INCPTH="${INCPTH}${INCPTH:+ }-I$additional_includedir" + fi + fi + fi + fi + fi + if test -n "$found_la"; then + save_libdir="$libdir" + case "$found_la" in + */* | *\\*) . "$found_la" ;; + *) . "./$found_la" ;; + esac + libdir="$save_libdir" + for dep in $dependency_libs; do + case "$dep" in + -L*) + additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` + if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \ + && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then + haveit= + if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \ + || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then + if test -n "$GCC"; then + case $host_os in + linux* | gnu* | k*bsd*-gnu) haveit=yes;; + esac + fi + fi + if test -z "$haveit"; then + haveit= + for x in $LDFLAGS $LIBPTH; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + if test "X$x" = "X-L$additional_libdir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test -d "$additional_libdir"; then + LIBPTH="${LIBPTH}${LIBPTH:+ }-L$additional_libdir" + fi + fi + haveit= + for x in $LDFLAGS $LTLIBPTH; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + if test "X$x" = "X-L$additional_libdir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test -d "$additional_libdir"; then + LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-L$additional_libdir" + fi + fi + fi + fi + ;; + -R*) + dir=`echo "X$dep" | sed -e 's/^X-R//'` + if test "$enable_rpath" != no; then + haveit= + for x in $rpathdirs; do + if test "X$x" = "X$dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + rpathdirs="$rpathdirs $dir" + fi + haveit= + for x in $ltrpathdirs; do + if test "X$x" = "X$dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + ltrpathdirs="$ltrpathdirs $dir" + fi + fi + ;; + -l*) + names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` + ;; + *.la) + names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` + ;; + *) + LIBPTH="${LIBPTH}${LIBPTH:+ }$dep" + LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }$dep" + ;; + esac + done + fi + else + LIBPTH="${LIBPTH}${LIBPTH:+ }-l$name" + LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-l$name" + fi + fi + fi + done + done + if test "X$rpathdirs" != "X"; then + if test -n "$acl_hardcode_libdir_separator"; then + alldirs= + for found_dir in $rpathdirs; do + alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir" + done + acl_save_libdir="$libdir" + libdir="$alldirs" + eval flag=\"$acl_hardcode_libdir_flag_spec\" + libdir="$acl_save_libdir" + LIBPTH="${LIBPTH}${LIBPTH:+ }$flag" + else + for found_dir in $rpathdirs; do + acl_save_libdir="$libdir" + libdir="$found_dir" + eval flag=\"$acl_hardcode_libdir_flag_spec\" + libdir="$acl_save_libdir" + LIBPTH="${LIBPTH}${LIBPTH:+ }$flag" + done + fi + fi + if test "X$ltrpathdirs" != "X"; then + for found_dir in $ltrpathdirs; do + LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-R$found_dir" + done + fi + + - if test $ac_cv_func_towlower = yes; then - REPLACE_TOWLOWER=0 - else - ac_fn_c_check_decl "$LINENO" "towlower" "ac_cv_have_decl_towlower" "/* 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 - #if HAVE_WCTYPE_H - # include - #endif -" -if test "x$ac_cv_have_decl_towlower" = xyes -then : - ac_have_decl=1 -else - ac_have_decl=0 + + ac_cv_libpth_libs="$LIBPTH" + ac_cv_libpth_ltlibs="$LTLIBPTH" + ac_cv_libpth_cppflags="$INCPTH" + ac_cv_libpth_prefix="$LIBPTH_PREFIX" + fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libpth_libs" >&5 +printf "%s\n" "$ac_cv_libpth_libs" >&6; } + LIBPTH="$ac_cv_libpth_libs" + LTLIBPTH="$ac_cv_libpth_ltlibs" + INCPTH="$ac_cv_libpth_cppflags" + LIBPTH_PREFIX="$ac_cv_libpth_prefix" -printf "%s\n" "#define HAVE_DECL_TOWLOWER $ac_have_decl" >>confdefs.h + for element in $INCPTH; do + haveit= + for x in $CPPFLAGS; do - if test $ac_cv_have_decl_towlower = yes; then - REPLACE_TOWLOWER=1 - else - REPLACE_TOWLOWER=0 + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + if test "X$x" = "X$element"; then + haveit=yes + break fi + done + if test -z "$haveit"; then + CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" fi - fi + done - if test $HAVE_ISWCNTRL = 0 || test $REPLACE_TOWLOWER = 1; then - : - fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wctype_t" >&5 -printf %s "checking for wctype_t... " >&6; } -if test ${gl_cv_type_wctype_t+y} -then : - printf %s "(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 - #if HAVE_WCTYPE_H - # include - #endif - wctype_t a; -int -main (void) -{ + HAVE_LIBPTH=yes - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - gl_cv_type_wctype_t=yes -else - gl_cv_type_wctype_t=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctype_t" >&5 -printf "%s\n" "$gl_cv_type_wctype_t" >&6; } - if test $gl_cv_type_wctype_t = no; then - HAVE_WCTYPE_T=0 - fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wctrans_t" >&5 -printf %s "checking for wctrans_t... " >&6; } -if test ${gl_cv_type_wctrans_t+y} -then : - printf %s "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + gl_have_pth= + gl_save_LIBS="$LIBS" + LIBS="$LIBS $LIBPTH" + 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 - #include - wctrans_t a; - +#include int main (void) { - +pth_self(); ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" +if ac_fn_c_try_link "$LINENO" then : - gl_cv_type_wctrans_t=yes -else - gl_cv_type_wctrans_t=no + gl_have_pth=yes fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LIBS="$gl_save_LIBS" + if test -n "$gl_have_pth"; then + gl_threads_api=pth + LIBTHREAD="$LIBPTH" + LTLIBTHREAD="$LTLIBPTH" + LIBMULTITHREAD="$LIBTHREAD" + LTLIBMULTITHREAD="$LTLIBTHREAD" -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctrans_t" >&5 -printf "%s\n" "$gl_cv_type_wctrans_t" >&6; } - if test $gl_cv_type_wctrans_t = no; then - HAVE_WCTRANS_T=0 +printf "%s\n" "#define USE_PTH_THREADS 1" >>confdefs.h + + if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then + if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then + +printf "%s\n" "#define USE_PTH_THREADS_WEAK 1" >>confdefs.h + + LIBTHREAD= + LTLIBTHREAD= + if test $gl_cv_linker_have_as_needed = yes; then + if test $gl_cv_linker_have_push_state = yes; then + LIBMULTITHREAD="-Wl,--push-state -Wl,--no-as-needed $LIBMULTITHREAD -Wl,--pop-state" + else + LIBMULTITHREAD="-Wl,--no-as-needed $LIBMULTITHREAD" + fi + fi + # TODO: May need to modify LTLIBMULTITHREAD similarly. + fi + fi + else + CPPFLAGS="$gl_save_CPPFLAGS" + fi + fi + if test -z "$gl_have_pthread"; then + case "$gl_use_threads" in + yes | windows | win32) # The 'win32' is for backward compatibility. + if { case "$host_os" in + mingw*) true;; + *) false;; + esac + }; then + gl_threads_api=windows + +printf "%s\n" "#define USE_WINDOWS_THREADS 1" >>confdefs.h + + fi + ;; + esac + fi fi + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for multithread API to use" >&5 +printf %s "checking for multithread API to use... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_threads_api" >&5 +printf "%s\n" "$gl_threads_api" >&6; } + - for gl_func in wctype iswctype wctrans towctrans ; do - as_gl_Symbol=`printf "%s\n" "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5 -printf %s "checking whether $gl_func is declared without a macro... " >&6; } -if eval test \${$as_gl_Symbol+y} -then : - printf %s "(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 -# include -#endif -#include -int -main (void) -{ -#undef $gl_func - (void) $gl_func; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - eval "$as_gl_Symbol=yes" -else - eval "$as_gl_Symbol=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -eval ac_res=\$$as_gl_Symbol - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } - if eval test \"x\$"$as_gl_Symbol"\" = x"yes" -then : - cat >>confdefs.h <<_ACEOF -#define `printf "%s\n" "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 -_ACEOF - eval ac_cv_have_decl_$gl_func=yes -fi - done @@ -13610,148 +16138,287 @@ - GNULIB_NL_LANGINFO=0; - HAVE_NL_LANGINFO=1; - REPLACE_NL_LANGINFO=0; + case "$host_os" in + mingw*) WINDOWS_STAT_INODES=1 ;; + *) WINDOWS_STAT_INODES=0 ;; + esac - 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 - ac_have_decl=0 -fi -printf "%s\n" "#define HAVE_DECL_GETC_UNLOCKED $ac_have_decl" >>confdefs.h +printf "%s\n" "#define _USE_STD_STAT 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C Library >= 2.1 or uClibc" >&5 -printf %s "checking whether we are using the GNU C Library >= 2.1 or uClibc... " >&6; } -if test ${ac_cv_gnu_library_2_1+y} + + + + + + + + + if test $gl_cv_have_include_next = yes; then + gl_cv_next_sys_types_h='<'sys/types.h'>' + else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 +printf %s "checking absolute name of ... " >&6; } +if test ${gl_cv_next_sys_types_h+y} then : printf %s "(cached) " >&6 else + + + 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 -#include -#ifdef __GNU_LIBRARY__ - #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2) - Lucky GNU user - #endif -#endif -#ifdef __UCLIBC__ - Lucky user -#endif + case "$host_os" in + mingw*) + gl_dirsep_regex='[/\\]' + ;; + *) + gl_dirsep_regex='\/' + ;; + esac + gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' + gl_header_literal_regex=`echo 'sys/types.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 + }' -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "Lucky" >/dev/null 2>&1 -then : - ac_cv_gnu_library_2_1=yes -else - ac_cv_gnu_library_2_1=no -fi -rm -rf conftest* + gl_cv_absolute_sys_types_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | + sed -n "$gl_absolute_header_sed"` + gl_header=$gl_cv_absolute_sys_types_h + gl_cv_next_sys_types_h='"'$gl_header'"' fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_gnu_library_2_1" >&5 -printf "%s\n" "$ac_cv_gnu_library_2_1" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_types_h" >&5 +printf "%s\n" "$gl_cv_next_sys_types_h" >&6; } + fi + NEXT_SYS_TYPES_H=$gl_cv_next_sys_types_h - GLIBC21="$ac_cv_gnu_library_2_1" + 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='<'sys/types.h'>' + else + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' + gl_next_as_first_directive=$gl_cv_next_sys_types_h + fi + NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H=$gl_next_as_first_directive - GNULIB_LOCALECONV=0; - GNULIB_SETLOCALE=0; - GNULIB_DUPLOCALE=0; - HAVE_DUPLOCALE=1; - REPLACE_LOCALECONV=0; - REPLACE_SETLOCALE=0; - REPLACE_DUPLOCALE=0; - REPLACE_STRUCT_LCONV=0; - REPLACE_NULL=0; - HAVE_MAX_ALIGN_T=1; - HAVE_WCHAR_T=1; - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5 -printf %s "checking for wchar_t... " >&6; } -if test ${gt_cv_c_wchar_t+y} -then : - printf %s "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - wchar_t foo = (wchar_t)'\0'; -int -main (void) -{ - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - gt_cv_c_wchar_t=yes -else - gt_cv_c_wchar_t=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wchar_t" >&5 -printf "%s\n" "$gt_cv_c_wchar_t" >&6; } - if test $gt_cv_c_wchar_t = yes; then -printf "%s\n" "#define HAVE_WCHAR_T 1" >>confdefs.h - fi - STDDEF_H= - ac_fn_c_check_type "$LINENO" "max_align_t" "ac_cv_type_max_align_t" "#include -" -if test "x$ac_cv_type_max_align_t" = xyes + + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 +printf %s "checking for a sed that does not truncate output... " >&6; } +if test ${ac_cv_path_SED+y} then : + printf %s "(cached) " >&6 +else + ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ + for ac_i in 1 2 3 4 5 6 7; do + ac_script="$ac_script$as_nl$ac_script" + done + echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed + { ac_script=; unset ac_script;} + if test -z "$SED"; then + ac_path_SED_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_prog in sed gsed + do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_SED="$as_dir$ac_prog$ac_exec_ext" + as_fn_executable_p "$ac_path_SED" || continue +# Check for GNU ac_path_SED and select it if it is found. + # Check for GNU $ac_path_SED +case `"$ac_path_SED" --version 2>&1` in +*GNU*) + ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; +*) + ac_count=0 + printf %s 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + printf "%s\n" '' >> "conftest.nl" + "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_SED_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_SED="$ac_path_SED" + ac_path_SED_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + $ac_path_SED_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_SED"; then + as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 + fi else - HAVE_MAX_ALIGN_T=0; STDDEF_H=stddef.h + ac_cv_path_SED=$SED +fi + fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 +printf "%s\n" "$ac_cv_path_SED" >&6; } + SED="$ac_cv_path_SED" + rm -f conftest.sed + + + GNULIB__EXIT=0; + GNULIB_ATOLL=0; + GNULIB_CALLOC_POSIX=0; + GNULIB_CANONICALIZE_FILE_NAME=0; + GNULIB_GETLOADAVG=0; + GNULIB_GETSUBOPT=0; + GNULIB_GRANTPT=0; + GNULIB_MALLOC_POSIX=0; + GNULIB_MBTOWC=0; + GNULIB_MKDTEMP=0; + GNULIB_MKOSTEMP=0; + GNULIB_MKOSTEMPS=0; + GNULIB_MKSTEMP=0; + GNULIB_MKSTEMPS=0; + GNULIB_POSIX_OPENPT=0; + GNULIB_PTSNAME=0; + GNULIB_PTSNAME_R=0; + GNULIB_PUTENV=0; + GNULIB_QSORT_R=0; + GNULIB_RANDOM=0; + GNULIB_RANDOM_R=0; + GNULIB_REALLOCARRAY=0; + GNULIB_REALLOC_POSIX=0; + GNULIB_REALPATH=0; + GNULIB_RPMATCH=0; + GNULIB_SECURE_GETENV=0; + GNULIB_SETENV=0; + GNULIB_STRTOD=0; + GNULIB_STRTOLL=0; + GNULIB_STRTOULL=0; + GNULIB_SYSTEM_POSIX=0; + GNULIB_UNLOCKPT=0; + GNULIB_UNSETENV=0; + GNULIB_WCTOMB=0; + HAVE__EXIT=1; + HAVE_ATOLL=1; + HAVE_CANONICALIZE_FILE_NAME=1; + HAVE_DECL_GETLOADAVG=1; + HAVE_GETSUBOPT=1; + HAVE_GRANTPT=1; + HAVE_DECL_INITSTATE=1; + HAVE_MKDTEMP=1; + HAVE_MKOSTEMP=1; + HAVE_MKOSTEMPS=1; + HAVE_MKSTEMP=1; + HAVE_MKSTEMPS=1; + 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; + HAVE_REALLOCARRAY=1; + HAVE_REALPATH=1; + HAVE_RPMATCH=1; + HAVE_SECURE_GETENV=1; + HAVE_SETENV=1; + HAVE_DECL_SETENV=1; + HAVE_DECL_SETSTATE=1; + HAVE_STRTOD=1; + HAVE_STRTOLL=1; + HAVE_STRTOULL=1; + HAVE_STRUCT_RANDOM_DATA=1; + HAVE_SYS_LOADAVG_H=0; + HAVE_UNLOCKPT=1; + HAVE_DECL_UNSETENV=1; + REPLACE_CALLOC=0; + REPLACE_CANONICALIZE_FILE_NAME=0; + REPLACE_MALLOC=0; + REPLACE_MBTOWC=0; + REPLACE_MKSTEMP=0; + REPLACE_PTSNAME=0; + REPLACE_PTSNAME_R=0; + REPLACE_PUTENV=0; + REPLACE_QSORT_R=0; + REPLACE_RANDOM_R=0; + REPLACE_REALLOC=0; + REPLACE_REALPATH=0; + REPLACE_SETENV=0; + REPLACE_STRTOD=0; + REPLACE_UNSETENV=0; + REPLACE_WCTOMB=0; + +# Autoupdate added the following line to ensure that your configure +# script's behavior did not change. It is probably safe to remove. - if test $gt_cv_c_wchar_t = no; then - HAVE_WCHAR_T=0 - STDDEF_H=stddef.h - fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5 -printf %s "checking whether NULL can be used in arbitrary expressions... " >&6; } -if test ${gl_cv_decl_null_works+y} + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether malloc, realloc, calloc are POSIX compliant" >&5 +printf %s "checking whether malloc, realloc, calloc are POSIX compliant... " >&6; } +if test ${gl_cv_func_malloc_posix+y} then : printf %s "(cached) " >&6 else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include - int test[2 * (sizeof NULL == sizeof (void *)) -1]; int main (void) { +#if defined _WIN32 && ! defined __CYGWIN__ + choke me + #endif ; return 0; @@ -13759,1131 +16426,1294 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : - gl_cv_decl_null_works=yes + gl_cv_func_malloc_posix=yes else - gl_cv_decl_null_works=no + gl_cv_func_malloc_posix=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5 -printf "%s\n" "$gl_cv_decl_null_works" >&6; } - if test $gl_cv_decl_null_works = no; then - REPLACE_NULL=1 - STDDEF_H=stddef.h - fi - if test -n "$STDDEF_H"; then - GL_GENERATE_STDDEF_H_TRUE= - GL_GENERATE_STDDEF_H_FALSE='#' -else - GL_GENERATE_STDDEF_H_TRUE='#' - GL_GENERATE_STDDEF_H_FALSE= fi - - if test -n "$STDDEF_H"; then - - - +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_malloc_posix" >&5 +printf "%s\n" "$gl_cv_func_malloc_posix" >&6; } + ac_fn_c_check_header_compile "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default" +if test "x$ac_cv_header_stdlib_h" = xyes +then : + printf "%s\n" "#define HAVE_STDLIB_H 1" >>confdefs.h +fi - if test $gl_cv_have_include_next = yes; then - gl_cv_next_stddef_h='<'stddef.h'>' - else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 -printf %s "checking absolute name of ... " >&6; } -if test ${gl_cv_next_stddef_h+y} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5 +printf %s "checking for GNU libc compatible malloc... " >&6; } +if test ${ac_cv_func_malloc_0_nonnull+y} then : printf %s "(cached) " >&6 else - - - - 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 - + if test "$cross_compiling" = yes +then : case "$host_os" in - mingw*) - gl_dirsep_regex='[/\\]' - ;; - *) - gl_dirsep_regex='\/' - ;; - esac - gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' - gl_header_literal_regex=`echo 'stddef.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_stddef_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | - sed -n "$gl_absolute_header_sed"` - - gl_header=$gl_cv_absolute_stddef_h - gl_cv_next_stddef_h='"'$gl_header'"' - - -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5 -printf "%s\n" "$gl_cv_next_stddef_h" >&6; } - fi - NEXT_STDDEF_H=$gl_cv_next_stddef_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='<'stddef.h'>' - else - # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' - gl_next_as_first_directive=$gl_cv_next_stddef_h - fi - NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive - - - - - fi - - - - - - - + # Guess yes on platforms where we know the result. + *-gnu* | gnu* | freebsd* | netbsd* | openbsd* \ + | hpux* | solaris* | cygwin* | mingw*) + ac_cv_func_malloc_0_nonnull=yes ;; + # If we don't know, assume the worst. + *) ac_cv_func_malloc_0_nonnull=no ;; + esac - gl_threads_api=none - LIBTHREAD= - LTLIBTHREAD= - LIBMULTITHREAD= - LTLIBMULTITHREAD= - if test "$gl_use_threads" != no; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether imported symbols can be declared weak" >&5 -printf %s "checking whether imported symbols can be declared weak... " >&6; } -if test ${gl_cv_have_weak+y} -then : - printf %s "(cached) " >&6 else - gl_cv_have_weak=no - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -extern void xyzzy (); -#pragma weak xyzzy +#if defined STDC_HEADERS || defined HAVE_STDLIB_H + # include + #else + char *malloc (); + #endif + int main (void) { -xyzzy(); +char *p = malloc (0); + int result = !p; + free (p); + return result; ; return 0; } -_ACEOF -if ac_fn_c_try_link "$LINENO" -then : - gl_cv_have_weak=maybe -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - if test $gl_cv_have_weak = maybe; then - if test "$cross_compiling" = yes -then : - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef __ELF__ - Extensible Linking Format - #endif - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "Extensible Linking Format" >/dev/null 2>&1 -then : - gl_cv_have_weak="guessing yes" -else - gl_cv_have_weak="guessing no" -fi -rm -rf conftest* - - -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#pragma weak fputs -int main () -{ - return (fputs == NULL); -} _ACEOF if ac_fn_c_try_run "$LINENO" then : - gl_cv_have_weak=yes + ac_cv_func_malloc_0_nonnull=yes else - gl_cv_have_weak=no + ac_cv_func_malloc_0_nonnull=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 fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_weak" >&5 -printf "%s\n" "$gl_cv_have_weak" >&6; } - if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then - # On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that - # it groks . It's added above, in gl_THREADLIB_EARLY_BODY. - ac_fn_c_check_header_compile "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default" -if test "x$ac_cv_header_pthread_h" = xyes +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5 +printf "%s\n" "$ac_cv_func_malloc_0_nonnull" >&6; } + if test $ac_cv_func_malloc_0_nonnull = yes then : - gl_have_pthread_h=yes + gl_cv_func_malloc_0_nonnull=1 else - gl_have_pthread_h=no + gl_cv_func_malloc_0_nonnull=0 fi - if test "$gl_have_pthread_h" = yes; then - # Other possible tests: - # -lpthreads (FSU threads, PCthreads) - # -lgthreads - gl_have_pthread= - # Test whether both pthread_mutex_lock and pthread_mutexattr_init exist - # in libc. IRIX 6.5 has the first one in both libc and libpthread, but - # the second one only in libpthread, and lock.c needs it. - # - # If -pthread works, prefer it to -lpthread, since Ubuntu 14.04 - # needs -pthread for some reason. See: - # http://lists.gnu.org/archive/html/bug-gnulib/2014-09/msg00023.html - save_LIBS=$LIBS - for gl_pthread in '' '-pthread'; do - LIBS="$LIBS $gl_pthread" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - pthread_mutex_t m; - pthread_mutexattr_t ma; - -int -main (void) -{ -pthread_mutex_lock (&m); - pthread_mutexattr_init (&ma); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO" -then : - gl_have_pthread=yes - LIBTHREAD=$gl_pthread LTLIBTHREAD=$gl_pthread - LIBMULTITHREAD=$gl_pthread LTLIBMULTITHREAD=$gl_pthread -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LIBS=$save_LIBS - test -n "$gl_have_pthread" && break - done - # Test for libpthread by looking for pthread_kill. (Not pthread_self, - # since it is defined as a macro on OSF/1.) - if test -n "$gl_have_pthread" && test -z "$LIBTHREAD"; then - # The program links fine without libpthread. But it may actually - # need to link with libpthread in order to create multiple threads. - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5 -printf %s "checking for pthread_kill in -lpthread... " >&6; } -if test ${ac_cv_lib_pthread_pthread_kill+y} -then : - printf %s "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lpthread $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ +printf "%s\n" "#define MALLOC_0_IS_NONNULL $gl_cv_func_malloc_0_nonnull" >>confdefs.h -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char pthread_kill (); -int -main (void) -{ -return pthread_kill (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO" -then : - ac_cv_lib_pthread_pthread_kill=yes -else - ac_cv_lib_pthread_pthread_kill=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5 -printf "%s\n" "$ac_cv_lib_pthread_pthread_kill" >&6; } -if test "x$ac_cv_lib_pthread_pthread_kill" = xyes -then : - LIBMULTITHREAD=-lpthread LTLIBMULTITHREAD=-lpthread - # On Solaris and HP-UX, most pthread functions exist also in libc. - # 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 | solaris2.1-9 | solaris2.1-9.* | hpux*) -printf "%s\n" "#define PTHREAD_IN_USE_DETECTION_HARD 1" >>confdefs.h - esac -fi - elif test -z "$gl_have_pthread"; then - # Some library is needed. Try libpthread and libc_r. - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5 -printf %s "checking for pthread_kill in -lpthread... " >&6; } -if test ${ac_cv_lib_pthread_pthread_kill+y} -then : - printf %s "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lpthread $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char pthread_kill (); -int -main (void) -{ -return pthread_kill (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO" -then : - ac_cv_lib_pthread_pthread_kill=yes -else - ac_cv_lib_pthread_pthread_kill=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5 -printf "%s\n" "$ac_cv_lib_pthread_pthread_kill" >&6; } -if test "x$ac_cv_lib_pthread_pthread_kill" = xyes -then : - gl_have_pthread=yes - LIBTHREAD=-lpthread LTLIBTHREAD=-lpthread - LIBMULTITHREAD=-lpthread LTLIBMULTITHREAD=-lpthread -fi - if test -z "$gl_have_pthread"; then - # For FreeBSD 4. - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lc_r" >&5 -printf %s "checking for pthread_kill in -lc_r... " >&6; } -if test ${ac_cv_lib_c_r_pthread_kill+y} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5 +printf %s "checking for a traditional japanese locale... " >&6; } +if test ${gt_cv_locale_ja+y} then : printf %s "(cached) " >&6 else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lc_r $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" +#include +#include +#if HAVE_LANGINFO_CODESET +# include #endif -char pthread_kill (); -int -main (void) +#include +#include +struct tm t; +char buf[16]; +int main () { -return pthread_kill (); - ; + /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl + imitates locale dependent behaviour by looking at the environment + variables, and all locales use the UTF-8 encoding. */ +#if defined __BEOS__ || defined __HAIKU__ + return 1; +#else + /* Check whether the given locale name is recognized by the system. */ +# if defined _WIN32 && !defined __CYGWIN__ + /* On native Windows, setlocale(category, "") looks at the system settings, + not at the environment variables. Also, when an encoding suffix such + as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE + category of the locale to "C". */ + if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL + || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0) + return 1; +# else + if (setlocale (LC_ALL, "") == NULL) return 1; +# endif + /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". + On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) + is empty, and the behaviour of Tcl 8.4 in this locale is not useful. + On OpenBSD 4.0, when an unsupported locale is specified, setlocale() + succeeds but then nl_langinfo(CODESET) is "646". In this situation, + some unit tests fail. + On MirBSD 10, when an unsupported locale is specified, setlocale() + succeeds but then nl_langinfo(CODESET) is "UTF-8". */ +# if HAVE_LANGINFO_CODESET + { + const char *cs = nl_langinfo (CODESET); + if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0 + || strcmp (cs, "UTF-8") == 0) + return 1; + } +# endif +# ifdef __CYGWIN__ + /* On Cygwin, avoid locale names without encoding suffix, because the + locale_charset() function relies on the encoding suffix. Note that + LC_ALL is set on the command line. */ + if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1; +# endif + /* Check whether MB_CUR_MAX is > 1. This excludes the dysfunctional locales + on Cygwin 1.5.x. */ + if (MB_CUR_MAX == 1) + return 1; + /* Check whether in a month name, no byte in the range 0x80..0x9F occurs. + This excludes the UTF-8 encoding (except on MirBSD). */ + { + const char *p; + t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4; + if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1; + for (p = buf; *p != '\0'; p++) + if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0) + return 1; + } return 0; +#endif } -_ACEOF -if ac_fn_c_try_link "$LINENO" -then : - ac_cv_lib_c_r_pthread_kill=yes -else - ac_cv_lib_c_r_pthread_kill=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_kill" >&5 -printf "%s\n" "$ac_cv_lib_c_r_pthread_kill" >&6; } -if test "x$ac_cv_lib_c_r_pthread_kill" = xyes -then : - gl_have_pthread=yes - LIBTHREAD=-lc_r LTLIBTHREAD=-lc_r - LIBMULTITHREAD=-lc_r LTLIBMULTITHREAD=-lc_r -fi - fi - fi - if test -n "$gl_have_pthread"; then - gl_threads_api=posix - -printf "%s\n" "#define USE_POSIX_THREADS 1" >>confdefs.h - - if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then - if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then - -printf "%s\n" "#define USE_POSIX_THREADS_WEAK 1" >>confdefs.h - - LIBTHREAD= - LTLIBTHREAD= +_ACEOF + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 + (eval $ac_link) 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && test -s conftest$ac_exeext; then + case "$host_os" in + # Handle native Windows specially, because there setlocale() interprets + # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256", + # "fr" or "fra" as "French" or "French_France.1252", + # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252", + # "ja" as "Japanese" or "Japanese_Japan.932", + # and similar. + mingw*) + # Note that on native Windows, the Japanese locale is + # Japanese_Japan.932, and CP932 is very different from EUC-JP, so we + # cannot use it here. + gt_cv_locale_ja=none + ;; + *) + # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because + # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the + # configure script would override the LC_ALL setting. Likewise for + # LC_CTYPE, which is also set at the beginning of the configure script. + # Test for the AIX locale name. + if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then + gt_cv_locale_ja=ja_JP + else + # Test for the locale name with explicit encoding suffix. + if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then + gt_cv_locale_ja=ja_JP.EUC-JP + else + # Test for the HP-UX, OSF/1, NetBSD locale name. + if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then + gt_cv_locale_ja=ja_JP.eucJP + else + # Test for the IRIX, FreeBSD locale name. + if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then + gt_cv_locale_ja=ja_JP.EUC + else + # Test for the Solaris 7 locale name. + if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then + gt_cv_locale_ja=ja + else + # Special test for NetBSD 1.6. + if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then + gt_cv_locale_ja=ja_JP.eucJP + else + # None found. + gt_cv_locale_ja=none + fi + fi + fi + fi fi fi - fi - fi + ;; + esac fi - if test -z "$gl_have_pthread"; then - if test "$gl_use_threads" = yes || test "$gl_use_threads" = solaris; then - gl_have_solaristhread= - gl_save_LIBS="$LIBS" - LIBS="$LIBS -lthread" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include -#include + rm -fr conftest* -int -main (void) -{ -thr_self(); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO" -then : - gl_have_solaristhread=yes fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LIBS="$gl_save_LIBS" - if test -n "$gl_have_solaristhread"; then - gl_threads_api=solaris - LIBTHREAD=-lthread - LTLIBTHREAD=-lthread - LIBMULTITHREAD="$LIBTHREAD" - LTLIBMULTITHREAD="$LTLIBTHREAD" - -printf "%s\n" "#define USE_SOLARIS_THREADS 1" >>confdefs.h - - if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then - -printf "%s\n" "#define USE_SOLARIS_THREADS_WEAK 1" >>confdefs.h - - LIBTHREAD= - LTLIBTHREAD= - fi - fi - fi - fi - if test "$gl_use_threads" = pth; then - gl_save_CPPFLAGS="$CPPFLAGS" +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5 +printf "%s\n" "$gt_cv_locale_ja" >&6; } + LOCALE_JA=$gt_cv_locale_ja - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to link with libpth" >&5 -printf %s "checking how to link with libpth... " >&6; } -if test ${ac_cv_libpth_libs+y} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5 +printf %s "checking for a transitional chinese locale... " >&6; } +if test ${gt_cv_locale_zh_CN+y} then : printf %s "(cached) " >&6 else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#include +#if HAVE_LANGINFO_CODESET +# include +#endif +#include +#include +struct tm t; +char buf[16]; +int main () +{ + /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl + imitates locale dependent behaviour by looking at the environment + variables, and all locales use the UTF-8 encoding. */ +#if defined __BEOS__ || defined __HAIKU__ + return 1; +#else + /* Check whether the given locale name is recognized by the system. */ +# if defined _WIN32 && !defined __CYGWIN__ + /* On native Windows, setlocale(category, "") looks at the system settings, + not at the environment variables. Also, when an encoding suffix such + as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE + category of the locale to "C". */ + if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL + || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0) + return 1; +# else + if (setlocale (LC_ALL, "") == NULL) return 1; +# endif + /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". + On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) + is empty, and the behaviour of Tcl 8.4 in this locale is not useful. + On OpenBSD 4.0, when an unsupported locale is specified, setlocale() + succeeds but then nl_langinfo(CODESET) is "646". In this situation, + some unit tests fail. + On MirBSD 10, when an unsupported locale is specified, setlocale() + succeeds but then nl_langinfo(CODESET) is "UTF-8". */ +# if HAVE_LANGINFO_CODESET + { + const char *cs = nl_langinfo (CODESET); + if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0 + || strcmp (cs, "UTF-8") == 0) + return 1; + } +# endif +# ifdef __CYGWIN__ + /* On Cygwin, avoid locale names without encoding suffix, because the + locale_charset() function relies on the encoding suffix. Note that + LC_ALL is set on the command line. */ + if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1; +# endif + /* Check whether in a month name, no byte in the range 0x80..0x9F occurs. + This excludes the UTF-8 encoding (except on MirBSD). */ + { + const char *p; + t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4; + if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1; + for (p = buf; *p != '\0'; p++) + if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0) + return 1; + } + /* Check whether a typical GB18030 multibyte sequence is recognized as a + single wide character. This excludes the GB2312 and GBK encodings. */ + if (mblen ("\203\062\332\066", 5) != 4) + return 1; + return 0; +#endif +} +_ACEOF + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 + (eval $ac_link) 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && test -s conftest$ac_exeext; then + case "$host_os" in + # Handle native Windows specially, because there setlocale() interprets + # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256", + # "fr" or "fra" as "French" or "French_France.1252", + # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252", + # "ja" as "Japanese" or "Japanese_Japan.932", + # and similar. + mingw*) + # Test for the hypothetical native Windows locale name. + if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then + gt_cv_locale_zh_CN=Chinese_China.54936 + else + # None found. + gt_cv_locale_zh_CN=none + fi + ;; + solaris2.8) + # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are + # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK. + # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core. + gt_cv_locale_zh_CN=none + ;; + *) + # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because + # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the + # configure script would override the LC_ALL setting. Likewise for + # LC_CTYPE, which is also set at the beginning of the configure script. + # Test for the locale name without encoding suffix. + if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then + gt_cv_locale_zh_CN=zh_CN + else + # Test for the locale name with explicit encoding suffix. + if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then + gt_cv_locale_zh_CN=zh_CN.GB18030 + else + # None found. + gt_cv_locale_zh_CN=none + fi + fi + ;; + esac + else + # If there was a link error, due to mblen(), the system is so old that + # it certainly doesn't have a chinese locale. + gt_cv_locale_zh_CN=none + fi + rm -fr conftest* +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5 +printf "%s\n" "$gt_cv_locale_zh_CN" >&6; } + LOCALE_ZH_CN=$gt_cv_locale_zh_CN - use_additional=yes - - acl_save_prefix="$prefix" - prefix="$acl_final_prefix" - acl_save_exec_prefix="$exec_prefix" - exec_prefix="$acl_final_exec_prefix" - - eval additional_includedir=\"$includedir\" - eval additional_libdir=\"$libdir\" - - exec_prefix="$acl_save_exec_prefix" - prefix="$acl_save_prefix" - - -# Check whether --with-libpth-prefix was given. -if test ${with_libpth_prefix+y} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5 +printf %s "checking for a french Unicode locale... " >&6; } +if test ${gt_cv_locale_fr_utf8+y} then : - withval=$with_libpth_prefix; - if test "X$withval" = "Xno"; then - use_additional=no - else - if test "X$withval" = "X"; then - - acl_save_prefix="$prefix" - prefix="$acl_final_prefix" - acl_save_exec_prefix="$exec_prefix" - exec_prefix="$acl_final_exec_prefix" - - eval additional_includedir=\"$includedir\" - eval additional_libdir=\"$libdir\" - - exec_prefix="$acl_save_exec_prefix" - prefix="$acl_save_prefix" + printf %s "(cached) " >&6 +else - else - additional_includedir="$withval/include" - additional_libdir="$withval/$acl_libdirstem" - if test "$acl_libdirstem2" != "$acl_libdirstem" \ - && ! test -d "$withval/$acl_libdirstem"; then - additional_libdir="$withval/$acl_libdirstem2" - fi - fi - fi + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ -fi +#include +#include +#if HAVE_LANGINFO_CODESET +# include +#endif +#include +#include +struct tm t; +char buf[16]; +int main () { + /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl + imitates locale dependent behaviour by looking at the environment + variables, and all locales use the UTF-8 encoding. */ +#if !(defined __BEOS__ || defined __HAIKU__) + /* Check whether the given locale name is recognized by the system. */ +# if defined _WIN32 && !defined __CYGWIN__ + /* On native Windows, setlocale(category, "") looks at the system settings, + not at the environment variables. Also, when an encoding suffix such + as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE + category of the locale to "C". */ + if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL + || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0) + return 1; +# else + if (setlocale (LC_ALL, "") == NULL) return 1; +# endif + /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". + On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) + is empty, and the behaviour of Tcl 8.4 in this locale is not useful. + On OpenBSD 4.0, when an unsupported locale is specified, setlocale() + succeeds but then nl_langinfo(CODESET) is "646". In this situation, + some unit tests fail. */ +# if HAVE_LANGINFO_CODESET + { + const char *cs = nl_langinfo (CODESET); + if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0) + return 1; + } +# endif +# ifdef __CYGWIN__ + /* On Cygwin, avoid locale names without encoding suffix, because the + locale_charset() function relies on the encoding suffix. Note that + LC_ALL is set on the command line. */ + if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1; +# endif + /* Check whether in the abbreviation of the second month, the second + character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is + two bytes long, with UTF-8 encoding. */ + t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4; + if (strftime (buf, sizeof (buf), "%b", &t) < 4 + || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v') + return 1; +#endif +#if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */ + /* Check whether the decimal separator is a comma. + On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point + are nl_langinfo(RADIXCHAR) are both ".". */ + if (localeconv () ->decimal_point[0] != ',') return 1; +#endif + return 0; +} - LIBPTH= - LTLIBPTH= - INCPTH= - LIBPTH_PREFIX= - HAVE_LIBPTH= - rpathdirs= - ltrpathdirs= - names_already_handled= - names_next_round='pth ' - while test -n "$names_next_round"; do - names_this_round="$names_next_round" - names_next_round= - for name in $names_this_round; do - already_handled= - for n in $names_already_handled; do - if test "$n" = "$name"; then - already_handled=yes - break - fi - done - if test -z "$already_handled"; then - names_already_handled="$names_already_handled $name" - uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'` - eval value=\"\$HAVE_LIB$uppername\" - if test -n "$value"; then - if test "$value" = yes; then - eval value=\"\$LIB$uppername\" - test -z "$value" || LIBPTH="${LIBPTH}${LIBPTH:+ }$value" - eval value=\"\$LTLIB$uppername\" - test -z "$value" || LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }$value" - else - : - fi - else - found_dir= - found_la= - found_so= - found_a= - eval libname=\"$acl_libname_spec\" # typically: libname=lib$name - if test -n "$acl_shlibext"; then - shrext=".$acl_shlibext" # typically: shrext=.so +_ACEOF + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 + (eval $ac_link) 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && test -s conftest$ac_exeext; then + case "$host_os" in + # Handle native Windows specially, because there setlocale() interprets + # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256", + # "fr" or "fra" as "French" or "French_France.1252", + # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252", + # "ja" as "Japanese" or "Japanese_Japan.932", + # and similar. + mingw*) + # Test for the hypothetical native Windows locale name. + if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then + gt_cv_locale_fr_utf8=French_France.65001 else - shrext= - fi - if test $use_additional = yes; then - dir="$additional_libdir" - if test -n "$acl_shlibext"; then - if test -f "$dir/$libname$shrext"; then - found_dir="$dir" - found_so="$dir/$libname$shrext" - else - if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then - ver=`(cd "$dir" && \ - for f in "$libname$shrext".*; do echo "$f"; done \ - | sed -e "s,^$libname$shrext\\\\.,," \ - | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ - | sed 1q ) 2>/dev/null` - if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then - found_dir="$dir" - found_so="$dir/$libname$shrext.$ver" - fi - else - eval library_names=\"$acl_library_names_spec\" - for f in $library_names; do - if test -f "$dir/$f"; then - found_dir="$dir" - found_so="$dir/$f" - break - fi - done - fi - fi - fi - if test "X$found_dir" = "X"; then - if test -f "$dir/$libname.$acl_libext"; then - found_dir="$dir" - found_a="$dir/$libname.$acl_libext" - fi - fi - if test "X$found_dir" != "X"; then - if test -f "$dir/$libname.la"; then - found_la="$dir/$libname.la" - fi - fi - fi - if test "X$found_dir" = "X"; then - for x in $LDFLAGS $LTLIBPTH; do - - acl_save_prefix="$prefix" - prefix="$acl_final_prefix" - acl_save_exec_prefix="$exec_prefix" - exec_prefix="$acl_final_exec_prefix" - eval x=\"$x\" - exec_prefix="$acl_save_exec_prefix" - prefix="$acl_save_prefix" - - case "$x" in - -L*) - dir=`echo "X$x" | sed -e 's/^X-L//'` - if test -n "$acl_shlibext"; then - if test -f "$dir/$libname$shrext"; then - found_dir="$dir" - found_so="$dir/$libname$shrext" - else - if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then - ver=`(cd "$dir" && \ - for f in "$libname$shrext".*; do echo "$f"; done \ - | sed -e "s,^$libname$shrext\\\\.,," \ - | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ - | sed 1q ) 2>/dev/null` - if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then - found_dir="$dir" - found_so="$dir/$libname$shrext.$ver" - fi - else - eval library_names=\"$acl_library_names_spec\" - for f in $library_names; do - if test -f "$dir/$f"; then - found_dir="$dir" - found_so="$dir/$f" - break - fi - done - fi - fi - fi - if test "X$found_dir" = "X"; then - if test -f "$dir/$libname.$acl_libext"; then - found_dir="$dir" - found_a="$dir/$libname.$acl_libext" - fi - fi - if test "X$found_dir" != "X"; then - if test -f "$dir/$libname.la"; then - found_la="$dir/$libname.la" - fi - fi - ;; - esac - if test "X$found_dir" != "X"; then - break - fi - done - fi - if test "X$found_dir" != "X"; then - LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-L$found_dir -l$name" - if test "X$found_so" != "X"; then - if test "$enable_rpath" = no \ - || test "X$found_dir" = "X/usr/$acl_libdirstem" \ - || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then - LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so" - else - haveit= - for x in $ltrpathdirs; do - if test "X$x" = "X$found_dir"; then - haveit=yes - break - fi - done - if test -z "$haveit"; then - ltrpathdirs="$ltrpathdirs $found_dir" - fi - if test "$acl_hardcode_direct" = yes; then - LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so" - else - if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then - LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so" - haveit= - for x in $rpathdirs; do - if test "X$x" = "X$found_dir"; then - haveit=yes - break - fi - done - if test -z "$haveit"; then - rpathdirs="$rpathdirs $found_dir" - fi - else - haveit= - for x in $LDFLAGS $LIBPTH; do - - acl_save_prefix="$prefix" - prefix="$acl_final_prefix" - acl_save_exec_prefix="$exec_prefix" - exec_prefix="$acl_final_exec_prefix" - eval x=\"$x\" - exec_prefix="$acl_save_exec_prefix" - prefix="$acl_save_prefix" - - if test "X$x" = "X-L$found_dir"; then - haveit=yes - break - fi - done - if test -z "$haveit"; then - LIBPTH="${LIBPTH}${LIBPTH:+ }-L$found_dir" - fi - if test "$acl_hardcode_minus_L" != no; then - LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so" - else - LIBPTH="${LIBPTH}${LIBPTH:+ }-l$name" - fi - fi - fi - fi + # None found. + gt_cv_locale_fr_utf8=none + fi + ;; + *) + # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because + # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the + # configure script would override the LC_ALL setting. Likewise for + # LC_CTYPE, which is also set at the beginning of the configure script. + # Test for the usual locale name. + if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then + gt_cv_locale_fr_utf8=fr_FR + else + # Test for the locale name with explicit encoding suffix. + if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then + gt_cv_locale_fr_utf8=fr_FR.UTF-8 else - if test "X$found_a" != "X"; then - LIBPTH="${LIBPTH}${LIBPTH:+ }$found_a" + # Test for the Solaris 7 locale name. + if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then + gt_cv_locale_fr_utf8=fr.UTF-8 else - LIBPTH="${LIBPTH}${LIBPTH:+ }-L$found_dir -l$name" + # None found. + gt_cv_locale_fr_utf8=none fi fi - additional_includedir= - case "$found_dir" in - */$acl_libdirstem | */$acl_libdirstem/) - basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'` - if test "$name" = 'pth'; then - LIBPTH_PREFIX="$basedir" - fi - additional_includedir="$basedir/include" - ;; - */$acl_libdirstem2 | */$acl_libdirstem2/) - basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'` - if test "$name" = 'pth'; then - LIBPTH_PREFIX="$basedir" - fi - additional_includedir="$basedir/include" - ;; - esac - if test "X$additional_includedir" != "X"; then - if test "X$additional_includedir" != "X/usr/include"; then - haveit= - if test "X$additional_includedir" = "X/usr/local/include"; then - if test -n "$GCC"; then - case $host_os in - linux* | gnu* | k*bsd*-gnu) haveit=yes;; - esac - fi - fi - if test -z "$haveit"; then - for x in $CPPFLAGS $INCPTH; do + fi + ;; + esac + fi + rm -fr conftest* - acl_save_prefix="$prefix" - prefix="$acl_final_prefix" - acl_save_exec_prefix="$exec_prefix" - exec_prefix="$acl_final_exec_prefix" - eval x=\"$x\" - exec_prefix="$acl_save_exec_prefix" - prefix="$acl_save_prefix" +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5 +printf "%s\n" "$gt_cv_locale_fr_utf8" >&6; } + LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8 - if test "X$x" = "X-I$additional_includedir"; then - haveit=yes - break - fi - done - if test -z "$haveit"; then - if test -d "$additional_includedir"; then - INCPTH="${INCPTH}${INCPTH:+ }-I$additional_includedir" - fi - fi - fi - fi - fi - if test -n "$found_la"; then - save_libdir="$libdir" - case "$found_la" in - */* | *\\*) . "$found_la" ;; - *) . "./$found_la" ;; - esac - libdir="$save_libdir" - for dep in $dependency_libs; do - case "$dep" in - -L*) - additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` - if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \ - && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then - haveit= - if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \ - || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then - if test -n "$GCC"; then - case $host_os in - linux* | gnu* | k*bsd*-gnu) haveit=yes;; - esac - fi - fi - if test -z "$haveit"; then - haveit= - for x in $LDFLAGS $LIBPTH; do - acl_save_prefix="$prefix" - prefix="$acl_final_prefix" - acl_save_exec_prefix="$exec_prefix" - exec_prefix="$acl_final_exec_prefix" - eval x=\"$x\" - exec_prefix="$acl_save_exec_prefix" - prefix="$acl_save_prefix" - if test "X$x" = "X-L$additional_libdir"; then - haveit=yes - break - fi - done - if test -z "$haveit"; then - if test -d "$additional_libdir"; then - LIBPTH="${LIBPTH}${LIBPTH:+ }-L$additional_libdir" - fi - fi - haveit= - for x in $LDFLAGS $LTLIBPTH; do - acl_save_prefix="$prefix" - prefix="$acl_final_prefix" - acl_save_exec_prefix="$exec_prefix" - exec_prefix="$acl_final_exec_prefix" - eval x=\"$x\" - exec_prefix="$acl_save_exec_prefix" - prefix="$acl_save_prefix" - if test "X$x" = "X-L$additional_libdir"; then - haveit=yes - break - fi - done - if test -z "$haveit"; then - if test -d "$additional_libdir"; then - LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-L$additional_libdir" - fi - fi - fi - fi - ;; - -R*) - dir=`echo "X$dep" | sed -e 's/^X-R//'` - if test "$enable_rpath" != no; then - haveit= - for x in $rpathdirs; do - if test "X$x" = "X$dir"; then - haveit=yes - break - fi - done - if test -z "$haveit"; then - rpathdirs="$rpathdirs $dir" - fi - haveit= - for x in $ltrpathdirs; do - if test "X$x" = "X$dir"; then - haveit=yes - break - fi - done - if test -z "$haveit"; then - ltrpathdirs="$ltrpathdirs $dir" - fi - fi - ;; - -l*) - names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` - ;; - *.la) - names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` - ;; - *) - LIBPTH="${LIBPTH}${LIBPTH:+ }$dep" - LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }$dep" - ;; - esac - done - fi - else - LIBPTH="${LIBPTH}${LIBPTH:+ }-l$name" - LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-l$name" - fi - fi - fi - done - done - if test "X$rpathdirs" != "X"; then - if test -n "$acl_hardcode_libdir_separator"; then - alldirs= - for found_dir in $rpathdirs; do - alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir" - done - acl_save_libdir="$libdir" - libdir="$alldirs" - eval flag=\"$acl_hardcode_libdir_flag_spec\" - libdir="$acl_save_libdir" - LIBPTH="${LIBPTH}${LIBPTH:+ }$flag" - else - for found_dir in $rpathdirs; do - acl_save_libdir="$libdir" - libdir="$found_dir" - eval flag=\"$acl_hardcode_libdir_flag_spec\" - libdir="$acl_save_libdir" - LIBPTH="${LIBPTH}${LIBPTH:+ }$flag" - done - fi - fi - if test "X$ltrpathdirs" != "X"; then - for found_dir in $ltrpathdirs; do - LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-R$found_dir" - done - fi - ac_cv_libpth_libs="$LIBPTH" - ac_cv_libpth_ltlibs="$LTLIBPTH" - ac_cv_libpth_cppflags="$INCPTH" - ac_cv_libpth_prefix="$LIBPTH_PREFIX" + if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then + + + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5 +printf %s "checking whether mbrtowc handles incomplete characters... " >&6; } +if test ${gl_cv_func_mbrtowc_incomplete_state+y} +then : + printf %s "(cached) " >&6 +else + + case "$host_os" in + # Guess no on AIX and OSF/1. + aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;; + # Guess yes otherwise. + *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;; + esac + if test $LOCALE_JA != none; then + if test "$cross_compiling" = yes +then : + : +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include +/* 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 +int main () +{ + if (setlocale (LC_ALL, "$LOCALE_JA") != NULL) + { + const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */ + mbstate_t state; + wchar_t wc; + + memset (&state, '\0', sizeof (mbstate_t)); + if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2)) + if (mbsinit (&state)) + return 2; + } + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO" +then : + gl_cv_func_mbrtowc_incomplete_state=yes +else + gl_cv_func_mbrtowc_incomplete_state=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libpth_libs" >&5 -printf "%s\n" "$ac_cv_libpth_libs" >&6; } - LIBPTH="$ac_cv_libpth_libs" - LTLIBPTH="$ac_cv_libpth_ltlibs" - INCPTH="$ac_cv_libpth_cppflags" - LIBPTH_PREFIX="$ac_cv_libpth_prefix" - for element in $INCPTH; do - haveit= - for x in $CPPFLAGS; do + fi - acl_save_prefix="$prefix" - prefix="$acl_final_prefix" - acl_save_exec_prefix="$exec_prefix" - exec_prefix="$acl_final_exec_prefix" - eval x=\"$x\" - exec_prefix="$acl_save_exec_prefix" - prefix="$acl_save_prefix" +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5 +printf "%s\n" "$gl_cv_func_mbrtowc_incomplete_state" >&6; } + + + + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5 +printf %s "checking whether mbrtowc works as well as mbtowc... " >&6; } +if test ${gl_cv_func_mbrtowc_sanitycheck+y} +then : + printf %s "(cached) " >&6 +else + + case "$host_os" in + # Guess no on Solaris 8. + solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;; + # Guess yes otherwise. + *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;; + esac + if test $LOCALE_ZH_CN != none; then + if test "$cross_compiling" = yes +then : + : +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include +#include +/* 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 +int main () +{ + /* This fails on Solaris 8: + mbrtowc returns 2, and sets wc to 0x00F0. + mbtowc returns 4 (correct) and sets wc to 0x5EDC. */ + if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL) + { + char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */ + mbstate_t state; + wchar_t wc; + + memset (&state, '\0', sizeof (mbstate_t)); + if (mbrtowc (&wc, input + 3, 6, &state) != 4 + && mbtowc (&wc, input + 3, 6) == 4) + return 2; + } + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO" +then : + gl_cv_func_mbrtowc_sanitycheck=yes +else + gl_cv_func_mbrtowc_sanitycheck=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi - if test "X$x" = "X$element"; then - haveit=yes - break fi - done - if test -z "$haveit"; then - CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5 +printf "%s\n" "$gl_cv_func_mbrtowc_sanitycheck" >&6; } + + REPLACE_MBSTATE_T=0 + case "$gl_cv_func_mbrtowc_incomplete_state" in + *yes) ;; + *) REPLACE_MBSTATE_T=1 ;; + esac + case "$gl_cv_func_mbrtowc_sanitycheck" in + *yes) ;; + *) REPLACE_MBSTATE_T=1 ;; + esac + else + REPLACE_MBSTATE_T=1 + fi + + + + if test $ac_cv_func_mbrtowc = no; then + HAVE_MBRTOWC=0 + ac_fn_c_check_decl "$LINENO" "mbrtowc" "ac_cv_have_decl_mbrtowc" " +/* 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 + +" +if test "x$ac_cv_have_decl_mbrtowc" = xyes +then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +printf "%s\n" "#define HAVE_DECL_MBRTOWC $ac_have_decl" >>confdefs.h + + if test $ac_cv_have_decl_mbrtowc = yes; then + REPLACE_MBRTOWC=1 fi - done + else + if test $REPLACE_MBSTATE_T = 1; then + REPLACE_MBRTOWC=1 + else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL pwc argument" >&5 +printf %s "checking whether mbrtowc handles a NULL pwc argument... " >&6; } +if test ${gl_cv_func_mbrtowc_null_arg1+y} +then : + printf %s "(cached) " >&6 +else - HAVE_LIBPTH=yes + case "$host_os" in + # Guess no on Solaris. + solaris*) gl_cv_func_mbrtowc_null_arg1="guessing no" ;; + # Guess yes otherwise. + *) gl_cv_func_mbrtowc_null_arg1="guessing yes" ;; + esac + if test $LOCALE_FR_UTF8 != none; then + if test "$cross_compiling" = yes +then : + : +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include +#include +/* 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 +int main () +{ + int result = 0; + if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL) + { + char input[] = "\303\237er"; + mbstate_t state; + wchar_t wc; + size_t ret; + memset (&state, '\0', sizeof (mbstate_t)); + wc = (wchar_t) 0xBADFACE; + ret = mbrtowc (&wc, input, 5, &state); + if (ret != 2) + result |= 1; + if (!mbsinit (&state)) + result |= 2; - gl_have_pth= - gl_save_LIBS="$LIBS" - LIBS="$LIBS $LIBPTH" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + memset (&state, '\0', sizeof (mbstate_t)); + ret = mbrtowc (NULL, input, 5, &state); + if (ret != 2) /* Solaris 7 fails here: ret is -1. */ + result |= 4; + if (!mbsinit (&state)) + result |= 8; + } + return result; +} +_ACEOF +if ac_fn_c_try_run "$LINENO" +then : + gl_cv_func_mbrtowc_null_arg1=yes +else + gl_cv_func_mbrtowc_null_arg1=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 + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg1" >&5 +printf "%s\n" "$gl_cv_func_mbrtowc_null_arg1" >&6; } + + + + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL string argument" >&5 +printf %s "checking whether mbrtowc handles a NULL string argument... " >&6; } +if test ${gl_cv_func_mbrtowc_null_arg2+y} +then : + printf %s "(cached) " >&6 +else + + case "$host_os" in + # Guess no on OSF/1. + osf*) gl_cv_func_mbrtowc_null_arg2="guessing no" ;; + # Guess yes otherwise. + *) gl_cv_func_mbrtowc_null_arg2="guessing yes" ;; + esac + if test $LOCALE_FR_UTF8 != none; then + if test "$cross_compiling" = yes +then : + : +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include -int -main (void) + +#include +#include +/* 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 +int main () { -pth_self(); - ; + if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL) + { + mbstate_t state; + wchar_t wc; + int ret; + + memset (&state, '\0', sizeof (mbstate_t)); + wc = (wchar_t) 0xBADFACE; + mbrtowc (&wc, NULL, 5, &state); + /* Check that wc was not modified. */ + if (wc != (wchar_t) 0xBADFACE) + return 2; + } return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" +if ac_fn_c_try_run "$LINENO" then : - gl_have_pth=yes + gl_cv_func_mbrtowc_null_arg2=yes +else + gl_cv_func_mbrtowc_null_arg2=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LIBS="$gl_save_LIBS" - if test -n "$gl_have_pth"; then - gl_threads_api=pth - LIBTHREAD="$LIBPTH" - LTLIBTHREAD="$LTLIBPTH" - LIBMULTITHREAD="$LIBTHREAD" - LTLIBMULTITHREAD="$LTLIBTHREAD" -printf "%s\n" "#define USE_PTH_THREADS 1" >>confdefs.h + fi - if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then - if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg2" >&5 +printf "%s\n" "$gl_cv_func_mbrtowc_null_arg2" >&6; } -printf "%s\n" "#define USE_PTH_THREADS_WEAK 1" >>confdefs.h - LIBTHREAD= - LTLIBTHREAD= - fi - fi - else - CPPFLAGS="$gl_save_CPPFLAGS" - fi - fi - if test -z "$gl_have_pthread"; then - case "$gl_use_threads" in - yes | windows | win32) # The 'win32' is for backward compatibility. - if { case "$host_os" in - mingw*) true;; - *) false;; - esac - }; then - gl_threads_api=windows -printf "%s\n" "#define USE_WINDOWS_THREADS 1" >>confdefs.h - fi - ;; - esac - fi - fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for multithread API to use" >&5 -printf %s "checking for multithread API to use... " >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_threads_api" >&5 -printf "%s\n" "$gl_threads_api" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc has a correct return value" >&5 +printf %s "checking whether mbrtowc has a correct return value... " >&6; } +if test ${gl_cv_func_mbrtowc_retval+y} +then : + printf %s "(cached) " >&6 +else + case "$host_os" in + # Guess no on HP-UX, Solaris, native Windows. + hpux* | solaris* | mingw*) gl_cv_func_mbrtowc_retval="guessing no" ;; + # Guess yes otherwise. + *) gl_cv_func_mbrtowc_retval="guessing yes" ;; + esac + if test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none \ + || { case "$host_os" in mingw*) true;; *) false;; esac; }; then + if test "$cross_compiling" = yes +then : + : +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +/* 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 +int main () +{ + int result = 0; + int found_some_locale = 0; + /* This fails on Solaris. */ + if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL) + { + char input[] = "B\303\274\303\237er"; /* "Büßer" */ + mbstate_t state; + wchar_t wc; + memset (&state, '\0', sizeof (mbstate_t)); + if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2)) + { + input[1] = '\0'; + if (mbrtowc (&wc, input + 2, 5, &state) != 1) + result |= 1; + } + found_some_locale = 1; + } + /* This fails on HP-UX 11.11. */ + if (setlocale (LC_ALL, "$LOCALE_JA") != NULL) + { + char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */ + mbstate_t state; + wchar_t wc; + memset (&state, '\0', sizeof (mbstate_t)); + if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2)) + { + input[1] = '\0'; + if (mbrtowc (&wc, input + 2, 5, &state) != 2) + result |= 2; + } + found_some_locale = 1; + } + /* This fails on native Windows. */ + if (setlocale (LC_ALL, "Japanese_Japan.932") != NULL) + { + char input[] = "<\223\372\226\173\214\352>"; /* "<日本語>" */ + mbstate_t state; + wchar_t wc; + memset (&state, '\0', sizeof (mbstate_t)); + if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2)) + { + input[3] = '\0'; + if (mbrtowc (&wc, input + 4, 4, &state) != 1) + result |= 4; + } + found_some_locale = 1; + } + if (setlocale (LC_ALL, "Chinese_Taiwan.950") != NULL) + { + char input[] = "<\244\351\245\273\273\171>"; /* "<日本語>" */ + mbstate_t state; + wchar_t wc; + memset (&state, '\0', sizeof (mbstate_t)); + if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2)) + { + input[3] = '\0'; + if (mbrtowc (&wc, input + 4, 4, &state) != 1) + result |= 8; + } + found_some_locale = 1; + } + if (setlocale (LC_ALL, "Chinese_China.936") != NULL) + { + char input[] = "<\310\325\261\276\325\132>"; /* "<日本語>" */ + mbstate_t state; + wchar_t wc; + memset (&state, '\0', sizeof (mbstate_t)); + if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2)) + { + input[3] = '\0'; + if (mbrtowc (&wc, input + 4, 4, &state) != 1) + result |= 16; + } + found_some_locale = 1; + } + return (found_some_locale ? result : 77); +} +_ACEOF +if ac_fn_c_try_run "$LINENO" +then : + gl_cv_func_mbrtowc_retval=yes +else + if test $? != 77; then + gl_cv_func_mbrtowc_retval=no + fi +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 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_retval" >&5 +printf "%s\n" "$gl_cv_func_mbrtowc_retval" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc returns 0 when parsing a NUL character" >&5 +printf %s "checking whether mbrtowc returns 0 when parsing a NUL character... " >&6; } +if test ${gl_cv_func_mbrtowc_nul_retval+y} +then : + printf %s "(cached) " >&6 +else + case "$host_os" in + # Guess no on Solaris 8 and 9. + solaris2.[89]) gl_cv_func_mbrtowc_nul_retval="guessing no" ;; + # Guess yes otherwise. + *) gl_cv_func_mbrtowc_nul_retval="guessing yes" ;; + esac + if test $LOCALE_ZH_CN != none; then + if test "$cross_compiling" = yes +then : + : +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +/* 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 +int main () +{ + /* This fails on Solaris 8 and 9. */ + if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL) + { + mbstate_t state; + wchar_t wc; -printf "%s\n" "#define _USE_STD_STAT 1" >>confdefs.h + memset (&state, '\0', sizeof (mbstate_t)); + if (mbrtowc (&wc, "", 1, &state) != 0) + return 2; + } + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO" +then : + gl_cv_func_mbrtowc_nul_retval=yes +else + gl_cv_func_mbrtowc_nul_retval=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 +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_nul_retval" >&5 +printf "%s\n" "$gl_cv_func_mbrtowc_nul_retval" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works on empty input" >&5 +printf %s "checking whether mbrtowc works on empty input... " >&6; } +if test ${gl_cv_func_mbrtowc_empty_input+y} +then : + printf %s "(cached) " >&6 +else + case "$host_os" in + # Guess no on AIX and glibc systems. + aix* | *-gnu* | gnu*) gl_cv_func_mbrtowc_empty_input="guessing no" ;; + # Guess yes on native Windows. + mingw*) gl_cv_func_mbrtowc_empty_input="guessing yes" ;; + *) gl_cv_func_mbrtowc_empty_input="guessing yes" ;; + esac + if test "$cross_compiling" = yes +then : + : +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + #include + static wchar_t wc; + static mbstate_t mbs; + int + main (void) + { + return mbrtowc (&wc, "", 0, &mbs) != (size_t) -2; + } +_ACEOF +if ac_fn_c_try_run "$LINENO" +then : + 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 +fi +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_empty_input" >&5 +printf "%s\n" "$gl_cv_func_mbrtowc_empty_input" >&6; } - if test $gl_cv_have_include_next = yes; then - gl_cv_next_sys_types_h='<'sys/types.h'>' - else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 -printf %s "checking absolute name of ... " >&6; } -if test ${gl_cv_next_sys_types_h+y} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C locale is free of encoding errors" >&5 +printf %s "checking whether the C locale is free of encoding errors... " >&6; } +if test ${gl_cv_C_locale_sans_EILSEQ+y} then : printf %s "(cached) " >&6 else + gl_cv_C_locale_sans_EILSEQ="guessing no" + if test "$cross_compiling" = yes +then : + case "$host_os" in + # Guess yes on native Windows. + mingw*) gl_cv_C_locale_sans_EILSEQ="guessing yes" ;; + esac +else 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 +#include + #include + #include - case "$host_os" in - mingw*) - gl_dirsep_regex='[/\\]' - ;; - *) - gl_dirsep_regex='\/' - ;; - esac - gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' - gl_header_literal_regex=`echo 'sys/types.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 - }' +int +main (void) +{ - gl_cv_absolute_sys_types_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | - sed -n "$gl_absolute_header_sed"` + 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_header=$gl_cv_absolute_sys_types_h - gl_cv_next_sys_types_h='"'$gl_header'"' + ; + 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 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_types_h" >&5 -printf "%s\n" "$gl_cv_next_sys_types_h" >&6; } - fi - NEXT_SYS_TYPES_H=$gl_cv_next_sys_types_h +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_C_locale_sans_EILSEQ" >&5 +printf "%s\n" "$gl_cv_C_locale_sans_EILSEQ" >&6; } + + case "$gl_cv_func_mbrtowc_null_arg1" in + *yes) ;; + *) +printf "%s\n" "#define MBRTOWC_NULL_ARG1_BUG 1" >>confdefs.h + + REPLACE_MBRTOWC=1 + ;; + esac + case "$gl_cv_func_mbrtowc_null_arg2" in + *yes) ;; + *) +printf "%s\n" "#define MBRTOWC_NULL_ARG2_BUG 1" >>confdefs.h + + REPLACE_MBRTOWC=1 + ;; + esac + case "$gl_cv_func_mbrtowc_retval" in + *yes) ;; + *) +printf "%s\n" "#define MBRTOWC_RETVAL_BUG 1" >>confdefs.h + + REPLACE_MBRTOWC=1 + ;; + esac + case "$gl_cv_func_mbrtowc_nul_retval" in + *yes) ;; + *) +printf "%s\n" "#define MBRTOWC_NUL_RETVAL_BUG 1" >>confdefs.h + + REPLACE_MBRTOWC=1 + ;; + esac + case "$gl_cv_func_mbrtowc_empty_input" in + *yes) ;; + *) +printf "%s\n" "#define MBRTOWC_EMPTY_INPUT_BUG 1" >>confdefs.h + + REPLACE_MBRTOWC=1 + ;; + esac + case $gl_cv_C_locale_sans_EILSEQ in + *yes) ;; + *) +printf "%s\n" "#define C_LOCALE_MAYBE_EILSEQ 1" >>confdefs.h + + REPLACE_MBRTOWC=1 + ;; + esac + fi + fi + + + + GNULIB_EXPLICIT_BZERO=0; + GNULIB_FFSL=0; + GNULIB_FFSLL=0; + GNULIB_MEMCHR=0; + GNULIB_MEMMEM=0; + GNULIB_MEMPCPY=0; + GNULIB_MEMRCHR=0; + GNULIB_RAWMEMCHR=0; + GNULIB_STPCPY=0; + GNULIB_STPNCPY=0; + GNULIB_STRCHRNUL=0; + GNULIB_STRDUP=0; + GNULIB_STRNCAT=0; + GNULIB_STRNDUP=0; + GNULIB_STRNLEN=0; + GNULIB_STRPBRK=0; + GNULIB_STRSEP=0; + GNULIB_STRSTR=0; + GNULIB_STRCASESTR=0; + GNULIB_STRTOK_R=0; + GNULIB_MBSLEN=0; + GNULIB_MBSNLEN=0; + GNULIB_MBSCHR=0; + GNULIB_MBSRCHR=0; + GNULIB_MBSSTR=0; + GNULIB_MBSCASECMP=0; + GNULIB_MBSNCASECMP=0; + GNULIB_MBSPCASECMP=0; + GNULIB_MBSCASESTR=0; + GNULIB_MBSCSPN=0; + GNULIB_MBSPBRK=0; + GNULIB_MBSSPN=0; + GNULIB_MBSSEP=0; + GNULIB_MBSTOK_R=0; + GNULIB_STRERROR=0; + GNULIB_STRERROR_R=0; + GNULIB_STRSIGNAL=0; + GNULIB_STRVERSCMP=0; + HAVE_MBSLEN=0; + HAVE_EXPLICIT_BZERO=1; + HAVE_FFSL=1; + HAVE_FFSLL=1; + HAVE_MEMCHR=1; + HAVE_DECL_MEMMEM=1; + HAVE_MEMPCPY=1; + HAVE_DECL_MEMRCHR=1; + HAVE_RAWMEMCHR=1; + HAVE_STPCPY=1; + HAVE_STPNCPY=1; + HAVE_STRCHRNUL=1; + HAVE_DECL_STRDUP=1; + HAVE_DECL_STRNDUP=1; + HAVE_DECL_STRNLEN=1; + HAVE_STRPBRK=1; + HAVE_STRSEP=1; + HAVE_STRCASESTR=1; + HAVE_DECL_STRTOK_R=1; + HAVE_DECL_STRERROR_R=1; + HAVE_DECL_STRSIGNAL=1; + HAVE_STRVERSCMP=1; + REPLACE_MEMCHR=0; + REPLACE_MEMMEM=0; + REPLACE_STPNCPY=0; + REPLACE_STRCHRNUL=0; + REPLACE_STRDUP=0; + REPLACE_STRNCAT=0; + REPLACE_STRNDUP=0; + REPLACE_STRNLEN=0; + REPLACE_STRSTR=0; + REPLACE_STRCASESTR=0; + REPLACE_STRTOK_R=0; + REPLACE_STRERROR=0; + REPLACE_STRERROR_R=0; + REPLACE_STRSIGNAL=0; + UNDEFINE_STRTOK_R=0; - 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='<'sys/types.h'>' - else - # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' - gl_next_as_first_directive=$gl_cv_next_sys_types_h - fi - NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H=$gl_next_as_first_directive @@ -14892,1413 +17722,1298 @@ + # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it + # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is + # irrelevant for anonymous mappings. + ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap" +if test "x$ac_cv_func_mmap" = xyes +then : + gl_have_mmap=yes +else + gl_have_mmap=no +fi + # Try to allow MAP_ANONYMOUS. + gl_have_mmap_anonymous=no + if test $gl_have_mmap = yes; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5 +printf %s "checking for MAP_ANONYMOUS... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#ifdef MAP_ANONYMOUS + I cannot identify this map +#endif - WINDOWS_STAT_INODES=0 +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "I cannot identify this map" >/dev/null 2>&1 +then : + gl_have_mmap_anonymous=yes +fi +rm -rf conftest* + if test $gl_have_mmap_anonymous != yes; then + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#ifdef MAP_ANON + I cannot identify this map +#endif +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "I cannot identify this map" >/dev/null 2>&1 +then : +printf "%s\n" "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h + gl_have_mmap_anonymous=yes +fi +rm -rf conftest* + fi + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5 +printf "%s\n" "$gl_have_mmap_anonymous" >&6; } + if test $gl_have_mmap_anonymous = yes; then +printf "%s\n" "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 -printf %s "checking for a sed that does not truncate output... " >&6; } -if test ${ac_cv_path_SED+y} -then : - printf %s "(cached) " >&6 -else - ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ - for ac_i in 1 2 3 4 5 6 7; do - ac_script="$ac_script$as_nl$ac_script" - done - echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed - { ac_script=; unset ac_script;} - if test -z "$SED"; then - ac_path_SED_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_prog in sed gsed - do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_SED="$as_dir$ac_prog$ac_exec_ext" - as_fn_executable_p "$ac_path_SED" || continue -# Check for GNU ac_path_SED and select it if it is found. - # Check for GNU $ac_path_SED -case `"$ac_path_SED" --version 2>&1` in -*GNU*) - ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; -*) - ac_count=0 - printf %s 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - printf "%s\n" '' >> "conftest.nl" - "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_SED_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_SED="$ac_path_SED" - ac_path_SED_max=$ac_count fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_SED_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_SED"; then - as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 fi -else - ac_cv_path_SED=$SED -fi -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 -printf "%s\n" "$ac_cv_path_SED" >&6; } - SED="$ac_cv_path_SED" - rm -f conftest.sed - GNULIB__EXIT=0; - GNULIB_ATOLL=0; - GNULIB_CALLOC_POSIX=0; - GNULIB_CANONICALIZE_FILE_NAME=0; - GNULIB_GETLOADAVG=0; - GNULIB_GETSUBOPT=0; - GNULIB_GRANTPT=0; - GNULIB_MALLOC_POSIX=0; - GNULIB_MBTOWC=0; - GNULIB_MKDTEMP=0; - GNULIB_MKOSTEMP=0; - GNULIB_MKOSTEMPS=0; - GNULIB_MKSTEMP=0; - GNULIB_MKSTEMPS=0; - GNULIB_POSIX_OPENPT=0; - GNULIB_PTSNAME=0; - GNULIB_PTSNAME_R=0; - GNULIB_PUTENV=0; - GNULIB_QSORT_R=0; - GNULIB_RANDOM=0; - GNULIB_RANDOM_R=0; - GNULIB_REALLOC_POSIX=0; - GNULIB_REALPATH=0; - GNULIB_RPMATCH=0; - GNULIB_SECURE_GETENV=0; - GNULIB_SETENV=0; - GNULIB_STRTOD=0; - GNULIB_STRTOLL=0; - GNULIB_STRTOULL=0; - GNULIB_SYSTEM_POSIX=0; - GNULIB_UNLOCKPT=0; - GNULIB_UNSETENV=0; - GNULIB_WCTOMB=0; - HAVE__EXIT=1; - HAVE_ATOLL=1; - HAVE_CANONICALIZE_FILE_NAME=1; - HAVE_DECL_GETLOADAVG=1; - HAVE_GETSUBOPT=1; - HAVE_GRANTPT=1; - HAVE_MKDTEMP=1; - HAVE_MKOSTEMP=1; - HAVE_MKOSTEMPS=1; - HAVE_MKSTEMP=1; - HAVE_MKSTEMPS=1; - 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; - HAVE_REALPATH=1; - HAVE_RPMATCH=1; - HAVE_SECURE_GETENV=1; - HAVE_SETENV=1; - HAVE_DECL_SETENV=1; - HAVE_STRTOD=1; - HAVE_STRTOLL=1; - HAVE_STRTOULL=1; - HAVE_STRUCT_RANDOM_DATA=1; - HAVE_SYS_LOADAVG_H=0; - HAVE_UNLOCKPT=1; - HAVE_DECL_UNSETENV=1; - REPLACE_CALLOC=0; - REPLACE_CANONICALIZE_FILE_NAME=0; - REPLACE_MALLOC=0; - REPLACE_MBTOWC=0; - REPLACE_MKSTEMP=0; - REPLACE_PTSNAME=0; - REPLACE_PTSNAME_R=0; - REPLACE_PUTENV=0; - REPLACE_QSORT_R=0; - REPLACE_RANDOM_R=0; - REPLACE_REALLOC=0; - REPLACE_REALPATH=0; - REPLACE_SETENV=0; - REPLACE_STRTOD=0; - REPLACE_UNSETENV=0; - REPLACE_WCTOMB=0; -# Autoupdate added the following line to ensure that your configure -# script's behavior did not change. It is probably safe to remove. - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether malloc, realloc, calloc are POSIX compliant" >&5 -printf %s "checking whether malloc, realloc, calloc are POSIX compliant... " >&6; } -if test ${gl_cv_func_malloc_posix+y} + if test $HAVE_MEMCHR = 1; then + # Detect platform-specific bugs in some versions of glibc: + # memchr should not dereference anything with length 0 + # https://bugzilla.redhat.com/show_bug.cgi?id=499689 + # memchr should not dereference overestimated length after a match + # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=521737 + # https://sourceware.org/bugzilla/show_bug.cgi?id=10162 + # Assume that memchr works on platforms that lack mprotect. + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether memchr works" >&5 +printf %s "checking whether memchr works... " >&6; } +if test ${gl_cv_func_memchr_works+y} then : printf %s "(cached) " >&6 else + if test "$cross_compiling" = yes +then : + case "$host_os" in + # Guess yes on native Windows. + mingw*) gl_cv_func_memchr_works="guessing yes" ;; + # Be pessimistic for now. + *) gl_cv_func_memchr_works="guessing no" ;; + esac - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ +#include +#if HAVE_SYS_MMAN_H +# include +# include +# include +# include +# ifndef MAP_FILE +# define MAP_FILE 0 +# endif +#endif + int main (void) { -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ - choke me - #endif + + int result = 0; + char *fence = NULL; +#if HAVE_SYS_MMAN_H && HAVE_MPROTECT +# if HAVE_MAP_ANONYMOUS + const int flags = MAP_ANONYMOUS | MAP_PRIVATE; + const int fd = -1; +# else /* !HAVE_MAP_ANONYMOUS */ + const int flags = MAP_FILE | MAP_PRIVATE; + int fd = open ("/dev/zero", O_RDONLY, 0666); + if (fd >= 0) +# endif + { + int pagesize = getpagesize (); + char *two_pages = + (char *) mmap (NULL, 2 * pagesize, PROT_READ | PROT_WRITE, + flags, fd, 0); + if (two_pages != (char *)(-1) + && mprotect (two_pages + pagesize, pagesize, PROT_NONE) == 0) + fence = two_pages + pagesize; + } +#endif + if (fence) + { + if (memchr (fence, 0, 0)) + result |= 1; + strcpy (fence - 9, "12345678"); + if (memchr (fence - 9, 0, 79) != fence - 1) + result |= 2; + if (memchr (fence - 1, 0, 3) != fence - 1) + result |= 4; + } + return result; ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" +if ac_fn_c_try_run "$LINENO" then : - gl_cv_func_malloc_posix=yes + gl_cv_func_memchr_works=yes else - gl_cv_func_malloc_posix=no + gl_cv_func_memchr_works=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_malloc_posix" >&5 -printf "%s\n" "$gl_cv_func_malloc_posix" >&6; } - - - ac_fn_c_check_header_compile "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default" -if test "x$ac_cv_header_stdlib_h" = xyes -then : - printf "%s\n" "#define HAVE_STDLIB_H 1" >>confdefs.h fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memchr_works" >&5 +printf "%s\n" "$gl_cv_func_memchr_works" >&6; } + case "$gl_cv_func_memchr_works" in + *yes) ;; + *) REPLACE_MEMCHR=1 ;; + esac + fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5 -printf %s "checking for GNU libc compatible malloc... " >&6; } -if test ${ac_cv_func_malloc_0_nonnull+y} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5 +printf %s "checking for C/C++ restrict keyword... " >&6; } +if test ${ac_cv_c_restrict+y} then : printf %s "(cached) " >&6 else - if test "$cross_compiling" = yes -then : - case "$host_os" in - # Guess yes on platforms where we know the result. - *-gnu* | freebsd* | netbsd* | openbsd* \ - | hpux* | solaris* | cygwin* | mingw*) - ac_cv_func_malloc_0_nonnull=yes ;; - # If we don't know, assume the worst. - *) ac_cv_func_malloc_0_nonnull=no ;; - esac - -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + ac_cv_c_restrict=no + # The order here caters to the fact that C++ does not require restrict. + for ac_kw in __restrict __restrict__ _Restrict restrict; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#if defined STDC_HEADERS || defined HAVE_STDLIB_H - # include - #else - char *malloc (); - #endif +typedef int *int_ptr; + int foo (int_ptr $ac_kw ip) { return ip[0]; } + int bar (int [$ac_kw]); /* Catch GCC bug 14050. */ + int bar (int ip[$ac_kw]) { return ip[0]; } int main (void) { -char *p = malloc (0); - int result = !p; - free (p); - return result; +int s[1]; + int *$ac_kw t = s; + t[0] = 0; + return foo (t) + bar (t); + ; return 0; } - _ACEOF -if ac_fn_c_try_run "$LINENO" +if ac_fn_c_try_compile "$LINENO" then : - ac_cv_func_malloc_0_nonnull=yes -else - ac_cv_func_malloc_0_nonnull=no + ac_cv_c_restrict=$ac_kw fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + test "$ac_cv_c_restrict" != no && break + done + fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5 +printf "%s\n" "$ac_cv_c_restrict" >&6; } + case $ac_cv_c_restrict in + restrict) ;; + no) printf "%s\n" "#define restrict /**/" >>confdefs.h + ;; + *) printf "%s\n" "#define restrict $ac_cv_c_restrict" >>confdefs.h + ;; + esac -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5 -printf "%s\n" "$ac_cv_func_malloc_0_nonnull" >&6; } - if test $ac_cv_func_malloc_0_nonnull = yes +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 : - gl_cv_func_malloc_0_nonnull=1 + ac_have_decl=1 else - gl_cv_func_malloc_0_nonnull=0 + ac_have_decl=0 fi - -printf "%s\n" "#define MALLOC_0_IS_NONNULL $gl_cv_func_malloc_0_nonnull" >>confdefs.h - - - - - - - - - - +printf "%s\n" "#define HAVE_DECL_MEMRCHR $ac_have_decl" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5 -printf %s "checking for a traditional japanese locale... " >&6; } -if test ${gt_cv_locale_ja+y} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether defines MIN and MAX" >&5 +printf %s "checking whether defines MIN and MAX... " >&6; } +if test ${gl_cv_minmax_in_limits_h+y} then : printf %s "(cached) " >&6 else - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - -#include -#include -#if HAVE_LANGINFO_CODESET -# include -#endif -#include -#include -struct tm t; -char buf[16]; -int main () +#include + int x = MIN (42, 17); +int +main (void) { - const char *p; - /* Check whether the given locale name is recognized by the system. */ -#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ - /* On native Windows, setlocale(category, "") looks at the system settings, - not at the environment variables. Also, when an encoding suffix such - as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE - category of the locale to "C". */ - if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL - || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0) - return 1; -#else - if (setlocale (LC_ALL, "") == NULL) return 1; -#endif - /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". - On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) - is empty, and the behaviour of Tcl 8.4 in this locale is not useful. - On OpenBSD 4.0, when an unsupported locale is specified, setlocale() - succeeds but then nl_langinfo(CODESET) is "646". In this situation, - some unit tests fail. - On MirBSD 10, when an unsupported locale is specified, setlocale() - succeeds but then nl_langinfo(CODESET) is "UTF-8". */ -#if HAVE_LANGINFO_CODESET - { - const char *cs = nl_langinfo (CODESET); - if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0 - || strcmp (cs, "UTF-8") == 0) - return 1; - } -#endif -#ifdef __CYGWIN__ - /* On Cygwin, avoid locale names without encoding suffix, because the - locale_charset() function relies on the encoding suffix. Note that - LC_ALL is set on the command line. */ - if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1; -#endif - /* Check whether MB_CUR_MAX is > 1. This excludes the dysfunctional locales - on Cygwin 1.5.x. */ - if (MB_CUR_MAX == 1) - return 1; - /* Check whether in a month name, no byte in the range 0x80..0x9F occurs. - This excludes the UTF-8 encoding (except on MirBSD). */ - t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4; - if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1; - for (p = buf; *p != '\0'; p++) - if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0) - return 1; + + ; return 0; } - _ACEOF - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 - (eval $ac_link) 2>&5 - ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s conftest$ac_exeext; then - case "$host_os" in - # Handle native Windows specially, because there setlocale() interprets - # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256", - # "fr" or "fra" as "French" or "French_France.1252", - # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252", - # "ja" as "Japanese" or "Japanese_Japan.932", - # and similar. - mingw*) - # Note that on native Windows, the Japanese locale is - # Japanese_Japan.932, and CP932 is very different from EUC-JP, so we - # cannot use it here. - gt_cv_locale_ja=none - ;; - *) - # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because - # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the - # configure script would override the LC_ALL setting. Likewise for - # LC_CTYPE, which is also set at the beginning of the configure script. - # Test for the AIX locale name. - if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then - gt_cv_locale_ja=ja_JP - else - # Test for the locale name with explicit encoding suffix. - if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then - gt_cv_locale_ja=ja_JP.EUC-JP - else - # Test for the HP-UX, OSF/1, NetBSD locale name. - if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then - gt_cv_locale_ja=ja_JP.eucJP - else - # Test for the IRIX, FreeBSD locale name. - if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then - gt_cv_locale_ja=ja_JP.EUC - else - # Test for the Solaris 7 locale name. - if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then - gt_cv_locale_ja=ja - else - # Special test for NetBSD 1.6. - if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then - gt_cv_locale_ja=ja_JP.eucJP - else - # None found. - gt_cv_locale_ja=none - fi - fi - fi - fi - fi - fi - ;; - esac - fi - rm -fr conftest* +if ac_fn_c_try_compile "$LINENO" +then : + gl_cv_minmax_in_limits_h=yes +else + gl_cv_minmax_in_limits_h=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_minmax_in_limits_h" >&5 +printf "%s\n" "$gl_cv_minmax_in_limits_h" >&6; } + if test $gl_cv_minmax_in_limits_h = yes; then -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5 -printf "%s\n" "$gt_cv_locale_ja" >&6; } - LOCALE_JA=$gt_cv_locale_ja +printf "%s\n" "#define HAVE_MINMAX_IN_LIMITS_H 1" >>confdefs.h + fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5 -printf %s "checking for a transitional chinese locale... " >&6; } -if test ${gt_cv_locale_zh_CN+y} + + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether defines MIN and MAX" >&5 +printf %s "checking whether defines MIN and MAX... " >&6; } +if test ${gl_cv_minmax_in_sys_param_h+y} then : printf %s "(cached) " >&6 else - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - -#include -#include -#include -#if HAVE_LANGINFO_CODESET -# include -#endif -#include -#include -struct tm t; -char buf[16]; -int main () +#include + int x = MIN (42, 17); +int +main (void) { - const char *p; - /* Check whether the given locale name is recognized by the system. */ -#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ - /* On native Windows, setlocale(category, "") looks at the system settings, - not at the environment variables. Also, when an encoding suffix such - as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE - category of the locale to "C". */ - if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL - || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0) - return 1; -#else - if (setlocale (LC_ALL, "") == NULL) return 1; -#endif - /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". - On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) - is empty, and the behaviour of Tcl 8.4 in this locale is not useful. - On OpenBSD 4.0, when an unsupported locale is specified, setlocale() - succeeds but then nl_langinfo(CODESET) is "646". In this situation, - some unit tests fail. - On MirBSD 10, when an unsupported locale is specified, setlocale() - succeeds but then nl_langinfo(CODESET) is "UTF-8". */ -#if HAVE_LANGINFO_CODESET - { - const char *cs = nl_langinfo (CODESET); - if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0 - || strcmp (cs, "UTF-8") == 0) - return 1; - } -#endif -#ifdef __CYGWIN__ - /* On Cygwin, avoid locale names without encoding suffix, because the - locale_charset() function relies on the encoding suffix. Note that - LC_ALL is set on the command line. */ - if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1; -#endif - /* Check whether in a month name, no byte in the range 0x80..0x9F occurs. - This excludes the UTF-8 encoding (except on MirBSD). */ - t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4; - if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1; - for (p = buf; *p != '\0'; p++) - if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0) - return 1; - /* Check whether a typical GB18030 multibyte sequence is recognized as a - single wide character. This excludes the GB2312 and GBK encodings. */ - if (mblen ("\203\062\332\066", 5) != 4) - return 1; + + ; return 0; } - _ACEOF - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 - (eval $ac_link) 2>&5 - ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s conftest$ac_exeext; then - case "$host_os" in - # Handle native Windows specially, because there setlocale() interprets - # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256", - # "fr" or "fra" as "French" or "French_France.1252", - # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252", - # "ja" as "Japanese" or "Japanese_Japan.932", - # and similar. - mingw*) - # Test for the hypothetical native Windows locale name. - if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then - gt_cv_locale_zh_CN=Chinese_China.54936 - else - # None found. - gt_cv_locale_zh_CN=none - fi - ;; - solaris2.8) - # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are - # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK. - # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core. - gt_cv_locale_zh_CN=none - ;; - *) - # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because - # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the - # configure script would override the LC_ALL setting. Likewise for - # LC_CTYPE, which is also set at the beginning of the configure script. - # Test for the locale name without encoding suffix. - if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then - gt_cv_locale_zh_CN=zh_CN - else - # Test for the locale name with explicit encoding suffix. - if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then - gt_cv_locale_zh_CN=zh_CN.GB18030 - else - # None found. - gt_cv_locale_zh_CN=none - fi - fi - ;; - esac - else - # If there was a link error, due to mblen(), the system is so old that - # it certainly doesn't have a chinese locale. - gt_cv_locale_zh_CN=none - fi - rm -fr conftest* +if ac_fn_c_try_compile "$LINENO" +then : + gl_cv_minmax_in_sys_param_h=yes +else + gl_cv_minmax_in_sys_param_h=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_minmax_in_sys_param_h" >&5 +printf "%s\n" "$gl_cv_minmax_in_sys_param_h" >&6; } + if test $gl_cv_minmax_in_sys_param_h = yes; then + +printf "%s\n" "#define HAVE_MINMAX_IN_SYS_PARAM_H 1" >>confdefs.h + + fi + + + + + + + + + GNULIB_PTHREAD_SIGMASK=0; + GNULIB_RAISE=0; + GNULIB_SIGNAL_H_SIGPIPE=0; + GNULIB_SIGPROCMASK=0; + GNULIB_SIGACTION=0; + HAVE_POSIX_SIGNALBLOCKING=1; + HAVE_PTHREAD_SIGMASK=1; + HAVE_RAISE=1; + HAVE_SIGSET_T=1; + HAVE_SIGINFO_T=1; + HAVE_SIGACTION=1; + HAVE_STRUCT_SIGACTION_SA_SIGACTION=1; + + HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=1; + + HAVE_SIGHANDLER_T=1; + REPLACE_PTHREAD_SIGMASK=0; + REPLACE_RAISE=0; + + + ac_fn_c_check_type "$LINENO" "sigset_t" "ac_cv_type_sigset_t" " + #include + /* Mingw defines sigset_t not in , but in . */ + #include + +" +if test "x$ac_cv_type_sigset_t" = xyes +then : + +printf "%s\n" "#define HAVE_SIGSET_T 1" >>confdefs.h + +gl_cv_type_sigset_t=yes +else + gl_cv_type_sigset_t=no +fi + + if test $gl_cv_type_sigset_t != yes; then + HAVE_SIGSET_T=0 + fi + +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 + ac_have_decl=0 fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5 -printf "%s\n" "$gt_cv_locale_zh_CN" >&6; } - LOCALE_ZH_CN=$gt_cv_locale_zh_CN +printf "%s\n" "#define HAVE_DECL_ALARM $ac_have_decl" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5 -printf %s "checking for a french Unicode locale... " >&6; } -if test ${gt_cv_locale_fr_utf8+y} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C Library >= 2.1 or uClibc" >&5 +printf %s "checking whether we are using the GNU C Library >= 2.1 or uClibc... " >&6; } +if test ${ac_cv_gnu_library_2_1+y} then : printf %s "(cached) " >&6 else - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include -#include -#if HAVE_LANGINFO_CODESET -# include -#endif -#include -#include -struct tm t; -char buf[16]; -int main () { - /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl - imitates locale dependent behaviour by looking at the environment - variables, and all locales use the UTF-8 encoding. */ -#if !(defined __BEOS__ || defined __HAIKU__) - /* Check whether the given locale name is recognized by the system. */ -# if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ - /* On native Windows, setlocale(category, "") looks at the system settings, - not at the environment variables. Also, when an encoding suffix such - as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE - category of the locale to "C". */ - if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL - || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0) - return 1; -# else - if (setlocale (LC_ALL, "") == NULL) return 1; -# endif - /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". - On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) - is empty, and the behaviour of Tcl 8.4 in this locale is not useful. - On OpenBSD 4.0, when an unsupported locale is specified, setlocale() - succeeds but then nl_langinfo(CODESET) is "646". In this situation, - some unit tests fail. */ -# if HAVE_LANGINFO_CODESET - { - const char *cs = nl_langinfo (CODESET); - if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0) - return 1; - } -# endif -# ifdef __CYGWIN__ - /* On Cygwin, avoid locale names without encoding suffix, because the - locale_charset() function relies on the encoding suffix. Note that - LC_ALL is set on the command line. */ - if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1; -# endif - /* Check whether in the abbreviation of the second month, the second - character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is - two bytes long, with UTF-8 encoding. */ - t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4; - if (strftime (buf, sizeof (buf), "%b", &t) < 4 - || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v') - return 1; +#include +#ifdef __GNU_LIBRARY__ + #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2) + Lucky GNU user + #endif #endif -#if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */ - /* Check whether the decimal separator is a comma. - On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point - are nl_langinfo(RADIXCHAR) are both ".". */ - if (localeconv () ->decimal_point[0] != ',') return 1; +#ifdef __UCLIBC__ + Lucky user #endif + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "Lucky" >/dev/null 2>&1 +then : + ac_cv_gnu_library_2_1=yes +else + ac_cv_gnu_library_2_1=no +fi +rm -rf conftest* + + + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_gnu_library_2_1" >&5 +printf "%s\n" "$ac_cv_gnu_library_2_1" >&6; } + + GLIBC21="$ac_cv_gnu_library_2_1" + + + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ssize_t" >&5 +printf %s "checking for ssize_t... " >&6; } +if test ${gt_cv_ssize_t+y} +then : + printf %s "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main (void) +{ +int x = sizeof (ssize_t *) + sizeof (ssize_t); + return !x; + ; return 0; } +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + gt_cv_ssize_t=yes +else + gt_cv_ssize_t=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_ssize_t" >&5 +printf "%s\n" "$gt_cv_ssize_t" >&6; } + if test $gt_cv_ssize_t = no; then + +printf "%s\n" "#define ssize_t int" >>confdefs.h + + fi + + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5 +printf %s "checking for uid_t in sys/types.h... " >&6; } +if test ${ac_cv_type_uid_t+y} +then : + printf %s "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include _ACEOF - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 - (eval $ac_link) 2>&5 - ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s conftest$ac_exeext; then - case "$host_os" in - # Handle native Windows specially, because there setlocale() interprets - # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256", - # "fr" or "fra" as "French" or "French_France.1252", - # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252", - # "ja" as "Japanese" or "Japanese_Japan.932", - # and similar. - mingw*) - # Test for the hypothetical native Windows locale name. - if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then - gt_cv_locale_fr_utf8=French_France.65001 - else - # None found. - gt_cv_locale_fr_utf8=none - fi - ;; - *) - # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because - # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the - # configure script would override the LC_ALL setting. Likewise for - # LC_CTYPE, which is also set at the beginning of the configure script. - # Test for the usual locale name. - if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then - gt_cv_locale_fr_utf8=fr_FR - else - # Test for the locale name with explicit encoding suffix. - if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then - gt_cv_locale_fr_utf8=fr_FR.UTF-8 - else - # Test for the Solaris 7 locale name. - if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then - gt_cv_locale_fr_utf8=fr.UTF-8 - else - # None found. - gt_cv_locale_fr_utf8=none - fi - fi - fi - ;; - esac - fi - rm -fr conftest* +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "uid_t" >/dev/null 2>&1 +then : + ac_cv_type_uid_t=yes +else + ac_cv_type_uid_t=no +fi +rm -rf conftest* fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5 -printf "%s\n" "$gt_cv_locale_fr_utf8" >&6; } - LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5 +printf "%s\n" "$ac_cv_type_uid_t" >&6; } +if test $ac_cv_type_uid_t = no; then + +printf "%s\n" "#define uid_t int" >>confdefs.h +printf "%s\n" "#define gid_t int" >>confdefs.h +fi +: +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5 +printf %s "checking for stdbool.h that conforms to C99... " >&6; } +if test ${ac_cv_header_stdbool_h+y} +then : + printf %s "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + #include + #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; 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 g[true]; + 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]; + char o[sizeof n == m * sizeof n[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 + https://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html + https://lists.gnu.org/r/bug-coreutils/2005-11/msg00161.html + */ + Bool q = true; + Bool *pq = &q; + bool *qq = &q; +int +main (void) +{ + bool e = &s; + *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 + !qq); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + ac_cv_header_stdbool_h=yes +else + ac_cv_header_stdbool_h=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5 +printf "%s\n" "$ac_cv_header_stdbool_h" >&6; } + ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default" +if test "x$ac_cv_type__Bool" = xyes +then : +printf "%s\n" "#define HAVE__BOOL 1" >>confdefs.h - : +fi + GNULIB_DPRINTF=0; + GNULIB_FCLOSE=0; + GNULIB_FDOPEN=0; + GNULIB_FFLUSH=0; + GNULIB_FGETC=0; + GNULIB_FGETS=0; + GNULIB_FOPEN=0; + GNULIB_FPRINTF=0; + GNULIB_FPRINTF_POSIX=0; + GNULIB_FPURGE=0; + GNULIB_FPUTC=0; + GNULIB_FPUTS=0; + GNULIB_FREAD=0; + GNULIB_FREOPEN=0; + GNULIB_FSCANF=0; + GNULIB_FSEEK=0; + GNULIB_FSEEKO=0; + GNULIB_FTELL=0; + GNULIB_FTELLO=0; + GNULIB_FWRITE=0; + GNULIB_GETC=0; + GNULIB_GETCHAR=0; + GNULIB_GETDELIM=0; + GNULIB_GETLINE=0; + GNULIB_OBSTACK_PRINTF=0; + GNULIB_OBSTACK_PRINTF_POSIX=0; + GNULIB_PCLOSE=0; + GNULIB_PERROR=0; + GNULIB_POPEN=0; + GNULIB_PRINTF=0; + GNULIB_PRINTF_POSIX=0; + GNULIB_PUTC=0; + GNULIB_PUTCHAR=0; + GNULIB_PUTS=0; + GNULIB_REMOVE=0; + GNULIB_RENAME=0; + GNULIB_RENAMEAT=0; + GNULIB_SCANF=0; + GNULIB_SNPRINTF=0; + GNULIB_SPRINTF_POSIX=0; + GNULIB_STDIO_H_NONBLOCKING=0; + GNULIB_STDIO_H_SIGPIPE=0; + GNULIB_TMPFILE=0; + GNULIB_VASPRINTF=0; + GNULIB_VFSCANF=0; + GNULIB_VSCANF=0; + GNULIB_VDPRINTF=0; + GNULIB_VFPRINTF=0; + GNULIB_VFPRINTF_POSIX=0; + GNULIB_VPRINTF=0; + GNULIB_VPRINTF_POSIX=0; + GNULIB_VSNPRINTF=0; + GNULIB_VSPRINTF_POSIX=0; + HAVE_DECL_FPURGE=1; + HAVE_DECL_FSEEKO=1; + HAVE_DECL_FTELLO=1; + HAVE_DECL_GETDELIM=1; + HAVE_DECL_GETLINE=1; + HAVE_DECL_OBSTACK_PRINTF=1; + HAVE_DECL_SNPRINTF=1; + HAVE_DECL_VSNPRINTF=1; + HAVE_DPRINTF=1; + HAVE_FSEEKO=1; + HAVE_FTELLO=1; + HAVE_PCLOSE=1; + HAVE_POPEN=1; + HAVE_RENAMEAT=1; + HAVE_VASPRINTF=1; + HAVE_VDPRINTF=1; + REPLACE_DPRINTF=0; + REPLACE_FCLOSE=0; + REPLACE_FDOPEN=0; + REPLACE_FFLUSH=0; + REPLACE_FOPEN=0; + REPLACE_FPRINTF=0; + REPLACE_FPURGE=0; + REPLACE_FREOPEN=0; + REPLACE_FSEEK=0; + REPLACE_FSEEKO=0; + REPLACE_FTELL=0; + REPLACE_FTELLO=0; + REPLACE_GETDELIM=0; + REPLACE_GETLINE=0; + REPLACE_OBSTACK_PRINTF=0; + REPLACE_PERROR=0; + REPLACE_POPEN=0; + REPLACE_PRINTF=0; + REPLACE_REMOVE=0; + REPLACE_RENAME=0; + REPLACE_RENAMEAT=0; + REPLACE_SNPRINTF=0; + REPLACE_SPRINTF=0; + REPLACE_STDIO_READ_FUNCS=0; + REPLACE_STDIO_WRITE_FUNCS=0; + REPLACE_TMPFILE=0; + REPLACE_VASPRINTF=0; + REPLACE_VDPRINTF=0; + REPLACE_VFPRINTF=0; + REPLACE_VPRINTF=0; + REPLACE_VSNPRINTF=0; + REPLACE_VSPRINTF=0; - if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then +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 + ac_have_decl=0 +fi +printf "%s\n" "#define HAVE_DECL_STRDUP $ac_have_decl" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5 -printf %s "checking whether mbrtowc handles incomplete characters... " >&6; } -if test ${gl_cv_func_mbrtowc_incomplete_state+y} + REPLACE_STRERROR_0=0 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether strerror(0) succeeds" >&5 +printf %s "checking whether strerror(0) succeeds... " >&6; } +if test ${gl_cv_func_strerror_0_works+y} then : printf %s "(cached) " >&6 else - - case "$host_os" in - # Guess no on AIX and OSF/1. - aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;; - # Guess yes otherwise. - *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;; - esac - if test $LOCALE_JA != none; then - if test "$cross_compiling" = yes + if test "$cross_compiling" = yes then : - : + case "$host_os" in + # Guess yes on glibc systems. + *-gnu* | gnu*) gl_cv_func_strerror_0_works="guessing yes" ;; + # Guess yes on native Windows. + mingw*) gl_cv_func_strerror_0_works="guessing yes" ;; + # If we don't know, assume the worst. + *) gl_cv_func_strerror_0_works="guessing no" ;; + esac + else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - -#include #include -/* 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 -int main () -{ - if (setlocale (LC_ALL, "$LOCALE_JA") != NULL) - { - const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */ - mbstate_t state; - wchar_t wc; + #include - memset (&state, '\0', sizeof (mbstate_t)); - if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2)) - if (mbsinit (&state)) - return 2; - } +int +main (void) +{ +int result = 0; + char *str; + errno = 0; + str = strerror (0); + if (!*str) result |= 1; + if (errno) result |= 2; + if (strstr (str, "nknown") || strstr (str, "ndefined")) + result |= 4; + return result; + ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO" then : - gl_cv_func_mbrtowc_incomplete_state=yes + gl_cv_func_strerror_0_works=yes else - gl_cv_func_mbrtowc_incomplete_state=no + gl_cv_func_strerror_0_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 fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5 -printf "%s\n" "$gl_cv_func_mbrtowc_incomplete_state" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_0_works" >&5 +printf "%s\n" "$gl_cv_func_strerror_0_works" >&6; } + case "$gl_cv_func_strerror_0_works" in + *yes) ;; + *) + REPLACE_STRERROR_0=1 +printf "%s\n" "#define REPLACE_STRERROR_0 1" >>confdefs.h + ;; + esac - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5 -printf %s "checking whether mbrtowc works as well as mbtowc... " >&6; } -if test ${gl_cv_func_mbrtowc_sanitycheck+y} -then : - printf %s "(cached) " >&6 -else - case "$host_os" in - # Guess no on Solaris 8. - solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;; - # Guess yes otherwise. - *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;; - esac - if test $LOCALE_ZH_CN != none; then - if test "$cross_compiling" = yes + + + + + if test $ac_cv_func_strerror_r = yes; then + if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for strerror_r with POSIX signature" >&5 +printf %s "checking for strerror_r with POSIX signature... " >&6; } +if test ${gl_cv_func_strerror_r_posix_signature+y} then : - : + printf %s "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - -#include -#include #include -/* 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 -int main () + int strerror_r (int, char *, size_t); + +int +main (void) { - /* This fails on Solaris 8: - mbrtowc returns 2, and sets wc to 0x00F0. - mbtowc returns 4 (correct) and sets wc to 0x5EDC. */ - if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL) - { - char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */ - mbstate_t state; - wchar_t wc; - memset (&state, '\0', sizeof (mbstate_t)); - if (mbrtowc (&wc, input + 3, 6, &state) != 4 - && mbtowc (&wc, input + 3, 6) == 4) - return 2; - } + ; return 0; } _ACEOF -if ac_fn_c_try_run "$LINENO" +if ac_fn_c_try_compile "$LINENO" then : - gl_cv_func_mbrtowc_sanitycheck=yes + gl_cv_func_strerror_r_posix_signature=yes else - gl_cv_func_mbrtowc_sanitycheck=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 - + gl_cv_func_strerror_r_posix_signature=no fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5 -printf "%s\n" "$gl_cv_func_mbrtowc_sanitycheck" >&6; } - - REPLACE_MBSTATE_T=0 - case "$gl_cv_func_mbrtowc_incomplete_state" in - *yes) ;; - *) REPLACE_MBSTATE_T=1 ;; - esac - case "$gl_cv_func_mbrtowc_sanitycheck" in - *yes) ;; - *) REPLACE_MBSTATE_T=1 ;; - esac - else - REPLACE_MBSTATE_T=1 - fi - - - - : - - - - - - if test $ac_cv_func_mbrtowc = no; then - HAVE_MBRTOWC=0 - ac_fn_c_check_decl "$LINENO" "mbrtowc" "ac_cv_have_decl_mbrtowc" " -/* 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 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -" -if test "x$ac_cv_have_decl_mbrtowc" = xyes -then : - ac_have_decl=1 -else - ac_have_decl=0 fi - -printf "%s\n" "#define HAVE_DECL_MBRTOWC $ac_have_decl" >>confdefs.h - - if test $ac_cv_have_decl_mbrtowc = yes; then - REPLACE_MBRTOWC=1 - fi - else - if test $REPLACE_MBSTATE_T = 1; then - REPLACE_MBRTOWC=1 - else - - - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL pwc argument" >&5 -printf %s "checking whether mbrtowc handles a NULL pwc argument... " >&6; } -if test ${gl_cv_func_mbrtowc_null_arg1+y} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_r_posix_signature" >&5 +printf "%s\n" "$gl_cv_func_strerror_r_posix_signature" >&6; } + if test $gl_cv_func_strerror_r_posix_signature = yes; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether strerror_r works" >&5 +printf %s "checking whether strerror_r works... " >&6; } +if test ${gl_cv_func_strerror_r_works+y} then : printf %s "(cached) " >&6 else - - case "$host_os" in - # Guess no on Solaris. - solaris*) gl_cv_func_mbrtowc_null_arg1="guessing no" ;; - # Guess yes otherwise. - *) gl_cv_func_mbrtowc_null_arg1="guessing yes" ;; - esac - if test $LOCALE_FR_UTF8 != none; then - if test "$cross_compiling" = yes + if test "$cross_compiling" = yes then : - : + + case "$host_os" in + # Guess no on AIX. + aix*) gl_cv_func_strerror_r_works="guessing no";; + # Guess no on HP-UX. + hpux*) gl_cv_func_strerror_r_works="guessing no";; + # Guess no on BSD variants. + *bsd*) gl_cv_func_strerror_r_works="guessing no";; + # Guess yes otherwise. + *) gl_cv_func_strerror_r_works="guessing yes";; + esac + else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ +#include + #include -#include -#include -#include -/* 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 -int main () +int +main (void) { - int result = 0; - - if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL) - { - char input[] = "\303\237er"; - mbstate_t state; - wchar_t wc; - size_t ret; - - memset (&state, '\0', sizeof (mbstate_t)); - wc = (wchar_t) 0xBADFACE; - ret = mbrtowc (&wc, input, 5, &state); - if (ret != 2) - result |= 1; - if (!mbsinit (&state)) - result |= 2; +int result = 0; + char buf[79]; + if (strerror_r (EACCES, buf, 0) < 0) + result |= 1; + errno = 0; + if (strerror_r (EACCES, buf, sizeof buf) != 0) + result |= 2; + strcpy (buf, "Unknown"); + if (strerror_r (0, buf, sizeof buf) != 0) + result |= 4; + if (errno) + result |= 8; + if (strstr (buf, "nknown") || strstr (buf, "ndefined")) + result |= 0x10; + errno = 0; + *buf = 0; + if (strerror_r (-3, buf, sizeof buf) < 0) + result |= 0x20; + if (errno) + result |= 0x40; + if (!*buf) + result |= 0x80; + return result; - memset (&state, '\0', sizeof (mbstate_t)); - ret = mbrtowc (NULL, input, 5, &state); - if (ret != 2) /* Solaris 7 fails here: ret is -1. */ - result |= 4; - if (!mbsinit (&state)) - result |= 8; - } - return result; + ; + return 0; } _ACEOF if ac_fn_c_try_run "$LINENO" then : - gl_cv_func_mbrtowc_null_arg1=yes + gl_cv_func_strerror_r_works=yes else - gl_cv_func_mbrtowc_null_arg1=no + gl_cv_func_strerror_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 fi - fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg1" >&5 -printf "%s\n" "$gl_cv_func_mbrtowc_null_arg1" >&6; } - - - +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_r_works" >&5 +printf "%s\n" "$gl_cv_func_strerror_r_works" >&6; } + else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL string argument" >&5 -printf %s "checking whether mbrtowc handles a NULL string argument... " >&6; } -if test ${gl_cv_func_mbrtowc_null_arg2+y} + if test $ac_cv_func___xpg_strerror_r = yes; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether __xpg_strerror_r works" >&5 +printf %s "checking whether __xpg_strerror_r works... " >&6; } +if test ${gl_cv_func_strerror_r_works+y} then : printf %s "(cached) " >&6 else - - case "$host_os" in - # Guess no on OSF/1. - osf*) gl_cv_func_mbrtowc_null_arg2="guessing no" ;; - # Guess yes otherwise. - *) gl_cv_func_mbrtowc_null_arg2="guessing yes" ;; - esac - if test $LOCALE_FR_UTF8 != none; then - if test "$cross_compiling" = yes + if test "$cross_compiling" = yes then : - : + gl_cv_func_strerror_r_works="guessing no" + else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ +#include + #include + extern + #ifdef __cplusplus + "C" + #endif + int __xpg_strerror_r(int, char *, size_t); -#include -#include -/* 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 -int main () +int +main (void) { - if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL) - { - mbstate_t state; - wchar_t wc; - int ret; +int result = 0; + char buf[256] = "^"; + char copy[256]; + char *str = strerror (-1); + strcpy (copy, str); + if (__xpg_strerror_r (-2, buf, 1) == 0) + result |= 1; + if (*buf) + result |= 2; + __xpg_strerror_r (-2, buf, 256); + if (strcmp (str, copy)) + result |= 4; + return result; - memset (&state, '\0', sizeof (mbstate_t)); - wc = (wchar_t) 0xBADFACE; - mbrtowc (&wc, NULL, 5, &state); - /* Check that wc was not modified. */ - if (wc != (wchar_t) 0xBADFACE) - return 2; - } + ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO" then : - gl_cv_func_mbrtowc_null_arg2=yes + gl_cv_func_strerror_r_works=yes else - gl_cv_func_mbrtowc_null_arg2=no + gl_cv_func_strerror_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 fi - fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg2" >&5 -printf "%s\n" "$gl_cv_func_mbrtowc_null_arg2" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_r_works" >&5 +printf "%s\n" "$gl_cv_func_strerror_r_works" >&6; } + fi + fi + fi + fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc has a correct return value" >&5 -printf %s "checking whether mbrtowc has a correct return value... " >&6; } -if test ${gl_cv_func_mbrtowc_retval+y} + + + + + + + if test $gl_cv_have_include_next = yes; then + gl_cv_next_string_h='<'string.h'>' + else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 +printf %s "checking absolute name of ... " >&6; } +if test ${gl_cv_next_string_h+y} then : printf %s "(cached) " >&6 else - case "$host_os" in - # Guess no on HP-UX, Solaris, native Windows. - hpux* | solaris* | mingw*) gl_cv_func_mbrtowc_retval="guessing no" ;; - # Guess yes otherwise. - *) gl_cv_func_mbrtowc_retval="guessing yes" ;; - esac - if test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none \ - || { case "$host_os" in mingw*) true;; *) false;; esac; }; then - if test "$cross_compiling" = yes -then : - : -else + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - -#include #include -/* 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 -int main () -{ - int result = 0; - int found_some_locale = 0; - /* This fails on Solaris. */ - if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL) - { - char input[] = "B\303\274\303\237er"; /* "Büßer" */ - mbstate_t state; - wchar_t wc; +_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 'string.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_string_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | + sed -n "$gl_absolute_header_sed"` + + gl_header=$gl_cv_absolute_string_h + gl_cv_next_string_h='"'$gl_header'"' + + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_string_h" >&5 +printf "%s\n" "$gl_cv_next_string_h" >&6; } + fi + NEXT_STRING_H=$gl_cv_next_string_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='<'string.h'>' + else + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' + gl_next_as_first_directive=$gl_cv_next_string_h + fi + NEXT_AS_FIRST_DIRECTIVE_STRING_H=$gl_next_as_first_directive + + + + - memset (&state, '\0', sizeof (mbstate_t)); - if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2)) - { - input[1] = '\0'; - if (mbrtowc (&wc, input + 2, 5, &state) != 1) - result |= 1; - } - found_some_locale = 1; - } - /* This fails on HP-UX 11.11. */ - if (setlocale (LC_ALL, "$LOCALE_JA") != NULL) - { - char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */ - mbstate_t state; - wchar_t wc; - memset (&state, '\0', sizeof (mbstate_t)); - if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2)) - { - input[1] = '\0'; - if (mbrtowc (&wc, input + 2, 5, &state) != 2) - result |= 2; - } - found_some_locale = 1; - } - /* This fails on native Windows. */ - if (setlocale (LC_ALL, "Japanese_Japan.932") != NULL) - { - char input[] = "<\223\372\226\173\214\352>"; /* "<日本語>" */ - mbstate_t state; - wchar_t wc; - memset (&state, '\0', sizeof (mbstate_t)); - if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2)) - { - input[3] = '\0'; - if (mbrtowc (&wc, input + 4, 4, &state) != 1) - result |= 4; - } - found_some_locale = 1; - } - if (setlocale (LC_ALL, "Chinese_Taiwan.950") != NULL) - { - char input[] = "<\244\351\245\273\273\171>"; /* "<日本語>" */ - mbstate_t state; - wchar_t wc; - memset (&state, '\0', sizeof (mbstate_t)); - if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2)) - { - input[3] = '\0'; - if (mbrtowc (&wc, input + 4, 4, &state) != 1) - result |= 8; - } - found_some_locale = 1; - } - if (setlocale (LC_ALL, "Chinese_China.936") != NULL) - { - char input[] = "<\310\325\261\276\325\132>"; /* "<日本語>" */ - mbstate_t state; - wchar_t wc; - memset (&state, '\0', sizeof (mbstate_t)); - if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2)) - { - input[3] = '\0'; - if (mbrtowc (&wc, input + 4, 4, &state) != 1) - result |= 16; - } - found_some_locale = 1; - } - return (found_some_locale ? result : 77); -} -_ACEOF -if ac_fn_c_try_run "$LINENO" +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 : - gl_cv_func_mbrtowc_retval=yes + ac_have_decl=1 else - if test $? != 77; then - gl_cv_func_mbrtowc_retval=no - fi - -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext + ac_have_decl=0 fi - fi - -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_retval" >&5 -printf "%s\n" "$gl_cv_func_mbrtowc_retval" >&6; } +printf "%s\n" "#define HAVE_DECL_STRNLEN $ac_have_decl" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc returns 0 when parsing a NUL character" >&5 -printf %s "checking whether mbrtowc returns 0 when parsing a NUL character... " >&6; } -if test ${gl_cv_func_mbrtowc_nul_retval+y} + if test $HAVE_MEMCHR = 0 || test $REPLACE_MEMCHR = 1; then + REPLACE_STRSTR=1 + else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether strstr works" >&5 +printf %s "checking whether strstr works... " >&6; } +if test ${gl_cv_func_strstr_works_always+y} then : printf %s "(cached) " >&6 else + if test "$cross_compiling" = yes +then : + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ - case "$host_os" in - # Guess no on Solaris 8 and 9. - solaris2.[89]) gl_cv_func_mbrtowc_nul_retval="guessing no" ;; - # Guess yes otherwise. - *) gl_cv_func_mbrtowc_nul_retval="guessing yes" ;; - esac - if test $LOCALE_ZH_CN != none; then - if test "$cross_compiling" = yes +#ifdef __GNU_LIBRARY__ + #include + #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \ + || defined __UCLIBC__ + Lucky user + #endif +#elif defined __CYGWIN__ + #include + #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7) + Lucky user + #endif +#else + Lucky user +#endif + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "Lucky user" >/dev/null 2>&1 then : - : + gl_cv_func_strstr_works_always="guessing yes" +else + gl_cv_func_strstr_works_always="guessing no" +fi +rm -rf conftest* + + else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include -#include -/* 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 -int main () +#include /* for strstr */ +#ifdef __GNU_LIBRARY__ + #include + #if __GLIBC__ == 2 && __GLIBC_MINOR__ == 28 + Unlucky user + #endif +#endif +#define P "_EF_BF_BD" +#define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P +#define NEEDLE P P P P P + +int +main (void) { - /* This fails on Solaris 8 and 9. */ - if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL) - { - mbstate_t state; - wchar_t wc; +return !!strstr (HAYSTACK, NEEDLE); - memset (&state, '\0', sizeof (mbstate_t)); - if (mbrtowc (&wc, "", 1, &state) != 0) - return 2; - } + ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO" then : - gl_cv_func_mbrtowc_nul_retval=yes + gl_cv_func_strstr_works_always=yes else - gl_cv_func_mbrtowc_nul_retval=no + gl_cv_func_strstr_works_always=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 fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_nul_retval" >&5 -printf "%s\n" "$gl_cv_func_mbrtowc_nul_retval" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strstr_works_always" >&5 +printf "%s\n" "$gl_cv_func_strstr_works_always" >&6; } + case "$gl_cv_func_strstr_works_always" in + *yes) ;; + *) + REPLACE_STRSTR=1 + ;; + esac + fi + + +ac_fn_c_check_decl "$LINENO" "strtoimax" "ac_cv_have_decl_strtoimax" "$ac_includes_default" +if test "x$ac_cv_have_decl_strtoimax" = xyes +then : + ac_have_decl=1 +else + ac_have_decl=0 +fi +printf "%s\n" "#define HAVE_DECL_STRTOIMAX $ac_have_decl" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works on empty input" >&5 -printf %s "checking whether mbrtowc works on empty input... " >&6; } -if test ${gl_cv_func_mbrtowc_empty_input+y} +ac_fn_c_check_decl "$LINENO" "strtoumax" "ac_cv_have_decl_strtoumax" "$ac_includes_default" +if test "x$ac_cv_have_decl_strtoumax" = xyes then : - printf %s "(cached) " >&6 + ac_have_decl=1 else + ac_have_decl=0 +fi - case "$host_os" in - # Guess no on AIX and glibc systems. - aix* | *-gnu*) - gl_cv_func_mbrtowc_empty_input="guessing no" ;; - *) gl_cv_func_mbrtowc_empty_input="guessing yes" ;; - esac - if test "$cross_compiling" = yes +printf "%s\n" "#define HAVE_DECL_STRTOUMAX $ac_have_decl" >>confdefs.h + + + 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; + + + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct timespec in " >&5 +printf %s "checking for struct timespec in ... " >&6; } +if test ${gl_cv_sys_struct_timespec_in_time_h+y} then : - : + printf %s "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ +#include - #include - static wchar_t wc; - static mbstate_t mbs; - int - main (void) - { - return mbrtowc (&wc, "", 0, &mbs) != (size_t) -2; - } +int +main (void) +{ +static struct timespec x; x.tv_sec = x.tv_nsec; + ; + return 0; +} _ACEOF -if ac_fn_c_try_run "$LINENO" +if ac_fn_c_try_compile "$LINENO" then : - gl_cv_func_mbrtowc_empty_input=yes + gl_cv_sys_struct_timespec_in_time_h=yes else - gl_cv_func_mbrtowc_empty_input=no + gl_cv_sys_struct_timespec_in_time_h=no fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_time_h" >&5 +printf "%s\n" "$gl_cv_sys_struct_timespec_in_time_h" >&6; } + TIME_H_DEFINES_STRUCT_TIMESPEC=0 + SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0 + PTHREAD_H_DEFINES_STRUCT_TIMESPEC=0 + UNISTD_H_DEFINES_STRUCT_TIMESPEC=0 + if test $gl_cv_sys_struct_timespec_in_time_h = yes; then + TIME_H_DEFINES_STRUCT_TIMESPEC=1 + else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct timespec in " >&5 +printf %s "checking for struct timespec in ... " >&6; } +if test ${gl_cv_sys_struct_timespec_in_sys_time_h+y} +then : + printf %s "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main (void) +{ +static struct timespec x; x.tv_sec = x.tv_nsec; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + gl_cv_sys_struct_timespec_in_sys_time_h=yes +else + gl_cv_sys_struct_timespec_in_sys_time_h=no fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_empty_input" >&5 -printf "%s\n" "$gl_cv_func_mbrtowc_empty_input" >&6; } - - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C locale is free of encoding errors" >&5 -printf %s "checking whether the C locale is free of encoding errors... " >&6; } -if test ${gl_cv_C_locale_sans_EILSEQ+y} +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_sys_time_h" >&5 +printf "%s\n" "$gl_cv_sys_struct_timespec_in_sys_time_h" >&6; } + if test $gl_cv_sys_struct_timespec_in_sys_time_h = yes; then + SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=1 + else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct timespec in " >&5 +printf %s "checking for struct timespec in ... " >&6; } +if test ${gl_cv_sys_struct_timespec_in_pthread_h+y} then : printf %s "(cached) " >&6 else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include - gl_cv_C_locale_sans_EILSEQ="guessing no" - - if test "$cross_compiling" = yes +int +main (void) +{ +static struct timespec x; x.tv_sec = x.tv_nsec; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" then : - : + gl_cv_sys_struct_timespec_in_pthread_h=yes +else + gl_cv_sys_struct_timespec_in_pthread_h=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_pthread_h" >&5 +printf "%s\n" "$gl_cv_sys_struct_timespec_in_pthread_h" >&6; } + if test $gl_cv_sys_struct_timespec_in_pthread_h = yes; then + PTHREAD_H_DEFINES_STRUCT_TIMESPEC=1 + else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct timespec in " >&5 +printf %s "checking for struct timespec in ... " >&6; } +if test ${gl_cv_sys_struct_timespec_in_unistd_h+y} +then : + printf %s "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include - #include - #include +#include int main (void) { - - 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; - +static struct timespec x; x.tv_sec = x.tv_nsec; ; return 0; } _ACEOF -if ac_fn_c_try_run "$LINENO" +if ac_fn_c_try_compile "$LINENO" then : - gl_cv_C_locale_sans_EILSEQ=yes + gl_cv_sys_struct_timespec_in_unistd_h=yes else - gl_cv_C_locale_sans_EILSEQ=no + gl_cv_sys_struct_timespec_in_unistd_h=no fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_unistd_h" >&5 +printf "%s\n" "$gl_cv_sys_struct_timespec_in_unistd_h" >&6; } + if test $gl_cv_sys_struct_timespec_in_unistd_h = yes; then + UNISTD_H_DEFINES_STRUCT_TIMESPEC=1 + fi + fi + fi + fi -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_C_locale_sans_EILSEQ" >&5 -printf "%s\n" "$gl_cv_C_locale_sans_EILSEQ" >&6; } - case "$gl_cv_func_mbrtowc_null_arg1" in - *yes) ;; - *) -printf "%s\n" "#define MBRTOWC_NULL_ARG1_BUG 1" >>confdefs.h - REPLACE_MBRTOWC=1 - ;; - esac - case "$gl_cv_func_mbrtowc_null_arg2" in - *yes) ;; - *) -printf "%s\n" "#define MBRTOWC_NULL_ARG2_BUG 1" >>confdefs.h - REPLACE_MBRTOWC=1 - ;; - esac - case "$gl_cv_func_mbrtowc_retval" in - *yes) ;; - *) -printf "%s\n" "#define MBRTOWC_RETVAL_BUG 1" >>confdefs.h - REPLACE_MBRTOWC=1 - ;; - esac - case "$gl_cv_func_mbrtowc_nul_retval" in - *yes) ;; - *) -printf "%s\n" "#define MBRTOWC_NUL_RETVAL_BUG 1" >>confdefs.h - REPLACE_MBRTOWC=1 - ;; - esac - case "$gl_cv_func_mbrtowc_empty_input" in - *yes) ;; - *) -printf "%s\n" "#define MBRTOWC_EMPTY_INPUT_BUG 1" >>confdefs.h - REPLACE_MBRTOWC=1 - ;; - esac - case $gl_cv_C_locale_sans_EILSEQ in - *yes) ;; - *) -printf "%s\n" "#define C_LOCALE_MAYBE_EILSEQ 1" >>confdefs.h - REPLACE_MBRTOWC=1 - ;; - esac - fi - fi @@ -16306,748 +19021,628 @@ - GNULIB_FFSL=0; - GNULIB_FFSLL=0; - GNULIB_MEMCHR=0; - GNULIB_MEMMEM=0; - GNULIB_MEMPCPY=0; - GNULIB_MEMRCHR=0; - GNULIB_RAWMEMCHR=0; - GNULIB_STPCPY=0; - GNULIB_STPNCPY=0; - GNULIB_STRCHRNUL=0; - GNULIB_STRDUP=0; - GNULIB_STRNCAT=0; - GNULIB_STRNDUP=0; - GNULIB_STRNLEN=0; - GNULIB_STRPBRK=0; - GNULIB_STRSEP=0; - GNULIB_STRSTR=0; - GNULIB_STRCASESTR=0; - GNULIB_STRTOK_R=0; - GNULIB_MBSLEN=0; - GNULIB_MBSNLEN=0; - GNULIB_MBSCHR=0; - GNULIB_MBSRCHR=0; - GNULIB_MBSSTR=0; - GNULIB_MBSCASECMP=0; - GNULIB_MBSNCASECMP=0; - GNULIB_MBSPCASECMP=0; - GNULIB_MBSCASESTR=0; - GNULIB_MBSCSPN=0; - GNULIB_MBSPBRK=0; - GNULIB_MBSSPN=0; - GNULIB_MBSSEP=0; - GNULIB_MBSTOK_R=0; - GNULIB_STRERROR=0; - GNULIB_STRERROR_R=0; - GNULIB_STRSIGNAL=0; - GNULIB_STRVERSCMP=0; - HAVE_MBSLEN=0; - HAVE_FFSL=1; - HAVE_FFSLL=1; - HAVE_MEMCHR=1; - HAVE_DECL_MEMMEM=1; - HAVE_MEMPCPY=1; - HAVE_DECL_MEMRCHR=1; - HAVE_RAWMEMCHR=1; - HAVE_STPCPY=1; - HAVE_STPNCPY=1; - HAVE_STRCHRNUL=1; - HAVE_DECL_STRDUP=1; - HAVE_DECL_STRNDUP=1; - HAVE_DECL_STRNLEN=1; - HAVE_STRPBRK=1; - HAVE_STRSEP=1; - HAVE_STRCASESTR=1; - HAVE_DECL_STRTOK_R=1; - HAVE_DECL_STRERROR_R=1; - HAVE_DECL_STRSIGNAL=1; - HAVE_STRVERSCMP=1; - REPLACE_MEMCHR=0; - REPLACE_MEMMEM=0; - REPLACE_STPNCPY=0; - REPLACE_STRDUP=0; - REPLACE_STRSTR=0; - REPLACE_STRCASESTR=0; - REPLACE_STRCHRNUL=0; - REPLACE_STRERROR=0; - REPLACE_STRERROR_R=0; - REPLACE_STRNCAT=0; - REPLACE_STRNDUP=0; - REPLACE_STRNLEN=0; - REPLACE_STRSIGNAL=0; - REPLACE_STRTOK_R=0; - UNDEFINE_STRTOK_R=0; + + if test $gl_cv_have_include_next = yes; then + gl_cv_next_time_h='<'time.h'>' + else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 +printf %s "checking absolute name of ... " >&6; } +if test ${gl_cv_next_time_h+y} +then : + printf %s "(cached) " >&6 +else + + + + 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 'time.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_time_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | + sed -n "$gl_absolute_header_sed"` + + gl_header=$gl_cv_absolute_time_h + gl_cv_next_time_h='"'$gl_header'"' + + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_time_h" >&5 +printf "%s\n" "$gl_cv_next_time_h" >&6; } + fi + NEXT_TIME_H=$gl_cv_next_time_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='<'time.h'>' + else + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' + gl_next_as_first_directive=$gl_cv_next_time_h + fi + NEXT_AS_FIRST_DIRECTIVE_TIME_H=$gl_next_as_first_directive + + + + + + + + +gl_libunistring_sed_extract_major='/^[0-9]/{s/^\([0-9]*\).*/\1/p;q;} +i\ +0 +q +' +gl_libunistring_sed_extract_minor='/^[0-9][0-9]*[.][0-9]/{s/^[0-9]*[.]\([0-9]*\).*/\1/p;q;} +i\ +0 +q +' +gl_libunistring_sed_extract_subminor='/^[0-9][0-9]*[.][0-9][0-9]*[.][0-9]/{s/^[0-9]*[.][0-9]*[.]\([0-9]*\).*/\1/p;q;} +i\ +0 +q +' + if test "$HAVE_LIBUNISTRING" = yes; then + LIBUNISTRING_VERSION_MAJOR=`echo "$LIBUNISTRING_VERSION" | sed -n -e "$gl_libunistring_sed_extract_major"` + LIBUNISTRING_VERSION_MINOR=`echo "$LIBUNISTRING_VERSION" | sed -n -e "$gl_libunistring_sed_extract_minor"` + LIBUNISTRING_VERSION_SUBMINOR=`echo "$LIBUNISTRING_VERSION" | sed -n -e "$gl_libunistring_sed_extract_subminor"` + fi +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 + ac_have_decl=0 +fi +printf "%s\n" "#define HAVE_DECL_CLEARERR_UNLOCKED $ac_have_decl" >>confdefs.h +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 + ac_have_decl=0 +fi +printf "%s\n" "#define HAVE_DECL_FEOF_UNLOCKED $ac_have_decl" >>confdefs.h +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 + ac_have_decl=0 +fi +printf "%s\n" "#define HAVE_DECL_FERROR_UNLOCKED $ac_have_decl" >>confdefs.h +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 + ac_have_decl=0 +fi +printf "%s\n" "#define HAVE_DECL_FFLUSH_UNLOCKED $ac_have_decl" >>confdefs.h +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 + ac_have_decl=0 +fi +printf "%s\n" "#define HAVE_DECL_FGETS_UNLOCKED $ac_have_decl" >>confdefs.h +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 + ac_have_decl=0 +fi +printf "%s\n" "#define HAVE_DECL_FPUTC_UNLOCKED $ac_have_decl" >>confdefs.h - # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it - # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is - # irrelevant for anonymous mappings. - ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap" -if test "x$ac_cv_func_mmap" = xyes +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 : - gl_have_mmap=yes + ac_have_decl=1 else - gl_have_mmap=no + ac_have_decl=0 fi +printf "%s\n" "#define HAVE_DECL_FPUTS_UNLOCKED $ac_have_decl" >>confdefs.h - # Try to allow MAP_ANONYMOUS. - gl_have_mmap_anonymous=no - if test $gl_have_mmap = yes; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5 -printf %s "checking for MAP_ANONYMOUS... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ +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 + ac_have_decl=0 +fi -#include -#ifdef MAP_ANONYMOUS - I cannot identify this map -#endif +printf "%s\n" "#define HAVE_DECL_FREAD_UNLOCKED $ac_have_decl" >>confdefs.h -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "I cannot identify this map" >/dev/null 2>&1 +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 : - gl_have_mmap_anonymous=yes + ac_have_decl=1 +else + ac_have_decl=0 fi -rm -rf conftest* - if test $gl_have_mmap_anonymous != yes; then - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ +printf "%s\n" "#define HAVE_DECL_FWRITE_UNLOCKED $ac_have_decl" >>confdefs.h -#include -#ifdef MAP_ANON - I cannot identify this map -#endif +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 + ac_have_decl=0 +fi -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "I cannot identify this map" >/dev/null 2>&1 +printf "%s\n" "#define HAVE_DECL_GETC_UNLOCKED $ac_have_decl" >>confdefs.h + +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 + ac_have_decl=0 +fi -printf "%s\n" "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h +printf "%s\n" "#define HAVE_DECL_GETCHAR_UNLOCKED $ac_have_decl" >>confdefs.h - gl_have_mmap_anonymous=yes +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 + ac_have_decl=0 fi -rm -rf conftest* - fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5 -printf "%s\n" "$gl_have_mmap_anonymous" >&6; } - if test $gl_have_mmap_anonymous = yes; then +printf "%s\n" "#define HAVE_DECL_PUTC_UNLOCKED $ac_have_decl" >>confdefs.h -printf "%s\n" "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h +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 + ac_have_decl=0 +fi - fi +printf "%s\n" "#define HAVE_DECL_PUTCHAR_UNLOCKED $ac_have_decl" >>confdefs.h + + + + + if test $ac_cv_header_features_h = yes; then + HAVE_FEATURES_H=1 + else + HAVE_FEATURES_H=0 fi - : + GNULIB_SOCKET=0; + GNULIB_CONNECT=0; + GNULIB_ACCEPT=0; + GNULIB_BIND=0; + GNULIB_GETPEERNAME=0; + GNULIB_GETSOCKNAME=0; + GNULIB_GETSOCKOPT=0; + GNULIB_LISTEN=0; + GNULIB_RECV=0; + GNULIB_SEND=0; + GNULIB_RECVFROM=0; + GNULIB_SENDTO=0; + GNULIB_SETSOCKOPT=0; + GNULIB_SHUTDOWN=0; + GNULIB_ACCEPT4=0; + HAVE_STRUCT_SOCKADDR_STORAGE=1; + HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY=1; + + HAVE_SA_FAMILY_T=1; + HAVE_ACCEPT4=1; + + + if test $ac_cv_header_sys_socket_h = no; then + ac_fn_c_check_header_compile "$LINENO" "ws2tcpip.h" "ac_cv_header_ws2tcpip_h" "$ac_includes_default" +if test "x$ac_cv_header_ws2tcpip_h" = xyes +then : + printf "%s\n" "#define HAVE_WS2TCPIP_H 1" >>confdefs.h +fi - : + fi + case "$host_os" in + osf*) +printf "%s\n" "#define _POSIX_PII_SOCKET 1" >>confdefs.h + ;; + esac - if test $HAVE_MEMCHR = 1; then - # Detect platform-specific bugs in some versions of glibc: - # memchr should not dereference anything with length 0 - # http://bugzilla.redhat.com/499689 - # memchr should not dereference overestimated length after a match - # http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=521737 - # http://sourceware.org/bugzilla/show_bug.cgi?id=10162 - # Assume that memchr works on platforms that lack mprotect. - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether memchr works" >&5 -printf %s "checking whether memchr works... " >&6; } -if test ${gl_cv_func_memchr_works+y} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether is self-contained" >&5 +printf %s "checking whether is self-contained... " >&6; } +if test ${gl_cv_header_sys_socket_h_selfcontained+y} then : printf %s "(cached) " >&6 else - if test "$cross_compiling" = yes -then : - gl_cv_func_memchr_works="guessing no" -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include -#if HAVE_SYS_MMAN_H -# include -# include -# include -# include -# ifndef MAP_FILE -# define MAP_FILE 0 -# endif -#endif + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include int main (void) { - int result = 0; - char *fence = NULL; -#if HAVE_SYS_MMAN_H && HAVE_MPROTECT -# if HAVE_MAP_ANONYMOUS - const int flags = MAP_ANONYMOUS | MAP_PRIVATE; - const int fd = -1; -# else /* !HAVE_MAP_ANONYMOUS */ - const int flags = MAP_FILE | MAP_PRIVATE; - int fd = open ("/dev/zero", O_RDONLY, 0666); - if (fd >= 0) -# endif - { - int pagesize = getpagesize (); - char *two_pages = - (char *) mmap (NULL, 2 * pagesize, PROT_READ | PROT_WRITE, - flags, fd, 0); - if (two_pages != (char *)(-1) - && mprotect (two_pages + pagesize, pagesize, PROT_NONE) == 0) - fence = two_pages + pagesize; - } -#endif - if (fence) - { - if (memchr (fence, 0, 0)) - result |= 1; - strcpy (fence - 9, "12345678"); - if (memchr (fence - 9, 0, 79) != fence - 1) - result |= 2; - if (memchr (fence - 1, 0, 3) != fence - 1) - result |= 4; - } - return result; - ; return 0; } _ACEOF -if ac_fn_c_try_run "$LINENO" +if ac_fn_c_try_compile "$LINENO" then : - gl_cv_func_memchr_works=yes + gl_cv_header_sys_socket_h_selfcontained=yes else - gl_cv_func_memchr_works=no + gl_cv_header_sys_socket_h_selfcontained=no fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_socket_h_selfcontained" >&5 +printf "%s\n" "$gl_cv_header_sys_socket_h_selfcontained" >&6; } + if test $gl_cv_header_sys_socket_h_selfcontained = yes; then + ac_fn_c_check_func "$LINENO" "shutdown" "ac_cv_func_shutdown" +if test "x$ac_cv_func_shutdown" = xyes +then : + printf "%s\n" "#define HAVE_SHUTDOWN 1" >>confdefs.h fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memchr_works" >&5 -printf "%s\n" "$gl_cv_func_memchr_works" >&6; } - if test "$gl_cv_func_memchr_works" != yes; then - REPLACE_MEMCHR=1 - fi - fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5 -printf %s "checking for C/C++ restrict keyword... " >&6; } -if test ${ac_cv_c_restrict+y} + if test $ac_cv_func_shutdown = yes; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether defines the SHUT_* macros" >&5 +printf %s "checking whether defines the SHUT_* macros... " >&6; } +if test ${gl_cv_header_sys_socket_h_shut+y} then : printf %s "(cached) " >&6 else - ac_cv_c_restrict=no - # The order here caters to the fact that C++ does not require restrict. - for ac_kw in __restrict __restrict__ _Restrict restrict; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -typedef int *int_ptr; - int foo (int_ptr $ac_kw ip) { return ip[0]; } - int bar (int [$ac_kw]); /* Catch GCC bug 14050. */ - int bar (int ip[$ac_kw]) { return ip[0]; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include int main (void) { -int s[1]; - int *$ac_kw t = s; - t[0] = 0; - return foo (t) + bar (t); - +int a[] = { SHUT_RD, SHUT_WR, SHUT_RDWR }; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : - ac_cv_c_restrict=$ac_kw + gl_cv_header_sys_socket_h_shut=yes +else + gl_cv_header_sys_socket_h_shut=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - test "$ac_cv_c_restrict" != no && break - done fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5 -printf "%s\n" "$ac_cv_c_restrict" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_socket_h_shut" >&5 +printf "%s\n" "$gl_cv_header_sys_socket_h_shut" >&6; } + if test $gl_cv_header_sys_socket_h_shut = no; then + SYS_SOCKET_H='sys/socket.h' + fi + fi + fi + # We need to check for ws2tcpip.h now. - case $ac_cv_c_restrict in - restrict) ;; - no) printf "%s\n" "#define restrict /**/" >>confdefs.h - ;; - *) printf "%s\n" "#define restrict $ac_cv_c_restrict" >>confdefs.h - ;; - esac - 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 - ac_have_decl=0 -fi -printf "%s\n" "#define HAVE_DECL_MEMRCHR $ac_have_decl" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether defines MIN and MAX" >&5 -printf %s "checking whether defines MIN and MAX... " >&6; } -if test ${gl_cv_minmax_in_limits_h+y} -then : - printf %s "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - int x = MIN (42, 17); -int -main (void) -{ - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO" + if test $gl_cv_have_include_next = yes; then + gl_cv_next_sys_socket_h='<'sys/socket.h'>' + else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 +printf %s "checking absolute name of ... " >&6; } +if test ${gl_cv_next_sys_socket_h+y} then : - gl_cv_minmax_in_limits_h=yes + printf %s "(cached) " >&6 else - gl_cv_minmax_in_limits_h=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_minmax_in_limits_h" >&5 -printf "%s\n" "$gl_cv_minmax_in_limits_h" >&6; } - if test $gl_cv_minmax_in_limits_h = yes; then - -printf "%s\n" "#define HAVE_MINMAX_IN_LIMITS_H 1" >>confdefs.h - - fi + if test $ac_cv_header_sys_socket_h = yes; then - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether defines MIN and MAX" >&5 -printf %s "checking whether defines MIN and MAX... " >&6; } -if test ${gl_cv_minmax_in_sys_param_h+y} -then : - printf %s "(cached) " >&6 -else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include - int x = MIN (42, 17); -int -main (void) -{ - - ; - return 0; -} +#include _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - gl_cv_minmax_in_sys_param_h=yes -else - gl_cv_minmax_in_sys_param_h=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_minmax_in_sys_param_h" >&5 -printf "%s\n" "$gl_cv_minmax_in_sys_param_h" >&6; } - if test $gl_cv_minmax_in_sys_param_h = yes; then - -printf "%s\n" "#define HAVE_MINMAX_IN_SYS_PARAM_H 1" >>confdefs.h + case "$host_os" in + aix*) gl_absname_cpp="$ac_cpp -C" ;; + *) gl_absname_cpp="$ac_cpp" ;; + esac - fi + case "$host_os" in + mingw*) + gl_dirsep_regex='[/\\]' + ;; + *) + gl_dirsep_regex='\/' + ;; + esac + gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' + gl_header_literal_regex=`echo 'sys/socket.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_sys_socket_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | + sed -n "$gl_absolute_header_sed"` + gl_header=$gl_cv_absolute_sys_socket_h + gl_cv_next_sys_socket_h='"'$gl_header'"' + else + gl_cv_next_sys_socket_h='<'sys/socket.h'>' + fi +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_socket_h" >&5 +printf "%s\n" "$gl_cv_next_sys_socket_h" >&6; } + fi + NEXT_SYS_SOCKET_H=$gl_cv_next_sys_socket_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='<'sys/socket.h'>' + else + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' + gl_next_as_first_directive=$gl_cv_next_sys_socket_h + fi + NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H=$gl_next_as_first_directive + if test $ac_cv_header_sys_socket_h = yes; then + HAVE_SYS_SOCKET_H=1 + HAVE_WS2TCPIP_H=0 + else + HAVE_SYS_SOCKET_H=0 + if test $ac_cv_header_ws2tcpip_h = yes; then + HAVE_WS2TCPIP_H=1 + else + HAVE_WS2TCPIP_H=0 + fi + fi + ac_fn_c_check_type "$LINENO" "struct sockaddr_storage" "ac_cv_type_struct_sockaddr_storage" " + /* sys/types.h is not needed according to POSIX, but the + sys/socket.h in i386-unknown-freebsd4.10 and + powerpc-apple-darwin5.5 required it. */ +#include +#ifdef HAVE_SYS_SOCKET_H +#include +#endif +#ifdef HAVE_WS2TCPIP_H +#include +#endif - ac_fn_c_check_decl "$LINENO" "alarm" "ac_cv_have_decl_alarm" "$ac_includes_default" -if test "x$ac_cv_have_decl_alarm" = xyes +" +if test "x$ac_cv_type_struct_sockaddr_storage" = xyes then : - ac_have_decl=1 -else - ac_have_decl=0 -fi - -printf "%s\n" "#define HAVE_DECL_ALARM $ac_have_decl" >>confdefs.h - +printf "%s\n" "#define HAVE_STRUCT_SOCKADDR_STORAGE 1" >>confdefs.h +fi +ac_fn_c_check_type "$LINENO" "sa_family_t" "ac_cv_type_sa_family_t" " + /* sys/types.h is not needed according to POSIX, but the + sys/socket.h in i386-unknown-freebsd4.10 and + powerpc-apple-darwin5.5 required it. */ +#include +#ifdef HAVE_SYS_SOCKET_H +#include +#endif +#ifdef HAVE_WS2TCPIP_H +#include +#endif +" +if test "x$ac_cv_type_sa_family_t" = xyes +then : +printf "%s\n" "#define HAVE_SA_FAMILY_T 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ssize_t" >&5 -printf %s "checking for ssize_t... " >&6; } -if test ${gt_cv_ssize_t+y} -then : - printf %s "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main (void) -{ -int x = sizeof (ssize_t *) + sizeof (ssize_t); - return !x; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - gt_cv_ssize_t=yes -else - gt_cv_ssize_t=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_ssize_t" >&5 -printf "%s\n" "$gt_cv_ssize_t" >&6; } - if test $gt_cv_ssize_t = no; then - -printf "%s\n" "#define ssize_t int" >>confdefs.h + if test $ac_cv_type_struct_sockaddr_storage = no; then + HAVE_STRUCT_SOCKADDR_STORAGE=0 fi + if test $ac_cv_type_sa_family_t = no; then + HAVE_SA_FAMILY_T=0 + fi + if test $ac_cv_type_struct_sockaddr_storage != no; then + ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "ss_family" "ac_cv_member_struct_sockaddr_storage_ss_family" "#include + #ifdef HAVE_SYS_SOCKET_H + #include + #endif + #ifdef HAVE_WS2TCPIP_H + #include + #endif -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5 -printf %s "checking for stdbool.h that conforms to C99... " >&6; } -if test ${ac_cv_header_stdbool_h+y} +" +if test "x$ac_cv_member_struct_sockaddr_storage_ss_family" = xyes then : - printf %s "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - #include +printf "%s\n" "#define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1" >>confdefs.h - #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 +else + HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY=0 +fi - struct s { Bool s: 1; Bool t; bool u: 1; bool v; } s; + fi + if test $HAVE_STRUCT_SOCKADDR_STORAGE = 0 || test $HAVE_SA_FAMILY_T = 0 \ + || test $HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY = 0; then + SYS_SOCKET_H='sys/socket.h' + fi - 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 g[true]; - 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]; - char o[sizeof n == m * sizeof n[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 *qq = &q; -int -main (void) -{ - bool e = &s; - *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 + !qq); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO" + if test $ac_cv_header_sys_socket_h != yes; then + ac_fn_c_check_header_compile "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default" +if test "x$ac_cv_header_winsock2_h" = xyes then : - ac_cv_header_stdbool_h=yes -else - ac_cv_header_stdbool_h=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + printf "%s\n" "#define HAVE_WINSOCK2_H 1" >>confdefs.h + fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5 -printf "%s\n" "$ac_cv_header_stdbool_h" >&6; } - ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default" -if test "x$ac_cv_type__Bool" = xyes -then : -printf "%s\n" "#define HAVE__BOOL 1" >>confdefs.h + fi + if test "$ac_cv_header_winsock2_h" = yes; then + HAVE_WINSOCK2_H=1 + UNISTD_H_HAVE_WINSOCK2_H=1 + SYS_IOCTL_H_HAVE_WINSOCK2_H=1 + else + HAVE_WINSOCK2_H=0 + fi + -fi - GNULIB_DPRINTF=0; - GNULIB_FCLOSE=0; - GNULIB_FDOPEN=0; - GNULIB_FFLUSH=0; - GNULIB_FGETC=0; - GNULIB_FGETS=0; - GNULIB_FOPEN=0; - GNULIB_FPRINTF=0; - GNULIB_FPRINTF_POSIX=0; - GNULIB_FPURGE=0; - GNULIB_FPUTC=0; - GNULIB_FPUTS=0; - GNULIB_FREAD=0; - GNULIB_FREOPEN=0; - GNULIB_FSCANF=0; - GNULIB_FSEEK=0; - GNULIB_FSEEKO=0; - GNULIB_FTELL=0; - GNULIB_FTELLO=0; - GNULIB_FWRITE=0; - GNULIB_GETC=0; - GNULIB_GETCHAR=0; - GNULIB_GETDELIM=0; - GNULIB_GETLINE=0; - GNULIB_OBSTACK_PRINTF=0; - GNULIB_OBSTACK_PRINTF_POSIX=0; - GNULIB_PCLOSE=0; - GNULIB_PERROR=0; - GNULIB_POPEN=0; - GNULIB_PRINTF=0; - GNULIB_PRINTF_POSIX=0; - GNULIB_PUTC=0; - GNULIB_PUTCHAR=0; - GNULIB_PUTS=0; - GNULIB_REMOVE=0; - GNULIB_RENAME=0; - GNULIB_RENAMEAT=0; - GNULIB_SCANF=0; - GNULIB_SNPRINTF=0; - GNULIB_SPRINTF_POSIX=0; - GNULIB_STDIO_H_NONBLOCKING=0; - GNULIB_STDIO_H_SIGPIPE=0; - GNULIB_TMPFILE=0; - GNULIB_VASPRINTF=0; - GNULIB_VFSCANF=0; - GNULIB_VSCANF=0; - GNULIB_VDPRINTF=0; - GNULIB_VFPRINTF=0; - GNULIB_VFPRINTF_POSIX=0; - GNULIB_VPRINTF=0; - GNULIB_VPRINTF_POSIX=0; - GNULIB_VSNPRINTF=0; - GNULIB_VSPRINTF_POSIX=0; - HAVE_DECL_FPURGE=1; - HAVE_DECL_FSEEKO=1; - HAVE_DECL_FTELLO=1; - HAVE_DECL_GETDELIM=1; - HAVE_DECL_GETLINE=1; - HAVE_DECL_OBSTACK_PRINTF=1; - HAVE_DECL_SNPRINTF=1; - HAVE_DECL_VSNPRINTF=1; - HAVE_DPRINTF=1; - HAVE_FSEEKO=1; - HAVE_FTELLO=1; - HAVE_PCLOSE=1; - HAVE_POPEN=1; - HAVE_RENAMEAT=1; - HAVE_VASPRINTF=1; - HAVE_VDPRINTF=1; - REPLACE_DPRINTF=0; - REPLACE_FCLOSE=0; - REPLACE_FDOPEN=0; - REPLACE_FFLUSH=0; - REPLACE_FOPEN=0; - REPLACE_FPRINTF=0; - REPLACE_FPURGE=0; - REPLACE_FREOPEN=0; - REPLACE_FSEEK=0; - REPLACE_FSEEKO=0; - REPLACE_FTELL=0; - REPLACE_FTELLO=0; - REPLACE_GETDELIM=0; - REPLACE_GETLINE=0; - REPLACE_OBSTACK_PRINTF=0; - REPLACE_PERROR=0; - REPLACE_POPEN=0; - REPLACE_PRINTF=0; - REPLACE_REMOVE=0; - REPLACE_RENAME=0; - REPLACE_RENAMEAT=0; - REPLACE_SNPRINTF=0; - REPLACE_SPRINTF=0; - REPLACE_STDIO_READ_FUNCS=0; - REPLACE_STDIO_WRITE_FUNCS=0; - REPLACE_TMPFILE=0; - REPLACE_VASPRINTF=0; - REPLACE_VDPRINTF=0; - REPLACE_VFPRINTF=0; - REPLACE_VPRINTF=0; - REPLACE_VSNPRINTF=0; - REPLACE_VSPRINTF=0; + GNULIB_INET_NTOP=0; + GNULIB_INET_PTON=0; + HAVE_DECL_INET_NTOP=1; + HAVE_DECL_INET_PTON=1; + REPLACE_INET_NTOP=0; + REPLACE_INET_PTON=0; - 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 - ac_have_decl=0 -fi -printf "%s\n" "#define HAVE_DECL_STRDUP $ac_have_decl" >>confdefs.h - REPLACE_STRERROR_0=0 - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether strerror(0) succeeds" >&5 -printf %s "checking whether strerror(0) succeeds... " >&6; } -if test ${gl_cv_func_strerror_0_works+y} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if environ is properly declared" >&5 +printf %s "checking if environ is properly declared... " >&6; } +if test ${gt_cv_var_environ_declaration+y} then : printf %s "(cached) " >&6 else - if test "$cross_compiling" = yes -then : - case "$host_os" in - # Guess yes on glibc systems. - *-gnu*) gl_cv_func_strerror_0_works="guessing yes" ;; - # If we don't know, assume the worst. - *) gl_cv_func_strerror_0_works="guessing no" ;; - esac - -else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include - #include +#if HAVE_UNISTD_H + #include + #endif + /* mingw, BeOS, Haiku declare environ in , not in . */ + #include + extern struct { int foo; } environ; int main (void) { -int result = 0; - char *str; - errno = 0; - str = strerror (0); - if (!*str) result |= 1; - if (errno) result |= 2; - if (strstr (str, "nknown") || strstr (str, "ndefined")) - result |= 4; - return result; +environ.foo = 1; ; return 0; } _ACEOF -if ac_fn_c_try_run "$LINENO" +if ac_fn_c_try_compile "$LINENO" then : - gl_cv_func_strerror_0_works=yes + gt_cv_var_environ_declaration=no else - gl_cv_func_strerror_0_works=no + gt_cv_var_environ_declaration=yes fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_var_environ_declaration" >&5 +printf "%s\n" "$gt_cv_var_environ_declaration" >&6; } + if test $gt_cv_var_environ_declaration = yes; then +printf "%s\n" "#define HAVE_ENVIRON_DECL 1" >>confdefs.h -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_0_works" >&5 -printf "%s\n" "$gl_cv_func_strerror_0_works" >&6; } - case "$gl_cv_func_strerror_0_works" in - *yes) ;; - *) - REPLACE_STRERROR_0=1 + fi + + + if test $gt_cv_var_environ_declaration != yes; then + HAVE_DECL_ENVIRON=0 + fi + + + + GNULIB_GETTIMEOFDAY=0; + HAVE_GETTIMEOFDAY=1; + HAVE_STRUCT_TIMEVAL=1; + HAVE_SYS_TIME_H=1; + REPLACE_GETTIMEOFDAY=0; + REPLACE_STRUCT_TIMEVAL=0; -printf "%s\n" "#define REPLACE_STRERROR_0 1" >>confdefs.h - ;; - esac @@ -17061,20 +19656,23 @@ if test $gl_cv_have_include_next = yes; then - gl_cv_next_string_h='<'string.h'>' + gl_cv_next_sys_time_h='<'sys/time.h'>' else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 -printf %s "checking absolute name of ... " >&6; } -if test ${gl_cv_next_string_h+y} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 +printf %s "checking absolute name of ... " >&6; } +if test ${gl_cv_next_sys_time_h+y} then : printf %s "(cached) " >&6 else + if test $ac_cv_header_sys_time_h = yes; then + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include +#include _ACEOF case "$host_os" in aix*) gl_absname_cpp="$ac_cpp -C" ;; @@ -17090,7 +19688,7 @@ ;; esac gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' - gl_header_literal_regex=`echo 'string.h' \ + gl_header_literal_regex=`echo 'sys/time.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/ @@ -17099,169 +19697,293 @@ q }' - gl_cv_absolute_string_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | + gl_cv_absolute_sys_time_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | sed -n "$gl_absolute_header_sed"` - gl_header=$gl_cv_absolute_string_h - gl_cv_next_string_h='"'$gl_header'"' + gl_header=$gl_cv_absolute_sys_time_h + gl_cv_next_sys_time_h='"'$gl_header'"' + else + gl_cv_next_sys_time_h='<'sys/time.h'>' + fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_string_h" >&5 -printf "%s\n" "$gl_cv_next_string_h" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_time_h" >&5 +printf "%s\n" "$gl_cv_next_sys_time_h" >&6; } fi - NEXT_STRING_H=$gl_cv_next_string_h + NEXT_SYS_TIME_H=$gl_cv_next_sys_time_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='<'string.h'>' + gl_next_as_first_directive='<'sys/time.h'>' else # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' - gl_next_as_first_directive=$gl_cv_next_string_h + gl_next_as_first_directive=$gl_cv_next_sys_time_h fi - NEXT_AS_FIRST_DIRECTIVE_STRING_H=$gl_next_as_first_directive + NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H=$gl_next_as_first_directive + + + + + + if test $ac_cv_header_sys_time_h != yes; then + HAVE_SYS_TIME_H=0 + fi + if test $ac_cv_header_sys_socket_h != yes; then + ac_fn_c_check_header_compile "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default" +if test "x$ac_cv_header_winsock2_h" = xyes +then : + printf "%s\n" "#define HAVE_WINSOCK2_H 1" >>confdefs.h + +fi + + fi + if test "$ac_cv_header_winsock2_h" = yes; then + HAVE_WINSOCK2_H=1 + UNISTD_H_HAVE_WINSOCK2_H=1 + SYS_IOCTL_H_HAVE_WINSOCK2_H=1 + else + HAVE_WINSOCK2_H=0 + fi + - for gl_func in ffsl ffsll memmem mempcpy memrchr rawmemchr stpcpy stpncpy strchrnul strdup strncat strndup strnlen strpbrk strsep strcasestr strtok_r strerror_r strsignal strverscmp; do - as_gl_Symbol=`printf "%s\n" "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5 -printf %s "checking whether $gl_func is declared without a macro... " >&6; } -if eval test \${$as_gl_Symbol+y} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct timeval" >&5 +printf %s "checking for struct timeval... " >&6; } +if test ${gl_cv_sys_struct_timeval+y} then : printf %s "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include +#if HAVE_SYS_TIME_H + #include + #endif + #include + #if HAVE_WINSOCK2_H + # include + #endif int main (void) { -#undef $gl_func - (void) $gl_func; +static struct timeval x; x.tv_sec = x.tv_usec; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : - eval "$as_gl_Symbol=yes" + gl_cv_sys_struct_timeval=yes else - eval "$as_gl_Symbol=no" + gl_cv_sys_struct_timeval=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi -eval ac_res=\$$as_gl_Symbol - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } - if eval test \"x\$"$as_gl_Symbol"\" = x"yes" +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval" >&5 +printf "%s\n" "$gl_cv_sys_struct_timeval" >&6; } + if test $gl_cv_sys_struct_timeval != yes; then + HAVE_STRUCT_TIMEVAL=0 + else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wide-enough struct timeval.tv_sec member" >&5 +printf %s "checking for wide-enough struct timeval.tv_sec member... " >&6; } +if test ${gl_cv_sys_struct_timeval_tv_sec+y} then : - cat >>confdefs.h <<_ACEOF -#define `printf "%s\n" "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 + printf %s "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#if HAVE_SYS_TIME_H + #include + #endif + #include + #if HAVE_WINSOCK2_H + # include + #endif + +int +main (void) +{ +static struct timeval x; + typedef int verify_tv_sec_type[ + sizeof (time_t) <= sizeof x.tv_sec ? 1 : -1 + ]; + + ; + return 0; +} _ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + gl_cv_sys_struct_timeval_tv_sec=yes +else + gl_cv_sys_struct_timeval_tv_sec=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - eval ac_cv_have_decl_$gl_func=yes fi - done +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval_tv_sec" >&5 +printf "%s\n" "$gl_cv_sys_struct_timeval_tv_sec" >&6; } + if test $gl_cv_sys_struct_timeval_tv_sec != yes; then + REPLACE_STRUCT_TIMEVAL=1 + fi + fi - 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 - ac_have_decl=0 -fi -printf "%s\n" "#define HAVE_DECL_STRNLEN $ac_have_decl" >>confdefs.h - if test "$gl_cv_func_memchr_works" != yes; then - REPLACE_STRSTR=1 - else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether strstr works" >&5 -printf %s "checking whether strstr works... " >&6; } -if test ${gl_cv_func_strstr_works_always+y} + + NEED_LOCALTIME_BUFFER=0 + + + + + + + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for IPv4 sockets" >&5 +printf %s "checking for IPv4 sockets... " >&6; } +if test ${gl_cv_socket_ipv4+y} then : printf %s "(cached) " >&6 else - if test "$cross_compiling" = yes -then : - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - -#ifdef __GNU_LIBRARY__ - #include - #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \ - || defined __UCLIBC__ - Lucky user - #endif -#elif defined __CYGWIN__ - #include - #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7) - Lucky user - #endif -#else - Lucky user +#include +#ifdef HAVE_SYS_SOCKET_H +#include #endif - +#ifdef HAVE_NETINET_IN_H +#include +#endif +#ifdef HAVE_WINSOCK2_H +#include +#endif +int +main (void) +{ +int x = AF_INET; struct in_addr y; struct sockaddr_in z; + if (&x && &y && &z) return 0; + ; + return 0; +} _ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "Lucky user" >/dev/null 2>&1 +if ac_fn_c_try_compile "$LINENO" then : - gl_cv_func_strstr_works_always="guessing yes" + gl_cv_socket_ipv4=yes else - gl_cv_func_strstr_works_always="guessing no" + gl_cv_socket_ipv4=no fi -rm -rf conftest* +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_socket_ipv4" >&5 +printf "%s\n" "$gl_cv_socket_ipv4" >&6; } + if test $gl_cv_socket_ipv4 = yes; then +printf "%s\n" "#define HAVE_IPV4 1" >>confdefs.h + + fi + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for IPv6 sockets" >&5 +printf %s "checking for IPv6 sockets... " >&6; } +if test ${gl_cv_socket_ipv6+y} +then : + printf %s "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ +#include +#ifdef HAVE_SYS_SOCKET_H +#include +#endif +#ifdef HAVE_NETINET_IN_H +#include +#endif +#ifdef HAVE_WINSOCK2_H +#include +#endif +#ifdef HAVE_WS2TCPIP_H +#include +#endif +int +main (void) +{ +int x = AF_INET6; struct in6_addr y; struct sockaddr_in6 z; + if (&x && &y && &z) return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + gl_cv_socket_ipv6=yes +else + gl_cv_socket_ipv6=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_socket_ipv6" >&5 +printf "%s\n" "$gl_cv_socket_ipv6" >&6; } + if test $gl_cv_socket_ipv6 = yes; then -#include /* for strstr */ -#define P "_EF_BF_BD" -#define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P -#define NEEDLE P P P P P +printf "%s\n" "#define HAVE_IPV6 1" >>confdefs.h + + fi + +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 +printf "%s\n" "#define off_t long int" >>confdefs.h + +fi + + + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5 +printf %s "checking for LC_MESSAGES... " >&6; } +if test ${gt_cv_val_LC_MESSAGES+y} +then : + printf %s "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include int main (void) { -return !!strstr (HAYSTACK, NEEDLE); - +return LC_MESSAGES ; return 0; } _ACEOF -if ac_fn_c_try_run "$LINENO" +if ac_fn_c_try_link "$LINENO" then : - gl_cv_func_strstr_works_always=yes + gt_cv_val_LC_MESSAGES=yes else - gl_cv_func_strstr_works_always=no + gt_cv_val_LC_MESSAGES=no fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_val_LC_MESSAGES" >&5 +printf "%s\n" "$gt_cv_val_LC_MESSAGES" >&6; } + if test $gt_cv_val_LC_MESSAGES = yes; then +printf "%s\n" "#define HAVE_LC_MESSAGES 1" >>confdefs.h -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strstr_works_always" >&5 -printf "%s\n" "$gl_cv_func_strstr_works_always" >&6; } - case "$gl_cv_func_strstr_works_always" in - *yes) ;; - *) - REPLACE_STRSTR=1 - ;; - esac fi @@ -17270,215 +19992,410 @@ - ac_fn_c_check_decl "$LINENO" "strtoimax" "ac_cv_have_decl_strtoimax" "$ac_includes_default" -if test "x$ac_cv_have_decl_strtoimax" = xyes + + + + + + if test $ac_cv_func_uselocale = yes; then + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether uselocale works" >&5 +printf %s "checking whether uselocale works... " >&6; } +if test ${gt_cv_func_uselocale_works+y} then : - ac_have_decl=1 + printf %s "(cached) " >&6 else - ac_have_decl=0 + if test "$cross_compiling" = yes +then : + # Guess no on AIX, yes otherwise. + case "$host_os" in + aix*) gt_cv_func_uselocale_works="guessing no" ;; + *) gt_cv_func_uselocale_works="guessing yes" ;; + esac + +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#if HAVE_XLOCALE_H +# include +#endif +int main () +{ + uselocale (NULL); + setlocale (LC_ALL, "en_US.UTF-8"); + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO" +then : + gt_cv_func_uselocale_works=yes +else + gt_cv_func_uselocale_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 -printf "%s\n" "#define HAVE_DECL_STRTOIMAX $ac_have_decl" >>confdefs.h +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_uselocale_works" >&5 +printf "%s\n" "$gt_cv_func_uselocale_works" >&6; } + else + gt_cv_func_uselocale_works=no + fi + case "$gt_cv_func_uselocale_works" in + *yes) +printf "%s\n" "#define HAVE_WORKING_USELOCALE 1" >>confdefs.h + ;; + esac + case "$gt_cv_func_uselocale_works" in + *yes) + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for fake locale system (OpenBSD)" >&5 +printf %s "checking for fake locale system (OpenBSD)... " >&6; } +if test ${gt_cv_locale_fake+y} +then : + printf %s "(cached) " >&6 +else + if test "$cross_compiling" = yes +then : + case "$host_os" in + openbsd*) gt_cv_locale_fake="guessing yes" ;; + *) gt_cv_locale_fake="guessing no" ;; + esac +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ - ac_fn_c_check_decl "$LINENO" "strtoumax" "ac_cv_have_decl_strtoumax" "$ac_includes_default" -if test "x$ac_cv_have_decl_strtoumax" = xyes +#include +#if HAVE_XLOCALE_H +# include +#endif +int main () +{ + locale_t loc1, loc2; + if (setlocale (LC_ALL, "de_DE.UTF-8") == NULL) return 1; + if (setlocale (LC_ALL, "fr_FR.UTF-8") == NULL) return 1; + loc1 = newlocale (LC_ALL_MASK, "de_DE.UTF-8", (locale_t)0); + loc2 = newlocale (LC_ALL_MASK, "fr_FR.UTF-8", (locale_t)0); + return !(loc1 == loc2); +} +_ACEOF +if ac_fn_c_try_run "$LINENO" then : - ac_have_decl=1 + gt_cv_locale_fake=yes else - ac_have_decl=0 + gt_cv_locale_fake=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext fi -printf "%s\n" "#define HAVE_DECL_STRTOUMAX $ac_have_decl" >>confdefs.h +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fake" >&5 +printf "%s\n" "$gt_cv_locale_fake" >&6; } + ;; + *) gt_cv_locale_fake=no ;; + esac + case "$gt_cv_locale_fake" in + *yes) +printf "%s\n" "#define HAVE_FAKE_LOCALES 1" >>confdefs.h - 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; + ;; + esac - : ${GNULIB_GETTIMEOFDAY=0}; - REPLACE_GMTIME=0; - REPLACE_LOCALTIME=0; + case "$gt_cv_func_uselocale_works" in + *yes) + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Solaris 11.4 locale system" >&5 +printf %s "checking for Solaris 11.4 locale system... " >&6; } +if test ${gt_cv_locale_solaris114+y} +then : + printf %s "(cached) " >&6 +else + case "$host_os" in + solaris*) + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + #include + struct _LC_locale_t *x; + locale_t y; +int +main (void) +{ +*y = x; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + gt_cv_locale_solaris114=yes +else + gt_cv_locale_solaris114=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ;; + *) gt_cv_locale_solaris114=no ;; + esac +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_solaris114" >&5 +printf "%s\n" "$gt_cv_locale_solaris114" >&6; } + ;; + *) gt_cv_locale_solaris114=no ;; + esac + if test $gt_cv_locale_solaris114 = yes; then +printf "%s\n" "#define HAVE_SOLARIS114_LOCALES 1" >>confdefs.h + fi + case "$gt_cv_func_uselocale_works" in + *yes) + ac_fn_c_check_func "$LINENO" "getlocalename_l" "ac_cv_func_getlocalename_l" +if test "x$ac_cv_func_getlocalename_l" = xyes +then : + printf "%s\n" "#define HAVE_GETLOCALENAME_L 1" >>confdefs.h +fi - : + ;; + esac + gt_nameless_locales=no + if false; then + gt_nameless_locales=yes +printf "%s\n" "#define HAVE_NAMELESS_LOCALES 1" >>confdefs.h + fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct timespec in " >&5 -printf %s "checking for struct timespec in ... " >&6; } -if test ${gl_cv_sys_struct_timespec_in_time_h+y} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for CFPreferencesCopyAppValue" >&5 +printf %s "checking for CFPreferencesCopyAppValue... " >&6; } +if test ${gt_cv_func_CFPreferencesCopyAppValue+y} then : printf %s "(cached) " >&6 else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + gt_save_LIBS="$LIBS" + LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include - +#include int main (void) { -static struct timespec x; x.tv_sec = x.tv_nsec; +CFPreferencesCopyAppValue(NULL, NULL) ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" +if ac_fn_c_try_link "$LINENO" then : - gl_cv_sys_struct_timespec_in_time_h=yes + gt_cv_func_CFPreferencesCopyAppValue=yes else - gl_cv_sys_struct_timespec_in_time_h=no + gt_cv_func_CFPreferencesCopyAppValue=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LIBS="$gt_save_LIBS" fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_time_h" >&5 -printf "%s\n" "$gl_cv_sys_struct_timespec_in_time_h" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFPreferencesCopyAppValue" >&5 +printf "%s\n" "$gt_cv_func_CFPreferencesCopyAppValue" >&6; } + if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then - TIME_H_DEFINES_STRUCT_TIMESPEC=0 - SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0 - PTHREAD_H_DEFINES_STRUCT_TIMESPEC=0 - UNISTD_H_DEFINES_STRUCT_TIMESPEC=0 - if test $gl_cv_sys_struct_timespec_in_time_h = yes; then - TIME_H_DEFINES_STRUCT_TIMESPEC=1 - else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct timespec in " >&5 -printf %s "checking for struct timespec in ... " >&6; } -if test ${gl_cv_sys_struct_timespec_in_sys_time_h+y} +printf "%s\n" "#define HAVE_CFPREFERENCESCOPYAPPVALUE 1" >>confdefs.h + + fi + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for CFLocaleCopyCurrent" >&5 +printf %s "checking for CFLocaleCopyCurrent... " >&6; } +if test ${gt_cv_func_CFLocaleCopyCurrent+y} then : printf %s "(cached) " >&6 else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + gt_save_LIBS="$LIBS" + LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include - +#include int main (void) { -static struct timespec x; x.tv_sec = x.tv_nsec; +CFLocaleCopyCurrent(); ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" +if ac_fn_c_try_link "$LINENO" then : - gl_cv_sys_struct_timespec_in_sys_time_h=yes + gt_cv_func_CFLocaleCopyCurrent=yes else - gl_cv_sys_struct_timespec_in_sys_time_h=no + gt_cv_func_CFLocaleCopyCurrent=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LIBS="$gt_save_LIBS" fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_sys_time_h" >&5 -printf "%s\n" "$gl_cv_sys_struct_timespec_in_sys_time_h" >&6; } - if test $gl_cv_sys_struct_timespec_in_sys_time_h = yes; then - SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=1 - else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct timespec in " >&5 -printf %s "checking for struct timespec in ... " >&6; } -if test ${gl_cv_sys_struct_timespec_in_pthread_h+y} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFLocaleCopyCurrent" >&5 +printf "%s\n" "$gt_cv_func_CFLocaleCopyCurrent" >&6; } + if test $gt_cv_func_CFLocaleCopyCurrent = yes; then + +printf "%s\n" "#define HAVE_CFLOCALECOPYCURRENT 1" >>confdefs.h + + fi + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for CFLocaleCopyPreferredLanguages" >&5 +printf %s "checking for CFLocaleCopyPreferredLanguages... " >&6; } +if test ${gt_cv_func_CFLocaleCopyPreferredLanguages+y} then : printf %s "(cached) " >&6 else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + gt_save_LIBS="$LIBS" + LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include - +#include int main (void) { -static struct timespec x; x.tv_sec = x.tv_nsec; +CFLocaleCopyPreferredLanguages(); ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" +if ac_fn_c_try_link "$LINENO" then : - gl_cv_sys_struct_timespec_in_pthread_h=yes + gt_cv_func_CFLocaleCopyPreferredLanguages=yes else - gl_cv_sys_struct_timespec_in_pthread_h=no + gt_cv_func_CFLocaleCopyPreferredLanguages=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LIBS="$gt_save_LIBS" fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_pthread_h" >&5 -printf "%s\n" "$gl_cv_sys_struct_timespec_in_pthread_h" >&6; } - if test $gl_cv_sys_struct_timespec_in_pthread_h = yes; then - PTHREAD_H_DEFINES_STRUCT_TIMESPEC=1 - else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct timespec in " >&5 -printf %s "checking for struct timespec in ... " >&6; } -if test ${gl_cv_sys_struct_timespec_in_unistd_h+y} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFLocaleCopyPreferredLanguages" >&5 +printf "%s\n" "$gt_cv_func_CFLocaleCopyPreferredLanguages" >&6; } + if test $gt_cv_func_CFLocaleCopyPreferredLanguages = yes; then + +printf "%s\n" "#define HAVE_CFLOCALECOPYPREFERREDLANGUAGES 1" >>confdefs.h + + fi + INTL_MACOSX_LIBS= + if test $gt_cv_func_CFPreferencesCopyAppValue = yes \ + || test $gt_cv_func_CFLocaleCopyCurrent = yes \ + || test $gt_cv_func_CFLocaleCopyPreferredLanguages = yes; then + INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation" + fi + + + + + + GNULIB_PSELECT=0; + GNULIB_SELECT=0; + HAVE_PSELECT=1; + REPLACE_PSELECT=0; + REPLACE_SELECT=0; + + + + + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether is self-contained" >&5 +printf %s "checking whether is self-contained... " >&6; } +if test ${gl_cv_header_sys_select_h_selfcontained+y} then : printf %s "(cached) " >&6 else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include int main (void) { -static struct timespec x; x.tv_sec = x.tv_nsec; +struct timeval b; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : - gl_cv_sys_struct_timespec_in_unistd_h=yes + gl_cv_header_sys_select_h_selfcontained=yes else - gl_cv_sys_struct_timespec_in_unistd_h=no + gl_cv_header_sys_select_h_selfcontained=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_unistd_h" >&5 -printf "%s\n" "$gl_cv_sys_struct_timespec_in_unistd_h" >&6; } - if test $gl_cv_sys_struct_timespec_in_unistd_h = yes; then - UNISTD_H_DEFINES_STRUCT_TIMESPEC=1 - fi - fi - fi - fi + if test $gl_cv_header_sys_select_h_selfcontained = yes; then + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main (void) +{ +int memset; int bzero; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main (void) +{ + #undef memset + #define memset nonexistent_memset + extern + #ifdef __cplusplus + "C" + #endif + void *memset (void *, int, unsigned long); + #undef bzero + #define bzero nonexistent_bzero + extern + #ifdef __cplusplus + "C" + #endif + void bzero (void *, unsigned long); + fd_set fds; + FD_ZERO (&fds); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : +else + gl_cv_header_sys_select_h_selfcontained=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_ext + fi +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_select_h_selfcontained" >&5 +printf "%s\n" "$gl_cv_header_sys_select_h_selfcontained" >&6; } @@ -17489,20 +20406,23 @@ if test $gl_cv_have_include_next = yes; then - gl_cv_next_time_h='<'time.h'>' + gl_cv_next_sys_select_h='<'sys/select.h'>' else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 -printf %s "checking absolute name of ... " >&6; } -if test ${gl_cv_next_time_h+y} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 +printf %s "checking absolute name of ... " >&6; } +if test ${gl_cv_next_sys_select_h+y} then : printf %s "(cached) " >&6 else + if test $ac_cv_header_sys_select_h = yes; then + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include +#include _ACEOF case "$host_os" in aix*) gl_absname_cpp="$ac_cpp -C" ;; @@ -17518,7 +20438,7 @@ ;; esac gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' - gl_header_literal_regex=`echo 'time.h' \ + gl_header_literal_regex=`echo 'sys/select.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/ @@ -17527,455 +20447,455 @@ q }' - gl_cv_absolute_time_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | + gl_cv_absolute_sys_select_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | sed -n "$gl_absolute_header_sed"` - gl_header=$gl_cv_absolute_time_h - gl_cv_next_time_h='"'$gl_header'"' + gl_header=$gl_cv_absolute_sys_select_h + gl_cv_next_sys_select_h='"'$gl_header'"' + else + gl_cv_next_sys_select_h='<'sys/select.h'>' + fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_time_h" >&5 -printf "%s\n" "$gl_cv_next_time_h" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_select_h" >&5 +printf "%s\n" "$gl_cv_next_sys_select_h" >&6; } fi - NEXT_TIME_H=$gl_cv_next_time_h + NEXT_SYS_SELECT_H=$gl_cv_next_sys_select_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='<'time.h'>' + gl_next_as_first_directive='<'sys/select.h'>' else # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' - gl_next_as_first_directive=$gl_cv_next_time_h + gl_next_as_first_directive=$gl_cv_next_sys_select_h fi - NEXT_AS_FIRST_DIRECTIVE_TIME_H=$gl_next_as_first_directive - - - - - + NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H=$gl_next_as_first_directive - - - - - - - - -gl_libunistring_sed_extract_major='/^[0-9]/{s/^\([0-9]*\).*/\1/p;q;} -i\ -0 -q -' -gl_libunistring_sed_extract_minor='/^[0-9][0-9]*[.][0-9]/{s/^[0-9]*[.]\([0-9]*\).*/\1/p;q;} -i\ -0 -q -' -gl_libunistring_sed_extract_subminor='/^[0-9][0-9]*[.][0-9][0-9]*[.][0-9]/{s/^[0-9]*[.][0-9]*[.]\([0-9]*\).*/\1/p;q;} -i\ -0 -q -' - - - if test "$HAVE_LIBUNISTRING" = yes; then - LIBUNISTRING_VERSION_MAJOR=`echo "$LIBUNISTRING_VERSION" | sed -n -e "$gl_libunistring_sed_extract_major"` - LIBUNISTRING_VERSION_MINOR=`echo "$LIBUNISTRING_VERSION" | sed -n -e "$gl_libunistring_sed_extract_minor"` - LIBUNISTRING_VERSION_SUBMINOR=`echo "$LIBUNISTRING_VERSION" | sed -n -e "$gl_libunistring_sed_extract_subminor"` + if test $ac_cv_header_sys_select_h = yes; then + HAVE_SYS_SELECT_H=1 + else + HAVE_SYS_SELECT_H=0 fi - 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 - ac_have_decl=0 -fi - -printf "%s\n" "#define HAVE_DECL_CLEARERR_UNLOCKED $ac_have_decl" >>confdefs.h - - - - 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 - ac_have_decl=0 -fi - -printf "%s\n" "#define HAVE_DECL_FEOF_UNLOCKED $ac_have_decl" >>confdefs.h - 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 + if test $ac_cv_header_sys_socket_h != yes; then + ac_fn_c_check_header_compile "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default" +if test "x$ac_cv_header_winsock2_h" = xyes then : - ac_have_decl=1 -else - ac_have_decl=0 -fi - -printf "%s\n" "#define HAVE_DECL_FERROR_UNLOCKED $ac_have_decl" >>confdefs.h - - + printf "%s\n" "#define HAVE_WINSOCK2_H 1" >>confdefs.h - 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 - ac_have_decl=0 fi -printf "%s\n" "#define HAVE_DECL_FFLUSH_UNLOCKED $ac_have_decl" >>confdefs.h - - - - 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 - ac_have_decl=0 -fi + fi + if test "$ac_cv_header_winsock2_h" = yes; then + HAVE_WINSOCK2_H=1 + UNISTD_H_HAVE_WINSOCK2_H=1 + SYS_IOCTL_H_HAVE_WINSOCK2_H=1 + else + HAVE_WINSOCK2_H=0 + fi -printf "%s\n" "#define HAVE_DECL_FGETS_UNLOCKED $ac_have_decl" >>confdefs.h - 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 - ac_have_decl=0 -fi -printf "%s\n" "#define HAVE_DECL_FPUTC_UNLOCKED $ac_have_decl" >>confdefs.h - 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 - ac_have_decl=0 -fi -printf "%s\n" "#define HAVE_DECL_FPUTS_UNLOCKED $ac_have_decl" >>confdefs.h - 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 + if test $ac_cv_header_sys_socket_h != yes; then + ac_fn_c_check_header_compile "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default" +if test "x$ac_cv_header_winsock2_h" = xyes then : - ac_have_decl=1 -else - ac_have_decl=0 -fi - -printf "%s\n" "#define HAVE_DECL_FREAD_UNLOCKED $ac_have_decl" >>confdefs.h - - + printf "%s\n" "#define HAVE_WINSOCK2_H 1" >>confdefs.h - 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 - ac_have_decl=0 fi -printf "%s\n" "#define HAVE_DECL_FWRITE_UNLOCKED $ac_have_decl" >>confdefs.h - - + fi + if test "$ac_cv_header_winsock2_h" = yes; then + HAVE_WINSOCK2_H=1 + UNISTD_H_HAVE_WINSOCK2_H=1 + SYS_IOCTL_H_HAVE_WINSOCK2_H=1 + else + HAVE_WINSOCK2_H=0 + fi - 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 + LIBSOCKET= + if test $HAVE_WINSOCK2_H = 1; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we need to call WSAStartup in winsock2.h and -lws2_32" >&5 +printf %s "checking if we need to call WSAStartup in winsock2.h and -lws2_32... " >&6; } +if test ${gl_cv_func_wsastartup+y} then : - ac_have_decl=1 + printf %s "(cached) " >&6 else - ac_have_decl=0 -fi - -printf "%s\n" "#define HAVE_DECL_GETCHAR_UNLOCKED $ac_have_decl" >>confdefs.h + gl_save_LIBS="$LIBS" + LIBS="$LIBS -lws2_32" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef HAVE_WINSOCK2_H +# include +#endif +int +main (void) +{ - 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 + WORD wVersionRequested = MAKEWORD(1, 1); + WSADATA wsaData; + int err = WSAStartup(wVersionRequested, &wsaData); + WSACleanup (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" then : - ac_have_decl=1 + gl_cv_func_wsastartup=yes else - ac_have_decl=0 + gl_cv_func_wsastartup=no fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LIBS="$gl_save_LIBS" -printf "%s\n" "#define HAVE_DECL_PUTC_UNLOCKED $ac_have_decl" >>confdefs.h - - - - 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 - ac_have_decl=0 fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wsastartup" >&5 +printf "%s\n" "$gl_cv_func_wsastartup" >&6; } + if test "$gl_cv_func_wsastartup" = "yes"; then -printf "%s\n" "#define HAVE_DECL_PUTCHAR_UNLOCKED $ac_have_decl" >>confdefs.h - - - - - - - - - - : - - +printf "%s\n" "#define WINDOWS_SOCKETS 1" >>confdefs.h - - - if test $ac_cv_header_features_h = yes; then - HAVE_FEATURES_H=1 + LIBSOCKET='-lws2_32' + fi else - HAVE_FEATURES_H=0 - fi - - - - - - - - - - - - - - - - - - - - - - - : - - - - - - - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if environ is properly declared" >&5 -printf %s "checking if environ is properly declared... " >&6; } - if test ${gt_cv_var_environ_declaration+y} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing setsockopt" >&5 +printf %s "checking for library containing setsockopt... " >&6; } +if test ${gl_cv_lib_socket+y} then : printf %s "(cached) " >&6 else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + gl_cv_lib_socket= + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#if HAVE_UNISTD_H - #include - #endif - /* mingw, BeOS, Haiku declare environ in , not in . */ - #include - - extern struct { int foo; } environ; +extern +#ifdef __cplusplus +"C" +#endif +char setsockopt(); int main (void) { -environ.foo = 1; +setsockopt(); ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" +if ac_fn_c_try_link "$LINENO" then : - gt_cv_var_environ_declaration=no + else - gt_cv_var_environ_declaration=yes + gl_save_LIBS="$LIBS" + LIBS="$gl_save_LIBS -lsocket" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +extern +#ifdef __cplusplus +"C" +#endif +char setsockopt(); +int +main (void) +{ +setsockopt(); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + gl_cv_lib_socket="-lsocket" fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + if test -z "$gl_cv_lib_socket"; then + LIBS="$gl_save_LIBS -lnetwork" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +extern +#ifdef __cplusplus +"C" +#endif +char setsockopt(); +int +main (void) +{ +setsockopt(); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + gl_cv_lib_socket="-lnetwork" fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + if test -z "$gl_cv_lib_socket"; then + LIBS="$gl_save_LIBS -lnet" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +extern +#ifdef __cplusplus +"C" +#endif +char setsockopt(); +int +main (void) +{ +setsockopt(); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + gl_cv_lib_socket="-lnet" +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + fi + fi + LIBS="$gl_save_LIBS" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_var_environ_declaration" >&5 -printf "%s\n" "$gt_cv_var_environ_declaration" >&6; } - if test $gt_cv_var_environ_declaration = yes; then - -printf "%s\n" "#define HAVE_ENVIRON_DECL 1" >>confdefs.h +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + if test -z "$gl_cv_lib_socket"; then + gl_cv_lib_socket="none needed" + fi +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_lib_socket" >&5 +printf "%s\n" "$gl_cv_lib_socket" >&6; } + if test "$gl_cv_lib_socket" != "none needed"; then + LIBSOCKET="$gl_cv_lib_socket" + fi fi - if test $gt_cv_var_environ_declaration != yes; then - HAVE_DECL_ENVIRON=0 - fi -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 -printf "%s\n" "#define off_t long int" >>confdefs.h -fi + : + if test "$ac_cv_header_winsock2_h" = yes; then + REPLACE_SELECT=1 + else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5 -printf %s "checking for LC_MESSAGES... " >&6; } -if test ${gt_cv_val_LC_MESSAGES+y} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether select supports a 0 argument" >&5 +printf %s "checking whether select supports a 0 argument... " >&6; } +if test ${gl_cv_func_select_supports0+y} then : printf %s "(cached) " >&6 else + + if test "$cross_compiling" = yes +then : + + case "$host_os" in + # Guess no on Interix. + interix*) gl_cv_func_select_supports0="guessing no";; + # Guess yes otherwise. + *) gl_cv_func_select_supports0="guessing yes";; + esac + +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include -int -main (void) + +#include +#include +#if HAVE_SYS_SELECT_H +#include +#endif +int main () { -return LC_MESSAGES - ; - return 0; + struct timeval timeout; + timeout.tv_sec = 0; + timeout.tv_usec = 5; + return select (0, (fd_set *)0, (fd_set *)0, (fd_set *)0, &timeout) < 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" +if ac_fn_c_try_run "$LINENO" then : - gt_cv_val_LC_MESSAGES=yes + gl_cv_func_select_supports0=yes else - gt_cv_val_LC_MESSAGES=no + gl_cv_func_select_supports0=no fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_val_LC_MESSAGES" >&5 -printf "%s\n" "$gt_cv_val_LC_MESSAGES" >&6; } - if test $gt_cv_val_LC_MESSAGES = yes; then -printf "%s\n" "#define HAVE_LC_MESSAGES 1" >>confdefs.h - - fi +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_select_supports0" >&5 +printf "%s\n" "$gl_cv_func_select_supports0" >&6; } + case "$gl_cv_func_select_supports0" in + *yes) ;; + *) REPLACE_SELECT=1 ;; + esac - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for CFPreferencesCopyAppValue" >&5 -printf %s "checking for CFPreferencesCopyAppValue... " >&6; } -if test ${gt_cv_func_CFPreferencesCopyAppValue+y} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether select detects invalid fds" >&5 +printf %s "checking whether select detects invalid fds... " >&6; } +if test ${gl_cv_func_select_detects_ebadf+y} then : printf %s "(cached) " >&6 else - gt_save_LIBS="$LIBS" - LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + + if test "$cross_compiling" = yes +then : + + case "$host_os" in + # Guess yes on Linux systems. + linux-* | linux) gl_cv_func_select_detects_ebadf="guessing yes" ;; + # Guess yes on glibc systems. + *-gnu* | gnu*) gl_cv_func_select_detects_ebadf="guessing yes" ;; + # If we don't know, assume the worst. + *) gl_cv_func_select_detects_ebadf="guessing no" ;; + esac + +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include + +#include +#include +#if HAVE_SYS_SELECT_H +# include +#endif +#include +#include + int main (void) { -CFPreferencesCopyAppValue(NULL, NULL) + + fd_set set; + dup2(0, 16); + FD_ZERO(&set); + FD_SET(16, &set); + close(16); + struct timeval timeout; + timeout.tv_sec = 0; + timeout.tv_usec = 5; + return select (17, &set, NULL, NULL, &timeout) != -1 || errno != EBADF; + ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" +if ac_fn_c_try_run "$LINENO" then : - gt_cv_func_CFPreferencesCopyAppValue=yes + gl_cv_func_select_detects_ebadf=yes else - gt_cv_func_CFPreferencesCopyAppValue=no + gl_cv_func_select_detects_ebadf=no fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LIBS="$gt_save_LIBS" +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFPreferencesCopyAppValue" >&5 -printf "%s\n" "$gt_cv_func_CFPreferencesCopyAppValue" >&6; } - if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then -printf "%s\n" "#define HAVE_CFPREFERENCESCOPYAPPVALUE 1" >>confdefs.h +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_select_detects_ebadf" >&5 +printf "%s\n" "$gl_cv_func_select_detects_ebadf" >&6; } + case $gl_cv_func_select_detects_ebadf in + *yes) ;; + *) REPLACE_SELECT=1 ;; + esac fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for CFLocaleCopyCurrent" >&5 -printf %s "checking for CFLocaleCopyCurrent... " >&6; } -if test ${gt_cv_func_CFLocaleCopyCurrent+y} -then : - printf %s "(cached) " >&6 -else - gt_save_LIBS="$LIBS" - LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + + LIB_SELECT="$LIBSOCKET" + if test $REPLACE_SELECT = 1; then + case "$host_os" in + mingw*) + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include + +#define WIN32_LEAN_AND_MEAN +#include int -main (void) +main () { -CFLocaleCopyCurrent(); - ; + MsgWaitForMultipleObjects (0, NULL, 0, 0, 0); return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : - gt_cv_func_CFLocaleCopyCurrent=yes + else - gt_cv_func_CFLocaleCopyCurrent=no + LIB_SELECT="$LIB_SELECT -luser32" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - LIBS="$gt_save_LIBS" -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFLocaleCopyCurrent" >&5 -printf "%s\n" "$gt_cv_func_CFLocaleCopyCurrent" >&6; } - if test $gt_cv_func_CFLocaleCopyCurrent = yes; then - -printf "%s\n" "#define HAVE_CFLOCALECOPYCURRENT 1" >>confdefs.h - - 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" + ;; + esac fi - 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 - ac_have_decl=0 -fi - -printf "%s\n" "#define HAVE_DECL_SETENV $ac_have_decl" >>confdefs.h + if test $ac_cv_have_decl_strerror_r = no; then + HAVE_DECL_STRERROR_R=0 + fi + if test $ac_cv_func_strerror_r = yes; then + if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then + if test $gl_cv_func_strerror_r_posix_signature = yes; then + case "$gl_cv_func_strerror_r_works" in + *no) REPLACE_STRERROR_R=1 ;; + esac + else + REPLACE_STRERROR_R=1 + fi + else + REPLACE_STRERROR_R=1 + fi + fi +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 + ac_have_decl=0 +fi - : +printf "%s\n" "#define HAVE_DECL_SETENV $ac_have_decl" >>confdefs.h @@ -17985,18 +20905,6 @@ HAVE_DECL_SETENV=0 fi - : - - - - - - - - - - : - @@ -18024,15 +20932,6 @@ - : - - - - - - - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether snprintf returns a byte count as in C99" >&5 printf %s "checking whether snprintf returns a byte count as in C99... " >&6; } @@ -18043,10 +20942,9 @@ if test "$cross_compiling" = yes then : - - case "$host_os" in + case "$host_os" in # Guess yes on glibc systems. - *-gnu*) gl_cv_func_snprintf_retval_c99="guessing yes";; + *-gnu* | gnu*) gl_cv_func_snprintf_retval_c99="guessing yes";; # Guess yes on FreeBSD >= 5. freebsd[1-4].*) gl_cv_func_snprintf_retval_c99="guessing no";; freebsd* | kfreebsd*) gl_cv_func_snprintf_retval_c99="guessing yes";; @@ -18069,6 +20967,25 @@ netbsd*) gl_cv_func_snprintf_retval_c99="guessing yes";; # Guess yes on BeOS. beos*) gl_cv_func_snprintf_retval_c99="guessing yes";; + # Guess yes on MSVC, no on mingw. + mingw*) cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#ifdef _MSC_VER + Known +#endif + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "Known" >/dev/null 2>&1 +then : + gl_cv_func_snprintf_retval_c99="guessing yes" +else + gl_cv_func_snprintf_retval_c99="guessing no" +fi +rm -rf conftest* + + ;; # If we don't know, assume the worst. *) gl_cv_func_snprintf_retval_c99="guessing no";; esac @@ -18121,8 +21038,7 @@ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_snprintf_retval_c99" >&5 printf "%s\n" "$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 @@ -18134,7 +21050,11 @@ - ac_fn_c_check_decl "$LINENO" "unsetenv" "ac_cv_have_decl_unsetenv" "$ac_includes_default" + + + + +ac_fn_c_check_decl "$LINENO" "unsetenv" "ac_cv_have_decl_unsetenv" "$ac_includes_default" if test "x$ac_cv_have_decl_unsetenv" = xyes then : ac_have_decl=1 @@ -18146,11 +21066,6 @@ - - - - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for inttypes.h" >&5 printf %s "checking for inttypes.h... " >&6; } if test ${gl_cv_header_inttypes_h+y} @@ -18813,12 +21728,6 @@ - : - - - - - if test $ac_cv_func_btowc = no; then HAVE_BTOWC=0 else @@ -18839,6 +21748,8 @@ case "$host_os" in # Guess no on Cygwin. cygwin*) gl_cv_func_btowc_nul="guessing no" ;; + # Guess yes on native Windows. + mingw*) gl_cv_func_btowc_nul="guessing yes" ;; # Guess yes otherwise. *) gl_cv_func_btowc_nul="guessing yes" ;; esac @@ -18886,10 +21797,12 @@ else case "$host_os" in - # Guess no on IRIX. - irix*) gl_cv_func_btowc_eof="guessing no" ;; - # Guess yes otherwise. - *) gl_cv_func_btowc_eof="guessing yes" ;; + # Guess no on IRIX. + irix*) gl_cv_func_btowc_eof="guessing no" ;; + # Guess yes on native Windows. + mingw*) gl_cv_func_btowc_eof="guessing yes" ;; + # Guess yes otherwise. + *) gl_cv_func_btowc_eof="guessing yes" ;; esac if test $LOCALE_FR != none; then if test "$cross_compiling" = yes @@ -19034,6 +21947,48 @@ + # for STACK_DIRECTION + + + + ac_fn_c_check_decl "$LINENO" "sigaltstack" "ac_cv_have_decl_sigaltstack" "#include +" +if test "x$ac_cv_have_decl_sigaltstack" = xyes +then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +printf "%s\n" "#define HAVE_DECL_SIGALTSTACK $ac_have_decl" >>confdefs.h + + + + + ac_fn_c_check_type "$LINENO" "stack_t" "ac_cv_type_stack_t" "#include +" +if test "x$ac_cv_type_stack_t" = xyes +then : + +printf "%s\n" "#define HAVE_STACK_T 1" >>confdefs.h + + +fi + + + if test "$gl_cv_lib_sigsegv" = yes \ + && test $"ac_cv_sys_xsi_stack_overflow_heuristic" != yes ; then + LIBCSTACK=$LIBSIGSEGV + + LTLIBCSTACK=$LTLIBSIGSEGV + + fi + + + + + + GNULIB_CHDIR=1 @@ -19071,7 +22026,7 @@ # undef PATH_MAX # define PATH_MAX 1024 #endif -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +#if defined _WIN32 && ! defined __CYGWIN__ # undef PATH_MAX # define PATH_MAX 260 #endif @@ -19124,12 +22079,6 @@ - : - - - - - if test $ac_cv_header_sys_socket_h != yes; then ac_fn_c_check_header_compile "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default" if test "x$ac_cv_header_winsock2_h" = xyes @@ -19157,12 +22106,6 @@ - : - - - - - if test $ac_cv_func_fchdir = no; then HAVE_FCHDIR=0 fi @@ -19225,12 +22168,6 @@ - : - - - - - if test $ac_cv_func_fchdir = no; then HAVE_FCHDIR=0 fi @@ -19277,38 +22214,10 @@ : - if test "x$datarootdir" = x; then - datarootdir='${datadir}' - - fi - if test "x$docdir" = x; then - docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' - - fi - if test "x$htmldir" = x; then - htmldir='${docdir}' - - fi - if test "x$dvidir" = x; then - dvidir='${docdir}' - - fi - if test "x$pdfdir" = x; then - pdfdir='${docdir}' - - fi - if test "x$psdir" = x; then - psdir='${docdir}' - - fi if test "x$lispdir" = x; then lispdir='${datarootdir}/emacs/site-lisp' fi - if test "x$localedir" = x; then - localedir='${datarootdir}/locale' - - fi if test "x$runstatedir" = x; then runstatedir='${localstatedir}/run' @@ -19394,47 +22303,7 @@ - for gl_func in isblank; do - as_gl_Symbol=`printf "%s\n" "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5 -printf %s "checking whether $gl_func is declared without a macro... " >&6; } -if eval test \${$as_gl_Symbol+y} -then : - printf %s "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -int -main (void) -{ -#undef $gl_func - (void) $gl_func; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - eval "$as_gl_Symbol=yes" -else - eval "$as_gl_Symbol=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -eval ac_res=\$$as_gl_Symbol - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } - if eval test \"x\$"$as_gl_Symbol"\" = x"yes" -then : - cat >>confdefs.h <<_ACEOF -#define `printf "%s\n" "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 -_ACEOF - eval ac_cv_have_decl_$gl_func=yes -fi - done : @@ -19449,6 +22318,8 @@ case "$host_os" in # Guess yes on glibc systems with Linux kernel. linux*-gnu*) gl_cv_struct_dirent_d_ino="guessing yes" ;; + # Guess no on native Windows. + mingw*) gl_cv_struct_dirent_d_ino="guessing no" ;; # If we don't know, assume the worst. *) gl_cv_struct_dirent_d_ino="guessing no" ;; esac @@ -19553,12 +22424,6 @@ - : - - - - - @@ -19640,63 +22505,9 @@ - for gl_func in alphasort closedir dirfd fdopendir opendir readdir rewinddir scandir; do - as_gl_Symbol=`printf "%s\n" "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5 -printf %s "checking whether $gl_func is declared without a macro... " >&6; } -if eval test \${$as_gl_Symbol+y} -then : - printf %s "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -int -main (void) -{ -#undef $gl_func - (void) $gl_func; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - eval "$as_gl_Symbol=yes" -else - eval "$as_gl_Symbol=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -eval ac_res=\$$as_gl_Symbol - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } - if eval test \"x\$"$as_gl_Symbol"\" = x"yes" -then : - cat >>confdefs.h <<_ACEOF -#define `printf "%s\n" "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 -_ACEOF - - eval ac_cv_have_decl_$gl_func=yes -fi - done - - - - - : - - - - - -printf "%s\n" "#define GNULIB_DIRENT_SAFER 1" >>confdefs.h - - @@ -19897,12 +22708,6 @@ - : - - - - - if test $ac_cv_func_fchdir = no; then HAVE_FCHDIR=0 fi @@ -19919,7 +22724,12 @@ else if test "$cross_compiling" = yes then : - gl_cv_func_dup_works='guessing yes' + case "$host_os" in + # Guess no on native Windows. + mingw*) gl_cv_func_dup_works="guessing no" ;; + *) gl_cv_func_dup_works="guessing yes" ;; + esac + else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -20118,12 +22928,6 @@ - : - - - - - if test $ac_cv_func_fchdir = no; then HAVE_FCHDIR=0 fi @@ -20224,12 +23028,6 @@ - : - - - - - if test $ac_cv_have_decl_fchdir = no; then HAVE_DECL_FCHDIR=0 fi @@ -20259,10 +23057,14 @@ if test "$cross_compiling" = yes then : case "$host_os" in - # Guess yes on glibc systems. - *-gnu*) gl_cv_func_open_directory_works="guessing yes" ;; - # If we don't know, assume the worst. - *) gl_cv_func_open_directory_works="guessing no" ;; + # Guess yes on Linux systems. + linux-* | linux) gl_cv_func_open_directory_works="guessing yes" ;; + # Guess yes on glibc systems. + *-gnu* | gnu*) gl_cv_func_open_directory_works="guessing yes" ;; + # Guess no on native Windows. + mingw*) gl_cv_func_open_directory_works="guessing no" ;; + # If we don't know, assume the worst. + *) gl_cv_func_open_directory_works="guessing no" ;; esac else @@ -20321,22 +23123,10 @@ - : - - - - - if test $ac_cv_func_fcntl = no; then - : - - - - - if test $ac_cv_func_fcntl = no; then HAVE_FCNTL=0 else @@ -20422,12 +23212,6 @@ *) - : - - - - - if test $ac_cv_func_fcntl = no; then HAVE_FCNTL=0 else @@ -20498,12 +23282,6 @@ - : - - - - - if test $ac_cv_func_fcntl = no; then HAVE_FCNTL=0 else @@ -20516,12 +23294,6 @@ - : - - - - - if test $ac_cv_func_fchdir = no; then HAVE_FCHDIR=0 fi @@ -20530,12 +23302,6 @@ - : - - - - - if test $ac_cv_func_fcntl = no; then HAVE_FCNTL=0 else @@ -20653,47 +23419,7 @@ - for gl_func in fcntl openat; do - as_gl_Symbol=`printf "%s\n" "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5 -printf %s "checking whether $gl_func is declared without a macro... " >&6; } -if eval test \${$as_gl_Symbol+y} -then : - printf %s "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -int -main (void) -{ -#undef $gl_func - (void) $gl_func; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - eval "$as_gl_Symbol=yes" -else - eval "$as_gl_Symbol=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -eval ac_res=\$$as_gl_Symbol - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } - if eval test \"x\$"$as_gl_Symbol"\" = x"yes" -then : - cat >>confdefs.h <<_ACEOF -#define `printf "%s\n" "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 -_ACEOF - eval ac_cv_have_decl_$gl_func=yes -fi - done @@ -20706,6 +23432,11 @@ +printf "%s\n" "#define GNULIB_FD_SAFER_FLAG 1" >>confdefs.h + + + + @@ -20729,12 +23460,6 @@ fi - : - - - - - if test $ac_cv_func_fdopendir = no; then HAVE_FDOPENDIR=0 else @@ -20836,12 +23561,6 @@ - : - - - - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for flexible array member" >&5 @@ -20896,110 +23615,112 @@ - - FNMATCH_H= gl_fnmatch_required_lowercase=` echo $gl_fnmatch_required | LC_ALL=C tr '[A-Z]' '[a-z]' ` - gl_fnmatch_cache_var="gl_cv_func_fnmatch_${gl_fnmatch_required_lowercase}" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working $gl_fnmatch_required fnmatch" >&5 + + if test $ac_cv_func_fnmatch = no; then + HAVE_FNMATCH=0 + else + gl_fnmatch_cache_var="gl_cv_func_fnmatch_${gl_fnmatch_required_lowercase}" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working $gl_fnmatch_required fnmatch" >&5 printf %s "checking for working $gl_fnmatch_required fnmatch... " >&6; } if eval test \${$gl_fnmatch_cache_var+y} then : printf %s "(cached) " >&6 else - if test $gl_fnmatch_required = GNU; then - gl_fnmatch_gnu_start= - gl_fnmatch_gnu_end= - else - gl_fnmatch_gnu_start='#if 0' - gl_fnmatch_gnu_end='#endif' - fi - if test "$cross_compiling" = yes + if test $gl_fnmatch_required = GNU; then + gl_fnmatch_gnu_start= + gl_fnmatch_gnu_end= + else + gl_fnmatch_gnu_start='#if 0' + gl_fnmatch_gnu_end='#endif' + fi + if test "$cross_compiling" = yes then : eval "$gl_fnmatch_cache_var=\"guessing no\"" else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include - static int - y (char const *pattern, char const *string, int flags) - { - return fnmatch (pattern, string, flags) == 0; - } - static int - n (char const *pattern, char const *string, int flags) - { - return fnmatch (pattern, string, flags) == FNM_NOMATCH; - } + static int + y (char const *pattern, char const *string, int flags) + { + return fnmatch (pattern, string, flags) == 0; + } + static int + n (char const *pattern, char const *string, int flags) + { + return fnmatch (pattern, string, flags) == FNM_NOMATCH; + } int main (void) { char const *Apat = 'A' < '\\\\' ? "[A-\\\\\\\\]" : "[\\\\\\\\-A]"; - char const *apat = 'a' < '\\\\' ? "[a-\\\\\\\\]" : "[\\\\\\\\-a]"; - static char const A_1[] = { 'A' - 1, 0 }; - static char const A01[] = { 'A' + 1, 0 }; - static char const a_1[] = { 'a' - 1, 0 }; - static char const a01[] = { 'a' + 1, 0 }; - static char const bs_1[] = { '\\\\' - 1, 0 }; - static char const bs01[] = { '\\\\' + 1, 0 }; - int result = 0; - if (!n ("a*", "", 0)) - return 1; - if (!y ("a*", "abc", 0)) - return 1; - if (!y ("[/b", "[/b", 0)) /*"]]"*/ /* glibc Bugzilla bug 12378 */ - return 1; - if (!n ("d*/*1", "d/s/1", FNM_PATHNAME)) - return 2; - if (!y ("a\\\\bc", "abc", 0)) - return 3; - if (!n ("a\\\\bc", "abc", FNM_NOESCAPE)) - return 3; - if (!y ("*x", ".x", 0)) - return 4; - if (!n ("*x", ".x", FNM_PERIOD)) - return 4; - if (!y (Apat, "\\\\", 0)) - return 5; - if (!y (Apat, "A", 0)) - return 5; - if (!y (apat, "\\\\", 0)) - return 5; - if (!y (apat, "a", 0)) - return 5; - if (!(n (Apat, A_1, 0) == ('A' < '\\\\'))) - return 5; - if (!(n (apat, a_1, 0) == ('a' < '\\\\'))) - return 5; - if (!(y (Apat, A01, 0) == ('A' < '\\\\'))) - return 5; - if (!(y (apat, a01, 0) == ('a' < '\\\\'))) - return 5; - if (!(y (Apat, bs_1, 0) == ('A' < '\\\\'))) - return 5; - if (!(y (apat, bs_1, 0) == ('a' < '\\\\'))) - return 5; - if (!(n (Apat, bs01, 0) == ('A' < '\\\\'))) - return 5; - if (!(n (apat, bs01, 0) == ('a' < '\\\\'))) - return 5; - $gl_fnmatch_gnu_start - if (!y ("xxXX", "xXxX", FNM_CASEFOLD)) - result |= 8; - if (!y ("a++(x|yy)b", "a+xyyyyxb", FNM_EXTMATCH)) - result |= 16; - if (!n ("d*/*1", "d/s/1", FNM_FILE_NAME)) - result |= 32; - if (!y ("*", "x", FNM_FILE_NAME | FNM_LEADING_DIR)) - result |= 64; - if (!y ("x*", "x/y/z", FNM_FILE_NAME | FNM_LEADING_DIR)) - result |= 64; - if (!y ("*c*", "c/x", FNM_FILE_NAME | FNM_LEADING_DIR)) - result |= 64; - $gl_fnmatch_gnu_end - return result; + char const *apat = 'a' < '\\\\' ? "[a-\\\\\\\\]" : "[\\\\\\\\-a]"; + static char const A_1[] = { 'A' - 1, 0 }; + static char const A01[] = { 'A' + 1, 0 }; + static char const a_1[] = { 'a' - 1, 0 }; + static char const a01[] = { 'a' + 1, 0 }; + static char const bs_1[] = { '\\\\' - 1, 0 }; + static char const bs01[] = { '\\\\' + 1, 0 }; + int result = 0; + if (!n ("a*", "", 0)) + return 1; + if (!y ("a*", "abc", 0)) + return 1; + if (!y ("[/b", "[/b", 0)) /*"]]"*/ /* glibc Bugzilla bug 12378 */ + return 1; + if (!n ("d*/*1", "d/s/1", FNM_PATHNAME)) + return 2; + if (!y ("a\\\\bc", "abc", 0)) + return 3; + if (!n ("a\\\\bc", "abc", FNM_NOESCAPE)) + return 3; + if (!y ("*x", ".x", 0)) + return 4; + if (!n ("*x", ".x", FNM_PERIOD)) + return 4; + if (!y (Apat, "\\\\", 0)) + return 5; + if (!y (Apat, "A", 0)) + return 5; + if (!y (apat, "\\\\", 0)) + return 5; + if (!y (apat, "a", 0)) + return 5; + if (!(n (Apat, A_1, 0) == ('A' < '\\\\'))) + return 5; + if (!(n (apat, a_1, 0) == ('a' < '\\\\'))) + return 5; + if (!(y (Apat, A01, 0) == ('A' < '\\\\'))) + return 5; + if (!(y (apat, a01, 0) == ('a' < '\\\\'))) + return 5; + if (!(y (Apat, bs_1, 0) == ('A' < '\\\\'))) + return 5; + if (!(y (apat, bs_1, 0) == ('a' < '\\\\'))) + return 5; + if (!(n (Apat, bs01, 0) == ('A' < '\\\\'))) + return 5; + if (!(n (apat, bs01, 0) == ('a' < '\\\\'))) + return 5; + $gl_fnmatch_gnu_start + if (!y ("xxXX", "xXxX", FNM_CASEFOLD)) + result |= 8; + if (!y ("a++(x|yy)b", "a+xyyyyxb", FNM_EXTMATCH)) + result |= 16; + if (!n ("d*/*1", "d/s/1", FNM_FILE_NAME)) + result |= 32; + if (!y ("*", "x", FNM_FILE_NAME | FNM_LEADING_DIR)) + result |= 64; + if (!y ("x*", "x/y/z", FNM_FILE_NAME | FNM_LEADING_DIR)) + result |= 64; + if (!y ("*c*", "c/x", FNM_FILE_NAME | FNM_LEADING_DIR)) + result |= 64; + $gl_fnmatch_gnu_end + return result; ; return 0; @@ -21020,13 +23741,15 @@ eval ac_res=\$$gl_fnmatch_cache_var { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 printf "%s\n" "$ac_res" >&6; } - eval "gl_fnmatch_result=\"\$$gl_fnmatch_cache_var\"" - if test "$gl_fnmatch_result" = yes; then - rm -f "$gl_source_base/fnmatch.h" - else - FNMATCH_H=fnmatch.h + eval "gl_fnmatch_result=\"\$$gl_fnmatch_cache_var\"" + if test "$gl_fnmatch_result" != yes; then + REPLACE_FNMATCH=1 + fi fi + if test $HAVE_FNMATCH = 0 || test $REPLACE_FNMATCH = 1; then + + FNMATCH_H='fnmatch.h' if test -n "$FNMATCH_H"; then GL_GENERATE_FNMATCH_H_TRUE= GL_GENERATE_FNMATCH_H_FALSE='#' @@ -21036,20 +23759,19 @@ fi - if test -n "$FNMATCH_H"; then - + fi + if test $HAVE_FNMATCH = 0 || test $REPLACE_FNMATCH = 1; then - gl_LIBOBJS="$gl_LIBOBJS fnmatch.$ac_objext" + gl_LIBOBJS="$gl_LIBOBJS fnmatch.$ac_objext" -printf "%s\n" "#define fnmatch ${gl_fnmatch_required_lowercase}_fnmatch" >>confdefs.h ac_fn_c_check_decl "$LINENO" "isblank" "ac_cv_have_decl_isblank" "#include @@ -21064,45 +23786,22 @@ printf "%s\n" "#define HAVE_DECL_ISBLANK $ac_have_decl" >>confdefs.h - : - - - - - - - - - - - - - - - - - - - - - - + fi - : + GNULIB_FNMATCH=1 - fi +printf "%s\n" "#define GNULIB_TEST_FNMATCH 1" >>confdefs.h - : @@ -21175,8 +23874,8 @@ case "$host_os" in - mingw*) - REPLACE_FSTAT=1 + mingw* | solaris*) + REPLACE_FSTAT=1 ;; esac @@ -21184,12 +23883,6 @@ - : - - - - - if test $ac_cv_func_fchdir = no; then HAVE_FCHDIR=0 fi @@ -21215,6 +23908,8 @@ gl_LIBOBJS="$gl_LIBOBJS fstat.$ac_objext" + case "$host_os" in + mingw*) @@ -21225,6 +23920,8 @@ gl_LIBOBJS="$gl_LIBOBJS stat-w32.$ac_objext" + ;; + esac : @@ -21250,11 +23947,6 @@ - : - - - - if test $ac_cv_func_fstatat = no; then @@ -21304,15 +23996,20 @@ case $gl_cv_func_fstatat_zero_flag+$gl_cv_func_lstat_dereferences_slashed_symlink in *yes+*yes) ;; - *) REPLACE_FSTATAT=1 - case $gl_cv_func_fstatat_zero_flag in - *yes) + *) REPLACE_FSTATAT=1 ;; + esac + + case $host_os in + solaris*) + REPLACE_FSTATAT=1 ;; + esac + + case $REPLACE_FSTATAT,$gl_cv_func_fstatat_zero_flag in + 1,*yes) printf "%s\n" "#define HAVE_WORKING_FSTATAT_ZERO_FLAG 1" >>confdefs.h ;; - esac - ;; esac fi @@ -21339,27 +24036,23 @@ -printf "%s\n" "#define GNULIB_TEST_FSTATAT 1" >>confdefs.h - - - - +printf "%s\n" "#define GNULIB_TEST_FSTATAT 1" >>confdefs.h - : - case $ac_cv_func_openat+$gl_cv_func_lstat_dereferences_slashed_symlink in - yes+*yes) + case $ac_cv_func_openat+$gl_cv_func_lstat_dereferences_slashed_symlink+$gl_cv_macro_O_CLOEXEC in + yes+*yes+yes) ;; yes+*) + # Solaris 10 lacks O_CLOEXEC. # Solaris 9 has *at functions, but uniformly mishandles trailing # slash in all of them. REPLACE_OPENAT=1 @@ -21371,32 +24064,34 @@ - : - - - - - - - : - + if test "$ac_cv_func_fstatfs,$ac_cv_header_sys_vfs_h" = yes,yes; then + ac_fn_c_check_member "$LINENO" "struct statfs" "f_type" "ac_cv_member_struct_statfs_f_type" "$ac_includes_default + #include +" +if test "x$ac_cv_member_struct_statfs_f_type" = xyes +then : +printf "%s\n" "#define HAVE_STRUCT_STATFS_F_TYPE 1" >>confdefs.h +fi + if test "$ac_cv_member_struct_statfs_f_type" = yes; then + ac_fn_c_check_type "$LINENO" "__fsword_t" "ac_cv_type___fsword_t" "$ac_includes_default + #include - ac_fn_c_check_member "$LINENO" "struct statfs" "f_type" "ac_cv_member_struct_statfs_f_type" "$ac_includes_default - #include " -if test "x$ac_cv_member_struct_statfs_f_type" = xyes +if test "x$ac_cv_type___fsword_t" = xyes then : -printf "%s\n" "#define HAVE_STRUCT_STATFS_F_TYPE 1" >>confdefs.h +printf "%s\n" "#define HAVE___FSWORD_T 1" >>confdefs.h fi + fi + fi @@ -21452,50 +24147,39 @@ - : - - - - - - - : - - - - if test $ac_cv_func_getdtablesize = yes && test $ac_cv_have_decl_getdtablesize = yes; then - # Cygwin 1.7.25 automatically increases the RLIMIT_NOFILE soft limit - # up to an unchangeable hard limit; all other platforms correctly - # require setrlimit before getdtablesize() can report a larger value. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether getdtablesize works" >&5 printf %s "checking whether getdtablesize works... " >&6; } if test ${gl_cv_func_getdtablesize_works+y} then : printf %s "(cached) " >&6 else - if test "$cross_compiling" = yes + case "$host_os" in + vms*) gl_cv_func_getdtablesize_works="no (limitation)" ;; + *) + if test "$cross_compiling" = yes then : case "$host_os" in - cygwin*) # on cygwin 1.5.25, getdtablesize() automatically grows - gl_cv_func_getdtablesize_works="guessing no" ;; - *) gl_cv_func_getdtablesize_works="guessing yes" ;; - esac + cygwin*) # on cygwin 1.5.25, getdtablesize() automatically grows + gl_cv_func_getdtablesize_works="guessing no" ;; + *) gl_cv_func_getdtablesize_works="guessing yes" ;; + esac + else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - #include + #include int main (void) { int size = getdtablesize(); - if (dup2 (0, getdtablesize()) != -1) - return 1; - if (size != getdtablesize()) - return 2; + if (dup2 (0, getdtablesize()) != -1) + return 1; + if (size != getdtablesize()) + return 2; ; return 0; @@ -21511,12 +24195,14 @@ conftest.$ac_objext conftest.beam conftest.$ac_ext fi + ;; + esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getdtablesize_works" >&5 printf "%s\n" "$gl_cv_func_getdtablesize_works" >&6; } case "$gl_cv_func_getdtablesize_works" in - *yes) ;; + *yes | "no (limitation)") ;; *) REPLACE_GETDTABLESIZE=1 ;; esac else @@ -21568,12 +24254,6 @@ if test $REPLACE_GETOPT = 1; then - : - - - - - if test $ac_cv_header_sys_cdefs_h = yes; then HAVE_SYS_CDEFS_H=1 else @@ -21618,14 +24298,39 @@ - ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize" -if test "x$ac_cv_func_getpagesize" = xyes + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5 +printf %s "checking for getpagesize... " >&6; } +if test ${gl_cv_func_getpagesize+y} +then : + printf %s "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main (void) +{ +return getpagesize(); + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_link "$LINENO" then : - printf "%s\n" "#define HAVE_GETPAGESIZE 1" >>confdefs.h + gl_cv_func_getpagesize=yes +else + gl_cv_func_getpagesize=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getpagesize" >&5 +printf "%s\n" "$gl_cv_func_getpagesize" >&6; } - if test $ac_cv_func_getpagesize = no; then + if test $gl_cv_func_getpagesize = no; then HAVE_GETPAGESIZE=0 ac_fn_c_check_header_compile "$LINENO" "OS.h" "ac_cv_header_OS_h" "$ac_includes_default" if test "x$ac_cv_header_OS_h" = xyes @@ -21691,15 +24396,6 @@ - : - - - - - - - - ac_found=0 ac_fn_c_check_decl "$LINENO" "program_invocation_name" "ac_cv_have_decl_program_invocation_name" "#include @@ -21805,9 +24501,6 @@ : - : - - @@ -21827,12 +24520,6 @@ - : - - - - - @@ -21911,6 +24598,10 @@ + + + + if test "$am_cv_func_iconv" = yes; then @@ -22352,12 +25043,6 @@ - : - - - - - if test $ac_cv_func_isblank = no; then HAVE_ISBLANK=0 fi @@ -22389,12 +25074,6 @@ - : - - - - - ac_fn_c_check_decl "$LINENO" "iswblank" "ac_cv_have_decl_iswblank" " /* Tru64 with Desktop Toolkit C has a bug: must be included before . @@ -22504,12 +25183,6 @@ - : - - - - - @@ -22565,172 +25238,792 @@ fi -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_langinfo_h" >&5 -printf "%s\n" "$gl_cv_next_langinfo_h" >&6; } - fi - NEXT_LANGINFO_H=$gl_cv_next_langinfo_h +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_langinfo_h" >&5 +printf "%s\n" "$gl_cv_next_langinfo_h" >&6; } + fi + NEXT_LANGINFO_H=$gl_cv_next_langinfo_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='<'langinfo.h'>' + else + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' + gl_next_as_first_directive=$gl_cv_next_langinfo_h + fi + NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H=$gl_next_as_first_directive + + + + + + HAVE_LANGINFO_CODESET=0 + HAVE_LANGINFO_T_FMT_AMPM=0 + HAVE_LANGINFO_ALTMON=0 + HAVE_LANGINFO_ERA=0 + HAVE_LANGINFO_YESEXPR=0 + + if test $ac_cv_header_langinfo_h = yes; then + HAVE_LANGINFO_H=1 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines CODESET" >&5 +printf %s "checking whether langinfo.h defines CODESET... " >&6; } +if test ${gl_cv_header_langinfo_codeset+y} +then : + printf %s "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int a = CODESET; + +int +main (void) +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + gl_cv_header_langinfo_codeset=yes +else + gl_cv_header_langinfo_codeset=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_codeset" >&5 +printf "%s\n" "$gl_cv_header_langinfo_codeset" >&6; } + if test $gl_cv_header_langinfo_codeset = yes; then + HAVE_LANGINFO_CODESET=1 + fi + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines T_FMT_AMPM" >&5 +printf %s "checking whether langinfo.h defines T_FMT_AMPM... " >&6; } +if test ${gl_cv_header_langinfo_t_fmt_ampm+y} +then : + printf %s "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int a = T_FMT_AMPM; + +int +main (void) +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + gl_cv_header_langinfo_t_fmt_ampm=yes +else + gl_cv_header_langinfo_t_fmt_ampm=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_t_fmt_ampm" >&5 +printf "%s\n" "$gl_cv_header_langinfo_t_fmt_ampm" >&6; } + if test $gl_cv_header_langinfo_t_fmt_ampm = yes; then + HAVE_LANGINFO_T_FMT_AMPM=1 + fi + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines ALTMON_1" >&5 +printf %s "checking whether langinfo.h defines ALTMON_1... " >&6; } +if test ${gl_cv_header_langinfo_altmon+y} +then : + printf %s "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int a = ALTMON_1; + +int +main (void) +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + gl_cv_header_langinfo_altmon=yes +else + gl_cv_header_langinfo_altmon=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_altmon" >&5 +printf "%s\n" "$gl_cv_header_langinfo_altmon" >&6; } + if test $gl_cv_header_langinfo_altmon = yes; then + HAVE_LANGINFO_ALTMON=1 + fi + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines ERA" >&5 +printf %s "checking whether langinfo.h defines ERA... " >&6; } +if test ${gl_cv_header_langinfo_era+y} +then : + printf %s "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int a = ERA; + +int +main (void) +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + gl_cv_header_langinfo_era=yes +else + gl_cv_header_langinfo_era=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_era" >&5 +printf "%s\n" "$gl_cv_header_langinfo_era" >&6; } + if test $gl_cv_header_langinfo_era = yes; then + HAVE_LANGINFO_ERA=1 + fi + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines YESEXPR" >&5 +printf %s "checking whether langinfo.h defines YESEXPR... " >&6; } +if test ${gl_cv_header_langinfo_yesexpr+y} +then : + printf %s "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int a = YESEXPR; + +int +main (void) +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + gl_cv_header_langinfo_yesexpr=yes +else + gl_cv_header_langinfo_yesexpr=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_yesexpr" >&5 +printf "%s\n" "$gl_cv_header_langinfo_yesexpr" >&6; } + if test $gl_cv_header_langinfo_yesexpr = yes; then + HAVE_LANGINFO_YESEXPR=1 + fi + else + HAVE_LANGINFO_H=0 + fi + + + + + + + + + + + + + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the __inline keyword" >&5 +printf %s "checking whether the compiler supports the __inline keyword... " >&6; } +if test ${gl_cv_c___inline+y} +then : + printf %s "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +typedef int foo_t; + static __inline foo_t foo (void) { return 0; } +int +main (void) +{ +return foo (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + gl_cv_c___inline=yes +else + gl_cv_c___inline=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c___inline" >&5 +printf "%s\n" "$gl_cv_c___inline" >&6; } + if test $gl_cv_c___inline = yes; then + +printf "%s\n" "#define HAVE___INLINE 1" >>confdefs.h + + fi + + + + + + + + + + + + + + + use_additional=yes + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + + eval additional_includedir=\"$includedir\" + eval additional_libdir=\"$libdir\" + + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + +# Check whether --with-libsigsegv-prefix was given. +if test ${with_libsigsegv_prefix+y} +then : + withval=$with_libsigsegv_prefix; + if test "X$withval" = "Xno"; then + use_additional=no + else + if test "X$withval" = "X"; then + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + + eval additional_includedir=\"$includedir\" + eval additional_libdir=\"$libdir\" + + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + else + additional_includedir="$withval/include" + additional_libdir="$withval/$acl_libdirstem" + if test "$acl_libdirstem2" != "$acl_libdirstem" \ + && test ! -d "$withval/$acl_libdirstem"; then + additional_libdir="$withval/$acl_libdirstem2" + fi + fi + fi + +fi + + LIBSIGSEGV= + LTLIBSIGSEGV= + INCSIGSEGV= + LIBSIGSEGV_PREFIX= + HAVE_LIBSIGSEGV= + rpathdirs= + ltrpathdirs= + names_already_handled= + names_next_round='sigsegv ' + while test -n "$names_next_round"; do + names_this_round="$names_next_round" + names_next_round= + for name in $names_this_round; do + already_handled= + for n in $names_already_handled; do + if test "$n" = "$name"; then + already_handled=yes + break + fi + done + if test -z "$already_handled"; then + names_already_handled="$names_already_handled $name" + uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'` + eval value=\"\$HAVE_LIB$uppername\" + if test -n "$value"; then + if test "$value" = yes; then + eval value=\"\$LIB$uppername\" + test -z "$value" || LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$value" + eval value=\"\$LTLIB$uppername\" + test -z "$value" || LTLIBSIGSEGV="${LTLIBSIGSEGV}${LTLIBSIGSEGV:+ }$value" + else + : + fi + else + found_dir= + found_la= + found_so= + found_a= + eval libname=\"$acl_libname_spec\" # typically: libname=lib$name + if test -n "$acl_shlibext"; then + shrext=".$acl_shlibext" # typically: shrext=.so + else + shrext= + fi + if test $use_additional = yes; then + dir="$additional_libdir" + if test -n "$acl_shlibext"; then + if test -f "$dir/$libname$shrext"; then + found_dir="$dir" + found_so="$dir/$libname$shrext" + else + if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then + ver=`(cd "$dir" && \ + for f in "$libname$shrext".*; do echo "$f"; done \ + | sed -e "s,^$libname$shrext\\\\.,," \ + | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ + | sed 1q ) 2>/dev/null` + if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then + found_dir="$dir" + found_so="$dir/$libname$shrext.$ver" + fi + else + eval library_names=\"$acl_library_names_spec\" + for f in $library_names; do + if test -f "$dir/$f"; then + found_dir="$dir" + found_so="$dir/$f" + break + fi + done + fi + fi + fi + if test "X$found_dir" = "X"; then + if test -f "$dir/$libname.$acl_libext"; then + found_dir="$dir" + found_a="$dir/$libname.$acl_libext" + fi + fi + if test "X$found_dir" != "X"; then + if test -f "$dir/$libname.la"; then + found_la="$dir/$libname.la" + fi + fi + fi + if test "X$found_dir" = "X"; then + for x in $LDFLAGS $LTLIBSIGSEGV; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + case "$x" in + -L*) + dir=`echo "X$x" | sed -e 's/^X-L//'` + if test -n "$acl_shlibext"; then + if test -f "$dir/$libname$shrext"; then + found_dir="$dir" + found_so="$dir/$libname$shrext" + else + if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then + ver=`(cd "$dir" && \ + for f in "$libname$shrext".*; do echo "$f"; done \ + | sed -e "s,^$libname$shrext\\\\.,," \ + | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ + | sed 1q ) 2>/dev/null` + if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then + found_dir="$dir" + found_so="$dir/$libname$shrext.$ver" + fi + else + eval library_names=\"$acl_library_names_spec\" + for f in $library_names; do + if test -f "$dir/$f"; then + found_dir="$dir" + found_so="$dir/$f" + break + fi + done + fi + fi + fi + if test "X$found_dir" = "X"; then + if test -f "$dir/$libname.$acl_libext"; then + found_dir="$dir" + found_a="$dir/$libname.$acl_libext" + fi + fi + if test "X$found_dir" != "X"; then + if test -f "$dir/$libname.la"; then + found_la="$dir/$libname.la" + fi + fi + ;; + esac + if test "X$found_dir" != "X"; then + break + fi + done + fi + if test "X$found_dir" != "X"; then + LTLIBSIGSEGV="${LTLIBSIGSEGV}${LTLIBSIGSEGV:+ }-L$found_dir -l$name" + if test "X$found_so" != "X"; then + if test "$enable_rpath" = no \ + || test "X$found_dir" = "X/usr/$acl_libdirstem" \ + || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then + LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$found_so" + else + haveit= + for x in $ltrpathdirs; do + if test "X$x" = "X$found_dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + ltrpathdirs="$ltrpathdirs $found_dir" + fi + if test "$acl_hardcode_direct" = yes; then + LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$found_so" + else + if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then + LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$found_so" + haveit= + for x in $rpathdirs; do + if test "X$x" = "X$found_dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + rpathdirs="$rpathdirs $found_dir" + fi + else + haveit= + for x in $LDFLAGS $LIBSIGSEGV; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + if test "X$x" = "X-L$found_dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }-L$found_dir" + fi + if test "$acl_hardcode_minus_L" != no; then + LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$found_so" + else + LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }-l$name" + fi + fi + fi + fi + else + if test "X$found_a" != "X"; then + LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$found_a" + else + LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }-L$found_dir -l$name" + fi + fi + additional_includedir= + case "$found_dir" in + */$acl_libdirstem | */$acl_libdirstem/) + basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'` + if test "$name" = 'sigsegv'; then + LIBSIGSEGV_PREFIX="$basedir" + fi + additional_includedir="$basedir/include" + ;; + */$acl_libdirstem2 | */$acl_libdirstem2/) + basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'` + if test "$name" = 'sigsegv'; then + LIBSIGSEGV_PREFIX="$basedir" + fi + additional_includedir="$basedir/include" + ;; + esac + if test "X$additional_includedir" != "X"; then + if test "X$additional_includedir" != "X/usr/include"; then + haveit= + if test "X$additional_includedir" = "X/usr/local/include"; then + if test -n "$GCC"; then + case $host_os in + linux* | gnu* | k*bsd*-gnu) haveit=yes;; + esac + fi + fi + if test -z "$haveit"; then + for x in $CPPFLAGS $INCSIGSEGV; do - 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='<'langinfo.h'>' - else - # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' - gl_next_as_first_directive=$gl_cv_next_langinfo_h - fi - NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H=$gl_next_as_first_directive + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + if test "X$x" = "X-I$additional_includedir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test -d "$additional_includedir"; then + INCSIGSEGV="${INCSIGSEGV}${INCSIGSEGV:+ }-I$additional_includedir" + fi + fi + fi + fi + fi + if test -n "$found_la"; then + save_libdir="$libdir" + case "$found_la" in + */* | *\\*) . "$found_la" ;; + *) . "./$found_la" ;; + esac + libdir="$save_libdir" + for dep in $dependency_libs; do + case "$dep" in + -L*) + additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` + if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \ + && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then + haveit= + if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \ + || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then + if test -n "$GCC"; then + case $host_os in + linux* | gnu* | k*bsd*-gnu) haveit=yes;; + esac + fi + fi + if test -z "$haveit"; then + haveit= + for x in $LDFLAGS $LIBSIGSEGV; do + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + if test "X$x" = "X-L$additional_libdir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test -d "$additional_libdir"; then + LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }-L$additional_libdir" + fi + fi + haveit= + for x in $LDFLAGS $LTLIBSIGSEGV; do + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" - HAVE_LANGINFO_CODESET=0 - HAVE_LANGINFO_T_FMT_AMPM=0 - HAVE_LANGINFO_ERA=0 - HAVE_LANGINFO_YESEXPR=0 + if test "X$x" = "X-L$additional_libdir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test -d "$additional_libdir"; then + LTLIBSIGSEGV="${LTLIBSIGSEGV}${LTLIBSIGSEGV:+ }-L$additional_libdir" + fi + fi + fi + fi + ;; + -R*) + dir=`echo "X$dep" | sed -e 's/^X-R//'` + if test "$enable_rpath" != no; then + haveit= + for x in $rpathdirs; do + if test "X$x" = "X$dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + rpathdirs="$rpathdirs $dir" + fi + haveit= + for x in $ltrpathdirs; do + if test "X$x" = "X$dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + ltrpathdirs="$ltrpathdirs $dir" + fi + fi + ;; + -l*) + names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` + ;; + *.la) + names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` + ;; + *) + LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$dep" + LTLIBSIGSEGV="${LTLIBSIGSEGV}${LTLIBSIGSEGV:+ }$dep" + ;; + esac + done + fi + else + LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }-l$name" + LTLIBSIGSEGV="${LTLIBSIGSEGV}${LTLIBSIGSEGV:+ }-l$name" + fi + fi + fi + done + done + if test "X$rpathdirs" != "X"; then + if test -n "$acl_hardcode_libdir_separator"; then + alldirs= + for found_dir in $rpathdirs; do + alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir" + done + acl_save_libdir="$libdir" + libdir="$alldirs" + eval flag=\"$acl_hardcode_libdir_flag_spec\" + libdir="$acl_save_libdir" + LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$flag" + else + for found_dir in $rpathdirs; do + acl_save_libdir="$libdir" + libdir="$found_dir" + eval flag=\"$acl_hardcode_libdir_flag_spec\" + libdir="$acl_save_libdir" + LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$flag" + done + fi + fi + if test "X$ltrpathdirs" != "X"; then + for found_dir in $ltrpathdirs; do + LTLIBSIGSEGV="${LTLIBSIGSEGV}${LTLIBSIGSEGV:+ }-R$found_dir" + done + fi - : - if test $ac_cv_header_langinfo_h = yes; then - HAVE_LANGINFO_H=1 - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines CODESET" >&5 -printf %s "checking whether langinfo.h defines CODESET... " >&6; } -if test ${gl_cv_header_langinfo_codeset+y} -then : - printf %s "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int a = CODESET; + ac_save_CPPFLAGS="$CPPFLAGS" -int -main (void) -{ + for element in $INCSIGSEGV; do + haveit= + for x in $CPPFLAGS; do - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - gl_cv_header_langinfo_codeset=yes -else - gl_cv_header_langinfo_codeset=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_codeset" >&5 -printf "%s\n" "$gl_cv_header_langinfo_codeset" >&6; } - if test $gl_cv_header_langinfo_codeset = yes; then - HAVE_LANGINFO_CODESET=1 + if test "X$x" = "X$element"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines T_FMT_AMPM" >&5 -printf %s "checking whether langinfo.h defines T_FMT_AMPM... " >&6; } -if test ${gl_cv_header_langinfo_t_fmt_ampm+y} -then : - printf %s "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int a = T_FMT_AMPM; - -int -main (void) -{ + done - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - gl_cv_header_langinfo_t_fmt_ampm=yes -else - gl_cv_header_langinfo_t_fmt_ampm=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_t_fmt_ampm" >&5 -printf "%s\n" "$gl_cv_header_langinfo_t_fmt_ampm" >&6; } - if test $gl_cv_header_langinfo_t_fmt_ampm = yes; then - HAVE_LANGINFO_T_FMT_AMPM=1 - fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines ERA" >&5 -printf %s "checking whether langinfo.h defines ERA... " >&6; } -if test ${gl_cv_header_langinfo_era+y} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libsigsegv" >&5 +printf %s "checking for libsigsegv... " >&6; } +if test ${ac_cv_libsigsegv+y} then : printf %s "(cached) " >&6 else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int a = ERA; + ac_save_LIBS="$LIBS" + case " $LIBSIGSEGV" in + *" -l"*) LIBS="$LIBS $LIBSIGSEGV" ;; + *) LIBS="$LIBSIGSEGV $LIBS" ;; + esac + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include int main (void) { - +sigsegv_deinstall_handler(); ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" +if ac_fn_c_try_link "$LINENO" then : - gl_cv_header_langinfo_era=yes + ac_cv_libsigsegv=yes else - gl_cv_header_langinfo_era=no + ac_cv_libsigsegv='no, consider installing GNU libsigsegv' fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LIBS="$ac_save_LIBS" fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_era" >&5 -printf "%s\n" "$gl_cv_header_langinfo_era" >&6; } - if test $gl_cv_header_langinfo_era = yes; then - HAVE_LANGINFO_ERA=1 - fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines YESEXPR" >&5 -printf %s "checking whether langinfo.h defines YESEXPR... " >&6; } -if test ${gl_cv_header_langinfo_yesexpr+y} -then : - printf %s "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int a = YESEXPR; +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libsigsegv" >&5 +printf "%s\n" "$ac_cv_libsigsegv" >&6; } + if test "$ac_cv_libsigsegv" = yes; then + HAVE_LIBSIGSEGV=yes -int -main (void) -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - gl_cv_header_langinfo_yesexpr=yes -else - gl_cv_header_langinfo_yesexpr=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +printf "%s\n" "#define HAVE_LIBSIGSEGV 1" >>confdefs.h -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_yesexpr" >&5 -printf "%s\n" "$gl_cv_header_langinfo_yesexpr" >&6; } - if test $gl_cv_header_langinfo_yesexpr = yes; then - HAVE_LANGINFO_YESEXPR=1 - fi + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to link with libsigsegv" >&5 +printf %s "checking how to link with libsigsegv... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LIBSIGSEGV" >&5 +printf "%s\n" "$LIBSIGSEGV" >&6; } else - HAVE_LANGINFO_H=0 + HAVE_LIBSIGSEGV=no + CPPFLAGS="$ac_save_CPPFLAGS" + LIBSIGSEGV= + LTLIBSIGSEGV= + LIBSIGSEGV_PREFIX= fi @@ -22739,66 +26032,13 @@ - for gl_func in nl_langinfo; do - as_gl_Symbol=`printf "%s\n" "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5 -printf %s "checking whether $gl_func is declared without a macro... " >&6; } -if eval test \${$as_gl_Symbol+y} -then : - printf %s "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -int -main (void) -{ -#undef $gl_func - (void) $gl_func; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - eval "$as_gl_Symbol=yes" -else - eval "$as_gl_Symbol=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -eval ac_res=\$$as_gl_Symbol - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } - if eval test \"x\$"$as_gl_Symbol"\" = x"yes" -then : - cat >>confdefs.h <<_ACEOF -#define `printf "%s\n" "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 -_ACEOF - - eval ac_cv_have_decl_$gl_func=yes -fi - done - - - - - - - - - : - + gl_cv_lib_sigsegv="$ac_cv_libsigsegv" - - - - LOCALCHARSET_TESTS_ENVIRONMENT="CHARSETALIASDIR=\"\$(abs_top_builddir)/$gl_source_base\"" + LOCALCHARSET_TESTS_ENVIRONMENT= @@ -22847,12 +26087,6 @@ printf "%s\n" "$gl_cv_header_locale_h_posix2001" >&6; } - : - - - - - if test $ac_cv_header_xlocale_h = yes; then HAVE_XLOCALE_H=1 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether locale.h defines locale_t" >&5 @@ -23004,51 +26238,7 @@ - for gl_func in setlocale duplocale; do - as_gl_Symbol=`printf "%s\n" "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5 -printf %s "checking whether $gl_func is declared without a macro... " >&6; } -if eval test \${$as_gl_Symbol+y} -then : - printf %s "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -/* Some systems provide declarations in a non-standard header. */ -#if HAVE_XLOCALE_H -# include -#endif - -int -main (void) -{ -#undef $gl_func - (void) $gl_func; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - eval "$as_gl_Symbol=yes" -else - eval "$as_gl_Symbol=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -eval ac_res=\$$as_gl_Symbol - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } - if eval test \"x\$"$as_gl_Symbol"\" = x"yes" -then : - cat >>confdefs.h <<_ACEOF -#define `printf "%s\n" "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 -_ACEOF - eval ac_cv_have_decl_$gl_func=yes -fi - done @@ -23312,12 +26502,6 @@ - : - - - - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether lseek detects pipes" >&5 printf %s "checking whether lseek detects pipes... " >&6; } if test ${gl_cv_func_lseek_pipe+y} @@ -23433,16 +26617,11 @@ - : - - - - if test $ac_cv_func_lstat = yes; then - case "$gl_cv_func_lstat_dereferences_slashed_symlink" in - *no) + case $host_os,$gl_cv_func_lstat_dereferences_slashed_symlink in + solaris* | *no) REPLACE_LSTAT=1 ;; esac @@ -23500,7 +26679,7 @@ then : case "$host_os" in # Guess yes on platforms where we know the result. - *-gnu* | freebsd* | netbsd* | openbsd* \ + *-gnu* | gnu* | freebsd* | netbsd* | openbsd* \ | hpux* | solaris* | cygwin* | mingw*) ac_cv_func_malloc_0_nonnull=yes ;; # If we don't know, assume the worst. @@ -23627,12 +26806,6 @@ - : - - - - - if test $ac_cv_func_mbrlen = no; then HAVE_MBRLEN=0 ac_fn_c_check_decl "$LINENO" "mbrlen" "ac_cv_have_decl_mbrlen" " @@ -23703,18 +26876,6 @@ - : - - - - - - - : - - - - if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then @@ -23868,12 +27029,6 @@ - : - - - - - if test $ac_cv_func_mbrtowc = no; then HAVE_MBRTOWC=0 ac_fn_c_check_decl "$LINENO" "mbrtowc" "ac_cv_have_decl_mbrtowc" " @@ -24267,10 +27422,11 @@ else case "$host_os" in - # Guess no on AIX and glibc systems. - aix* | *-gnu*) - gl_cv_func_mbrtowc_empty_input="guessing no" ;; - *) gl_cv_func_mbrtowc_empty_input="guessing yes" ;; + # Guess no on AIX and glibc systems. + aix* | *-gnu* | gnu*) gl_cv_func_mbrtowc_empty_input="guessing no" ;; + # Guess yes on native Windows. + mingw*) gl_cv_func_mbrtowc_empty_input="guessing yes" ;; + *) gl_cv_func_mbrtowc_empty_input="guessing yes" ;; esac if test "$cross_compiling" = yes then : @@ -24304,7 +27460,7 @@ printf "%s\n" "$gl_cv_func_mbrtowc_empty_input" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C locale is free of encoding errors" >&5 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C locale is free of encoding errors" >&5 printf %s "checking whether the C locale is free of encoding errors... " >&6; } if test ${gl_cv_C_locale_sans_EILSEQ+y} then : @@ -24315,7 +27471,11 @@ if test "$cross_compiling" = yes then : - : + case "$host_os" in + # Guess yes on native Windows. + mingw*) gl_cv_C_locale_sans_EILSEQ="guessing yes" ;; + esac + else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -24356,6 +27516,7 @@ conftest.$ac_objext conftest.beam conftest.$ac_ext fi + fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_C_locale_sans_EILSEQ" >&5 printf "%s\n" "$gl_cv_C_locale_sans_EILSEQ" >&6; } @@ -24423,6 +27584,7 @@ gl_LIBOBJS="$gl_LIBOBJS mbrtowc.$ac_objext" + : fi @@ -24446,34 +27608,22 @@ - GNULIB_MBSCASECMP=1 - - - - - -printf "%s\n" "#define GNULIB_TEST_MBSCASECMP 1" >>confdefs.h - - - - - + GNULIB_MBSCASECMP=1 +printf "%s\n" "#define GNULIB_TEST_MBSCASECMP 1" >>confdefs.h - : - : @@ -24631,12 +27781,6 @@ - : - - - - - if test $ac_cv_func_mbsinit = no; then HAVE_MBSINIT=0 ac_fn_c_check_decl "$LINENO" "mbsinit" "ac_cv_have_decl_mbsinit" " @@ -24705,12 +27849,6 @@ - : - - - - - if test $ac_cv_func_mbslen = yes; then HAVE_MBSLEN=1 else @@ -24741,18 +27879,6 @@ - : - - - - - - - : - - - - if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then @@ -24906,12 +28032,6 @@ - : - - - - - if test $ac_cv_func_mbsrtowcs = no; then HAVE_MBSRTOWCS=0 ac_fn_c_check_decl "$LINENO" "mbsrtowcs" "ac_cv_have_decl_mbsrtowcs" " @@ -25249,12 +28369,6 @@ - : - - - - - if test $ac_cv_have_decl_memrchr = no; then HAVE_DECL_MEMRCHR=0 fi @@ -25334,12 +28448,6 @@ - : - - - - - if test $ac_cv_func_nl_langinfo = yes; then # On Irix 6.5, YESEXPR is defined, but nl_langinfo(YESEXPR) is broken. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether YESEXPR works" >&5 @@ -25393,8 +28501,11 @@ printf "%s\n" "#define FUNC_NL_LANGINFO_YESEXPR_WORKS $FUNC_NL_LANGINFO_YESEXPR_WORKS" >>confdefs.h - if test $HAVE_LANGINFO_CODESET = 1 && test $HAVE_LANGINFO_ERA = 1 \ - && test $FUNC_NL_LANGINFO_YESEXPR_WORKS = 1; then + if test $HAVE_LANGINFO_CODESET = 1 \ + && test $HAVE_LANGINFO_T_FMT_AMPM = 1 \ + && test $HAVE_LANGINFO_ALTMON = 1 \ + && test $HAVE_LANGINFO_ERA = 1 \ + && test $FUNC_NL_LANGINFO_YESEXPR_WORKS = 1; then : else REPLACE_NL_LANGINFO=1 @@ -25500,18 +28611,16 @@ + case "$host_os" in mingw* | pw*) REPLACE_OPEN=1 ;; *) - : - - - - - + if test "$gl_cv_macro_O_CLOEXEC" != yes; then + REPLACE_OPEN=1 + fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether open recognizes a trailing slash" >&5 printf %s "checking whether open recognizes a trailing slash... " >&6; } if test ${gl_cv_func_open_slash+y} @@ -25583,12 +28692,6 @@ - : - - - - - if test $ac_cv_func_fchdir = no; then HAVE_FCHDIR=0 fi @@ -25635,17 +28738,13 @@ - : - - - - - case $ac_cv_func_openat+$gl_cv_func_lstat_dereferences_slashed_symlink in - yes+*yes) + case $ac_cv_func_openat+$gl_cv_func_lstat_dereferences_slashed_symlink+$gl_cv_macro_O_CLOEXEC in + yes+*yes+yes) ;; yes+*) + # Solaris 10 lacks O_CLOEXEC. # Solaris 9 has *at functions, but uniformly mishandles trailing # slash in all of them. REPLACE_OPENAT=1 @@ -25715,12 +28814,6 @@ - : - - - - - if test $ac_cv_func_fchdir = no; then HAVE_FCHDIR=0 fi @@ -25765,12 +28858,6 @@ - : - - - - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for perl5.005 or newer" >&5 @@ -25829,6 +28916,75 @@ + ac_fn_c_check_func "$LINENO" "raise" "ac_cv_func_raise" +if test "x$ac_cv_func_raise" = xyes +then : + printf "%s\n" "#define HAVE_RAISE 1" >>confdefs.h + +fi + + if test $ac_cv_func_raise = no; then + HAVE_RAISE=0 + else + + + if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then + REPLACE_RAISE=1 + fi + + + + + + if test $gl_cv_type_sigset_t = yes; then + ac_fn_c_check_func "$LINENO" "sigprocmask" "ac_cv_func_sigprocmask" +if test "x$ac_cv_func_sigprocmask" = xyes +then : + gl_cv_func_sigprocmask=1 +fi + + fi + if test -z "$gl_cv_func_sigprocmask"; then + HAVE_POSIX_SIGNALBLOCKING=0 + fi + + if test $HAVE_POSIX_SIGNALBLOCKING = 0; then + : + fi + + fi + + if test $HAVE_RAISE = 0 || test $REPLACE_RAISE = 1; then + + + + + + + + + gl_LIBOBJS="$gl_LIBOBJS raise.$ac_objext" + + : + fi + + + + + + GNULIB_RAISE=1 + + + + + +printf "%s\n" "#define GNULIB_TEST_RAISE 1" >>confdefs.h + + + + + + if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then REPLACE_READ=1 @@ -25925,7 +29081,7 @@ then : case "$host_os" in # Guess yes on platforms where we know the result. - *-gnu* | freebsd* | netbsd* | openbsd* \ + *-gnu* | gnu* | freebsd* | netbsd* | openbsd* \ | hpux* | solaris* | cygwin* | mingw*) ac_cv_func_realloc_0_nonnull=yes ;; # If we don't know, assume the worst. @@ -26053,18 +29209,6 @@ # If cross compiling, assume the test would fail and use the included # regex.c. - : - - - - - - - : - - - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working re_compile_pattern" >&5 printf %s "checking for working re_compile_pattern... " >&6; } @@ -26074,7 +29218,13 @@ else if test "$cross_compiling" = yes then : - gl_cv_func_re_compile_pattern_working=no + case "$host_os" in + # Guess no on native Windows. + mingw*) gl_cv_func_re_compile_pattern_working="guessing no" ;; + # Otherwise, assume it is not working. + *) gl_cv_func_re_compile_pattern_working="guessing no" ;; + esac + else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -26123,7 +29273,7 @@ if (setlocale (LC_ALL, "en_US.UTF-8")) { { - /* http://sourceware.org/ml/libc-hacker/2006-09/msg00008.html + /* https://sourceware.org/ml/libc-hacker/2006-09/msg00008.html This test needs valgrind to catch the bug on Debian GNU/Linux 3.1 x86, but it might catch the bug better on other platforms and it shouldn't hurt to try the @@ -26147,7 +29297,7 @@ { /* This test is from glibc bug 15078. The test case is from Andreas Schwab in - . + . */ static char const pat[] = "[^x]x"; static char const data[] = @@ -26245,7 +29395,7 @@ result |= 16; /* Catch a bug reported by Vin Shelton in - http://lists.gnu.org/archive/html/bug-coreutils/2007-06/msg00089.html + https://lists.gnu.org/r/bug-coreutils/2007-06/msg00089.html */ re_set_syntax (RE_SYNTAX_POSIX_BASIC & ~RE_CONTEXT_INVALID_DUP @@ -26260,6 +29410,17 @@ if (! REG_STARTEND) result |= 64; + /* Matching with the compiled form of this regexp would provoke + an assertion failure prior to glibc-2.28: + regexec.c:1375: pop_fail_stack: Assertion 'num >= 0' failed + With glibc-2.28, compilation fails and reports the invalid + back reference. */ + re_set_syntax (RE_SYNTAX_POSIX_EGREP); + memset (®ex, 0, sizeof regex); + s = re_compile_pattern ("0|()0|\\1|0", 10, ®ex); + if (!s || strcmp (s, "Invalid back reference")) + result |= 64; + #if 0 /* It would be nice to reject hosts whose regoff_t values are too narrow (including glibc on hosts with 64-bit ptrdiff_t and @@ -26288,12 +29449,13 @@ conftest.$ac_objext conftest.beam conftest.$ac_ext fi + fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_re_compile_pattern_working" >&5 printf "%s\n" "$gl_cv_func_re_compile_pattern_working" >&6; } - case $gl_cv_func_re_compile_pattern_working in #( - yes) ac_use_included_regex=no;; #( - no) ac_use_included_regex=yes;; + case "$gl_cv_func_re_compile_pattern_working" in #( + *yes) ac_use_included_regex=no;; #( + *no) ac_use_included_regex=yes;; esac ;; *) as_fn_error $? "Invalid value for --with-included-regex: $with_included_regex" "$LINENO" 5 @@ -26380,38 +29542,247 @@ fi - : + ac_fn_c_check_decl "$LINENO" "isblank" "ac_cv_have_decl_isblank" "#include +" +if test "x$ac_cv_have_decl_isblank" = xyes +then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +printf "%s\n" "#define HAVE_DECL_ISBLANK $ac_have_decl" >>confdefs.h + fi - ac_fn_c_check_decl "$LINENO" "isblank" "ac_cv_have_decl_isblank" "#include + + + + if test $ac_cv_func_sigaction = yes; then + ac_fn_c_check_member "$LINENO" "struct sigaction" "sa_sigaction" "ac_cv_member_struct_sigaction_sa_sigaction" "#include " -if test "x$ac_cv_have_decl_isblank" = xyes +if test "x$ac_cv_member_struct_sigaction_sa_sigaction" = xyes then : - ac_have_decl=1 + +printf "%s\n" "#define HAVE_STRUCT_SIGACTION_SA_SIGACTION 1" >>confdefs.h + + +fi + + if test $ac_cv_member_struct_sigaction_sa_sigaction = no; then + HAVE_STRUCT_SIGACTION_SA_SIGACTION=0 + fi + else + HAVE_SIGACTION=0 + fi + + if test $HAVE_SIGACTION = 0; then + + + + + + + + + gl_LIBOBJS="$gl_LIBOBJS sigaction.$ac_objext" + + + + + + + + ac_fn_c_check_type "$LINENO" "siginfo_t" "ac_cv_type_siginfo_t" " +#include + +" +if test "x$ac_cv_type_siginfo_t" = xyes +then : + +printf "%s\n" "#define HAVE_SIGINFO_T 1" >>confdefs.h + + +fi + + if test $ac_cv_type_siginfo_t = no; then + HAVE_SIGINFO_T=0 + fi + + fi + + + + + + GNULIB_SIGACTION=1 + + + + + +printf "%s\n" "#define GNULIB_TEST_SIGACTION 1" >>confdefs.h + + + + + + + + + + + + + + + if test $gl_cv_have_include_next = yes; then + gl_cv_next_signal_h='<'signal.h'>' + else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 +printf %s "checking absolute name of ... " >&6; } +if test ${gl_cv_next_signal_h+y} +then : + printf %s "(cached) " >&6 else - ac_have_decl=0 + + + + 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 'signal.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_signal_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | + sed -n "$gl_absolute_header_sed"` + + gl_header=$gl_cv_absolute_signal_h + gl_cv_next_signal_h='"'$gl_header'"' + + fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_signal_h" >&5 +printf "%s\n" "$gl_cv_next_signal_h" >&6; } + fi + NEXT_SIGNAL_H=$gl_cv_next_signal_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='<'signal.h'>' + else + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' + gl_next_as_first_directive=$gl_cv_next_signal_h + fi + NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H=$gl_next_as_first_directive + + + + + +# AIX declares sig_atomic_t to already include volatile, and C89 compilers +# then choke on 'volatile sig_atomic_t'. C99 requires that it compile. + ac_fn_c_check_type "$LINENO" "volatile sig_atomic_t" "ac_cv_type_volatile_sig_atomic_t" " +#include + +" +if test "x$ac_cv_type_volatile_sig_atomic_t" = xyes +then : + +else + HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=0 +fi + + + -printf "%s\n" "#define HAVE_DECL_ISBLANK $ac_have_decl" >>confdefs.h + + ac_fn_c_check_type "$LINENO" "sighandler_t" "ac_cv_type_sighandler_t" " +#include + +" +if test "x$ac_cv_type_sighandler_t" = xyes +then : + +else + HAVE_SIGHANDLER_T=0 +fi + + + + + + + + + + if test $gl_cv_type_sigset_t = yes; then + ac_fn_c_check_func "$LINENO" "sigprocmask" "ac_cv_func_sigprocmask" +if test "x$ac_cv_func_sigprocmask" = xyes +then : + gl_cv_func_sigprocmask=1 +fi + + fi + if test -z "$gl_cv_func_sigprocmask"; then + HAVE_POSIX_SIGNALBLOCKING=0 fi + if test $HAVE_POSIX_SIGNALBLOCKING = 0; then - : + gl_LIBOBJS="$gl_LIBOBJS sigprocmask.$ac_objext" + + : + fi + + + + + + GNULIB_SIGPROCMASK=1 + + + + + +printf "%s\n" "#define GNULIB_TEST_SIGPROCMASK 1" >>confdefs.h + @@ -26453,12 +29824,6 @@ - : - - - - - case "$host_os" in mingw*) REPLACE_STAT=1 @@ -26478,10 +29843,12 @@ 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" ;; + # Guess yes on Linux systems. + linux-* | linux) gl_cv_func_stat_file_slash="guessing yes" ;; + # Guess yes on glibc systems. + *-gnu* | 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 @@ -26527,6 +29894,10 @@ printf "%s\n" "#define REPLACE_FUNC_STAT_FILE 1" >>confdefs.h ;; esac + case $host_os in + solaris*) + REPLACE_FSTAT=1 ;; + esac ;; esac @@ -26541,6 +29912,8 @@ gl_LIBOBJS="$gl_LIBOBJS stat.$ac_objext" + case "$host_os" in + mingw*) @@ -26551,6 +29924,8 @@ gl_LIBOBJS="$gl_LIBOBJS stat-w32.$ac_objext" + ;; + esac : @@ -26572,6 +29947,139 @@ + + + + ac_fn_c_check_member "$LINENO" "struct stat" "st_atim.tv_nsec" "ac_cv_member_struct_stat_st_atim_tv_nsec" "#include + #include +" +if test "x$ac_cv_member_struct_stat_st_atim_tv_nsec" = xyes +then : + +printf "%s\n" "#define HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC 1" >>confdefs.h + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether struct stat.st_atim is of type struct timespec" >&5 +printf %s "checking whether struct stat.st_atim is of type struct timespec... " >&6; } +if test ${ac_cv_typeof_struct_stat_st_atim_is_struct_timespec+y} +then : + printf %s "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + #include + #include + #if HAVE_SYS_TIME_H + # include + #endif + #include + struct timespec ts; + struct stat st; + +int +main (void) +{ + + st.st_atim = ts; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=yes +else + ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&5 +printf "%s\n" "$ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&6; } + if test $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec = yes; then + +printf "%s\n" "#define TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC 1" >>confdefs.h + + fi +else + ac_fn_c_check_member "$LINENO" "struct stat" "st_atimespec.tv_nsec" "ac_cv_member_struct_stat_st_atimespec_tv_nsec" "#include + #include +" +if test "x$ac_cv_member_struct_stat_st_atimespec_tv_nsec" = xyes +then : + +printf "%s\n" "#define HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC 1" >>confdefs.h + + +else + ac_fn_c_check_member "$LINENO" "struct stat" "st_atimensec" "ac_cv_member_struct_stat_st_atimensec" "#include + #include +" +if test "x$ac_cv_member_struct_stat_st_atimensec" = xyes +then : + +printf "%s\n" "#define HAVE_STRUCT_STAT_ST_ATIMENSEC 1" >>confdefs.h + + +else + ac_fn_c_check_member "$LINENO" "struct stat" "st_atim.st__tim.tv_nsec" "ac_cv_member_struct_stat_st_atim_st__tim_tv_nsec" "#include + #include +" +if test "x$ac_cv_member_struct_stat_st_atim_st__tim_tv_nsec" = xyes +then : + +printf "%s\n" "#define HAVE_STRUCT_STAT_ST_ATIM_ST__TIM_TV_NSEC 1" >>confdefs.h + + +fi + +fi + +fi + +fi + + + + + + ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtimespec.tv_nsec" "ac_cv_member_struct_stat_st_birthtimespec_tv_nsec" "#include + #include +" +if test "x$ac_cv_member_struct_stat_st_birthtimespec_tv_nsec" = xyes +then : + +printf "%s\n" "#define HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC 1" >>confdefs.h + + +else + ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtimensec" "ac_cv_member_struct_stat_st_birthtimensec" "#include + #include +" +if test "x$ac_cv_member_struct_stat_st_birthtimensec" = xyes +then : + +printf "%s\n" "#define HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC 1" >>confdefs.h + + +else + ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtim.tv_nsec" "ac_cv_member_struct_stat_st_birthtim_tv_nsec" "#include + #include +" +if test "x$ac_cv_member_struct_stat_st_birthtim_tv_nsec" = xyes +then : + +printf "%s\n" "#define HAVE_STRUCT_STAT_ST_BIRTHTIM_TV_NSEC 1" >>confdefs.h + + +fi + +fi + +fi + + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working stdalign.h" >&5 printf %s "checking for working stdalign.h... " >&6; } if test ${gl_cv_header_working_stdalign_h+y} @@ -26585,7 +30093,7 @@ /* Test that alignof yields a result consistent with offsetof. This catches GCC bug 52023 - . */ + . */ #ifdef __cplusplus template struct alignof_helper { char a; t b; }; # define ao(type) offsetof (alignof_helper, b) @@ -26650,12 +30158,11 @@ NEXT_STDARG_H='' { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for va_copy" >&5 printf %s "checking for va_copy... " >&6; } - if test ${gl_cv_func_va_copy+y} +if test ${gl_cv_func_va_copy+y} then : printf %s "(cached) " >&6 else - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int @@ -26677,9 +30184,9 @@ gl_cv_func_va_copy=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_va_copy" >&5 +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_va_copy" >&5 printf "%s\n" "$gl_cv_func_va_copy" >&6; } if test $gl_cv_func_va_copy = no; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -26865,20 +30372,51 @@ STDDEF_H= - ac_fn_c_check_type "$LINENO" "max_align_t" "ac_cv_type_max_align_t" "#include -" -if test "x$ac_cv_type_max_align_t" = xyes + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for good max_align_t" >&5 +printf %s "checking for good max_align_t... " >&6; } +if test ${gl_cv_type_max_align_t+y} then : + printf %s "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + unsigned int s = sizeof (max_align_t); + #if defined __GNUC__ || defined __IBM__ALIGNOF__ + int check1[2 * (__alignof__ (double) <= __alignof__ (max_align_t)) - 1]; + int check2[2 * (__alignof__ (long double) <= __alignof__ (max_align_t)) - 1]; + #endif + +int +main (void) +{ + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + gl_cv_type_max_align_t=yes else - HAVE_MAX_ALIGN_T=0; STDDEF_H=stddef.h + gl_cv_type_max_align_t=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_max_align_t" >&5 +printf "%s\n" "$gl_cv_type_max_align_t" >&6; } + if test $gl_cv_type_max_align_t = no; then + HAVE_MAX_ALIGN_T=0 + STDDEF_H=stddef.h + fi if test $gt_cv_c_wchar_t = no; then HAVE_WCHAR_T=0 STDDEF_H=stddef.h fi + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5 printf %s "checking whether NULL can be used in arbitrary expressions... " >&6; } if test ${gl_cv_decl_null_works+y} @@ -26913,6 +30451,7 @@ STDDEF_H=stddef.h fi + if test -n "$STDDEF_H"; then GL_GENERATE_STDDEF_H_TRUE= GL_GENERATE_STDDEF_H_FALSE='#' @@ -27090,7 +30629,7 @@ /* 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__) && \ + #if (defined _WIN32 && ! defined __CYGWIN__) && \ (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) extern char PRIdMAX_probe[sizeof PRIdMAX == sizeof "I64d" ? 1 : -1]; #endif @@ -27152,47 +30691,7 @@ - for gl_func in dprintf fpurge fseeko ftello getdelim getline gets pclose popen renameat snprintf tmpfile vdprintf vsnprintf; do - as_gl_Symbol=`printf "%s\n" "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5 -printf %s "checking whether $gl_func is declared without a macro... " >&6; } -if eval test \${$as_gl_Symbol+y} -then : - printf %s "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -int -main (void) -{ -#undef $gl_func - (void) $gl_func; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - eval "$as_gl_Symbol=yes" -else - eval "$as_gl_Symbol=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -eval ac_res=\$$as_gl_Symbol - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } - if eval test \"x\$"$as_gl_Symbol"\" = x"yes" -then : - cat >>confdefs.h <<_ACEOF -#define `printf "%s\n" "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 -_ACEOF - eval ac_cv_have_decl_$gl_func=yes -fi - done @@ -27270,54 +30769,8 @@ - - 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=`printf "%s\n" "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5 -printf %s "checking whether $gl_func is declared without a macro... " >&6; } -if eval test \${$as_gl_Symbol+y} -then : - printf %s "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#if HAVE_SYS_LOADAVG_H -# include -#endif -#if HAVE_RANDOM_H -# include -#endif - -int -main (void) -{ -#undef $gl_func - (void) $gl_func; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - eval "$as_gl_Symbol=yes" -else - eval "$as_gl_Symbol=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -eval ac_res=\$$as_gl_Symbol - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } - if eval test \"x\$"$as_gl_Symbol"\" = x"yes" -then : - cat >>confdefs.h <<_ACEOF -#define `printf "%s\n" "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 -_ACEOF - - eval ac_cv_have_decl_$gl_func=yes -fi - done + + @@ -27371,24 +30824,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 @@ -27426,6 +30867,8 @@ + + if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working strerror function" >&5 printf %s "checking for working strerror function... " >&6; } @@ -27436,10 +30879,10 @@ if test "$cross_compiling" = yes then : case "$host_os" in - # Guess yes on glibc systems. - *-gnu*) gl_cv_func_working_strerror="guessing yes" ;; - # If we don't know, assume the worst. - *) gl_cv_func_working_strerror="guessing no" ;; + # Guess yes on glibc systems. + *-gnu* | gnu*) gl_cv_func_working_strerror="guessing yes" ;; + # If we don't know, assume the worst. + *) gl_cv_func_working_strerror="guessing no" ;; esac else @@ -27476,6 +30919,10 @@ ;; esac + case "$gl_cv_func_strerror_r_works" in + *no) REPLACE_STRERROR=1 ;; + esac + else REPLACE_STRERROR=1 fi @@ -27529,12 +30976,6 @@ - : - - - - - if test $ac_cv_header_sys_socket_h != yes; then ac_fn_c_check_header_compile "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default" if test "x$ac_cv_header_winsock2_h" = xyes @@ -27567,12 +31008,6 @@ - : - - - - - if test $ac_cv_have_decl_strnlen = no; then HAVE_DECL_STRNLEN=0 else @@ -27792,10 +31227,10 @@ - if test "$gl_cv_func_memchr_works" != yes; then + if test $HAVE_MEMCHR = 0 || test $REPLACE_MEMCHR = 1; then REPLACE_STRSTR=1 else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether strstr works" >&5 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether strstr works" >&5 printf %s "checking whether strstr works... " >&6; } if test ${gl_cv_func_strstr_works_always+y} then : @@ -27803,7 +31238,7 @@ else if test "$cross_compiling" = yes then : - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __GNU_LIBRARY__ @@ -27837,6 +31272,12 @@ /* end confdefs.h. */ #include /* for strstr */ +#ifdef __GNU_LIBRARY__ + #include + #if __GLIBC__ == 2 && __GLIBC_MINOR__ == 28 + Unlucky user + #endif +#endif #define P "_EF_BF_BD" #define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P #define NEEDLE P P P P P @@ -27903,18 +31344,6 @@ - : - - - - - - - : - - - - if test "$ac_cv_have_decl_strtoimax" != yes; then HAVE_DECL_STRTOIMAX=0 @@ -27931,10 +31360,12 @@ if test "$cross_compiling" = yes then : case "$host_os" in - # Guess no on AIX 5. - aix5*) gl_cv_func_strtoimax="guessing no" ;; - # Guess yes otherwise. - *) gl_cv_func_strtoimax="guessing yes" ;; + # Guess no on AIX 5. + aix5*) gl_cv_func_strtoimax="guessing no" ;; + # Guess yes on native Windows. + mingw*) gl_cv_func_strtoimax="guessing yes" ;; + # Guess yes otherwise. + *) gl_cv_func_strtoimax="guessing yes" ;; esac else @@ -28134,18 +31565,6 @@ - : - - - - - - - : - - - - if test "$ac_cv_have_decl_strtoumax" = yes; then if test "$ac_cv_func_strtoumax" != yes; then @@ -28202,12 +31621,6 @@ - : - - - - - @@ -28308,51 +31721,6 @@ - for gl_func in fchmodat fstat fstatat futimens lchmod lstat mkdirat mkfifo mkfifoat mknod mknodat stat utimensat; do - as_gl_Symbol=`printf "%s\n" "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5 -printf %s "checking whether $gl_func is declared without a macro... " >&6; } -if eval test \${$as_gl_Symbol+y} -then : - printf %s "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -int -main (void) -{ -#undef $gl_func - (void) $gl_func; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - eval "$as_gl_Symbol=yes" -else - eval "$as_gl_Symbol=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -eval ac_res=\$$as_gl_Symbol - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } - if eval test \"x\$"$as_gl_Symbol"\" = x"yes" -then : - cat >>confdefs.h <<_ACEOF -#define `printf "%s\n" "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 -_ACEOF - - eval ac_cv_have_decl_$gl_func=yes -fi - done - - - - @@ -28370,7 +31738,6 @@ - : @@ -28461,64 +31828,6 @@ - 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=`printf "%s\n" "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5 -printf %s "checking whether $gl_func is declared without a macro... " >&6; } -if eval test \${$as_gl_Symbol+y} -then : - printf %s "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#if HAVE_UNISTD_H -# include -#endif -/* Some systems declare various items in the wrong headers. */ -#if !(defined __GLIBC__ && !defined __UCLIBC__) -# include -# include -# include -# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ -# include -# endif -#endif - -int -main (void) -{ -#undef $gl_func - (void) $gl_func; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - eval "$as_gl_Symbol=yes" -else - eval "$as_gl_Symbol=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -eval ac_res=\$$as_gl_Symbol - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } - if eval test \"x\$"$as_gl_Symbol"\" = x"yes" -then : - cat >>confdefs.h <<_ACEOF -#define `printf "%s\n" "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 -_ACEOF - - eval ac_cv_have_decl_$gl_func=yes -fi - done - - - - - : @@ -28685,7 +31994,7 @@ || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \ && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \ || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \ - && test $LIBUNISTRING_VERSION_SUBMINOR -lt 6 + && test $LIBUNISTRING_VERSION_SUBMINOR -lt 8 } } } @@ -28711,94 +32020,16 @@ - : - - - - - - - : - - - - - - - : - - - - - - - : - - - - - - - : - - - - - - - : - - - - - - - : - - - - - - - : - - - - - - - : - - - - - - - : - - - : - - - - - - - : - : - - - @@ -28859,12 +32090,6 @@ - : - - - - - @@ -28958,76 +32183,14 @@ - 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=`printf "%s\n" "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5 -printf %s "checking whether $gl_func is declared without a macro... " >&6; } -if eval test \${$as_gl_Symbol+y} -then : - printf %s "(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 -main (void) -{ -#undef $gl_func - (void) $gl_func; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - eval "$as_gl_Symbol=yes" -else - eval "$as_gl_Symbol=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -eval ac_res=\$$as_gl_Symbol - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } - if eval test \"x\$"$as_gl_Symbol"\" = x"yes" -then : - cat >>confdefs.h <<_ACEOF -#define `printf "%s\n" "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 -_ACEOF - - eval ac_cv_have_decl_$gl_func=yes -fi - done - - - - - - - - - : - - : @@ -29185,12 +32348,6 @@ - : - - - - - if test $ac_cv_func_wcrtomb = no; then HAVE_WCRTOMB=0 ac_fn_c_check_decl "$LINENO" "wcrtomb" "ac_cv_have_decl_wcrtomb" " @@ -29235,6 +32392,8 @@ case "$host_os" in # Guess no on AIX 4, OSF/1 and Solaris. aix4* | osf* | solaris*) gl_cv_func_wcrtomb_retval="guessing no" ;; + # Guess yes on native Windows. + mingw*) gl_cv_func_wcrtomb_retval="guessing yes" ;; # Guess yes otherwise. *) gl_cv_func_wcrtomb_retval="guessing yes" ;; esac @@ -29338,12 +32497,6 @@ - : - - - - - if test $ac_cv_func_wctob = no; then HAVE_WCTOB=0 HAVE_DECL_WCTOB=0 @@ -29363,6 +32516,9 @@ # Guess no on Solaris <= 9 and Cygwin. solaris2.[1-9] | solaris2.[1-9].* | cygwin*) gl_cv_func_wctob_works="guessing no" ;; + # Guess no on native Windows. + mingw*) + gl_cv_func_wctob_works="guessing no" ;; # Guess yes otherwise. *) gl_cv_func_wctob_works="guessing yes" ;; esac @@ -29561,12 +32717,6 @@ - : - - - - - if test $ac_cv_func_iswcntrl = yes; then HAVE_ISWCNTRL=1 else @@ -29590,12 +32740,6 @@ - : - - - - - @@ -29680,7 +32824,7 @@ if test "$cross_compiling" = yes then : - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #if __GNU_LIBRARY__ == 1 @@ -29884,78 +33028,15 @@ fi - for gl_func in wctype iswctype wctrans towctrans ; do - as_gl_Symbol=`printf "%s\n" "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5 -printf %s "checking whether $gl_func is declared without a macro... " >&6; } -if eval test \${$as_gl_Symbol+y} -then : - printf %s "(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 -# include -#endif -#include - -int -main (void) -{ -#undef $gl_func - (void) $gl_func; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - eval "$as_gl_Symbol=yes" -else - eval "$as_gl_Symbol=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -eval ac_res=\$$as_gl_Symbol - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } - if eval test \"x\$"$as_gl_Symbol"\" = x"yes" -then : - cat >>confdefs.h <<_ACEOF -#define `printf "%s\n" "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 -_ACEOF - - eval ac_cv_have_decl_$gl_func=yes -fi - done - - - - - - : - - - - : - @@ -29987,7 +33068,37 @@ HAVE_DECL_WCWIDTH=0 fi - if test $ac_cv_func_wcwidth = yes; then + if test $ac_cv_func_wcwidth != yes; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether wcwidth is a macro" >&5 +printf %s "checking whether wcwidth is a macro... " >&6; } +if test ${gl_cv_func_wcwidth_macro+y} +then : + printf %s "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#ifdef wcwidth + wchar_header_defines_wcwidth +#endif +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "wchar_header_defines_wcwidth" >/dev/null 2>&1 +then : + gl_cv_func_wcwidth_macro=yes +else + gl_cv_func_wcwidth_macro=no +fi +rm -rf conftest* + + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wcwidth_macro" >&5 +printf "%s\n" "$gl_cv_func_wcwidth_macro" >&6; } + fi + + if test $ac_cv_func_wcwidth = yes || test $gl_cv_func_wcwidth_macro = yes; then HAVE_WCWIDTH=1 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether wcwidth works reasonably in UTF-8 locales" >&5 printf %s "checking whether wcwidth works reasonably in UTF-8 locales... " >&6; } @@ -30000,9 +33111,9 @@ then : case "$host_os" in - # Guess yes on glibc and AIX 7 systems. - *-gnu* | aix[7-9]*) gl_cv_func_wcwidth_works="guessing yes";; - *) gl_cv_func_wcwidth_works="guessing no";; + # Guess yes on glibc and AIX 7 systems. + *-gnu* | gnu* | aix[7-9]*) gl_cv_func_wcwidth_works="guessing yes";; + *) gl_cv_func_wcwidth_works="guessing no";; esac else @@ -30077,6 +33188,10 @@ gl_LIBOBJS="$gl_LIBOBJS wcwidth.$ac_objext" + + + : + fi @@ -30093,6 +33208,12 @@ + + + + case "$host_os" in + mingw*) GNULIB_OVERRIDES_STRUCT_STAT=1 ;; + esac : : @@ -30107,21 +33228,186 @@ - gltests_libdeps= - gltests_ltlibdeps= + gltests_libdeps= + gltests_ltlibdeps= + + + + + + + + + + gl_source_base='gnulib-tests' + gltests_WITNESS=IN_`echo "${PACKAGE-$PACKAGE_TARNAME}" | LC_ALL=C tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ | LC_ALL=C sed -e 's/[^A-Z0-9_]/_/g'`_GNULIB_TESTS + + gl_module_indicator_condition=$gltests_WITNESS + + + if test "$ac_cv_header_winsock2_h" = yes; then + + + + + + + + + gltests_LIBOBJS="$gltests_LIBOBJS accept.$ac_objext" + + fi + + + + + + if test "$GNULIB_ACCEPT" != 1; then + if test "$GNULIB_ACCEPT" = 0; then + GNULIB_ACCEPT=$gl_module_indicator_condition + else + GNULIB_ACCEPT="($GNULIB_ACCEPT || $gl_module_indicator_condition)" + fi + fi + + + + + +printf "%s\n" "#define GNULIB_TEST_ACCEPT 1" >>confdefs.h + + + + + + + + if test $ac_cv_header_arpa_inet_h = yes; then + HAVE_ARPA_INET_H=1 + else + HAVE_ARPA_INET_H=0 + fi + + + + + + + + + + + if test $gl_cv_have_include_next = yes; then + gl_cv_next_arpa_inet_h='<'arpa/inet.h'>' + else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 +printf %s "checking absolute name of ... " >&6; } +if test ${gl_cv_next_arpa_inet_h+y} +then : + printf %s "(cached) " >&6 +else + + if test $ac_cv_header_arpa_inet_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 'arpa/inet.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_arpa_inet_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | + sed -n "$gl_absolute_header_sed"` + + gl_header=$gl_cv_absolute_arpa_inet_h + gl_cv_next_arpa_inet_h='"'$gl_header'"' + else + gl_cv_next_arpa_inet_h='<'arpa/inet.h'>' + fi + + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_arpa_inet_h" >&5 +printf "%s\n" "$gl_cv_next_arpa_inet_h" >&6; } + fi + NEXT_ARPA_INET_H=$gl_cv_next_arpa_inet_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='<'arpa/inet.h'>' + else + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' + gl_next_as_first_directive=$gl_cv_next_arpa_inet_h + fi + NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H=$gl_next_as_first_directive + + + + + + + + + + + + + + if test "$ac_cv_header_winsock2_h" = yes; then + + + + + + + + + gltests_LIBOBJS="$gltests_LIBOBJS bind.$ac_objext" + + fi + + + if test "$GNULIB_BIND" != 1; then + if test "$GNULIB_BIND" = 0; then + GNULIB_BIND=$gl_module_indicator_condition + else + GNULIB_BIND="($GNULIB_BIND || $gl_module_indicator_condition)" + fi + fi +printf "%s\n" "#define GNULIB_TEST_BIND 1" >>confdefs.h - gl_source_base='gnulib-tests' - gltests_WITNESS=IN_`echo "${PACKAGE-$PACKAGE_TARNAME}" | LC_ALL=C tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ | LC_ALL=C sed -e 's/[^A-Z0-9_]/_/g'`_GNULIB_TESTS - gl_module_indicator_condition=$gltests_WITNESS @@ -30146,8 +33432,14 @@ struct tm t; char buf[16]; int main () { + /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl + imitates locale dependent behaviour by looking at the environment + variables, and all locales use the UTF-8 encoding. */ +#if defined __BEOS__ || defined __HAIKU__ + return 1; +#else /* Check whether the given locale name is recognized by the system. */ -#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ +# if defined _WIN32 && !defined __CYGWIN__ /* On native Windows, setlocale(category, "") looks at the system settings, not at the environment variables. Also, when an encoding suffix such as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE @@ -30155,9 +33447,9 @@ if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0) return 1; -#else +# else if (setlocale (LC_ALL, "") == NULL) return 1; -#endif +# endif /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) is empty, and the behaviour of Tcl 8.4 in this locale is not useful. @@ -30166,32 +33458,33 @@ some unit tests fail. On MirBSD 10, when an unsupported locale is specified, setlocale() succeeds but then nl_langinfo(CODESET) is "UTF-8". */ -#if HAVE_LANGINFO_CODESET +# if HAVE_LANGINFO_CODESET { const char *cs = nl_langinfo (CODESET); if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0 || strcmp (cs, "UTF-8") == 0) return 1; } -#endif -#ifdef __CYGWIN__ +# endif +# ifdef __CYGWIN__ /* On Cygwin, avoid locale names without encoding suffix, because the locale_charset() function relies on the encoding suffix. Note that LC_ALL is set on the command line. */ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1; -#endif +# endif /* Check whether in the abbreviation of the second month, the second character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only one byte long. This excludes the UTF-8 encoding. */ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4; if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1; -#if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */ +# if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */ /* Check whether the decimal separator is a comma. On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point are nl_langinfo(RADIXCHAR) are both ".". */ if (localeconv () ->decimal_point[0] != ',') return 1; -#endif +# endif return 0; +#endif } _ACEOF @@ -30286,7 +33579,7 @@ variables, and all locales use the UTF-8 encoding. */ #if !(defined __BEOS__ || defined __HAIKU__) /* Check whether the given locale name is recognized by the system. */ -# if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ +# if defined _WIN32 && !defined __CYGWIN__ /* On native Windows, setlocale(category, "") looks at the system settings, not at the environment variables. Also, when an encoding suffix such as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE @@ -30411,8 +33704,14 @@ struct tm t; char buf[16]; int main () { + /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl + imitates locale dependent behaviour by looking at the environment + variables, and all locales use the UTF-8 encoding. */ +#if defined __BEOS__ || defined __HAIKU__ + return 1; +#else /* Check whether the given locale name is recognized by the system. */ -#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ +# if defined _WIN32 && !defined __CYGWIN__ /* On native Windows, setlocale(category, "") looks at the system settings, not at the environment variables. Also, when an encoding suffix such as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE @@ -30420,9 +33719,9 @@ if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0) return 1; -#else +# else if (setlocale (LC_ALL, "") == NULL) return 1; -#endif +# endif /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) is empty, and the behaviour of Tcl 8.4 in this locale is not useful. @@ -30431,32 +33730,33 @@ some unit tests fail. On MirBSD 10, when an unsupported locale is specified, setlocale() succeeds but then nl_langinfo(CODESET) is "UTF-8". */ -#if HAVE_LANGINFO_CODESET +# if HAVE_LANGINFO_CODESET { const char *cs = nl_langinfo (CODESET); if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0 || strcmp (cs, "UTF-8") == 0) return 1; } -#endif -#ifdef __CYGWIN__ +# endif +# ifdef __CYGWIN__ /* On Cygwin, avoid locale names without encoding suffix, because the locale_charset() function relies on the encoding suffix. Note that LC_ALL is set on the command line. */ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1; -#endif +# endif /* Check whether in the abbreviation of the second month, the second character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only one byte long. This excludes the UTF-8 encoding. */ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4; if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1; -#if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */ +# if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */ /* Check whether the decimal separator is a comma. On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point are nl_langinfo(RADIXCHAR) are both ".". */ if (localeconv () ->decimal_point[0] != ',') return 1; -#endif +# endif return 0; +#endif } _ACEOF @@ -30553,7 +33853,7 @@ implement the Turkish upper-/lowercase mappings. Therefore, let this program return 1 on BeOS. */ /* Check whether the given locale name is recognized by the system. */ -#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ +#if defined _WIN32 && !defined __CYGWIN__ /* On native Windows, setlocale(category, "") looks at the system settings, not at the environment variables. Also, when an encoding suffix such as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE @@ -30650,22 +33950,633 @@ rm -fr conftest* fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_tr_utf8" >&5 -printf "%s\n" "$gt_cv_locale_tr_utf8" >&6; } - LOCALE_TR_UTF8=$gt_cv_locale_tr_utf8 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_tr_utf8" >&5 +printf "%s\n" "$gt_cv_locale_tr_utf8" >&6; } + LOCALE_TR_UTF8=$gt_cv_locale_tr_utf8 + + + + if test "$ac_cv_header_winsock2_h" = yes; then + + + + + + + + + gltests_LIBOBJS="$gltests_LIBOBJS connect.$ac_objext" + + fi + + + + + + if test "$GNULIB_CONNECT" != 1; then + if test "$GNULIB_CONNECT" = 0; then + GNULIB_CONNECT=$gl_module_indicator_condition + else + GNULIB_CONNECT="($GNULIB_CONNECT || $gl_module_indicator_condition)" + fi + fi + + + + + +printf "%s\n" "#define GNULIB_TEST_CONNECT 1" >>confdefs.h + + + + + + + + + + if test "$GNULIB_ENVIRON" != 1; then + if test "$GNULIB_ENVIRON" = 0; then + GNULIB_ENVIRON=$gl_module_indicator_condition + else + GNULIB_ENVIRON="($GNULIB_ENVIRON || $gl_module_indicator_condition)" + fi + fi + + + + + +printf "%s\n" "#define GNULIB_TEST_ENVIRON 1" >>confdefs.h + + + + + + + + if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then + REPLACE_FDOPEN=1 + fi + + if test $REPLACE_FDOPEN = 0; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fdopen sets errno" >&5 +printf %s "checking whether fdopen sets errno... " >&6; } +if test ${gl_cv_func_fdopen_works+y} +then : + printf %s "(cached) " >&6 +else + + if test "$cross_compiling" = yes +then : + case "$host_os" in + mingw*) gl_cv_func_fdopen_works="guessing no" ;; + *) gl_cv_func_fdopen_works="guessing yes" ;; + esac + +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include +int +main (void) +{ + FILE *fp; + errno = 0; + fp = fdopen (-1, "r"); + if (fp == NULL && errno == 0) + return 1; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO" +then : + gl_cv_func_fdopen_works=yes +else + gl_cv_func_fdopen_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 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fdopen_works" >&5 +printf "%s\n" "$gl_cv_func_fdopen_works" >&6; } + case "$gl_cv_func_fdopen_works" in + *no) REPLACE_FDOPEN=1 ;; + esac + fi + + if test $REPLACE_FDOPEN = 1; then + + + + + + + + + gltests_LIBOBJS="$gltests_LIBOBJS fdopen.$ac_objext" + + + fi + + + + + + if test "$GNULIB_FDOPEN" != 1; then + if test "$GNULIB_FDOPEN" = 0; then + GNULIB_FDOPEN=$gl_module_indicator_condition + else + GNULIB_FDOPEN="($GNULIB_FDOPEN || $gl_module_indicator_condition)" + fi + fi + + + + + +printf "%s\n" "#define GNULIB_TEST_FDOPEN 1" >>confdefs.h + + + + + + + FLOAT_H= + REPLACE_FLOAT_LDBL=0 + case "$host_os" in + aix* | beos* | openbsd* | mirbsd* | irix*) + FLOAT_H=float.h + ;; + freebsd* | dragonfly*) + case "$host_cpu" in + i[34567]86 ) + FLOAT_H=float.h + ;; + x86_64 ) + # On x86_64 systems, the C compiler may still be generating + # 32-bit code. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#if defined __LP64__ || defined __x86_64__ || defined __amd64__ + int ok; + #else + error fail + #endif + +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + +else + FLOAT_H=float.h +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ;; + esac + ;; + linux*) + case "$host_cpu" in + powerpc*) + FLOAT_H=float.h + ;; + esac + ;; + esac + case "$host_os" in + aix* | freebsd* | dragonfly* | linux*) + if test -n "$FLOAT_H"; then + REPLACE_FLOAT_LDBL=1 + fi + ;; + esac + + REPLACE_ITOLD=0 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether conversion from 'int' to 'long double' works" >&5 +printf %s "checking whether conversion from 'int' to 'long double' works... " >&6; } +if test ${gl_cv_func_itold_works+y} +then : + printf %s "(cached) " >&6 +else + + if test "$cross_compiling" = yes +then : + case "$host" in + sparc*-*-linux*) + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#if defined __LP64__ || defined __arch64__ + int ok; + #else + error fail + #endif + +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + gl_cv_func_itold_works="guessing no" +else + gl_cv_func_itold_works="guessing yes" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ;; + # Guess yes on native Windows. + mingw*) gl_cv_func_itold_works="guessing yes" ;; + *) gl_cv_func_itold_works="guessing yes" ;; + esac + +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int i = -1; +volatile long double ld; +int main () +{ + ld += i * 1.0L; + if (ld > 0) + return 1; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO" +then : + gl_cv_func_itold_works=yes +else + gl_cv_func_itold_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 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_itold_works" >&5 +printf "%s\n" "$gl_cv_func_itold_works" >&6; } + case "$gl_cv_func_itold_works" in + *no) + REPLACE_ITOLD=1 + FLOAT_H=float.h + ;; + esac + + if test -n "$FLOAT_H"; then + + + + + + + + + if test $gl_cv_have_include_next = yes; then + gl_cv_next_float_h='<'float.h'>' + else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 +printf %s "checking absolute name of ... " >&6; } +if test ${gl_cv_next_float_h+y} +then : + printf %s "(cached) " >&6 +else + + + + 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 'float.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_float_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | + sed -n "$gl_absolute_header_sed"` + + gl_header=$gl_cv_absolute_float_h + gl_cv_next_float_h='"'$gl_header'"' + + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_float_h" >&5 +printf "%s\n" "$gl_cv_next_float_h" >&6; } + fi + NEXT_FLOAT_H=$gl_cv_next_float_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='<'float.h'>' + else + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' + gl_next_as_first_directive=$gl_cv_next_float_h + fi + NEXT_AS_FIRST_DIRECTIVE_FLOAT_H=$gl_next_as_first_directive + + + + + fi + + if test -n "$FLOAT_H"; then + GL_GENERATE_FLOAT_H_TRUE= + GL_GENERATE_FLOAT_H_FALSE='#' +else + GL_GENERATE_FLOAT_H_TRUE='#' + GL_GENERATE_FLOAT_H_FALSE= +fi + + + + if test $REPLACE_FLOAT_LDBL = 1; then + + + + + + + + + gltests_LIBOBJS="$gltests_LIBOBJS float.$ac_objext" + + fi + if test $REPLACE_ITOLD = 1; then + + + + + + + + + gltests_LIBOBJS="$gltests_LIBOBJS itold.$ac_objext" + + fi + + + + if test $ac_cv_func_ftruncate = yes; then + + + case "$host_os" in + mingw*) + REPLACE_FTRUNCATE=1 + ;; + esac + + else + HAVE_FTRUNCATE=0 + fi + + if test $HAVE_FTRUNCATE = 0 || test $REPLACE_FTRUNCATE = 1; then + + + + + + + + + gltests_LIBOBJS="$gltests_LIBOBJS ftruncate.$ac_objext" + + + ac_fn_c_check_func "$LINENO" "chsize" "ac_cv_func_chsize" +if test "x$ac_cv_func_chsize" = xyes +then : + printf "%s\n" "#define HAVE_CHSIZE 1" >>confdefs.h + +fi + + + fi + + + + + + if test "$GNULIB_FTRUNCATE" != 1; then + if test "$GNULIB_FTRUNCATE" = 0; then + GNULIB_FTRUNCATE=$gl_module_indicator_condition + else + GNULIB_FTRUNCATE="($GNULIB_FTRUNCATE || $gl_module_indicator_condition)" + fi + fi + + + + + +printf "%s\n" "#define GNULIB_TEST_FTRUNCATE 1" >>confdefs.h + + + + + + + + + + + gl_gettimeofday_timezone=void + if test $ac_cv_func_gettimeofday != yes; then + HAVE_GETTIMEOFDAY=0 + else + + + + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday clobbers localtime buffer" >&5 +printf %s "checking whether gettimeofday clobbers localtime buffer... " >&6; } +if test ${gl_cv_func_gettimeofday_clobber+y} +then : + printf %s "(cached) " >&6 +else + if test "$cross_compiling" = yes +then : + # When cross-compiling: + case "$host_os" in + # Guess all is fine on glibc systems. + *-gnu* | gnu*) gl_cv_func_gettimeofday_clobber="guessing no" ;; + # Guess no on native Windows. + mingw*) gl_cv_func_gettimeofday_clobber="guessing no" ;; + # If we don't know, assume the worst. + *) gl_cv_func_gettimeofday_clobber="guessing yes" ;; + esac + +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + #include + #include + #include + +int +main (void) +{ + + time_t t = 0; + struct tm *lt; + struct tm saved_lt; + struct timeval tv; + lt = localtime (&t); + saved_lt = *lt; + gettimeofday (&tv, NULL); + return memcmp (lt, &saved_lt, sizeof (struct tm)) != 0; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO" +then : + gl_cv_func_gettimeofday_clobber=no +else + gl_cv_func_gettimeofday_clobber=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 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_clobber" >&5 +printf "%s\n" "$gl_cv_func_gettimeofday_clobber" >&6; } + + case "$gl_cv_func_gettimeofday_clobber" in + *yes) + REPLACE_GETTIMEOFDAY=1 + +printf "%s\n" "#define GETTIMEOFDAY_CLOBBERS_LOCALTIME 1" >>confdefs.h + + + + + NEED_LOCALTIME_BUFFER=1 + REPLACE_GMTIME=1 + REPLACE_LOCALTIME=1 + + ;; + esac + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gettimeofday with POSIX signature" >&5 +printf %s "checking for gettimeofday with POSIX signature... " >&6; } +if test ${gl_cv_func_gettimeofday_posix_signature+y} +then : + printf %s "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + struct timeval c; + int gettimeofday (struct timeval *restrict, void *restrict); + +int +main (void) +{ +/* glibc uses struct timezone * rather than the POSIX void * + if _GNU_SOURCE is defined. However, since the only portable + use of gettimeofday uses NULL as the second parameter, and + since the glibc definition is actually more typesafe, it is + not worth wrapping this to get a compliant signature. */ + int (*f) (struct timeval *restrict, void *restrict) + = gettimeofday; + int x = f (&c, 0); + return !(x | c.tv_sec | c.tv_usec); + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + gl_cv_func_gettimeofday_posix_signature=yes +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int gettimeofday (struct timeval *restrict, struct timezone *restrict); + +int +main (void) +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + gl_cv_func_gettimeofday_posix_signature=almost +else + gl_cv_func_gettimeofday_posix_signature=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_posix_signature" >&5 +printf "%s\n" "$gl_cv_func_gettimeofday_posix_signature" >&6; } + if test $gl_cv_func_gettimeofday_posix_signature = almost; then + gl_gettimeofday_timezone='struct timezone' + elif test $gl_cv_func_gettimeofday_posix_signature != yes; then + REPLACE_GETTIMEOFDAY=1 + fi + if test $REPLACE_STRUCT_TIMEVAL = 1; then + REPLACE_GETTIMEOFDAY=1 + fi + case "$host_os" in + mingw*) REPLACE_GETTIMEOFDAY=1 ;; + esac + fi +printf "%s\n" "#define GETTIMEOFDAY_TIMEZONE $gl_gettimeofday_timezone" >>confdefs.h + if test $HAVE_GETTIMEOFDAY = 0 || test $REPLACE_GETTIMEOFDAY = 1; then - if test "$GNULIB_ENVIRON" != 1; then - if test "$GNULIB_ENVIRON" = 0; then - GNULIB_ENVIRON=$gl_module_indicator_condition + + + + gltests_LIBOBJS="$gltests_LIBOBJS gettimeofday.$ac_objext" + + : + fi + + + + + + if test "$GNULIB_GETTIMEOFDAY" != 1; then + if test "$GNULIB_GETTIMEOFDAY" = 0; then + GNULIB_GETTIMEOFDAY=$gl_module_indicator_condition else - GNULIB_ENVIRON="($GNULIB_ENVIRON || $gl_module_indicator_condition)" + GNULIB_GETTIMEOFDAY="($GNULIB_GETTIMEOFDAY || $gl_module_indicator_condition)" fi fi @@ -30673,76 +34584,166 @@ -printf "%s\n" "#define GNULIB_TEST_ENVIRON 1" >>confdefs.h +printf "%s\n" "#define GNULIB_TEST_GETTIMEOFDAY 1" >>confdefs.h -printf "%s\n" "#define GNULIB_FD_SAFER_FLAG $gl_module_indicator_condition" >>confdefs.h + HAVE_INET_PTON=1 + INET_PTON_LIB= - if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then - REPLACE_FDOPEN=1 - fi - if test $REPLACE_FDOPEN = 0; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fdopen sets errno" >&5 -printf %s "checking whether fdopen sets errno... " >&6; } -if test ${gl_cv_func_fdopen_works+y} + + + if test $ac_cv_header_sys_socket_h != yes; then + ac_fn_c_check_header_compile "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default" +if test "x$ac_cv_header_winsock2_h" = xyes then : - printf %s "(cached) " >&6 -else + printf "%s\n" "#define HAVE_WINSOCK2_H 1" >>confdefs.h - if test "$cross_compiling" = yes +fi + + fi + if test "$ac_cv_header_winsock2_h" = yes; then + HAVE_WINSOCK2_H=1 + UNISTD_H_HAVE_WINSOCK2_H=1 + SYS_IOCTL_H_HAVE_WINSOCK2_H=1 + else + HAVE_WINSOCK2_H=0 + fi + + + if test $HAVE_WINSOCK2_H = 1; then + ac_fn_c_check_decl "$LINENO" "inet_pton" "ac_cv_have_decl_inet_pton" "#include +" +if test "x$ac_cv_have_decl_inet_pton" = xyes then : - case "$host_os" in - mingw*) gl_cv_func_fdopen_works="guessing no" ;; - *) gl_cv_func_fdopen_works="guessing yes" ;; - esac + ac_have_decl=1 +else + ac_have_decl=0 +fi +printf "%s\n" "#define HAVE_DECL_INET_PTON $ac_have_decl" >>confdefs.h + + if test $ac_cv_have_decl_inet_pton = yes; then + REPLACE_INET_PTON=1 + INET_PTON_LIB="-lws2_32" + else + HAVE_DECL_INET_PTON=0 + HAVE_INET_PTON=0 + fi + else + gl_save_LIBS=$LIBS + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing inet_pton" >&5 +printf %s "checking for library containing inet_pton... " >&6; } +if test ${ac_cv_search_inet_pton+y} +then : + printf %s "(cached) " >&6 else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + ac_func_search_save_LIBS=$LIBS +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include -#include +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char inet_pton (); int main (void) { - FILE *fp; - errno = 0; - fp = fdopen (-1, "r"); - if (fp == NULL && errno == 0) - return 1; +return inet_pton (); + ; return 0; } _ACEOF -if ac_fn_c_try_run "$LINENO" +for ac_lib in '' nsl resolv network +do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + if ac_fn_c_try_link "$LINENO" then : - gl_cv_func_fdopen_works=yes + ac_cv_search_inet_pton=$ac_res +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if test ${ac_cv_search_inet_pton+y} +then : + break +fi +done +if test ${ac_cv_search_inet_pton+y} +then : + else - gl_cv_func_fdopen_works=no + ac_cv_search_inet_pton=no fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_inet_pton" >&5 +printf "%s\n" "$ac_cv_search_inet_pton" >&6; } +ac_res=$ac_cv_search_inet_pton +if test "$ac_res" != no +then : + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" +else + ac_fn_c_check_func "$LINENO" "inet_pton" "ac_cv_func_inet_pton" +if test "x$ac_cv_func_inet_pton" = xyes +then : + printf "%s\n" "#define HAVE_INET_PTON 1" >>confdefs.h fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fdopen_works" >&5 -printf "%s\n" "$gl_cv_func_fdopen_works" >&6; } - case "$gl_cv_func_fdopen_works" in - *no) REPLACE_FDOPEN=1 ;; - esac + + if test $ac_cv_func_inet_pton = no; then + HAVE_INET_PTON=0 + fi + +fi + + LIBS=$gl_save_LIBS + + if test "$ac_cv_search_inet_pton" != "no" \ + && test "$ac_cv_search_inet_pton" != "none required"; then + INET_PTON_LIB="$ac_cv_search_inet_pton" + fi + + + ac_fn_c_check_decl "$LINENO" "inet_pton" "ac_cv_have_decl_inet_pton" "#include + #if HAVE_NETDB_H + # include + #endif + +" +if test "x$ac_cv_have_decl_inet_pton" = xyes +then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +printf "%s\n" "#define HAVE_DECL_INET_PTON $ac_have_decl" >>confdefs.h + + if test $ac_cv_have_decl_inet_pton = no; then + HAVE_DECL_INET_PTON=0 + fi fi - if test $REPLACE_FDOPEN = 1; then + if test $HAVE_INET_PTON = 0 || test $REPLACE_INET_NTOP = 1; then @@ -30750,7 +34751,10 @@ - gltests_LIBOBJS="$gltests_LIBOBJS fdopen.$ac_objext" + + gltests_LIBOBJS="$gltests_LIBOBJS inet_pton.$ac_objext" + + fi @@ -30759,237 +34763,383 @@ - if test "$GNULIB_FDOPEN" != 1; then - if test "$GNULIB_FDOPEN" = 0; then - GNULIB_FDOPEN=$gl_module_indicator_condition + if test "$GNULIB_INET_PTON" != 1; then + if test "$GNULIB_INET_PTON" = 0; then + GNULIB_INET_PTON=$gl_module_indicator_condition else - GNULIB_FDOPEN="($GNULIB_FDOPEN || $gl_module_indicator_condition)" + GNULIB_INET_PTON="($GNULIB_INET_PTON || $gl_module_indicator_condition)" fi fi + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 +printf %s "checking whether byte ordering is bigendian... " >&6; } +if test ${ac_cv_c_bigendian+y} +then : + printf %s "(cached) " >&6 +else + ac_cv_c_bigendian=unknown + # See if we're dealing with a universal compiler. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifndef __APPLE_CC__ + not a universal capable compiler + #endif + typedef int dummy; -printf "%s\n" "#define GNULIB_TEST_FDOPEN 1" >>confdefs.h - +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + # Check for potential -arch flags. It is not universal unless + # there are at least two -arch flags with different values. + ac_arch= + ac_prev= + for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do + if test -n "$ac_prev"; then + case $ac_word in + i?86 | x86_64 | ppc | ppc64) + if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then + ac_arch=$ac_word + else + ac_cv_c_bigendian=universal + break + fi + ;; + esac + ac_prev= + elif test "x$ac_word" = "x-arch"; then + ac_prev=arch + fi + done +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + if test $ac_cv_c_bigendian = unknown; then + # See if sys/param.h defines the BYTE_ORDER macro. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + #include +int +main (void) +{ +#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ + && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ + && LITTLE_ENDIAN) + bogus endian macros + #endif + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + # It does; now see whether it defined to BIG_ENDIAN or not. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + #include +int +main (void) +{ +#if BYTE_ORDER != BIG_ENDIAN + not big endian + #endif - FLOAT_H= - REPLACE_FLOAT_LDBL=0 - case "$host_os" in - aix* | beos* | openbsd* | mirbsd* | irix*) - FLOAT_H=float.h - ;; - freebsd* | dragonfly*) - case "$host_cpu" in - i[34567]86 ) - FLOAT_H=float.h - ;; - x86_64 ) - # On x86_64 systems, the C compiler may still be generating - # 32-bit code. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#if defined __LP64__ || defined __x86_64__ || defined __amd64__ - yes - #endif + ; + return 0; +} _ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "yes" >/dev/null 2>&1 +if ac_fn_c_try_compile "$LINENO" then : - + ac_cv_c_bigendian=yes else - FLOAT_H=float.h + ac_cv_c_bigendian=no fi -rm -rf conftest* +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + if test $ac_cv_c_bigendian = unknown; then + # See if defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include - ;; - esac - ;; - linux*) - case "$host_cpu" in - powerpc*) - FLOAT_H=float.h - ;; - esac - ;; - esac - case "$host_os" in - aix* | freebsd* | dragonfly* | linux*) - if test -n "$FLOAT_H"; then - REPLACE_FLOAT_LDBL=1 - fi - ;; - esac +int +main (void) +{ +#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) + bogus endian macros + #endif - REPLACE_ITOLD=0 - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether conversion from 'int' to 'long double' works" >&5 -printf %s "checking whether conversion from 'int' to 'long double' works... " >&6; } -if test ${gl_cv_func_itold_works+y} + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" then : - printf %s "(cached) " >&6 -else + # It does; now see whether it defined to _BIG_ENDIAN or not. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main (void) +{ +#ifndef _BIG_ENDIAN + not big endian + #endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + ac_cv_c_bigendian=yes +else + ac_cv_c_bigendian=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + if test $ac_cv_c_bigendian = unknown; then + # Compile a test program. if test "$cross_compiling" = yes then : - case "$host" in - sparc*-*-linux*) - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + # Try to guess by grepping values from an object file. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#if defined __LP64__ || defined __arch64__ - yes - #endif +short int ascii_mm[] = + { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; + short int ascii_ii[] = + { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; + int use_ascii (int i) { + return ascii_mm[i] + ascii_ii[i]; + } + short int ebcdic_ii[] = + { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; + short int ebcdic_mm[] = + { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; + int use_ebcdic (int i) { + return ebcdic_mm[i] + ebcdic_ii[i]; + } + extern int foo; + +int +main (void) +{ +return use_ascii (foo) == use_ebcdic (foo); + ; + return 0; +} _ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "yes" >/dev/null 2>&1 +if ac_fn_c_try_compile "$LINENO" then : - gl_cv_func_itold_works="guessing no" -else - gl_cv_func_itold_works="guessing yes" + if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then + ac_cv_c_bigendian=yes + fi + if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then + if test "$ac_cv_c_bigendian" = unknown; then + ac_cv_c_bigendian=no + else + # finding both strings is unlikely to happen, but who knows? + ac_cv_c_bigendian=unknown + fi + fi fi -rm -rf conftest* - - ;; - *) gl_cv_func_itold_works="guessing yes" ;; - esac - +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - -int i = -1; -volatile long double ld; -int main () +$ac_includes_default +int +main (void) { - ld += i * 1.0L; - if (ld > 0) - return 1; + + /* Are we little or big endian? From Harbison&Steele. */ + union + { + long int l; + char c[sizeof (long int)]; + } u; + u.l = 1; + return u.c[sizeof (long int) - 1] == 1; + + ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO" then : - gl_cv_func_itold_works=yes + ac_cv_c_bigendian=no else - gl_cv_func_itold_works=no + ac_cv_c_bigendian=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 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5 +printf "%s\n" "$ac_cv_c_bigendian" >&6; } + case $ac_cv_c_bigendian in #( + yes) + printf "%s\n" "#define WORDS_BIGENDIAN 1" >>confdefs.h +;; #( + no) + ;; #( + universal) + +printf "%s\n" "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h + + ;; #( + *) + as_fn_error $? "unknown endianness + presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;; + esac + + + + + : + + : + : + : + : + + + + + HAVE_IOCTL=1 + if test "$ac_cv_header_winsock2_h" = yes; then + HAVE_IOCTL=0 + else + ac_fn_c_check_func "$LINENO" "ioctl" "ac_cv_func_ioctl" +if test "x$ac_cv_func_ioctl" = xyes +then : + printf "%s\n" "#define HAVE_IOCTL 1" >>confdefs.h + +fi + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ioctl with POSIX signature" >&5 +printf %s "checking for ioctl with POSIX signature... " >&6; } +if test ${gl_cv_func_ioctl_posix_signature+y} +then : + printf %s "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + /* On some platforms, ioctl() is declared in . */ + #include + +int +main (void) +{ +extern + #ifdef __cplusplus + "C" + #endif + int ioctl (int, int, ...); + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + gl_cv_func_ioctl_posix_signature=yes +else + gl_cv_func_ioctl_posix_signature=no fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_itold_works" >&5 -printf "%s\n" "$gl_cv_func_itold_works" >&6; } - case "$gl_cv_func_itold_works" in - *no) - REPLACE_ITOLD=1 - FLOAT_H=float.h - ;; - esac +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ioctl_posix_signature" >&5 +printf "%s\n" "$gl_cv_func_ioctl_posix_signature" >&6; } + if test $gl_cv_func_ioctl_posix_signature != yes; then + REPLACE_IOCTL=1 + fi + fi + + if test $HAVE_IOCTL = 0 || test $REPLACE_IOCTL = 1; then + + + + + + + + + gltests_LIBOBJS="$gltests_LIBOBJS ioctl.$ac_objext" - if test -n "$FLOAT_H"; then + fi + if test "$GNULIB_IOCTL" != 1; then + if test "$GNULIB_IOCTL" = 0; then + GNULIB_IOCTL=$gl_module_indicator_condition + else + GNULIB_IOCTL="($GNULIB_IOCTL || $gl_module_indicator_condition)" + fi + fi - if test $gl_cv_have_include_next = yes; then - gl_cv_next_float_h='<'float.h'>' - else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 -printf %s "checking absolute name of ... " >&6; } -if test ${gl_cv_next_float_h+y} -then : - printf %s "(cached) " >&6 -else +printf "%s\n" "#define GNULIB_TEST_IOCTL 1" >>confdefs.h - 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 'float.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_float_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | - sed -n "$gl_absolute_header_sed"` - gl_header=$gl_cv_absolute_float_h - gl_cv_next_float_h='"'$gl_header'"' + if test "$ac_cv_header_winsock2_h" = yes; then + -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_float_h" >&5 -printf "%s\n" "$gl_cv_next_float_h" >&6; } - fi - NEXT_FLOAT_H=$gl_cv_next_float_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='<'float.h'>' - else - # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' - gl_next_as_first_directive=$gl_cv_next_float_h - fi - NEXT_AS_FIRST_DIRECTIVE_FLOAT_H=$gl_next_as_first_directive + gltests_LIBOBJS="$gltests_LIBOBJS listen.$ac_objext" + fi - if test -n "$FLOAT_H"; then - GL_GENERATE_FLOAT_H_TRUE= - GL_GENERATE_FLOAT_H_FALSE='#' -else - GL_GENERATE_FLOAT_H_TRUE='#' - GL_GENERATE_FLOAT_H_FALSE= -fi - if test $REPLACE_FLOAT_LDBL = 1; then + if test "$GNULIB_LISTEN" != 1; then + if test "$GNULIB_LISTEN" = 0; then + GNULIB_LISTEN=$gl_module_indicator_condition + else + GNULIB_LISTEN="($GNULIB_LISTEN || $gl_module_indicator_condition)" + fi + fi +printf "%s\n" "#define GNULIB_TEST_LISTEN 1" >>confdefs.h - gltests_LIBOBJS="$gltests_LIBOBJS float.$ac_objext" - fi - if test $REPLACE_ITOLD = 1; then @@ -30997,59 +35147,61 @@ + ac_fn_c_check_func "$LINENO" "setlocale" "ac_cv_func_setlocale" +if test "x$ac_cv_func_setlocale" = xyes +then : + printf "%s\n" "#define HAVE_SETLOCALE 1" >>confdefs.h - gltests_LIBOBJS="$gltests_LIBOBJS itold.$ac_objext" +fi - fi + if test $ac_cv_func_newlocale != yes; then + HAVE_NEWLOCALE=0 + fi + if test $ac_cv_func_duplocale != yes; then + HAVE_DUPLOCALE=0 + fi + if test $ac_cv_func_freelocale != yes; then + HAVE_FREELOCALE=0 + fi + if test $gt_nameless_locales = yes; then + REPLACE_NEWLOCALE=1 + REPLACE_DUPLOCALE=1 + REPLACE_FREELOCALE=1 + fi - : - : - : - : - : - : + if test "$GNULIB_LOCALENAME" != 1; then + if test "$GNULIB_LOCALENAME" = 0; then + GNULIB_LOCALENAME=$gl_module_indicator_condition + else + GNULIB_LOCALENAME="($GNULIB_LOCALENAME || $gl_module_indicator_condition)" + fi + fi +printf "%s\n" "#define GNULIB_TEST_LOCALENAME 1" >>confdefs.h - ac_fn_c_check_func "$LINENO" "setlocale" "ac_cv_func_setlocale" -if test "x$ac_cv_func_setlocale" = xyes -then : - printf "%s\n" "#define HAVE_SETLOCALE 1" >>confdefs.h -fi -ac_fn_c_check_func "$LINENO" "uselocale" "ac_cv_func_uselocale" -if test "x$ac_cv_func_uselocale" = xyes -then : - printf "%s\n" "#define HAVE_USELOCALE 1" >>confdefs.h -fi - if test $ac_cv_func_uselocale = yes; then - ac_fn_c_check_func "$LINENO" "getlocalename_l" "ac_cv_func_getlocalename_l" -if test "x$ac_cv_func_getlocalename_l" = xyes -then : - printf "%s\n" "#define HAVE_GETLOCALENAME_L 1" >>confdefs.h -fi - fi - : + gltests_LIBOBJS="$gltests_LIBOBJS localtime-buffer.$ac_objext" @@ -31080,7 +35232,7 @@ implement the Turkish upper-/lowercase mappings. Therefore, let this program return 1 on BeOS. */ /* Check whether the given locale name is recognized by the system. */ -#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ +#if defined _WIN32 && !defined __CYGWIN__ /* On native Windows, setlocale(category, "") looks at the system settings, not at the environment variables. Also, when an encoding suffix such as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE @@ -31209,7 +35361,7 @@ variables, and all locales use the UTF-8 encoding. */ #if !(defined __BEOS__ || defined __HAIKU__) /* Check whether the given locale name is recognized by the system. */ -# if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ +# if defined _WIN32 && !defined __CYGWIN__ /* On native Windows, setlocale(category, "") looks at the system settings, not at the environment variables. Also, when an encoding suffix such as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE @@ -31334,8 +35486,14 @@ struct tm t; char buf[16]; int main () { + /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl + imitates locale dependent behaviour by looking at the environment + variables, and all locales use the UTF-8 encoding. */ +#if defined __BEOS__ || defined __HAIKU__ + return 1; +#else /* Check whether the given locale name is recognized by the system. */ -#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ +# if defined _WIN32 && !defined __CYGWIN__ /* On native Windows, setlocale(category, "") looks at the system settings, not at the environment variables. Also, when an encoding suffix such as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE @@ -31343,9 +35501,9 @@ if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0) return 1; -#else +# else if (setlocale (LC_ALL, "") == NULL) return 1; -#endif +# endif /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) is empty, and the behaviour of Tcl 8.4 in this locale is not useful. @@ -31354,32 +35512,33 @@ some unit tests fail. On MirBSD 10, when an unsupported locale is specified, setlocale() succeeds but then nl_langinfo(CODESET) is "UTF-8". */ -#if HAVE_LANGINFO_CODESET +# if HAVE_LANGINFO_CODESET { const char *cs = nl_langinfo (CODESET); if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0 || strcmp (cs, "UTF-8") == 0) return 1; } -#endif -#ifdef __CYGWIN__ +# endif +# ifdef __CYGWIN__ /* On Cygwin, avoid locale names without encoding suffix, because the locale_charset() function relies on the encoding suffix. Note that LC_ALL is set on the command line. */ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1; -#endif +# endif /* Check whether in the abbreviation of the second month, the second character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only one byte long. This excludes the UTF-8 encoding. */ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4; if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1; -#if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */ +# if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */ /* Check whether the decimal separator is a comma. On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point are nl_langinfo(RADIXCHAR) are both ".". */ if (localeconv () ->decimal_point[0] != ',') return 1; -#endif +# endif return 0; +#endif } _ACEOF @@ -31474,7 +35633,7 @@ variables, and all locales use the UTF-8 encoding. */ #if !(defined __BEOS__ || defined __HAIKU__) /* Check whether the given locale name is recognized by the system. */ -# if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ +# if defined _WIN32 && !defined __CYGWIN__ /* On native Windows, setlocale(category, "") looks at the system settings, not at the environment variables. Also, when an encoding suffix such as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE @@ -31600,9 +35759,14 @@ char buf[16]; int main () { - const char *p; + /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl + imitates locale dependent behaviour by looking at the environment + variables, and all locales use the UTF-8 encoding. */ +#if defined __BEOS__ || defined __HAIKU__ + return 1; +#else /* Check whether the given locale name is recognized by the system. */ -#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ +# if defined _WIN32 && !defined __CYGWIN__ /* On native Windows, setlocale(category, "") looks at the system settings, not at the environment variables. Also, when an encoding suffix such as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE @@ -31610,9 +35774,9 @@ if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0) return 1; -#else +# else if (setlocale (LC_ALL, "") == NULL) return 1; -#endif +# endif /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) is empty, and the behaviour of Tcl 8.4 in this locale is not useful. @@ -31621,32 +35785,36 @@ some unit tests fail. On MirBSD 10, when an unsupported locale is specified, setlocale() succeeds but then nl_langinfo(CODESET) is "UTF-8". */ -#if HAVE_LANGINFO_CODESET +# if HAVE_LANGINFO_CODESET { const char *cs = nl_langinfo (CODESET); if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0 || strcmp (cs, "UTF-8") == 0) return 1; } -#endif -#ifdef __CYGWIN__ +# endif +# ifdef __CYGWIN__ /* On Cygwin, avoid locale names without encoding suffix, because the locale_charset() function relies on the encoding suffix. Note that LC_ALL is set on the command line. */ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1; -#endif +# endif /* Check whether MB_CUR_MAX is > 1. This excludes the dysfunctional locales on Cygwin 1.5.x. */ if (MB_CUR_MAX == 1) return 1; /* Check whether in a month name, no byte in the range 0x80..0x9F occurs. This excludes the UTF-8 encoding (except on MirBSD). */ - t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4; - if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1; - for (p = buf; *p != '\0'; p++) - if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0) - return 1; + { + const char *p; + t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4; + if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1; + for (p = buf; *p != '\0'; p++) + if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0) + return 1; + } return 0; +#endif } _ACEOF @@ -31741,9 +35909,14 @@ char buf[16]; int main () { - const char *p; + /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl + imitates locale dependent behaviour by looking at the environment + variables, and all locales use the UTF-8 encoding. */ +#if defined __BEOS__ || defined __HAIKU__ + return 1; +#else /* Check whether the given locale name is recognized by the system. */ -#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ +# if defined _WIN32 && !defined __CYGWIN__ /* On native Windows, setlocale(category, "") looks at the system settings, not at the environment variables. Also, when an encoding suffix such as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE @@ -31751,9 +35924,9 @@ if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0) return 1; -#else +# else if (setlocale (LC_ALL, "") == NULL) return 1; -#endif +# endif /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) is empty, and the behaviour of Tcl 8.4 in this locale is not useful. @@ -31762,32 +35935,36 @@ some unit tests fail. On MirBSD 10, when an unsupported locale is specified, setlocale() succeeds but then nl_langinfo(CODESET) is "UTF-8". */ -#if HAVE_LANGINFO_CODESET +# if HAVE_LANGINFO_CODESET { const char *cs = nl_langinfo (CODESET); if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0 || strcmp (cs, "UTF-8") == 0) return 1; } -#endif -#ifdef __CYGWIN__ +# endif +# ifdef __CYGWIN__ /* On Cygwin, avoid locale names without encoding suffix, because the locale_charset() function relies on the encoding suffix. Note that LC_ALL is set on the command line. */ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1; -#endif +# endif /* Check whether in a month name, no byte in the range 0x80..0x9F occurs. This excludes the UTF-8 encoding (except on MirBSD). */ - t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4; - if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1; - for (p = buf; *p != '\0'; p++) - if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0) - return 1; + { + const char *p; + t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4; + if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1; + for (p = buf; *p != '\0'; p++) + if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0) + return 1; + } /* Check whether a typical GB18030 multibyte sequence is recognized as a single wide character. This excludes the GB2312 and GBK encodings. */ if (mblen ("\203\062\332\066", 5) != 4) return 1; return 0; +#endif } _ACEOF @@ -31877,7 +36054,7 @@ variables, and all locales use the UTF-8 encoding. */ #if !(defined __BEOS__ || defined __HAIKU__) /* Check whether the given locale name is recognized by the system. */ -# if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ +# if defined _WIN32 && !defined __CYGWIN__ /* On native Windows, setlocale(category, "") looks at the system settings, not at the environment variables. Also, when an encoding suffix such as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE @@ -32004,9 +36181,14 @@ char buf[16]; int main () { - const char *p; + /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl + imitates locale dependent behaviour by looking at the environment + variables, and all locales use the UTF-8 encoding. */ +#if defined __BEOS__ || defined __HAIKU__ + return 1; +#else /* Check whether the given locale name is recognized by the system. */ -#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ +# if defined _WIN32 && !defined __CYGWIN__ /* On native Windows, setlocale(category, "") looks at the system settings, not at the environment variables. Also, when an encoding suffix such as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE @@ -32014,9 +36196,9 @@ if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0) return 1; -#else +# else if (setlocale (LC_ALL, "") == NULL) return 1; -#endif +# endif /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) is empty, and the behaviour of Tcl 8.4 in this locale is not useful. @@ -32025,32 +36207,36 @@ some unit tests fail. On MirBSD 10, when an unsupported locale is specified, setlocale() succeeds but then nl_langinfo(CODESET) is "UTF-8". */ -#if HAVE_LANGINFO_CODESET +# if HAVE_LANGINFO_CODESET { const char *cs = nl_langinfo (CODESET); if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0 || strcmp (cs, "UTF-8") == 0) return 1; } -#endif -#ifdef __CYGWIN__ +# endif +# ifdef __CYGWIN__ /* On Cygwin, avoid locale names without encoding suffix, because the locale_charset() function relies on the encoding suffix. Note that LC_ALL is set on the command line. */ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1; -#endif +# endif /* Check whether in a month name, no byte in the range 0x80..0x9F occurs. This excludes the UTF-8 encoding (except on MirBSD). */ - t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4; - if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1; - for (p = buf; *p != '\0'; p++) - if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0) - return 1; + { + const char *p; + t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4; + if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1; + for (p = buf; *p != '\0'; p++) + if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0) + return 1; + } /* Check whether a typical GB18030 multibyte sequence is recognized as a single wide character. This excludes the GB2312 and GBK encodings. */ if (mblen ("\203\062\332\066", 5) != 4) return 1; return 0; +#endif } _ACEOF @@ -32180,18 +36366,6 @@ fi - : - - - - - - - : - - - - @@ -32260,18 +36434,6 @@ fi - : - - - - - - - : - - - - @@ -32340,15 +36502,302 @@ fi - : + + + + + + nanosleep_save_libs=$LIBS + + # Solaris 2.5.1 needs -lposix4 to get the nanosleep function. + # Solaris 7 prefers the library name -lrt to the obsolescent name -lposix4. + LIB_NANOSLEEP= + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing nanosleep" >&5 +printf %s "checking for library containing nanosleep... " >&6; } +if test ${ac_cv_search_nanosleep+y} +then : + printf %s "(cached) " >&6 +else + ac_func_search_save_LIBS=$LIBS +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char nanosleep (); +int +main (void) +{ +return nanosleep (); + ; + return 0; +} +_ACEOF +for ac_lib in '' rt posix4 +do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + if ac_fn_c_try_link "$LINENO" +then : + ac_cv_search_nanosleep=$ac_res +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if test ${ac_cv_search_nanosleep+y} +then : + break +fi +done +if test ${ac_cv_search_nanosleep+y} +then : + +else + ac_cv_search_nanosleep=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_nanosleep" >&5 +printf "%s\n" "$ac_cv_search_nanosleep" >&6; } +ac_res=$ac_cv_search_nanosleep +if test "$ac_res" != no +then : + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + test "$ac_cv_search_nanosleep" = "none required" || + LIB_NANOSLEEP=$ac_cv_search_nanosleep +fi + + if test "x$ac_cv_search_nanosleep" != xno; then + + + if test $APPLE_UNIVERSAL_BUILD = 1; then + # A universal build on Apple Mac OS X platforms. + # The test result would be 'no (mishandles large arguments)' in 64-bit + # mode but 'yes' in 32-bit mode. But we need a configuration result that + # is valid in both modes. + gl_cv_func_nanosleep='no (mishandles large arguments)' + fi + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working nanosleep" >&5 +printf %s "checking for working nanosleep... " >&6; } +if test ${gl_cv_func_nanosleep+y} +then : + printf %s "(cached) " >&6 +else + + if test "$cross_compiling" = yes +then : + case "$host_os" in linux*) # Guess it halfway works when the kernel is Linux. + gl_cv_func_nanosleep='guessing no (mishandles large arguments)' ;; + mingw*) # Guess no on native Windows. + gl_cv_func_nanosleep='guessing no' ;; + *) # If we don't know, assume the worst. + gl_cv_func_nanosleep='guessing no' ;; + esac + +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + #include + #include + #include + #if HAVE_SYS_TIME_H + #include + #endif + #include + #include + #define TYPE_SIGNED(t) (! ((t) 0 < (t) -1)) + #define TYPE_MAXIMUM(t) \ + ((t) (! TYPE_SIGNED (t) \ + ? (t) -1 \ + : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1))) + + #if HAVE_DECL_ALARM + static void + check_for_SIGALRM (int sig) + { + if (sig != SIGALRM) + _exit (1); + } + #endif + + int + main () + { + static struct timespec ts_sleep; + static struct timespec ts_remaining; + /* Test for major problems first. */ + if (! nanosleep) + return 2; + ts_sleep.tv_sec = 0; + ts_sleep.tv_nsec = 1; + #if HAVE_DECL_ALARM + { + static struct sigaction act; + act.sa_handler = check_for_SIGALRM; + sigemptyset (&act.sa_mask); + sigaction (SIGALRM, &act, NULL); + alarm (1); + if (nanosleep (&ts_sleep, NULL) != 0) + return 3; + /* Test for a minor problem: the handling of large arguments. */ + ts_sleep.tv_sec = TYPE_MAXIMUM (time_t); + ts_sleep.tv_nsec = 999999999; + alarm (1); + if (nanosleep (&ts_sleep, &ts_remaining) != -1) + return 4; + if (errno != EINTR) + return 5; + if (ts_remaining.tv_sec <= TYPE_MAXIMUM (time_t) - 10) + return 6; + } + #else /* A simpler test for native Windows. */ + if (nanosleep (&ts_sleep, &ts_remaining) < 0) + return 3; + #endif + return 0; + } +_ACEOF +if ac_fn_c_try_run "$LINENO" +then : + gl_cv_func_nanosleep=yes +else + case $? in 4|5|6) gl_cv_func_nanosleep='no (mishandles large arguments)';; *) gl_cv_func_nanosleep=no;; + esac +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_nanosleep" >&5 +printf "%s\n" "$gl_cv_func_nanosleep" >&6; } + case "$gl_cv_func_nanosleep" in + *yes) + REPLACE_NANOSLEEP=0 + ;; + *) + REPLACE_NANOSLEEP=1 + case "$gl_cv_func_nanosleep" in + *"mishandles large arguments"*) + +printf "%s\n" "#define HAVE_BUG_BIG_NANOSLEEP 1" >>confdefs.h + + ;; + *) + # The replacement uses select(). Add $LIBSOCKET to $LIB_NANOSLEEP. + for ac_lib in $LIBSOCKET; do + case " $LIB_NANOSLEEP " in + *" $ac_lib "*) ;; + *) LIB_NANOSLEEP="$LIB_NANOSLEEP $ac_lib";; + esac + done + ;; + esac + ;; + esac + else + HAVE_NANOSLEEP=0 + fi + LIBS=$nanosleep_save_libs + + if test $HAVE_NANOSLEEP = 0 || test $REPLACE_NANOSLEEP = 1; then + + + + + + + + + gltests_LIBOBJS="$gltests_LIBOBJS nanosleep.$ac_objext" + + + : + fi + + + + + + if test "$GNULIB_NANOSLEEP" != 1; then + if test "$GNULIB_NANOSLEEP" = 0; then + GNULIB_NANOSLEEP=$gl_module_indicator_condition + else + GNULIB_NANOSLEEP="($GNULIB_NANOSLEEP || $gl_module_indicator_condition)" + fi + fi + + + + + +printf "%s\n" "#define GNULIB_TEST_NANOSLEEP 1" >>confdefs.h + + + + + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether is self-contained" >&5 +printf %s "checking whether is self-contained... " >&6; } +if test ${gl_cv_header_netinet_in_h_selfcontained+y} +then : + printf %s "(cached) " >&6 +else + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main (void) +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + gl_cv_header_netinet_in_h_selfcontained=yes +else + gl_cv_header_netinet_in_h_selfcontained=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_netinet_in_h_selfcontained" >&5 +printf "%s\n" "$gl_cv_header_netinet_in_h_selfcontained" >&6; } + if test $gl_cv_header_netinet_in_h_selfcontained = yes; then + NETINET_IN_H='' + else + NETINET_IN_H='netinet/in.h' + ac_fn_c_check_header_compile "$LINENO" "netinet/in.h" "ac_cv_header_netinet_in_h" "$ac_includes_default" +if test "x$ac_cv_header_netinet_in_h" = xyes +then : + printf "%s\n" "#define HAVE_NETINET_IN_H 1" >>confdefs.h + +fi + + @@ -32356,6 +36805,98 @@ + + if test $gl_cv_have_include_next = yes; then + gl_cv_next_netinet_in_h='<'netinet/in.h'>' + else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 +printf %s "checking absolute name of ... " >&6; } +if test ${gl_cv_next_netinet_in_h+y} +then : + printf %s "(cached) " >&6 +else + + if test $ac_cv_header_netinet_in_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 'netinet/in.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_netinet_in_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | + sed -n "$gl_absolute_header_sed"` + + gl_header=$gl_cv_absolute_netinet_in_h + gl_cv_next_netinet_in_h='"'$gl_header'"' + else + gl_cv_next_netinet_in_h='<'netinet/in.h'>' + fi + + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_netinet_in_h" >&5 +printf "%s\n" "$gl_cv_next_netinet_in_h" >&6; } + fi + NEXT_NETINET_IN_H=$gl_cv_next_netinet_in_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='<'netinet/in.h'>' + else + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' + gl_next_as_first_directive=$gl_cv_next_netinet_in_h + fi + NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H=$gl_next_as_first_directive + + + + + if test $ac_cv_header_netinet_in_h = yes; then + HAVE_NETINET_IN_H=1 + else + HAVE_NETINET_IN_H=0 + fi + + fi + + if test -n "$NETINET_IN_H"; then + GL_GENERATE_NETINET_IN_H_TRUE= + GL_GENERATE_NETINET_IN_H_FALSE='#' +else + GL_GENERATE_NETINET_IN_H_TRUE='#' + GL_GENERATE_NETINET_IN_H_FALSE= +fi + + + + + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5 printf %s "checking for a traditional french locale... " >&6; } if test ${gt_cv_locale_fr+y} @@ -32376,8 +36917,14 @@ struct tm t; char buf[16]; int main () { + /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl + imitates locale dependent behaviour by looking at the environment + variables, and all locales use the UTF-8 encoding. */ +#if defined __BEOS__ || defined __HAIKU__ + return 1; +#else /* Check whether the given locale name is recognized by the system. */ -#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ +# if defined _WIN32 && !defined __CYGWIN__ /* On native Windows, setlocale(category, "") looks at the system settings, not at the environment variables. Also, when an encoding suffix such as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE @@ -32385,9 +36932,9 @@ if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0) return 1; -#else +# else if (setlocale (LC_ALL, "") == NULL) return 1; -#endif +# endif /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) is empty, and the behaviour of Tcl 8.4 in this locale is not useful. @@ -32396,32 +36943,33 @@ some unit tests fail. On MirBSD 10, when an unsupported locale is specified, setlocale() succeeds but then nl_langinfo(CODESET) is "UTF-8". */ -#if HAVE_LANGINFO_CODESET +# if HAVE_LANGINFO_CODESET { const char *cs = nl_langinfo (CODESET); if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0 || strcmp (cs, "UTF-8") == 0) return 1; } -#endif -#ifdef __CYGWIN__ +# endif +# ifdef __CYGWIN__ /* On Cygwin, avoid locale names without encoding suffix, because the locale_charset() function relies on the encoding suffix. Note that LC_ALL is set on the command line. */ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1; -#endif +# endif /* Check whether in the abbreviation of the second month, the second character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only one byte long. This excludes the UTF-8 encoding. */ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4; if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1; -#if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */ +# if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */ /* Check whether the decimal separator is a comma. On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point are nl_langinfo(RADIXCHAR) are both ".". */ if (localeconv () ->decimal_point[0] != ',') return 1; -#endif +# endif return 0; +#endif } _ACEOF @@ -32516,7 +37064,7 @@ variables, and all locales use the UTF-8 encoding. */ #if !(defined __BEOS__ || defined __HAIKU__) /* Check whether the given locale name is recognized by the system. */ -# if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ +# if defined _WIN32 && !defined __CYGWIN__ /* On native Windows, setlocale(category, "") looks at the system settings, not at the environment variables. Also, when an encoding suffix such as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE @@ -32606,23 +37154,128 @@ gt_cv_locale_fr_utf8=none fi fi - fi - ;; + fi + ;; + esac + fi + rm -fr conftest* + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5 +printf "%s\n" "$gt_cv_locale_fr_utf8" >&6; } + LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8 + + + + + + + + if test "$ERRNO_H:$REPLACE_STRERROR_0" != :0; then + REPLACE_PERROR=1 + fi + case ${gl_cv_func_strerror_r_works-unset} in + unset|*yes) + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether perror matches strerror" >&5 +printf %s "checking whether perror matches strerror... " >&6; } +if test ${gl_cv_func_perror_works+y} +then : + printf %s "(cached) " >&6 +else + if test "$cross_compiling" = yes +then : + case "$host_os" in + # Guess yes on native Windows. + mingw*) gl_cv_func_perror_works="guessing yes" ;; + # Otherwise guess no. + *) gl_cv_func_perror_works="guessing no" ;; + esac + +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + #include + #include + #include + +int +main (void) +{ +char *str = strerror (-1); + if (!getenv("CONFTEST_OUTPUT")) return 0; + if (!str) str = ""; + puts (str); + errno = -1; + perror (""); + return 0; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO" +then : + if CONFTEST_OUTPUT=1 ./conftest$EXEEXT >conftest.txt1 2>conftest.txt2 \ + && cmp conftest.txt1 conftest.txt2 >/dev/null; then + gl_cv_func_perror_works=yes + else + gl_cv_func_perror_works=no + fi + rm -rf conftest.txt1 conftest.txt2 +else + gl_cv_func_perror_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 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_perror_works" >&5 +printf "%s\n" "$gl_cv_func_perror_works" >&6; } + case "$gl_cv_func_perror_works" in + *yes) ;; + *) REPLACE_PERROR=1 ;; esac + ;; + *) + REPLACE_PERROR=1 + ;; + esac + + if test $REPLACE_PERROR = 1; then + + + + + + + + + gltests_LIBOBJS="$gltests_LIBOBJS perror.$ac_objext" + + fi + + + + + + if test "$GNULIB_PERROR" != 1; then + if test "$GNULIB_PERROR" = 0; then + GNULIB_PERROR=$gl_module_indicator_condition + else + GNULIB_PERROR="($GNULIB_PERROR || $gl_module_indicator_condition)" fi - rm -fr conftest* + fi -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5 -printf "%s\n" "$gt_cv_locale_fr_utf8" >&6; } - LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8 +printf "%s\n" "#define GNULIB_TEST_PERROR 1" >>confdefs.h - : @@ -32676,10 +37329,12 @@ if test "$cross_compiling" = yes then : case "$host_os" in - # Guess yes on glibc systems. - *-gnu*) gl_cv_func_svid_putenv="guessing yes" ;; - # If we don't know, assume the worst. - *) gl_cv_func_svid_putenv="guessing no" ;; + # Guess yes on glibc systems. + *-gnu* | gnu*) gl_cv_func_svid_putenv="guessing yes" ;; + # Guess no on native Windows. + mingw*) gl_cv_func_svid_putenv="guessing no" ;; + # If we don't know, assume the worst. + *) gl_cv_func_svid_putenv="guessing no" ;; esac else @@ -32841,19 +37496,200 @@ fi - : + if test "$ac_cv_header_winsock2_h" = yes; then + REPLACE_SELECT=1 + else + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether select supports a 0 argument" >&5 +printf %s "checking whether select supports a 0 argument... " >&6; } +if test ${gl_cv_func_select_supports0+y} +then : + printf %s "(cached) " >&6 +else + + if test "$cross_compiling" = yes +then : - : + case "$host_os" in + # Guess no on Interix. + interix*) gl_cv_func_select_supports0="guessing no";; + # Guess yes otherwise. + *) gl_cv_func_select_supports0="guessing yes";; + esac + +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include +#if HAVE_SYS_SELECT_H +#include +#endif +int main () +{ + struct timeval timeout; + timeout.tv_sec = 0; + timeout.tv_usec = 5; + return select (0, (fd_set *)0, (fd_set *)0, (fd_set *)0, &timeout) < 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO" +then : + gl_cv_func_select_supports0=yes +else + gl_cv_func_select_supports0=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 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_select_supports0" >&5 +printf "%s\n" "$gl_cv_func_select_supports0" >&6; } + case "$gl_cv_func_select_supports0" in + *yes) ;; + *) REPLACE_SELECT=1 ;; + esac + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether select detects invalid fds" >&5 +printf %s "checking whether select detects invalid fds... " >&6; } +if test ${gl_cv_func_select_detects_ebadf+y} +then : + printf %s "(cached) " >&6 +else + + if test "$cross_compiling" = yes +then : + + case "$host_os" in + # Guess yes on Linux systems. + linux-* | linux) gl_cv_func_select_detects_ebadf="guessing yes" ;; + # Guess yes on glibc systems. + *-gnu* | gnu*) gl_cv_func_select_detects_ebadf="guessing yes" ;; + # If we don't know, assume the worst. + *) gl_cv_func_select_detects_ebadf="guessing no" ;; + esac + +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include +#if HAVE_SYS_SELECT_H +# include +#endif +#include +#include + +int +main (void) +{ + + fd_set set; + dup2(0, 16); + FD_ZERO(&set); + FD_SET(16, &set); + close(16); + struct timeval timeout; + timeout.tv_sec = 0; + timeout.tv_usec = 5; + return select (17, &set, NULL, NULL, &timeout) != -1 || errno != EBADF; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO" +then : + gl_cv_func_select_detects_ebadf=yes +else + gl_cv_func_select_detects_ebadf=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 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_select_detects_ebadf" >&5 +printf "%s\n" "$gl_cv_func_select_detects_ebadf" >&6; } + case $gl_cv_func_select_detects_ebadf in + *yes) ;; + *) REPLACE_SELECT=1 ;; + esac + fi + + LIB_SELECT="$LIBSOCKET" + if test $REPLACE_SELECT = 1; then + case "$host_os" in + mingw*) + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#define WIN32_LEAN_AND_MEAN +#include +int +main () +{ + MsgWaitForMultipleObjects (0, NULL, 0, 0, 0); + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + +else + LIB_SELECT="$LIB_SELECT -luser32" +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + ;; + esac + fi + + + if test $REPLACE_SELECT = 1; then + + + + + + + + + gltests_LIBOBJS="$gltests_LIBOBJS select.$ac_objext" + + fi + if test "$GNULIB_SELECT" != 1; then + if test "$GNULIB_SELECT" = 0; then + GNULIB_SELECT=$gl_module_indicator_condition + else + GNULIB_SELECT="($GNULIB_SELECT || $gl_module_indicator_condition)" + fi + fi + + + + + +printf "%s\n" "#define GNULIB_TEST_SELECT 1" >>confdefs.h + + + + if test $ac_cv_func_setenv = no; then @@ -32868,10 +37704,10 @@ if test "$cross_compiling" = yes then : case "$host_os" in - # Guess yes on glibc systems. - *-gnu*) gl_cv_func_setenv_works="guessing yes" ;; - # If we don't know, assume the worst. - *) gl_cv_func_setenv_works="guessing no" ;; + # Guess yes on glibc systems. + *-gnu* | gnu*) gl_cv_func_setenv_works="guessing yes" ;; + # If we don't know, assume the worst. + *) gl_cv_func_setenv_works="guessing no" ;; esac else @@ -32983,7 +37819,7 @@ gltests_LIBOBJS="$gltests_LIBOBJS setlocale.$ac_objext" - : + : fi @@ -33030,8 +37866,14 @@ struct tm t; char buf[16]; int main () { + /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl + imitates locale dependent behaviour by looking at the environment + variables, and all locales use the UTF-8 encoding. */ +#if defined __BEOS__ || defined __HAIKU__ + return 1; +#else /* Check whether the given locale name is recognized by the system. */ -#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ +# if defined _WIN32 && !defined __CYGWIN__ /* On native Windows, setlocale(category, "") looks at the system settings, not at the environment variables. Also, when an encoding suffix such as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE @@ -33039,9 +37881,9 @@ if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0) return 1; -#else +# else if (setlocale (LC_ALL, "") == NULL) return 1; -#endif +# endif /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) is empty, and the behaviour of Tcl 8.4 in this locale is not useful. @@ -33050,32 +37892,33 @@ some unit tests fail. On MirBSD 10, when an unsupported locale is specified, setlocale() succeeds but then nl_langinfo(CODESET) is "UTF-8". */ -#if HAVE_LANGINFO_CODESET +# if HAVE_LANGINFO_CODESET { const char *cs = nl_langinfo (CODESET); if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0 || strcmp (cs, "UTF-8") == 0) return 1; } -#endif -#ifdef __CYGWIN__ +# endif +# ifdef __CYGWIN__ /* On Cygwin, avoid locale names without encoding suffix, because the locale_charset() function relies on the encoding suffix. Note that LC_ALL is set on the command line. */ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1; -#endif +# endif /* Check whether in the abbreviation of the second month, the second character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only one byte long. This excludes the UTF-8 encoding. */ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4; if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1; -#if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */ +# if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */ /* Check whether the decimal separator is a comma. On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point are nl_langinfo(RADIXCHAR) are both ".". */ if (localeconv () ->decimal_point[0] != ',') return 1; -#endif +# endif return 0; +#endif } _ACEOF @@ -33170,7 +38013,7 @@ variables, and all locales use the UTF-8 encoding. */ #if !(defined __BEOS__ || defined __HAIKU__) /* Check whether the given locale name is recognized by the system. */ -# if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ +# if defined _WIN32 && !defined __CYGWIN__ /* On native Windows, setlocale(category, "") looks at the system settings, not at the environment variables. Also, when an encoding suffix such as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE @@ -33296,9 +38139,14 @@ char buf[16]; int main () { - const char *p; + /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl + imitates locale dependent behaviour by looking at the environment + variables, and all locales use the UTF-8 encoding. */ +#if defined __BEOS__ || defined __HAIKU__ + return 1; +#else /* Check whether the given locale name is recognized by the system. */ -#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ +# if defined _WIN32 && !defined __CYGWIN__ /* On native Windows, setlocale(category, "") looks at the system settings, not at the environment variables. Also, when an encoding suffix such as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE @@ -33306,9 +38154,9 @@ if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0) return 1; -#else +# else if (setlocale (LC_ALL, "") == NULL) return 1; -#endif +# endif /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) is empty, and the behaviour of Tcl 8.4 in this locale is not useful. @@ -33317,32 +38165,36 @@ some unit tests fail. On MirBSD 10, when an unsupported locale is specified, setlocale() succeeds but then nl_langinfo(CODESET) is "UTF-8". */ -#if HAVE_LANGINFO_CODESET +# if HAVE_LANGINFO_CODESET { const char *cs = nl_langinfo (CODESET); if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0 || strcmp (cs, "UTF-8") == 0) return 1; } -#endif -#ifdef __CYGWIN__ +# endif +# ifdef __CYGWIN__ /* On Cygwin, avoid locale names without encoding suffix, because the locale_charset() function relies on the encoding suffix. Note that LC_ALL is set on the command line. */ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1; -#endif +# endif /* Check whether MB_CUR_MAX is > 1. This excludes the dysfunctional locales on Cygwin 1.5.x. */ if (MB_CUR_MAX == 1) return 1; /* Check whether in a month name, no byte in the range 0x80..0x9F occurs. This excludes the UTF-8 encoding (except on MirBSD). */ - t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4; - if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1; - for (p = buf; *p != '\0'; p++) - if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0) - return 1; + { + const char *p; + t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4; + if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1; + for (p = buf; *p != '\0'; p++) + if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0) + return 1; + } return 0; +#endif } _ACEOF @@ -33437,9 +38289,14 @@ char buf[16]; int main () { - const char *p; + /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl + imitates locale dependent behaviour by looking at the environment + variables, and all locales use the UTF-8 encoding. */ +#if defined __BEOS__ || defined __HAIKU__ + return 1; +#else /* Check whether the given locale name is recognized by the system. */ -#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ +# if defined _WIN32 && !defined __CYGWIN__ /* On native Windows, setlocale(category, "") looks at the system settings, not at the environment variables. Also, when an encoding suffix such as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE @@ -33447,9 +38304,9 @@ if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0) return 1; -#else +# else if (setlocale (LC_ALL, "") == NULL) return 1; -#endif +# endif /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) is empty, and the behaviour of Tcl 8.4 in this locale is not useful. @@ -33458,32 +38315,36 @@ some unit tests fail. On MirBSD 10, when an unsupported locale is specified, setlocale() succeeds but then nl_langinfo(CODESET) is "UTF-8". */ -#if HAVE_LANGINFO_CODESET +# if HAVE_LANGINFO_CODESET { const char *cs = nl_langinfo (CODESET); if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0 || strcmp (cs, "UTF-8") == 0) return 1; } -#endif -#ifdef __CYGWIN__ +# endif +# ifdef __CYGWIN__ /* On Cygwin, avoid locale names without encoding suffix, because the locale_charset() function relies on the encoding suffix. Note that LC_ALL is set on the command line. */ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1; -#endif +# endif /* Check whether in a month name, no byte in the range 0x80..0x9F occurs. This excludes the UTF-8 encoding (except on MirBSD). */ - t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4; - if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1; - for (p = buf; *p != '\0'; p++) - if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0) - return 1; + { + const char *p; + t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4; + if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1; + for (p = buf; *p != '\0'; p++) + if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0) + return 1; + } /* Check whether a typical GB18030 multibyte sequence is recognized as a single wide character. This excludes the GB2312 and GBK encodings. */ if (mblen ("\203\062\332\066", 5) != 4) return 1; return 0; +#endif } _ACEOF @@ -33547,6 +38408,40 @@ + if test "$ac_cv_header_winsock2_h" = yes; then + + + + + + + + + gltests_LIBOBJS="$gltests_LIBOBJS setsockopt.$ac_objext" + + fi + + + + + + if test "$GNULIB_SETSOCKOPT" != 1; then + if test "$GNULIB_SETSOCKOPT" = 0; then + GNULIB_SETSOCKOPT=$gl_module_indicator_condition + else + GNULIB_SETSOCKOPT="($GNULIB_SETSOCKOPT || $gl_module_indicator_condition)" + fi + fi + + + + + +printf "%s\n" "#define GNULIB_TEST_SETSOCKOPT 1" >>confdefs.h + + + + ac_fn_c_check_header_compile "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default" if test "x$ac_cv_header_stdint_h" = xyes then : @@ -33641,6 +38536,130 @@ + ac_fn_c_check_decl "$LINENO" "sleep" "ac_cv_have_decl_sleep" "#include +" +if test "x$ac_cv_have_decl_sleep" = xyes +then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +printf "%s\n" "#define HAVE_DECL_SLEEP $ac_have_decl" >>confdefs.h + + + if test $ac_cv_have_decl_sleep != yes; then + HAVE_SLEEP=0 + else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working sleep" >&5 +printf %s "checking for working sleep... " >&6; } +if test ${gl_cv_func_sleep_works+y} +then : + printf %s "(cached) " >&6 +else + if test "$cross_compiling" = yes +then : + case "$host_os" in + # Guess yes on glibc systems. + *-gnu* | gnu*) gl_cv_func_sleep_works="guessing yes" ;; + # Guess no on native Windows. + mingw*) gl_cv_func_sleep_works="guessing no" ;; + # If we don't know, assume the worst. + *) gl_cv_func_sleep_works="guessing no" ;; + esac + +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include +#include +static void +handle_alarm (int sig) +{ + if (sig != SIGALRM) + _exit (2); +} + +int +main (void) +{ + + /* Failure to compile this test due to missing alarm is okay, + since all such platforms (mingw) also lack sleep. */ + unsigned int pentecost = 50 * 24 * 60 * 60; /* 50 days. */ + unsigned int remaining; + signal (SIGALRM, handle_alarm); + alarm (1); + remaining = sleep (pentecost); + if (remaining > pentecost) + return 3; + if (remaining <= pentecost - 10) + return 4; + return 0; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO" +then : + gl_cv_func_sleep_works=yes +else + gl_cv_func_sleep_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 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_sleep_works" >&5 +printf "%s\n" "$gl_cv_func_sleep_works" >&6; } + case "$gl_cv_func_sleep_works" in + *yes) ;; + *) + REPLACE_SLEEP=1 + ;; + esac + fi + + if test $HAVE_SLEEP = 0 || test $REPLACE_SLEEP = 1; then + + + + + + + + + gltests_LIBOBJS="$gltests_LIBOBJS sleep.$ac_objext" + + fi + + + + + + if test "$GNULIB_SLEEP" != 1; then + if test "$GNULIB_SLEEP" = 0; then + GNULIB_SLEEP=$gl_module_indicator_condition + else + GNULIB_SLEEP="($GNULIB_SLEEP || $gl_module_indicator_condition)" + fi + fi + + + + + +printf "%s\n" "#define GNULIB_TEST_SLEEP 1" >>confdefs.h + + + + + + gl_cv_func_snprintf_usable=no ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf" if test "x$ac_cv_func_snprintf" = xyes @@ -33662,7 +38681,12 @@ if test "$cross_compiling" = yes then : - gl_cv_func_snprintf_size1="guessing yes" + case "$host_os" in + # Guess yes on native Windows. + mingw*) gl_cv_func_snprintf_size1="guessing yes" ;; + *) gl_cv_func_snprintf_size1="guessing yes" ;; + esac + else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -33711,66 +38735,229 @@ *yes) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether printf supports POSIX/XSI format strings with positions" >&5 -printf %s "checking whether printf supports POSIX/XSI format strings with positions... " >&6; } -if test ${gl_cv_func_printf_positions+y} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether printf supports POSIX/XSI format strings with positions" >&5 +printf %s "checking whether printf supports POSIX/XSI format strings with positions... " >&6; } +if test ${gl_cv_func_printf_positions+y} +then : + printf %s "(cached) " >&6 +else + + if test "$cross_compiling" = yes +then : + + case "$host_os" in + netbsd[1-3]* | netbsdelf[1-3]* | netbsdaout[1-3]* | netbsdcoff[1-3]*) + gl_cv_func_printf_positions="guessing no";; + beos*) gl_cv_func_printf_positions="guessing no";; + # Guess no on native Windows. + mingw* | pw*) gl_cv_func_printf_positions="guessing no";; + *) gl_cv_func_printf_positions="guessing yes";; + esac + +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#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); +} +_ACEOF +if ac_fn_c_try_run "$LINENO" +then : + gl_cv_func_printf_positions=yes +else + gl_cv_func_printf_positions=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 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_positions" >&5 +printf "%s\n" "$gl_cv_func_printf_positions" >&6; } + + case "$gl_cv_func_printf_positions" in + *yes) + gl_cv_func_snprintf_usable=yes + ;; + esac + ;; + esac + ;; + esac + fi + if test $gl_cv_func_snprintf_usable = no; then + + + + + + + + + + + gltests_LIBOBJS="$gltests_LIBOBJS snprintf.$ac_objext" + + if test $ac_cv_func_snprintf = yes; then + REPLACE_SNPRINTF=1 + 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 + fi + + + + + + + if test "$GNULIB_SNPRINTF" != 1; then + if test "$GNULIB_SNPRINTF" = 0; then + GNULIB_SNPRINTF=$gl_module_indicator_condition + else + GNULIB_SNPRINTF="($GNULIB_SNPRINTF || $gl_module_indicator_condition)" + fi + fi + + + + + +printf "%s\n" "#define GNULIB_TEST_SNPRINTF 1" >>confdefs.h + + + + + +printf "%s\n" "#define GNULIB_SNPRINTF $gl_module_indicator_condition" >>confdefs.h + + + + if test "$ac_cv_header_winsock2_h" = yes; then + + + + + + + + + gltests_LIBOBJS="$gltests_LIBOBJS socket.$ac_objext" + + fi + # When this module is used, sockets may actually occur as file descriptors, + # hence it is worth warning if the modules 'close' and 'ioctl' are not used. + + + + if test "$ac_cv_header_winsock2_h" = yes; then + UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=1 + SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=1 + fi + + + + + + if test "$GNULIB_SOCKET" != 1; then + if test "$GNULIB_SOCKET" = 0; then + GNULIB_SOCKET=$gl_module_indicator_condition + else + GNULIB_SOCKET="($GNULIB_SOCKET || $gl_module_indicator_condition)" + fi + fi + + + + + +printf "%s\n" "#define GNULIB_TEST_SOCKET 1" >>confdefs.h + + + + + + ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" " +/* is not needed according to POSIX, but the + in i386-unknown-freebsd4.10 and + powerpc-apple-darwin5.5 required it. */ +#include +#if HAVE_SYS_SOCKET_H +# include +#elif HAVE_WS2TCPIP_H +# include +#endif + +" +if test "x$ac_cv_type_socklen_t" = xyes then : - printf %s "(cached) " >&6 -else - if test "$cross_compiling" = yes +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for socklen_t equivalent" >&5 +printf %s "checking for socklen_t equivalent... " >&6; } +if test ${gl_cv_socklen_t_equiv+y} then : - - case "$host_os" in - netbsd[1-3]* | netbsdelf[1-3]* | netbsdaout[1-3]* | netbsdcoff[1-3]*) - gl_cv_func_printf_positions="guessing no";; - beos*) gl_cv_func_printf_positions="guessing no";; - mingw* | pw*) gl_cv_func_printf_positions="guessing no";; - *) gl_cv_func_printf_positions="guessing yes";; - esac - + printf %s "(cached) " >&6 else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + # Systems have either "struct sockaddr *" or + # "void *" as the second argument to getpeername + gl_cv_socklen_t_equiv= + for arg2 in "struct sockaddr" void; do + for t in int size_t "unsigned int" "long int" "unsigned long int"; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ +#include + #include -#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 () + int getpeername (int, $arg2 *, $t *); +int +main (void) { - sprintf (buf, format, 33, 55); - return (strcmp (buf, "55 33") != 0); +$t len; + getpeername (0, 0, &len); + ; + return 0; } _ACEOF -if ac_fn_c_try_run "$LINENO" +if ac_fn_c_try_compile "$LINENO" then : - gl_cv_func_printf_positions=yes -else - gl_cv_func_printf_positions=no + gl_cv_socklen_t_equiv="$t" fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + test "$gl_cv_socklen_t_equiv" != "" && break + done + test "$gl_cv_socklen_t_equiv" != "" && break + done + if test "$gl_cv_socklen_t_equiv" = ""; then + as_fn_error $? "Cannot find a type to use in place of socklen_t" "$LINENO" 5 + fi + fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_socklen_t_equiv" >&5 +printf "%s\n" "$gl_cv_socklen_t_equiv" >&6; } +printf "%s\n" "#define socklen_t $gl_cv_socklen_t_equiv" >>confdefs.h fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_positions" >&5 -printf "%s\n" "$gl_cv_func_printf_positions" >&6; } - case "$gl_cv_func_printf_positions" in - *yes) - gl_cv_func_snprintf_usable=yes - ;; - esac - ;; - esac - ;; - esac - fi - if test $gl_cv_func_snprintf_usable = no; then @@ -33780,47 +38967,51 @@ + if test $ac_cv_have_decl_strerror_r = no; then + HAVE_DECL_STRERROR_R=0 + fi - gltests_LIBOBJS="$gltests_LIBOBJS snprintf.$ac_objext" + if test $ac_cv_func_strerror_r = yes; then + if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then + if test $gl_cv_func_strerror_r_posix_signature = yes; then + case "$gl_cv_func_strerror_r_works" in + *no) REPLACE_STRERROR_R=1 ;; + esac + else + REPLACE_STRERROR_R=1 + fi + else + REPLACE_STRERROR_R=1 + fi + fi - if test $ac_cv_func_snprintf = yes; then - REPLACE_SNPRINTF=1 - else + if test $HAVE_DECL_STRERROR_R = 0 || test $REPLACE_STRERROR_R = 1; then - : - if test $ac_cv_have_decl_snprintf = yes; then - REPLACE_SNPRINTF=1 - fi - fi - : - fi - : + gltests_LIBOBJS="$gltests_LIBOBJS strerror_r.$ac_objext" - if test $ac_cv_have_decl_snprintf = no; then - HAVE_DECL_SNPRINTF=0 - fi + fi - if test "$GNULIB_SNPRINTF" != 1; then - if test "$GNULIB_SNPRINTF" = 0; then - GNULIB_SNPRINTF=$gl_module_indicator_condition + if test "$GNULIB_STRERROR_R" != 1; then + if test "$GNULIB_STRERROR_R" = 0; then + GNULIB_STRERROR_R=$gl_module_indicator_condition else - GNULIB_SNPRINTF="($GNULIB_SNPRINTF || $gl_module_indicator_condition)" + GNULIB_STRERROR_R="($GNULIB_STRERROR_R || $gl_module_indicator_condition)" fi fi @@ -33828,15 +39019,13 @@ -printf "%s\n" "#define GNULIB_TEST_SNPRINTF 1" >>confdefs.h - - +printf "%s\n" "#define GNULIB_TEST_STRERROR_R 1" >>confdefs.h -printf "%s\n" "#define GNULIB_SNPRINTF $gl_module_indicator_condition" >>confdefs.h +printf "%s\n" "#define GNULIB_STRERROR_R_POSIX $gl_module_indicator_condition" >>confdefs.h @@ -33906,24 +39095,6 @@ fi - : - - - - - - - : - - - - - - - : - - - @@ -33993,24 +39164,6 @@ fi - : - - - - - - - : - - - - - - - - - : - @@ -34027,10 +39180,12 @@ if test "$cross_compiling" = yes then : case "$host_os" in - # Guess yes on glibc systems. - *-gnu*) gl_cv_func_symlink_works="guessing yes" ;; - # If we don't know, assume the worst. - *) gl_cv_func_symlink_works="guessing no" ;; + # Guess yes on Linux systems. + linux-* | linux) gl_cv_func_symlink_works="guessing yes" ;; + # Guess yes on glibc systems. + *-gnu* | gnu*) gl_cv_func_symlink_works="guessing yes" ;; + # If we don't know, assume the worst. + *) gl_cv_func_symlink_works="guessing no" ;; esac else @@ -34112,7 +39267,223 @@ - : + + if test $ac_cv_header_sys_ioctl_h = yes; then + HAVE_SYS_IOCTL_H=1 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether declares ioctl" >&5 +printf %s "checking whether declares ioctl... " >&6; } +if test ${gl_cv_decl_ioctl_in_sys_ioctl_h+y} +then : + printf %s "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +int +main (void) +{ +(void) ioctl; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + gl_cv_decl_ioctl_in_sys_ioctl_h=yes +else + gl_cv_decl_ioctl_in_sys_ioctl_h=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_ioctl_in_sys_ioctl_h" >&5 +printf "%s\n" "$gl_cv_decl_ioctl_in_sys_ioctl_h" >&6; } + else + HAVE_SYS_IOCTL_H=0 + fi + + + + + + + + + + + if test $gl_cv_have_include_next = yes; then + gl_cv_next_sys_ioctl_h='<'sys/ioctl.h'>' + else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 +printf %s "checking absolute name of ... " >&6; } +if test ${gl_cv_next_sys_ioctl_h+y} +then : + printf %s "(cached) " >&6 +else + + if test $ac_cv_header_sys_ioctl_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 'sys/ioctl.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_sys_ioctl_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | + sed -n "$gl_absolute_header_sed"` + + gl_header=$gl_cv_absolute_sys_ioctl_h + gl_cv_next_sys_ioctl_h='"'$gl_header'"' + else + gl_cv_next_sys_ioctl_h='<'sys/ioctl.h'>' + fi + + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_ioctl_h" >&5 +printf "%s\n" "$gl_cv_next_sys_ioctl_h" >&6; } + fi + NEXT_SYS_IOCTL_H=$gl_cv_next_sys_ioctl_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='<'sys/ioctl.h'>' + else + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' + gl_next_as_first_directive=$gl_cv_next_sys_ioctl_h + fi + NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H=$gl_next_as_first_directive + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + if test $gl_cv_have_include_next = yes; then + gl_cv_next_sys_uio_h='<'sys/uio.h'>' + else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 +printf %s "checking absolute name of ... " >&6; } +if test ${gl_cv_next_sys_uio_h+y} +then : + printf %s "(cached) " >&6 +else + + if test $ac_cv_header_sys_uio_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 'sys/uio.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_sys_uio_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | + sed -n "$gl_absolute_header_sed"` + + gl_header=$gl_cv_absolute_sys_uio_h + gl_cv_next_sys_uio_h='"'$gl_header'"' + else + gl_cv_next_sys_uio_h='<'sys/uio.h'>' + fi + + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_uio_h" >&5 +printf "%s\n" "$gl_cv_next_sys_uio_h" >&6; } + fi + NEXT_SYS_UIO_H=$gl_cv_next_sys_uio_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='<'sys/uio.h'>' + else + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' + gl_next_as_first_directive=$gl_cv_next_sys_uio_h + fi + NEXT_AS_FIRST_DIRECTIVE_SYS_UIO_H=$gl_next_as_first_directive + + + + + if test $ac_cv_header_sys_uio_h = yes; then + HAVE_SYS_UIO_H=1 + else + HAVE_SYS_UIO_H=0 + fi + @@ -34257,12 +39628,6 @@ - : - - - - - fi @@ -34288,21 +39653,9 @@ - : - - - - - if test $ac_cv_func_vasnprintf = no; then - : - - - - - @@ -34403,8 +39756,14 @@ struct tm t; char buf[16]; int main () { + /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl + imitates locale dependent behaviour by looking at the environment + variables, and all locales use the UTF-8 encoding. */ +#if defined __BEOS__ || defined __HAIKU__ + return 1; +#else /* Check whether the given locale name is recognized by the system. */ -#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ +# if defined _WIN32 && !defined __CYGWIN__ /* On native Windows, setlocale(category, "") looks at the system settings, not at the environment variables. Also, when an encoding suffix such as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE @@ -34412,9 +39771,9 @@ if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0) return 1; -#else +# else if (setlocale (LC_ALL, "") == NULL) return 1; -#endif +# endif /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) is empty, and the behaviour of Tcl 8.4 in this locale is not useful. @@ -34423,32 +39782,33 @@ some unit tests fail. On MirBSD 10, when an unsupported locale is specified, setlocale() succeeds but then nl_langinfo(CODESET) is "UTF-8". */ -#if HAVE_LANGINFO_CODESET +# if HAVE_LANGINFO_CODESET { const char *cs = nl_langinfo (CODESET); if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0 || strcmp (cs, "UTF-8") == 0) return 1; } -#endif -#ifdef __CYGWIN__ +# endif +# ifdef __CYGWIN__ /* On Cygwin, avoid locale names without encoding suffix, because the locale_charset() function relies on the encoding suffix. Note that LC_ALL is set on the command line. */ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1; -#endif +# endif /* Check whether in the abbreviation of the second month, the second character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only one byte long. This excludes the UTF-8 encoding. */ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4; if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1; -#if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */ +# if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */ /* Check whether the decimal separator is a comma. On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point are nl_langinfo(RADIXCHAR) are both ".". */ if (localeconv () ->decimal_point[0] != ',') return 1; -#endif +# endif return 0; +#endif } _ACEOF @@ -34543,7 +39903,7 @@ variables, and all locales use the UTF-8 encoding. */ #if !(defined __BEOS__ || defined __HAIKU__) /* Check whether the given locale name is recognized by the system. */ -# if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ +# if defined _WIN32 && !defined __CYGWIN__ /* On native Windows, setlocale(category, "") looks at the system settings, not at the environment variables. Also, when an encoding suffix such as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE @@ -34669,9 +40029,14 @@ char buf[16]; int main () { - const char *p; + /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl + imitates locale dependent behaviour by looking at the environment + variables, and all locales use the UTF-8 encoding. */ +#if defined __BEOS__ || defined __HAIKU__ + return 1; +#else /* Check whether the given locale name is recognized by the system. */ -#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ +# if defined _WIN32 && !defined __CYGWIN__ /* On native Windows, setlocale(category, "") looks at the system settings, not at the environment variables. Also, when an encoding suffix such as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE @@ -34679,9 +40044,9 @@ if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0) return 1; -#else +# else if (setlocale (LC_ALL, "") == NULL) return 1; -#endif +# endif /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) is empty, and the behaviour of Tcl 8.4 in this locale is not useful. @@ -34690,32 +40055,36 @@ some unit tests fail. On MirBSD 10, when an unsupported locale is specified, setlocale() succeeds but then nl_langinfo(CODESET) is "UTF-8". */ -#if HAVE_LANGINFO_CODESET +# if HAVE_LANGINFO_CODESET { const char *cs = nl_langinfo (CODESET); if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0 || strcmp (cs, "UTF-8") == 0) return 1; } -#endif -#ifdef __CYGWIN__ +# endif +# ifdef __CYGWIN__ /* On Cygwin, avoid locale names without encoding suffix, because the locale_charset() function relies on the encoding suffix. Note that LC_ALL is set on the command line. */ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1; -#endif +# endif /* Check whether MB_CUR_MAX is > 1. This excludes the dysfunctional locales on Cygwin 1.5.x. */ if (MB_CUR_MAX == 1) return 1; /* Check whether in a month name, no byte in the range 0x80..0x9F occurs. This excludes the UTF-8 encoding (except on MirBSD). */ - t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4; - if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1; - for (p = buf; *p != '\0'; p++) - if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0) - return 1; + { + const char *p; + t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4; + if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1; + for (p = buf; *p != '\0'; p++) + if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0) + return 1; + } return 0; +#endif } _ACEOF @@ -34810,9 +40179,14 @@ char buf[16]; int main () { - const char *p; + /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl + imitates locale dependent behaviour by looking at the environment + variables, and all locales use the UTF-8 encoding. */ +#if defined __BEOS__ || defined __HAIKU__ + return 1; +#else /* Check whether the given locale name is recognized by the system. */ -#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ +# if defined _WIN32 && !defined __CYGWIN__ /* On native Windows, setlocale(category, "") looks at the system settings, not at the environment variables. Also, when an encoding suffix such as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE @@ -34820,9 +40194,9 @@ if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0) return 1; -#else +# else if (setlocale (LC_ALL, "") == NULL) return 1; -#endif +# endif /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) is empty, and the behaviour of Tcl 8.4 in this locale is not useful. @@ -34831,32 +40205,36 @@ some unit tests fail. On MirBSD 10, when an unsupported locale is specified, setlocale() succeeds but then nl_langinfo(CODESET) is "UTF-8". */ -#if HAVE_LANGINFO_CODESET +# if HAVE_LANGINFO_CODESET { const char *cs = nl_langinfo (CODESET); if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0 || strcmp (cs, "UTF-8") == 0) return 1; } -#endif -#ifdef __CYGWIN__ +# endif +# ifdef __CYGWIN__ /* On Cygwin, avoid locale names without encoding suffix, because the locale_charset() function relies on the encoding suffix. Note that LC_ALL is set on the command line. */ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1; -#endif +# endif /* Check whether in a month name, no byte in the range 0x80..0x9F occurs. This excludes the UTF-8 encoding (except on MirBSD). */ - t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4; - if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1; - for (p = buf; *p != '\0'; p++) - if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0) - return 1; + { + const char *p; + t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4; + if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1; + for (p = buf; *p != '\0'; p++) + if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0) + return 1; + } /* Check whether a typical GB18030 multibyte sequence is recognized as a single wide character. This excludes the GB2312 and GBK encodings. */ if (mblen ("\203\062\332\066", 5) != 4) return 1; return 0; +#endif } _ACEOF @@ -34998,7 +40376,15 @@ if test "$gl_gcc_warnings" = yes; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Werror -Wunknown-warning-option" >&5 + + 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 + + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Werror -Wunknown-warning-option" >&5 printf %s "checking whether C compiler handles -Werror -Wunknown-warning-option... " >&6; } if test ${gl_cv_warn_c__Werror__Wunknown_warning_option+y} then : @@ -35038,6 +40424,14 @@ gl_unknown_warnings_are_errors= fi + 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 + + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Werror" >&5 printf %s "checking whether C compiler handles -Werror... " >&6; } @@ -35097,19 +40491,25 @@ nw="$nw -Wstrict-overflow" # regexec.c + 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 + + if test -n "$GCC"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -Wno-missing-field-initializers is supported" >&5 printf %s "checking whether -Wno-missing-field-initializers is supported... " >&6; } - if test ${gl_cv_cc_nomfi_supported+y} +if test ${gl_cv_cc_nomfi_supported+y} then : printf %s "(cached) " >&6 else - - gl_save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -W -Werror -Wno-missing-field-initializers" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + gl_save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -W -Werror -Wno-missing-field-initializers" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -35127,30 +40527,29 @@ gl_cv_cc_nomfi_supported=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS="$gl_save_CFLAGS" -fi + CFLAGS="$gl_save_CFLAGS" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_nomfi_supported" >&5 +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_nomfi_supported" >&5 printf "%s\n" "$gl_cv_cc_nomfi_supported" >&6; } if test "$gl_cv_cc_nomfi_supported" = yes; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -Wno-missing-field-initializers is needed" >&5 printf %s "checking whether -Wno-missing-field-initializers is needed... " >&6; } - if test ${gl_cv_cc_nomfi_needed+y} +if test ${gl_cv_cc_nomfi_needed+y} then : printf %s "(cached) " >&6 else - - gl_save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -W -Werror" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + gl_save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -W -Werror" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int f (void) - { - typedef struct { int a; int b; } s_t; - s_t s1 = { 0, }; - return s1.b; - } + { + typedef struct { int a; int b; } s_t; + s_t s1 = { 0, }; + return s1.b; + } int main (void) @@ -35167,24 +40566,22 @@ gl_cv_cc_nomfi_needed=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS="$gl_save_CFLAGS" + CFLAGS="$gl_save_CFLAGS" fi - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_nomfi_needed" >&5 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_nomfi_needed" >&5 printf "%s\n" "$gl_cv_cc_nomfi_needed" >&6; } fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -Wuninitialized is supported" >&5 printf %s "checking whether -Wuninitialized is supported... " >&6; } - if test ${gl_cv_cc_uninitialized_supported+y} +if test ${gl_cv_cc_uninitialized_supported+y} then : printf %s "(cached) " >&6 else - - gl_save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -Werror -Wuninitialized" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + gl_save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -Werror -Wuninitialized" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -35202,10 +40599,10 @@ gl_cv_cc_uninitialized_supported=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS="$gl_save_CFLAGS" -fi + CFLAGS="$gl_save_CFLAGS" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_uninitialized_supported" >&5 +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_uninitialized_supported" >&5 printf "%s\n" "$gl_cv_cc_uninitialized_supported" >&6; } fi @@ -35214,18 +40611,17 @@ # To compare this list to your installed GCC's, run this Bash command: # # comm -3 \ - # <(sed -n 's/^ *\(-[^ ]*\) .*/\1/p' manywarnings.m4 | sort) \ - # <(gcc --help=warnings | sed -n 's/^ \(-[^ ]*\) .*/\1/p' | sort | - # grep -v -x -F -f <( - # awk '/^[^#]/ {print ws}' ../build-aux/gcc-warning.spec)) + # <((sed -n 's/^ *\(-[^ 0-9][^ ]*\) .*/\1/p' manywarnings.m4; \ + # awk '/^[^#]/ {print ws}' ../build-aux/gcc-warning.spec) | sort) \ + # <(LC_ALL=C gcc --help=warnings | sed -n 's/^ \(-[^ ]*\) .*/\1/p' | sort) gl_manywarn_set= for gl_manywarn_item in -fno-common \ -W \ - -Wabi \ -Waddress \ -Waggressive-loop-optimizations \ -Wall \ + -Wattribute-alias \ -Wattributes \ -Wbad-function-cast \ -Wbool-compare \ @@ -35233,8 +40629,9 @@ -Wbuiltin-declaration-mismatch \ -Wbuiltin-macro-redefined \ -Wcast-align \ + -Wcast-align=strict \ + -Wcast-function-type \ -Wchar-subscripts \ - -Wchkp \ -Wclobbered \ -Wcomment \ -Wcomments \ @@ -35268,6 +40665,7 @@ -Wframe-address \ -Wfree-nonheap-object \ -Whsa \ + -Wif-not-aligned \ -Wignored-attributes \ -Wignored-qualifiers \ -Wimplicit \ @@ -35281,7 +40679,6 @@ -Wint-to-pointer-cast \ -Winvalid-memory-model \ -Winvalid-pch \ - -Wjump-misses-init \ -Wlogical-not-parentheses \ -Wlogical-op \ -Wmain \ @@ -35289,6 +40686,7 @@ -Wmemset-elt-size \ -Wmemset-transposed-args \ -Wmisleading-indentation \ + -Wmissing-attributes \ -Wmissing-braces \ -Wmissing-declarations \ -Wmissing-field-initializers \ @@ -35296,6 +40694,7 @@ -Wmissing-parameter-type \ -Wmissing-prototypes \ -Wmultichar \ + -Wmultistatement-macros \ -Wnarrowing \ -Wnested-externs \ -Wnonnull \ @@ -35310,6 +40709,7 @@ -Woverride-init \ -Wpacked \ -Wpacked-bitfield-compat \ + -Wpacked-not-aligned \ -Wparentheses \ -Wpointer-arith \ -Wpointer-compare \ @@ -35327,20 +40727,23 @@ -Wshift-count-overflow \ -Wshift-negative-value \ -Wsizeof-array-argument \ + -Wsizeof-pointer-div \ -Wsizeof-pointer-memaccess \ -Wstack-protector \ -Wstrict-aliasing \ -Wstrict-overflow \ -Wstrict-prototypes \ + -Wstringop-truncation \ + -Wsuggest-attribute=cold \ -Wsuggest-attribute=const \ -Wsuggest-attribute=format \ + -Wsuggest-attribute=malloc \ -Wsuggest-attribute=noreturn \ -Wsuggest-attribute=pure \ -Wsuggest-final-methods \ -Wsuggest-final-types \ -Wswitch \ -Wswitch-bool \ - -Wswitch-default \ -Wswitch-unreachable \ -Wsync-nand \ -Wsystem-headers \ @@ -35375,9 +40778,30 @@ # gcc --help=warnings outputs an unusual form for these options; list # them here so that the above 'comm' command doesn't report a false match. - # Would prefer "min (PTRDIFF_MAX, SIZE_MAX)", but it must be a literal: - ptrdiff_max_max=9223372036854775807 - gl_manywarn_set="$gl_manywarn_set -Walloc-size-larger-than=$ptrdiff_max_max" + # Would prefer "min (PTRDIFF_MAX, SIZE_MAX)", but it must be a literal. + # Also, AC_COMPUTE_INT requires it to fit in a long; it is 2**63 on + # the only platforms where it does not fit in a long, so make that + # a special case. + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking max safe object size" >&5 +printf %s "checking max safe object size... " >&6; } + if ac_fn_c_compute_int "$LINENO" "LONG_MAX < (PTRDIFF_MAX < (size_t) -1 ? PTRDIFF_MAX : (size_t) -1) + ? -1 + : PTRDIFF_MAX < (size_t) -1 ? (long) PTRDIFF_MAX : (long) (size_t) -1" "gl_alloc_max" "#include + #include + #include + " +then : + +else + gl_alloc_max=2147483647 +fi + + case $gl_alloc_max in + -1) gl_alloc_max=9223372036854775807;; + esac + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_alloc_max" >&5 +printf "%s\n" "$gl_alloc_max" >&6; } + gl_manywarn_set="$gl_manywarn_set -Walloc-size-larger-than=$gl_alloc_max" gl_manywarn_set="$gl_manywarn_set -Warray-bounds=2" gl_manywarn_set="$gl_manywarn_set -Wformat-overflow=2" gl_manywarn_set="$gl_manywarn_set -Wformat-truncation=2" @@ -35410,6 +40834,13 @@ ws=$gl_manywarn_set + 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 + + gl_warn_set= set x $ws; shift @@ -35427,6 +40858,7 @@ for w in $ws; do + as_gl_Warn=`printf "%s\n" "gl_cv_warn_c_$w" | $as_tr_sh` gl_positive="$w" case $gl_positive in @@ -35474,6 +40906,7 @@ done + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-missing-field-initializers" >&5 printf %s "checking whether C compiler handles -Wno-missing-field-initializers... " >&6; } if test ${gl_cv_warn_c__Wno_missing_field_initializers+y} @@ -35514,6 +40947,7 @@ # We need this one + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-sign-compare" >&5 printf %s "checking whether C compiler handles -Wno-sign-compare... " >&6; } if test ${gl_cv_warn_c__Wno_sign_compare+y} @@ -35554,6 +40988,7 @@ # Too many warnings for now + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-unused-parameter" >&5 printf %s "checking whether C compiler handles -Wno-unused-parameter... " >&6; } if test ${gl_cv_warn_c__Wno_unused_parameter+y} @@ -35594,9 +41029,51 @@ # Too many warnings for now + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-cast-function-type" >&5 +printf %s "checking whether C compiler handles -Wno-cast-function-type... " >&6; } +if test ${gl_cv_warn_c__Wno_cast_function_type+y} +then : + printf %s "(cached) " >&6 +else + + gl_save_compiler_FLAGS="$CFLAGS" + as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wcast-function-type" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main (void) +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + gl_cv_warn_c__Wno_cast_function_type=yes +else + gl_cv_warn_c__Wno_cast_function_type=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + CFLAGS="$gl_save_compiler_FLAGS" + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_cast_function_type" >&5 +printf "%s\n" "$gl_cv_warn_c__Wno_cast_function_type" >&6; } +if test "x$gl_cv_warn_c__Wno_cast_function_type" = xyes +then : + as_fn_append WARN_CFLAGS " -Wno-cast-function-type" +fi + + # sig-handler.h's sa_handler_t cast + # In spite of excluding -Wlogical-op above, it is enabled, as of # gcc 4.5.0 20090517, and it provokes warnings in cat.c, dd.c, truncate.c + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-logical-op" >&5 printf %s "checking whether C compiler handles -Wno-logical-op... " >&6; } if test ${gl_cv_warn_c__Wno_logical_op+y} @@ -35652,6 +41129,7 @@ nw= nw="$nw -Wunused-macros" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-format-nonliteral" >&5 printf %s "checking whether C compiler handles -Wno-format-nonliteral... " >&6; } if test ${gl_cv_warn_c__Wno_format_nonliteral+y} @@ -35946,23 +41424,6 @@ - - - - - - : - - - - - - - - - - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5 printf %s "checking whether NLS is requested... " >&6; } # Check whether --enable-nls was given. @@ -36364,8 +41825,46 @@ printf "%s\n" "#define HAVE_CFLOCALECOPYCURRENT 1" >>confdefs.h fi + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for CFLocaleCopyPreferredLanguages" >&5 +printf %s "checking for CFLocaleCopyPreferredLanguages... " >&6; } +if test ${gt_cv_func_CFLocaleCopyPreferredLanguages+y} +then : + printf %s "(cached) " >&6 +else + gt_save_LIBS="$LIBS" + LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main (void) +{ +CFLocaleCopyPreferredLanguages(); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + gt_cv_func_CFLocaleCopyPreferredLanguages=yes +else + gt_cv_func_CFLocaleCopyPreferredLanguages=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LIBS="$gt_save_LIBS" +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFLocaleCopyPreferredLanguages" >&5 +printf "%s\n" "$gt_cv_func_CFLocaleCopyPreferredLanguages" >&6; } + if test $gt_cv_func_CFLocaleCopyPreferredLanguages = yes; then + +printf "%s\n" "#define HAVE_CFLOCALECOPYPREFERREDLANGUAGES 1" >>confdefs.h + + fi INTL_MACOSX_LIBS= - if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then + if test $gt_cv_func_CFPreferencesCopyAppValue = yes \ + || test $gt_cv_func_CFLocaleCopyCurrent = yes \ + || test $gt_cv_func_CFLocaleCopyPreferredLanguages = yes; then INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation" fi @@ -36729,7 +42228,6 @@ - use_additional=yes acl_save_prefix="$prefix" @@ -36768,7 +42266,7 @@ additional_includedir="$withval/include" additional_libdir="$withval/$acl_libdirstem" if test "$acl_libdirstem2" != "$acl_libdirstem" \ - && ! test -d "$withval/$acl_libdirstem"; then + && test ! -d "$withval/$acl_libdirstem"; then additional_libdir="$withval/$acl_libdirstem2" fi fi @@ -37184,7 +42682,6 @@ - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libintl" >&5 printf %s "checking for GNU gettext in libintl... " >&6; } if eval test \${$gt_func_gnugettext_libintl+y} @@ -37694,6 +43191,10 @@ as_fn_error $? "conditional \"GL_GENERATE_FNMATCH_H\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi +if test -z "${GL_GENERATE_FNMATCH_H_TRUE}" && test -z "${GL_GENERATE_FNMATCH_H_FALSE}"; then + as_fn_error $? "conditional \"GL_GENERATE_FNMATCH_H\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi if test -z "${GL_GENERATE_ICONV_H_TRUE}" && test -z "${GL_GENERATE_ICONV_H_FALSE}"; then as_fn_error $? "conditional \"GL_GENERATE_ICONV_H\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 @@ -37773,6 +43274,11 @@ Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi +if test -z "${GL_GENERATE_NETINET_IN_H_TRUE}" && test -z "${GL_GENERATE_NETINET_IN_H_FALSE}"; then + as_fn_error $? "conditional \"GL_GENERATE_NETINET_IN_H\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi + gltests_libobjs= gltests_ltlibobjs= @@ -38166,8 +43672,8 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by GNU grep $as_me 3.1, which was -generated by GNU Autoconf 2.69.185-b502e. Invocation command line was +This file was extended by GNU grep $as_me 3.3, which was +generated by GNU Autoconf 2.69.197-b8fd7. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -38231,15 +43737,17 @@ $config_commands Report bugs to . -GNU grep home page: . -General help using GNU software: ." +GNU grep home page: . +General help using GNU software: ." _ACEOF +ac_cs_config=`printf "%s\n" "$ac_configure_args" | sed "$ac_safe_unquote"` +ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\''/g"` cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -ac_cs_config="`printf "%s\n" "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" +ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -GNU grep config.status 3.1 -configured by $0, generated by GNU Autoconf 2.69.185-b502e, +GNU grep config.status 3.3 +configured by $0, generated by GNU Autoconf 2.69.197-b8fd7, with options \\"\$ac_cs_config\\" Copyright (C) 2017 Free Software Foundation, Inc. diff -Nru grep-3.1/configure.ac grep-3.3/configure.ac --- grep-3.1/configure.ac 2017-01-01 11:34:33.000000000 +0000 +++ grep-3.3/configure.ac 2018-12-21 02:51:44.000000000 +0000 @@ -1,7 +1,7 @@ dnl dnl autoconf input file for GNU grep dnl -dnl Copyright (C) 1997-2006, 2009-2017 Free Software Foundation, Inc. +dnl Copyright (C) 1997-2006, 2009-2018 Free Software Foundation, Inc. dnl dnl This file is part of GNU grep. dnl @@ -16,7 +16,7 @@ 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 program. If not, see . +dnl along with this program. If not, see . AC_INIT([GNU grep], m4_esyscmd([build-aux/git-version-gen .tarball-version]), @@ -65,7 +65,7 @@ AC_CONFIG_AUX_DIR(build-aux) AC_CONFIG_SRCDIR(src/grep.c) AC_DEFINE([GREP], 1, [We are building grep]) -AC_PREREQ(2.59) +AC_PREREQ([2.63]) AC_CONFIG_MACRO_DIRS([m4]) dnl Automake stuff. @@ -149,6 +149,7 @@ gl_WARN_ADD([-Wno-missing-field-initializers]) # We need this one gl_WARN_ADD([-Wno-sign-compare]) # Too many warnings for now gl_WARN_ADD([-Wno-unused-parameter]) # Too many warnings for now + gl_WARN_ADD([-Wno-cast-function-type]) # sig-handler.h's sa_handler_t cast # In spite of excluding -Wlogical-op above, it is enabled, as of # gcc 4.5.0 20090517, and it provokes warnings in cat.c, dd.c, truncate.c diff -Nru grep-3.1/COPYING grep-3.3/COPYING --- grep-3.1/COPYING 2014-06-27 22:32:09.000000000 +0000 +++ grep-3.3/COPYING 2018-04-21 23:35:48.000000000 +0000 @@ -1,8 +1,7 @@ - GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 - Copyright (C) 2007 Free Software Foundation, Inc. + Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. @@ -646,7 +645,7 @@ 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 . + along with this program. If not, see . Also add information on how to contact you by electronic and paper mail. @@ -665,11 +664,11 @@ You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see -. +. The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read -. +. diff -Nru grep-3.1/debian/changelog grep-3.3/debian/changelog --- grep-3.1/debian/changelog 2018-12-02 17:58:48.000000000 +0000 +++ grep-3.3/debian/changelog 2019-01-07 15:04:36.000000000 +0000 @@ -1,3 +1,12 @@ +grep (3.3-1) unstable; urgency=low + + * New upstream version 3.3. + - New upstream release brings performance improvements to some + situations. (Closes: #917127) + * Remove upstream patches now included in new release. + + -- Santiago Ruano Rincón Mon, 07 Jan 2019 12:04:36 -0300 + grep (3.1-3) unstable; urgency=low [ Santiago Ruano Rincón ] diff -Nru grep-3.1/debian/patches/02-man_rgrep.patch grep-3.3/debian/patches/02-man_rgrep.patch --- grep-3.1/debian/patches/02-man_rgrep.patch 2017-08-04 13:57:24.000000000 +0000 +++ grep-3.3/debian/patches/02-man_rgrep.patch 2018-12-31 20:35:48.000000000 +0000 @@ -1,16 +1,18 @@ ---- a/doc/grep.in.1 -+++ b/doc/grep.in.1 -@@ -24,7 +24,7 @@ +Index: grep/doc/grep.in.1 +=================================================================== +--- grep.orig/doc/grep.in.1 ++++ grep/doc/grep.in.1 +@@ -137,7 +137,7 @@ .hy 0 . .SH NAME --grep, egrep, fgrep \- print lines matching a pattern -+grep, egrep, fgrep, rgrep \- print lines matching a pattern +-grep, egrep, fgrep \- print lines that match patterns ++grep, egrep, fgrep, rgrep \- print lines that match patterns . .SH SYNOPSIS .B grep -@@ -57,13 +57,15 @@ - prints the matching lines. +@@ -181,13 +181,15 @@ is given, recursive searches examine the + and nonrecursive searches read standard input. .PP In addition, the variant programs -.B egrep diff -Nru grep-3.1/debian/patches/05-grep-wrapper-sh.patch grep-3.3/debian/patches/05-grep-wrapper-sh.patch --- grep-3.1/debian/patches/05-grep-wrapper-sh.patch 2017-08-04 13:57:24.000000000 +0000 +++ grep-3.3/debian/patches/05-grep-wrapper-sh.patch 2018-12-31 21:23:08.000000000 +0000 @@ -10,14 +10,14 @@ --- grep.orig/src/Makefile.am +++ grep/src/Makefile.am @@ -15,6 +15,7 @@ - # along with this program. If not, see . + # along with this program. If not, see . LN = ln +SHELL = /bin/sh AM_CFLAGS = $(WARN_CFLAGS) $(WERROR_CFLAGS) $(PCRE_CFLAGS) -@@ -52,14 +53,7 @@ EXTRA_DIST = dosbuf.c egrep.sh +@@ -52,14 +53,7 @@ EXTRA_DIST = egrep.sh egrep fgrep: egrep.sh Makefile $(AM_V_GEN)grep=`echo grep | sed -e '$(transform)'` && \ case $@ in egrep) option=-E;; fgrep) option=-F;; esac && \ diff -Nru grep-3.1/debian/patches/90-upstream-doc-define-Dt-string-in-man-page.patch grep-3.3/debian/patches/90-upstream-doc-define-Dt-string-in-man-page.patch --- grep-3.1/debian/patches/90-upstream-doc-define-Dt-string-in-man-page.patch 2017-08-04 13:57:24.000000000 +0000 +++ grep-3.3/debian/patches/90-upstream-doc-define-Dt-string-in-man-page.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,43 +0,0 @@ -From 8d1953300ef03d05fb3864d944d1de81613a9bb6 Mon Sep 17 00:00:00 2001 -From: Paul Eggert -Date: Tue, 11 Jul 2017 08:20:26 -0700 -Subject: [PATCH] doc: define Dt string in man page - -Problem reported by Bjarni I. Gislason via Santiago R.R. (Bug#27651). -* doc/grep.in.1 (dT): New macro. -(Dt): Define this string. ---- - doc/grep.in.1 | 15 +++++++++++++++ - 1 file changed, 15 insertions(+) - -diff --git a/doc/grep.in.1 b/doc/grep.in.1 -index 40c9586..ecc8105 100644 ---- a/doc/grep.in.1 -+++ b/doc/grep.in.1 -@@ -1,4 +1,14 @@ - .\" GNU grep man page -+.de dT -+.ds Dt \\$2 -+.. -+.dT Time-stamp: "2017-06-21" -+.\" Update the above date whenever a change to either this file or -+.\" grep.c's 'usage' function results in a nontrivial change to the man page. -+.\" In Emacs, you can update the date by running 'M-x time-stamp' -+.\" after you make a change that you decide is nontrivial. -+.\" It is no big deal to forget to update the date. -+. - .if !\n(.g \{\ - . if !\w|\*(lq| \{\ - . ds lq `` -@@ -1213,3 +1223,8 @@ This man page is maintained only fitfully; - the full documentation is often more up-to-date. - .\" Work around problems with some troff -man implementations. - .br -+. -+.\" Format for Emacs-maintained Dt string defined at this file's start. -+.\" Local variables: -+.\" time-stamp-format: "%:y-%02m-%02d" -+.\" End: --- -2.7.4 - diff -Nru grep-3.1/debian/patches/series grep-3.3/debian/patches/series --- grep-3.1/debian/patches/series 2018-12-01 21:22:47.000000000 +0000 +++ grep-3.3/debian/patches/series 2018-12-31 20:36:53.000000000 +0000 @@ -1,5 +1,2 @@ 02-man_rgrep.patch 05-grep-wrapper-sh.patch -90-upstream-doc-define-Dt-string-in-man-page.patch -upstream-532541-doc-improve-o-help.patch -upstream-915206-0001-tests-backref-alt-works-with-glibc-2.28.patch diff -Nru grep-3.1/debian/patches/upstream-532541-doc-improve-o-help.patch grep-3.3/debian/patches/upstream-532541-doc-improve-o-help.patch --- grep-3.1/debian/patches/upstream-532541-doc-improve-o-help.patch 2017-08-04 14:02:28.000000000 +0000 +++ grep-3.3/debian/patches/upstream-532541-doc-improve-o-help.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,28 +0,0 @@ -From e183886892343200fc8aac871768a979f7842d4e Mon Sep 17 00:00:00 2001 -From: Paul Eggert -Date: Thu, 3 Aug 2017 13:07:01 -0700 -Subject: [PATCH] doc: improve -o help -Bug-Debian: http://bugs.debian.org/532541 - -* src/grep.c (usage): Document that -o outputs only nonempty -matches (Bug#27931). ---- - src/grep.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/grep.c b/src/grep.c -index 8d22aec3..dd338d9f 100644 ---- a/src/grep.c -+++ b/src/grep.c -@@ -1949,7 +1949,7 @@ Output control:\n\ - --label=LABEL use LABEL as the standard input file name prefix\n\ - ")); - printf (_("\ -- -o, --only-matching show only the part of a line matching PATTERN\n\ -+ -o, --only-matching show only nonempty parts of lines matching PATTERN\n\ - -q, --quiet, --silent suppress all normal output\n\ - --binary-files=TYPE assume that binary files are TYPE;\n\ - TYPE is 'binary', 'text', or 'without-match'\n\ --- -2.13.3 - diff -Nru grep-3.1/debian/patches/upstream-915206-0001-tests-backref-alt-works-with-glibc-2.28.patch grep-3.3/debian/patches/upstream-915206-0001-tests-backref-alt-works-with-glibc-2.28.patch --- grep-3.1/debian/patches/upstream-915206-0001-tests-backref-alt-works-with-glibc-2.28.patch 2018-12-01 21:22:47.000000000 +0000 +++ grep-3.3/debian/patches/upstream-915206-0001-tests-backref-alt-works-with-glibc-2.28.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,39 +0,0 @@ -From c505b0bce73c712f1297bc5f424e0de5e4ec3137 Mon Sep 17 00:00:00 2001 -From: Paul Eggert -Date: Thu, 9 Aug 2018 10:52:48 -0700 -Subject: [PATCH] tests: backref-alt works with glibc 2.28 -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Problem reported by Jaroslav Skarvada (Bug#32409). -* tests/Makefile.am (XFAIL_TESTS) [!USE_INCLUDED_REGEX]: -Don’t add backref-alt, since this bug is fixed in glibc 2.28. - -Origin: upstream, http://git.savannah.gnu.org/cgit/grep.git/commit/tests/Makefile.am?id=c505b0bce73c712f1297bc5f424e0de5e4ec3137 -Bug-Debian: https://bugs.debian.org/15206 -Reviewed-by: Santiago R.R. ---- - tests/Makefile.am | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/tests/Makefile.am b/tests/Makefile.am -index 9f52941c..d9f9ee8f 100644 ---- a/tests/Makefile.am -+++ b/tests/Makefile.am -@@ -56,9 +56,9 @@ XFAIL_TESTS = triple-backref - if USE_INCLUDED_REGEX - XFAIL_TESTS += equiv-classes - else --# The backslash-alt test fails for glibc, which needs to be fixed. --# FIXME-2015: Remove this once the glibc bug is fixed. --XFAIL_TESTS += backref-alt -+# The backslash-alt test fails for glibc 2.27 and earlier. -+# If you're using older glibc you can upgrade to glibc 2.28 or later, -+# configure --with-included-regex, or ignore the test failure. - endif - - TESTS = \ --- -2.19.2 - diff -Nru grep-3.1/doc/fdl.texi grep-3.3/doc/fdl.texi --- grep-3.1/doc/fdl.texi 2017-01-07 10:34:02.000000000 +0000 +++ grep-3.3/doc/fdl.texi 2018-01-07 00:07:08.000000000 +0000 @@ -6,7 +6,7 @@ @display Copyright @copyright{} 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc. -@uref{http://fsf.org/} +@uref{https://fsf.org/} Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. @@ -414,7 +414,7 @@ of the GNU Free Documentation License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. See -@uref{http://www.gnu.org/copyleft/}. +@uref{https://www.gnu.org/copyleft/}. Each version of the License is given a distinguishing version number. If the Document specifies that a particular numbered version of this diff -Nru grep-3.1/doc/grep.in.1 grep-3.3/doc/grep.in.1 --- grep-3.1/doc/grep.in.1 2017-06-25 03:05:03.000000000 +0000 +++ grep-3.3/doc/grep.in.1 2018-07-04 15:31:43.000000000 +0000 @@ -1,57 +1,175 @@ .\" GNU grep man page -.if !\n(.g \{\ -. if !\w|\*(lq| \{\ -. ds lq `` -. if \w'\(lq' .ds lq "\(lq +.de dT +.ds Dt \\$2 +.. +.dT Time-stamp: "2018-05-11" +.\" Update the above date whenever a change to either this file or +.\" grep.c's 'usage' function results in a nontrivial change to the man page. +.\" In Emacs, you can update the date by running 'M-x time-stamp' +.\" after you make a change that you decide is nontrivial. +.\" It is no big deal to forget to update the date. +. +.TH GREP 1 \*(Dt "GNU grep @VERSION@" "User Commands" +. +.if !\w|\*(lq| \{\ +.\" groff an-old.tmac does not seem to be in use, so define lq and rq. +. ie \n(.g \{\ +. ds lq \(lq\" +. ds rq \(rq\" . \} -. if !\w|\*(rq| \{\ +. el \{\ +. ds lq `` . ds rq '' -. if \w'\(rq' .ds rq "\(rq . \} .\} . -.ie \n[.g] .mso www.tmac +.if !\w|\*(la| \{\ +.\" groff an-ext.tmac does not seem to be in use, so define the parts of +.\" it that are used below. For a copy of groff an-ext.tmac, please see: +.\" https://git.savannah.gnu.org/cgit/groff.git/plain/tmac/an-ext.tmac +.\" --- Start of lines taken from groff an-ext.tmac +. +.\" Check whether we are using grohtml. +.nr mH 0 +.if \n(.g \ +. if '\*(.T'html' \ +. nr mH 1 +. +. +.\" Map mono-width fonts to standard fonts for groff's TTY device. +.if n \{\ +. do ftr CR R +. do ftr CI I +. do ftr CB B +.\} +. +.\" groff has glyph entities for angle brackets. +.ie \n(.g \{\ +. ds la \(la\" +. ds ra \(ra\" +.\} .el \{\ -. de MTO -\\$2 \(laemail: \\$1 \(ra\\$3 +. ds la <\" +. ds ra >\" +. \" groff's man macros control hyphenation with this register. +. nr HY 1 +.\} +. +.\" Start URL. +.de UR +. ds m1 \\$1\" +. nh +. if \\n(mH \{\ +. \" Start diversion in a new environment. +. do ev URL-div +. do di URL-div +. \} +.. +. +. +.\" End URL. +.de UE +. ie \\n(mH \{\ +. br +. di +. ev +. +. \" Has there been one or more input lines for the link text? +. ie \\n(dn \{\ +. do HTML-NS "" +. \" Yes, strip off final newline of diversion and emit it. +. do chop URL-div +. do URL-div +\c +. do HTML-NS +. \} +. el \ +. do HTML-NS "\\*(m1" +\&\\$*\" +. \} +. el \ +\\*(la\\*(m1\\*(ra\\$*\" +. +. hy \\n(HY .. -. de URL -\\$2 \(laURL: \\$1 \(ra\\$3 +. +. +.\" Start email address. +.de MT +. ds m1 \\$1\" +. nh +. if \\n(mH \{\ +. \" Start diversion in a new environment. +. do ev URL-div +. do di URL-div +. \} .. +. +. +.\" End email address. +.de ME +. ie \\n(mH \{\ +. br +. di +. ev +. +. \" Has there been one or more input lines for the link text? +. ie \\n(dn \{\ +. do HTML-NS "" +. \" Yes, strip off final newline of diversion and emit it. +. do chop URL-div +. do URL-div +\c +. do HTML-NS +. \} +. el \ +. do HTML-NS "\\*(m1" +\&\\$*\" +. \} +. el \ +\\*(la\\*(m1\\*(ra\\$*\" +. +. hy \\n(HY +.. +.\" --- End of lines taken from groff an-ext.tmac .\} . -.TH GREP 1 \*(Dt "GNU grep @VERSION@" "User Commands" .hy 0 . .SH NAME -grep, egrep, fgrep \- print lines matching a pattern +grep, egrep, fgrep \- print lines that match patterns . .SH SYNOPSIS .B grep -.RI [ OPTIONS ] -.I PATTERN +.RI [ OPTION .\|.\|.]\& +.I PATTERNS .RI [ FILE .\|.\|.] .br .B grep -.RI [ OPTIONS ] +.RI [ OPTION .\|.\|.]\& .B \-e -.I PATTERN +.I PATTERNS \&.\|.\|.\& .RI [ FILE .\|.\|.] .br .B grep -.RI [ OPTIONS ] +.RI [ OPTION .\|.\|.]\& .B \-f -.I FILE +.I PATTERN_FILE \&.\|.\|.\& .RI [ FILE .\|.\|.] . .SH DESCRIPTION .B grep searches for -.I PATTERN +.I PATTERNS in each .IR FILE . +.I PATTERNS +is one or patterns separated by newline characters, and +.B grep +prints each line that matches a pattern. +.PP A .I FILE of @@ -61,9 +179,6 @@ .I FILE is given, recursive searches examine the working directory, and nonrecursive searches read standard input. -By default, -.B grep -prints the matching lines. .PP In addition, the variant programs .B egrep @@ -90,36 +205,37 @@ .TP .BR \-E ", " \-\^\-extended\-regexp Interpret -.I PATTERN -as an extended regular expression (ERE, see below). +.I PATTERNS +as extended regular expressions (EREs, see below). .TP .BR \-F ", " \-\^\-fixed\-strings Interpret -.I PATTERN -as a list of fixed strings (instead of regular expressions), -separated by newlines, -any of which is to be matched. +.I PATTERNS +as fixed strings, not regular expressions. .TP .BR \-G ", " \-\^\-basic\-regexp Interpret -.I PATTERN -as a basic regular expression (BRE, see below). +.I PATTERNS +as basic regular expressions (BREs, see below). This is the default. .TP .BR \-P ", " \-\^\-perl\-regexp -Interpret the pattern as a Perl-compatible regular expression (PCRE). -This is experimental and +Interpret PATTERNS as Perl-compatible regular expressions (PCREs). +This option is experimental when combined with the +.B \-z +.RB ( \-\^\-null\-data ) +option, and .B "grep \-P" may warn of unimplemented features. .SS "Matching Control" .TP -.BI \-e " PATTERN" "\fR,\fP \-\^\-regexp=" PATTERN +.BI \-e " PATTERNS" "\fR,\fP \-\^\-regexp=" PATTERNS Use -.I PATTERN -as the pattern. +.I PATTERNS +as the patterns. If this option is used multiple times or is combined with the .B \-f -.RB ( \-\-file ) +.RB ( \-\^\-file ) option, search for all patterns given. This option can be used to protect a pattern beginning with \*(lq\-\*(rq. .TP @@ -129,7 +245,7 @@ one per line. If this option is used multiple times or is combined with the .B \-e -.RB ( \-\-regexp ) +.RB ( \-\^\-regexp ) option, search for all patterns given. The empty file contains zero patterns, and therefore matches nothing. .TP @@ -276,7 +392,7 @@ This is especially useful when implementing tools like .BR zgrep , e.g., -.BR "gzip -cd foo.gz | grep --label=foo -H something" . +.BR "gzip \-cd foo.gz | grep \-\^\-label=foo \-H something" . See also the .B \-H option. @@ -398,7 +514,7 @@ If .I TYPE is -.BR without-match , +.BR without\-match , when .B grep discovers that a file is binary it assumes that the rest of the file @@ -507,7 +623,8 @@ using wildcard matching; a name suffix is either the whole name, or any suffix starting after a .B / -and before a +non-\fB/\fP. +and before a +.RB non- / . When searching recursively, skip any subfile whose base name matches .IR GLOB ; the base name is the part after the last @@ -516,18 +633,18 @@ .BR * , .BR ? , and -.BR [ ... ] +.BR [ .\|.\|. ]\& as wildcards, and .B \e to quote a wildcard or backslash character literally. .TP -.BI \-\^\-exclude-from= FILE +.BI \-\^\-exclude\-from= FILE Skip files whose base name matches any of the file-name globs read from .I FILE (using wildcard matching as described under .BR \-\^\-exclude ). .TP -.BI \-\^\-exclude-dir= GLOB +.BI \-\^\-exclude\-dir= GLOB Skip any command-line directory with a name suffix that matches the pattern .IR GLOB . @@ -540,7 +657,7 @@ .BR \-I Process a binary file as if it did not contain matching data; this is equivalent to the -.B \-\^\-binary\-files=without-match +.B \-\^\-binary\-files=without\-match option. .TP .BI \-\^\-include= GLOB @@ -631,6 +748,7 @@ The period .B .\& matches any single character. +It is unspecified whether it matches an encoding error. .SS "Character Classes and Bracket Expressions" A .I "bracket expression" @@ -639,12 +757,13 @@ and .BR ] . It matches any single -character in that list; if the first character of the list +character in that list. +If the first character of the list is the caret .B ^ then it matches any character .I not -in the list. +in the list; it is unspecified whether it matches an encoding error. For example, the regular expression .B [0123456789] matches any single digit. @@ -685,7 +804,7 @@ .BR [:space:] , .BR [:upper:] , and -.BR [:xdigit:]. +.BR [:xdigit:] . For example, .B [[:alnum:]] means the character class of numbers and @@ -871,10 +990,10 @@ It can only specify the color used to highlight the matching non-empty text in any matching line (a selected line when the -.B -v +.B \-v command-line option is omitted, or a context line when -.B -v +.B \-v is specified). The default is .BR 01;31 , @@ -1011,7 +1130,7 @@ .B ne Boolean value that prevents clearing to the end of line using Erase in Line (EL) to Right -.RB ( \\\\\\33[K ) +.RB ( \e33[K ) each time a colorized item ends. This is needed on terminals on which EL is not supported. It is otherwise useful on terminals @@ -1024,7 +1143,7 @@ The default is false (i.e., the capability is omitted). .PP Note that boolean capabilities have no -.BR = ... +.BR = .\|.\|.\& part. They are omitted (i.e., false) by default and become true when specified. .PP @@ -1036,7 +1155,7 @@ .B grep takes care of assembling the result into a complete SGR sequence -.RB ( \\\\\\33[ ... m ). +.RB ( \e33[ .\|.\|. m ). Common values to concatenate include .B 1 for bold, @@ -1154,7 +1273,7 @@ occurred. . .SH COPYRIGHT -Copyright 1998\(en2000, 2002, 2005\(en2017 Free Software Foundation, Inc. +Copyright 1998\(en2000, 2002, 2005\(en2018 Free Software Foundation, Inc. .PP This is free software; see the source for copying conditions. @@ -1164,11 +1283,17 @@ .SH BUGS .SS "Reporting Bugs" Email bug reports to -.MTO bug-grep@gnu.org "the bug-reporting address" . +.MT bug-grep@gnu.org +the bug-reporting address +.ME . An -.URL http://lists.gnu.org/mailman/listinfo/bug-grep "email archive" +.UR https://lists.gnu.org/mailman/listinfo/bug-grep +email archive +.UE and a -.URL http://debbugs.gnu.org/cgi/pkgreport.cgi?package=grep "bug tracker" +.UR https://debbugs.gnu.org/cgi/pkgreport.cgi?package=grep +bug tracker +.UE are available. .SS "Known Bugs" Large repetition counts in the @@ -1196,7 +1321,9 @@ grep(1p). .SS "Full Documentation" A -.URL http://www.gnu.org/software/grep/manual/ "complete manual" +.UR https://www.gnu.org/software/grep/manual/ +complete manual +.UE is available. If the .B info @@ -1213,3 +1340,8 @@ the full documentation is often more up-to-date. .\" Work around problems with some troff -man implementations. .br +. +.\" Format for Emacs-maintained Dt string defined at this file's start. +.\" Local variables: +.\" time-stamp-format: "%:y-%02m-%02d" +.\" End: diff -Nru grep-3.1/doc/grep.info grep-3.3/doc/grep.info --- grep-3.1/doc/grep.info 2017-07-02 20:21:17.000000000 +0000 +++ grep-3.3/doc/grep.info 2018-12-21 04:39:03.000000000 +0000 @@ -1,8 +1,8 @@ -This is grep.info-t, produced by makeinfo version 6.3 from grep.texi. +This is grep.info, produced by makeinfo version 6.5 from grep.texi. This manual is for ‘grep’, a pattern matching engine. - Copyright © 1999-2002, 2005, 2008-2017 Free Software Foundation, Inc. + Copyright © 1999-2002, 2005, 2008-2018 Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, @@ -12,22 +12,22 @@ the section entitled “GNU Free Documentation License”. INFO-DIR-SECTION Text creation and manipulation START-INFO-DIR-ENTRY -* grep: (grep). Print lines matching a pattern. +* grep: (grep). Print lines that match patterns. END-INFO-DIR-ENTRY  -File: grep.info-t, Node: Top, Next: Introduction, Up: (dir) +File: grep.info, Node: Top, Next: Introduction, Up: (dir) grep **** -‘grep’ prints lines that contain a match for a pattern. +‘grep’ prints lines that contain a match for one or more patterns. - This manual is for version 3.1 of GNU Grep. + This manual is for version 3.3 of GNU Grep. This manual is for ‘grep’, a pattern matching engine. - Copyright © 1999-2002, 2005, 2008-2017 Free Software Foundation, Inc. + Copyright © 1999-2002, 2005, 2008-2018 Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, @@ -48,13 +48,13 @@ * Index:: Combined index.  -File: grep.info-t, Node: Introduction, Next: Invoking, Prev: Top, Up: Top +File: grep.info, Node: Introduction, Next: Invoking, Prev: Top, Up: Top 1 Introduction ************** -‘grep’ searches input files for lines containing a match to a given -pattern list. When it finds a match in a line, it copies the line to +Given one or more patterns, ‘grep’ searches input files for matches to +the patterns. When it finds a match in a line, it copies the line to standard output (by default), or produces whatever other sort of output you have requested with options. @@ -66,19 +66,20 @@ characters in a text.  -File: grep.info-t, Node: Invoking, Next: Regular Expressions, Prev: Introduction, Up: Top +File: grep.info, Node: Invoking, Next: Regular Expressions, Prev: Introduction, Up: Top 2 Invoking ‘grep’ ***************** The general synopsis of the ‘grep’ command line is - grep OPTIONS PATTERN INPUT_FILE_NAMES + grep [OPTION...] [PATTERNS] [FILE...] -There can be zero or more OPTIONS. PATTERN will only be seen as such -(and not as an INPUT_FILE_NAME) if it wasn’t already specified within -OPTIONS (by using the ‘-e PATTERN’ or ‘-f FILE’ options). There can be -zero or more INPUT_FILE_NAMES. + + There can be zero or more OPTION arguments, and zero or more FILE +arguments. The PATTERNS argument contains one or more patterns +separated by newlines, and is omitted when patterns are given via the +‘-e PATTERNS’ or ‘-f FILE’ options. * Menu: @@ -88,7 +89,7 @@ * grep Programs:: ‘grep’ programs.  -File: grep.info-t, Node: Command-line Options, Next: Environment Variables, Up: Invoking +File: grep.info, Node: Command-line Options, Next: Environment Variables, Up: Invoking 2.1 Command-line Options ======================== @@ -114,7 +115,7 @@ matching engine is used. *Note grep Programs::.  -File: grep.info-t, Node: Generic Program Information, Next: Matching Control, Up: Command-line Options +File: grep.info, Node: Generic Program Information, Next: Matching Control, Up: Command-line Options 2.1.1 Generic Program Information --------------------------------- @@ -129,16 +130,17 @@ This version number should be included in all bug reports.  -File: grep.info-t, Node: Matching Control, Next: General Output Control, Prev: Generic Program Information, Up: Command-line Options +File: grep.info, Node: Matching Control, Next: General Output Control, Prev: Generic Program Information, Up: Command-line Options 2.1.2 Matching Control ---------------------- -‘-e PATTERN’ -‘--regexp=PATTERN’ - Use PATTERN as the pattern. If this option is used multiple times - or is combined with the ‘-f’ (‘--file’) option, search for all - patterns given. (‘-e’ is specified by POSIX.) +‘-e PATTERNS’ +‘--regexp=PATTERNS’ + Use PATTERNS as one or more patterns; newlines within PATTERNS + separate each pattern from the next. If this option is used + multiple times or is combined with the ‘-f’ (‘--file’) option, + search for all patterns given. (‘-e’ is specified by POSIX.) ‘-f FILE’ ‘--file=FILE’ @@ -179,19 +181,26 @@ The test is that the matching substring must either be at the beginning of the line, or preceded by a non-word constituent character. Similarly, it must be either at the end of the line or - followed by a non-word constituent character. Word-constituent + followed by a non-word constituent character. Word constituent characters are letters, digits, and the underscore. This option has no effect if ‘-x’ is also specified. + Because the ‘-w’ option can match a substring that does not begin + and end with word constituents, it differs from surrounding a + regular expression with ‘\<’ and ‘\>’. For example, although ‘grep + -w @’ matches a line containing only ‘@’, ‘grep '\<@\>'’ cannot + match any line because ‘@’ is not a word constituent. *Note The + Backslash Character and Special Expressions::. + ‘-x’ ‘--line-regexp’ - Select only those matches that exactly match the whole line. For a - regular expression pattern, this is like parenthesizing the pattern - and then surrounding it with ‘^’ and ‘$’. (‘-x’ is specified by - POSIX.) + Select only those matches that exactly match the whole line. For + regular expression patterns, this is like parenthesizing each + pattern and then surrounding it with ‘^’ and ‘$’. (‘-x’ is + specified by POSIX.)  -File: grep.info-t, Node: General Output Control, Next: Output Line Prefix Control, Prev: Matching Control, Up: Command-line Options +File: grep.info, Node: General Output Control, Next: Output Line Prefix Control, Prev: Matching Control, Up: Command-line Options 2.1.3 General Output Control ---------------------------- @@ -291,7 +300,7 @@ (1) Of course, 7th Edition Unix predated POSIX by several years!  -File: grep.info-t, Node: Output Line Prefix Control, Next: Context Line Control, Prev: General Output Control, Up: Command-line Options +File: grep.info, Node: Output Line Prefix Control, Next: Context Line Control, Prev: General Output Control, Up: Command-line Options 2.1.4 Output Line Prefix Control -------------------------------- @@ -350,7 +359,7 @@ even those that contain newline characters.  -File: grep.info-t, Node: Context Line Control, Next: File and Directory Selection, Prev: Output Line Prefix Control, Up: Command-line Options +File: grep.info, Node: Context Line Control, Next: File and Directory Selection, Prev: Output Line Prefix Control, Up: Command-line Options 2.1.5 Context Line Control -------------------------- @@ -406,7 +415,7 @@ into a single contiguous one.  -File: grep.info-t, Node: File and Directory Selection, Next: Other Options, Prev: Context Line Control, Up: Command-line Options +File: grep.info, Node: File and Directory Selection, Next: Other Options, Prev: Context Line Control, Up: Command-line Options 2.1.6 File and Directory Selection ---------------------------------- @@ -518,11 +527,17 @@ directory, recursively, following all symbolic links.  -File: grep.info-t, Node: Other Options, Prev: File and Directory Selection, Up: Command-line Options +File: grep.info, Node: Other Options, Prev: File and Directory Selection, Up: Command-line Options 2.1.7 Other Options ------------------- +‘--’ + Delimit the option list. Later arguments, if any, are treated as + operands even if they begin with ‘-’. For example, ‘grep PAT -- + -file1 file2’ searches for the pattern PAT in the files named + ‘-file1’ and ‘file2’. + ‘--line-buffered’ Use line buffering on output. This can cause a performance penalty. @@ -556,7 +571,7 @@ commands like ‘sort -z’ to process arbitrary file names.  -File: grep.info-t, Node: Environment Variables, Next: Exit Status, Prev: Command-line Options, Up: Invoking +File: grep.info, Node: Environment Variables, Next: Exit Status, Prev: Command-line Options, Up: Invoking 2.2 Environment Variables ========================= @@ -728,7 +743,18 @@ whitespace. This category also determines the character encoding, that is, whether text is encoded in UTF-8, ASCII, or some other encoding. In the ‘C’ or ‘POSIX’ locale, all characters are encoded - as a single byte and every byte is a valid character. + as a single byte and every byte is a valid character. In + more-complex encodings such as UTF-8, a sequence of multiple bytes + may be needed to represent a character, and some bytes may be + encoding errors that do not contribute to the representation of any + character. POSIX does not specify the behavior of ‘grep’ when + patterns or input data contain encoding errors or null characters, + so portable scripts should avoid such usage. As an extension to + POSIX, GNU ‘grep’ treats null characters like any other character. + However, unless the ‘-a’ (‘--binary-files=text’) option is used, + the presence of null characters in input or of encoding errors in + output causes GNU ‘grep’ to treat the file as binary and suppress + details about matches. *Note File and Directory Selection::. ‘LANGUAGE’ ‘LC_ALL’ @@ -758,25 +784,27 @@ when ‘POSIXLY_CORRECT’ is not set.  -File: grep.info-t, Node: Exit Status, Next: grep Programs, Prev: Environment Variables, Up: Invoking +File: grep.info, Node: Exit Status, Next: grep Programs, Prev: Environment Variables, Up: Invoking 2.3 Exit Status =============== Normally the exit status is 0 if a line is selected, 1 if no lines were -selected, and 2 if an error occurred. However, if the ‘-q’ or ‘--quiet’ -or ‘--silent’ option is used and a line is selected, the exit status is -0 even if an error occurred. Other ‘grep’ implementations may exit with -status greater than 2 on error. +selected, and 2 if an error occurred. However, if the ‘-L’ or +‘--files-without-match’ is used, the exit status is 0 if a file is +listed, 1 if no files were listed, and 2 if an error occurred. Also, if +the ‘-q’ or ‘--quiet’ or ‘--silent’ option is used and a line is +selected, the exit status is 0 even if an error occurred. Other ‘grep’ +implementations may exit with status greater than 2 on error.  -File: grep.info-t, Node: grep Programs, Prev: Exit Status, Up: Invoking +File: grep.info, Node: grep Programs, Prev: Exit Status, Up: Invoking 2.4 ‘grep’ Programs =================== ‘grep’ searches the named input files for lines containing a match to -the given pattern. By default, ‘grep’ prints the matching lines. A +the given patterns. By default, ‘grep’ prints the matching lines. A file named ‘-’ stands for standard input. If no input is specified, ‘grep’ searches the working directory ‘.’ if given a command-line option specifying recursion; otherwise, ‘grep’ searches standard input. There @@ -784,26 +812,26 @@ ‘-G’ ‘--basic-regexp’ - Interpret the pattern as a basic regular expression (BRE). This is + Interpret patterns as basic regular expressions (BREs). This is the default. ‘-E’ ‘--extended-regexp’ - Interpret the pattern as an extended regular expression (ERE). - (‘-E’ is specified by POSIX.) + Interpret patterns as extended regular expressions (EREs). (‘-E’ + is specified by POSIX.) ‘-F’ ‘--fixed-strings’ - Interpret the pattern as a list of fixed strings (instead of - regular expressions), separated by newlines, any of which is to be - matched. (‘-F’ is specified by POSIX.) + Interpret patterns as fixed strings, not regular expressions. + (‘-F’ is specified by POSIX.) ‘-P’ ‘--perl-regexp’ - Interpret the pattern as a Perl-compatible regular expression - (PCRE). This is experimental, particularly when combined with the - ‘-z’ (‘--null-data’) option, and ‘grep -P’ may warn of - unimplemented features. *Note Other Options::. + Interpret patterns as Perl-compatible regular expressions (PCREs). + PCRE support is here to stay, but consider this option experimental + when combined with the ‘-z’ (‘--null-data’) option, and note that + ‘grep -P’ may warn of unimplemented features. *Note Other + Options::. In addition, two variant programs ‘egrep’ and ‘fgrep’ are available. ‘egrep’ is the same as ‘grep -E’. ‘fgrep’ is the same as ‘grep -F’. @@ -812,7 +840,7 @@ unmodified.  -File: grep.info-t, Node: Regular Expressions, Next: Usage, Prev: Invoking, Up: Top +File: grep.info, Node: Regular Expressions, Next: Usage, Prev: Invoking, Up: Top 3 Regular Expressions ********************* @@ -841,7 +869,7 @@ * Basic vs Extended::  -File: grep.info-t, Node: Fundamental Structure, Next: Character Classes and Bracket Expressions, Up: Regular Expressions +File: grep.info, Node: Fundamental Structure, Next: Character Classes and Bracket Expressions, Up: Regular Expressions 3.1 Fundamental Structure ========================= @@ -851,12 +879,12 @@ are regular expressions that match themselves. Any meta-character with special meaning may be quoted by preceding it with a backslash. + The period ‘.’ matches any single character. It is unspecified +whether ‘.’ matches an encoding error. + A regular expression may be followed by one of several repetition operators: -‘.’ - The period ‘.’ matches any single character. - ‘?’ The preceding item is optional and will be matched at most once. @@ -895,16 +923,18 @@ An unmatched ‘)’ matches just itself.  -File: grep.info-t, Node: Character Classes and Bracket Expressions, Next: The Backslash Character and Special Expressions, Prev: Fundamental Structure, Up: Regular Expressions +File: grep.info, Node: Character Classes and Bracket Expressions, Next: The Backslash Character and Special Expressions, Prev: Fundamental Structure, Up: Regular Expressions 3.2 Character Classes and Bracket Expressions ============================================= A “bracket expression” is a list of characters enclosed by ‘[’ and ‘]’. -It matches any single character in that list; if the first character of +It matches any single character in that list. If the first character of the list is the caret ‘^’, then it matches any character *not* in the -list. For example, the regular expression ‘[0123456789]’ matches any -single digit. +list, and it is unspecified whether it matches an encoding error. For +example, the regular expression ‘[0123456789]’ matches any single digit, +whereas ‘[^()]’ matches any single character that is not an opening or +closing parenthesis, and might or might not match an encoding error. Within a bracket expression, a “range expression” consists of two characters separated by a hyphen. It matches any single character that @@ -1016,7 +1046,7 @@ ‘^’ character a list item, place it anywhere but first.  -File: grep.info-t, Node: The Backslash Character and Special Expressions, Next: Anchoring, Prev: Character Classes and Bracket Expressions, Up: Regular Expressions +File: grep.info, Node: The Backslash Character and Special Expressions, Next: Anchoring, Prev: Character Classes and Bracket Expressions, Up: Regular Expressions 3.3 The Backslash Character and Special Expressions =================================================== @@ -1052,7 +1082,7 @@ matches ‘crate’ but not ‘furry rat’.  -File: grep.info-t, Node: Anchoring, Next: Back-references and Subexpressions, Prev: The Backslash Character and Special Expressions, Up: Regular Expressions +File: grep.info, Node: Anchoring, Next: Back-references and Subexpressions, Prev: The Backslash Character and Special Expressions, Up: Regular Expressions 3.4 Anchoring ============= @@ -1063,7 +1093,7 @@ to beginning or end of a line, respectively.  -File: grep.info-t, Node: Back-references and Subexpressions, Next: Basic vs Extended, Prev: Anchoring, Up: Regular Expressions +File: grep.info, Node: Back-references and Subexpressions, Next: Basic vs Extended, Prev: Anchoring, Up: Regular Expressions 3.5 Back-references and Subexpressions ====================================== @@ -1078,7 +1108,7 @@ expression.  -File: grep.info-t, Node: Basic vs Extended, Prev: Back-references and Subexpressions, Up: Regular Expressions +File: grep.info, Node: Basic vs Extended, Prev: Back-references and Subexpressions, Up: Regular Expressions 3.6 Basic vs Extended Regular Expressions ========================================= @@ -1100,7 +1130,7 @@ portable scripts should avoid it.  -File: grep.info-t, Node: Usage, Next: Performance, Prev: Regular Expressions, Up: Top +File: grep.info, Node: Usage, Next: Performance, Prev: Regular Expressions, Up: Top 4 Usage ******* @@ -1297,7 +1327,7 @@ ‘grep’.  -File: grep.info-t, Node: Performance, Next: Reporting Bugs, Prev: Usage, Up: Top +File: grep.info, Node: Performance, Next: Reporting Bugs, Prev: Usage, Up: Top 5 Performance ************* @@ -1318,7 +1348,7 @@ Generally speaking ‘grep’ operates more efficiently in single-byte locales, since it can avoid the special processing needed for multi-byte -characters. If your pattern will work just as well that way, setting +characters. If your patterns will work just as well that way, setting ‘LC_ALL’ to a single-byte locale can help performance considerably. Setting ‘LC_ALL='C'’ can be particularly efficient, as ‘grep’ is tuned for that locale. @@ -1341,9 +1371,9 @@ On some operating systems that support files with holes—large regions of zeros that are not physically present on secondary storage—‘grep’ can skip over the holes efficiently without needing to read the zeros. This -optimization is not available if the ‘-a’ (‘--text’) option is used -(*note File and Directory Selection::), unless the ‘-z’ (‘--null-data’) -option is also used (*note Other Options::). +optimization is not available if the ‘-a’ (‘--binary-files=text’) option +is used (*note File and Directory Selection::), unless the ‘-z’ +(‘--null-data’) option is also used (*note Other Options::). For more about the algorithms used by ‘grep’ and about related string matching algorithms, see: @@ -1355,27 +1385,27 @@ • Aho AV, Corasick MJ. Efficient string matching: an aid to bibliographic search. _CACM_. 1975;18(6):333–40. - . This introduces the + . This introduces the Aho–Corasick algorithm. • Boyer RS, Moore JS. A fast string searching algorithm. _CACM_. - 1977;20(10):762–72. . This - introduces the Boyer–Moore algorithm. + 1977;20(10):762–72. . + This introduces the Boyer–Moore algorithm. • Faro S, Lecroq T. The exact online string matching problem: a review of the most recent results. _ACM Comput Surv_. - 2013;45(2):13. . This + 2013;45(2):13. . This surveys string matching algorithms that might help improve the performance of ‘grep’ in the future.  -File: grep.info-t, Node: Reporting Bugs, Next: Copying, Prev: Performance, Up: Top +File: grep.info, Node: Reporting Bugs, Next: Copying, Prev: Performance, Up: Top 6 Reporting bugs **************** Bug reports can be found at the GNU bug report logs for ‘grep’ -(http://debbugs.gnu.org/cgi/pkgreport.cgi?package=grep). If you find a +(https://debbugs.gnu.org/cgi/pkgreport.cgi?package=grep). If you find a bug not listed there, please email it to to create a new bug report. @@ -1390,7 +1420,7 @@ Back-references are very slow, and may require exponential time.  -File: grep.info-t, Node: Copying, Next: Index, Prev: Reporting Bugs, Up: Top +File: grep.info, Node: Copying, Next: Index, Prev: Reporting Bugs, Up: Top 7 Copying ********* @@ -1408,19 +1438,19 @@ This general method of licensing software is sometimes called “open source”. The GNU project prefers the term “free software” for reasons outlined at -. +. This manual is free documentation in the same sense. The documentation license is included below. The license for the program is available with the source code, or at -. +. * Menu: * GNU Free Documentation License::  -File: grep.info-t, Node: GNU Free Documentation License, Up: Copying +File: grep.info, Node: GNU Free Documentation License, Up: Copying 7.1 GNU Free Documentation License ================================== @@ -1428,7 +1458,7 @@ Version 1.3, 3 November 2008 Copyright © 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc. - + Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. @@ -1825,7 +1855,7 @@ the GNU Free Documentation License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. See - . + . Each version of the License is given a distinguishing version number. If the Document specifies that a particular numbered @@ -1902,7 +1932,7 @@ their use in free software.  -File: grep.info-t, Node: Index, Prev: Copying, Up: Top +File: grep.info, Node: Index, Prev: Copying, Up: Top Index ***** @@ -1914,12 +1944,13 @@ (line 21) * +: Fundamental Structure. (line 24) +* --: Other Options. (line 7) * --after-context: Context Line Control. (line 15) * --basic-regexp: grep Programs. (line 15) * --before-context: Context Line Control. (line 19) -* --binary: Other Options. (line 12) +* --binary: Other Options. (line 18) * --binary-files: File and Directory Selection. (line 12) * --byte-offset: Output Line Prefix Control. @@ -1945,7 +1976,7 @@ * --exclude-from: File and Directory Selection. (line 82) * --extended-regexp: grep Programs. (line 20) -* --file: Matching Control. (line 14) +* --file: Matching Control. (line 15) * --files-with-matches: General Output Control. (line 35) * --files-without-match: General Output Control. @@ -1957,18 +1988,18 @@ (line 31) * --help: Generic Program Information. (line 7) -* --ignore-case: Matching Control. (line 23) +* --ignore-case: Matching Control. (line 24) * --include: File and Directory Selection. (line 96) * --initial-tab: Output Line Prefix Control. (line 41) -* --invert-match: Matching Control. (line 42) +* --invert-match: Matching Control. (line 43) * --label: Output Line Prefix Control. (line 28) -* --line-buffered: Other Options. (line 7) +* --line-buffered: Other Options. (line 13) * --line-number: Output Line Prefix Control. (line 36) -* --line-regexp: Matching Control. (line 57) +* --line-regexp: Matching Control. (line 65) * --max-count: General Output Control. (line 42) * --no-filename: Output Line Prefix Control. @@ -1977,15 +2008,15 @@ (line 87) * --null: Output Line Prefix Control. (line 50) -* --null-data: Other Options. (line 33) +* --null-data: Other Options. (line 39) * --only-matching: General Output Control. (line 72) -* --perl-regexp: grep Programs. (line 31) +* --perl-regexp: grep Programs. (line 30) * --quiet: General Output Control. (line 80) * --recursive: File and Directory Selection. (line 101) -* --regexp=PATTERN: Matching Control. (line 8) +* --regexp=PATTERNS: Matching Control. (line 8) * --silent: General Output Control. (line 80) * --text: File and Directory Selection. @@ -1994,7 +2025,7 @@ (line 12) * --with-filename: Output Line Prefix Control. (line 18) -* --word-regexp: Matching Control. (line 47) +* --word-regexp: Matching Control. (line 48) * -A: Context Line Control. (line 15) * -a: File and Directory Selection. @@ -2013,14 +2044,14 @@ (line 62) * -e: Matching Control. (line 8) * -E: grep Programs. (line 20) -* -f: Matching Control. (line 14) +* -f: Matching Control. (line 15) * -F: grep Programs. (line 25) * -G: grep Programs. (line 15) * -H: Output Line Prefix Control. (line 18) * -h: Output Line Prefix Control. (line 23) -* -i: Matching Control. (line 23) +* -i: Matching Control. (line 24) * -L: General Output Control. (line 29) * -l: General Output Control. @@ -2033,7 +2064,7 @@ (line 24) * -o: General Output Control. (line 72) -* -P: grep Programs. (line 31) +* -P: grep Programs. (line 30) * -q: General Output Control. (line 80) * -r: File and Directory Selection. @@ -2044,22 +2075,22 @@ (line 87) * -T: Output Line Prefix Control. (line 41) -* -U: Other Options. (line 12) +* -U: Other Options. (line 18) * -V: Generic Program Information. (line 12) -* -v: Matching Control. (line 42) -* -w: Matching Control. (line 47) -* -x: Matching Control. (line 57) -* -y: Matching Control. (line 23) +* -v: Matching Control. (line 43) +* -w: Matching Control. (line 48) +* -x: Matching Control. (line 65) +* -y: Matching Control. (line 24) * -Z: Output Line Prefix Control. (line 50) -* -z: Other Options. (line 33) +* -z: Other Options. (line 39) * .: Fundamental Structure. - (line 15) + (line 11) * ?: Fundamental Structure. (line 18) * _N_GNU_nonoption_argv_flags_ environment variable: Environment Variables. - (line 193) + (line 204) * {,M}: Fundamental Structure. (line 33) * {N,M}: Fundamental Structure. @@ -2071,13 +2102,13 @@ * after context: Context Line Control. (line 15) * alnum character class: Character Classes and Bracket Expressions. - (line 29) + (line 31) * alpha character class: Character Classes and Bracket Expressions. - (line 34) + (line 36) * alphabetic characters: Character Classes and Bracket Expressions. - (line 34) + (line 36) * alphanumeric characters: Character Classes and Bracket Expressions. - (line 29) + (line 31) * anchoring: Anchoring. (line 6) * asterisk: Fundamental Structure. (line 21) @@ -2093,11 +2124,11 @@ (line 8) * binary files <1>: File and Directory Selection. (line 12) -* binary I/O: Other Options. (line 12) +* binary I/O: Other Options. (line 18) * blank character class: Character Classes and Bracket Expressions. - (line 39) + (line 41) * blank characters: Character Classes and Bracket Expressions. - (line 39) + (line 41) * bn GREP_COLORS capability: Environment Variables. (line 134) * braces, first argument omitted: Fundamental Structure. @@ -2114,20 +2145,20 @@ * bugs, reporting: Reporting Bugs. (line 6) * byte offset: Output Line Prefix Control. (line 12) -* case insensitive search: Matching Control. (line 23) +* case insensitive search: Matching Control. (line 24) * case insensitive search <1>: Performance. (line 27) * changing name of standard input: Output Line Prefix Control. (line 28) * character class: Character Classes and Bracket Expressions. (line 6) * character classes: Character Classes and Bracket Expressions. - (line 28) + (line 30) * character type: Environment Variables. (line 161) * classes of characters: Character Classes and Bracket Expressions. - (line 28) + (line 30) * cntrl character class: Character Classes and Bracket Expressions. - (line 42) + (line 44) * context lines: General Output Control. (line 64) * context lines <1>: Context Line Control. @@ -2139,7 +2170,7 @@ * context lines, before match: Context Line Control. (line 19) * control characters: Character Classes and Bracket Expressions. - (line 42) + (line 44) * copying: Copying. (line 6) * counting lines: General Output Control. (line 8) @@ -2150,13 +2181,15 @@ * device search: File and Directory Selection. (line 51) * digit character class: Character Classes and Bracket Expressions. - (line 47) + (line 49) * digit characters: Character Classes and Bracket Expressions. - (line 47) + (line 49) * directory search: File and Directory Selection. (line 62) * dot: Fundamental Structure. - (line 15) + (line 11) +* encoding error: Environment Variables. + (line 168) * environment variables: Environment Variables. (line 44) * exclude directories: File and Directory Selection. @@ -2174,9 +2207,9 @@ * fn GREP_COLORS capability <1>: Environment Variables. (line 139) * graph character class: Character Classes and Bracket Expressions. - (line 50) + (line 52) * graphic characters: Character Classes and Bracket Expressions. - (line 50) + (line 52) * grep programs: grep Programs. (line 6) * GREP_COLOR environment variable: Environment Variables. (line 58) @@ -2189,7 +2222,7 @@ * group separator <1>: Context Line Control. (line 31) * hexadecimal digits: Character Classes and Bracket Expressions. - (line 74) + (line 76) * highlight markers: Environment Variables. (line 58) * highlight markers <1>: Environment Variables. @@ -2200,7 +2233,7 @@ * include files: File and Directory Selection. (line 96) * interval specifications: Basic vs Extended. (line 10) -* invert matching: Matching Control. (line 42) +* invert matching: Matching Control. (line 43) * LANG environment variable: Environment Variables. (line 9) * LANG environment variable <1>: Environment Variables. @@ -2208,13 +2241,13 @@ * LANG environment variable <2>: Environment Variables. (line 168) * LANG environment variable <3>: Environment Variables. - (line 179) + (line 190) * LANGUAGE environment variable: Environment Variables. (line 9) * LANGUAGE environment variable <1>: Environment Variables. - (line 179) + (line 190) * language of messages: Environment Variables. - (line 179) + (line 190) * LC_ALL environment variable: Environment Variables. (line 9) * LC_ALL environment variable <1>: Environment Variables. @@ -2222,7 +2255,7 @@ * LC_ALL environment variable <2>: Environment Variables. (line 168) * LC_ALL environment variable <3>: Environment Variables. - (line 179) + (line 190) * LC_COLLATE environment variable: Environment Variables. (line 161) * LC_CTYPE environment variable: Environment Variables. @@ -2230,17 +2263,17 @@ * LC_MESSAGES environment variable: Environment Variables. (line 9) * LC_MESSAGES environment variable <1>: Environment Variables. - (line 179) -* line buffering: Other Options. (line 7) + (line 190) +* line buffering: Other Options. (line 13) * line numbering: Output Line Prefix Control. (line 36) * ln GREP_COLORS capability: Environment Variables. (line 129) * locales: Performance. (line 20) * lower character class: Character Classes and Bracket Expressions. - (line 53) + (line 55) * lower-case letters: Character Classes and Bracket Expressions. - (line 53) + (line 55) * match expression at most M times: Fundamental Structure. (line 33) * match expression at most once: Fundamental Structure. @@ -2255,22 +2288,22 @@ (line 24) * match expression zero or more times: Fundamental Structure. (line 21) -* match the whole line: Matching Control. (line 57) +* match the whole line: Matching Control. (line 65) * matching basic regular expressions: grep Programs. (line 15) * matching extended regular expressions: grep Programs. (line 20) * matching fixed strings: grep Programs. (line 25) * matching Perl-compatible regular expressions: grep Programs. - (line 31) -* matching whole words: Matching Control. (line 47) + (line 30) +* matching whole words: Matching Control. (line 48) * max-count: General Output Control. (line 42) * mc GREP_COLORS capability: Environment Variables. (line 116) * message language: Environment Variables. - (line 179) + (line 190) * ms GREP_COLORS capability: Environment Variables. (line 108) -* MS-Windows binary I/O: Other Options. (line 12) +* MS-Windows binary I/O: Other Options. (line 18) * mt GREP_COLORS capability: Environment Variables. (line 100) * names of matching files: General Output Control. @@ -2278,42 +2311,45 @@ * national language support: Environment Variables. (line 161) * national language support <1>: Environment Variables. - (line 179) + (line 190) * ne GREP_COLORS capability: Environment Variables. (line 146) * NLS: Environment Variables. (line 161) * no filename prefix: Output Line Prefix Control. (line 23) +* null character: Environment Variables. + (line 168) * numeric characters: Character Classes and Bracket Expressions. - (line 47) + (line 49) * only matching: General Output Control. (line 72) +* option delimiter: Other Options. (line 7) * palindromes: Usage. (line 139) -* pattern from file: Matching Control. (line 14) -* pattern list: Matching Control. (line 8) +* patterns from file: Matching Control. (line 15) +* patterns option: Matching Control. (line 8) * performance: Performance. (line 6) * period: Fundamental Structure. - (line 15) + (line 11) * plus sign: Fundamental Structure. (line 24) * POSIXLY_CORRECT environment variable: Environment Variables. - (line 184) + (line 195) * print character class: Character Classes and Bracket Expressions. - (line 57) -* print non-matching lines: Matching Control. (line 42) + (line 59) +* print non-matching lines: Matching Control. (line 43) * printable characters: Character Classes and Bracket Expressions. - (line 57) + (line 59) * punct character class: Character Classes and Bracket Expressions. - (line 60) + (line 62) * punctuation characters: Character Classes and Bracket Expressions. - (line 60) + (line 62) * question mark: Fundamental Structure. (line 18) * quiet, silent: General Output Control. (line 80) * range expression: Character Classes and Bracket Expressions. - (line 12) + (line 14) * recursive search: File and Directory Selection. (line 101) * recursive search <1>: File and Directory Selection. @@ -2332,13 +2368,13 @@ (line 101) * searching directory trees <4>: File and Directory Selection. (line 109) -* searching for a pattern: Introduction. (line 6) +* searching for patterns: Introduction. (line 6) * sl GREP_COLORS capability: Environment Variables. (line 77) * space character class: Character Classes and Bracket Expressions. - (line 65) + (line 67) * space characters: Character Classes and Bracket Expressions. - (line 65) + (line 67) * subexpression: Back-references and Subexpressions. (line 6) * suppress binary data: File and Directory Selection. @@ -2354,11 +2390,11 @@ * tab-aligned content lines: Output Line Prefix Control. (line 41) * translation of message language: Environment Variables. - (line 179) + (line 190) * upper character class: Character Classes and Bracket Expressions. - (line 70) + (line 72) * upper-case letters: Character Classes and Bracket Expressions. - (line 70) + (line 72) * usage summary, printing: Generic Program Information. (line 7) * usage, examples: Usage. (line 6) @@ -2367,49 +2403,49 @@ * version, printing: Generic Program Information. (line 12) * whitespace characters: Character Classes and Bracket Expressions. - (line 65) + (line 67) * with filename prefix: Output Line Prefix Control. (line 18) * xdigit character class: Character Classes and Bracket Expressions. - (line 74) + (line 76) * xdigit class: Character Classes and Bracket Expressions. - (line 74) + (line 76) * zero-terminated file names: Output Line Prefix Control. (line 50) -* zero-terminated lines: Other Options. (line 33) +* zero-terminated lines: Other Options. (line 39)  Tag Table: -Node: Top770 -Node: Introduction1949 -Node: Invoking2691 -Node: Command-line Options3464 +Node: Top769 +Node: Introduction1957 +Node: Invoking2700 +Node: Command-line Options3466 Node: Generic Program Information4349 -Node: Matching Control4825 -Node: General Output Control7548 -Ref: General Output Control-Footnote-111711 -Node: Output Line Prefix Control11780 -Node: Context Line Control14116 -Node: File and Directory Selection16181 -Node: Other Options21689 -Node: Environment Variables23346 -Node: Exit Status33625 -Node: grep Programs34105 -Node: Regular Expressions35778 -Node: Fundamental Structure36975 -Node: Character Classes and Bracket Expressions38783 -Ref: invalid-bracket-expr42205 -Node: The Backslash Character and Special Expressions43445 -Node: Anchoring44519 -Node: Back-references and Subexpressions44980 -Node: Basic vs Extended45720 -Node: Usage46813 -Node: Performance54291 -Node: Reporting Bugs57976 -Node: Copying58666 -Node: GNU Free Documentation License59794 -Node: Index85099 +Node: Matching Control4823 +Node: General Output Control8054 +Ref: General Output Control-Footnote-112215 +Node: Output Line Prefix Control12284 +Node: Context Line Control14618 +Node: File and Directory Selection16681 +Node: Other Options22187 +Node: Environment Variables24103 +Node: Exit Status35177 +Node: grep Programs35815 +Node: Regular Expressions37446 +Node: Fundamental Structure38641 +Node: Character Classes and Bracket Expressions40499 +Ref: invalid-bracket-expr44124 +Node: The Backslash Character and Special Expressions45364 +Node: Anchoring46436 +Node: Back-references and Subexpressions46895 +Node: Basic vs Extended47633 +Node: Usage48724 +Node: Performance56200 +Node: Reporting Bugs59900 +Node: Copying60589 +Node: GNU Free Documentation License61717 +Node: Index87022  End Tag Table diff -Nru grep-3.1/doc/grep.texi grep-3.3/doc/grep.texi --- grep-3.1/doc/grep.texi 2017-06-25 21:51:39.000000000 +0000 +++ grep-3.3/doc/grep.texi 2018-07-04 15:31:43.000000000 +0000 @@ -18,7 +18,7 @@ @copying This manual is for @command{grep}, a pattern matching engine. -Copyright @copyright{} 1999-2002, 2005, 2008-2017 Free Software Foundation, +Copyright @copyright{} 1999-2002, 2005, 2008-2018 Free Software Foundation, Inc. @quotation @@ -33,11 +33,11 @@ @dircategory Text creation and manipulation @direntry -* grep: (grep). Print lines matching a pattern. +* grep: (grep). Print lines that match patterns. @end direntry @titlepage -@title GNU Grep: Print lines matching a pattern +@title GNU Grep: Print lines that match patterns @subtitle version @value{VERSION}, @value{UPDATED} @author Alain Magloire et al. @page @@ -52,7 +52,7 @@ @node Top @top grep -@command{grep} prints lines that contain a match for a pattern. +@command{grep} prints lines that contain a match for one or more patterns. This manual is for version @value{VERSION} of GNU Grep. @@ -74,10 +74,10 @@ @node Introduction @chapter Introduction -@cindex searching for a pattern +@cindex searching for patterns -@command{grep} searches input files -for lines containing a match to a given pattern list. +Given one or more patterns, @command{grep} searches input files +for matches to the patterns. When it finds a match in a line, it copies the line to standard output (by default), or produces whatever other sort of output you have requested with options. @@ -97,17 +97,16 @@ The general synopsis of the @command{grep} command line is @example -grep @var{options} @var{pattern} @var{input_file_names} +grep [@var{option}...] [@var{patterns}] [@var{file}...] @end example @noindent -There can be zero or more @var{options}. -@var{pattern} will only be seen as such -(and not as an @var{input_file_name}) -if it wasn't already specified within @var{options} -(by using the @samp{-e@ @var{pattern}} -or @samp{-f@ @var{file}} options). -There can be zero or more @var{input_file_names}. + +There can be zero or more @var{option} arguments, and zero or more +@var{file} arguments. The @var{patterns} argument contains one or +more patterns separated by newlines, and is omitted when patterns are +given via the @samp{-e@ @var{patterns}} or @samp{-f@ @var{file}} +options. @menu * Command-line Options:: Short and long names, grouped by category. @@ -170,12 +169,13 @@ @table @option -@item -e @var{pattern} -@itemx --regexp=@var{pattern} +@item -e @var{patterns} +@itemx --regexp=@var{patterns} @opindex -e -@opindex --regexp=@var{pattern} -@cindex pattern list -Use @var{pattern} as the pattern. +@opindex --regexp=@var{patterns} +@cindex patterns option +Use @var{patterns} as one or more patterns; newlines within +@var{patterns} separate each pattern from the next. If this option is used multiple times or is combined with the @option{-f} (@option{--file}) option, search for all patterns given. (@option{-e} is specified by POSIX.) @@ -184,7 +184,7 @@ @itemx --file=@var{file} @opindex -f @opindex --file -@cindex pattern from file +@cindex patterns from file Obtain patterns from @var{file}, one per line. If this option is used multiple times or is combined with the @option{-e} (@option{--regexp}) option, search for all patterns given. @@ -235,16 +235,24 @@ Similarly, it must be either at the end of the line or followed by a non-word constituent character. -Word-constituent characters are letters, digits, and the underscore. +Word constituent characters are letters, digits, and the underscore. This option has no effect if @option{-x} is also specified. +Because the @option{-w} option can match a substring that does not +begin and end with word constituents, it differs from surrounding a +regular expression with @samp{\<} and @samp{\>}. For example, although +@samp{grep -w @@} matches a line containing only @samp{@@}, @samp{grep +'\<@@\>'} cannot match any line because @samp{@@} is not a +word constituent. @xref{The Backslash Character and Special +Expressions}. + @item -x @itemx --line-regexp @opindex -x @opindex --line-regexp @cindex match the whole line Select only those matches that exactly match the whole line. -For a regular expression pattern, this is like parenthesizing the +For regular expression patterns, this is like parenthesizing each pattern and then surrounding it with @samp{^} and @samp{$}. (@option{-x} is specified by POSIX.) @@ -729,6 +737,14 @@ @table @option +@item -- +@opindex -- +@cindex option delimiter +Delimit the option list. Later arguments, if any, are treated as +operands even if they begin with @samp{-}. For example, @samp{grep PAT -- +-file1 file2} searches for the pattern PAT in the files named @file{-file1} +and @file{file2}. + @item --line-buffered @opindex --line-buffered @cindex line buffering @@ -1000,6 +1016,8 @@ @vindex LC_ALL @r{environment variable} @vindex LC_CTYPE @r{environment variable} @vindex LANG @r{environment variable} +@cindex encoding error +@cindex null character These variables specify the locale for the @env{LC_CTYPE} category, which determines the type of characters, e.g., which characters are whitespace. @@ -1007,6 +1025,18 @@ text is encoded in UTF-8, ASCII, or some other encoding. In the @samp{C} or @samp{POSIX} locale, all characters are encoded as a single byte and every byte is a valid character. +In more-complex encodings such as UTF-8, a sequence of multiple bytes +may be needed to represent a character, and some bytes may be encoding +errors that do not contribute to the representation of any character. +POSIX does not specify the behavior of @command{grep} when patterns or +input data contain encoding errors or null characters, so portable +scripts should avoid such usage. As an extension to POSIX, GNU +@command{grep} treats null characters like any other character. +However, unless the @option{-a} (@option{--binary-files=text}) option +is used, the presence of null characters in input or of encoding +errors in output causes GNU @command{grep} to treat the file as binary +and suppress details about matches. @xref{File and Directory +Selection}. @item LANGUAGE @itemx LC_ALL @@ -1059,6 +1089,9 @@ Normally the exit status is 0 if a line is selected, 1 if no lines were selected, and 2 if an error occurred. However, if the +@option{-L} or @option{--files-without-match} is used, the exit status +is 0 if a file is listed, 1 if no files were listed, and 2 if an error +occurred. Also, if the @option{-q} or @option{--quiet} or @option{--silent} option is used and a line is selected, the exit status is 0 even if an error occurred. Other @command{grep} implementations may exit with status @@ -1070,7 +1103,7 @@ @cindex variants of @command{grep} @command{grep} searches the named input files -for lines containing a match to the given pattern. +for lines containing a match to the given patterns. By default, @command{grep} prints the matching lines. A file named @file{-} stands for standard input. If no input is specified, @command{grep} searches the working @@ -1086,7 +1119,7 @@ @opindex -G @opindex --basic-regexp @cindex matching basic regular expressions -Interpret the pattern as a basic regular expression (BRE). +Interpret patterns as basic regular expressions (BREs). This is the default. @item -E @@ -1094,7 +1127,7 @@ @opindex -E @opindex --extended-regexp @cindex matching extended regular expressions -Interpret the pattern as an extended regular expression (ERE). +Interpret patterns as extended regular expressions (EREs). (@option{-E} is specified by POSIX.) @item -F @@ -1102,8 +1135,7 @@ @opindex -F @opindex --fixed-strings @cindex matching fixed strings -Interpret the pattern as a list of fixed strings (instead of regular -expressions), separated by newlines, any of which is to be matched. +Interpret patterns as fixed strings, not regular expressions. (@option{-F} is specified by POSIX.) @item -P @@ -1111,9 +1143,9 @@ @opindex -P @opindex --perl-regexp @cindex matching Perl-compatible regular expressions -Interpret the pattern as a Perl-compatible regular expression (PCRE). -This is experimental, particularly when combined with -the @option{-z} (@option{--null-data}) option, and +Interpret patterns as Perl-compatible regular expressions (PCREs). +PCRE support is here to stay, but consider this option experimental when +combined with the @option{-z} (@option{--null-data}) option, and note that @samp{grep@ -P} may warn of unimplemented features. @xref{Other Options}. @@ -1168,16 +1200,16 @@ Any meta-character with special meaning may be quoted by preceding it with a backslash. -A regular expression may be followed by one of several -repetition operators: - -@table @samp - -@item . @opindex . @cindex dot @cindex period The period @samp{.} matches any single character. +It is unspecified whether @samp{.} matches an encoding error. + +A regular expression may be followed by one of several +repetition operators: + +@table @samp @item ? @opindex ? @@ -1248,11 +1280,15 @@ @cindex character class A @dfn{bracket expression} is a list of characters enclosed by @samp{[} and @samp{]}. -It matches any single character in that list; -if the first character of the list is the caret @samp{^}, -then it matches any character @strong{not} in the list. +It matches any single character in that list. +If the first character of the list is the caret @samp{^}, +then it matches any character @strong{not} in the list, +and it is unspecified whether it matches an encoding error. For example, the regular expression -@samp{[0123456789]} matches any single digit. +@samp{[0123456789]} matches any single digit, +whereas @samp{[^()]} matches any single character that is not +an opening or closing parenthesis, and might or might not match an +encoding error. @cindex range expression Within a bracket expression, a @dfn{range expression} consists of two @@ -1809,7 +1845,7 @@ @cindex locales Generally speaking @command{grep} operates more efficiently in single-byte locales, since it can avoid the special processing needed -for multi-byte characters. If your pattern will work just as well +for multi-byte characters. If your patterns will work just as well that way, setting @env{LC_ALL} to a single-byte locale can help performance considerably. Setting @samp{LC_ALL='C'} can be particularly efficient, as @command{grep} is tuned for that locale. @@ -1837,7 +1873,7 @@ regions of zeros that are not physically present on secondary storage---@command{grep} can skip over the holes efficiently without needing to read the zeros. This optimization is not available if the -@option{-a} (@option{--text}) option is used (@pxref{File and +@option{-a} (@option{--binary-files=text}) option is used (@pxref{File and Directory Selection}), unless the @option{-z} (@option{--null-data}) option is also used (@pxref{Other Options}). @@ -1856,20 +1892,20 @@ @item Aho AV, Corasick MJ. Efficient string matching: an aid to bibliographic search. @emph{CACM}. 1975;18(6):333--40. -@url{http://dx.doi.org/10.1145/360825.360855}. +@url{https://dx.doi.org/10.1145/360825.360855}. This introduces the Aho--Corasick algorithm. @item Boyer RS, Moore JS. A fast string searching algorithm. @emph{CACM}. 1977;20(10):762--72. -@url{http://dx.doi.org/10.1145/359842.359859}. +@url{https://dx.doi.org/10.1145/359842.359859}. This introduces the Boyer--Moore algorithm. @item Faro S, Lecroq T. The exact online string matching problem: a review of the most recent results. @emph{ACM Comput Surv}. 2013;45(2):13. -@url{http://dx.doi.org/10.1145/2431211.2431212}. +@url{https://dx.doi.org/10.1145/2431211.2431212}. This surveys string matching algorithms that might help improve the performance of @command{grep} in the future. @end itemize @@ -1880,7 +1916,7 @@ @cindex bugs, reporting Bug reports can be found at the -@url{http://debbugs.gnu.org/cgi/pkgreport.cgi?package=grep, +@url{https://debbugs.gnu.org/cgi/pkgreport.cgi?package=grep, GNU bug report logs for @command{grep}}. If you find a bug not listed there, please email it to @email{bug-grep@@gnu.org} to create a new bug report. @@ -1915,12 +1951,12 @@ This general method of licensing software is sometimes called @dfn{open source}. The GNU project prefers the term ``free software'' for reasons outlined at -@url{http://www.gnu.org/philosophy/open-source-misses-the-point.html}. +@url{https://www.gnu.org/philosophy/open-source-misses-the-point.html}. This manual is free documentation in the same sense. The documentation license is included below. The license for the program is available with the source code, or at -@url{http://www.gnu.org/licenses/gpl.html}. +@url{https://www.gnu.org/licenses/gpl.html}. @menu * GNU Free Documentation License:: diff -Nru grep-3.1/doc/Makefile.am grep-3.3/doc/Makefile.am --- grep-3.1/doc/Makefile.am 2017-01-01 11:34:33.000000000 +0000 +++ grep-3.3/doc/Makefile.am 2018-04-21 23:35:48.000000000 +0000 @@ -1,7 +1,7 @@ # Process this file with automake to create Makefile.in # Makefile.am for grep/doc. # -# Copyright 2008-2017 Free Software Foundation, Inc. +# Copyright 2008-2018 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 @@ # 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 . +# along with this program. If not, see . info_TEXINFOS = grep.texi grep_TEXINFOS = fdl.texi diff -Nru grep-3.1/doc/Makefile.in grep-3.3/doc/Makefile.in --- grep-3.1/doc/Makefile.in 2017-07-02 20:12:56.000000000 +0000 +++ grep-3.3/doc/Makefile.in 2018-12-21 03:59:31.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.99a from Makefile.am. +# Makefile.in generated by automake 1.16a from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2015 Free Software Foundation, Inc. +# Copyright (C) 1994-2018 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -17,7 +17,7 @@ # Process this file with automake to create Makefile.in # Makefile.am for grep/doc. # -# Copyright 2008-2017 Free Software Foundation, Inc. +# Copyright 2008-2018 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,7 +30,7 @@ # 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 . +# along with this program. If not, see . VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ @@ -107,17 +107,18 @@ subdir = doc ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \ + $(top_srcdir)/m4/__inline.m4 \ $(top_srcdir)/m4/absolute-header.m4 $(top_srcdir)/m4/alloca.m4 \ - $(top_srcdir)/m4/assert.m4 $(top_srcdir)/m4/btowc.m4 \ - $(top_srcdir)/m4/builtin-expect.m4 \ - $(top_srcdir)/m4/chdir-long.m4 \ + $(top_srcdir)/m4/arpa_inet_h.m4 $(top_srcdir)/m4/assert.m4 \ + $(top_srcdir)/m4/btowc.m4 $(top_srcdir)/m4/builtin-expect.m4 \ + $(top_srcdir)/m4/c-stack.m4 $(top_srcdir)/m4/chdir-long.m4 \ $(top_srcdir)/m4/close-stream.m4 $(top_srcdir)/m4/close.m4 \ $(top_srcdir)/m4/closedir.m4 $(top_srcdir)/m4/closeout.m4 \ $(top_srcdir)/m4/codeset.m4 $(top_srcdir)/m4/configmake.m4 \ $(top_srcdir)/m4/ctype.m4 $(top_srcdir)/m4/cycle-check.m4 \ $(top_srcdir)/m4/d-ino.m4 $(top_srcdir)/m4/d-type.m4 \ - $(top_srcdir)/m4/dirent-safer.m4 $(top_srcdir)/m4/dirent_h.m4 \ - $(top_srcdir)/m4/dirfd.m4 $(top_srcdir)/m4/dirname.m4 \ + $(top_srcdir)/m4/dirent_h.m4 $(top_srcdir)/m4/dirfd.m4 \ + $(top_srcdir)/m4/dirname.m4 \ $(top_srcdir)/m4/double-slash-root.m4 $(top_srcdir)/m4/dup.m4 \ $(top_srcdir)/m4/dup2.m4 $(top_srcdir)/m4/eealloc.m4 \ $(top_srcdir)/m4/environ.m4 $(top_srcdir)/m4/errno_h.m4 \ @@ -129,32 +130,38 @@ $(top_srcdir)/m4/fdopen.m4 $(top_srcdir)/m4/fdopendir.m4 \ $(top_srcdir)/m4/filenamecat.m4 $(top_srcdir)/m4/flexmember.m4 \ $(top_srcdir)/m4/float_h.m4 $(top_srcdir)/m4/fnmatch.m4 \ - $(top_srcdir)/m4/fpending.m4 $(top_srcdir)/m4/fpieee.m4 \ - $(top_srcdir)/m4/fstat.m4 $(top_srcdir)/m4/fstatat.m4 \ + $(top_srcdir)/m4/fnmatch_h.m4 $(top_srcdir)/m4/fpending.m4 \ + $(top_srcdir)/m4/fpieee.m4 $(top_srcdir)/m4/fstat.m4 \ + $(top_srcdir)/m4/fstatat.m4 $(top_srcdir)/m4/ftruncate.m4 \ $(top_srcdir)/m4/fts.m4 $(top_srcdir)/m4/getcwd.m4 \ $(top_srcdir)/m4/getdtablesize.m4 $(top_srcdir)/m4/getopt.m4 \ $(top_srcdir)/m4/getpagesize.m4 \ $(top_srcdir)/m4/getprogname.m4 $(top_srcdir)/m4/gettext.m4 \ - $(top_srcdir)/m4/glibc21.m4 $(top_srcdir)/m4/gnulib-common.m4 \ + $(top_srcdir)/m4/gettimeofday.m4 $(top_srcdir)/m4/glibc21.m4 \ + $(top_srcdir)/m4/gnulib-common.m4 \ $(top_srcdir)/m4/gnulib-comp.m4 \ - $(top_srcdir)/m4/hard-locale.m4 $(top_srcdir)/m4/i-ring.m4 \ + $(top_srcdir)/m4/host-cpu-c-abi.m4 $(top_srcdir)/m4/i-ring.m4 \ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/iconv_h.m4 \ $(top_srcdir)/m4/iconv_open.m4 \ - $(top_srcdir)/m4/include_next.m4 $(top_srcdir)/m4/inline.m4 \ + $(top_srcdir)/m4/include_next.m4 $(top_srcdir)/m4/inet_pton.m4 \ + $(top_srcdir)/m4/inline.m4 \ + $(top_srcdir)/m4/intl-thread-locale.m4 \ $(top_srcdir)/m4/intlmacosx.m4 $(top_srcdir)/m4/intmax_t.m4 \ $(top_srcdir)/m4/inttostr.m4 $(top_srcdir)/m4/inttypes-pri.m4 \ $(top_srcdir)/m4/inttypes.m4 $(top_srcdir)/m4/inttypes_h.m4 \ - $(top_srcdir)/m4/isatty.m4 $(top_srcdir)/m4/isblank.m4 \ - $(top_srcdir)/m4/iswblank.m4 $(top_srcdir)/m4/iswctype.m4 \ - $(top_srcdir)/m4/langinfo_h.m4 $(top_srcdir)/m4/largefile.m4 \ - $(top_srcdir)/m4/lcmessage.m4 $(top_srcdir)/m4/lib-ld.m4 \ - $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ + $(top_srcdir)/m4/ioctl.m4 $(top_srcdir)/m4/isatty.m4 \ + $(top_srcdir)/m4/isblank.m4 $(top_srcdir)/m4/iswblank.m4 \ + $(top_srcdir)/m4/iswctype.m4 $(top_srcdir)/m4/langinfo_h.m4 \ + $(top_srcdir)/m4/largefile.m4 $(top_srcdir)/m4/lcmessage.m4 \ + $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ + $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libsigsegv.m4 \ $(top_srcdir)/m4/libunistring-base.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-tr.m4 $(top_srcdir)/m4/locale-zh.m4 \ $(top_srcdir)/m4/locale_h.m4 $(top_srcdir)/m4/localeconv.m4 \ - $(top_srcdir)/m4/localename.m4 $(top_srcdir)/m4/lock.m4 \ + $(top_srcdir)/m4/localename.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/manywarnings.m4 \ @@ -167,35 +174,46 @@ $(top_srcdir)/m4/minmax.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/nanosleep.m4 $(top_srcdir)/m4/netinet_in_h.m4 \ $(top_srcdir)/m4/nl_langinfo.m4 $(top_srcdir)/m4/nls.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/off_t.m4 $(top_srcdir)/m4/open-cloexec.m4 \ $(top_srcdir)/m4/open.m4 $(top_srcdir)/m4/openat.m4 \ $(top_srcdir)/m4/opendir.m4 $(top_srcdir)/m4/pathmax.m4 \ $(top_srcdir)/m4/pcre.m4 $(top_srcdir)/m4/perl.m4 \ - $(top_srcdir)/m4/pipe.m4 $(top_srcdir)/m4/pkg.m4 \ - $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/printf.m4 \ - $(top_srcdir)/m4/progtest.m4 \ + $(top_srcdir)/m4/perror.m4 $(top_srcdir)/m4/pipe.m4 \ + $(top_srcdir)/m4/pkg.m4 $(top_srcdir)/m4/po.m4 \ + $(top_srcdir)/m4/printf.m4 $(top_srcdir)/m4/progtest.m4 \ $(top_srcdir)/m4/pthread_rwlock_rdlock.m4 \ $(top_srcdir)/m4/putenv.m4 $(top_srcdir)/m4/quote.m4 \ - $(top_srcdir)/m4/quotearg.m4 $(top_srcdir)/m4/read.m4 \ - $(top_srcdir)/m4/readdir.m4 $(top_srcdir)/m4/realloc.m4 \ - $(top_srcdir)/m4/regex.m4 $(top_srcdir)/m4/safe-read.m4 \ - $(top_srcdir)/m4/save-cwd.m4 $(top_srcdir)/m4/setenv.m4 \ - $(top_srcdir)/m4/setlocale.m4 $(top_srcdir)/m4/size_max.m4 \ - $(top_srcdir)/m4/snprintf.m4 $(top_srcdir)/m4/ssize_t.m4 \ - $(top_srcdir)/m4/stat.m4 $(top_srcdir)/m4/std-gnu11.m4 \ - $(top_srcdir)/m4/stdalign.m4 $(top_srcdir)/m4/stdarg.m4 \ - $(top_srcdir)/m4/stdbool.m4 $(top_srcdir)/m4/stddef_h.m4 \ - $(top_srcdir)/m4/stdint.m4 $(top_srcdir)/m4/stdint_h.m4 \ - $(top_srcdir)/m4/stdio_h.m4 $(top_srcdir)/m4/stdlib_h.m4 \ - $(top_srcdir)/m4/stpcpy.m4 $(top_srcdir)/m4/strdup.m4 \ - $(top_srcdir)/m4/strerror.m4 $(top_srcdir)/m4/string_h.m4 \ + $(top_srcdir)/m4/quotearg.m4 $(top_srcdir)/m4/raise.m4 \ + $(top_srcdir)/m4/read.m4 $(top_srcdir)/m4/readdir.m4 \ + $(top_srcdir)/m4/realloc.m4 $(top_srcdir)/m4/regex.m4 \ + $(top_srcdir)/m4/safe-read.m4 $(top_srcdir)/m4/save-cwd.m4 \ + $(top_srcdir)/m4/select.m4 $(top_srcdir)/m4/setenv.m4 \ + $(top_srcdir)/m4/setlocale.m4 $(top_srcdir)/m4/sigaction.m4 \ + $(top_srcdir)/m4/signal_h.m4 \ + $(top_srcdir)/m4/signalblocking.m4 \ + $(top_srcdir)/m4/size_max.m4 $(top_srcdir)/m4/sleep.m4 \ + $(top_srcdir)/m4/snprintf.m4 $(top_srcdir)/m4/socketlib.m4 \ + $(top_srcdir)/m4/sockets.m4 $(top_srcdir)/m4/socklen.m4 \ + $(top_srcdir)/m4/sockpfaf.m4 $(top_srcdir)/m4/ssize_t.m4 \ + $(top_srcdir)/m4/stat-time.m4 $(top_srcdir)/m4/stat.m4 \ + $(top_srcdir)/m4/std-gnu11.m4 $(top_srcdir)/m4/stdalign.m4 \ + $(top_srcdir)/m4/stdarg.m4 $(top_srcdir)/m4/stdbool.m4 \ + $(top_srcdir)/m4/stddef_h.m4 $(top_srcdir)/m4/stdint.m4 \ + $(top_srcdir)/m4/stdint_h.m4 $(top_srcdir)/m4/stdio_h.m4 \ + $(top_srcdir)/m4/stdlib_h.m4 $(top_srcdir)/m4/stpcpy.m4 \ + $(top_srcdir)/m4/strdup.m4 $(top_srcdir)/m4/strerror.m4 \ + $(top_srcdir)/m4/strerror_r.m4 $(top_srcdir)/m4/string_h.m4 \ $(top_srcdir)/m4/strnlen.m4 $(top_srcdir)/m4/strstr.m4 \ $(top_srcdir)/m4/strtoimax.m4 $(top_srcdir)/m4/strtoll.m4 \ $(top_srcdir)/m4/strtoull.m4 $(top_srcdir)/m4/strtoumax.m4 \ - $(top_srcdir)/m4/symlink.m4 $(top_srcdir)/m4/sys_socket_h.m4 \ - $(top_srcdir)/m4/sys_stat_h.m4 $(top_srcdir)/m4/sys_types_h.m4 \ + $(top_srcdir)/m4/symlink.m4 $(top_srcdir)/m4/sys_ioctl_h.m4 \ + $(top_srcdir)/m4/sys_select_h.m4 \ + $(top_srcdir)/m4/sys_socket_h.m4 \ + $(top_srcdir)/m4/sys_stat_h.m4 $(top_srcdir)/m4/sys_time_h.m4 \ + $(top_srcdir)/m4/sys_types_h.m4 $(top_srcdir)/m4/sys_uio_h.m4 \ $(top_srcdir)/m4/threadlib.m4 $(top_srcdir)/m4/time_h.m4 \ $(top_srcdir)/m4/unistd-safer.m4 $(top_srcdir)/m4/unistd_h.m4 \ $(top_srcdir)/m4/unlocked-io.m4 $(top_srcdir)/m4/vasnprintf.m4 \ @@ -204,9 +222,11 @@ $(top_srcdir)/m4/wchar_h.m4 $(top_srcdir)/m4/wchar_t.m4 \ $(top_srcdir)/m4/wcrtomb.m4 $(top_srcdir)/m4/wctob.m4 \ $(top_srcdir)/m4/wctomb.m4 $(top_srcdir)/m4/wctype_h.m4 \ - $(top_srcdir)/m4/wcwidth.m4 $(top_srcdir)/m4/wint_t.m4 \ - $(top_srcdir)/m4/xalloc.m4 $(top_srcdir)/m4/xsize.m4 \ - $(top_srcdir)/m4/xstrtol.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/m4/wcwidth.m4 \ + $(top_srcdir)/m4/windows-stat-inodes.m4 \ + $(top_srcdir)/m4/wint_t.m4 $(top_srcdir)/m4/xalloc.m4 \ + $(top_srcdir)/m4/xsize.m4 $(top_srcdir)/m4/xstrtol.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/version.texi \ @@ -359,8 +379,11 @@ GLIBC21 = @GLIBC21@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ +GNULIB_ACCEPT = @GNULIB_ACCEPT@ +GNULIB_ACCEPT4 = @GNULIB_ACCEPT4@ GNULIB_ALPHASORT = @GNULIB_ALPHASORT@ GNULIB_ATOLL = @GNULIB_ATOLL@ +GNULIB_BIND = @GNULIB_BIND@ GNULIB_BTOWC = @GNULIB_BTOWC@ GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@ GNULIB_CANONICALIZE_FILE_NAME = @GNULIB_CANONICALIZE_FILE_NAME@ @@ -368,6 +391,7 @@ GNULIB_CHOWN = @GNULIB_CHOWN@ GNULIB_CLOSE = @GNULIB_CLOSE@ GNULIB_CLOSEDIR = @GNULIB_CLOSEDIR@ +GNULIB_CONNECT = @GNULIB_CONNECT@ GNULIB_CTIME = @GNULIB_CTIME@ GNULIB_DIRFD = @GNULIB_DIRFD@ GNULIB_DPRINTF = @GNULIB_DPRINTF@ @@ -377,6 +401,7 @@ GNULIB_DUPLOCALE = @GNULIB_DUPLOCALE@ GNULIB_ENVIRON = @GNULIB_ENVIRON@ GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@ +GNULIB_EXPLICIT_BZERO = @GNULIB_EXPLICIT_BZERO@ GNULIB_FACCESSAT = @GNULIB_FACCESSAT@ GNULIB_FCHDIR = @GNULIB_FCHDIR@ GNULIB_FCHMODAT = @GNULIB_FCHMODAT@ @@ -391,6 +416,7 @@ GNULIB_FFSLL = @GNULIB_FFSLL@ GNULIB_FGETC = @GNULIB_FGETC@ GNULIB_FGETS = @GNULIB_FGETS@ +GNULIB_FNMATCH = @GNULIB_FNMATCH@ GNULIB_FOPEN = @GNULIB_FOPEN@ GNULIB_FPRINTF = @GNULIB_FPRINTF@ GNULIB_FPRINTF_POSIX = @GNULIB_FPRINTF_POSIX@ @@ -423,6 +449,10 @@ GNULIB_GETLOGIN = @GNULIB_GETLOGIN@ GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@ GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@ +GNULIB_GETPASS = @GNULIB_GETPASS@ +GNULIB_GETPEERNAME = @GNULIB_GETPEERNAME@ +GNULIB_GETSOCKNAME = @GNULIB_GETSOCKNAME@ +GNULIB_GETSOCKOPT = @GNULIB_GETSOCKOPT@ GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@ GNULIB_GETTIMEOFDAY = @GNULIB_GETTIMEOFDAY@ GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@ @@ -432,6 +462,9 @@ GNULIB_ICONV = @GNULIB_ICONV@ GNULIB_IMAXABS = @GNULIB_IMAXABS@ GNULIB_IMAXDIV = @GNULIB_IMAXDIV@ +GNULIB_INET_NTOP = @GNULIB_INET_NTOP@ +GNULIB_INET_PTON = @GNULIB_INET_PTON@ +GNULIB_IOCTL = @GNULIB_IOCTL@ GNULIB_ISATTY = @GNULIB_ISATTY@ GNULIB_ISBLANK = @GNULIB_ISBLANK@ GNULIB_ISWBLANK = @GNULIB_ISWBLANK@ @@ -440,7 +473,9 @@ GNULIB_LCHOWN = @GNULIB_LCHOWN@ GNULIB_LINK = @GNULIB_LINK@ GNULIB_LINKAT = @GNULIB_LINKAT@ +GNULIB_LISTEN = @GNULIB_LISTEN@ GNULIB_LOCALECONV = @GNULIB_LOCALECONV@ +GNULIB_LOCALENAME = @GNULIB_LOCALENAME@ GNULIB_LOCALTIME = @GNULIB_LOCALTIME@ GNULIB_LSEEK = @GNULIB_LSEEK@ GNULIB_LSTAT = @GNULIB_LSTAT@ @@ -499,6 +534,8 @@ GNULIB_PREAD = @GNULIB_PREAD@ GNULIB_PRINTF = @GNULIB_PRINTF@ GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@ +GNULIB_PSELECT = @GNULIB_PSELECT@ +GNULIB_PTHREAD_SIGMASK = @GNULIB_PTHREAD_SIGMASK@ GNULIB_PTSNAME = @GNULIB_PTSNAME@ GNULIB_PTSNAME_R = @GNULIB_PTSNAME_R@ GNULIB_PUTC = @GNULIB_PUTC@ @@ -507,6 +544,7 @@ GNULIB_PUTS = @GNULIB_PUTS@ GNULIB_PWRITE = @GNULIB_PWRITE@ GNULIB_QSORT_R = @GNULIB_QSORT_R@ +GNULIB_RAISE = @GNULIB_RAISE@ GNULIB_RANDOM = @GNULIB_RANDOM@ GNULIB_RANDOM_R = @GNULIB_RANDOM_R@ GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@ @@ -514,8 +552,11 @@ GNULIB_READDIR = @GNULIB_READDIR@ GNULIB_READLINK = @GNULIB_READLINK@ GNULIB_READLINKAT = @GNULIB_READLINKAT@ +GNULIB_REALLOCARRAY = @GNULIB_REALLOCARRAY@ GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@ GNULIB_REALPATH = @GNULIB_REALPATH@ +GNULIB_RECV = @GNULIB_RECV@ +GNULIB_RECVFROM = @GNULIB_RECVFROM@ GNULIB_REMOVE = @GNULIB_REMOVE@ GNULIB_RENAME = @GNULIB_RENAME@ GNULIB_RENAMEAT = @GNULIB_RENAMEAT@ @@ -525,11 +566,20 @@ GNULIB_SCANDIR = @GNULIB_SCANDIR@ GNULIB_SCANF = @GNULIB_SCANF@ GNULIB_SECURE_GETENV = @GNULIB_SECURE_GETENV@ +GNULIB_SELECT = @GNULIB_SELECT@ +GNULIB_SEND = @GNULIB_SEND@ +GNULIB_SENDTO = @GNULIB_SENDTO@ GNULIB_SETENV = @GNULIB_SETENV@ GNULIB_SETHOSTNAME = @GNULIB_SETHOSTNAME@ GNULIB_SETLOCALE = @GNULIB_SETLOCALE@ +GNULIB_SETSOCKOPT = @GNULIB_SETSOCKOPT@ +GNULIB_SHUTDOWN = @GNULIB_SHUTDOWN@ +GNULIB_SIGACTION = @GNULIB_SIGACTION@ +GNULIB_SIGNAL_H_SIGPIPE = @GNULIB_SIGNAL_H_SIGPIPE@ +GNULIB_SIGPROCMASK = @GNULIB_SIGPROCMASK@ GNULIB_SLEEP = @GNULIB_SLEEP@ GNULIB_SNPRINTF = @GNULIB_SNPRINTF@ +GNULIB_SOCKET = @GNULIB_SOCKET@ GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@ GNULIB_STAT = @GNULIB_STAT@ GNULIB_STDIO_H_NONBLOCKING = @GNULIB_STDIO_H_NONBLOCKING@ @@ -627,7 +677,9 @@ GNULIB_WRITE = @GNULIB_WRITE@ GNULIB__EXIT = @GNULIB__EXIT@ GREP = @GREP@ +HAVE_ACCEPT4 = @HAVE_ACCEPT4@ HAVE_ALPHASORT = @HAVE_ALPHASORT@ +HAVE_ARPA_INET_H = @HAVE_ARPA_INET_H@ HAVE_ATOLL = @HAVE_ATOLL@ HAVE_BTOWC = @HAVE_BTOWC@ HAVE_C99_STDINT_H = @HAVE_C99_STDINT_H@ @@ -653,12 +705,16 @@ HAVE_DECL_GETUSERSHELL = @HAVE_DECL_GETUSERSHELL@ HAVE_DECL_IMAXABS = @HAVE_DECL_IMAXABS@ HAVE_DECL_IMAXDIV = @HAVE_DECL_IMAXDIV@ +HAVE_DECL_INET_NTOP = @HAVE_DECL_INET_NTOP@ +HAVE_DECL_INET_PTON = @HAVE_DECL_INET_PTON@ +HAVE_DECL_INITSTATE = @HAVE_DECL_INITSTATE@ HAVE_DECL_LOCALTIME_R = @HAVE_DECL_LOCALTIME_R@ HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@ HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@ HAVE_DECL_OBSTACK_PRINTF = @HAVE_DECL_OBSTACK_PRINTF@ HAVE_DECL_SETENV = @HAVE_DECL_SETENV@ HAVE_DECL_SETHOSTNAME = @HAVE_DECL_SETHOSTNAME@ +HAVE_DECL_SETSTATE = @HAVE_DECL_SETSTATE@ HAVE_DECL_SNPRINTF = @HAVE_DECL_SNPRINTF@ HAVE_DECL_STRDUP = @HAVE_DECL_STRDUP@ HAVE_DECL_STRERROR_R = @HAVE_DECL_STRERROR_R@ @@ -668,6 +724,7 @@ HAVE_DECL_STRTOIMAX = @HAVE_DECL_STRTOIMAX@ HAVE_DECL_STRTOK_R = @HAVE_DECL_STRTOK_R@ HAVE_DECL_STRTOUMAX = @HAVE_DECL_STRTOUMAX@ +HAVE_DECL_TRUNCATE = @HAVE_DECL_TRUNCATE@ HAVE_DECL_TTYNAME_R = @HAVE_DECL_TTYNAME_R@ HAVE_DECL_UNSETENV = @HAVE_DECL_UNSETENV@ HAVE_DECL_VSNPRINTF = @HAVE_DECL_VSNPRINTF@ @@ -679,6 +736,7 @@ HAVE_DUP3 = @HAVE_DUP3@ HAVE_DUPLOCALE = @HAVE_DUPLOCALE@ HAVE_EUIDACCESS = @HAVE_EUIDACCESS@ +HAVE_EXPLICIT_BZERO = @HAVE_EXPLICIT_BZERO@ HAVE_FACCESSAT = @HAVE_FACCESSAT@ HAVE_FCHDIR = @HAVE_FCHDIR@ HAVE_FCHMODAT = @HAVE_FCHMODAT@ @@ -689,6 +747,9 @@ HAVE_FEATURES_H = @HAVE_FEATURES_H@ HAVE_FFSL = @HAVE_FFSL@ HAVE_FFSLL = @HAVE_FFSLL@ +HAVE_FNMATCH = @HAVE_FNMATCH@ +HAVE_FNMATCH_H = @HAVE_FNMATCH_H@ +HAVE_FREELOCALE = @HAVE_FREELOCALE@ HAVE_FSEEKO = @HAVE_FSEEKO@ HAVE_FSTATAT = @HAVE_FSTATAT@ HAVE_FSYNC = @HAVE_FSYNC@ @@ -701,13 +762,17 @@ HAVE_GETLOGIN = @HAVE_GETLOGIN@ HAVE_GETOPT_H = @HAVE_GETOPT_H@ HAVE_GETPAGESIZE = @HAVE_GETPAGESIZE@ +HAVE_GETPASS = @HAVE_GETPASS@ HAVE_GETSUBOPT = @HAVE_GETSUBOPT@ +HAVE_GETTIMEOFDAY = @HAVE_GETTIMEOFDAY@ HAVE_GRANTPT = @HAVE_GRANTPT@ HAVE_GROUP_MEMBER = @HAVE_GROUP_MEMBER@ +HAVE_IMAXDIV_T = @HAVE_IMAXDIV_T@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_ISBLANK = @HAVE_ISBLANK@ HAVE_ISWBLANK = @HAVE_ISWBLANK@ HAVE_ISWCNTRL = @HAVE_ISWCNTRL@ +HAVE_LANGINFO_ALTMON = @HAVE_LANGINFO_ALTMON@ HAVE_LANGINFO_CODESET = @HAVE_LANGINFO_CODESET@ HAVE_LANGINFO_ERA = @HAVE_LANGINFO_ERA@ HAVE_LANGINFO_H = @HAVE_LANGINFO_H@ @@ -715,6 +780,7 @@ HAVE_LANGINFO_YESEXPR = @HAVE_LANGINFO_YESEXPR@ HAVE_LCHMOD = @HAVE_LCHMOD@ HAVE_LCHOWN = @HAVE_LCHOWN@ +HAVE_LIBSIGSEGV = @HAVE_LIBSIGSEGV@ HAVE_LINK = @HAVE_LINK@ HAVE_LINKAT = @HAVE_LINKAT@ HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@ @@ -740,6 +806,8 @@ HAVE_MKSTEMPS = @HAVE_MKSTEMPS@ HAVE_MSVC_INVALID_PARAMETER_HANDLER = @HAVE_MSVC_INVALID_PARAMETER_HANDLER@ HAVE_NANOSLEEP = @HAVE_NANOSLEEP@ +HAVE_NETINET_IN_H = @HAVE_NETINET_IN_H@ +HAVE_NEWLOCALE = @HAVE_NEWLOCALE@ HAVE_NL_LANGINFO = @HAVE_NL_LANGINFO@ HAVE_OPENAT = @HAVE_OPENAT@ HAVE_OPENDIR = @HAVE_OPENDIR@ @@ -749,11 +817,15 @@ HAVE_PIPE2 = @HAVE_PIPE2@ HAVE_POPEN = @HAVE_POPEN@ HAVE_POSIX_OPENPT = @HAVE_POSIX_OPENPT@ +HAVE_POSIX_SIGNALBLOCKING = @HAVE_POSIX_SIGNALBLOCKING@ HAVE_PREAD = @HAVE_PREAD@ +HAVE_PSELECT = @HAVE_PSELECT@ +HAVE_PTHREAD_SIGMASK = @HAVE_PTHREAD_SIGMASK@ HAVE_PTSNAME = @HAVE_PTSNAME@ HAVE_PTSNAME_R = @HAVE_PTSNAME_R@ HAVE_PWRITE = @HAVE_PWRITE@ HAVE_QSORT_R = @HAVE_QSORT_R@ +HAVE_RAISE = @HAVE_RAISE@ HAVE_RANDOM = @HAVE_RANDOM@ HAVE_RANDOM_H = @HAVE_RANDOM_H@ HAVE_RANDOM_R = @HAVE_RANDOM_R@ @@ -761,17 +833,23 @@ HAVE_READDIR = @HAVE_READDIR@ HAVE_READLINK = @HAVE_READLINK@ HAVE_READLINKAT = @HAVE_READLINKAT@ +HAVE_REALLOCARRAY = @HAVE_REALLOCARRAY@ HAVE_REALPATH = @HAVE_REALPATH@ HAVE_RENAMEAT = @HAVE_RENAMEAT@ HAVE_REWINDDIR = @HAVE_REWINDDIR@ HAVE_RPMATCH = @HAVE_RPMATCH@ +HAVE_SA_FAMILY_T = @HAVE_SA_FAMILY_T@ HAVE_SCANDIR = @HAVE_SCANDIR@ HAVE_SECURE_GETENV = @HAVE_SECURE_GETENV@ HAVE_SETENV = @HAVE_SETENV@ HAVE_SETHOSTNAME = @HAVE_SETHOSTNAME@ +HAVE_SIGACTION = @HAVE_SIGACTION@ +HAVE_SIGHANDLER_T = @HAVE_SIGHANDLER_T@ +HAVE_SIGINFO_T = @HAVE_SIGINFO_T@ HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@ HAVE_SIGNED_WCHAR_T = @HAVE_SIGNED_WCHAR_T@ HAVE_SIGNED_WINT_T = @HAVE_SIGNED_WINT_T@ +HAVE_SIGSET_T = @HAVE_SIGSET_T@ HAVE_SLEEP = @HAVE_SLEEP@ HAVE_STDINT_H = @HAVE_STDINT_H@ HAVE_STPCPY = @HAVE_STPCPY@ @@ -785,18 +863,27 @@ HAVE_STRTOLL = @HAVE_STRTOLL@ HAVE_STRTOULL = @HAVE_STRTOULL@ HAVE_STRUCT_RANDOM_DATA = @HAVE_STRUCT_RANDOM_DATA@ +HAVE_STRUCT_SIGACTION_SA_SIGACTION = @HAVE_STRUCT_SIGACTION_SA_SIGACTION@ +HAVE_STRUCT_SOCKADDR_STORAGE = @HAVE_STRUCT_SOCKADDR_STORAGE@ +HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY = @HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY@ +HAVE_STRUCT_TIMEVAL = @HAVE_STRUCT_TIMEVAL@ HAVE_STRVERSCMP = @HAVE_STRVERSCMP@ HAVE_SYMLINK = @HAVE_SYMLINK@ HAVE_SYMLINKAT = @HAVE_SYMLINKAT@ HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@ HAVE_SYS_CDEFS_H = @HAVE_SYS_CDEFS_H@ HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@ +HAVE_SYS_IOCTL_H = @HAVE_SYS_IOCTL_H@ HAVE_SYS_LOADAVG_H = @HAVE_SYS_LOADAVG_H@ HAVE_SYS_PARAM_H = @HAVE_SYS_PARAM_H@ +HAVE_SYS_SELECT_H = @HAVE_SYS_SELECT_H@ +HAVE_SYS_SOCKET_H = @HAVE_SYS_SOCKET_H@ +HAVE_SYS_TIME_H = @HAVE_SYS_TIME_H@ HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ +HAVE_SYS_UIO_H = @HAVE_SYS_UIO_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@ @@ -845,6 +932,7 @@ HAVE_WMEMCPY = @HAVE_WMEMCPY@ HAVE_WMEMMOVE = @HAVE_WMEMMOVE@ HAVE_WMEMSET = @HAVE_WMEMSET@ +HAVE_WS2TCPIP_H = @HAVE_WS2TCPIP_H@ HAVE_XLOCALE_H = @HAVE_XLOCALE_H@ HAVE__BOOL = @HAVE__BOOL@ HAVE__EXIT = @HAVE__EXIT@ @@ -852,6 +940,7 @@ ICONV_H = @ICONV_H@ INCLUDE_NEXT = @INCLUDE_NEXT@ INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@ +INET_PTON_LIB = @INET_PTON_LIB@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -862,6 +951,7 @@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ LDFLAGS = @LDFLAGS@ +LIBCSTACK = @LIBCSTACK@ LIBGREPUTILS_LIBDEPS = @LIBGREPUTILS_LIBDEPS@ LIBGREPUTILS_LTLIBDEPS = @LIBGREPUTILS_LTLIBDEPS@ LIBICONV = @LIBICONV@ @@ -871,11 +961,16 @@ LIBPTH = @LIBPTH@ LIBPTH_PREFIX = @LIBPTH_PREFIX@ LIBS = @LIBS@ +LIBSIGSEGV = @LIBSIGSEGV@ +LIBSIGSEGV_PREFIX = @LIBSIGSEGV_PREFIX@ +LIBSOCKET = @LIBSOCKET@ LIBTESTS_LIBDEPS = @LIBTESTS_LIBDEPS@ LIBTHREAD = @LIBTHREAD@ LIBUNISTRING_UNISTR_H = @LIBUNISTRING_UNISTR_H@ LIBUNISTRING_UNITYPES_H = @LIBUNISTRING_UNITYPES_H@ LIBUNISTRING_UNIWIDTH_H = @LIBUNISTRING_UNIWIDTH_H@ +LIB_NANOSLEEP = @LIB_NANOSLEEP@ +LIB_SELECT = @LIB_SELECT@ LIMITS_H = @LIMITS_H@ LOCALCHARSET_TESTS_ENVIRONMENT = @LOCALCHARSET_TESTS_ENVIRONMENT@ LOCALE_FR = @LOCALE_FR@ @@ -883,36 +978,49 @@ LOCALE_JA = @LOCALE_JA@ LOCALE_TR_UTF8 = @LOCALE_TR_UTF8@ LOCALE_ZH_CN = @LOCALE_ZH_CN@ +LTLIBCSTACK = @LTLIBCSTACK@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBMULTITHREAD = @LTLIBMULTITHREAD@ LTLIBOBJS = @LTLIBOBJS@ LTLIBPTH = @LTLIBPTH@ +LTLIBSIGSEGV = @LTLIBSIGSEGV@ LTLIBTHREAD = @LTLIBTHREAD@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ +NETINET_IN_H = @NETINET_IN_H@ +NEXT_ARPA_INET_H = @NEXT_ARPA_INET_H@ +NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H = @NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H@ NEXT_AS_FIRST_DIRECTIVE_CTYPE_H = @NEXT_AS_FIRST_DIRECTIVE_CTYPE_H@ NEXT_AS_FIRST_DIRECTIVE_DIRENT_H = @NEXT_AS_FIRST_DIRECTIVE_DIRENT_H@ NEXT_AS_FIRST_DIRECTIVE_ERRNO_H = @NEXT_AS_FIRST_DIRECTIVE_ERRNO_H@ NEXT_AS_FIRST_DIRECTIVE_FCNTL_H = @NEXT_AS_FIRST_DIRECTIVE_FCNTL_H@ NEXT_AS_FIRST_DIRECTIVE_FLOAT_H = @NEXT_AS_FIRST_DIRECTIVE_FLOAT_H@ +NEXT_AS_FIRST_DIRECTIVE_FNMATCH_H = @NEXT_AS_FIRST_DIRECTIVE_FNMATCH_H@ NEXT_AS_FIRST_DIRECTIVE_GETOPT_H = @NEXT_AS_FIRST_DIRECTIVE_GETOPT_H@ NEXT_AS_FIRST_DIRECTIVE_ICONV_H = @NEXT_AS_FIRST_DIRECTIVE_ICONV_H@ NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H = @NEXT_AS_FIRST_DIRECTIVE_INTTYPES_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_NETINET_IN_H = @NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H@ +NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H = @NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H@ NEXT_AS_FIRST_DIRECTIVE_STDARG_H = @NEXT_AS_FIRST_DIRECTIVE_STDARG_H@ NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@ NEXT_AS_FIRST_DIRECTIVE_STDINT_H = @NEXT_AS_FIRST_DIRECTIVE_STDINT_H@ NEXT_AS_FIRST_DIRECTIVE_STDIO_H = @NEXT_AS_FIRST_DIRECTIVE_STDIO_H@ NEXT_AS_FIRST_DIRECTIVE_STDLIB_H = @NEXT_AS_FIRST_DIRECTIVE_STDLIB_H@ NEXT_AS_FIRST_DIRECTIVE_STRING_H = @NEXT_AS_FIRST_DIRECTIVE_STRING_H@ +NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H@ +NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H@ +NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H@ +NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H@ +NEXT_AS_FIRST_DIRECTIVE_SYS_UIO_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_UIO_H@ NEXT_AS_FIRST_DIRECTIVE_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_TIME_H@ NEXT_AS_FIRST_DIRECTIVE_UNISTD_H = @NEXT_AS_FIRST_DIRECTIVE_UNISTD_H@ NEXT_AS_FIRST_DIRECTIVE_WCHAR_H = @NEXT_AS_FIRST_DIRECTIVE_WCHAR_H@ @@ -922,20 +1030,28 @@ NEXT_ERRNO_H = @NEXT_ERRNO_H@ NEXT_FCNTL_H = @NEXT_FCNTL_H@ NEXT_FLOAT_H = @NEXT_FLOAT_H@ +NEXT_FNMATCH_H = @NEXT_FNMATCH_H@ NEXT_GETOPT_H = @NEXT_GETOPT_H@ NEXT_ICONV_H = @NEXT_ICONV_H@ NEXT_INTTYPES_H = @NEXT_INTTYPES_H@ NEXT_LANGINFO_H = @NEXT_LANGINFO_H@ NEXT_LIMITS_H = @NEXT_LIMITS_H@ NEXT_LOCALE_H = @NEXT_LOCALE_H@ +NEXT_NETINET_IN_H = @NEXT_NETINET_IN_H@ +NEXT_SIGNAL_H = @NEXT_SIGNAL_H@ NEXT_STDARG_H = @NEXT_STDARG_H@ NEXT_STDDEF_H = @NEXT_STDDEF_H@ NEXT_STDINT_H = @NEXT_STDINT_H@ NEXT_STDIO_H = @NEXT_STDIO_H@ NEXT_STDLIB_H = @NEXT_STDLIB_H@ NEXT_STRING_H = @NEXT_STRING_H@ +NEXT_SYS_IOCTL_H = @NEXT_SYS_IOCTL_H@ +NEXT_SYS_SELECT_H = @NEXT_SYS_SELECT_H@ +NEXT_SYS_SOCKET_H = @NEXT_SYS_SOCKET_H@ NEXT_SYS_STAT_H = @NEXT_SYS_STAT_H@ +NEXT_SYS_TIME_H = @NEXT_SYS_TIME_H@ NEXT_SYS_TYPES_H = @NEXT_SYS_TYPES_H@ +NEXT_SYS_UIO_H = @NEXT_SYS_UIO_H@ NEXT_TIME_H = @NEXT_TIME_H@ NEXT_UNISTD_H = @NEXT_UNISTD_H@ NEXT_WCHAR_H = @NEXT_WCHAR_H@ @@ -975,15 +1091,18 @@ REPLACE_DUP = @REPLACE_DUP@ REPLACE_DUP2 = @REPLACE_DUP2@ REPLACE_DUPLOCALE = @REPLACE_DUPLOCALE@ +REPLACE_FACCESSAT = @REPLACE_FACCESSAT@ REPLACE_FCHOWNAT = @REPLACE_FCHOWNAT@ REPLACE_FCLOSE = @REPLACE_FCLOSE@ REPLACE_FCNTL = @REPLACE_FCNTL@ REPLACE_FDOPEN = @REPLACE_FDOPEN@ REPLACE_FDOPENDIR = @REPLACE_FDOPENDIR@ REPLACE_FFLUSH = @REPLACE_FFLUSH@ +REPLACE_FNMATCH = @REPLACE_FNMATCH@ REPLACE_FOPEN = @REPLACE_FOPEN@ REPLACE_FPRINTF = @REPLACE_FPRINTF@ REPLACE_FPURGE = @REPLACE_FPURGE@ +REPLACE_FREELOCALE = @REPLACE_FREELOCALE@ REPLACE_FREOPEN = @REPLACE_FREOPEN@ REPLACE_FSEEK = @REPLACE_FSEEK@ REPLACE_FSEEKO = @REPLACE_FSEEKO@ @@ -1001,10 +1120,15 @@ REPLACE_GETLINE = @REPLACE_GETLINE@ REPLACE_GETLOGIN_R = @REPLACE_GETLOGIN_R@ REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@ +REPLACE_GETPASS = @REPLACE_GETPASS@ +REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@ REPLACE_GMTIME = @REPLACE_GMTIME@ REPLACE_ICONV = @REPLACE_ICONV@ REPLACE_ICONV_OPEN = @REPLACE_ICONV_OPEN@ REPLACE_ICONV_UTF = @REPLACE_ICONV_UTF@ +REPLACE_INET_NTOP = @REPLACE_INET_NTOP@ +REPLACE_INET_PTON = @REPLACE_INET_PTON@ +REPLACE_IOCTL = @REPLACE_IOCTL@ REPLACE_ISATTY = @REPLACE_ISATTY@ REPLACE_ISWBLANK = @REPLACE_ISWBLANK@ REPLACE_ISWCNTRL = @REPLACE_ISWCNTRL@ @@ -1033,6 +1157,7 @@ REPLACE_MKSTEMP = @REPLACE_MKSTEMP@ REPLACE_MKTIME = @REPLACE_MKTIME@ REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@ +REPLACE_NEWLOCALE = @REPLACE_NEWLOCALE@ REPLACE_NL_LANGINFO = @REPLACE_NL_LANGINFO@ REPLACE_NULL = @REPLACE_NULL@ REPLACE_OBSTACK_PRINTF = @REPLACE_OBSTACK_PRINTF@ @@ -1043,11 +1168,14 @@ REPLACE_POPEN = @REPLACE_POPEN@ REPLACE_PREAD = @REPLACE_PREAD@ REPLACE_PRINTF = @REPLACE_PRINTF@ +REPLACE_PSELECT = @REPLACE_PSELECT@ +REPLACE_PTHREAD_SIGMASK = @REPLACE_PTHREAD_SIGMASK@ REPLACE_PTSNAME = @REPLACE_PTSNAME@ REPLACE_PTSNAME_R = @REPLACE_PTSNAME_R@ REPLACE_PUTENV = @REPLACE_PUTENV@ REPLACE_PWRITE = @REPLACE_PWRITE@ REPLACE_QSORT_R = @REPLACE_QSORT_R@ +REPLACE_RAISE = @REPLACE_RAISE@ REPLACE_RANDOM_R = @REPLACE_RANDOM_R@ REPLACE_READ = @REPLACE_READ@ REPLACE_READLINK = @REPLACE_READLINK@ @@ -1058,6 +1186,7 @@ REPLACE_RENAME = @REPLACE_RENAME@ REPLACE_RENAMEAT = @REPLACE_RENAMEAT@ REPLACE_RMDIR = @REPLACE_RMDIR@ +REPLACE_SELECT = @REPLACE_SELECT@ REPLACE_SETENV = @REPLACE_SETENV@ REPLACE_SETLOCALE = @REPLACE_SETLOCALE@ REPLACE_SLEEP = @REPLACE_SLEEP@ @@ -1083,6 +1212,7 @@ REPLACE_STRTOK_R = @REPLACE_STRTOK_R@ REPLACE_STRTOUMAX = @REPLACE_STRTOUMAX@ REPLACE_STRUCT_LCONV = @REPLACE_STRUCT_LCONV@ +REPLACE_STRUCT_TIMEVAL = @REPLACE_STRUCT_TIMEVAL@ REPLACE_SYMLINK = @REPLACE_SYMLINK@ REPLACE_SYMLINKAT = @REPLACE_SYMLINKAT@ REPLACE_TIMEGM = @REPLACE_TIMEGM@ @@ -1122,6 +1252,8 @@ STDDEF_H = @STDDEF_H@ STDINT_H = @STDINT_H@ STRIP = @STRIP@ +SYS_IOCTL_H_HAVE_WINSOCK2_H = @SYS_IOCTL_H_HAVE_WINSOCK2_H@ +SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@ SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@ TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@ UINT32_MAX_LT_UINTMAX_MAX = @UINT32_MAX_LT_UINTMAX_MAX@ @@ -1150,6 +1282,7 @@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ +am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ @@ -1240,10 +1373,26 @@ $(am__aclocal_m4_deps): .texi.info: - $(AM_V_MAKEINFO)$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) \ - -I $(srcdir) --no-split -o $@-t \ - $< - $(AM_V_at)mv -f $@-t $@ + $(AM_V_MAKEINFO)restore=: && backupdir="$(am__leading_dot)am$$$$" && \ + am__cwd=`pwd` && $(am__cd) $(srcdir) && \ + rm -rf $$backupdir && mkdir $$backupdir && \ + if ($(MAKEINFO) --version) >/dev/null 2>&1; then \ + for f in $@ $@-[0-9] $@-[0-9][0-9] $(@:.info=).i[0-9] $(@:.info=).i[0-9][0-9]; do \ + if test -f $$f; then mv $$f $$backupdir; restore=mv; else :; fi; \ + done; \ + else :; fi && \ + cd "$$am__cwd"; \ + if $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \ + -o $@ $<; \ + then \ + rc=0; \ + $(am__cd) $(srcdir); \ + else \ + rc=$$?; \ + $(am__cd) $(srcdir) && \ + $$restore $$backupdir/* `echo "./$@" | sed 's|[^/]*$$||'`; \ + fi; \ + rm -rf $$backupdir; exit $$rc .texi.dvi: $(AM_V_TEXI2DVI)TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \ @@ -1327,9 +1476,10 @@ @list='$(INFO_DEPS)'; \ for file in $$list; do \ relfile=`echo "$$file" | sed 's|^.*/||'`; \ + relfile_i=`echo "$$relfile" | sed 's|\.info$$||;s|$$|.i|'`; \ (if test -d "$(DESTDIR)$(infodir)" && cd "$(DESTDIR)$(infodir)"; then \ - echo " cd '$(DESTDIR)$(infodir)' && rm -f $$relfile"; \ - rm -f $$relfile; \ + echo " cd '$(DESTDIR)$(infodir)' && rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9]"; \ + rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9]; \ else :; fi); \ done @@ -1358,14 +1508,15 @@ case $$base in \ $(srcdir)/*) base=`echo "$$base" | sed "s|^$$srcdirstrip/||"`;; \ esac; \ - if test -f $$base; then \ - file=./$$base; \ - else \ - file=$(srcdir)/$$base; \ - fi; \ - if test -f $$file && test ! -f "$(distdir)/$$base"; then \ - cp -p $$file "$(distdir)/$$base"; \ - fi; \ + if test -f $$base; then d=.; else d=$(srcdir); fi; \ + base_i=`echo "$$base" | sed 's|\.info$$||;s|$$|.i|'`; \ + for file in $$d/$$base $$d/$$base-[0-9] $$d/$$base-[0-9][0-9] $$d/$$base_i[0-9] $$d/$$base_i[0-9][0-9]; do \ + if test -f $$file; then \ + relfile=`expr "$$file" : "$$d/\(.*\)"`; \ + test -f "$(distdir)/$$relfile" || \ + cp -p $$file "$(distdir)/$$relfile"; \ + else :; fi; \ + done; \ done mostlyclean-aminfo: @@ -1376,7 +1527,11 @@ || rm -rf grep.dvi grep.pdf grep.ps grep.html maintainer-clean-aminfo: - -test -z "$(INFO_DEPS)" || rm -f $(INFO_DEPS) + @list='$(INFO_DEPS)'; for i in $$list; do \ + i_i=`echo "$$i" | sed 's|\.info$$||;s|$$|.i|'`; \ + echo " rm -f $$i $$i-[0-9] $$i-[0-9][0-9] $$i_i[0-9] $$i_i[0-9][0-9]"; \ + rm -f $$i $$i-[0-9] $$i-[0-9][0-9] $$i_i[0-9] $$i_i[0-9][0-9]; \ + done install-man1: $(man_MANS) @$(NORMAL_INSTALL) @list1=''; \ @@ -1427,7 +1582,10 @@ cscope cscopelist: -distdir: $(DISTFILES) +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ @@ -1580,11 +1738,14 @@ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ esac; \ - if test -f $$file; then \ - echo ./$$file; \ - else \ - echo $(srcdir)/$$file; \ - fi; \ + if test -f $$file; then d=.; else d=$(srcdir); fi; \ + file_i=`echo "$$file" | sed 's|\.info$$||;s|$$|.i|'`; \ + for ifile in $$d/$$file $$d/$$file-[0-9] $$d/$$file-[0-9][0-9] \ + $$d/$$file_i[0-9] $$d/$$file_i[0-9][0-9] ; do \ + if test -f $$ifile; then \ + echo "$$ifile"; \ + else : ; fi; \ + done; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(infodir)'"; \ diff -Nru grep-3.1/doc/stamp-vti grep-3.3/doc/stamp-vti --- grep-3.1/doc/stamp-vti 2017-07-02 20:21:16.000000000 +0000 +++ grep-3.3/doc/stamp-vti 2018-12-21 04:39:03.000000000 +0000 @@ -1,4 +1,4 @@ -@set UPDATED 25 June 2017 -@set UPDATED-MONTH June 2017 -@set EDITION 3.1 -@set VERSION 3.1 +@set UPDATED 4 July 2018 +@set UPDATED-MONTH July 2018 +@set EDITION 3.3 +@set VERSION 3.3 diff -Nru grep-3.1/doc/version.texi grep-3.3/doc/version.texi --- grep-3.1/doc/version.texi 2017-07-02 20:21:16.000000000 +0000 +++ grep-3.3/doc/version.texi 2018-12-21 04:39:03.000000000 +0000 @@ -1,4 +1,4 @@ -@set UPDATED 25 June 2017 -@set UPDATED-MONTH June 2017 -@set EDITION 3.1 -@set VERSION 3.1 +@set UPDATED 4 July 2018 +@set UPDATED-MONTH July 2018 +@set EDITION 3.3 +@set VERSION 3.3 diff -Nru grep-3.1/gnulib-tests/accept.c grep-3.3/gnulib-tests/accept.c --- grep-3.1/gnulib-tests/accept.c 1970-01-01 00:00:00.000000000 +0000 +++ grep-3.3/gnulib-tests/accept.c 2018-01-07 00:07:08.000000000 +0000 @@ -0,0 +1,52 @@ +/* accept.c --- wrappers for Windows accept function + + Copyright (C) 2008-2018 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 Paolo Bonzini */ + +#include + +#define WIN32_LEAN_AND_MEAN +/* Get winsock2.h. */ +#include + +/* Get set_winsock_errno, FD_TO_SOCKET etc. */ +#include "w32sock.h" + +#undef accept + +int +rpl_accept (int fd, struct sockaddr *addr, socklen_t *addrlen) +{ + SOCKET sock = FD_TO_SOCKET (fd); + + if (sock == INVALID_SOCKET) + { + errno = EBADF; + return -1; + } + else + { + SOCKET fh = accept (sock, addr, addrlen); + if (fh == INVALID_SOCKET) + { + set_winsock_errno (); + return -1; + } + else + return SOCKET_TO_FD (fh); + } +} diff -Nru grep-3.1/gnulib-tests/anytostr.c grep-3.3/gnulib-tests/anytostr.c --- grep-3.1/gnulib-tests/anytostr.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/gnulib-tests/anytostr.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,6 +1,6 @@ /* anytostr.c -- convert integers to printable strings - Copyright (C) 2001, 2006, 2008-2017 Free Software Foundation, Inc. + Copyright (C) 2001, 2006, 2008-2018 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 @@ -13,7 +13,7 @@ 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 . */ + along with this program. If not, see . */ /* Written by Paul Eggert */ diff -Nru grep-3.1/gnulib-tests/arg-nonnull.h grep-3.3/gnulib-tests/arg-nonnull.h --- grep-3.1/gnulib-tests/arg-nonnull.h 2017-03-17 04:34:41.000000000 +0000 +++ grep-3.3/gnulib-tests/arg-nonnull.h 2018-01-07 00:08:00.000000000 +0000 @@ -1,5 +1,5 @@ /* A C macro for declaring that specific arguments must not be NULL. - Copyright (C) 2009-2017 Free Software Foundation, Inc. + Copyright (C) 2009-2018 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 @@ -12,7 +12,7 @@ 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 . */ + 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. diff -Nru grep-3.1/gnulib-tests/arpa_inet.in.h grep-3.3/gnulib-tests/arpa_inet.in.h --- grep-3.1/gnulib-tests/arpa_inet.in.h 1970-01-01 00:00:00.000000000 +0000 +++ grep-3.3/gnulib-tests/arpa_inet.in.h 2018-01-07 00:07:59.000000000 +0000 @@ -0,0 +1,140 @@ +/* A GNU-like . + + Copyright (C) 2005-2006, 2008-2018 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@_ARPA_INET_H + +#if __GNUC__ >= 3 +@PRAGMA_SYSTEM_HEADER@ +#endif +@PRAGMA_COLUMNS@ + +#if @HAVE_FEATURES_H@ +# include /* for __GLIBC__ */ +#endif + +/* Gnulib's sys/socket.h is responsible for defining socklen_t (used below) and + for pulling in winsock2.h etc. under MinGW. + But avoid namespace pollution on glibc systems. */ +#ifndef __GLIBC__ +# include +#endif + +/* On NonStop Kernel, inet_ntop and inet_pton are declared in . + But avoid namespace pollution on glibc systems. */ +#if defined __TANDEM && !defined __GLIBC__ +# include +#endif + +#if @HAVE_ARPA_INET_H@ + +/* The include_next requires a split double-inclusion guard. */ +# @INCLUDE_NEXT@ @NEXT_ARPA_INET_H@ + +#endif + +#ifndef _@GUARD_PREFIX@_ARPA_INET_H +#define _@GUARD_PREFIX@_ARPA_INET_H + +/* 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. */ + + +#if @GNULIB_INET_NTOP@ +/* Converts an internet address from internal format to a printable, + presentable format. + AF is an internet address family, such as AF_INET or AF_INET6. + SRC points to a 'struct in_addr' (for AF_INET) or 'struct in6_addr' + (for AF_INET6). + DST points to a buffer having room for CNT bytes. + The printable representation of the address (in numeric form, not + surrounded by [...], no reverse DNS is done) is placed in DST, and + DST is returned. If an error occurs, the return value is NULL and + errno is set. If CNT bytes are not sufficient to hold the result, + the return value is NULL and errno is set to ENOSPC. A good value + for CNT is 46. + + For more details, see the POSIX:2001 specification + . */ +# if @REPLACE_INET_NTOP@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef inet_ntop +# define inet_ntop rpl_inet_ntop +# endif +_GL_FUNCDECL_RPL (inet_ntop, const char *, + (int af, const void *restrict src, + char *restrict dst, socklen_t cnt) + _GL_ARG_NONNULL ((2, 3))); +_GL_CXXALIAS_RPL (inet_ntop, const char *, + (int af, const void *restrict src, + char *restrict dst, socklen_t cnt)); +# else +# if !@HAVE_DECL_INET_NTOP@ +_GL_FUNCDECL_SYS (inet_ntop, const char *, + (int af, const void *restrict src, + char *restrict dst, socklen_t cnt) + _GL_ARG_NONNULL ((2, 3))); +# endif +/* Need to cast, because on NonStop Kernel, the fourth parameter is + size_t cnt. */ +_GL_CXXALIAS_SYS_CAST (inet_ntop, const char *, + (int af, const void *restrict src, + char *restrict dst, socklen_t cnt)); +# endif +_GL_CXXALIASWARN (inet_ntop); +#elif defined GNULIB_POSIXCHECK +# undef inet_ntop +# if HAVE_RAW_DECL_INET_NTOP +_GL_WARN_ON_USE (inet_ntop, "inet_ntop is unportable - " + "use gnulib module inet_ntop for portability"); +# endif +#endif + +#if @GNULIB_INET_PTON@ +# if @REPLACE_INET_PTON@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef inet_pton +# define inet_pton rpl_inet_pton +# endif +_GL_FUNCDECL_RPL (inet_pton, int, + (int af, const char *restrict src, void *restrict dst) + _GL_ARG_NONNULL ((2, 3))); +_GL_CXXALIAS_RPL (inet_pton, int, + (int af, const char *restrict src, void *restrict dst)); +# else +# if !@HAVE_DECL_INET_PTON@ +_GL_FUNCDECL_SYS (inet_pton, int, + (int af, const char *restrict src, void *restrict dst) + _GL_ARG_NONNULL ((2, 3))); +# endif +_GL_CXXALIAS_SYS (inet_pton, int, + (int af, const char *restrict src, void *restrict dst)); +# endif +_GL_CXXALIASWARN (inet_pton); +#elif defined GNULIB_POSIXCHECK +# undef inet_pton +# if HAVE_RAW_DECL_INET_PTON +_GL_WARN_ON_USE (inet_pton, "inet_pton is unportable - " + "use gnulib module inet_pton for portability"); +# endif +#endif + + +#endif /* _@GUARD_PREFIX@_ARPA_INET_H */ +#endif /* _@GUARD_PREFIX@_ARPA_INET_H */ diff -Nru grep-3.1/gnulib-tests/asnprintf.c grep-3.3/gnulib-tests/asnprintf.c --- grep-3.1/gnulib-tests/asnprintf.c 2017-01-01 11:25:46.000000000 +0000 +++ grep-3.3/gnulib-tests/asnprintf.c 2018-01-07 00:08:00.000000000 +0000 @@ -1,5 +1,5 @@ /* Formatted output to strings. - Copyright (C) 1999, 2002, 2006, 2009-2017 Free Software Foundation, Inc. + Copyright (C) 1999, 2002, 2006, 2009-2018 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 @@ -12,7 +12,7 @@ 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 . */ + with this program; if not, see . */ #include diff -Nru grep-3.1/gnulib-tests/bind.c grep-3.3/gnulib-tests/bind.c --- grep-3.1/gnulib-tests/bind.c 1970-01-01 00:00:00.000000000 +0000 +++ grep-3.3/gnulib-tests/bind.c 2018-01-07 00:07:08.000000000 +0000 @@ -0,0 +1,49 @@ +/* bind.c --- wrappers for Windows bind function + + Copyright (C) 2008-2018 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 Paolo Bonzini */ + +#include + +#define WIN32_LEAN_AND_MEAN +/* Get winsock2.h. */ +#include + +/* Get set_winsock_errno, FD_TO_SOCKET etc. */ +#include "w32sock.h" + +#undef bind + +int +rpl_bind (int fd, const struct sockaddr *sockaddr, socklen_t len) +{ + SOCKET sock = FD_TO_SOCKET (fd); + + if (sock == INVALID_SOCKET) + { + errno = EBADF; + return -1; + } + else + { + int r = bind (sock, sockaddr, len); + if (r < 0) + set_winsock_errno (); + + return r; + } +} diff -Nru grep-3.1/gnulib-tests/c++defs.h grep-3.3/gnulib-tests/c++defs.h --- grep-3.1/gnulib-tests/c++defs.h 2017-03-17 04:34:41.000000000 +0000 +++ grep-3.3/gnulib-tests/c++defs.h 2018-01-07 00:08:00.000000000 +0000 @@ -1,5 +1,5 @@ /* C++ compatible function declaration macros. - Copyright (C) 2010-2017 Free Software Foundation, Inc. + Copyright (C) 2010-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ #ifndef _GL_CXXDEFS_H #define _GL_CXXDEFS_H @@ -266,7 +266,7 @@ _GL_CXXALIASWARN_1 (func, GNULIB_NAMESPACE) # define _GL_CXXALIASWARN_1(func,namespace) \ _GL_CXXALIASWARN_2 (func, namespace) -/* To work around GCC bug , +/* To work around GCC bug , we enable the warning only when not optimizing. */ # if !__OPTIMIZE__ # define _GL_CXXALIASWARN_2(func,namespace) \ @@ -294,7 +294,7 @@ 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 , +/* 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) \ diff -Nru grep-3.1/gnulib-tests/connect.c grep-3.3/gnulib-tests/connect.c --- grep-3.1/gnulib-tests/connect.c 1970-01-01 00:00:00.000000000 +0000 +++ grep-3.3/gnulib-tests/connect.c 2018-01-07 00:07:08.000000000 +0000 @@ -0,0 +1,56 @@ +/* connect.c --- wrappers for Windows connect function + + Copyright (C) 2008-2018 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 Paolo Bonzini */ + +#include + +#define WIN32_LEAN_AND_MEAN +/* Get winsock2.h. */ +#include + +/* Get set_winsock_errno, FD_TO_SOCKET etc. */ +#include "w32sock.h" + +#undef connect + +int +rpl_connect (int fd, const struct sockaddr *sockaddr, socklen_t len) +{ + SOCKET sock = FD_TO_SOCKET (fd); + + if (sock == INVALID_SOCKET) + { + errno = EBADF; + return -1; + } + else + { + int r = connect (sock, sockaddr, len); + if (r < 0) + { + /* EINPROGRESS is not returned by WinSock 2.0; for backwards + compatibility, connect(2) uses EWOULDBLOCK. */ + if (WSAGetLastError () == WSAEWOULDBLOCK) + WSASetLastError (WSAEINPROGRESS); + + set_winsock_errno (); + } + + return r; + } +} diff -Nru grep-3.1/gnulib-tests/dfa-invalid-char-class.sh grep-3.3/gnulib-tests/dfa-invalid-char-class.sh --- grep-3.1/gnulib-tests/dfa-invalid-char-class.sh 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/gnulib-tests/dfa-invalid-char-class.sh 2018-01-07 00:07:08.000000000 +0000 @@ -1,7 +1,7 @@ #!/bin/sh # This use of our DFA-testing helper would fail for grep-2.21. -# Copyright 2014-2017 Free Software Foundation, Inc. +# Copyright 2014-2018 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 @@ # 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 . +# along with this program. If not, see . . "${srcdir=.}/init.sh"; path_prepend_ ../src diff -Nru grep-3.1/gnulib-tests/dfa-match-aux.c grep-3.3/gnulib-tests/dfa-match-aux.c --- grep-3.1/gnulib-tests/dfa-match-aux.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/gnulib-tests/dfa-match-aux.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,6 +1,6 @@ /* Auxiliary program to test a DFA code path that cannot be triggered by grep or gawk. - Copyright 2014-2017 Free Software Foundation, Inc. + Copyright 2014-2018 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 -Nru grep-3.1/gnulib-tests/dfa-match.sh grep-3.3/gnulib-tests/dfa-match.sh --- grep-3.1/gnulib-tests/dfa-match.sh 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/gnulib-tests/dfa-match.sh 2018-12-21 02:51:47.000000000 +0000 @@ -1,7 +1,7 @@ #!/bin/sh # This would fail with grep-2.21's dfa.c. -# Copyright 2014-2017 Free Software Foundation, Inc. +# Copyright 2014-2018 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 @@ # 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 . +# along with this program. If not, see . . "${srcdir=.}/init.sh"; path_prepend_ ../src @@ -22,7 +22,11 @@ path_prepend_ . if (type timeout) >/dev/null 2>&1; then - timeout_10='timeout 10' + if timeout --help 2>&1 | grep BusyBox; then + timeout_10='timeout -t 10' + else + timeout_10='timeout 10' + fi else timeout_10= fi diff -Nru grep-3.1/gnulib-tests/dup-safer-flag.c grep-3.3/gnulib-tests/dup-safer-flag.c --- grep-3.1/gnulib-tests/dup-safer-flag.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/gnulib-tests/dup-safer-flag.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,38 +0,0 @@ -/* Duplicate a file descriptor result, avoiding clobbering - STD{IN,OUT,ERR}_FILENO, with specific flags. - - 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 - 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 and Eric Blake. */ - -#include - -/* Specification. */ -#include "unistd-safer.h" - -#include -#include - -/* Like dup, but do not return STDIN_FILENO, STDOUT_FILENO, or - STDERR_FILENO. If FLAG contains O_CLOEXEC, behave like - fcntl(F_DUPFD_CLOEXEC) rather than fcntl(F_DUPFD). */ - -int -dup_safer_flag (int fd, int flag) -{ - return fcntl (fd, (flag & O_CLOEXEC) ? F_DUPFD_CLOEXEC : F_DUPFD, - STDERR_FILENO + 1); -} diff -Nru grep-3.1/gnulib-tests/fdopen.c grep-3.3/gnulib-tests/fdopen.c --- grep-3.1/gnulib-tests/fdopen.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/gnulib-tests/fdopen.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ /* Open a stream with a given file descriptor. - Copyright (C) 2011-2017 Free Software Foundation, Inc. + Copyright (C) 2011-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ #include diff -Nru grep-3.1/gnulib-tests/fd-safer-flag.c grep-3.3/gnulib-tests/fd-safer-flag.c --- grep-3.1/gnulib-tests/fd-safer-flag.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/gnulib-tests/fd-safer-flag.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,52 +0,0 @@ -/* Adjust a file descriptor result so that it avoids clobbering - STD{IN,OUT,ERR}_FILENO, with specific flags. - - 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 - 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 and Eric Blake. */ - -#include - -/* Specification. */ -#include "unistd-safer.h" - -#include -#include - -/* Return FD, unless FD would be a copy of standard input, output, or - error; in that case, return a duplicate of FD, closing FD. If FLAG - contains O_CLOEXEC, the returned FD will have close-on-exec - semantics. On failure to duplicate, close FD, set errno, and - return -1. Preserve errno if FD is negative, so that the caller - can always inspect errno when the returned value is negative. - - This function is usefully wrapped around functions that return file - descriptors, e.g., fd_safer_flag (open ("file", O_RDONLY | flag), flag). */ - -int -fd_safer_flag (int fd, int flag) -{ - if (STDIN_FILENO <= fd && fd <= STDERR_FILENO) - { - int f = dup_safer_flag (fd, flag); - int e = errno; - close (fd); - errno = e; - fd = f; - } - - return fd; -} diff -Nru grep-3.1/gnulib-tests/float.c grep-3.3/gnulib-tests/float.c --- grep-3.1/gnulib-tests/float.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/gnulib-tests/float.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ /* Auxiliary definitions for . - Copyright (C) 2011-2017 Free Software Foundation, Inc. + Copyright (C) 2011-2018 Free Software Foundation, Inc. Written by Bruno Haible , 2011. This program is free software: you can redistribute it and/or modify @@ -13,7 +13,7 @@ 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 . */ + along with this program. If not, see . */ #include diff -Nru grep-3.1/gnulib-tests/float+.h grep-3.3/gnulib-tests/float+.h --- grep-3.1/gnulib-tests/float+.h 2017-01-01 11:25:46.000000000 +0000 +++ grep-3.3/gnulib-tests/float+.h 2018-01-07 00:08:00.000000000 +0000 @@ -1,5 +1,5 @@ /* Supplemental information about the floating-point formats. - Copyright (C) 2007, 2009-2017 Free Software Foundation, Inc. + Copyright (C) 2007, 2009-2018 Free Software Foundation, Inc. Written by Bruno Haible , 2007. This program is free software; you can redistribute it and/or modify @@ -13,7 +13,7 @@ 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 . */ + along with this program; if not, see . */ #ifndef _FLOATPLUS_H #define _FLOATPLUS_H diff -Nru grep-3.1/gnulib-tests/float.in.h grep-3.3/gnulib-tests/float.in.h --- grep-3.1/gnulib-tests/float.in.h 2017-06-21 16:10:44.000000000 +0000 +++ grep-3.3/gnulib-tests/float.in.h 2018-01-07 00:07:08.000000000 +0000 @@ -1,6 +1,6 @@ /* A correct . - Copyright (C) 2007-2017 Free Software Foundation, Inc. + Copyright (C) 2007-2018 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 @@ -13,7 +13,7 @@ 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 . */ + along with this program. If not, see . */ #ifndef _@GUARD_PREFIX@_FLOAT_H @@ -62,7 +62,7 @@ /* On FreeBSD/x86 6.4, the 'long double' type really has only 53 bits of precision in the compiler but 64 bits of precision at runtime. See - . */ + . */ #if defined __i386__ && (defined __FreeBSD__ || defined __DragonFly__) /* Number of mantissa units, in base FLT_RADIX. */ # undef LDBL_MANT_DIG @@ -81,7 +81,7 @@ # define LDBL_MAX_EXP 16384 /* Minimum positive normalized number. */ # undef LDBL_MIN -# define LDBL_MIN 3.3621031431120935E-4932L /* = 0x1p-16382L */ +# define LDBL_MIN 3.362103143112093506262677817321752E-4932L /* = 0x1p-16382L */ /* Maximum representable finite number. */ # undef LDBL_MAX /* LDBL_MAX is represented as { 0xFFFFFFFF, 0xFFFFFFFF, 32766 }. diff -Nru grep-3.1/gnulib-tests/fpucw.h grep-3.3/gnulib-tests/fpucw.h --- grep-3.1/gnulib-tests/fpucw.h 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/gnulib-tests/fpucw.h 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ /* Manipulating the FPU control word. -*- coding: utf-8 -*- - Copyright (C) 2007-2017 Free Software Foundation, Inc. + Copyright (C) 2007-2018 Free Software Foundation, Inc. Written by Bruno Haible , 2007. This program is free software: you can redistribute it and/or modify @@ -13,7 +13,7 @@ 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 . */ + along with this program. If not, see . */ #ifndef _FPUCW_H #define _FPUCW_H @@ -35,13 +35,13 @@ The FPU control word is under control of the application, i.e. it is not required to be set either way by the ABI. (In fact, the i386 ABI - http://refspecs.freestandards.org/elf/abi386-4.pdf page 3-12 = page 38 + https://www.linux-mips.org/pub/linux/mips/doc/ABI/abi386-4.pdf page 3-12 = page 38 is not clear about it. But in any case, gcc treats the control word like a "preserved" register: it emits code that assumes that the control word is preserved across calls, and it restores the control word at the end of functions that modify it.) - See Vincent Lefèvre's page http://www.vinc17.org/research/extended.en.html + See Vincent Lefèvre's page https://www.vinc17.net/research/extended.en.html for a good explanation. See http://www.uwsg.iu.edu/hypermail/linux/kernel/0103.0/0453.html for some argumentation which setting should be the default. */ diff -Nru grep-3.1/gnulib-tests/ftruncate.c grep-3.3/gnulib-tests/ftruncate.c --- grep-3.1/gnulib-tests/ftruncate.c 1970-01-01 00:00:00.000000000 +0000 +++ grep-3.3/gnulib-tests/ftruncate.c 2018-01-07 00:07:08.000000000 +0000 @@ -0,0 +1,193 @@ +/* ftruncate emulations for native Windows. + Copyright (C) 1992-2018 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 . */ + +#include + +/* Specification. */ +#include + +#if HAVE_CHSIZE +/* A native Windows platform. */ + +# include + +# if _GL_WINDOWS_64_BIT_OFF_T + +/* Large File Support: off_t is 64-bit, but chsize() takes only a 32-bit + argument. So, define a 64-bit safe SetFileSize function ourselves. */ + +/* Ensure that declares GetFileSizeEx. */ +# undef _WIN32_WINNT +# define _WIN32_WINNT _WIN32_WINNT_WIN2K + +/* Get declarations of the native Windows API functions. */ +# define WIN32_LEAN_AND_MEAN +# include + +/* Get _get_osfhandle. */ +# if GNULIB_MSVC_NOTHROW +# include "msvc-nothrow.h" +# else +# include +# endif + +static BOOL +SetFileSize (HANDLE h, LONGLONG size) +{ + LARGE_INTEGER old_size; + + if (!GetFileSizeEx (h, &old_size)) + return FALSE; + + if (size != old_size.QuadPart) + { + /* Duplicate the handle, so we are free to modify its file position. */ + HANDLE curr_process = GetCurrentProcess (); + HANDLE tmph; + + if (!DuplicateHandle (curr_process, /* SourceProcessHandle */ + h, /* SourceHandle */ + curr_process, /* TargetProcessHandle */ + (PHANDLE) &tmph, /* TargetHandle */ + (DWORD) 0, /* DesiredAccess */ + FALSE, /* InheritHandle */ + DUPLICATE_SAME_ACCESS)) /* Options */ + return FALSE; + + if (size < old_size.QuadPart) + { + /* Reduce the size. */ + LONG size_hi = (LONG) (size >> 32); + if (SetFilePointer (tmph, (LONG) size, &size_hi, FILE_BEGIN) + == INVALID_SET_FILE_POINTER + && GetLastError() != NO_ERROR) + { + CloseHandle (tmph); + return FALSE; + } + if (!SetEndOfFile (tmph)) + { + CloseHandle (tmph); + return FALSE; + } + } + else + { + /* Increase the size by adding zero bytes at the end. */ + static char zero_bytes[1024]; + LONG pos_hi = 0; + LONG pos_lo = SetFilePointer (tmph, (LONG) 0, &pos_hi, FILE_END); + LONGLONG pos; + if (pos_lo == INVALID_SET_FILE_POINTER + && GetLastError() != NO_ERROR) + { + CloseHandle (tmph); + return FALSE; + } + pos = ((LONGLONG) pos_hi << 32) | (ULONGLONG) (ULONG) pos_lo; + while (pos < size) + { + DWORD written; + LONGLONG count = size - pos; + if (count > sizeof (zero_bytes)) + count = sizeof (zero_bytes); + if (!WriteFile (tmph, zero_bytes, (DWORD) count, &written, NULL) + || written == 0) + { + CloseHandle (tmph); + return FALSE; + } + pos += (ULONGLONG) (ULONG) written; + } + } + /* Close the handle. */ + CloseHandle (tmph); + } + return TRUE; +} + +int +ftruncate (int fd, off_t length) +{ + HANDLE handle = (HANDLE) _get_osfhandle (fd); + + if (handle == INVALID_HANDLE_VALUE) + { + errno = EBADF; + return -1; + } + if (length < 0) + { + errno = EINVAL; + return -1; + } + if (!SetFileSize (handle, length)) + { + switch (GetLastError ()) + { + case ERROR_ACCESS_DENIED: + errno = EACCES; + break; + case ERROR_HANDLE_DISK_FULL: + case ERROR_DISK_FULL: + case ERROR_DISK_TOO_FRAGMENTED: + errno = ENOSPC; + break; + default: + errno = EIO; + break; + } + return -1; + } + return 0; +} + +# else + +# include + +# if HAVE_MSVC_INVALID_PARAMETER_HANDLER +# include "msvc-inval.h" +static int +chsize_nothrow (int fd, long length) +{ + int result; + + TRY_MSVC_INVAL + { + result = chsize (fd, length); + } + CATCH_MSVC_INVAL + { + result = -1; + errno = EBADF; + } + DONE_MSVC_INVAL; + + return result; +} +# else +# define chsize_nothrow chsize +# endif + +int +ftruncate (int fd, off_t length) +{ + return chsize_nothrow (fd, length); +} + +# endif +#endif diff -Nru grep-3.1/gnulib-tests/gettimeofday.c grep-3.3/gnulib-tests/gettimeofday.c --- grep-3.1/gnulib-tests/gettimeofday.c 1970-01-01 00:00:00.000000000 +0000 +++ grep-3.3/gnulib-tests/gettimeofday.c 2018-09-19 05:05:04.000000000 +0000 @@ -0,0 +1,150 @@ +/* Provide gettimeofday for systems that don't have it or for which it's broken. + + Copyright (C) 2001-2003, 2005-2007, 2009-2018 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 + +#include + +#if defined _WIN32 && ! defined __CYGWIN__ +# define WINDOWS_NATIVE +# include +#endif + +#include "localtime-buffer.h" + +#ifdef WINDOWS_NATIVE + +/* Avoid warnings from gcc -Wcast-function-type. */ +# define GetProcAddress \ + (void *) GetProcAddress + +/* GetSystemTimePreciseAsFileTime was introduced only in Windows 8. */ +typedef void (WINAPI * GetSystemTimePreciseAsFileTimeFuncType) (FILETIME *lpTime); +static GetSystemTimePreciseAsFileTimeFuncType GetSystemTimePreciseAsFileTimeFunc = NULL; +static BOOL initialized = FALSE; + +static void +initialize (void) +{ + HMODULE kernel32 = LoadLibrary ("kernel32.dll"); + if (kernel32 != NULL) + { + GetSystemTimePreciseAsFileTimeFunc = + (GetSystemTimePreciseAsFileTimeFuncType) GetProcAddress (kernel32, "GetSystemTimePreciseAsFileTime"); + } + initialized = TRUE; +} + +#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. + 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 +#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 + +# if defined timeval /* 'struct timeval' overridden by gnulib? */ +# undef timeval + struct timeval otv; + int result = gettimeofday (&otv, (struct timezone *) tz); + if (result == 0) + { + tv->tv_sec = otv.tv_sec; + tv->tv_usec = otv.tv_usec; + } +# else + int result = gettimeofday (tv, (struct timezone *) tz); +# endif + +# if GETTIMEOFDAY_CLOBBERS_LOCALTIME + *localtime_buffer_addr = save; +# endif + + return result; + +# else + +# if !defined OK_TO_USE_1S_CLOCK +# error "Only 1-second nominal clock resolution found. Is that intended?" \ + "If so, compile with the -DOK_TO_USE_1S_CLOCK option." +# endif + tv->tv_sec = time (NULL); + tv->tv_usec = 0; + + return 0; + +# endif +#endif +} diff -Nru grep-3.1/gnulib-tests/gnulib.mk grep-3.3/gnulib-tests/gnulib.mk --- grep-3.1/gnulib-tests/gnulib.mk 2017-05-14 01:10:31.000000000 +0000 +++ grep-3.3/gnulib-tests/gnulib.mk 2018-12-21 02:53:00.000000000 +0000 @@ -1,6 +1,6 @@ ## DO NOT EDIT! GENERATED AUTOMATICALLY! ## Process this file with automake to produce Makefile.in. -# Copyright (C) 2002-2017 Free Software Foundation, Inc. +# Copyright (C) 2002-2018 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 @@ -13,7 +13,7 @@ # 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 . +# 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 @@ -22,7 +22,7 @@ # # Generated by gnulib-tool. -AUTOMAKE_OPTIONS = 1.9.6 foreign subdir-objects +AUTOMAKE_OPTIONS = 1.11 foreign subdir-objects SUBDIRS = . TESTS = @@ -59,6 +59,24 @@ TESTS_ENVIRONMENT += EXEEXT='@EXEEXT@' srcdir='$(srcdir)' +## begin gnulib module accept + + +EXTRA_DIST += accept.c w32sock.h + +EXTRA_libtests_a_SOURCES += accept.c + +## end gnulib module accept + +## begin gnulib module accept-tests + +TESTS += test-accept +check_PROGRAMS += test-accept +test_accept_LDADD = $(LDADD) @LIBSOCKET@ +EXTRA_DIST += test-accept.c signature.h macros.h + +## end gnulib module accept-tests + ## begin gnulib module alignof-tests TESTS += test-alignof @@ -87,6 +105,50 @@ ## end gnulib module argmatch-tests +## begin gnulib module arpa_inet + +BUILT_SOURCES += arpa/inet.h + +# We need the following in order to create when the system +# doesn't have one. +arpa/inet.h: arpa_inet.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE_H) $(ARG_NONNULL_H) + $(AM_V_at)$(MKDIR_P) arpa + $(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|@''HAVE_FEATURES_H''@|$(HAVE_FEATURES_H)|g' \ + -e 's|@''NEXT_ARPA_INET_H''@|$(NEXT_ARPA_INET_H)|g' \ + -e 's|@''HAVE_ARPA_INET_H''@|$(HAVE_ARPA_INET_H)|g' \ + -e 's/@''GNULIB_INET_NTOP''@/$(GNULIB_INET_NTOP)/g' \ + -e 's/@''GNULIB_INET_PTON''@/$(GNULIB_INET_PTON)/g' \ + -e 's|@''HAVE_DECL_INET_NTOP''@|$(HAVE_DECL_INET_NTOP)|g' \ + -e 's|@''HAVE_DECL_INET_PTON''@|$(HAVE_DECL_INET_PTON)|g' \ + -e 's|@''REPLACE_INET_NTOP''@|$(REPLACE_INET_NTOP)|g' \ + -e 's|@''REPLACE_INET_PTON''@|$(REPLACE_INET_PTON)|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)' \ + < $(srcdir)/arpa_inet.in.h; \ + } > $@-t && \ + mv $@-t $@ +MOSTLYCLEANFILES += arpa/inet.h arpa/inet.h-t +MOSTLYCLEANDIRS += arpa + +EXTRA_DIST += arpa_inet.in.h + +## end gnulib module arpa_inet + +## begin gnulib module arpa_inet-tests + +TESTS += test-arpa_inet +check_PROGRAMS += test-arpa_inet +EXTRA_DIST += test-arpa_inet.c + +## end gnulib module arpa_inet-tests + ## begin gnulib module binary-io-tests TESTS += test-binary-io.sh @@ -96,6 +158,24 @@ ## end gnulib module binary-io-tests +## begin gnulib module bind + + +EXTRA_DIST += bind.c w32sock.h + +EXTRA_libtests_a_SOURCES += bind.c + +## end gnulib module bind + +## begin gnulib module bind-tests + +TESTS += test-bind +check_PROGRAMS += test-bind +test_bind_LDADD = $(LDADD) @LIBSOCKET@ $(INET_PTON_LIB) +EXTRA_DIST += test-bind.c signature.h macros.h + +## end gnulib module bind-tests + ## begin gnulib module bitrotate-tests TESTS += test-bitrotate @@ -122,6 +202,17 @@ ## end gnulib module c-ctype-tests +## begin gnulib module c-stack-tests + +TESTS += test-c-stack.sh test-c-stack2.sh +TESTS_ENVIRONMENT += LIBSIGSEGV='@LIBSIGSEGV@' +check_PROGRAMS += test-c-stack +test_c_stack_LDADD = $(LDADD) $(LIBCSTACK) @LIBINTL@ +MOSTLYCLEANFILES += t-c-stack.tmp t-c-stack2.tmp +EXTRA_DIST += test-c-stack.c test-c-stack.sh test-c-stack2.sh macros.h + +## end gnulib module c-stack-tests + ## begin gnulib module c-strcase-tests TESTS += test-c-strcase.sh @@ -155,6 +246,24 @@ ## end gnulib module close-tests +## begin gnulib module connect + + +EXTRA_DIST += connect.c w32sock.h + +EXTRA_libtests_a_SOURCES += connect.c + +## end gnulib module connect + +## begin gnulib module connect-tests + +TESTS += test-connect +check_PROGRAMS += test-connect +test_connect_LDADD = $(LDADD) @LIBSOCKET@ $(INET_PTON_LIB) +EXTRA_DIST += test-connect.c signature.h macros.h + +## end gnulib module connect-tests + ## begin gnulib module ctype-tests TESTS += test-ctype @@ -175,17 +284,6 @@ ## end gnulib module dfa-tests -## begin gnulib module dirent-safer-tests - -TESTS += test-dirent-safer -check_PROGRAMS += test-dirent-safer -# Link with libintl when needed. dirent-safer uses fdopendir if it is present, -# and fdopendir indirectly depends on openat-die -> gettext-h. -test_dirent_safer_LDADD = $(LDADD) $(LIBINTL) -EXTRA_DIST += test-dirent-safer.c macros.h - -## end gnulib module dirent-safer-tests - ## begin gnulib module dirent-tests TESTS += test-dirent @@ -279,12 +377,6 @@ ## end gnulib module fcntl-tests -## begin gnulib module fd-safer-flag - -libtests_a_SOURCES += fd-safer-flag.c dup-safer-flag.c - -## end gnulib module fd-safer-flag - ## begin gnulib module fdopen @@ -358,6 +450,14 @@ ## end gnulib module float-tests +## begin gnulib module fnmatch-h-tests + +TESTS += test-fnmatch-h +check_PROGRAMS += test-fnmatch-h +EXTRA_DIST += test-fnmatch-h.c + +## end gnulib module fnmatch-h-tests + ## begin gnulib module fnmatch-tests TESTS += test-fnmatch @@ -415,6 +515,23 @@ ## end gnulib module fstatat-tests +## begin gnulib module ftruncate + + +EXTRA_DIST += ftruncate.c + +EXTRA_libtests_a_SOURCES += ftruncate.c + +## end gnulib module ftruncate + +## begin gnulib module ftruncate-tests + +TESTS += test-ftruncate.sh +check_PROGRAMS += test-ftruncate +EXTRA_DIST += test-ftruncate.c test-ftruncate.sh signature.h macros.h + +## end gnulib module ftruncate-tests + ## begin gnulib module fwrite-tests TESTS += test-fwrite @@ -468,6 +585,24 @@ ## end gnulib module getprogname-tests +## begin gnulib module gettimeofday + + +EXTRA_DIST += gettimeofday.c + +EXTRA_libtests_a_SOURCES += gettimeofday.c + +## end gnulib module gettimeofday + +## begin gnulib module gettimeofday-tests + +TESTS += test-gettimeofday +check_PROGRAMS += test-gettimeofday + +EXTRA_DIST += signature.h test-gettimeofday.c + +## end gnulib module gettimeofday-tests + ## begin gnulib module hash-pjw libtests_a_SOURCES += hash-pjw.h hash-pjw.c @@ -516,6 +651,24 @@ ## end gnulib module ignore-value-tests +## begin gnulib module inet_pton + + +EXTRA_DIST += inet_pton.c + +EXTRA_libtests_a_SOURCES += inet_pton.c + +## end gnulib module inet_pton + +## begin gnulib module inet_pton-tests + +TESTS += test-inet_pton +check_PROGRAMS += test-inet_pton +test_inet_pton_LDADD = $(LDADD) @INET_PTON_LIB@ +EXTRA_DIST += test-inet_pton.c signature.h macros.h + +## end gnulib module inet_pton-tests + ## begin gnulib module intprops-tests TESTS += test-intprops @@ -555,6 +708,23 @@ ## end gnulib module inttypes-tests +## begin gnulib module ioctl + + +EXTRA_DIST += ioctl.c w32sock.h + +EXTRA_libtests_a_SOURCES += ioctl.c + +## end gnulib module ioctl + +## begin gnulib module ioctl-tests + +TESTS += test-ioctl +check_PROGRAMS += test-ioctl +EXTRA_DIST += test-ioctl.c signature.h macros.h + +## end gnulib module ioctl-tests + ## begin gnulib module isatty-tests TESTS += test-isatty @@ -595,6 +765,31 @@ ## end gnulib module limits-h-tests +## begin gnulib module listen + + +EXTRA_DIST += listen.c w32sock.h + +EXTRA_libtests_a_SOURCES += listen.c + +## end gnulib module listen + +## begin gnulib module listen-tests + +TESTS += test-listen +check_PROGRAMS += test-listen +test_listen_LDADD = $(LDADD) @LIBSOCKET@ +EXTRA_DIST += test-listen.c signature.h macros.h + +## end gnulib module listen-tests + +## begin gnulib module localcharset-tests + +noinst_PROGRAMS += test-localcharset +EXTRA_DIST += test-localcharset.c + +## end gnulib module localcharset-tests + ## begin gnulib module locale-tests TESTS += test-locale @@ -613,9 +808,9 @@ ## begin gnulib module localename -libtests_a_SOURCES += localename.c +libtests_a_SOURCES += localename.c localename-table.c -EXTRA_DIST += localename.h +EXTRA_DIST += localename-table.h localename.h ## end gnulib module localename @@ -629,6 +824,15 @@ ## end gnulib module localename-tests +## begin gnulib module localtime-buffer + + +EXTRA_DIST += localtime-buffer.c localtime-buffer.h + +EXTRA_libtests_a_SOURCES += localtime-buffer.c + +## end gnulib module localtime-buffer + ## begin gnulib module lseek-tests TESTS += test-lseek.sh @@ -730,6 +934,63 @@ ## end gnulib module memrchr-tests +## begin gnulib module nanosleep + + +EXTRA_DIST += nanosleep.c + +EXTRA_libtests_a_SOURCES += nanosleep.c + +## end gnulib module nanosleep + +## begin gnulib module nanosleep-tests + +TESTS += test-nanosleep +check_PROGRAMS += test-nanosleep +test_nanosleep_LDADD = $(LDADD) $(LIB_NANOSLEEP) +EXTRA_DIST += test-nanosleep.c signature.h macros.h + +## end gnulib module nanosleep-tests + +## begin gnulib module netinet_in + +BUILT_SOURCES += $(NETINET_IN_H) + +# We need the following in order to create when the system +# doesn't have one. +if GL_GENERATE_NETINET_IN_H +netinet/in.h: netinet_in.in.h $(top_builddir)/config.status + $(AM_V_at)$(MKDIR_P) netinet + $(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_NETINET_IN_H''@|$(NEXT_NETINET_IN_H)|g' \ + -e 's|@''HAVE_NETINET_IN_H''@|$(HAVE_NETINET_IN_H)|g' \ + < $(srcdir)/netinet_in.in.h; \ + } > $@-t && \ + mv $@-t $@ +else +netinet/in.h: $(top_builddir)/config.status + rm -f $@ +endif +MOSTLYCLEANFILES += netinet/in.h netinet/in.h-t +MOSTLYCLEANDIRS += netinet + +EXTRA_DIST += netinet_in.in.h + +## end gnulib module netinet_in + +## begin gnulib module netinet_in-tests + +TESTS += test-netinet_in +check_PROGRAMS += test-netinet_in +EXTRA_DIST += test-netinet_in.c + +## end gnulib module netinet_in-tests + ## begin gnulib module nl_langinfo-tests TESTS += test-nl_langinfo.sh @@ -773,6 +1034,23 @@ ## end gnulib module pathmax-tests +## begin gnulib module perror + + +EXTRA_DIST += perror.c + +EXTRA_libtests_a_SOURCES += perror.c + +## end gnulib module perror + +## begin gnulib module perror-tests + +TESTS += test-perror.sh test-perror2 +check_PROGRAMS += test-perror test-perror2 +EXTRA_DIST += macros.h signature.h test-perror.c test-perror2.c test-perror.sh + +## end gnulib module perror-tests + ## begin gnulib module pipe-posix @@ -808,6 +1086,14 @@ ## end gnulib module quotearg-simple-tests +## begin gnulib module raise-tests + +TESTS += test-raise +check_PROGRAMS += test-raise +EXTRA_DIST += test-raise.c signature.h macros.h + +## end gnulib module raise-tests + ## begin gnulib module read-tests TESTS += test-read @@ -833,6 +1119,27 @@ ## end gnulib module regex-tests +## begin gnulib module select + + +EXTRA_DIST += select.c + +EXTRA_libtests_a_SOURCES += select.c + +## end gnulib module select + +## begin gnulib module select-tests + +TESTS += test-select test-select-in.sh test-select-out.sh +# test-select-stdin has to be run by hand. +check_PROGRAMS += test-select test-select-fd test-select-stdin +test_select_LDADD = $(LDADD) @LIB_SELECT@ @LIBSOCKET@ $(INET_PTON_LIB) +test_select_fd_LDADD = $(LDADD) @LIB_SELECT@ +test_select_stdin_LDADD = $(LDADD) @LIB_SELECT@ +EXTRA_DIST += macros.h signature.h test-select.c test-select.h test-select-fd.c test-select-in.sh test-select-out.sh test-select-stdin.c + +## end gnulib module select-tests + ## begin gnulib module setenv @@ -872,12 +1179,71 @@ ## end gnulib module setlocale-tests +## begin gnulib module setsockopt + + +EXTRA_DIST += setsockopt.c w32sock.h + +EXTRA_libtests_a_SOURCES += setsockopt.c + +## end gnulib module setsockopt + +## begin gnulib module setsockopt-tests + +TESTS += test-setsockopt +check_PROGRAMS += test-setsockopt +test_setsockopt_LDADD = $(LDADD) @LIBSOCKET@ +EXTRA_DIST += test-setsockopt.c signature.h macros.h + +## end gnulib module setsockopt-tests + +## begin gnulib module sigaction-tests + +TESTS += test-sigaction +check_PROGRAMS += test-sigaction +EXTRA_DIST += test-sigaction.c signature.h macros.h + +## end gnulib module sigaction-tests + +## begin gnulib module signal-h-tests + +TESTS += test-signal-h +check_PROGRAMS += test-signal-h +EXTRA_DIST += test-signal-h.c + +## end gnulib module signal-h-tests + +## begin gnulib module sigprocmask-tests + +TESTS += test-sigprocmask +check_PROGRAMS += test-sigprocmask +EXTRA_DIST += test-sigprocmask.c signature.h macros.h + +## end gnulib module sigprocmask-tests + ## begin gnulib module size_max libtests_a_SOURCES += size_max.h ## end gnulib module size_max +## begin gnulib module sleep + + +EXTRA_DIST += sleep.c + +EXTRA_libtests_a_SOURCES += sleep.c + +## end gnulib module sleep + +## begin gnulib module sleep-tests + +TESTS += test-sleep +check_PROGRAMS += test-sleep +EXTRA_DIST += test-sleep.c signature.h macros.h + +## end gnulib module sleep-tests + ## begin gnulib module snippet/_Noreturn # Because this Makefile snippet defines a variable used by other @@ -956,6 +1322,32 @@ ## end gnulib module snprintf-tests +## begin gnulib module socket + + +EXTRA_DIST += socket.c w32sock.h + +EXTRA_libtests_a_SOURCES += socket.c + +## end gnulib module socket + +## begin gnulib module sockets + +libtests_a_SOURCES += sockets.h sockets.c + +EXTRA_DIST += w32sock.h + +## end gnulib module sockets + +## begin gnulib module sockets-tests + +TESTS += test-sockets +check_PROGRAMS += test-sockets +test_sockets_LDADD = $(LDADD) @LIBSOCKET@ +EXTRA_DIST += test-sockets.c + +## end gnulib module sockets-tests + ## begin gnulib module stat-tests TESTS += test-stat @@ -965,6 +1357,15 @@ ## end gnulib module stat-tests +## begin gnulib module stat-time-tests + +TESTS += test-stat-time +check_PROGRAMS += test-stat-time +test_stat_time_LDADD = $(LDADD) $(LIB_NANOSLEEP) +EXTRA_DIST += test-stat-time.c macros.h nap.h + +## end gnulib module stat-time-tests + ## begin gnulib module stdalign-tests TESTS += test-stdalign @@ -1021,6 +1422,23 @@ ## end gnulib module strerror-tests +## begin gnulib module strerror_r-posix + + +EXTRA_DIST += strerror_r.c + +EXTRA_libtests_a_SOURCES += strerror_r.c + +## end gnulib module strerror_r-posix + +## begin gnulib module strerror_r-posix-tests + +TESTS += test-strerror_r +check_PROGRAMS += test-strerror_r +EXTRA_DIST += test-strerror_r.c signature.h macros.h + +## end gnulib module strerror_r-posix-tests + ## begin gnulib module striconv-tests TESTS += test-striconv @@ -1104,6 +1522,148 @@ ## end gnulib module symlink-tests +## begin gnulib module sys_ioctl + +BUILT_SOURCES += sys/ioctl.h + +# We need the following in order to create when the system +# does not have a complete one. +sys/ioctl.h: sys_ioctl.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE_H) + $(AM_V_at)$(MKDIR_P) sys + $(AM_V_GEN)rm -f $@-t $@ && \ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ + sed -e 's|@''GUARD_PREFIX''@|GL|g' \ + -e 's|@''HAVE_SYS_IOCTL_H''@|$(HAVE_SYS_IOCTL_H)|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_SYS_IOCTL_H''@|$(NEXT_SYS_IOCTL_H)|g' \ + -e 's/@''GNULIB_IOCTL''@/$(GNULIB_IOCTL)/g' \ + -e 's|@''SYS_IOCTL_H_HAVE_WINSOCK2_H''@|$(SYS_IOCTL_H_HAVE_WINSOCK2_H)|g' \ + -e 's|@''SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS''@|$(SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS)|g' \ + -e 's|@''REPLACE_IOCTL''@|$(REPLACE_IOCTL)|g' \ + -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ + -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ + < $(srcdir)/sys_ioctl.in.h; \ + } > $@-t && \ + mv $@-t $@ +MOSTLYCLEANFILES += sys/ioctl.h sys/ioctl.h-t +MOSTLYCLEANDIRS += sys + +EXTRA_DIST += sys_ioctl.in.h + +## end gnulib module sys_ioctl + +## begin gnulib module sys_ioctl-tests + +TESTS += test-sys_ioctl +check_PROGRAMS += test-sys_ioctl +EXTRA_DIST += test-sys_ioctl.c + +## end gnulib module sys_ioctl-tests + +## begin gnulib module sys_select + +BUILT_SOURCES += sys/select.h + +# We need the following in order to create when the system +# doesn't have one that works with the given compiler. +sys/select.h: sys_select.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE_H) + $(AM_V_at)$(MKDIR_P) sys + $(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_SYS_SELECT_H''@|$(NEXT_SYS_SELECT_H)|g' \ + -e 's|@''HAVE_SYS_SELECT_H''@|$(HAVE_SYS_SELECT_H)|g' \ + -e 's/@''GNULIB_PSELECT''@/$(GNULIB_PSELECT)/g' \ + -e 's/@''GNULIB_SELECT''@/$(GNULIB_SELECT)/g' \ + -e 's|@''HAVE_WINSOCK2_H''@|$(HAVE_WINSOCK2_H)|g' \ + -e 's|@''HAVE_PSELECT''@|$(HAVE_PSELECT)|g' \ + -e 's|@''REPLACE_PSELECT''@|$(REPLACE_PSELECT)|g' \ + -e 's|@''REPLACE_SELECT''@|$(REPLACE_SELECT)|g' \ + -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ + -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ + < $(srcdir)/sys_select.in.h; \ + } > $@-t && \ + mv $@-t $@ +MOSTLYCLEANFILES += sys/select.h sys/select.h-t +MOSTLYCLEANDIRS += sys + +EXTRA_DIST += sys_select.in.h + +## end gnulib module sys_select + +## begin gnulib module sys_select-tests + +TESTS += test-sys_select +check_PROGRAMS += test-sys_select +EXTRA_DIST += test-sys_select.c signature.h + +## end gnulib module sys_select-tests + +## begin gnulib module sys_socket + +BUILT_SOURCES += sys/socket.h +libtests_a_SOURCES += sys_socket.c + +# We need the following in order to create when the system +# doesn't have one that works with the given compiler. +sys/socket.h: sys_socket.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE_H) $(ARG_NONNULL_H) + $(AM_V_at)$(MKDIR_P) sys + $(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_SYS_SOCKET_H''@|$(NEXT_SYS_SOCKET_H)|g' \ + -e 's|@''HAVE_SYS_SOCKET_H''@|$(HAVE_SYS_SOCKET_H)|g' \ + -e 's/@''GNULIB_CLOSE''@/$(GNULIB_CLOSE)/g' \ + -e 's/@''GNULIB_SOCKET''@/$(GNULIB_SOCKET)/g' \ + -e 's/@''GNULIB_CONNECT''@/$(GNULIB_CONNECT)/g' \ + -e 's/@''GNULIB_ACCEPT''@/$(GNULIB_ACCEPT)/g' \ + -e 's/@''GNULIB_BIND''@/$(GNULIB_BIND)/g' \ + -e 's/@''GNULIB_GETPEERNAME''@/$(GNULIB_GETPEERNAME)/g' \ + -e 's/@''GNULIB_GETSOCKNAME''@/$(GNULIB_GETSOCKNAME)/g' \ + -e 's/@''GNULIB_GETSOCKOPT''@/$(GNULIB_GETSOCKOPT)/g' \ + -e 's/@''GNULIB_LISTEN''@/$(GNULIB_LISTEN)/g' \ + -e 's/@''GNULIB_RECV''@/$(GNULIB_RECV)/g' \ + -e 's/@''GNULIB_SEND''@/$(GNULIB_SEND)/g' \ + -e 's/@''GNULIB_RECVFROM''@/$(GNULIB_RECVFROM)/g' \ + -e 's/@''GNULIB_SENDTO''@/$(GNULIB_SENDTO)/g' \ + -e 's/@''GNULIB_SETSOCKOPT''@/$(GNULIB_SETSOCKOPT)/g' \ + -e 's/@''GNULIB_SHUTDOWN''@/$(GNULIB_SHUTDOWN)/g' \ + -e 's/@''GNULIB_ACCEPT4''@/$(GNULIB_ACCEPT4)/g' \ + -e 's|@''HAVE_WINSOCK2_H''@|$(HAVE_WINSOCK2_H)|g' \ + -e 's|@''HAVE_WS2TCPIP_H''@|$(HAVE_WS2TCPIP_H)|g' \ + -e 's|@''HAVE_STRUCT_SOCKADDR_STORAGE''@|$(HAVE_STRUCT_SOCKADDR_STORAGE)|g' \ + -e 's|@''HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY''@|$(HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY)|g' \ + -e 's|@''HAVE_SA_FAMILY_T''@|$(HAVE_SA_FAMILY_T)|g' \ + -e 's|@''HAVE_ACCEPT4''@|$(HAVE_ACCEPT4)|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)' \ + < $(srcdir)/sys_socket.in.h; \ + } > $@-t && \ + mv -f $@-t $@ +MOSTLYCLEANFILES += sys/socket.h sys/socket.h-t +MOSTLYCLEANDIRS += sys + +EXTRA_DIST += sys_socket.in.h + +## end gnulib module sys_socket + +## begin gnulib module sys_socket-tests + +TESTS += test-sys_socket +check_PROGRAMS += test-sys_socket +EXTRA_DIST += test-sys_socket.c + +## end gnulib module sys_socket-tests + ## begin gnulib module sys_stat-tests TESTS += test-sys_stat @@ -1112,6 +1672,48 @@ ## end gnulib module sys_stat-tests +## begin gnulib module sys_time + +BUILT_SOURCES += sys/time.h + +# We need the following in order to create when the system +# doesn't have one that works with the given compiler. +sys/time.h: sys_time.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) + $(AM_V_at)$(MKDIR_P) sys + $(AM_V_GEN)rm -f $@-t $@ && \ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ + sed -e 's|@''GUARD_PREFIX''@|GL|g' \ + -e 's/@''HAVE_SYS_TIME_H''@/$(HAVE_SYS_TIME_H)/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_SYS_TIME_H''@|$(NEXT_SYS_TIME_H)|g' \ + -e 's/@''GNULIB_GETTIMEOFDAY''@/$(GNULIB_GETTIMEOFDAY)/g' \ + -e 's|@''HAVE_WINSOCK2_H''@|$(HAVE_WINSOCK2_H)|g' \ + -e 's/@''HAVE_GETTIMEOFDAY''@/$(HAVE_GETTIMEOFDAY)/g' \ + -e 's/@''HAVE_STRUCT_TIMEVAL''@/$(HAVE_STRUCT_TIMEVAL)/g' \ + -e 's/@''REPLACE_GETTIMEOFDAY''@/$(REPLACE_GETTIMEOFDAY)/g' \ + -e 's/@''REPLACE_STRUCT_TIMEVAL''@/$(REPLACE_STRUCT_TIMEVAL)/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)' \ + < $(srcdir)/sys_time.in.h; \ + } > $@-t && \ + mv $@-t $@ +MOSTLYCLEANFILES += sys/time.h sys/time.h-t + +EXTRA_DIST += sys_time.in.h + +## end gnulib module sys_time + +## begin gnulib module sys_time-tests + +TESTS += test-sys_time +check_PROGRAMS += test-sys_time +EXTRA_DIST += test-sys_time.c + +## end gnulib module sys_time-tests + ## begin gnulib module sys_types-tests TESTS += test-sys_types @@ -1120,6 +1722,40 @@ ## end gnulib module sys_types-tests +## begin gnulib module sys_uio + +BUILT_SOURCES += sys/uio.h + +# We need the following in order to create when the system +# doesn't have one that works with the given compiler. +sys/uio.h: sys_uio.in.h $(top_builddir)/config.status + $(AM_V_at)$(MKDIR_P) sys + $(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_SYS_UIO_H''@|$(NEXT_SYS_UIO_H)|g' \ + -e 's|@''HAVE_SYS_UIO_H''@|$(HAVE_SYS_UIO_H)|g' \ + < $(srcdir)/sys_uio.in.h; \ + } > $@-t && \ + mv -f $@-t $@ +MOSTLYCLEANFILES += sys/uio.h sys/uio.h-t +MOSTLYCLEANDIRS += sys + +EXTRA_DIST += sys_uio.in.h + +## end gnulib module sys_uio + +## begin gnulib module sys_uio-tests + +TESTS += test-sys_uio +check_PROGRAMS += test-sys_uio +EXTRA_DIST += test-sys_uio.c + +## end gnulib module sys_uio-tests + ## begin gnulib module test-framework-sh-tests TESTS += test-init.sh @@ -1291,6 +1927,7 @@ TESTS += test-wcwidth check_PROGRAMS += test-wcwidth +test_wcwidth_LDADD = $(LDADD) $(LIBUNISTRING) EXTRA_DIST += test-wcwidth.c signature.h macros.h ## end gnulib module wcwidth-tests diff -Nru grep-3.1/gnulib-tests/hash-pjw.c grep-3.3/gnulib-tests/hash-pjw.c --- grep-3.1/gnulib-tests/hash-pjw.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/gnulib-tests/hash-pjw.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,6 +1,6 @@ /* hash-pjw.c -- compute a hash value from a NUL-terminated string. - Copyright (C) 2001, 2003, 2006, 2009-2017 Free Software Foundation, Inc. + Copyright (C) 2001, 2003, 2006, 2009-2018 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 @@ -13,7 +13,7 @@ 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 . */ + along with this program. If not, see . */ #include @@ -25,7 +25,7 @@ /* A hash function for NUL-terminated char* strings using the method described by Bruno Haible. - See http://www.haible.de/bruno/hashfunc.html. */ + See https://www.haible.de/bruno/hashfunc.html. */ size_t hash_pjw (const void *x, size_t tablesize) diff -Nru grep-3.1/gnulib-tests/hash-pjw.h grep-3.3/gnulib-tests/hash-pjw.h --- grep-3.1/gnulib-tests/hash-pjw.h 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/gnulib-tests/hash-pjw.h 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ /* hash-pjw.h -- declaration for a simple hash function - Copyright (C) 2001, 2003, 2009-2017 Free Software Foundation, Inc. + Copyright (C) 2001, 2003, 2009-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ #include diff -Nru grep-3.1/gnulib-tests/inet_pton.c grep-3.3/gnulib-tests/inet_pton.c --- grep-3.1/gnulib-tests/inet_pton.c 1970-01-01 00:00:00.000000000 +0000 +++ grep-3.3/gnulib-tests/inet_pton.c 2018-01-07 00:07:08.000000000 +0000 @@ -0,0 +1,268 @@ +/* inet_pton.c -- convert IPv4 and IPv6 addresses from text to binary form + + Copyright (C) 2006, 2008-2018 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 . */ + +/* + * Copyright (c) 1996,1999 by Internet Software Consortium. + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS + * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE + * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL + * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR + * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS + * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS + * SOFTWARE. + */ + +#include + +/* Specification. */ +#include + +#if HAVE_DECL_INET_PTON + +# undef inet_pton + +int +rpl_inet_pton (int af, const char *restrict src, void *restrict dst) +{ + return inet_pton (af, src, dst); +} + +#else + +# include +# include +# include + +# define NS_INADDRSZ 4 +# define NS_IN6ADDRSZ 16 +# define NS_INT16SZ 2 + +/* + * WARNING: Don't even consider trying to compile this on a system where + * sizeof(int) < 4. sizeof(int) > 4 is fine; all the world's not a VAX. + */ + +static int inet_pton4 (const char *src, unsigned char *dst); +# if HAVE_IPV6 +static int inet_pton6 (const char *src, unsigned char *dst); +# endif + +/* int + * inet_pton(af, src, dst) + * convert from presentation format (which usually means ASCII printable) + * to network format (which is usually some kind of binary format). + * return: + * 1 if the address was valid for the specified address family + * 0 if the address wasn't valid ('dst' is untouched in this case) + * -1 if some other error occurred ('dst' is untouched in this case, too) + * author: + * Paul Vixie, 1996. + */ +int +inet_pton (int af, const char *restrict src, void *restrict dst) +{ + switch (af) + { + case AF_INET: + return (inet_pton4 (src, dst)); + +# if HAVE_IPV6 + case AF_INET6: + return (inet_pton6 (src, dst)); +# endif + + default: + errno = EAFNOSUPPORT; + return (-1); + } + /* NOTREACHED */ +} + +/* int + * inet_pton4(src, dst) + * like inet_aton() but without all the hexadecimal, octal (with the + * exception of 0) and shorthand. + * return: + * 1 if 'src' is a valid dotted quad, else 0. + * notice: + * does not touch 'dst' unless it's returning 1. + * author: + * Paul Vixie, 1996. + */ +static int +inet_pton4 (const char *restrict src, unsigned char *restrict dst) +{ + int saw_digit, octets, ch; + unsigned char tmp[NS_INADDRSZ], *tp; + + saw_digit = 0; + octets = 0; + *(tp = tmp) = 0; + while ((ch = *src++) != '\0') + { + + if (ch >= '0' && ch <= '9') + { + unsigned new = *tp * 10 + (ch - '0'); + + if (saw_digit && *tp == 0) + return (0); + if (new > 255) + return (0); + *tp = new; + if (!saw_digit) + { + if (++octets > 4) + return (0); + saw_digit = 1; + } + } + else if (ch == '.' && saw_digit) + { + if (octets == 4) + return (0); + *++tp = 0; + saw_digit = 0; + } + else + return (0); + } + if (octets < 4) + return (0); + memcpy (dst, tmp, NS_INADDRSZ); + return (1); +} + +# if HAVE_IPV6 + +/* int + * inet_pton6(src, dst) + * convert presentation level address to network order binary form. + * return: + * 1 if 'src' is a valid [RFC1884 2.2] address, else 0. + * notice: + * (1) does not touch 'dst' unless it's returning 1. + * (2) :: in a full address is silently ignored. + * credit: + * inspired by Mark Andrews. + * author: + * Paul Vixie, 1996. + */ +static int +inet_pton6 (const char *restrict src, unsigned char *restrict dst) +{ + static const char xdigits[] = "0123456789abcdef"; + unsigned char tmp[NS_IN6ADDRSZ], *tp, *endp, *colonp; + const char *curtok; + int ch, saw_xdigit; + unsigned val; + + tp = memset (tmp, '\0', NS_IN6ADDRSZ); + endp = tp + NS_IN6ADDRSZ; + colonp = NULL; + /* Leading :: requires some special handling. */ + if (*src == ':') + if (*++src != ':') + return (0); + curtok = src; + saw_xdigit = 0; + val = 0; + while ((ch = c_tolower (*src++)) != '\0') + { + const char *pch; + + pch = strchr (xdigits, ch); + if (pch != NULL) + { + val <<= 4; + val |= (pch - xdigits); + if (val > 0xffff) + return (0); + saw_xdigit = 1; + continue; + } + if (ch == ':') + { + curtok = src; + if (!saw_xdigit) + { + if (colonp) + return (0); + colonp = tp; + continue; + } + else if (*src == '\0') + { + return (0); + } + if (tp + NS_INT16SZ > endp) + return (0); + *tp++ = (u_char) (val >> 8) & 0xff; + *tp++ = (u_char) val & 0xff; + saw_xdigit = 0; + val = 0; + continue; + } + if (ch == '.' && ((tp + NS_INADDRSZ) <= endp) && + inet_pton4 (curtok, tp) > 0) + { + tp += NS_INADDRSZ; + saw_xdigit = 0; + break; /* '\0' was seen by inet_pton4(). */ + } + return (0); + } + if (saw_xdigit) + { + if (tp + NS_INT16SZ > endp) + return (0); + *tp++ = (u_char) (val >> 8) & 0xff; + *tp++ = (u_char) val & 0xff; + } + if (colonp != NULL) + { + /* + * Since some memmove()'s erroneously fail to handle + * overlapping regions, we'll do the shift by hand. + */ + const int n = tp - colonp; + int i; + + if (tp == endp) + return (0); + for (i = 1; i <= n; i++) + { + endp[-i] = colonp[n - i]; + colonp[n - i] = 0; + } + tp = endp; + } + if (tp != endp) + return (0); + memcpy (dst, tmp, NS_IN6ADDRSZ); + return (1); +} + +# endif + +#endif diff -Nru grep-3.1/gnulib-tests/init.sh grep-3.3/gnulib-tests/init.sh --- grep-3.1/gnulib-tests/init.sh 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/gnulib-tests/init.sh 2018-01-07 00:07:08.000000000 +0000 @@ -1,6 +1,6 @@ # source this file; set up for tests -# Copyright (C) 2009-2017 Free Software Foundation, Inc. +# Copyright (C) 2009-2018 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 @@ -13,7 +13,7 @@ # 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 . +# along with this program. If not, see . # Using this file in a test # ========================= @@ -62,6 +62,19 @@ ME_=`expr "./$0" : '.*/\(.*\)$'` +# 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 + # We use a trap below for cleanup. This requires us to go through # hoops to get the right exit status transported through the handler. # So use 'Exit STATUS' instead of 'exit STATUS' inside of the tests. @@ -250,7 +263,7 @@ # That is part of the shell-selection test above. Why use aliases rather # than functions? Because support for hyphen-containing aliases is more # widespread than that for hyphen-containing function names. -test -n "$EXEEXT" && shopt -s expand_aliases +test -n "$EXEEXT" && test -n "$BASH_VERSION" && shopt -s expand_aliases # Enable glibc's malloc-perturbing option. # This is useful for exposing code that depends on the fact that @@ -429,13 +442,13 @@ path_dir_=$1 case $path_dir_ in '') fail_ "invalid path dir: '$1'";; - /*) abs_path_dir_=$path_dir_;; + /* | ?:*) abs_path_dir_=$path_dir_;; *) abs_path_dir_=$initial_cwd_/$path_dir_;; esac case $abs_path_dir_ in - *:*) fail_ "invalid path dir: '$abs_path_dir_'";; + *$PATH_SEPARATOR*) fail_ "invalid path dir: '$abs_path_dir_'";; esac - PATH="$abs_path_dir_:$PATH" + PATH="$abs_path_dir_$PATH_SEPARATOR$PATH" # Create an alias, FOO, for each FOO.exe in this directory. create_exe_shims_ "$abs_path_dir_" \ @@ -514,7 +527,7 @@ fi n_plus_50_=`expr $n_ + 50` - cmds_='date; date +%N; free; who -a; w; ps auxww; ps ef; netstat -n' + cmds_='date; date +%N; free; who -a; w; ps auxww; ps -ef' data_=` (eval "$cmds_") 2>&1 | gzip ` # Ensure that $data_ has length at least 50+$n_ diff -Nru grep-3.1/gnulib-tests/inttostr.h grep-3.3/gnulib-tests/inttostr.h --- grep-3.1/gnulib-tests/inttostr.h 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/gnulib-tests/inttostr.h 2018-01-07 00:07:08.000000000 +0000 @@ -1,6 +1,6 @@ /* inttostr.h -- convert integers to printable strings - Copyright (C) 2001-2006, 2009-2017 Free Software Foundation, Inc. + Copyright (C) 2001-2006, 2009-2018 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 @@ -13,7 +13,7 @@ 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 . */ + along with this program. If not, see . */ /* Written by Paul Eggert */ diff -Nru grep-3.1/gnulib-tests/ioctl.c grep-3.3/gnulib-tests/ioctl.c --- grep-3.1/gnulib-tests/ioctl.c 1970-01-01 00:00:00.000000000 +0000 +++ grep-3.3/gnulib-tests/ioctl.c 2018-01-07 00:07:08.000000000 +0000 @@ -0,0 +1,92 @@ +/* ioctl.c --- wrappers for Windows ioctl function + + Copyright (C) 2008-2018 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 Paolo Bonzini */ + +#include + +#include + +#include + +#if HAVE_IOCTL + +/* Provide a wrapper with the POSIX prototype. */ +# undef ioctl +int +rpl_ioctl (int fd, int request, ... /* {void *,char *} arg */) +{ + void *buf; + va_list args; + + va_start (args, request); + buf = va_arg (args, void *); + va_end (args); + + /* Cast 'request' so that when the system's ioctl function takes a 64-bit + request argument, the value gets zero-extended, not sign-extended. */ + return ioctl (fd, (unsigned int) request, buf); +} + +#else /* mingw */ + +# include + +/* Get HANDLE. */ +# define WIN32_LEAN_AND_MEAN +# include + +# include "fd-hook.h" +/* Get _get_osfhandle. */ +# if GNULIB_MSVC_NOTHROW +# include "msvc-nothrow.h" +# else +# include +# endif + +static int +primary_ioctl (int fd, int request, void *arg) +{ + /* We don't support FIONBIO on pipes here. If you want to make pipe + fds non-blocking, use the gnulib 'nonblocking' module, until + gnulib implements fcntl F_GETFL / F_SETFL with O_NONBLOCK. */ + + if ((HANDLE) _get_osfhandle (fd) != INVALID_HANDLE_VALUE) + errno = ENOSYS; + else + errno = EBADF; + return -1; +} + +int +ioctl (int fd, int request, ... /* {void *,char *} arg */) +{ + void *arg; + va_list args; + + va_start (args, request); + arg = va_arg (args, void *); + va_end (args); + +# if WINDOWS_SOCKETS + return execute_all_ioctl_hooks (primary_ioctl, fd, request, arg); +# else + return primary_ioctl (fd, request, arg); +# endif +} + +#endif diff -Nru grep-3.1/gnulib-tests/itold.c grep-3.3/gnulib-tests/itold.c --- grep-3.1/gnulib-tests/itold.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/gnulib-tests/itold.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ /* Replacement for 'int' to 'long double' conversion routine. - Copyright (C) 2011-2017 Free Software Foundation, Inc. + Copyright (C) 2011-2018 Free Software Foundation, Inc. Written by Bruno Haible , 2011. This program is free software: you can redistribute it and/or modify @@ -13,7 +13,7 @@ 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 . */ + along with this program. If not, see . */ #include diff -Nru grep-3.1/gnulib-tests/listen.c grep-3.3/gnulib-tests/listen.c --- grep-3.1/gnulib-tests/listen.c 1970-01-01 00:00:00.000000000 +0000 +++ grep-3.3/gnulib-tests/listen.c 2018-01-07 00:07:08.000000000 +0000 @@ -0,0 +1,49 @@ +/* listen.c --- wrappers for Windows listen function + + Copyright (C) 2008-2018 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 Paolo Bonzini */ + +#include + +#define WIN32_LEAN_AND_MEAN +/* Get winsock2.h. */ +#include + +/* Get set_winsock_errno, FD_TO_SOCKET etc. */ +#include "w32sock.h" + +#undef listen + +int +rpl_listen (int fd, int backlog) +{ + SOCKET sock = FD_TO_SOCKET (fd); + + if (sock == INVALID_SOCKET) + { + errno = EBADF; + return -1; + } + else + { + int r = listen (sock, backlog); + if (r < 0) + set_winsock_errno (); + + return r; + } +} diff -Nru grep-3.1/gnulib-tests/localename.c grep-3.3/gnulib-tests/localename.c --- grep-3.1/gnulib-tests/localename.c 2017-06-21 16:11:22.000000000 +0000 +++ grep-3.3/gnulib-tests/localename.c 2018-12-21 03:32:16.000000000 +0000 @@ -1,5 +1,5 @@ /* Determine name of the currently selected locale. - Copyright (C) 1995-2017 Free Software Foundation, Inc. + Copyright (C) 1995-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ /* Written by Ulrich Drepper , 1995. */ /* Native Windows code written by Tor Lillqvist . */ @@ -35,20 +35,34 @@ #include "flexmember.h" -#if HAVE_USELOCALE +/* We cannot support uselocale() on platforms where the locale_t type is fake. + See intl-thread-locale.m4 for details. */ +#if HAVE_WORKING_USELOCALE && !HAVE_FAKE_LOCALES +# define HAVE_GOOD_USELOCALE 1 +#endif + +#if HAVE_GOOD_USELOCALE /* Mac OS X 10.5 defines the locale_t type in . */ # if defined __APPLE__ && defined __MACH__ # include # endif -# if (__GLIBC__ >= 2 && !defined __UCLIBC__) || defined __CYGWIN__ +# if (__GLIBC__ >= 2 && !defined __UCLIBC__) || (defined __linux__ && HAVE_LANGINFO_H) || defined __CYGWIN__ # include # endif # if !defined IN_LIBINTL # include "glthread/lock.h" # endif -# if defined __sun && HAVE_GETLOCALENAME_L +# if defined __sun +# if HAVE_GETLOCALENAME_L /* Solaris >= 12. */ extern char * getlocalename_l(int, locale_t); +# elif HAVE_SOLARIS114_LOCALES +# include +# endif +# endif +# if HAVE_NAMELESS_LOCALES +# include +# include "localename-table.h" # endif #endif @@ -61,7 +75,7 @@ # endif #endif -#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ +#if defined _WIN32 && !defined __CYGWIN__ # define WINDOWS_NATIVE # if !defined IN_LIBINTL # include "glthread/lock.h" @@ -1143,7 +1157,7 @@ #if HAVE_CFLOCALECOPYCURRENT || HAVE_CFPREFERENCESCOPYAPPVALUE -/* Mac OS X 10.2 or newer */ +/* Mac OS X 10.4 or newer */ /* Canonicalize a Mac OS X locale name to a Unix locale name. NAME is a sufficiently large buffer. @@ -1157,7 +1171,7 @@ { /* This conversion is based on a posting by Deborah GoldSmith on 2005-03-08, - http://lists.apple.com/archives/carbon-dev/2005/Mar/msg00293.html */ + https://lists.apple.com/archives/carbon-dev/2005/Mar/msg00293.html */ /* Convert legacy (NeXTstep inherited) English names to Unix (ISO 639 and ISO 3166) names. Prior to Mac OS X 10.3, there is no API for doing this. @@ -1308,22 +1322,44 @@ /* Mac OS X has "az-Arab", "az-Cyrl", "az-Latn". The default script for az on Unix is Latin. */ { "az-Latn", "az" }, + /* Mac OS X has "bs-Cyrl", "bs-Latn". + The default script for bs on Unix is Latin. */ + { "bs-Latn", "bs" }, /* Mac OS X has "ga-dots". Does not yet exist on Unix. */ { "ga-dots", "ga" }, - /* Mac OS X has "kk-Cyrl". Does not yet exist on Unix. */ + /* Mac OS X has "kk-Cyrl". + The default script for kk on Unix is Cyrillic. */ + { "kk-Cyrl", "kk" }, /* Mac OS X has "mn-Cyrl", "mn-Mong". The default script for mn on Unix is Cyrillic. */ { "mn-Cyrl", "mn" }, /* Mac OS X has "ms-Arab", "ms-Latn". The default script for ms on Unix is Latin. */ { "ms-Latn", "ms" }, + /* Mac OS X has "pa-Arab", "pa-Guru". + Country codes are used to distinguish these on Unix. */ + { "pa-Arab", "pa_PK" }, + { "pa-Guru", "pa_IN" }, + /* Mac OS X has "shi-Latn", "shi-Tfng". Does not yet exist on Unix. */ + /* Mac OS X has "sr-Cyrl", "sr-Latn". + The default script for sr on Unix is Cyrillic. */ + { "sr-Cyrl", "sr" }, /* Mac OS X has "tg-Cyrl". The default script for tg on Unix is Cyrillic. */ { "tg-Cyrl", "tg" }, - /* Mac OS X has "tk-Cyrl". Does not yet exist on Unix. */ + /* Mac OS X has "tk-Cyrl". + The default script for tk on Unix is Cyrillic. */ + { "tk-Cyrl", "tk" }, /* Mac OS X has "tt-Cyrl". The default script for tt on Unix is Cyrillic. */ { "tt-Cyrl", "tt" }, + /* Mac OS X has "uz-Arab", "uz-Cyrl", "uz-Latn". + The default script for uz on Unix is Latin. */ + { "uz-Latn", "uz" }, + /* Mac OS X has "vai-Latn", "vai-Vaii". Does not yet exist on Unix. */ + /* Mac OS X has "yue-Hans", "yue-Hant". + The default script for yue on Unix is Simplified Han. */ + { "yue-Hans", "yue" }, /* Mac OS X has "zh-Hans", "zh-Hant". Country codes are used to distinguish these on Unix. */ { "zh-Hans", "zh_CN" }, @@ -1331,12 +1367,13 @@ }; /* Convert script names (ISO 15924) to Unix conventions. - See http://www.unicode.org/iso15924/iso15924-codes.html */ + See https://www.unicode.org/iso15924/iso15924-codes.html */ typedef struct { const char script[4+1]; const char unixy[9+1]; } script_entry; static const script_entry script_table[] = { { "Arab", "arabic" }, { "Cyrl", "cyrillic" }, + { "Latn", "latin" }, { "Mong", "mongolian" } }; @@ -1492,8 +1529,8 @@ sub = SUBLANGID (langid); /* Dispatch on language. - See also http://www.unicode.org/unicode/onlinedat/languages.html . - For details about languages, see http://www.ethnologue.com/ . */ + See also https://www.unicode.org/unicode/onlinedat/languages.html . + For details about languages, see https://www.ethnologue.com/ . */ switch (primary) { case LANG_AFRIKAANS: @@ -2259,10 +2296,10 @@ } return "wen"; case LANG_SOTHO: - /* calls - it "Sepedi"; according to - - + /* calls + it "Sesotho sa Leboa"; according to + + it's the same as Northern Sotho. */ switch (sub) { @@ -2592,7 +2629,8 @@ #endif -#if HAVE_USELOCALE /* glibc, Solaris >= 12 or Mac OS X */ +#if HAVE_GOOD_USELOCALE /* glibc, Mac OS X, FreeBSD >= 9.1, Cygwin >= 2.6, + Solaris 11 OpenIndiana, or Solaris >= 11.4 */ /* Simple hash set of strings. We don't want to drag in lots of hash table code here. */ @@ -2601,7 +2639,7 @@ /* A hash function for NUL-terminated char* strings using the method described by Bruno Haible. - See http://www.haible.de/bruno/hashfunc.html. */ + See https://www.haible.de/bruno/hashfunc.html. */ static size_t _GL_ATTRIBUTE_PURE string_hash (const void *x) { @@ -2618,14 +2656,14 @@ simultaneously, but only one thread can insert into it at the same time. */ /* A node in a hash bucket collision list. */ -struct hash_node +struct struniq_hash_node { - struct hash_node * volatile next; + struct struniq_hash_node * volatile next; char contents[FLEXIBLE_ARRAY_MEMBER]; }; -# define HASH_TABLE_SIZE 257 -static struct hash_node * volatile struniq_hash_table[HASH_TABLE_SIZE] +# define STRUNIQ_HASH_TABLE_SIZE 257 +static struct struniq_hash_node * volatile struniq_hash_table[STRUNIQ_HASH_TABLE_SIZE] /* = { NULL, ..., NULL } */; /* This lock protects the struniq_hash_table against multiple simultaneous @@ -2638,17 +2676,17 @@ struniq (const char *string) { size_t hashcode = string_hash (string); - size_t slot = hashcode % HASH_TABLE_SIZE; + size_t slot = hashcode % STRUNIQ_HASH_TABLE_SIZE; size_t size; - struct hash_node *new_node; - struct hash_node *p; + struct struniq_hash_node *new_node; + struct struniq_hash_node *p; for (p = struniq_hash_table[slot]; p != NULL; p = p->next) if (strcmp (p->contents, string) == 0) return p->contents; size = strlen (string) + 1; new_node = - (struct hash_node *) - malloc (FLEXSIZEOF (struct hash_node, contents, size)); + (struct struniq_hash_node *) + malloc (FLEXSIZEOF (struct struniq_hash_node, contents, size)); if (new_node == NULL) /* Out of memory. Return a statically allocated string. */ return "C"; @@ -2677,7 +2715,387 @@ #endif -#if defined IN_LIBINTL || HAVE_USELOCALE +#if HAVE_GOOD_USELOCALE && HAVE_NAMELESS_LOCALES + +/* The 'locale_t' object does not contain the names of the locale categories. + We have to associate them with the object through a hash table. + The hash table is defined in localename-table.[hc]. */ + +/* Returns the name of a given locale category in a given locale_t object, + allocated as a string with indefinite extent. */ +static const char * +get_locale_t_name (int category, locale_t locale) +{ + if (locale == LC_GLOBAL_LOCALE) + { + /* Query the global locale. */ + const char *name = setlocale (category, NULL); + if (name != NULL) + return struniq (name); + else + /* Should normally not happen. */ + return ""; + } + else + { + /* Look up the names in the hash table. */ + size_t hashcode = locale_hash_function (locale); + size_t slot = hashcode % LOCALE_HASH_TABLE_SIZE; + /* If the locale was not found in the table, return "". This can + happen if the application uses the original newlocale()/duplocale() + functions instead of the overridden ones. */ + const char *name = ""; + struct locale_hash_node *p; + /* Lock while looking up the hash node. */ + gl_rwlock_rdlock (locale_lock); + for (p = locale_hash_table[slot]; p != NULL; p = p->next) + if (p->locale == locale) + { + name = p->names.category_name[category]; + break; + } + gl_rwlock_unlock (locale_lock); + return name; + } +} + +# if !(defined newlocale && defined duplocale && defined freelocale) +# error "newlocale, duplocale, freelocale not being replaced as expected!" +# endif + +/* newlocale() override. */ +locale_t +newlocale (int category_mask, const char *name, locale_t base) +#undef newlocale +{ + struct locale_categories_names names; + struct locale_hash_node *node; + locale_t result; + + /* Make sure name has indefinite extent. */ + if (((LC_CTYPE_MASK | LC_NUMERIC_MASK | LC_TIME_MASK | LC_COLLATE_MASK + | LC_MONETARY_MASK | LC_MESSAGES_MASK) + & category_mask) != 0) + name = struniq (name); + + /* Determine the category names of the result. */ + if (((LC_CTYPE_MASK | LC_NUMERIC_MASK | LC_TIME_MASK | LC_COLLATE_MASK + | LC_MONETARY_MASK | LC_MESSAGES_MASK) + & ~category_mask) == 0) + { + /* Use name, ignore base. */ + int category; + + name = struniq (name); + for (category = 0; category < 6; category++) + names.category_name[category] = name; + } + else + { + /* Use base, possibly also name. */ + if (base == NULL) + { + int category; + + for (category = 0; category < 6; category++) + { + int mask; + + switch (category) + { + case LC_CTYPE: + mask = LC_CTYPE_MASK; + break; + case LC_NUMERIC: + mask = LC_NUMERIC_MASK; + break; + case LC_TIME: + mask = LC_TIME_MASK; + break; + case LC_COLLATE: + mask = LC_COLLATE_MASK; + break; + case LC_MONETARY: + mask = LC_MONETARY_MASK; + break; + case LC_MESSAGES: + mask = LC_MESSAGES_MASK; + break; + default: + abort (); + } + names.category_name[category] = + ((mask & category_mask) != 0 ? name : "C"); + } + } + else if (base == LC_GLOBAL_LOCALE) + { + int category; + + for (category = 0; category < 6; category++) + { + int mask; + + switch (category) + { + case LC_CTYPE: + mask = LC_CTYPE_MASK; + break; + case LC_NUMERIC: + mask = LC_NUMERIC_MASK; + break; + case LC_TIME: + mask = LC_TIME_MASK; + break; + case LC_COLLATE: + mask = LC_COLLATE_MASK; + break; + case LC_MONETARY: + mask = LC_MONETARY_MASK; + break; + case LC_MESSAGES: + mask = LC_MESSAGES_MASK; + break; + default: + abort (); + } + names.category_name[category] = + ((mask & category_mask) != 0 + ? name + : get_locale_t_name (category, LC_GLOBAL_LOCALE)); + } + } + else + { + /* Look up the names of base in the hash table. Like multiple calls + of get_locale_t_name, but locking only once. */ + struct locale_hash_node *p; + int category; + + /* Lock while looking up the hash node. */ + gl_rwlock_rdlock (locale_lock); + for (p = locale_hash_table[locale_hash_function (base) % LOCALE_HASH_TABLE_SIZE]; + p != NULL; + p = p->next) + if (p->locale == base) + break; + + for (category = 0; category < 6; category++) + { + int mask; + + switch (category) + { + case LC_CTYPE: + mask = LC_CTYPE_MASK; + break; + case LC_NUMERIC: + mask = LC_NUMERIC_MASK; + break; + case LC_TIME: + mask = LC_TIME_MASK; + break; + case LC_COLLATE: + mask = LC_COLLATE_MASK; + break; + case LC_MONETARY: + mask = LC_MONETARY_MASK; + break; + case LC_MESSAGES: + mask = LC_MESSAGES_MASK; + break; + default: + abort (); + } + names.category_name[category] = + ((mask & category_mask) != 0 + ? name + : (p != NULL ? p->names.category_name[category] : "")); + } + + gl_rwlock_unlock (locale_lock); + } + } + + node = (struct locale_hash_node *) malloc (sizeof (struct locale_hash_node)); + if (node == NULL) + /* errno is set to ENOMEM. */ + return NULL; + + result = newlocale (category_mask, name, base); + if (result == NULL) + { + int saved_errno = errno; + free (node); + errno = saved_errno; + return NULL; + } + + /* Fill the hash node. */ + node->locale = result; + node->names = names; + + /* Insert it in the hash table. */ + { + size_t hashcode = locale_hash_function (result); + size_t slot = hashcode % LOCALE_HASH_TABLE_SIZE; + struct locale_hash_node *p; + + /* Lock while inserting the new node. */ + gl_rwlock_wrlock (locale_lock); + for (p = locale_hash_table[slot]; p != NULL; p = p->next) + if (p->locale == result) + { + /* This can happen if the application uses the original freelocale() + function instead of the overridden one. */ + p->names = node->names; + break; + } + if (p == NULL) + { + node->next = locale_hash_table[slot]; + locale_hash_table[slot] = node; + } + + gl_rwlock_unlock (locale_lock); + + if (p != NULL) + free (node); + } + + return result; +} + +/* duplocale() override. */ +locale_t +duplocale (locale_t locale) +#undef duplocale +{ + struct locale_hash_node *node; + locale_t result; + + if (locale == NULL) + /* Invalid argument. */ + abort (); + + node = (struct locale_hash_node *) malloc (sizeof (struct locale_hash_node)); + if (node == NULL) + /* errno is set to ENOMEM. */ + return NULL; + + result = duplocale (locale); + if (result == NULL) + { + int saved_errno = errno; + free (node); + errno = saved_errno; + return NULL; + } + + /* Fill the hash node. */ + node->locale = result; + if (locale == LC_GLOBAL_LOCALE) + { + int category; + + for (category = 0; category < 6; category++) + node->names.category_name[category] = + get_locale_t_name (category, LC_GLOBAL_LOCALE); + + /* Lock before inserting the new node. */ + gl_rwlock_wrlock (locale_lock); + } + else + { + struct locale_hash_node *p; + + /* Lock once, for the lookup and the insertion. */ + gl_rwlock_wrlock (locale_lock); + + for (p = locale_hash_table[locale_hash_function (locale) % LOCALE_HASH_TABLE_SIZE]; + p != NULL; + p = p->next) + if (p->locale == locale) + break; + if (p != NULL) + node->names = p->names; + else + { + /* This can happen if the application uses the original + newlocale()/duplocale() functions instead of the overridden + ones. */ + int category; + + for (category = 0; category < 6; category++) + node->names.category_name[category] = ""; + } + } + + /* Insert it in the hash table. */ + { + size_t hashcode = locale_hash_function (result); + size_t slot = hashcode % LOCALE_HASH_TABLE_SIZE; + struct locale_hash_node *p; + + for (p = locale_hash_table[slot]; p != NULL; p = p->next) + if (p->locale == result) + { + /* This can happen if the application uses the original freelocale() + function instead of the overridden one. */ + p->names = node->names; + break; + } + if (p == NULL) + { + node->next = locale_hash_table[slot]; + locale_hash_table[slot] = node; + } + + gl_rwlock_unlock (locale_lock); + + if (p != NULL) + free (node); + } + + return result; +} + +/* freelocale() override. */ +void +freelocale (locale_t locale) +#undef freelocale +{ + if (locale == NULL || locale == LC_GLOBAL_LOCALE) + /* Invalid argument. */ + abort (); + + { + size_t hashcode = locale_hash_function (locale); + size_t slot = hashcode % LOCALE_HASH_TABLE_SIZE; + struct locale_hash_node *found; + struct locale_hash_node **p; + + found = NULL; + /* Lock while removing the hash node. */ + gl_rwlock_wrlock (locale_lock); + for (p = &locale_hash_table[slot]; *p != NULL; p = &(*p)->next) + if ((*p)->locale == locale) + { + found = *p; + *p = (*p)->next; + break; + } + gl_rwlock_unlock (locale_lock); + free (found); + } + + freelocale (locale); +} + +#endif + + +#if defined IN_LIBINTL || HAVE_GOOD_USELOCALE /* Like gl_locale_name_thread, except that the result is not in storage of indefinite extent. */ @@ -2687,7 +3105,7 @@ const char * gl_locale_name_thread_unsafe (int category, const char *categoryname) { -# if HAVE_USELOCALE +# if HAVE_GOOD_USELOCALE { locale_t thread_locale = uselocale (NULL); if (thread_locale != LC_GLOBAL_LOCALE) @@ -2695,7 +3113,7 @@ # if __GLIBC__ >= 2 && !defined __UCLIBC__ /* Work around an incorrect definition of the _NL_LOCALE_NAME macro in glibc < 2.12. - See . */ + See . */ const char *name = nl_langinfo (_NL_ITEM ((category), _NL_ITEM_INDEX (-1))); if (name[0] == '\0') @@ -2703,6 +3121,9 @@ nl_langinfo (_NL_LOCALE_NAME (category)). */ name = thread_locale->__names[category]; return name; +# elif defined __linux__ && HAVE_LANGINFO_H && defined NL_LOCALE_NAME + /* musl libc */ + return nl_langinfo_l (NL_LOCALE_NAME (category), thread_locale); # elif (defined __FreeBSD__ || defined __DragonFly__) || (defined __APPLE__ && defined __MACH__) /* FreeBSD, Mac OS X */ int mask; @@ -2731,9 +3152,45 @@ return ""; } return querylocale (mask, thread_locale); -# elif defined __sun && HAVE_GETLOCALENAME_L +# elif defined __sun +# if HAVE_GETLOCALENAME_L /* Solaris >= 12. */ return getlocalename_l (category, thread_locale); +# elif HAVE_SOLARIS114_LOCALES + /* Solaris >= 11.4. */ + void *lcp = (*thread_locale)->core.data->lcp; + if (lcp != NULL) + switch (category) + { + case LC_CTYPE: + case LC_NUMERIC: + case LC_TIME: + case LC_COLLATE: + case LC_MONETARY: + case LC_MESSAGES: + return ((const char * const *) lcp)[category]; + default: /* We shouldn't get here. */ + return ""; + } +# elif HAVE_NAMELESS_LOCALES + return get_locale_t_name (category, thread_locale); +# else + /* Solaris 11 OpenIndiana. + For the internal structure of locale objects, see + https://github.com/OpenIndiana/illumos-gate/blob/master/usr/src/lib/libc/port/locale/localeimpl.h */ + switch (category) + { + case LC_CTYPE: + case LC_NUMERIC: + case LC_TIME: + case LC_COLLATE: + case LC_MONETARY: + case LC_MESSAGES: + return ((const char * const *) thread_locale)[category]; + default: /* We shouldn't get here. */ + return ""; + } +# endif # elif defined __CYGWIN__ /* Cygwin < 2.6 lacks uselocale and thread-local locales altogether. Cygwin <= 2.6.1 lacks NL_LOCALE_NAME, requiring peeking inside @@ -2761,22 +3218,42 @@ const char * gl_locale_name_thread (int category, const char *categoryname) { -#if HAVE_USELOCALE +#if HAVE_GOOD_USELOCALE const char *name = gl_locale_name_thread_unsafe (category, categoryname); if (name != NULL) return struniq (name); -#elif defined WINDOWS_NATIVE +#endif + /* On WINDOWS_NATIVE, don't use GetThreadLocale() here, because when + SetThreadLocale has not been called - which is a very frequent case - + the value of GetThreadLocale() ignores past calls to 'setlocale'. */ + return NULL; +} + +/* XPG3 defines the result of 'setlocale (category, NULL)' as: + "Directs 'setlocale()' to query 'category' and return the current + setting of 'local'." + However it does not specify the exact format. Neither do SUSV2 and + ISO C 99. So we can use this feature only on selected systems (e.g. + those using GNU C Library). */ +#if defined _LIBC || ((defined __GLIBC__ && __GLIBC__ >= 2) && !defined __UCLIBC__) +# define HAVE_LOCALE_NULL +#endif + +const char * +gl_locale_name_posix (int category, const char *categoryname) +{ +#if defined WINDOWS_NATIVE if (LC_MIN <= category && category <= LC_MAX) { - char *locname = setlocale (category, NULL); - LCID lcid = 0; + const char *locname = setlocale (category, NULL); + LCID lcid; /* If CATEGORY is LC_ALL, the result might be a semi-colon separated list of locales. We need only one, so we take the one corresponding to LC_CTYPE, as the most important for character translations. */ - if (strchr (locname, ';')) - locname = setlocale (LC_CTYPE, NULL); + if (category == LC_ALL && strchr (locname, ';')) + locname = setlocale (LC_CTYPE, NULL); /* Convert locale name to LCID. We don't want to use LocaleNameToLCID because (a) it is only available since Vista, @@ -2787,46 +3264,48 @@ return gl_locale_name_from_win32_LCID (lcid); } #endif - return NULL; -} - -/* XPG3 defines the result of 'setlocale (category, NULL)' as: - "Directs 'setlocale()' to query 'category' and return the current - setting of 'local'." - However it does not specify the exact format. Neither do SUSV2 and - ISO C 99. So we can use this feature only on selected systems (e.g. - those using GNU C Library). */ -#if defined _LIBC || ((defined __GLIBC__ && __GLIBC__ >= 2) && !defined __UCLIBC__) -# define HAVE_LOCALE_NULL -#endif + { + const char *locname; -const char * -gl_locale_name_posix (int category, const char *categoryname) -{ - /* Use the POSIX methods of looking to 'LC_ALL', 'LC_xxx', and 'LANG'. - On some systems this can be done by the 'setlocale' function itself. */ + /* Use the POSIX methods of looking to 'LC_ALL', 'LC_xxx', and 'LANG'. + On some systems this can be done by the 'setlocale' function itself. */ #if defined HAVE_SETLOCALE && defined HAVE_LC_MESSAGES && defined HAVE_LOCALE_NULL - return setlocale (category, NULL); + locname = setlocale (category, NULL); #else - /* On other systems we ignore what setlocale reports and instead look at the - environment variables directly. This is necessary - 1. on systems which have a facility for customizing the default locale - (Mac OS X, native Windows, Cygwin) and where the system's setlocale() - function ignores this default locale (Mac OS X, Cygwin), in two cases: - a. when the user missed to use the setlocale() override from libintl - (for example by not including ), - b. when setlocale supports only the "C" locale, such as on Cygwin - 1.5.x. In this case even the override from libintl cannot help. - 2. on all systems where setlocale supports only the "C" locale. */ - /* Strictly speaking, it is a POSIX violation to look at the environment - variables regardless whether setlocale has been called or not. POSIX - says: - "For C-language programs, the POSIX locale shall be the - default locale when the setlocale() function is not called." - But we assume that all programs that use internationalized APIs call - setlocale (LC_ALL, ""). */ - return gl_locale_name_environ (category, categoryname); + /* On other systems we ignore what setlocale reports and instead look at the + environment variables directly. This is necessary + 1. on systems which have a facility for customizing the default locale + (Mac OS X, native Windows, Cygwin) and where the system's setlocale() + function ignores this default locale (Mac OS X, Cygwin), in two cases: + a. when the user missed to use the setlocale() override from libintl + (for example by not including ), + b. when setlocale supports only the "C" locale, such as on Cygwin + 1.5.x. In this case even the override from libintl cannot help. + 2. on all systems where setlocale supports only the "C" locale. */ + /* Strictly speaking, it is a POSIX violation to look at the environment + variables regardless whether setlocale has been called or not. POSIX + says: + "For C-language programs, the POSIX locale shall be the + default locale when the setlocale() function is not called." + But we assume that all programs that use internationalized APIs call + setlocale (LC_ALL, ""). */ + locname = gl_locale_name_environ (category, categoryname); #endif + /* Convert the locale name from the format returned by setlocale() or found + in the environment variables to the XPG syntax. */ +#if defined WINDOWS_NATIVE + { + /* Convert locale name to LCID. We don't want to use + LocaleNameToLCID because (a) it is only available since Vista, + and (b) it doesn't accept locale names returned by 'setlocale'. */ + LCID lcid = get_lcid (locname); + + if (lcid > 0) + return gl_locale_name_from_win32_LCID (lcid); + } +#endif + return locname; + } } const char * @@ -2907,7 +3386,7 @@ codeset. */ # if HAVE_CFLOCALECOPYCURRENT || HAVE_CFPREFERENCESCOPYAPPVALUE - /* Mac OS X 10.2 or newer */ + /* Mac OS X 10.4 or newer */ { /* Cache the locale name, since CoreFoundation calls are expensive. */ static const char *cached_localename; @@ -2915,29 +3394,28 @@ if (cached_localename == NULL) { char namebuf[256]; -# if HAVE_CFLOCALECOPYCURRENT /* Mac OS X 10.3 or newer */ +# if HAVE_CFLOCALECOPYCURRENT /* Mac OS X 10.5 or newer */ CFLocaleRef locale = CFLocaleCopyCurrent (); CFStringRef name = CFLocaleGetIdentifier (locale); - - if (CFStringGetCString (name, namebuf, sizeof (namebuf), - kCFStringEncodingASCII)) - { - gl_locale_name_canonicalize (namebuf); - cached_localename = strdup (namebuf); - } - CFRelease (locale); -# elif HAVE_CFPREFERENCESCOPYAPPVALUE /* Mac OS X 10.2 or newer */ +# elif HAVE_CFPREFERENCESCOPYAPPVALUE /* Mac OS X 10.4 or newer */ CFTypeRef value = CFPreferencesCopyAppValue (CFSTR ("AppleLocale"), kCFPreferencesCurrentApplication); - if (value != NULL - && CFGetTypeID (value) == CFStringGetTypeID () - && CFStringGetCString ((CFStringRef)value, - namebuf, sizeof (namebuf), - kCFStringEncodingASCII)) + if (value != NULL && CFGetTypeID (value) == CFStringGetTypeID ()) { - gl_locale_name_canonicalize (namebuf); - cached_localename = strdup (namebuf); + CFStringRef name = (CFStringRef)value; +# endif + + if (CFStringGetCString (name, namebuf, sizeof (namebuf), + kCFStringEncodingASCII)) + { + gl_locale_name_canonicalize (namebuf); + cached_localename = strdup (namebuf); + } + +# if HAVE_CFLOCALECOPYCURRENT /* Mac OS X 10.5 or newer */ + CFRelease (locale); +# elif HAVE_CFPREFERENCESCOPYAPPVALUE /* Mac OS X 10.4 or newer */ } # endif if (cached_localename == NULL) diff -Nru grep-3.1/gnulib-tests/localename.h grep-3.3/gnulib-tests/localename.h --- grep-3.1/gnulib-tests/localename.h 2017-01-01 11:25:46.000000000 +0000 +++ grep-3.3/gnulib-tests/localename.h 2018-06-24 23:17:59.000000000 +0000 @@ -1,5 +1,5 @@ /* Determine name of the currently selected locale. - Copyright (C) 2007, 2009-2017 Free Software Foundation, Inc. + Copyright (C) 2007, 2009-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ #ifndef _GL_LOCALENAME_H #define _GL_LOCALENAME_H @@ -87,7 +87,7 @@ The result must not be freed; it is statically allocated. */ extern const char * gl_locale_name_default (void) #if !(HAVE_CFLOCALECOPYCURRENT || HAVE_CFPREFERENCESCOPYAPPVALUE \ - || defined _WIN32 || defined __WIN32__ || defined __CYGWIN__) + || defined _WIN32 || defined __CYGWIN__) _GL_ATTRIBUTE_CONST #endif ; diff -Nru grep-3.1/gnulib-tests/localename-table.c grep-3.3/gnulib-tests/localename-table.c --- grep-3.1/gnulib-tests/localename-table.c 1970-01-01 00:00:00.000000000 +0000 +++ grep-3.3/gnulib-tests/localename-table.c 2018-12-21 03:32:16.000000000 +0000 @@ -0,0 +1,48 @@ +/* Table that maps a locale object to the names of the locale categories. + Copyright (C) 2018 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 , 2018. */ + +#include + +#if HAVE_WORKING_USELOCALE && HAVE_NAMELESS_LOCALES + +/* Specification. */ +#include "localename-table.h" + +#include + +/* A hash function for pointers. */ +size_t _GL_ATTRIBUTE_CONST +locale_hash_function (locale_t x) +{ + uintptr_t p = (uintptr_t) x; + size_t h = ((p % 4177) << 12) + ((p % 79) << 6) + (p % 61); + return h; +} + +struct locale_hash_node * locale_hash_table[LOCALE_HASH_TABLE_SIZE] + /* = { NULL, ..., NULL } */; + +gl_rwlock_define_initialized(, locale_lock) + +#else + +/* This declaration is solely to ensure that after preprocessing + this file is never empty. */ +typedef int dummy; + +#endif diff -Nru grep-3.1/gnulib-tests/localename-table.h grep-3.3/gnulib-tests/localename-table.h --- grep-3.1/gnulib-tests/localename-table.h 1970-01-01 00:00:00.000000000 +0000 +++ grep-3.3/gnulib-tests/localename-table.h 2018-12-21 03:32:16.000000000 +0000 @@ -0,0 +1,73 @@ +/* Table that maps a locale object to the names of the locale categories. + Copyright (C) 2018 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 , 2018. */ + +#if HAVE_WORKING_USELOCALE && HAVE_NAMELESS_LOCALES + +# include +# include + +# ifdef IN_LIBINTL +# include "lock.h" +# else +# include "glthread/lock.h" +# endif + +struct locale_categories_names + { + /* Locale category -> name (allocated with indefinite extent). */ + const char *category_name[6]; + }; + +/* A hash table of fixed size. Multiple threads can access it read-only + simultaneously, but only one thread can insert into it or remove from it + at the same time. + This hash table has global scope, so that when an application uses both + GNU libintl and gnulib, the application sees only one hash table. (When + linking statically with libintl, the fact that localename-table.c is a + separate compilation unit resolves the duplicate symbol conflict. When + linking with libintl as a shared library, we rely on ELF and the symbol + conflict resolution implemented in the ELF dynamic loader here.) + Both the libintl overrides and the gnulib overrides of the functions + newlocale, duplocale, freelocale see the same hash table (and the same lock). + For this reason, the internal layout of the hash table and the hash function + MUST NEVER CHANGE. If you need to change the internal layout or the hash + function, introduce versioning by appending a version suffix to the symbols + at the linker level. */ +# define locale_hash_function libintl_locale_hash_function +# define locale_hash_table libintl_locale_hash_table +# define locale_lock libintl_locale_lock + +extern size_t _GL_ATTRIBUTE_CONST locale_hash_function (locale_t x); + +/* A node in a hash bucket collision list. */ +struct locale_hash_node + { + struct locale_hash_node *next; + locale_t locale; + struct locale_categories_names names; + }; + +# define LOCALE_HASH_TABLE_SIZE 101 +extern struct locale_hash_node * locale_hash_table[LOCALE_HASH_TABLE_SIZE]; + +/* This lock protects the locale_hash_table against multiple simultaneous + accesses (except that multiple simultaneous read accesses are allowed). */ + +gl_rwlock_define(extern, locale_lock) + +#endif diff -Nru grep-3.1/gnulib-tests/localtime-buffer.c grep-3.3/gnulib-tests/localtime-buffer.c --- grep-3.1/gnulib-tests/localtime-buffer.c 1970-01-01 00:00:00.000000000 +0000 +++ grep-3.3/gnulib-tests/localtime-buffer.c 2018-12-21 02:52:36.000000000 +0000 @@ -0,0 +1,60 @@ +/* Provide access to the last buffer returned by localtime() or gmtime(). + + Copyright (C) 2001-2003, 2005-2007, 2009-2018 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) +#undef localtime +{ + 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) +#undef gmtime +{ + struct tm *tm = gmtime (timep); + + if (localtime_buffer_addr == &tm_zero_buffer) + localtime_buffer_addr = tm; + + return tm; +} + +#endif diff -Nru grep-3.1/gnulib-tests/localtime-buffer.h grep-3.3/gnulib-tests/localtime-buffer.h --- grep-3.1/gnulib-tests/localtime-buffer.h 1970-01-01 00:00:00.000000000 +0000 +++ grep-3.3/gnulib-tests/localtime-buffer.h 2018-01-07 00:07:59.000000000 +0000 @@ -0,0 +1,27 @@ +/* Provide access to the last buffer returned by localtime() or gmtime(). + + Copyright (C) 2001-2003, 2005-2007, 2009-2018 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 -Nru grep-3.1/gnulib-tests/macros.h grep-3.3/gnulib-tests/macros.h --- grep-3.1/gnulib-tests/macros.h 2017-05-21 00:31:28.000000000 +0000 +++ grep-3.3/gnulib-tests/macros.h 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ /* Common macros used by gnulib tests. - Copyright (C) 2006-2017 Free Software Foundation, Inc. + Copyright (C) 2006-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ /* This file contains macros that are used by many gnulib tests. diff -Nru grep-3.1/gnulib-tests/Makefile.in grep-3.3/gnulib-tests/Makefile.in --- grep-3.1/gnulib-tests/Makefile.in 2017-07-02 20:12:56.000000000 +0000 +++ grep-3.3/gnulib-tests/Makefile.in 2018-12-21 03:59:31.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.99a from Makefile.am. +# Makefile.in generated by automake 1.16a from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2015 Free Software Foundation, Inc. +# Copyright (C) 1994-2018 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -14,7 +14,7 @@ @SET_MAKE@ -# Copyright (C) 2002-2017 Free Software Foundation, Inc. +# Copyright (C) 2002-2018 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 @@ -27,7 +27,7 @@ # 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 . +# 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 @@ -111,13 +111,14 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ -TESTS = test-alignof$(EXEEXT) test-alloca-opt$(EXEEXT) \ - test-argmatch$(EXEEXT) test-binary-io.sh \ +TESTS = test-accept$(EXEEXT) test-alignof$(EXEEXT) \ + test-alloca-opt$(EXEEXT) test-argmatch$(EXEEXT) \ + test-arpa_inet$(EXEEXT) test-binary-io.sh test-bind$(EXEEXT) \ test-bitrotate$(EXEEXT) test-btowc1.sh test-btowc2.sh \ - test-c-ctype$(EXEEXT) test-c-strcase.sh test-chdir$(EXEEXT) \ - test-cloexec$(EXEEXT) test-close$(EXEEXT) test-ctype$(EXEEXT) \ - dfa-invalid-char-class.sh dfa-match.sh \ - test-dirent-safer$(EXEEXT) test-dirent$(EXEEXT) \ + test-c-ctype$(EXEEXT) test-c-stack.sh test-c-stack2.sh \ + test-c-strcase.sh test-chdir$(EXEEXT) test-cloexec$(EXEEXT) \ + test-close$(EXEEXT) test-connect$(EXEEXT) test-ctype$(EXEEXT) \ + dfa-invalid-char-class.sh dfa-match.sh test-dirent$(EXEEXT) \ test-dup$(EXEEXT) test-dup2$(EXEEXT) test-environ$(EXEEXT) \ test-errno$(EXEEXT) test-exclude1.sh test-exclude2.sh \ test-exclude3.sh test-exclude4.sh test-exclude5.sh \ @@ -125,40 +126,53 @@ test-fchdir$(EXEEXT) test-fcntl-h$(EXEEXT) \ test-fcntl-safer$(EXEEXT) test-fcntl$(EXEEXT) \ test-fdopen$(EXEEXT) test-fdopendir$(EXEEXT) \ - test-fgetc$(EXEEXT) test-float$(EXEEXT) test-fnmatch$(EXEEXT) \ - test-fpending.sh test-fputc$(EXEEXT) test-fread$(EXEEXT) \ - test-fstat$(EXEEXT) test-fstatat$(EXEEXT) test-fwrite$(EXEEXT) \ + test-fgetc$(EXEEXT) test-float$(EXEEXT) \ + test-fnmatch-h$(EXEEXT) test-fnmatch$(EXEEXT) test-fpending.sh \ + test-fputc$(EXEEXT) test-fread$(EXEEXT) test-fstat$(EXEEXT) \ + test-fstatat$(EXEEXT) test-ftruncate.sh test-fwrite$(EXEEXT) \ test-getcwd-lgpl$(EXEEXT) test-getdtablesize$(EXEEXT) \ test-getopt-gnu$(EXEEXT) test-getopt-posix$(EXEEXT) \ - test-getprogname$(EXEEXT) test-hash$(EXEEXT) \ - test-i-ring$(EXEEXT) test-iconv-h$(EXEEXT) test-iconv$(EXEEXT) \ - test-ignore-value$(EXEEXT) test-intprops$(EXEEXT) \ + test-getprogname$(EXEEXT) test-gettimeofday$(EXEEXT) \ + test-hash$(EXEEXT) test-i-ring$(EXEEXT) test-iconv-h$(EXEEXT) \ + test-iconv$(EXEEXT) test-ignore-value$(EXEEXT) \ + test-inet_pton$(EXEEXT) test-intprops$(EXEEXT) \ test-inttostr$(EXEEXT) test-inttypes$(EXEEXT) \ - test-isatty$(EXEEXT) test-isblank$(EXEEXT) \ + test-ioctl$(EXEEXT) test-isatty$(EXEEXT) test-isblank$(EXEEXT) \ test-iswblank$(EXEEXT) test-langinfo$(EXEEXT) \ - test-limits-h$(EXEEXT) test-locale$(EXEEXT) \ - test-localeconv$(EXEEXT) test-localename$(EXEEXT) \ - test-lseek.sh test-lstat$(EXEEXT) test-malloc-gnu$(EXEEXT) \ - test-malloca$(EXEEXT) test-mbscasecmp.sh test-mbsinit.sh \ - test-mbsrtowcs1.sh test-mbsrtowcs2.sh test-mbsrtowcs3.sh \ - test-mbsrtowcs4.sh test-mbsstr1$(EXEEXT) test-mbsstr2.sh \ - test-mbsstr3.sh test-memchr$(EXEEXT) test-memchr2$(EXEEXT) \ - test-memrchr$(EXEEXT) test-nl_langinfo.sh test-open$(EXEEXT) \ - test-openat-safer$(EXEEXT) test-openat$(EXEEXT) \ - test-pathmax$(EXEEXT) test-pipe$(EXEEXT) \ - test-quotearg-simple$(EXEEXT) test-read$(EXEEXT) \ - test-realloc-gnu$(EXEEXT) test-regex$(EXEEXT) \ - test-setenv$(EXEEXT) test-setlocale1.sh test-setlocale2.sh \ - test-snprintf$(EXEEXT) test-stat$(EXEEXT) \ + test-limits-h$(EXEEXT) test-listen$(EXEEXT) \ + test-locale$(EXEEXT) test-localeconv$(EXEEXT) \ + test-localename$(EXEEXT) test-lseek.sh test-lstat$(EXEEXT) \ + test-malloc-gnu$(EXEEXT) test-malloca$(EXEEXT) \ + test-mbscasecmp.sh test-mbsinit.sh test-mbsrtowcs1.sh \ + test-mbsrtowcs2.sh test-mbsrtowcs3.sh test-mbsrtowcs4.sh \ + test-mbsstr1$(EXEEXT) test-mbsstr2.sh test-mbsstr3.sh \ + test-memchr$(EXEEXT) test-memchr2$(EXEEXT) \ + test-memrchr$(EXEEXT) test-nanosleep$(EXEEXT) \ + test-netinet_in$(EXEEXT) test-nl_langinfo.sh \ + test-open$(EXEEXT) test-openat-safer$(EXEEXT) \ + test-openat$(EXEEXT) test-pathmax$(EXEEXT) test-perror.sh \ + test-perror2$(EXEEXT) test-pipe$(EXEEXT) \ + test-quotearg-simple$(EXEEXT) test-raise$(EXEEXT) \ + test-read$(EXEEXT) test-realloc-gnu$(EXEEXT) \ + test-regex$(EXEEXT) test-select$(EXEEXT) test-select-in.sh \ + test-select-out.sh test-setenv$(EXEEXT) test-setlocale1.sh \ + test-setlocale2.sh test-setsockopt$(EXEEXT) \ + test-sigaction$(EXEEXT) test-signal-h$(EXEEXT) \ + test-sigprocmask$(EXEEXT) test-sleep$(EXEEXT) \ + test-snprintf$(EXEEXT) test-sockets$(EXEEXT) \ + test-stat$(EXEEXT) test-stat-time$(EXEEXT) \ test-stdalign$(EXEEXT) test-stdbool$(EXEEXT) \ test-stddef$(EXEEXT) test-stdint$(EXEEXT) test-stdio$(EXEEXT) \ test-stdlib$(EXEEXT) test-strerror$(EXEEXT) \ - test-striconv$(EXEEXT) test-string$(EXEEXT) \ - test-strnlen$(EXEEXT) test-strstr$(EXEEXT) \ - test-strtoimax$(EXEEXT) test-strtoll$(EXEEXT) \ - test-strtoull$(EXEEXT) test-strtoumax$(EXEEXT) \ - test-symlink$(EXEEXT) test-sys_stat$(EXEEXT) \ - test-sys_types$(EXEEXT) test-init.sh test-time$(EXEEXT) \ + test-strerror_r$(EXEEXT) test-striconv$(EXEEXT) \ + test-string$(EXEEXT) test-strnlen$(EXEEXT) \ + test-strstr$(EXEEXT) test-strtoimax$(EXEEXT) \ + test-strtoll$(EXEEXT) test-strtoull$(EXEEXT) \ + test-strtoumax$(EXEEXT) test-symlink$(EXEEXT) \ + test-sys_ioctl$(EXEEXT) test-sys_select$(EXEEXT) \ + test-sys_socket$(EXEEXT) test-sys_stat$(EXEEXT) \ + test-sys_time$(EXEEXT) test-sys_types$(EXEEXT) \ + test-sys_uio$(EXEEXT) test-init.sh test-time$(EXEEXT) \ test-dup-safer$(EXEEXT) test-unistd$(EXEEXT) \ test-u8-mbtoucr$(EXEEXT) test-u8-uctomb$(EXEEXT) \ test-uc_width$(EXEEXT) uniwidth/test-uc_width2.sh \ @@ -171,80 +185,97 @@ test-wctype-h$(EXEEXT) test-wcwidth$(EXEEXT) \ test-xalloc-die.sh test-xstrtoimax.sh test-xstrtol.sh XFAIL_TESTS = -noinst_PROGRAMS = -check_PROGRAMS = test-alignof$(EXEEXT) test-alloca-opt$(EXEEXT) \ - test-argmatch$(EXEEXT) test-binary-io$(EXEEXT) \ - test-bitrotate$(EXEEXT) test-btowc$(EXEEXT) \ - test-c-ctype$(EXEEXT) test-c-strcasecmp$(EXEEXT) \ - test-c-strncasecmp$(EXEEXT) test-chdir$(EXEEXT) \ - test-cloexec$(EXEEXT) test-close$(EXEEXT) test-ctype$(EXEEXT) \ - dfa-match-aux$(EXEEXT) test-dirent-safer$(EXEEXT) \ - test-dirent$(EXEEXT) test-dup$(EXEEXT) test-dup2$(EXEEXT) \ - test-environ$(EXEEXT) test-errno$(EXEEXT) \ +noinst_PROGRAMS = test-localcharset$(EXEEXT) +check_PROGRAMS = test-accept$(EXEEXT) test-alignof$(EXEEXT) \ + test-alloca-opt$(EXEEXT) test-argmatch$(EXEEXT) \ + test-arpa_inet$(EXEEXT) test-binary-io$(EXEEXT) \ + test-bind$(EXEEXT) test-bitrotate$(EXEEXT) test-btowc$(EXEEXT) \ + test-c-ctype$(EXEEXT) test-c-stack$(EXEEXT) \ + test-c-strcasecmp$(EXEEXT) test-c-strncasecmp$(EXEEXT) \ + test-chdir$(EXEEXT) test-cloexec$(EXEEXT) test-close$(EXEEXT) \ + test-connect$(EXEEXT) test-ctype$(EXEEXT) \ + dfa-match-aux$(EXEEXT) test-dirent$(EXEEXT) test-dup$(EXEEXT) \ + test-dup2$(EXEEXT) test-environ$(EXEEXT) test-errno$(EXEEXT) \ test-exclude$(EXEEXT) test-fchdir$(EXEEXT) \ test-fcntl-h$(EXEEXT) test-fcntl-safer$(EXEEXT) \ test-fcntl$(EXEEXT) test-fdopen$(EXEEXT) \ test-fdopendir$(EXEEXT) test-fgetc$(EXEEXT) \ - test-float$(EXEEXT) test-fnmatch$(EXEEXT) \ - test-fpending$(EXEEXT) test-fputc$(EXEEXT) test-fread$(EXEEXT) \ - test-fstat$(EXEEXT) test-fstatat$(EXEEXT) test-fwrite$(EXEEXT) \ - test-getcwd-lgpl$(EXEEXT) test-getdtablesize$(EXEEXT) \ - test-getopt-gnu$(EXEEXT) test-getopt-posix$(EXEEXT) \ - test-getprogname$(EXEEXT) test-hash$(EXEEXT) \ + test-float$(EXEEXT) test-fnmatch-h$(EXEEXT) \ + test-fnmatch$(EXEEXT) test-fpending$(EXEEXT) \ + test-fputc$(EXEEXT) test-fread$(EXEEXT) test-fstat$(EXEEXT) \ + test-fstatat$(EXEEXT) test-ftruncate$(EXEEXT) \ + test-fwrite$(EXEEXT) test-getcwd-lgpl$(EXEEXT) \ + test-getdtablesize$(EXEEXT) test-getopt-gnu$(EXEEXT) \ + test-getopt-posix$(EXEEXT) test-getprogname$(EXEEXT) \ + test-gettimeofday$(EXEEXT) test-hash$(EXEEXT) \ test-i-ring$(EXEEXT) test-iconv-h$(EXEEXT) test-iconv$(EXEEXT) \ - test-ignore-value$(EXEEXT) test-intprops$(EXEEXT) \ - test-inttostr$(EXEEXT) test-inttypes$(EXEEXT) \ + test-ignore-value$(EXEEXT) test-inet_pton$(EXEEXT) \ + test-intprops$(EXEEXT) test-inttostr$(EXEEXT) \ + test-inttypes$(EXEEXT) test-ioctl$(EXEEXT) \ test-isatty$(EXEEXT) test-isblank$(EXEEXT) \ test-iswblank$(EXEEXT) test-langinfo$(EXEEXT) \ - test-limits-h$(EXEEXT) test-locale$(EXEEXT) \ - test-localeconv$(EXEEXT) test-localename$(EXEEXT) \ - test-lseek$(EXEEXT) test-lstat$(EXEEXT) \ - test-malloc-gnu$(EXEEXT) test-malloca$(EXEEXT) \ - test-mbscasecmp$(EXEEXT) test-mbsinit$(EXEEXT) \ - test-mbsrtowcs$(EXEEXT) test-mbsstr1$(EXEEXT) \ - test-mbsstr2$(EXEEXT) test-mbsstr3$(EXEEXT) \ - test-memchr$(EXEEXT) test-memchr2$(EXEEXT) \ - test-memrchr$(EXEEXT) test-nl_langinfo$(EXEEXT) \ - test-open$(EXEEXT) test-openat-safer$(EXEEXT) \ - test-openat$(EXEEXT) test-pathmax$(EXEEXT) test-pipe$(EXEEXT) \ - test-quotearg-simple$(EXEEXT) test-read$(EXEEXT) \ - test-realloc-gnu$(EXEEXT) test-regex$(EXEEXT) \ + test-limits-h$(EXEEXT) test-listen$(EXEEXT) \ + test-locale$(EXEEXT) test-localeconv$(EXEEXT) \ + test-localename$(EXEEXT) test-lseek$(EXEEXT) \ + test-lstat$(EXEEXT) test-malloc-gnu$(EXEEXT) \ + test-malloca$(EXEEXT) test-mbscasecmp$(EXEEXT) \ + test-mbsinit$(EXEEXT) test-mbsrtowcs$(EXEEXT) \ + test-mbsstr1$(EXEEXT) test-mbsstr2$(EXEEXT) \ + test-mbsstr3$(EXEEXT) test-memchr$(EXEEXT) \ + test-memchr2$(EXEEXT) test-memrchr$(EXEEXT) \ + test-nanosleep$(EXEEXT) test-netinet_in$(EXEEXT) \ + test-nl_langinfo$(EXEEXT) test-open$(EXEEXT) \ + test-openat-safer$(EXEEXT) test-openat$(EXEEXT) \ + test-pathmax$(EXEEXT) test-perror$(EXEEXT) \ + test-perror2$(EXEEXT) test-pipe$(EXEEXT) \ + test-quotearg-simple$(EXEEXT) test-raise$(EXEEXT) \ + test-read$(EXEEXT) test-realloc-gnu$(EXEEXT) \ + test-regex$(EXEEXT) test-select$(EXEEXT) \ + test-select-fd$(EXEEXT) test-select-stdin$(EXEEXT) \ test-setenv$(EXEEXT) test-setlocale1$(EXEEXT) \ - test-setlocale2$(EXEEXT) test-snprintf$(EXEEXT) \ - test-stat$(EXEEXT) test-stdalign$(EXEEXT) \ - test-stdbool$(EXEEXT) test-stddef$(EXEEXT) \ - test-stdint$(EXEEXT) test-stdio$(EXEEXT) test-stdlib$(EXEEXT) \ - test-strerror$(EXEEXT) test-striconv$(EXEEXT) \ + test-setlocale2$(EXEEXT) test-setsockopt$(EXEEXT) \ + test-sigaction$(EXEEXT) test-signal-h$(EXEEXT) \ + test-sigprocmask$(EXEEXT) test-sleep$(EXEEXT) \ + test-snprintf$(EXEEXT) test-sockets$(EXEEXT) \ + test-stat$(EXEEXT) test-stat-time$(EXEEXT) \ + test-stdalign$(EXEEXT) test-stdbool$(EXEEXT) \ + test-stddef$(EXEEXT) test-stdint$(EXEEXT) test-stdio$(EXEEXT) \ + test-stdlib$(EXEEXT) test-strerror$(EXEEXT) \ + test-strerror_r$(EXEEXT) test-striconv$(EXEEXT) \ test-string$(EXEEXT) test-strnlen$(EXEEXT) \ test-strstr$(EXEEXT) test-strtoimax$(EXEEXT) \ test-strtoll$(EXEEXT) test-strtoull$(EXEEXT) \ test-strtoumax$(EXEEXT) test-symlink$(EXEEXT) \ - test-sys_stat$(EXEEXT) test-sys_types$(EXEEXT) \ - test-time$(EXEEXT) test-dup-safer$(EXEEXT) \ - test-unistd$(EXEEXT) test-u8-mbtoucr$(EXEEXT) \ - test-u8-uctomb$(EXEEXT) test-uc_width$(EXEEXT) \ - test-uc_width2$(EXEEXT) test-unsetenv$(EXEEXT) \ - test-vasnprintf$(EXEEXT) test-verify$(EXEEXT) \ - test-version-etc$(EXEEXT) test-wchar$(EXEEXT) \ - test-wcrtomb$(EXEEXT) test-wcrtomb-w32$(EXEEXT) \ - test-wctype-h$(EXEEXT) test-wcwidth$(EXEEXT) \ - test-xalloc-die$(EXEEXT) test-xstrtoimax$(EXEEXT) \ - test-xstrtol$(EXEEXT) test-xstrtoul$(EXEEXT) + test-sys_ioctl$(EXEEXT) test-sys_select$(EXEEXT) \ + test-sys_socket$(EXEEXT) test-sys_stat$(EXEEXT) \ + test-sys_time$(EXEEXT) test-sys_types$(EXEEXT) \ + test-sys_uio$(EXEEXT) test-time$(EXEEXT) \ + test-dup-safer$(EXEEXT) test-unistd$(EXEEXT) \ + test-u8-mbtoucr$(EXEEXT) test-u8-uctomb$(EXEEXT) \ + test-uc_width$(EXEEXT) test-uc_width2$(EXEEXT) \ + test-unsetenv$(EXEEXT) test-vasnprintf$(EXEEXT) \ + test-verify$(EXEEXT) test-version-etc$(EXEEXT) \ + test-wchar$(EXEEXT) test-wcrtomb$(EXEEXT) \ + test-wcrtomb-w32$(EXEEXT) test-wctype-h$(EXEEXT) \ + test-wcwidth$(EXEEXT) test-xalloc-die$(EXEEXT) \ + test-xstrtoimax$(EXEEXT) test-xstrtol$(EXEEXT) \ + test-xstrtoul$(EXEEXT) EXTRA_PROGRAMS = test-verify-try$(EXEEXT) subdir = gnulib-tests ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \ + $(top_srcdir)/m4/__inline.m4 \ $(top_srcdir)/m4/absolute-header.m4 $(top_srcdir)/m4/alloca.m4 \ - $(top_srcdir)/m4/assert.m4 $(top_srcdir)/m4/btowc.m4 \ - $(top_srcdir)/m4/builtin-expect.m4 \ - $(top_srcdir)/m4/chdir-long.m4 \ + $(top_srcdir)/m4/arpa_inet_h.m4 $(top_srcdir)/m4/assert.m4 \ + $(top_srcdir)/m4/btowc.m4 $(top_srcdir)/m4/builtin-expect.m4 \ + $(top_srcdir)/m4/c-stack.m4 $(top_srcdir)/m4/chdir-long.m4 \ $(top_srcdir)/m4/close-stream.m4 $(top_srcdir)/m4/close.m4 \ $(top_srcdir)/m4/closedir.m4 $(top_srcdir)/m4/closeout.m4 \ $(top_srcdir)/m4/codeset.m4 $(top_srcdir)/m4/configmake.m4 \ $(top_srcdir)/m4/ctype.m4 $(top_srcdir)/m4/cycle-check.m4 \ $(top_srcdir)/m4/d-ino.m4 $(top_srcdir)/m4/d-type.m4 \ - $(top_srcdir)/m4/dirent-safer.m4 $(top_srcdir)/m4/dirent_h.m4 \ - $(top_srcdir)/m4/dirfd.m4 $(top_srcdir)/m4/dirname.m4 \ + $(top_srcdir)/m4/dirent_h.m4 $(top_srcdir)/m4/dirfd.m4 \ + $(top_srcdir)/m4/dirname.m4 \ $(top_srcdir)/m4/double-slash-root.m4 $(top_srcdir)/m4/dup.m4 \ $(top_srcdir)/m4/dup2.m4 $(top_srcdir)/m4/eealloc.m4 \ $(top_srcdir)/m4/environ.m4 $(top_srcdir)/m4/errno_h.m4 \ @@ -256,32 +287,38 @@ $(top_srcdir)/m4/fdopen.m4 $(top_srcdir)/m4/fdopendir.m4 \ $(top_srcdir)/m4/filenamecat.m4 $(top_srcdir)/m4/flexmember.m4 \ $(top_srcdir)/m4/float_h.m4 $(top_srcdir)/m4/fnmatch.m4 \ - $(top_srcdir)/m4/fpending.m4 $(top_srcdir)/m4/fpieee.m4 \ - $(top_srcdir)/m4/fstat.m4 $(top_srcdir)/m4/fstatat.m4 \ + $(top_srcdir)/m4/fnmatch_h.m4 $(top_srcdir)/m4/fpending.m4 \ + $(top_srcdir)/m4/fpieee.m4 $(top_srcdir)/m4/fstat.m4 \ + $(top_srcdir)/m4/fstatat.m4 $(top_srcdir)/m4/ftruncate.m4 \ $(top_srcdir)/m4/fts.m4 $(top_srcdir)/m4/getcwd.m4 \ $(top_srcdir)/m4/getdtablesize.m4 $(top_srcdir)/m4/getopt.m4 \ $(top_srcdir)/m4/getpagesize.m4 \ $(top_srcdir)/m4/getprogname.m4 $(top_srcdir)/m4/gettext.m4 \ - $(top_srcdir)/m4/glibc21.m4 $(top_srcdir)/m4/gnulib-common.m4 \ + $(top_srcdir)/m4/gettimeofday.m4 $(top_srcdir)/m4/glibc21.m4 \ + $(top_srcdir)/m4/gnulib-common.m4 \ $(top_srcdir)/m4/gnulib-comp.m4 \ - $(top_srcdir)/m4/hard-locale.m4 $(top_srcdir)/m4/i-ring.m4 \ + $(top_srcdir)/m4/host-cpu-c-abi.m4 $(top_srcdir)/m4/i-ring.m4 \ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/iconv_h.m4 \ $(top_srcdir)/m4/iconv_open.m4 \ - $(top_srcdir)/m4/include_next.m4 $(top_srcdir)/m4/inline.m4 \ + $(top_srcdir)/m4/include_next.m4 $(top_srcdir)/m4/inet_pton.m4 \ + $(top_srcdir)/m4/inline.m4 \ + $(top_srcdir)/m4/intl-thread-locale.m4 \ $(top_srcdir)/m4/intlmacosx.m4 $(top_srcdir)/m4/intmax_t.m4 \ $(top_srcdir)/m4/inttostr.m4 $(top_srcdir)/m4/inttypes-pri.m4 \ $(top_srcdir)/m4/inttypes.m4 $(top_srcdir)/m4/inttypes_h.m4 \ - $(top_srcdir)/m4/isatty.m4 $(top_srcdir)/m4/isblank.m4 \ - $(top_srcdir)/m4/iswblank.m4 $(top_srcdir)/m4/iswctype.m4 \ - $(top_srcdir)/m4/langinfo_h.m4 $(top_srcdir)/m4/largefile.m4 \ - $(top_srcdir)/m4/lcmessage.m4 $(top_srcdir)/m4/lib-ld.m4 \ - $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ + $(top_srcdir)/m4/ioctl.m4 $(top_srcdir)/m4/isatty.m4 \ + $(top_srcdir)/m4/isblank.m4 $(top_srcdir)/m4/iswblank.m4 \ + $(top_srcdir)/m4/iswctype.m4 $(top_srcdir)/m4/langinfo_h.m4 \ + $(top_srcdir)/m4/largefile.m4 $(top_srcdir)/m4/lcmessage.m4 \ + $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ + $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libsigsegv.m4 \ $(top_srcdir)/m4/libunistring-base.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-tr.m4 $(top_srcdir)/m4/locale-zh.m4 \ $(top_srcdir)/m4/locale_h.m4 $(top_srcdir)/m4/localeconv.m4 \ - $(top_srcdir)/m4/localename.m4 $(top_srcdir)/m4/lock.m4 \ + $(top_srcdir)/m4/localename.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/manywarnings.m4 \ @@ -294,35 +331,46 @@ $(top_srcdir)/m4/minmax.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/nanosleep.m4 $(top_srcdir)/m4/netinet_in_h.m4 \ $(top_srcdir)/m4/nl_langinfo.m4 $(top_srcdir)/m4/nls.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/off_t.m4 $(top_srcdir)/m4/open-cloexec.m4 \ $(top_srcdir)/m4/open.m4 $(top_srcdir)/m4/openat.m4 \ $(top_srcdir)/m4/opendir.m4 $(top_srcdir)/m4/pathmax.m4 \ $(top_srcdir)/m4/pcre.m4 $(top_srcdir)/m4/perl.m4 \ - $(top_srcdir)/m4/pipe.m4 $(top_srcdir)/m4/pkg.m4 \ - $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/printf.m4 \ - $(top_srcdir)/m4/progtest.m4 \ + $(top_srcdir)/m4/perror.m4 $(top_srcdir)/m4/pipe.m4 \ + $(top_srcdir)/m4/pkg.m4 $(top_srcdir)/m4/po.m4 \ + $(top_srcdir)/m4/printf.m4 $(top_srcdir)/m4/progtest.m4 \ $(top_srcdir)/m4/pthread_rwlock_rdlock.m4 \ $(top_srcdir)/m4/putenv.m4 $(top_srcdir)/m4/quote.m4 \ - $(top_srcdir)/m4/quotearg.m4 $(top_srcdir)/m4/read.m4 \ - $(top_srcdir)/m4/readdir.m4 $(top_srcdir)/m4/realloc.m4 \ - $(top_srcdir)/m4/regex.m4 $(top_srcdir)/m4/safe-read.m4 \ - $(top_srcdir)/m4/save-cwd.m4 $(top_srcdir)/m4/setenv.m4 \ - $(top_srcdir)/m4/setlocale.m4 $(top_srcdir)/m4/size_max.m4 \ - $(top_srcdir)/m4/snprintf.m4 $(top_srcdir)/m4/ssize_t.m4 \ - $(top_srcdir)/m4/stat.m4 $(top_srcdir)/m4/std-gnu11.m4 \ - $(top_srcdir)/m4/stdalign.m4 $(top_srcdir)/m4/stdarg.m4 \ - $(top_srcdir)/m4/stdbool.m4 $(top_srcdir)/m4/stddef_h.m4 \ - $(top_srcdir)/m4/stdint.m4 $(top_srcdir)/m4/stdint_h.m4 \ - $(top_srcdir)/m4/stdio_h.m4 $(top_srcdir)/m4/stdlib_h.m4 \ - $(top_srcdir)/m4/stpcpy.m4 $(top_srcdir)/m4/strdup.m4 \ - $(top_srcdir)/m4/strerror.m4 $(top_srcdir)/m4/string_h.m4 \ + $(top_srcdir)/m4/quotearg.m4 $(top_srcdir)/m4/raise.m4 \ + $(top_srcdir)/m4/read.m4 $(top_srcdir)/m4/readdir.m4 \ + $(top_srcdir)/m4/realloc.m4 $(top_srcdir)/m4/regex.m4 \ + $(top_srcdir)/m4/safe-read.m4 $(top_srcdir)/m4/save-cwd.m4 \ + $(top_srcdir)/m4/select.m4 $(top_srcdir)/m4/setenv.m4 \ + $(top_srcdir)/m4/setlocale.m4 $(top_srcdir)/m4/sigaction.m4 \ + $(top_srcdir)/m4/signal_h.m4 \ + $(top_srcdir)/m4/signalblocking.m4 \ + $(top_srcdir)/m4/size_max.m4 $(top_srcdir)/m4/sleep.m4 \ + $(top_srcdir)/m4/snprintf.m4 $(top_srcdir)/m4/socketlib.m4 \ + $(top_srcdir)/m4/sockets.m4 $(top_srcdir)/m4/socklen.m4 \ + $(top_srcdir)/m4/sockpfaf.m4 $(top_srcdir)/m4/ssize_t.m4 \ + $(top_srcdir)/m4/stat-time.m4 $(top_srcdir)/m4/stat.m4 \ + $(top_srcdir)/m4/std-gnu11.m4 $(top_srcdir)/m4/stdalign.m4 \ + $(top_srcdir)/m4/stdarg.m4 $(top_srcdir)/m4/stdbool.m4 \ + $(top_srcdir)/m4/stddef_h.m4 $(top_srcdir)/m4/stdint.m4 \ + $(top_srcdir)/m4/stdint_h.m4 $(top_srcdir)/m4/stdio_h.m4 \ + $(top_srcdir)/m4/stdlib_h.m4 $(top_srcdir)/m4/stpcpy.m4 \ + $(top_srcdir)/m4/strdup.m4 $(top_srcdir)/m4/strerror.m4 \ + $(top_srcdir)/m4/strerror_r.m4 $(top_srcdir)/m4/string_h.m4 \ $(top_srcdir)/m4/strnlen.m4 $(top_srcdir)/m4/strstr.m4 \ $(top_srcdir)/m4/strtoimax.m4 $(top_srcdir)/m4/strtoll.m4 \ $(top_srcdir)/m4/strtoull.m4 $(top_srcdir)/m4/strtoumax.m4 \ - $(top_srcdir)/m4/symlink.m4 $(top_srcdir)/m4/sys_socket_h.m4 \ - $(top_srcdir)/m4/sys_stat_h.m4 $(top_srcdir)/m4/sys_types_h.m4 \ + $(top_srcdir)/m4/symlink.m4 $(top_srcdir)/m4/sys_ioctl_h.m4 \ + $(top_srcdir)/m4/sys_select_h.m4 \ + $(top_srcdir)/m4/sys_socket_h.m4 \ + $(top_srcdir)/m4/sys_stat_h.m4 $(top_srcdir)/m4/sys_time_h.m4 \ + $(top_srcdir)/m4/sys_types_h.m4 $(top_srcdir)/m4/sys_uio_h.m4 \ $(top_srcdir)/m4/threadlib.m4 $(top_srcdir)/m4/time_h.m4 \ $(top_srcdir)/m4/unistd-safer.m4 $(top_srcdir)/m4/unistd_h.m4 \ $(top_srcdir)/m4/unlocked-io.m4 $(top_srcdir)/m4/vasnprintf.m4 \ @@ -331,9 +379,11 @@ $(top_srcdir)/m4/wchar_h.m4 $(top_srcdir)/m4/wchar_t.m4 \ $(top_srcdir)/m4/wcrtomb.m4 $(top_srcdir)/m4/wctob.m4 \ $(top_srcdir)/m4/wctomb.m4 $(top_srcdir)/m4/wctype_h.m4 \ - $(top_srcdir)/m4/wcwidth.m4 $(top_srcdir)/m4/wint_t.m4 \ - $(top_srcdir)/m4/xalloc.m4 $(top_srcdir)/m4/xsize.m4 \ - $(top_srcdir)/m4/xstrtol.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/m4/wcwidth.m4 \ + $(top_srcdir)/m4/windows-stat-inodes.m4 \ + $(top_srcdir)/m4/wint_t.m4 $(top_srcdir)/m4/xalloc.m4 \ + $(top_srcdir)/m4/xsize.m4 $(top_srcdir)/m4/xstrtol.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 +392,7 @@ CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = +PROGRAMS = $(noinst_PROGRAMS) LIBRARIES = $(noinst_LIBRARIES) AM_V_AR = $(am__v_AR_@AM_V@) am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@) @@ -349,18 +400,20 @@ am__v_AR_1 = libtests_a_AR = $(AR) $(ARFLAGS) am__DEPENDENCIES_1 = -am_libtests_a_OBJECTS = fd-safer-flag.$(OBJEXT) \ - dup-safer-flag.$(OBJEXT) hash-pjw.$(OBJEXT) \ - imaxtostr.$(OBJEXT) inttostr.$(OBJEXT) offtostr.$(OBJEXT) \ - uinttostr.$(OBJEXT) umaxtostr.$(OBJEXT) localename.$(OBJEXT) \ - xsize.$(OBJEXT) +am_libtests_a_OBJECTS = hash-pjw.$(OBJEXT) imaxtostr.$(OBJEXT) \ + inttostr.$(OBJEXT) offtostr.$(OBJEXT) uinttostr.$(OBJEXT) \ + umaxtostr.$(OBJEXT) localename.$(OBJEXT) \ + localename-table.$(OBJEXT) sockets.$(OBJEXT) \ + sys_socket.$(OBJEXT) xsize.$(OBJEXT) libtests_a_OBJECTS = $(am_libtests_a_OBJECTS) -PROGRAMS = $(noinst_PROGRAMS) dfa_match_aux_SOURCES = dfa-match-aux.c dfa_match_aux_OBJECTS = dfa-match-aux.$(OBJEXT) am__DEPENDENCIES_2 = libtests.a ../lib/libgreputils.a libtests.a \ $(am__DEPENDENCIES_1) dfa_match_aux_DEPENDENCIES = $(am__DEPENDENCIES_2) +test_accept_SOURCES = test-accept.c +test_accept_OBJECTS = test-accept.$(OBJEXT) +test_accept_DEPENDENCIES = $(am__DEPENDENCIES_2) test_alignof_SOURCES = test-alignof.c test_alignof_OBJECTS = test-alignof.$(OBJEXT) test_alignof_LDADD = $(LDADD) @@ -374,11 +427,19 @@ test_argmatch_SOURCES = test-argmatch.c test_argmatch_OBJECTS = test-argmatch.$(OBJEXT) test_argmatch_DEPENDENCIES = $(am__DEPENDENCIES_2) +test_arpa_inet_SOURCES = test-arpa_inet.c +test_arpa_inet_OBJECTS = test-arpa_inet.$(OBJEXT) +test_arpa_inet_LDADD = $(LDADD) +test_arpa_inet_DEPENDENCIES = libtests.a ../lib/libgreputils.a \ + libtests.a $(am__DEPENDENCIES_1) test_binary_io_SOURCES = test-binary-io.c test_binary_io_OBJECTS = test-binary-io.$(OBJEXT) test_binary_io_LDADD = $(LDADD) test_binary_io_DEPENDENCIES = libtests.a ../lib/libgreputils.a \ libtests.a $(am__DEPENDENCIES_1) +test_bind_SOURCES = test-bind.c +test_bind_OBJECTS = test-bind.$(OBJEXT) +test_bind_DEPENDENCIES = $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_1) test_bitrotate_SOURCES = test-bitrotate.c test_bitrotate_OBJECTS = test-bitrotate.$(OBJEXT) test_bitrotate_LDADD = $(LDADD) @@ -394,6 +455,10 @@ test_c_ctype_LDADD = $(LDADD) test_c_ctype_DEPENDENCIES = libtests.a ../lib/libgreputils.a \ libtests.a $(am__DEPENDENCIES_1) +test_c_stack_SOURCES = test-c-stack.c +test_c_stack_OBJECTS = test-c-stack.$(OBJEXT) +test_c_stack_DEPENDENCIES = $(am__DEPENDENCIES_2) \ + $(am__DEPENDENCIES_1) test_c_strcasecmp_SOURCES = test-c-strcasecmp.c test_c_strcasecmp_OBJECTS = test-c-strcasecmp.$(OBJEXT) test_c_strcasecmp_LDADD = $(LDADD) @@ -419,6 +484,10 @@ test_close_LDADD = $(LDADD) test_close_DEPENDENCIES = libtests.a ../lib/libgreputils.a libtests.a \ $(am__DEPENDENCIES_1) +test_connect_SOURCES = test-connect.c +test_connect_OBJECTS = test-connect.$(OBJEXT) +test_connect_DEPENDENCIES = $(am__DEPENDENCIES_2) \ + $(am__DEPENDENCIES_1) test_ctype_SOURCES = test-ctype.c test_ctype_OBJECTS = test-ctype.$(OBJEXT) test_ctype_LDADD = $(LDADD) @@ -429,10 +498,6 @@ test_dirent_LDADD = $(LDADD) test_dirent_DEPENDENCIES = libtests.a ../lib/libgreputils.a libtests.a \ $(am__DEPENDENCIES_1) -test_dirent_safer_SOURCES = test-dirent-safer.c -test_dirent_safer_OBJECTS = test-dirent-safer.$(OBJEXT) -test_dirent_safer_DEPENDENCIES = $(am__DEPENDENCIES_2) \ - $(am__DEPENDENCIES_1) test_dup_SOURCES = test-dup.c test_dup_OBJECTS = test-dup.$(OBJEXT) test_dup_LDADD = $(LDADD) @@ -503,6 +568,11 @@ test_fnmatch_LDADD = $(LDADD) test_fnmatch_DEPENDENCIES = libtests.a ../lib/libgreputils.a \ libtests.a $(am__DEPENDENCIES_1) +test_fnmatch_h_SOURCES = test-fnmatch-h.c +test_fnmatch_h_OBJECTS = test-fnmatch-h.$(OBJEXT) +test_fnmatch_h_LDADD = $(LDADD) +test_fnmatch_h_DEPENDENCIES = libtests.a ../lib/libgreputils.a \ + libtests.a $(am__DEPENDENCIES_1) test_fpending_SOURCES = test-fpending.c test_fpending_OBJECTS = test-fpending.$(OBJEXT) test_fpending_LDADD = $(LDADD) @@ -526,6 +596,11 @@ test_fstatat_SOURCES = test-fstatat.c test_fstatat_OBJECTS = test-fstatat.$(OBJEXT) test_fstatat_DEPENDENCIES = $(am__DEPENDENCIES_2) +test_ftruncate_SOURCES = test-ftruncate.c +test_ftruncate_OBJECTS = test-ftruncate.$(OBJEXT) +test_ftruncate_LDADD = $(LDADD) +test_ftruncate_DEPENDENCIES = libtests.a ../lib/libgreputils.a \ + libtests.a $(am__DEPENDENCIES_1) test_fwrite_SOURCES = test-fwrite.c test_fwrite_OBJECTS = test-fwrite.$(OBJEXT) test_fwrite_LDADD = $(LDADD) @@ -551,6 +626,11 @@ test_getprogname_SOURCES = test-getprogname.c test_getprogname_OBJECTS = test-getprogname.$(OBJEXT) test_getprogname_DEPENDENCIES = $(am__DEPENDENCIES_2) +test_gettimeofday_SOURCES = test-gettimeofday.c +test_gettimeofday_OBJECTS = test-gettimeofday.$(OBJEXT) +test_gettimeofday_LDADD = $(LDADD) +test_gettimeofday_DEPENDENCIES = libtests.a ../lib/libgreputils.a \ + libtests.a $(am__DEPENDENCIES_1) test_hash_SOURCES = test-hash.c test_hash_OBJECTS = test-hash.$(OBJEXT) test_hash_LDADD = $(LDADD) @@ -574,6 +654,9 @@ test_ignore_value_LDADD = $(LDADD) test_ignore_value_DEPENDENCIES = libtests.a ../lib/libgreputils.a \ libtests.a $(am__DEPENDENCIES_1) +test_inet_pton_SOURCES = test-inet_pton.c +test_inet_pton_OBJECTS = test-inet_pton.$(OBJEXT) +test_inet_pton_DEPENDENCIES = $(am__DEPENDENCIES_2) test_intprops_SOURCES = test-intprops.c test_intprops_OBJECTS = test-intprops.$(OBJEXT) test_intprops_LDADD = $(LDADD) @@ -589,6 +672,11 @@ test_inttypes_LDADD = $(LDADD) test_inttypes_DEPENDENCIES = libtests.a ../lib/libgreputils.a \ libtests.a $(am__DEPENDENCIES_1) +test_ioctl_SOURCES = test-ioctl.c +test_ioctl_OBJECTS = test-ioctl.$(OBJEXT) +test_ioctl_LDADD = $(LDADD) +test_ioctl_DEPENDENCIES = libtests.a ../lib/libgreputils.a libtests.a \ + $(am__DEPENDENCIES_1) test_isatty_SOURCES = test-isatty.c test_isatty_OBJECTS = test-isatty.$(OBJEXT) test_isatty_LDADD = $(LDADD) @@ -614,6 +702,14 @@ test_limits_h_LDADD = $(LDADD) test_limits_h_DEPENDENCIES = libtests.a ../lib/libgreputils.a \ libtests.a $(am__DEPENDENCIES_1) +test_listen_SOURCES = test-listen.c +test_listen_OBJECTS = test-listen.$(OBJEXT) +test_listen_DEPENDENCIES = $(am__DEPENDENCIES_2) +test_localcharset_SOURCES = test-localcharset.c +test_localcharset_OBJECTS = test-localcharset.$(OBJEXT) +test_localcharset_LDADD = $(LDADD) +test_localcharset_DEPENDENCIES = libtests.a ../lib/libgreputils.a \ + libtests.a $(am__DEPENDENCIES_1) test_locale_SOURCES = test-locale.c test_locale_OBJECTS = test-locale.$(OBJEXT) test_locale_LDADD = $(LDADD) @@ -693,6 +789,15 @@ test_memrchr_LDADD = $(LDADD) test_memrchr_DEPENDENCIES = libtests.a ../lib/libgreputils.a \ libtests.a $(am__DEPENDENCIES_1) +test_nanosleep_SOURCES = test-nanosleep.c +test_nanosleep_OBJECTS = test-nanosleep.$(OBJEXT) +test_nanosleep_DEPENDENCIES = $(am__DEPENDENCIES_2) \ + $(am__DEPENDENCIES_1) +test_netinet_in_SOURCES = test-netinet_in.c +test_netinet_in_OBJECTS = test-netinet_in.$(OBJEXT) +test_netinet_in_LDADD = $(LDADD) +test_netinet_in_DEPENDENCIES = libtests.a ../lib/libgreputils.a \ + libtests.a $(am__DEPENDENCIES_1) test_nl_langinfo_SOURCES = test-nl_langinfo.c test_nl_langinfo_OBJECTS = test-nl_langinfo.$(OBJEXT) test_nl_langinfo_LDADD = $(LDADD) @@ -714,6 +819,16 @@ test_pathmax_LDADD = $(LDADD) test_pathmax_DEPENDENCIES = libtests.a ../lib/libgreputils.a \ libtests.a $(am__DEPENDENCIES_1) +test_perror_SOURCES = test-perror.c +test_perror_OBJECTS = test-perror.$(OBJEXT) +test_perror_LDADD = $(LDADD) +test_perror_DEPENDENCIES = libtests.a ../lib/libgreputils.a libtests.a \ + $(am__DEPENDENCIES_1) +test_perror2_SOURCES = test-perror2.c +test_perror2_OBJECTS = test-perror2.$(OBJEXT) +test_perror2_LDADD = $(LDADD) +test_perror2_DEPENDENCIES = libtests.a ../lib/libgreputils.a \ + libtests.a $(am__DEPENDENCIES_1) test_pipe_SOURCES = test-pipe.c test_pipe_OBJECTS = test-pipe.$(OBJEXT) test_pipe_LDADD = $(LDADD) @@ -722,6 +837,11 @@ test_quotearg_simple_SOURCES = test-quotearg-simple.c test_quotearg_simple_OBJECTS = test-quotearg-simple.$(OBJEXT) test_quotearg_simple_DEPENDENCIES = $(am__DEPENDENCIES_2) +test_raise_SOURCES = test-raise.c +test_raise_OBJECTS = test-raise.$(OBJEXT) +test_raise_LDADD = $(LDADD) +test_raise_DEPENDENCIES = libtests.a ../lib/libgreputils.a libtests.a \ + $(am__DEPENDENCIES_1) test_read_SOURCES = test-read.c test_read_OBJECTS = test-read.$(OBJEXT) test_read_LDADD = $(LDADD) @@ -735,6 +855,15 @@ test_regex_SOURCES = test-regex.c test_regex_OBJECTS = test-regex.$(OBJEXT) test_regex_DEPENDENCIES = $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_1) +test_select_SOURCES = test-select.c +test_select_OBJECTS = test-select.$(OBJEXT) +test_select_DEPENDENCIES = $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_1) +test_select_fd_SOURCES = test-select-fd.c +test_select_fd_OBJECTS = test-select-fd.$(OBJEXT) +test_select_fd_DEPENDENCIES = $(am__DEPENDENCIES_2) +test_select_stdin_SOURCES = test-select-stdin.c +test_select_stdin_OBJECTS = test-select-stdin.$(OBJEXT) +test_select_stdin_DEPENDENCIES = $(am__DEPENDENCIES_2) test_setenv_SOURCES = test-setenv.c test_setenv_OBJECTS = test-setenv.$(OBJEXT) test_setenv_LDADD = $(LDADD) @@ -750,14 +879,44 @@ test_setlocale2_LDADD = $(LDADD) test_setlocale2_DEPENDENCIES = libtests.a ../lib/libgreputils.a \ libtests.a $(am__DEPENDENCIES_1) +test_setsockopt_SOURCES = test-setsockopt.c +test_setsockopt_OBJECTS = test-setsockopt.$(OBJEXT) +test_setsockopt_DEPENDENCIES = $(am__DEPENDENCIES_2) +test_sigaction_SOURCES = test-sigaction.c +test_sigaction_OBJECTS = test-sigaction.$(OBJEXT) +test_sigaction_LDADD = $(LDADD) +test_sigaction_DEPENDENCIES = libtests.a ../lib/libgreputils.a \ + libtests.a $(am__DEPENDENCIES_1) +test_signal_h_SOURCES = test-signal-h.c +test_signal_h_OBJECTS = test-signal-h.$(OBJEXT) +test_signal_h_LDADD = $(LDADD) +test_signal_h_DEPENDENCIES = libtests.a ../lib/libgreputils.a \ + libtests.a $(am__DEPENDENCIES_1) +test_sigprocmask_SOURCES = test-sigprocmask.c +test_sigprocmask_OBJECTS = test-sigprocmask.$(OBJEXT) +test_sigprocmask_LDADD = $(LDADD) +test_sigprocmask_DEPENDENCIES = libtests.a ../lib/libgreputils.a \ + libtests.a $(am__DEPENDENCIES_1) +test_sleep_SOURCES = test-sleep.c +test_sleep_OBJECTS = test-sleep.$(OBJEXT) +test_sleep_LDADD = $(LDADD) +test_sleep_DEPENDENCIES = libtests.a ../lib/libgreputils.a libtests.a \ + $(am__DEPENDENCIES_1) test_snprintf_SOURCES = test-snprintf.c test_snprintf_OBJECTS = test-snprintf.$(OBJEXT) test_snprintf_LDADD = $(LDADD) test_snprintf_DEPENDENCIES = libtests.a ../lib/libgreputils.a \ libtests.a $(am__DEPENDENCIES_1) +test_sockets_SOURCES = test-sockets.c +test_sockets_OBJECTS = test-sockets.$(OBJEXT) +test_sockets_DEPENDENCIES = $(am__DEPENDENCIES_2) test_stat_SOURCES = test-stat.c test_stat_OBJECTS = test-stat.$(OBJEXT) test_stat_DEPENDENCIES = $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_1) +test_stat_time_SOURCES = test-stat-time.c +test_stat_time_OBJECTS = test-stat-time.$(OBJEXT) +test_stat_time_DEPENDENCIES = $(am__DEPENDENCIES_2) \ + $(am__DEPENDENCIES_1) test_stdalign_SOURCES = test-stdalign.c test_stdalign_OBJECTS = test-stdalign.$(OBJEXT) test_stdalign_LDADD = $(LDADD) @@ -793,6 +952,11 @@ test_strerror_LDADD = $(LDADD) test_strerror_DEPENDENCIES = libtests.a ../lib/libgreputils.a \ libtests.a $(am__DEPENDENCIES_1) +test_strerror_r_SOURCES = test-strerror_r.c +test_strerror_r_OBJECTS = test-strerror_r.$(OBJEXT) +test_strerror_r_LDADD = $(LDADD) +test_strerror_r_DEPENDENCIES = libtests.a ../lib/libgreputils.a \ + libtests.a $(am__DEPENDENCIES_1) test_striconv_SOURCES = test-striconv.c test_striconv_OBJECTS = test-striconv.$(OBJEXT) test_striconv_DEPENDENCIES = $(am__DEPENDENCIES_2) @@ -836,22 +1000,47 @@ test_symlink_LDADD = $(LDADD) test_symlink_DEPENDENCIES = libtests.a ../lib/libgreputils.a \ libtests.a $(am__DEPENDENCIES_1) +test_sys_ioctl_SOURCES = test-sys_ioctl.c +test_sys_ioctl_OBJECTS = test-sys_ioctl.$(OBJEXT) +test_sys_ioctl_LDADD = $(LDADD) +test_sys_ioctl_DEPENDENCIES = libtests.a ../lib/libgreputils.a \ + libtests.a $(am__DEPENDENCIES_1) +test_sys_select_SOURCES = test-sys_select.c +test_sys_select_OBJECTS = test-sys_select.$(OBJEXT) +test_sys_select_LDADD = $(LDADD) +test_sys_select_DEPENDENCIES = libtests.a ../lib/libgreputils.a \ + libtests.a $(am__DEPENDENCIES_1) +test_sys_socket_SOURCES = test-sys_socket.c +test_sys_socket_OBJECTS = test-sys_socket.$(OBJEXT) +test_sys_socket_LDADD = $(LDADD) +test_sys_socket_DEPENDENCIES = libtests.a ../lib/libgreputils.a \ + libtests.a $(am__DEPENDENCIES_1) test_sys_stat_SOURCES = test-sys_stat.c test_sys_stat_OBJECTS = test-sys_stat.$(OBJEXT) test_sys_stat_LDADD = $(LDADD) test_sys_stat_DEPENDENCIES = libtests.a ../lib/libgreputils.a \ libtests.a $(am__DEPENDENCIES_1) +test_sys_time_SOURCES = test-sys_time.c +test_sys_time_OBJECTS = test-sys_time.$(OBJEXT) +test_sys_time_LDADD = $(LDADD) +test_sys_time_DEPENDENCIES = libtests.a ../lib/libgreputils.a \ + libtests.a $(am__DEPENDENCIES_1) test_sys_types_SOURCES = test-sys_types.c test_sys_types_OBJECTS = test-sys_types.$(OBJEXT) test_sys_types_LDADD = $(LDADD) test_sys_types_DEPENDENCIES = libtests.a ../lib/libgreputils.a \ libtests.a $(am__DEPENDENCIES_1) +test_sys_uio_SOURCES = test-sys_uio.c +test_sys_uio_OBJECTS = test-sys_uio.$(OBJEXT) +test_sys_uio_LDADD = $(LDADD) +test_sys_uio_DEPENDENCIES = libtests.a ../lib/libgreputils.a \ + libtests.a $(am__DEPENDENCIES_1) test_time_SOURCES = test-time.c test_time_OBJECTS = test-time.$(OBJEXT) test_time_LDADD = $(LDADD) test_time_DEPENDENCIES = libtests.a ../lib/libgreputils.a libtests.a \ $(am__DEPENDENCIES_1) -am__dirstamp = .dirstamp +am__dirstamp = $(am__leading_dot)dirstamp am_test_u8_mbtoucr_OBJECTS = unistr/test-u8-mbtoucr.$(OBJEXT) test_u8_mbtoucr_OBJECTS = $(am_test_u8_mbtoucr_OBJECTS) test_u8_mbtoucr_DEPENDENCIES = $(am__DEPENDENCIES_2) @@ -914,9 +1103,7 @@ libtests.a $(am__DEPENDENCIES_1) test_wcwidth_SOURCES = test-wcwidth.c test_wcwidth_OBJECTS = test-wcwidth.$(OBJEXT) -test_wcwidth_LDADD = $(LDADD) -test_wcwidth_DEPENDENCIES = libtests.a ../lib/libgreputils.a \ - libtests.a $(am__DEPENDENCIES_1) +test_wcwidth_DEPENDENCIES = $(am__DEPENDENCIES_2) test_xalloc_die_SOURCES = test-xalloc-die.c test_xalloc_die_OBJECTS = test-xalloc-die.$(OBJEXT) test_xalloc_die_DEPENDENCIES = $(am__DEPENDENCIES_2) @@ -944,24 +1131,34 @@ DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp am__maybe_remake_depfiles = depfiles -am__depfiles_remade = ./$(DEPDIR)/anytostr.Po ./$(DEPDIR)/asnprintf.Po \ - ./$(DEPDIR)/dfa-match-aux.Po ./$(DEPDIR)/dup-safer-flag.Po \ - ./$(DEPDIR)/fd-safer-flag.Po ./$(DEPDIR)/fdopen.Po \ - ./$(DEPDIR)/float.Po ./$(DEPDIR)/hash-pjw.Po \ - ./$(DEPDIR)/imaxtostr.Po ./$(DEPDIR)/inttostr.Po \ - ./$(DEPDIR)/itold.Po ./$(DEPDIR)/localename.Po \ - ./$(DEPDIR)/offtostr.Po ./$(DEPDIR)/pipe.Po \ +am__depfiles_remade = ./$(DEPDIR)/accept.Po ./$(DEPDIR)/anytostr.Po \ + ./$(DEPDIR)/asnprintf.Po ./$(DEPDIR)/bind.Po \ + ./$(DEPDIR)/connect.Po ./$(DEPDIR)/dfa-match-aux.Po \ + ./$(DEPDIR)/fdopen.Po ./$(DEPDIR)/float.Po \ + ./$(DEPDIR)/ftruncate.Po ./$(DEPDIR)/gettimeofday.Po \ + ./$(DEPDIR)/hash-pjw.Po ./$(DEPDIR)/imaxtostr.Po \ + ./$(DEPDIR)/inet_pton.Po ./$(DEPDIR)/inttostr.Po \ + ./$(DEPDIR)/ioctl.Po ./$(DEPDIR)/itold.Po \ + ./$(DEPDIR)/listen.Po ./$(DEPDIR)/localename-table.Po \ + ./$(DEPDIR)/localename.Po ./$(DEPDIR)/localtime-buffer.Po \ + ./$(DEPDIR)/nanosleep.Po ./$(DEPDIR)/offtostr.Po \ + ./$(DEPDIR)/perror.Po ./$(DEPDIR)/pipe.Po \ ./$(DEPDIR)/printf-args.Po ./$(DEPDIR)/printf-parse.Po \ - ./$(DEPDIR)/putenv.Po ./$(DEPDIR)/setenv.Po \ - ./$(DEPDIR)/setlocale.Po ./$(DEPDIR)/snprintf.Po \ - ./$(DEPDIR)/symlink.Po ./$(DEPDIR)/test-alignof.Po \ + ./$(DEPDIR)/putenv.Po ./$(DEPDIR)/select.Po \ + ./$(DEPDIR)/setenv.Po ./$(DEPDIR)/setlocale.Po \ + ./$(DEPDIR)/setsockopt.Po ./$(DEPDIR)/sleep.Po \ + ./$(DEPDIR)/snprintf.Po ./$(DEPDIR)/socket.Po \ + ./$(DEPDIR)/sockets.Po ./$(DEPDIR)/strerror_r.Po \ + ./$(DEPDIR)/symlink.Po ./$(DEPDIR)/sys_socket.Po \ + ./$(DEPDIR)/test-accept.Po ./$(DEPDIR)/test-alignof.Po \ ./$(DEPDIR)/test-alloca-opt.Po ./$(DEPDIR)/test-argmatch.Po \ - ./$(DEPDIR)/test-binary-io.Po ./$(DEPDIR)/test-bitrotate.Po \ + ./$(DEPDIR)/test-arpa_inet.Po ./$(DEPDIR)/test-binary-io.Po \ + ./$(DEPDIR)/test-bind.Po ./$(DEPDIR)/test-bitrotate.Po \ ./$(DEPDIR)/test-btowc.Po ./$(DEPDIR)/test-c-ctype.Po \ - ./$(DEPDIR)/test-c-strcasecmp.Po \ + ./$(DEPDIR)/test-c-stack.Po ./$(DEPDIR)/test-c-strcasecmp.Po \ ./$(DEPDIR)/test-c-strncasecmp.Po ./$(DEPDIR)/test-chdir.Po \ ./$(DEPDIR)/test-cloexec.Po ./$(DEPDIR)/test-close.Po \ - ./$(DEPDIR)/test-ctype.Po ./$(DEPDIR)/test-dirent-safer.Po \ + ./$(DEPDIR)/test-connect.Po ./$(DEPDIR)/test-ctype.Po \ ./$(DEPDIR)/test-dirent.Po ./$(DEPDIR)/test-dup-safer.Po \ ./$(DEPDIR)/test-dup.Po ./$(DEPDIR)/test-dup2.Po \ ./$(DEPDIR)/test-environ.Po ./$(DEPDIR)/test-errno.Po \ @@ -969,21 +1166,25 @@ ./$(DEPDIR)/test-fcntl-h.Po ./$(DEPDIR)/test-fcntl-safer.Po \ ./$(DEPDIR)/test-fcntl.Po ./$(DEPDIR)/test-fdopen.Po \ ./$(DEPDIR)/test-fdopendir.Po ./$(DEPDIR)/test-fgetc.Po \ - ./$(DEPDIR)/test-float.Po ./$(DEPDIR)/test-fnmatch.Po \ - ./$(DEPDIR)/test-fpending.Po ./$(DEPDIR)/test-fputc.Po \ - ./$(DEPDIR)/test-fread.Po ./$(DEPDIR)/test-fstat.Po \ - ./$(DEPDIR)/test-fstatat.Po ./$(DEPDIR)/test-fwrite.Po \ + ./$(DEPDIR)/test-float.Po ./$(DEPDIR)/test-fnmatch-h.Po \ + ./$(DEPDIR)/test-fnmatch.Po ./$(DEPDIR)/test-fpending.Po \ + ./$(DEPDIR)/test-fputc.Po ./$(DEPDIR)/test-fread.Po \ + ./$(DEPDIR)/test-fstat.Po ./$(DEPDIR)/test-fstatat.Po \ + ./$(DEPDIR)/test-ftruncate.Po ./$(DEPDIR)/test-fwrite.Po \ ./$(DEPDIR)/test-getcwd-lgpl.Po \ ./$(DEPDIR)/test-getdtablesize.Po \ ./$(DEPDIR)/test-getopt-gnu.Po \ ./$(DEPDIR)/test-getopt-posix.Po \ - ./$(DEPDIR)/test-getprogname.Po ./$(DEPDIR)/test-hash.Po \ + ./$(DEPDIR)/test-getprogname.Po \ + ./$(DEPDIR)/test-gettimeofday.Po ./$(DEPDIR)/test-hash.Po \ ./$(DEPDIR)/test-i-ring.Po ./$(DEPDIR)/test-iconv-h.Po \ ./$(DEPDIR)/test-iconv.Po ./$(DEPDIR)/test-ignore-value.Po \ - ./$(DEPDIR)/test-intprops.Po ./$(DEPDIR)/test-inttostr.Po \ - ./$(DEPDIR)/test-inttypes.Po ./$(DEPDIR)/test-isatty.Po \ + ./$(DEPDIR)/test-inet_pton.Po ./$(DEPDIR)/test-intprops.Po \ + ./$(DEPDIR)/test-inttostr.Po ./$(DEPDIR)/test-inttypes.Po \ + ./$(DEPDIR)/test-ioctl.Po ./$(DEPDIR)/test-isatty.Po \ ./$(DEPDIR)/test-isblank.Po ./$(DEPDIR)/test-iswblank.Po \ ./$(DEPDIR)/test-langinfo.Po ./$(DEPDIR)/test-limits-h.Po \ + ./$(DEPDIR)/test-listen.Po ./$(DEPDIR)/test-localcharset.Po \ ./$(DEPDIR)/test-locale.Po ./$(DEPDIR)/test-localeconv.Po \ ./$(DEPDIR)/test-localename.Po ./$(DEPDIR)/test-lseek.Po \ ./$(DEPDIR)/test-lstat.Po ./$(DEPDIR)/test-malloc-gnu.Po \ @@ -992,39 +1193,48 @@ ./$(DEPDIR)/test-mbsstr1.Po ./$(DEPDIR)/test-mbsstr2.Po \ ./$(DEPDIR)/test-mbsstr3.Po ./$(DEPDIR)/test-memchr.Po \ ./$(DEPDIR)/test-memchr2.Po ./$(DEPDIR)/test-memrchr.Po \ + ./$(DEPDIR)/test-nanosleep.Po ./$(DEPDIR)/test-netinet_in.Po \ ./$(DEPDIR)/test-nl_langinfo.Po ./$(DEPDIR)/test-open.Po \ ./$(DEPDIR)/test-openat-safer.Po ./$(DEPDIR)/test-openat.Po \ - ./$(DEPDIR)/test-pathmax.Po ./$(DEPDIR)/test-pipe.Po \ - ./$(DEPDIR)/test-quotearg-simple.Po ./$(DEPDIR)/test-read.Po \ - ./$(DEPDIR)/test-realloc-gnu.Po ./$(DEPDIR)/test-regex.Po \ + ./$(DEPDIR)/test-pathmax.Po ./$(DEPDIR)/test-perror.Po \ + ./$(DEPDIR)/test-perror2.Po ./$(DEPDIR)/test-pipe.Po \ + ./$(DEPDIR)/test-quotearg-simple.Po ./$(DEPDIR)/test-raise.Po \ + ./$(DEPDIR)/test-read.Po ./$(DEPDIR)/test-realloc-gnu.Po \ + ./$(DEPDIR)/test-regex.Po ./$(DEPDIR)/test-select-fd.Po \ + ./$(DEPDIR)/test-select-stdin.Po ./$(DEPDIR)/test-select.Po \ ./$(DEPDIR)/test-setenv.Po ./$(DEPDIR)/test-setlocale1.Po \ - ./$(DEPDIR)/test-setlocale2.Po ./$(DEPDIR)/test-snprintf.Po \ - ./$(DEPDIR)/test-stat.Po ./$(DEPDIR)/test-stdalign.Po \ - ./$(DEPDIR)/test-stdbool.Po ./$(DEPDIR)/test-stddef.Po \ - ./$(DEPDIR)/test-stdint.Po ./$(DEPDIR)/test-stdio.Po \ - ./$(DEPDIR)/test-stdlib.Po ./$(DEPDIR)/test-strerror.Po \ + ./$(DEPDIR)/test-setlocale2.Po ./$(DEPDIR)/test-setsockopt.Po \ + ./$(DEPDIR)/test-sigaction.Po ./$(DEPDIR)/test-signal-h.Po \ + ./$(DEPDIR)/test-sigprocmask.Po ./$(DEPDIR)/test-sleep.Po \ + ./$(DEPDIR)/test-snprintf.Po ./$(DEPDIR)/test-sockets.Po \ + ./$(DEPDIR)/test-stat-time.Po ./$(DEPDIR)/test-stat.Po \ + ./$(DEPDIR)/test-stdalign.Po ./$(DEPDIR)/test-stdbool.Po \ + ./$(DEPDIR)/test-stddef.Po ./$(DEPDIR)/test-stdint.Po \ + ./$(DEPDIR)/test-stdio.Po ./$(DEPDIR)/test-stdlib.Po \ + ./$(DEPDIR)/test-strerror.Po ./$(DEPDIR)/test-strerror_r.Po \ ./$(DEPDIR)/test-striconv.Po ./$(DEPDIR)/test-string.Po \ ./$(DEPDIR)/test-strnlen.Po ./$(DEPDIR)/test-strstr.Po \ ./$(DEPDIR)/test-strtoimax.Po ./$(DEPDIR)/test-strtoll.Po \ ./$(DEPDIR)/test-strtoull.Po ./$(DEPDIR)/test-strtoumax.Po \ - ./$(DEPDIR)/test-symlink.Po ./$(DEPDIR)/test-sys_stat.Po \ - ./$(DEPDIR)/test-sys_types.Po ./$(DEPDIR)/test-time.Po \ - ./$(DEPDIR)/test-unistd.Po ./$(DEPDIR)/test-unsetenv.Po \ - ./$(DEPDIR)/test-vasnprintf.Po ./$(DEPDIR)/test-verify-try.Po \ - ./$(DEPDIR)/test-verify.Po ./$(DEPDIR)/test-version-etc.Po \ - ./$(DEPDIR)/test-wchar.Po ./$(DEPDIR)/test-wcrtomb-w32.Po \ - ./$(DEPDIR)/test-wcrtomb.Po ./$(DEPDIR)/test-wctype-h.Po \ - ./$(DEPDIR)/test-wcwidth.Po ./$(DEPDIR)/test-xalloc-die.Po \ - ./$(DEPDIR)/test-xstrtoimax.Po ./$(DEPDIR)/test-xstrtol.Po \ - ./$(DEPDIR)/test-xstrtoul.Po ./$(DEPDIR)/uinttostr.Po \ - ./$(DEPDIR)/umaxtostr.Po ./$(DEPDIR)/unsetenv.Po \ - ./$(DEPDIR)/vasnprintf.Po ./$(DEPDIR)/xsize.Po \ - unistr/$(DEPDIR)/test-u8-mbtoucr.Po \ + ./$(DEPDIR)/test-symlink.Po ./$(DEPDIR)/test-sys_ioctl.Po \ + ./$(DEPDIR)/test-sys_select.Po ./$(DEPDIR)/test-sys_socket.Po \ + ./$(DEPDIR)/test-sys_stat.Po ./$(DEPDIR)/test-sys_time.Po \ + ./$(DEPDIR)/test-sys_types.Po ./$(DEPDIR)/test-sys_uio.Po \ + ./$(DEPDIR)/test-time.Po ./$(DEPDIR)/test-unistd.Po \ + ./$(DEPDIR)/test-unsetenv.Po ./$(DEPDIR)/test-vasnprintf.Po \ + ./$(DEPDIR)/test-verify-try.Po ./$(DEPDIR)/test-verify.Po \ + ./$(DEPDIR)/test-version-etc.Po ./$(DEPDIR)/test-wchar.Po \ + ./$(DEPDIR)/test-wcrtomb-w32.Po ./$(DEPDIR)/test-wcrtomb.Po \ + ./$(DEPDIR)/test-wctype-h.Po ./$(DEPDIR)/test-wcwidth.Po \ + ./$(DEPDIR)/test-xalloc-die.Po ./$(DEPDIR)/test-xstrtoimax.Po \ + ./$(DEPDIR)/test-xstrtol.Po ./$(DEPDIR)/test-xstrtoul.Po \ + ./$(DEPDIR)/uinttostr.Po ./$(DEPDIR)/umaxtostr.Po \ + ./$(DEPDIR)/unsetenv.Po ./$(DEPDIR)/vasnprintf.Po \ + ./$(DEPDIR)/xsize.Po unistr/$(DEPDIR)/test-u8-mbtoucr.Po \ unistr/$(DEPDIR)/test-u8-uctomb.Po \ uniwidth/$(DEPDIR)/test-uc_width.Po \ uniwidth/$(DEPDIR)/test-uc_width2.Po am__mv = mv -f -am__set_depbase = depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.[^.]*$$||'` COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) @@ -1038,79 +1248,97 @@ am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libtests_a_SOURCES) $(EXTRA_libtests_a_SOURCES) \ - dfa-match-aux.c test-alignof.c test-alloca-opt.c \ - test-argmatch.c test-binary-io.c test-bitrotate.c test-btowc.c \ - test-c-ctype.c test-c-strcasecmp.c test-c-strncasecmp.c \ - test-chdir.c test-cloexec.c test-close.c test-ctype.c \ - test-dirent.c test-dirent-safer.c test-dup.c test-dup-safer.c \ - test-dup2.c test-environ.c test-errno.c test-exclude.c \ - test-fchdir.c test-fcntl.c test-fcntl-h.c test-fcntl-safer.c \ - test-fdopen.c test-fdopendir.c test-fgetc.c test-float.c \ - test-fnmatch.c test-fpending.c test-fputc.c test-fread.c \ - test-fstat.c test-fstatat.c test-fwrite.c test-getcwd-lgpl.c \ - test-getdtablesize.c test-getopt-gnu.c test-getopt-posix.c \ - test-getprogname.c test-hash.c test-i-ring.c test-iconv.c \ - test-iconv-h.c test-ignore-value.c test-intprops.c \ - test-inttostr.c test-inttypes.c test-isatty.c test-isblank.c \ - test-iswblank.c test-langinfo.c test-limits-h.c test-locale.c \ + dfa-match-aux.c test-accept.c test-alignof.c test-alloca-opt.c \ + test-argmatch.c test-arpa_inet.c test-binary-io.c test-bind.c \ + test-bitrotate.c test-btowc.c test-c-ctype.c test-c-stack.c \ + test-c-strcasecmp.c test-c-strncasecmp.c test-chdir.c \ + test-cloexec.c test-close.c test-connect.c test-ctype.c \ + test-dirent.c test-dup.c test-dup-safer.c test-dup2.c \ + test-environ.c test-errno.c test-exclude.c test-fchdir.c \ + test-fcntl.c test-fcntl-h.c test-fcntl-safer.c test-fdopen.c \ + test-fdopendir.c test-fgetc.c test-float.c test-fnmatch.c \ + test-fnmatch-h.c test-fpending.c test-fputc.c test-fread.c \ + test-fstat.c test-fstatat.c test-ftruncate.c test-fwrite.c \ + test-getcwd-lgpl.c test-getdtablesize.c test-getopt-gnu.c \ + test-getopt-posix.c test-getprogname.c test-gettimeofday.c \ + test-hash.c test-i-ring.c test-iconv.c test-iconv-h.c \ + test-ignore-value.c test-inet_pton.c test-intprops.c \ + test-inttostr.c test-inttypes.c test-ioctl.c test-isatty.c \ + test-isblank.c test-iswblank.c test-langinfo.c test-limits-h.c \ + test-listen.c test-localcharset.c test-locale.c \ test-localeconv.c test-localename.c test-lseek.c test-lstat.c \ test-malloc-gnu.c test-malloca.c test-mbscasecmp.c \ test-mbsinit.c test-mbsrtowcs.c test-mbsstr1.c test-mbsstr2.c \ test-mbsstr3.c test-memchr.c test-memchr2.c test-memrchr.c \ - test-nl_langinfo.c test-open.c test-openat.c \ - test-openat-safer.c test-pathmax.c test-pipe.c \ - test-quotearg-simple.c test-read.c test-realloc-gnu.c \ - test-regex.c test-setenv.c test-setlocale1.c test-setlocale2.c \ - test-snprintf.c test-stat.c test-stdalign.c test-stdbool.c \ - test-stddef.c test-stdint.c test-stdio.c test-stdlib.c \ - test-strerror.c test-striconv.c test-string.c test-strnlen.c \ - test-strstr.c test-strtoimax.c test-strtoll.c test-strtoull.c \ - test-strtoumax.c test-symlink.c test-sys_stat.c \ - test-sys_types.c test-time.c $(test_u8_mbtoucr_SOURCES) \ - $(test_u8_uctomb_SOURCES) $(test_uc_width_SOURCES) \ - $(test_uc_width2_SOURCES) test-unistd.c test-unsetenv.c \ - test-vasnprintf.c test-verify.c test-verify-try.c \ - test-version-etc.c test-wchar.c test-wcrtomb.c \ - test-wcrtomb-w32.c test-wctype-h.c test-wcwidth.c \ - test-xalloc-die.c test-xstrtoimax.c test-xstrtol.c \ - test-xstrtoul.c + test-nanosleep.c test-netinet_in.c test-nl_langinfo.c \ + test-open.c test-openat.c test-openat-safer.c test-pathmax.c \ + test-perror.c test-perror2.c test-pipe.c \ + test-quotearg-simple.c test-raise.c test-read.c \ + test-realloc-gnu.c test-regex.c test-select.c test-select-fd.c \ + test-select-stdin.c test-setenv.c test-setlocale1.c \ + test-setlocale2.c test-setsockopt.c test-sigaction.c \ + test-signal-h.c test-sigprocmask.c test-sleep.c \ + test-snprintf.c test-sockets.c test-stat.c test-stat-time.c \ + test-stdalign.c test-stdbool.c test-stddef.c test-stdint.c \ + test-stdio.c test-stdlib.c test-strerror.c test-strerror_r.c \ + test-striconv.c test-string.c test-strnlen.c test-strstr.c \ + test-strtoimax.c test-strtoll.c test-strtoull.c \ + test-strtoumax.c test-symlink.c test-sys_ioctl.c \ + test-sys_select.c test-sys_socket.c test-sys_stat.c \ + test-sys_time.c test-sys_types.c test-sys_uio.c test-time.c \ + $(test_u8_mbtoucr_SOURCES) $(test_u8_uctomb_SOURCES) \ + $(test_uc_width_SOURCES) $(test_uc_width2_SOURCES) \ + test-unistd.c test-unsetenv.c test-vasnprintf.c test-verify.c \ + test-verify-try.c test-version-etc.c test-wchar.c \ + test-wcrtomb.c test-wcrtomb-w32.c test-wctype-h.c \ + test-wcwidth.c test-xalloc-die.c test-xstrtoimax.c \ + test-xstrtol.c test-xstrtoul.c DIST_SOURCES = $(libtests_a_SOURCES) $(EXTRA_libtests_a_SOURCES) \ - dfa-match-aux.c test-alignof.c test-alloca-opt.c \ - test-argmatch.c test-binary-io.c test-bitrotate.c test-btowc.c \ - test-c-ctype.c test-c-strcasecmp.c test-c-strncasecmp.c \ - test-chdir.c test-cloexec.c test-close.c test-ctype.c \ - test-dirent.c test-dirent-safer.c test-dup.c test-dup-safer.c \ - test-dup2.c test-environ.c test-errno.c test-exclude.c \ - test-fchdir.c test-fcntl.c test-fcntl-h.c test-fcntl-safer.c \ - test-fdopen.c test-fdopendir.c test-fgetc.c test-float.c \ - test-fnmatch.c test-fpending.c test-fputc.c test-fread.c \ - test-fstat.c test-fstatat.c test-fwrite.c test-getcwd-lgpl.c \ - test-getdtablesize.c test-getopt-gnu.c test-getopt-posix.c \ - test-getprogname.c test-hash.c test-i-ring.c test-iconv.c \ - test-iconv-h.c test-ignore-value.c test-intprops.c \ - test-inttostr.c test-inttypes.c test-isatty.c test-isblank.c \ - test-iswblank.c test-langinfo.c test-limits-h.c test-locale.c \ + dfa-match-aux.c test-accept.c test-alignof.c test-alloca-opt.c \ + test-argmatch.c test-arpa_inet.c test-binary-io.c test-bind.c \ + test-bitrotate.c test-btowc.c test-c-ctype.c test-c-stack.c \ + test-c-strcasecmp.c test-c-strncasecmp.c test-chdir.c \ + test-cloexec.c test-close.c test-connect.c test-ctype.c \ + test-dirent.c test-dup.c test-dup-safer.c test-dup2.c \ + test-environ.c test-errno.c test-exclude.c test-fchdir.c \ + test-fcntl.c test-fcntl-h.c test-fcntl-safer.c test-fdopen.c \ + test-fdopendir.c test-fgetc.c test-float.c test-fnmatch.c \ + test-fnmatch-h.c test-fpending.c test-fputc.c test-fread.c \ + test-fstat.c test-fstatat.c test-ftruncate.c test-fwrite.c \ + test-getcwd-lgpl.c test-getdtablesize.c test-getopt-gnu.c \ + test-getopt-posix.c test-getprogname.c test-gettimeofday.c \ + test-hash.c test-i-ring.c test-iconv.c test-iconv-h.c \ + test-ignore-value.c test-inet_pton.c test-intprops.c \ + test-inttostr.c test-inttypes.c test-ioctl.c test-isatty.c \ + test-isblank.c test-iswblank.c test-langinfo.c test-limits-h.c \ + test-listen.c test-localcharset.c test-locale.c \ test-localeconv.c test-localename.c test-lseek.c test-lstat.c \ test-malloc-gnu.c test-malloca.c test-mbscasecmp.c \ test-mbsinit.c test-mbsrtowcs.c test-mbsstr1.c test-mbsstr2.c \ test-mbsstr3.c test-memchr.c test-memchr2.c test-memrchr.c \ - test-nl_langinfo.c test-open.c test-openat.c \ - test-openat-safer.c test-pathmax.c test-pipe.c \ - test-quotearg-simple.c test-read.c test-realloc-gnu.c \ - test-regex.c test-setenv.c test-setlocale1.c test-setlocale2.c \ - test-snprintf.c test-stat.c test-stdalign.c test-stdbool.c \ - test-stddef.c test-stdint.c test-stdio.c test-stdlib.c \ - test-strerror.c test-striconv.c test-string.c test-strnlen.c \ - test-strstr.c test-strtoimax.c test-strtoll.c test-strtoull.c \ - test-strtoumax.c test-symlink.c test-sys_stat.c \ - test-sys_types.c test-time.c $(test_u8_mbtoucr_SOURCES) \ - $(test_u8_uctomb_SOURCES) $(test_uc_width_SOURCES) \ - $(test_uc_width2_SOURCES) test-unistd.c test-unsetenv.c \ - test-vasnprintf.c test-verify.c test-verify-try.c \ - test-version-etc.c test-wchar.c test-wcrtomb.c \ - test-wcrtomb-w32.c test-wctype-h.c test-wcwidth.c \ - test-xalloc-die.c test-xstrtoimax.c test-xstrtol.c \ - test-xstrtoul.c + test-nanosleep.c test-netinet_in.c test-nl_langinfo.c \ + test-open.c test-openat.c test-openat-safer.c test-pathmax.c \ + test-perror.c test-perror2.c test-pipe.c \ + test-quotearg-simple.c test-raise.c test-read.c \ + test-realloc-gnu.c test-regex.c test-select.c test-select-fd.c \ + test-select-stdin.c test-setenv.c test-setlocale1.c \ + test-setlocale2.c test-setsockopt.c test-sigaction.c \ + test-signal-h.c test-sigprocmask.c test-sleep.c \ + test-snprintf.c test-sockets.c test-stat.c test-stat-time.c \ + test-stdalign.c test-stdbool.c test-stddef.c test-stdint.c \ + test-stdio.c test-stdlib.c test-strerror.c test-strerror_r.c \ + test-striconv.c test-string.c test-strnlen.c test-strstr.c \ + test-strtoimax.c test-strtoll.c test-strtoull.c \ + test-strtoumax.c test-symlink.c test-sys_ioctl.c \ + test-sys_select.c test-sys_socket.c test-sys_stat.c \ + test-sys_time.c test-sys_types.c test-sys_uio.c test-time.c \ + $(test_u8_mbtoucr_SOURCES) $(test_u8_uctomb_SOURCES) \ + $(test_uc_width_SOURCES) $(test_uc_width2_SOURCES) \ + test-unistd.c test-unsetenv.c test-vasnprintf.c test-verify.c \ + test-verify-try.c test-version-etc.c test-wchar.c \ + test-wcrtomb.c test-wcrtomb-w32.c test-wctype-h.c \ + test-wcwidth.c test-xalloc-die.c test-xstrtoimax.c \ + test-xstrtol.c test-xstrtoul.c RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ ctags-recursive dvi-recursive html-recursive info-recursive \ install-data-recursive install-dvi-recursive \ @@ -1132,7 +1360,7 @@ $(RECURSIVE_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ - check recheck distdir + check recheck distdir distdir-am am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is @@ -1433,8 +1661,11 @@ GLIBC21 = @GLIBC21@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ +GNULIB_ACCEPT = @GNULIB_ACCEPT@ +GNULIB_ACCEPT4 = @GNULIB_ACCEPT4@ GNULIB_ALPHASORT = @GNULIB_ALPHASORT@ GNULIB_ATOLL = @GNULIB_ATOLL@ +GNULIB_BIND = @GNULIB_BIND@ GNULIB_BTOWC = @GNULIB_BTOWC@ GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@ GNULIB_CANONICALIZE_FILE_NAME = @GNULIB_CANONICALIZE_FILE_NAME@ @@ -1442,6 +1673,7 @@ GNULIB_CHOWN = @GNULIB_CHOWN@ GNULIB_CLOSE = @GNULIB_CLOSE@ GNULIB_CLOSEDIR = @GNULIB_CLOSEDIR@ +GNULIB_CONNECT = @GNULIB_CONNECT@ GNULIB_CTIME = @GNULIB_CTIME@ GNULIB_DIRFD = @GNULIB_DIRFD@ GNULIB_DPRINTF = @GNULIB_DPRINTF@ @@ -1451,6 +1683,7 @@ GNULIB_DUPLOCALE = @GNULIB_DUPLOCALE@ GNULIB_ENVIRON = @GNULIB_ENVIRON@ GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@ +GNULIB_EXPLICIT_BZERO = @GNULIB_EXPLICIT_BZERO@ GNULIB_FACCESSAT = @GNULIB_FACCESSAT@ GNULIB_FCHDIR = @GNULIB_FCHDIR@ GNULIB_FCHMODAT = @GNULIB_FCHMODAT@ @@ -1465,6 +1698,7 @@ GNULIB_FFSLL = @GNULIB_FFSLL@ GNULIB_FGETC = @GNULIB_FGETC@ GNULIB_FGETS = @GNULIB_FGETS@ +GNULIB_FNMATCH = @GNULIB_FNMATCH@ GNULIB_FOPEN = @GNULIB_FOPEN@ GNULIB_FPRINTF = @GNULIB_FPRINTF@ GNULIB_FPRINTF_POSIX = @GNULIB_FPRINTF_POSIX@ @@ -1497,6 +1731,10 @@ GNULIB_GETLOGIN = @GNULIB_GETLOGIN@ GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@ GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@ +GNULIB_GETPASS = @GNULIB_GETPASS@ +GNULIB_GETPEERNAME = @GNULIB_GETPEERNAME@ +GNULIB_GETSOCKNAME = @GNULIB_GETSOCKNAME@ +GNULIB_GETSOCKOPT = @GNULIB_GETSOCKOPT@ GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@ GNULIB_GETTIMEOFDAY = @GNULIB_GETTIMEOFDAY@ GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@ @@ -1506,6 +1744,9 @@ GNULIB_ICONV = @GNULIB_ICONV@ GNULIB_IMAXABS = @GNULIB_IMAXABS@ GNULIB_IMAXDIV = @GNULIB_IMAXDIV@ +GNULIB_INET_NTOP = @GNULIB_INET_NTOP@ +GNULIB_INET_PTON = @GNULIB_INET_PTON@ +GNULIB_IOCTL = @GNULIB_IOCTL@ GNULIB_ISATTY = @GNULIB_ISATTY@ GNULIB_ISBLANK = @GNULIB_ISBLANK@ GNULIB_ISWBLANK = @GNULIB_ISWBLANK@ @@ -1514,7 +1755,9 @@ GNULIB_LCHOWN = @GNULIB_LCHOWN@ GNULIB_LINK = @GNULIB_LINK@ GNULIB_LINKAT = @GNULIB_LINKAT@ +GNULIB_LISTEN = @GNULIB_LISTEN@ GNULIB_LOCALECONV = @GNULIB_LOCALECONV@ +GNULIB_LOCALENAME = @GNULIB_LOCALENAME@ GNULIB_LOCALTIME = @GNULIB_LOCALTIME@ GNULIB_LSEEK = @GNULIB_LSEEK@ GNULIB_LSTAT = @GNULIB_LSTAT@ @@ -1573,6 +1816,8 @@ GNULIB_PREAD = @GNULIB_PREAD@ GNULIB_PRINTF = @GNULIB_PRINTF@ GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@ +GNULIB_PSELECT = @GNULIB_PSELECT@ +GNULIB_PTHREAD_SIGMASK = @GNULIB_PTHREAD_SIGMASK@ GNULIB_PTSNAME = @GNULIB_PTSNAME@ GNULIB_PTSNAME_R = @GNULIB_PTSNAME_R@ GNULIB_PUTC = @GNULIB_PUTC@ @@ -1581,6 +1826,7 @@ GNULIB_PUTS = @GNULIB_PUTS@ GNULIB_PWRITE = @GNULIB_PWRITE@ GNULIB_QSORT_R = @GNULIB_QSORT_R@ +GNULIB_RAISE = @GNULIB_RAISE@ GNULIB_RANDOM = @GNULIB_RANDOM@ GNULIB_RANDOM_R = @GNULIB_RANDOM_R@ GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@ @@ -1588,8 +1834,11 @@ GNULIB_READDIR = @GNULIB_READDIR@ GNULIB_READLINK = @GNULIB_READLINK@ GNULIB_READLINKAT = @GNULIB_READLINKAT@ +GNULIB_REALLOCARRAY = @GNULIB_REALLOCARRAY@ GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@ GNULIB_REALPATH = @GNULIB_REALPATH@ +GNULIB_RECV = @GNULIB_RECV@ +GNULIB_RECVFROM = @GNULIB_RECVFROM@ GNULIB_REMOVE = @GNULIB_REMOVE@ GNULIB_RENAME = @GNULIB_RENAME@ GNULIB_RENAMEAT = @GNULIB_RENAMEAT@ @@ -1599,11 +1848,20 @@ GNULIB_SCANDIR = @GNULIB_SCANDIR@ GNULIB_SCANF = @GNULIB_SCANF@ GNULIB_SECURE_GETENV = @GNULIB_SECURE_GETENV@ +GNULIB_SELECT = @GNULIB_SELECT@ +GNULIB_SEND = @GNULIB_SEND@ +GNULIB_SENDTO = @GNULIB_SENDTO@ GNULIB_SETENV = @GNULIB_SETENV@ GNULIB_SETHOSTNAME = @GNULIB_SETHOSTNAME@ GNULIB_SETLOCALE = @GNULIB_SETLOCALE@ +GNULIB_SETSOCKOPT = @GNULIB_SETSOCKOPT@ +GNULIB_SHUTDOWN = @GNULIB_SHUTDOWN@ +GNULIB_SIGACTION = @GNULIB_SIGACTION@ +GNULIB_SIGNAL_H_SIGPIPE = @GNULIB_SIGNAL_H_SIGPIPE@ +GNULIB_SIGPROCMASK = @GNULIB_SIGPROCMASK@ GNULIB_SLEEP = @GNULIB_SLEEP@ GNULIB_SNPRINTF = @GNULIB_SNPRINTF@ +GNULIB_SOCKET = @GNULIB_SOCKET@ GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@ GNULIB_STAT = @GNULIB_STAT@ GNULIB_STDIO_H_NONBLOCKING = @GNULIB_STDIO_H_NONBLOCKING@ @@ -1701,7 +1959,9 @@ GNULIB_WRITE = @GNULIB_WRITE@ GNULIB__EXIT = @GNULIB__EXIT@ GREP = @GREP@ +HAVE_ACCEPT4 = @HAVE_ACCEPT4@ HAVE_ALPHASORT = @HAVE_ALPHASORT@ +HAVE_ARPA_INET_H = @HAVE_ARPA_INET_H@ HAVE_ATOLL = @HAVE_ATOLL@ HAVE_BTOWC = @HAVE_BTOWC@ HAVE_C99_STDINT_H = @HAVE_C99_STDINT_H@ @@ -1727,12 +1987,16 @@ HAVE_DECL_GETUSERSHELL = @HAVE_DECL_GETUSERSHELL@ HAVE_DECL_IMAXABS = @HAVE_DECL_IMAXABS@ HAVE_DECL_IMAXDIV = @HAVE_DECL_IMAXDIV@ +HAVE_DECL_INET_NTOP = @HAVE_DECL_INET_NTOP@ +HAVE_DECL_INET_PTON = @HAVE_DECL_INET_PTON@ +HAVE_DECL_INITSTATE = @HAVE_DECL_INITSTATE@ HAVE_DECL_LOCALTIME_R = @HAVE_DECL_LOCALTIME_R@ HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@ HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@ HAVE_DECL_OBSTACK_PRINTF = @HAVE_DECL_OBSTACK_PRINTF@ HAVE_DECL_SETENV = @HAVE_DECL_SETENV@ HAVE_DECL_SETHOSTNAME = @HAVE_DECL_SETHOSTNAME@ +HAVE_DECL_SETSTATE = @HAVE_DECL_SETSTATE@ HAVE_DECL_SNPRINTF = @HAVE_DECL_SNPRINTF@ HAVE_DECL_STRDUP = @HAVE_DECL_STRDUP@ HAVE_DECL_STRERROR_R = @HAVE_DECL_STRERROR_R@ @@ -1742,6 +2006,7 @@ HAVE_DECL_STRTOIMAX = @HAVE_DECL_STRTOIMAX@ HAVE_DECL_STRTOK_R = @HAVE_DECL_STRTOK_R@ HAVE_DECL_STRTOUMAX = @HAVE_DECL_STRTOUMAX@ +HAVE_DECL_TRUNCATE = @HAVE_DECL_TRUNCATE@ HAVE_DECL_TTYNAME_R = @HAVE_DECL_TTYNAME_R@ HAVE_DECL_UNSETENV = @HAVE_DECL_UNSETENV@ HAVE_DECL_VSNPRINTF = @HAVE_DECL_VSNPRINTF@ @@ -1753,6 +2018,7 @@ HAVE_DUP3 = @HAVE_DUP3@ HAVE_DUPLOCALE = @HAVE_DUPLOCALE@ HAVE_EUIDACCESS = @HAVE_EUIDACCESS@ +HAVE_EXPLICIT_BZERO = @HAVE_EXPLICIT_BZERO@ HAVE_FACCESSAT = @HAVE_FACCESSAT@ HAVE_FCHDIR = @HAVE_FCHDIR@ HAVE_FCHMODAT = @HAVE_FCHMODAT@ @@ -1763,6 +2029,9 @@ HAVE_FEATURES_H = @HAVE_FEATURES_H@ HAVE_FFSL = @HAVE_FFSL@ HAVE_FFSLL = @HAVE_FFSLL@ +HAVE_FNMATCH = @HAVE_FNMATCH@ +HAVE_FNMATCH_H = @HAVE_FNMATCH_H@ +HAVE_FREELOCALE = @HAVE_FREELOCALE@ HAVE_FSEEKO = @HAVE_FSEEKO@ HAVE_FSTATAT = @HAVE_FSTATAT@ HAVE_FSYNC = @HAVE_FSYNC@ @@ -1775,13 +2044,17 @@ HAVE_GETLOGIN = @HAVE_GETLOGIN@ HAVE_GETOPT_H = @HAVE_GETOPT_H@ HAVE_GETPAGESIZE = @HAVE_GETPAGESIZE@ +HAVE_GETPASS = @HAVE_GETPASS@ HAVE_GETSUBOPT = @HAVE_GETSUBOPT@ +HAVE_GETTIMEOFDAY = @HAVE_GETTIMEOFDAY@ HAVE_GRANTPT = @HAVE_GRANTPT@ HAVE_GROUP_MEMBER = @HAVE_GROUP_MEMBER@ +HAVE_IMAXDIV_T = @HAVE_IMAXDIV_T@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_ISBLANK = @HAVE_ISBLANK@ HAVE_ISWBLANK = @HAVE_ISWBLANK@ HAVE_ISWCNTRL = @HAVE_ISWCNTRL@ +HAVE_LANGINFO_ALTMON = @HAVE_LANGINFO_ALTMON@ HAVE_LANGINFO_CODESET = @HAVE_LANGINFO_CODESET@ HAVE_LANGINFO_ERA = @HAVE_LANGINFO_ERA@ HAVE_LANGINFO_H = @HAVE_LANGINFO_H@ @@ -1789,6 +2062,7 @@ HAVE_LANGINFO_YESEXPR = @HAVE_LANGINFO_YESEXPR@ HAVE_LCHMOD = @HAVE_LCHMOD@ HAVE_LCHOWN = @HAVE_LCHOWN@ +HAVE_LIBSIGSEGV = @HAVE_LIBSIGSEGV@ HAVE_LINK = @HAVE_LINK@ HAVE_LINKAT = @HAVE_LINKAT@ HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@ @@ -1814,6 +2088,8 @@ HAVE_MKSTEMPS = @HAVE_MKSTEMPS@ HAVE_MSVC_INVALID_PARAMETER_HANDLER = @HAVE_MSVC_INVALID_PARAMETER_HANDLER@ HAVE_NANOSLEEP = @HAVE_NANOSLEEP@ +HAVE_NETINET_IN_H = @HAVE_NETINET_IN_H@ +HAVE_NEWLOCALE = @HAVE_NEWLOCALE@ HAVE_NL_LANGINFO = @HAVE_NL_LANGINFO@ HAVE_OPENAT = @HAVE_OPENAT@ HAVE_OPENDIR = @HAVE_OPENDIR@ @@ -1823,11 +2099,15 @@ HAVE_PIPE2 = @HAVE_PIPE2@ HAVE_POPEN = @HAVE_POPEN@ HAVE_POSIX_OPENPT = @HAVE_POSIX_OPENPT@ +HAVE_POSIX_SIGNALBLOCKING = @HAVE_POSIX_SIGNALBLOCKING@ HAVE_PREAD = @HAVE_PREAD@ +HAVE_PSELECT = @HAVE_PSELECT@ +HAVE_PTHREAD_SIGMASK = @HAVE_PTHREAD_SIGMASK@ HAVE_PTSNAME = @HAVE_PTSNAME@ HAVE_PTSNAME_R = @HAVE_PTSNAME_R@ HAVE_PWRITE = @HAVE_PWRITE@ HAVE_QSORT_R = @HAVE_QSORT_R@ +HAVE_RAISE = @HAVE_RAISE@ HAVE_RANDOM = @HAVE_RANDOM@ HAVE_RANDOM_H = @HAVE_RANDOM_H@ HAVE_RANDOM_R = @HAVE_RANDOM_R@ @@ -1835,17 +2115,23 @@ HAVE_READDIR = @HAVE_READDIR@ HAVE_READLINK = @HAVE_READLINK@ HAVE_READLINKAT = @HAVE_READLINKAT@ +HAVE_REALLOCARRAY = @HAVE_REALLOCARRAY@ HAVE_REALPATH = @HAVE_REALPATH@ HAVE_RENAMEAT = @HAVE_RENAMEAT@ HAVE_REWINDDIR = @HAVE_REWINDDIR@ HAVE_RPMATCH = @HAVE_RPMATCH@ +HAVE_SA_FAMILY_T = @HAVE_SA_FAMILY_T@ HAVE_SCANDIR = @HAVE_SCANDIR@ HAVE_SECURE_GETENV = @HAVE_SECURE_GETENV@ HAVE_SETENV = @HAVE_SETENV@ HAVE_SETHOSTNAME = @HAVE_SETHOSTNAME@ +HAVE_SIGACTION = @HAVE_SIGACTION@ +HAVE_SIGHANDLER_T = @HAVE_SIGHANDLER_T@ +HAVE_SIGINFO_T = @HAVE_SIGINFO_T@ HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@ HAVE_SIGNED_WCHAR_T = @HAVE_SIGNED_WCHAR_T@ HAVE_SIGNED_WINT_T = @HAVE_SIGNED_WINT_T@ +HAVE_SIGSET_T = @HAVE_SIGSET_T@ HAVE_SLEEP = @HAVE_SLEEP@ HAVE_STDINT_H = @HAVE_STDINT_H@ HAVE_STPCPY = @HAVE_STPCPY@ @@ -1859,18 +2145,27 @@ HAVE_STRTOLL = @HAVE_STRTOLL@ HAVE_STRTOULL = @HAVE_STRTOULL@ HAVE_STRUCT_RANDOM_DATA = @HAVE_STRUCT_RANDOM_DATA@ +HAVE_STRUCT_SIGACTION_SA_SIGACTION = @HAVE_STRUCT_SIGACTION_SA_SIGACTION@ +HAVE_STRUCT_SOCKADDR_STORAGE = @HAVE_STRUCT_SOCKADDR_STORAGE@ +HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY = @HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY@ +HAVE_STRUCT_TIMEVAL = @HAVE_STRUCT_TIMEVAL@ HAVE_STRVERSCMP = @HAVE_STRVERSCMP@ HAVE_SYMLINK = @HAVE_SYMLINK@ HAVE_SYMLINKAT = @HAVE_SYMLINKAT@ HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@ HAVE_SYS_CDEFS_H = @HAVE_SYS_CDEFS_H@ HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@ +HAVE_SYS_IOCTL_H = @HAVE_SYS_IOCTL_H@ HAVE_SYS_LOADAVG_H = @HAVE_SYS_LOADAVG_H@ HAVE_SYS_PARAM_H = @HAVE_SYS_PARAM_H@ +HAVE_SYS_SELECT_H = @HAVE_SYS_SELECT_H@ +HAVE_SYS_SOCKET_H = @HAVE_SYS_SOCKET_H@ +HAVE_SYS_TIME_H = @HAVE_SYS_TIME_H@ HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ +HAVE_SYS_UIO_H = @HAVE_SYS_UIO_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@ @@ -1919,6 +2214,7 @@ HAVE_WMEMCPY = @HAVE_WMEMCPY@ HAVE_WMEMMOVE = @HAVE_WMEMMOVE@ HAVE_WMEMSET = @HAVE_WMEMSET@ +HAVE_WS2TCPIP_H = @HAVE_WS2TCPIP_H@ HAVE_XLOCALE_H = @HAVE_XLOCALE_H@ HAVE__BOOL = @HAVE__BOOL@ HAVE__EXIT = @HAVE__EXIT@ @@ -1926,6 +2222,7 @@ ICONV_H = @ICONV_H@ INCLUDE_NEXT = @INCLUDE_NEXT@ INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@ +INET_PTON_LIB = @INET_PTON_LIB@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -1936,6 +2233,7 @@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ LDFLAGS = @LDFLAGS@ +LIBCSTACK = @LIBCSTACK@ LIBGREPUTILS_LIBDEPS = @LIBGREPUTILS_LIBDEPS@ LIBGREPUTILS_LTLIBDEPS = @LIBGREPUTILS_LTLIBDEPS@ LIBICONV = @LIBICONV@ @@ -1945,11 +2243,16 @@ LIBPTH = @LIBPTH@ LIBPTH_PREFIX = @LIBPTH_PREFIX@ LIBS = @LIBS@ +LIBSIGSEGV = @LIBSIGSEGV@ +LIBSIGSEGV_PREFIX = @LIBSIGSEGV_PREFIX@ +LIBSOCKET = @LIBSOCKET@ LIBTESTS_LIBDEPS = @LIBTESTS_LIBDEPS@ LIBTHREAD = @LIBTHREAD@ LIBUNISTRING_UNISTR_H = @LIBUNISTRING_UNISTR_H@ LIBUNISTRING_UNITYPES_H = @LIBUNISTRING_UNITYPES_H@ LIBUNISTRING_UNIWIDTH_H = @LIBUNISTRING_UNIWIDTH_H@ +LIB_NANOSLEEP = @LIB_NANOSLEEP@ +LIB_SELECT = @LIB_SELECT@ LIMITS_H = @LIMITS_H@ LOCALCHARSET_TESTS_ENVIRONMENT = @LOCALCHARSET_TESTS_ENVIRONMENT@ LOCALE_FR = @LOCALE_FR@ @@ -1957,36 +2260,49 @@ LOCALE_JA = @LOCALE_JA@ LOCALE_TR_UTF8 = @LOCALE_TR_UTF8@ LOCALE_ZH_CN = @LOCALE_ZH_CN@ +LTLIBCSTACK = @LTLIBCSTACK@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBMULTITHREAD = @LTLIBMULTITHREAD@ LTLIBOBJS = @LTLIBOBJS@ LTLIBPTH = @LTLIBPTH@ +LTLIBSIGSEGV = @LTLIBSIGSEGV@ LTLIBTHREAD = @LTLIBTHREAD@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ +NETINET_IN_H = @NETINET_IN_H@ +NEXT_ARPA_INET_H = @NEXT_ARPA_INET_H@ +NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H = @NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H@ NEXT_AS_FIRST_DIRECTIVE_CTYPE_H = @NEXT_AS_FIRST_DIRECTIVE_CTYPE_H@ NEXT_AS_FIRST_DIRECTIVE_DIRENT_H = @NEXT_AS_FIRST_DIRECTIVE_DIRENT_H@ NEXT_AS_FIRST_DIRECTIVE_ERRNO_H = @NEXT_AS_FIRST_DIRECTIVE_ERRNO_H@ NEXT_AS_FIRST_DIRECTIVE_FCNTL_H = @NEXT_AS_FIRST_DIRECTIVE_FCNTL_H@ NEXT_AS_FIRST_DIRECTIVE_FLOAT_H = @NEXT_AS_FIRST_DIRECTIVE_FLOAT_H@ +NEXT_AS_FIRST_DIRECTIVE_FNMATCH_H = @NEXT_AS_FIRST_DIRECTIVE_FNMATCH_H@ NEXT_AS_FIRST_DIRECTIVE_GETOPT_H = @NEXT_AS_FIRST_DIRECTIVE_GETOPT_H@ NEXT_AS_FIRST_DIRECTIVE_ICONV_H = @NEXT_AS_FIRST_DIRECTIVE_ICONV_H@ NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H = @NEXT_AS_FIRST_DIRECTIVE_INTTYPES_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_NETINET_IN_H = @NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H@ +NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H = @NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H@ NEXT_AS_FIRST_DIRECTIVE_STDARG_H = @NEXT_AS_FIRST_DIRECTIVE_STDARG_H@ NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@ NEXT_AS_FIRST_DIRECTIVE_STDINT_H = @NEXT_AS_FIRST_DIRECTIVE_STDINT_H@ NEXT_AS_FIRST_DIRECTIVE_STDIO_H = @NEXT_AS_FIRST_DIRECTIVE_STDIO_H@ NEXT_AS_FIRST_DIRECTIVE_STDLIB_H = @NEXT_AS_FIRST_DIRECTIVE_STDLIB_H@ NEXT_AS_FIRST_DIRECTIVE_STRING_H = @NEXT_AS_FIRST_DIRECTIVE_STRING_H@ +NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H@ +NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H@ +NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H@ +NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H@ +NEXT_AS_FIRST_DIRECTIVE_SYS_UIO_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_UIO_H@ NEXT_AS_FIRST_DIRECTIVE_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_TIME_H@ NEXT_AS_FIRST_DIRECTIVE_UNISTD_H = @NEXT_AS_FIRST_DIRECTIVE_UNISTD_H@ NEXT_AS_FIRST_DIRECTIVE_WCHAR_H = @NEXT_AS_FIRST_DIRECTIVE_WCHAR_H@ @@ -1996,20 +2312,28 @@ NEXT_ERRNO_H = @NEXT_ERRNO_H@ NEXT_FCNTL_H = @NEXT_FCNTL_H@ NEXT_FLOAT_H = @NEXT_FLOAT_H@ +NEXT_FNMATCH_H = @NEXT_FNMATCH_H@ NEXT_GETOPT_H = @NEXT_GETOPT_H@ NEXT_ICONV_H = @NEXT_ICONV_H@ NEXT_INTTYPES_H = @NEXT_INTTYPES_H@ NEXT_LANGINFO_H = @NEXT_LANGINFO_H@ NEXT_LIMITS_H = @NEXT_LIMITS_H@ NEXT_LOCALE_H = @NEXT_LOCALE_H@ +NEXT_NETINET_IN_H = @NEXT_NETINET_IN_H@ +NEXT_SIGNAL_H = @NEXT_SIGNAL_H@ NEXT_STDARG_H = @NEXT_STDARG_H@ NEXT_STDDEF_H = @NEXT_STDDEF_H@ NEXT_STDINT_H = @NEXT_STDINT_H@ NEXT_STDIO_H = @NEXT_STDIO_H@ NEXT_STDLIB_H = @NEXT_STDLIB_H@ NEXT_STRING_H = @NEXT_STRING_H@ +NEXT_SYS_IOCTL_H = @NEXT_SYS_IOCTL_H@ +NEXT_SYS_SELECT_H = @NEXT_SYS_SELECT_H@ +NEXT_SYS_SOCKET_H = @NEXT_SYS_SOCKET_H@ NEXT_SYS_STAT_H = @NEXT_SYS_STAT_H@ +NEXT_SYS_TIME_H = @NEXT_SYS_TIME_H@ NEXT_SYS_TYPES_H = @NEXT_SYS_TYPES_H@ +NEXT_SYS_UIO_H = @NEXT_SYS_UIO_H@ NEXT_TIME_H = @NEXT_TIME_H@ NEXT_UNISTD_H = @NEXT_UNISTD_H@ NEXT_WCHAR_H = @NEXT_WCHAR_H@ @@ -2049,15 +2373,18 @@ REPLACE_DUP = @REPLACE_DUP@ REPLACE_DUP2 = @REPLACE_DUP2@ REPLACE_DUPLOCALE = @REPLACE_DUPLOCALE@ +REPLACE_FACCESSAT = @REPLACE_FACCESSAT@ REPLACE_FCHOWNAT = @REPLACE_FCHOWNAT@ REPLACE_FCLOSE = @REPLACE_FCLOSE@ REPLACE_FCNTL = @REPLACE_FCNTL@ REPLACE_FDOPEN = @REPLACE_FDOPEN@ REPLACE_FDOPENDIR = @REPLACE_FDOPENDIR@ REPLACE_FFLUSH = @REPLACE_FFLUSH@ +REPLACE_FNMATCH = @REPLACE_FNMATCH@ REPLACE_FOPEN = @REPLACE_FOPEN@ REPLACE_FPRINTF = @REPLACE_FPRINTF@ REPLACE_FPURGE = @REPLACE_FPURGE@ +REPLACE_FREELOCALE = @REPLACE_FREELOCALE@ REPLACE_FREOPEN = @REPLACE_FREOPEN@ REPLACE_FSEEK = @REPLACE_FSEEK@ REPLACE_FSEEKO = @REPLACE_FSEEKO@ @@ -2075,10 +2402,15 @@ REPLACE_GETLINE = @REPLACE_GETLINE@ REPLACE_GETLOGIN_R = @REPLACE_GETLOGIN_R@ REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@ +REPLACE_GETPASS = @REPLACE_GETPASS@ +REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@ REPLACE_GMTIME = @REPLACE_GMTIME@ REPLACE_ICONV = @REPLACE_ICONV@ REPLACE_ICONV_OPEN = @REPLACE_ICONV_OPEN@ REPLACE_ICONV_UTF = @REPLACE_ICONV_UTF@ +REPLACE_INET_NTOP = @REPLACE_INET_NTOP@ +REPLACE_INET_PTON = @REPLACE_INET_PTON@ +REPLACE_IOCTL = @REPLACE_IOCTL@ REPLACE_ISATTY = @REPLACE_ISATTY@ REPLACE_ISWBLANK = @REPLACE_ISWBLANK@ REPLACE_ISWCNTRL = @REPLACE_ISWCNTRL@ @@ -2107,6 +2439,7 @@ REPLACE_MKSTEMP = @REPLACE_MKSTEMP@ REPLACE_MKTIME = @REPLACE_MKTIME@ REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@ +REPLACE_NEWLOCALE = @REPLACE_NEWLOCALE@ REPLACE_NL_LANGINFO = @REPLACE_NL_LANGINFO@ REPLACE_NULL = @REPLACE_NULL@ REPLACE_OBSTACK_PRINTF = @REPLACE_OBSTACK_PRINTF@ @@ -2117,11 +2450,14 @@ REPLACE_POPEN = @REPLACE_POPEN@ REPLACE_PREAD = @REPLACE_PREAD@ REPLACE_PRINTF = @REPLACE_PRINTF@ +REPLACE_PSELECT = @REPLACE_PSELECT@ +REPLACE_PTHREAD_SIGMASK = @REPLACE_PTHREAD_SIGMASK@ REPLACE_PTSNAME = @REPLACE_PTSNAME@ REPLACE_PTSNAME_R = @REPLACE_PTSNAME_R@ REPLACE_PUTENV = @REPLACE_PUTENV@ REPLACE_PWRITE = @REPLACE_PWRITE@ REPLACE_QSORT_R = @REPLACE_QSORT_R@ +REPLACE_RAISE = @REPLACE_RAISE@ REPLACE_RANDOM_R = @REPLACE_RANDOM_R@ REPLACE_READ = @REPLACE_READ@ REPLACE_READLINK = @REPLACE_READLINK@ @@ -2132,6 +2468,7 @@ REPLACE_RENAME = @REPLACE_RENAME@ REPLACE_RENAMEAT = @REPLACE_RENAMEAT@ REPLACE_RMDIR = @REPLACE_RMDIR@ +REPLACE_SELECT = @REPLACE_SELECT@ REPLACE_SETENV = @REPLACE_SETENV@ REPLACE_SETLOCALE = @REPLACE_SETLOCALE@ REPLACE_SLEEP = @REPLACE_SLEEP@ @@ -2157,6 +2494,7 @@ REPLACE_STRTOK_R = @REPLACE_STRTOK_R@ REPLACE_STRTOUMAX = @REPLACE_STRTOUMAX@ REPLACE_STRUCT_LCONV = @REPLACE_STRUCT_LCONV@ +REPLACE_STRUCT_TIMEVAL = @REPLACE_STRUCT_TIMEVAL@ REPLACE_SYMLINK = @REPLACE_SYMLINK@ REPLACE_SYMLINKAT = @REPLACE_SYMLINKAT@ REPLACE_TIMEGM = @REPLACE_TIMEGM@ @@ -2196,6 +2534,8 @@ STDDEF_H = @STDDEF_H@ STDINT_H = @STDINT_H@ STRIP = @STRIP@ +SYS_IOCTL_H_HAVE_WINSOCK2_H = @SYS_IOCTL_H_HAVE_WINSOCK2_H@ +SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@ SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@ TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@ UINT32_MAX_LT_UINTMAX_MAX = @UINT32_MAX_LT_UINTMAX_MAX@ @@ -2224,6 +2564,7 @@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ +am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ @@ -2274,11 +2615,12 @@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -AUTOMAKE_OPTIONS = 1.9.6 foreign subdir-objects +AUTOMAKE_OPTIONS = 1.11 foreign subdir-objects SUBDIRS = . TESTS_ENVIRONMENT = EXEEXT='@EXEEXT@' srcdir='$(srcdir)' \ LOCALE_FR='@LOCALE_FR@' LOCALE_FR_UTF8='@LOCALE_FR_UTF8@' \ - LOCALE_FR='@LOCALE_FR@' LOCALE_TR_UTF8='@LOCALE_TR_UTF8@' \ + LIBSIGSEGV='@LIBSIGSEGV@' LOCALE_FR='@LOCALE_FR@' \ + LOCALE_TR_UTF8='@LOCALE_TR_UTF8@' \ LOCALE_TR_UTF8='@LOCALE_TR_UTF8@' \ LOCALE_FR_UTF8='@LOCALE_FR_UTF8@' LOCALE_FR='@LOCALE_FR@' \ LOCALE_FR_UTF8='@LOCALE_FR_UTF8@' LOCALE_JA='@LOCALE_JA@' \ @@ -2294,81 +2636,106 @@ noinst_HEADERS = noinst_LIBRARIES = check_LIBRARIES = libtests.a -EXTRA_DIST = test-alignof.c test-alloca-opt.c test-argmatch.c macros.h \ - test-binary-io.sh test-binary-io.c macros.h test-bitrotate.c \ - macros.h test-btowc1.sh test-btowc2.sh test-btowc.c \ - signature.h macros.h test-c-ctype.c macros.h test-c-strcase.sh \ +EXTRA_DIST = accept.c w32sock.h test-accept.c signature.h macros.h \ + test-alignof.c test-alloca-opt.c test-argmatch.c macros.h \ + arpa_inet.in.h test-arpa_inet.c test-binary-io.sh \ + test-binary-io.c macros.h bind.c w32sock.h test-bind.c \ + signature.h macros.h test-bitrotate.c macros.h test-btowc1.sh \ + test-btowc2.sh test-btowc.c signature.h macros.h \ + test-c-ctype.c macros.h test-c-stack.c test-c-stack.sh \ + test-c-stack2.sh macros.h test-c-strcase.sh \ test-c-strcasecmp.c test-c-strncasecmp.c macros.h test-chdir.c \ signature.h macros.h test-cloexec.c macros.h test-close.c \ + signature.h macros.h connect.c w32sock.h test-connect.c \ signature.h macros.h test-ctype.c dfa-match.sh dfa-match-aux.c \ - dfa-invalid-char-class.sh test-dirent-safer.c macros.h \ - test-dirent.c test-dup.c signature.h macros.h test-dup2.c \ - signature.h macros.h test-environ.c test-errno.c \ - test-exclude.c test-exclude1.sh test-exclude2.sh \ + dfa-invalid-char-class.sh test-dirent.c test-dup.c signature.h \ + macros.h test-dup2.c signature.h macros.h test-environ.c \ + test-errno.c test-exclude.c test-exclude1.sh test-exclude2.sh \ test-exclude3.sh test-exclude4.sh test-exclude5.sh \ test-exclude6.sh test-exclude7.sh test-exclude8.sh \ test-fchdir.c signature.h macros.h test-fcntl-h.c test-open.h \ test-fcntl-safer.c macros.h test-fcntl.c signature.h macros.h \ fdopen.c test-fdopen.c signature.h macros.h test-fdopendir.c \ signature.h macros.h test-fgetc.c signature.h macros.h float.c \ - float.in.h itold.c test-float.c macros.h test-fnmatch.c \ - signature.h macros.h test-fpending.c test-fpending.sh macros.h \ - fpucw.h test-fputc.c signature.h macros.h test-fread.c \ - signature.h macros.h test-fstat.c signature.h macros.h \ - test-fstatat.c test-lstat.h test-stat.h signature.h macros.h \ - test-fwrite.c signature.h macros.h test-getcwd-lgpl.c \ - signature.h macros.h test-getdtablesize.c signature.h macros.h \ - macros.h signature.h test-getopt-gnu.c test-getopt-main.h \ - test-getopt.h test-getopt_long.h macros.h signature.h \ - test-getopt-posix.c test-getopt-main.h test-getopt.h \ - test-getprogname.c test-hash.c macros.h test-i-ring.c macros.h \ - test-iconv-h.c test-iconv.c signature.h macros.h \ - test-ignore-value.c test-intprops.c macros.h anytostr.c \ - inttostr.h macros.h test-inttostr.c test-inttypes.c \ + float.in.h itold.c test-float.c macros.h test-fnmatch-h.c \ + test-fnmatch.c signature.h macros.h test-fpending.c \ + test-fpending.sh macros.h fpucw.h test-fputc.c signature.h \ + macros.h test-fread.c signature.h macros.h test-fstat.c \ + signature.h macros.h test-fstatat.c test-lstat.h test-stat.h \ + signature.h macros.h ftruncate.c test-ftruncate.c \ + test-ftruncate.sh signature.h macros.h test-fwrite.c \ + signature.h macros.h test-getcwd-lgpl.c signature.h macros.h \ + test-getdtablesize.c signature.h macros.h macros.h signature.h \ + test-getopt-gnu.c test-getopt-main.h test-getopt.h \ + test-getopt_long.h macros.h signature.h test-getopt-posix.c \ + test-getopt-main.h test-getopt.h test-getprogname.c \ + gettimeofday.c signature.h test-gettimeofday.c test-hash.c \ + macros.h test-i-ring.c macros.h test-iconv-h.c test-iconv.c \ + signature.h macros.h test-ignore-value.c inet_pton.c \ + test-inet_pton.c signature.h macros.h test-intprops.c macros.h \ + anytostr.c inttostr.h macros.h test-inttostr.c test-inttypes.c \ + ioctl.c w32sock.h test-ioctl.c signature.h macros.h \ test-isatty.c signature.h macros.h test-isblank.c signature.h \ macros.h test-iswblank.c macros.h test-langinfo.c \ - test-limits-h.c test-locale.c test-localeconv.c signature.h \ - macros.h localename.h test-localename.c macros.h test-lseek.c \ - test-lseek.sh signature.h macros.h test-lstat.h test-lstat.c \ - signature.h macros.h test-malloc-gnu.c test-malloca.c \ - test-mbscasecmp.sh test-mbscasecmp.c macros.h test-mbsinit.sh \ - test-mbsinit.c signature.h macros.h test-mbsrtowcs1.sh \ - test-mbsrtowcs2.sh test-mbsrtowcs3.sh test-mbsrtowcs4.sh \ - test-mbsrtowcs.c signature.h macros.h test-mbsstr1.c \ - test-mbsstr2.sh test-mbsstr2.c test-mbsstr3.sh test-mbsstr3.c \ - macros.h test-memchr.c zerosize-ptr.h signature.h macros.h \ + test-limits-h.c listen.c w32sock.h test-listen.c signature.h \ + macros.h test-localcharset.c test-locale.c test-localeconv.c \ + signature.h macros.h localename-table.h localename.h \ + test-localename.c macros.h localtime-buffer.c \ + localtime-buffer.h test-lseek.c test-lseek.sh signature.h \ + macros.h test-lstat.h test-lstat.c signature.h macros.h \ + test-malloc-gnu.c test-malloca.c test-mbscasecmp.sh \ + test-mbscasecmp.c macros.h test-mbsinit.sh test-mbsinit.c \ + signature.h macros.h test-mbsrtowcs1.sh test-mbsrtowcs2.sh \ + test-mbsrtowcs3.sh test-mbsrtowcs4.sh test-mbsrtowcs.c \ + signature.h macros.h test-mbsstr1.c test-mbsstr2.sh \ + test-mbsstr2.c test-mbsstr3.sh test-mbsstr3.c macros.h \ + test-memchr.c zerosize-ptr.h signature.h macros.h \ test-memchr2.c zerosize-ptr.h macros.h test-memrchr.c \ - zerosize-ptr.h signature.h macros.h test-nl_langinfo.sh \ - test-nl_langinfo.c signature.h macros.h test-open.h \ - test-open.c signature.h macros.h test-openat-safer.c macros.h \ - test-openat.c test-open.h signature.h macros.h test-pathmax.c \ - pipe.c test-pipe.c signature.h macros.h putenv.c \ - test-quotearg-simple.c test-quotearg.h macros.h zerosize-ptr.h \ - test-read.c signature.h macros.h test-realloc-gnu.c \ - test-regex.c macros.h setenv.c test-setenv.c signature.h \ + zerosize-ptr.h signature.h macros.h nanosleep.c \ + test-nanosleep.c signature.h macros.h netinet_in.in.h \ + test-netinet_in.c test-nl_langinfo.sh test-nl_langinfo.c \ + signature.h macros.h test-open.h test-open.c signature.h \ + macros.h test-openat-safer.c macros.h test-openat.c \ + test-open.h signature.h macros.h test-pathmax.c perror.c \ + macros.h signature.h test-perror.c test-perror2.c \ + test-perror.sh pipe.c test-pipe.c signature.h macros.h \ + putenv.c test-quotearg-simple.c test-quotearg.h macros.h \ + zerosize-ptr.h test-raise.c signature.h macros.h test-read.c \ + signature.h macros.h test-realloc-gnu.c test-regex.c macros.h \ + select.c macros.h signature.h test-select.c test-select.h \ + test-select-fd.c test-select-in.sh test-select-out.sh \ + test-select-stdin.c setenv.c test-setenv.c signature.h \ macros.h setlocale.c test-setlocale1.sh test-setlocale1.c \ test-setlocale2.sh test-setlocale2.c signature.h macros.h \ - _Noreturn.h arg-nonnull.h c++defs.h unused-parameter.h \ - warn-on-use.h snprintf.c test-snprintf.c signature.h macros.h \ - test-stat.h test-stat.c signature.h macros.h test-stdalign.c \ - macros.h test-stdbool.c test-stddef.c test-stdint.c \ - test-stdio.c test-stdlib.c test-sys_wait.h test-strerror.c \ - signature.h macros.h test-striconv.c macros.h test-string.c \ - test-strnlen.c zerosize-ptr.h signature.h macros.h \ - test-strstr.c zerosize-ptr.h signature.h macros.h \ - test-strtoimax.c signature.h macros.h test-strtoll.c \ - signature.h macros.h test-strtoull.c signature.h macros.h \ - test-strtoumax.c signature.h macros.h symlink.c test-symlink.h \ - test-symlink.c signature.h macros.h test-sys_stat.c \ - test-sys_types.c init.sh test-init.sh test-time.c \ - test-dup-safer.c macros.h test-unistd.c \ - unistr/test-u8-mbtoucr.c macros.h unistr/test-u8-uctomb.c \ - macros.h uniwidth/test-uc_width.c uniwidth/test-uc_width2.c \ - uniwidth/test-uc_width2.sh macros.h unsetenv.c test-unsetenv.c \ - signature.h macros.h asnprintf.c float+.h printf-args.c \ - printf-args.h printf-parse.c printf-parse.h vasnprintf.c \ - vasnprintf.h test-vasnprintf.c macros.h \ - test-vc-list-files-git.sh test-vc-list-files-cvs.sh \ + setsockopt.c w32sock.h test-setsockopt.c signature.h macros.h \ + test-sigaction.c signature.h macros.h test-signal-h.c \ + test-sigprocmask.c signature.h macros.h sleep.c test-sleep.c \ + signature.h macros.h _Noreturn.h arg-nonnull.h c++defs.h \ + unused-parameter.h warn-on-use.h snprintf.c test-snprintf.c \ + signature.h macros.h socket.c w32sock.h w32sock.h \ + test-sockets.c test-stat.h test-stat.c signature.h macros.h \ + test-stat-time.c macros.h nap.h test-stdalign.c macros.h \ + test-stdbool.c test-stddef.c test-stdint.c test-stdio.c \ + test-stdlib.c test-sys_wait.h test-strerror.c signature.h \ + macros.h strerror_r.c test-strerror_r.c signature.h macros.h \ + test-striconv.c macros.h test-string.c test-strnlen.c \ + zerosize-ptr.h signature.h macros.h test-strstr.c \ + zerosize-ptr.h signature.h macros.h test-strtoimax.c \ + signature.h macros.h test-strtoll.c signature.h macros.h \ + test-strtoull.c signature.h macros.h test-strtoumax.c \ + signature.h macros.h symlink.c test-symlink.h test-symlink.c \ + signature.h macros.h sys_ioctl.in.h test-sys_ioctl.c \ + sys_select.in.h test-sys_select.c signature.h sys_socket.in.h \ + test-sys_socket.c test-sys_stat.c sys_time.in.h \ + test-sys_time.c test-sys_types.c sys_uio.in.h test-sys_uio.c \ + init.sh test-init.sh test-time.c test-dup-safer.c macros.h \ + test-unistd.c unistr/test-u8-mbtoucr.c macros.h \ + unistr/test-u8-uctomb.c macros.h uniwidth/test-uc_width.c \ + uniwidth/test-uc_width2.c uniwidth/test-uc_width2.sh macros.h \ + unsetenv.c test-unsetenv.c signature.h macros.h asnprintf.c \ + float+.h printf-args.c printf-args.h printf-parse.c \ + printf-parse.h vasnprintf.c vasnprintf.h test-vasnprintf.c \ + macros.h test-vc-list-files-git.sh test-vc-list-files-cvs.sh \ test-verify.c test-verify-try.c test-verify.sh \ test-version-etc.c test-version-etc.sh test-wchar.c \ test-wcrtomb.sh test-wcrtomb.c test-wcrtomb-w32-1.sh \ @@ -2378,15 +2745,20 @@ signature.h macros.h test-xalloc-die.c test-xalloc-die.sh \ test-xstrtoimax.c test-xstrtoimax.sh test-xstrtol.c \ test-xstrtoul.c test-xstrtol.sh -BUILT_SOURCES = $(FLOAT_H) +BUILT_SOURCES = arpa/inet.h $(FLOAT_H) $(NETINET_IN_H) sys/ioctl.h \ + sys/select.h sys/socket.h sys/time.h sys/uio.h SUFFIXES = # This test expects compilation of test-verify-try.c to fail, and # each time it fails, the makefile rule does not perform the usual # "mv -f $name.Tpo $name.po, so tell make clean to remove that file. -MOSTLYCLEANFILES = core *.stackdump float.h float.h-t test-fpending.t \ +MOSTLYCLEANFILES = core *.stackdump arpa/inet.h arpa/inet.h-t \ + t-c-stack.tmp t-c-stack2.tmp float.h float.h-t test-fpending.t \ + netinet/in.h netinet/in.h-t sys/ioctl.h sys/ioctl.h-t \ + sys/select.h sys/select.h-t sys/socket.h sys/socket.h-t \ + sys/time.h sys/time.h-t sys/uio.h sys/uio.h-t \ .deps/test-verify-try.Tpo -MOSTLYCLEANDIRS = +MOSTLYCLEANDIRS = arpa netinet sys sys sys sys CLEANFILES = DISTCLEANFILES = MAINTAINERCLEANFILES = @@ -2397,20 +2769,25 @@ -I../lib -I$(srcdir)/../lib LDADD = libtests.a ../lib/libgreputils.a libtests.a $(LIBTESTS_LIBDEPS) -libtests_a_SOURCES = fd-safer-flag.c dup-safer-flag.c hash-pjw.h \ - hash-pjw.c imaxtostr.c inttostr.c offtostr.c uinttostr.c \ - umaxtostr.c localename.c size_max.h xsize.h xsize.c +libtests_a_SOURCES = hash-pjw.h hash-pjw.c imaxtostr.c inttostr.c \ + offtostr.c uinttostr.c umaxtostr.c localename.c \ + localename-table.c size_max.h sockets.h sockets.c sys_socket.c \ + xsize.h xsize.c libtests_a_LIBADD = $(gltests_LIBOBJS) libtests_a_DEPENDENCIES = $(gltests_LIBOBJS) -EXTRA_libtests_a_SOURCES = fdopen.c float.c itold.c anytostr.c pipe.c \ - putenv.c setenv.c setlocale.c snprintf.c symlink.c unsetenv.c \ +EXTRA_libtests_a_SOURCES = accept.c bind.c connect.c fdopen.c float.c \ + itold.c ftruncate.c gettimeofday.c inet_pton.c anytostr.c \ + ioctl.c listen.c localtime-buffer.c nanosleep.c perror.c \ + pipe.c putenv.c select.c setenv.c setlocale.c setsockopt.c \ + sleep.c snprintf.c socket.c strerror_r.c symlink.c unsetenv.c \ asnprintf.c printf-args.c printf-parse.c vasnprintf.c AM_LIBTOOLFLAGS = --preserve-dup-deps +test_accept_LDADD = $(LDADD) @LIBSOCKET@ test_argmatch_LDADD = $(LDADD) @LIBINTL@ +test_bind_LDADD = $(LDADD) @LIBSOCKET@ $(INET_PTON_LIB) +test_c_stack_LDADD = $(LDADD) $(LIBCSTACK) @LIBINTL@ +test_connect_LDADD = $(LDADD) @LIBSOCKET@ $(INET_PTON_LIB) dfa_match_aux_LDADD = $(LDADD) @LIBINTL@ -# Link with libintl when needed. dirent-safer uses fdopendir if it is present, -# and fdopendir indirectly depends on openat-die -> gettext-h. -test_dirent_safer_LDADD = $(LDADD) $(LIBINTL) test_exclude_LDADD = $(LDADD) @LIBINTL@ $(LIBTHREAD) test_fchdir_LDADD = $(LDADD) $(LIBINTL) test_fdopendir_LDADD = $(LDADD) @LIBINTL@ @@ -2420,11 +2797,18 @@ test_getopt_posix_LDADD = $(LDADD) $(LIBINTL) test_getprogname_LDADD = $(LDADD) test_iconv_LDADD = $(LDADD) @LIBICONV@ +test_inet_pton_LDADD = $(LDADD) @INET_PTON_LIB@ +test_listen_LDADD = $(LDADD) @LIBSOCKET@ test_localename_LDADD = $(LDADD) @INTL_MACOSX_LIBS@ $(LIBTHREAD) +test_nanosleep_LDADD = $(LDADD) $(LIB_NANOSLEEP) test_openat_safer_LDADD = $(LDADD) @LIBINTL@ test_openat_LDADD = $(LDADD) @LIBINTL@ test_quotearg_simple_LDADD = $(LDADD) @LIBINTL@ test_regex_LDADD = $(LDADD) @LIBINTL@ $(LIBTHREAD) $(LIB_PTHREAD) +test_select_LDADD = $(LDADD) @LIB_SELECT@ @LIBSOCKET@ $(INET_PTON_LIB) +test_select_fd_LDADD = $(LDADD) @LIB_SELECT@ +test_select_stdin_LDADD = $(LDADD) @LIB_SELECT@ +test_setsockopt_LDADD = $(LDADD) @LIBSOCKET@ # Because this Makefile snippet defines a variable used by other # gnulib Makefile snippets, it must be present in all makefiles that @@ -2450,7 +2834,9 @@ # 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 +test_sockets_LDADD = $(LDADD) @LIBSOCKET@ test_stat_LDADD = $(LDADD) $(LIBINTL) +test_stat_time_LDADD = $(LDADD) $(LIB_NANOSLEEP) test_striconv_LDADD = $(LDADD) @LIBICONV@ test_u8_mbtoucr_SOURCES = unistr/test-u8-mbtoucr.c test_u8_mbtoucr_LDADD = $(LDADD) $(LIBUNISTRING) @@ -2461,6 +2847,7 @@ test_uc_width2_SOURCES = uniwidth/test-uc_width2.c test_uc_width2_LDADD = $(LDADD) $(LIBUNISTRING) test_version_etc_LDADD = $(LDADD) @LIBINTL@ +test_wcwidth_LDADD = $(LDADD) $(LIBUNISTRING) test_xalloc_die_LDADD = $(LDADD) @LIBINTL@ test_xstrtoimax_LDADD = $(LDADD) @LIBINTL@ test_xstrtol_LDADD = $(LDADD) @LIBINTL@ @@ -2501,6 +2888,12 @@ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): +clean-checkPROGRAMS: + -test -z "$(check_PROGRAMS)" || rm -f $(check_PROGRAMS) + +clean-noinstPROGRAMS: + -test -z "$(noinst_PROGRAMS)" || rm -f $(noinst_PROGRAMS) + clean-checkLIBRARIES: -test -z "$(check_LIBRARIES)" || rm -f $(check_LIBRARIES) @@ -2512,16 +2905,14 @@ $(AM_V_AR)$(libtests_a_AR) libtests.a $(libtests_a_OBJECTS) $(libtests_a_LIBADD) $(AM_V_at)$(RANLIB) libtests.a -clean-checkPROGRAMS: - -test -z "$(check_PROGRAMS)" || rm -f $(check_PROGRAMS) - -clean-noinstPROGRAMS: - -test -z "$(noinst_PROGRAMS)" || rm -f $(noinst_PROGRAMS) - dfa-match-aux$(EXEEXT): $(dfa_match_aux_OBJECTS) $(dfa_match_aux_DEPENDENCIES) $(EXTRA_dfa_match_aux_DEPENDENCIES) @rm -f dfa-match-aux$(EXEEXT) $(AM_V_CCLD)$(LINK) $(dfa_match_aux_OBJECTS) $(dfa_match_aux_LDADD) $(LIBS) +test-accept$(EXEEXT): $(test_accept_OBJECTS) $(test_accept_DEPENDENCIES) $(EXTRA_test_accept_DEPENDENCIES) + @rm -f test-accept$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(test_accept_OBJECTS) $(test_accept_LDADD) $(LIBS) + test-alignof$(EXEEXT): $(test_alignof_OBJECTS) $(test_alignof_DEPENDENCIES) $(EXTRA_test_alignof_DEPENDENCIES) @rm -f test-alignof$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_alignof_OBJECTS) $(test_alignof_LDADD) $(LIBS) @@ -2534,10 +2925,18 @@ @rm -f test-argmatch$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_argmatch_OBJECTS) $(test_argmatch_LDADD) $(LIBS) +test-arpa_inet$(EXEEXT): $(test_arpa_inet_OBJECTS) $(test_arpa_inet_DEPENDENCIES) $(EXTRA_test_arpa_inet_DEPENDENCIES) + @rm -f test-arpa_inet$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(test_arpa_inet_OBJECTS) $(test_arpa_inet_LDADD) $(LIBS) + test-binary-io$(EXEEXT): $(test_binary_io_OBJECTS) $(test_binary_io_DEPENDENCIES) $(EXTRA_test_binary_io_DEPENDENCIES) @rm -f test-binary-io$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_binary_io_OBJECTS) $(test_binary_io_LDADD) $(LIBS) +test-bind$(EXEEXT): $(test_bind_OBJECTS) $(test_bind_DEPENDENCIES) $(EXTRA_test_bind_DEPENDENCIES) + @rm -f test-bind$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(test_bind_OBJECTS) $(test_bind_LDADD) $(LIBS) + test-bitrotate$(EXEEXT): $(test_bitrotate_OBJECTS) $(test_bitrotate_DEPENDENCIES) $(EXTRA_test_bitrotate_DEPENDENCIES) @rm -f test-bitrotate$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_bitrotate_OBJECTS) $(test_bitrotate_LDADD) $(LIBS) @@ -2550,6 +2949,10 @@ @rm -f test-c-ctype$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_c_ctype_OBJECTS) $(test_c_ctype_LDADD) $(LIBS) +test-c-stack$(EXEEXT): $(test_c_stack_OBJECTS) $(test_c_stack_DEPENDENCIES) $(EXTRA_test_c_stack_DEPENDENCIES) + @rm -f test-c-stack$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(test_c_stack_OBJECTS) $(test_c_stack_LDADD) $(LIBS) + test-c-strcasecmp$(EXEEXT): $(test_c_strcasecmp_OBJECTS) $(test_c_strcasecmp_DEPENDENCIES) $(EXTRA_test_c_strcasecmp_DEPENDENCIES) @rm -f test-c-strcasecmp$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_c_strcasecmp_OBJECTS) $(test_c_strcasecmp_LDADD) $(LIBS) @@ -2570,6 +2973,10 @@ @rm -f test-close$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_close_OBJECTS) $(test_close_LDADD) $(LIBS) +test-connect$(EXEEXT): $(test_connect_OBJECTS) $(test_connect_DEPENDENCIES) $(EXTRA_test_connect_DEPENDENCIES) + @rm -f test-connect$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(test_connect_OBJECTS) $(test_connect_LDADD) $(LIBS) + test-ctype$(EXEEXT): $(test_ctype_OBJECTS) $(test_ctype_DEPENDENCIES) $(EXTRA_test_ctype_DEPENDENCIES) @rm -f test-ctype$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_ctype_OBJECTS) $(test_ctype_LDADD) $(LIBS) @@ -2578,10 +2985,6 @@ @rm -f test-dirent$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_dirent_OBJECTS) $(test_dirent_LDADD) $(LIBS) -test-dirent-safer$(EXEEXT): $(test_dirent_safer_OBJECTS) $(test_dirent_safer_DEPENDENCIES) $(EXTRA_test_dirent_safer_DEPENDENCIES) - @rm -f test-dirent-safer$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(test_dirent_safer_OBJECTS) $(test_dirent_safer_LDADD) $(LIBS) - test-dup$(EXEEXT): $(test_dup_OBJECTS) $(test_dup_DEPENDENCIES) $(EXTRA_test_dup_DEPENDENCIES) @rm -f test-dup$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_dup_OBJECTS) $(test_dup_LDADD) $(LIBS) @@ -2642,6 +3045,10 @@ @rm -f test-fnmatch$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_fnmatch_OBJECTS) $(test_fnmatch_LDADD) $(LIBS) +test-fnmatch-h$(EXEEXT): $(test_fnmatch_h_OBJECTS) $(test_fnmatch_h_DEPENDENCIES) $(EXTRA_test_fnmatch_h_DEPENDENCIES) + @rm -f test-fnmatch-h$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(test_fnmatch_h_OBJECTS) $(test_fnmatch_h_LDADD) $(LIBS) + test-fpending$(EXEEXT): $(test_fpending_OBJECTS) $(test_fpending_DEPENDENCIES) $(EXTRA_test_fpending_DEPENDENCIES) @rm -f test-fpending$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_fpending_OBJECTS) $(test_fpending_LDADD) $(LIBS) @@ -2662,6 +3069,10 @@ @rm -f test-fstatat$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_fstatat_OBJECTS) $(test_fstatat_LDADD) $(LIBS) +test-ftruncate$(EXEEXT): $(test_ftruncate_OBJECTS) $(test_ftruncate_DEPENDENCIES) $(EXTRA_test_ftruncate_DEPENDENCIES) + @rm -f test-ftruncate$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(test_ftruncate_OBJECTS) $(test_ftruncate_LDADD) $(LIBS) + test-fwrite$(EXEEXT): $(test_fwrite_OBJECTS) $(test_fwrite_DEPENDENCIES) $(EXTRA_test_fwrite_DEPENDENCIES) @rm -f test-fwrite$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_fwrite_OBJECTS) $(test_fwrite_LDADD) $(LIBS) @@ -2686,6 +3097,10 @@ @rm -f test-getprogname$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_getprogname_OBJECTS) $(test_getprogname_LDADD) $(LIBS) +test-gettimeofday$(EXEEXT): $(test_gettimeofday_OBJECTS) $(test_gettimeofday_DEPENDENCIES) $(EXTRA_test_gettimeofday_DEPENDENCIES) + @rm -f test-gettimeofday$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(test_gettimeofday_OBJECTS) $(test_gettimeofday_LDADD) $(LIBS) + test-hash$(EXEEXT): $(test_hash_OBJECTS) $(test_hash_DEPENDENCIES) $(EXTRA_test_hash_DEPENDENCIES) @rm -f test-hash$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_hash_OBJECTS) $(test_hash_LDADD) $(LIBS) @@ -2706,6 +3121,10 @@ @rm -f test-ignore-value$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_ignore_value_OBJECTS) $(test_ignore_value_LDADD) $(LIBS) +test-inet_pton$(EXEEXT): $(test_inet_pton_OBJECTS) $(test_inet_pton_DEPENDENCIES) $(EXTRA_test_inet_pton_DEPENDENCIES) + @rm -f test-inet_pton$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(test_inet_pton_OBJECTS) $(test_inet_pton_LDADD) $(LIBS) + test-intprops$(EXEEXT): $(test_intprops_OBJECTS) $(test_intprops_DEPENDENCIES) $(EXTRA_test_intprops_DEPENDENCIES) @rm -f test-intprops$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_intprops_OBJECTS) $(test_intprops_LDADD) $(LIBS) @@ -2718,6 +3137,10 @@ @rm -f test-inttypes$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_inttypes_OBJECTS) $(test_inttypes_LDADD) $(LIBS) +test-ioctl$(EXEEXT): $(test_ioctl_OBJECTS) $(test_ioctl_DEPENDENCIES) $(EXTRA_test_ioctl_DEPENDENCIES) + @rm -f test-ioctl$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(test_ioctl_OBJECTS) $(test_ioctl_LDADD) $(LIBS) + test-isatty$(EXEEXT): $(test_isatty_OBJECTS) $(test_isatty_DEPENDENCIES) $(EXTRA_test_isatty_DEPENDENCIES) @rm -f test-isatty$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_isatty_OBJECTS) $(test_isatty_LDADD) $(LIBS) @@ -2738,6 +3161,14 @@ @rm -f test-limits-h$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_limits_h_OBJECTS) $(test_limits_h_LDADD) $(LIBS) +test-listen$(EXEEXT): $(test_listen_OBJECTS) $(test_listen_DEPENDENCIES) $(EXTRA_test_listen_DEPENDENCIES) + @rm -f test-listen$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(test_listen_OBJECTS) $(test_listen_LDADD) $(LIBS) + +test-localcharset$(EXEEXT): $(test_localcharset_OBJECTS) $(test_localcharset_DEPENDENCIES) $(EXTRA_test_localcharset_DEPENDENCIES) + @rm -f test-localcharset$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(test_localcharset_OBJECTS) $(test_localcharset_LDADD) $(LIBS) + test-locale$(EXEEXT): $(test_locale_OBJECTS) $(test_locale_DEPENDENCIES) $(EXTRA_test_locale_DEPENDENCIES) @rm -f test-locale$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_locale_OBJECTS) $(test_locale_LDADD) $(LIBS) @@ -2802,6 +3233,14 @@ @rm -f test-memrchr$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_memrchr_OBJECTS) $(test_memrchr_LDADD) $(LIBS) +test-nanosleep$(EXEEXT): $(test_nanosleep_OBJECTS) $(test_nanosleep_DEPENDENCIES) $(EXTRA_test_nanosleep_DEPENDENCIES) + @rm -f test-nanosleep$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(test_nanosleep_OBJECTS) $(test_nanosleep_LDADD) $(LIBS) + +test-netinet_in$(EXEEXT): $(test_netinet_in_OBJECTS) $(test_netinet_in_DEPENDENCIES) $(EXTRA_test_netinet_in_DEPENDENCIES) + @rm -f test-netinet_in$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(test_netinet_in_OBJECTS) $(test_netinet_in_LDADD) $(LIBS) + test-nl_langinfo$(EXEEXT): $(test_nl_langinfo_OBJECTS) $(test_nl_langinfo_DEPENDENCIES) $(EXTRA_test_nl_langinfo_DEPENDENCIES) @rm -f test-nl_langinfo$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_nl_langinfo_OBJECTS) $(test_nl_langinfo_LDADD) $(LIBS) @@ -2822,6 +3261,14 @@ @rm -f test-pathmax$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_pathmax_OBJECTS) $(test_pathmax_LDADD) $(LIBS) +test-perror$(EXEEXT): $(test_perror_OBJECTS) $(test_perror_DEPENDENCIES) $(EXTRA_test_perror_DEPENDENCIES) + @rm -f test-perror$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(test_perror_OBJECTS) $(test_perror_LDADD) $(LIBS) + +test-perror2$(EXEEXT): $(test_perror2_OBJECTS) $(test_perror2_DEPENDENCIES) $(EXTRA_test_perror2_DEPENDENCIES) + @rm -f test-perror2$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(test_perror2_OBJECTS) $(test_perror2_LDADD) $(LIBS) + test-pipe$(EXEEXT): $(test_pipe_OBJECTS) $(test_pipe_DEPENDENCIES) $(EXTRA_test_pipe_DEPENDENCIES) @rm -f test-pipe$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_pipe_OBJECTS) $(test_pipe_LDADD) $(LIBS) @@ -2830,6 +3277,10 @@ @rm -f test-quotearg-simple$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_quotearg_simple_OBJECTS) $(test_quotearg_simple_LDADD) $(LIBS) +test-raise$(EXEEXT): $(test_raise_OBJECTS) $(test_raise_DEPENDENCIES) $(EXTRA_test_raise_DEPENDENCIES) + @rm -f test-raise$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(test_raise_OBJECTS) $(test_raise_LDADD) $(LIBS) + test-read$(EXEEXT): $(test_read_OBJECTS) $(test_read_DEPENDENCIES) $(EXTRA_test_read_DEPENDENCIES) @rm -f test-read$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_read_OBJECTS) $(test_read_LDADD) $(LIBS) @@ -2842,6 +3293,18 @@ @rm -f test-regex$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_regex_OBJECTS) $(test_regex_LDADD) $(LIBS) +test-select$(EXEEXT): $(test_select_OBJECTS) $(test_select_DEPENDENCIES) $(EXTRA_test_select_DEPENDENCIES) + @rm -f test-select$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(test_select_OBJECTS) $(test_select_LDADD) $(LIBS) + +test-select-fd$(EXEEXT): $(test_select_fd_OBJECTS) $(test_select_fd_DEPENDENCIES) $(EXTRA_test_select_fd_DEPENDENCIES) + @rm -f test-select-fd$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(test_select_fd_OBJECTS) $(test_select_fd_LDADD) $(LIBS) + +test-select-stdin$(EXEEXT): $(test_select_stdin_OBJECTS) $(test_select_stdin_DEPENDENCIES) $(EXTRA_test_select_stdin_DEPENDENCIES) + @rm -f test-select-stdin$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(test_select_stdin_OBJECTS) $(test_select_stdin_LDADD) $(LIBS) + test-setenv$(EXEEXT): $(test_setenv_OBJECTS) $(test_setenv_DEPENDENCIES) $(EXTRA_test_setenv_DEPENDENCIES) @rm -f test-setenv$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_setenv_OBJECTS) $(test_setenv_LDADD) $(LIBS) @@ -2854,14 +3317,42 @@ @rm -f test-setlocale2$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_setlocale2_OBJECTS) $(test_setlocale2_LDADD) $(LIBS) +test-setsockopt$(EXEEXT): $(test_setsockopt_OBJECTS) $(test_setsockopt_DEPENDENCIES) $(EXTRA_test_setsockopt_DEPENDENCIES) + @rm -f test-setsockopt$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(test_setsockopt_OBJECTS) $(test_setsockopt_LDADD) $(LIBS) + +test-sigaction$(EXEEXT): $(test_sigaction_OBJECTS) $(test_sigaction_DEPENDENCIES) $(EXTRA_test_sigaction_DEPENDENCIES) + @rm -f test-sigaction$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(test_sigaction_OBJECTS) $(test_sigaction_LDADD) $(LIBS) + +test-signal-h$(EXEEXT): $(test_signal_h_OBJECTS) $(test_signal_h_DEPENDENCIES) $(EXTRA_test_signal_h_DEPENDENCIES) + @rm -f test-signal-h$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(test_signal_h_OBJECTS) $(test_signal_h_LDADD) $(LIBS) + +test-sigprocmask$(EXEEXT): $(test_sigprocmask_OBJECTS) $(test_sigprocmask_DEPENDENCIES) $(EXTRA_test_sigprocmask_DEPENDENCIES) + @rm -f test-sigprocmask$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(test_sigprocmask_OBJECTS) $(test_sigprocmask_LDADD) $(LIBS) + +test-sleep$(EXEEXT): $(test_sleep_OBJECTS) $(test_sleep_DEPENDENCIES) $(EXTRA_test_sleep_DEPENDENCIES) + @rm -f test-sleep$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(test_sleep_OBJECTS) $(test_sleep_LDADD) $(LIBS) + test-snprintf$(EXEEXT): $(test_snprintf_OBJECTS) $(test_snprintf_DEPENDENCIES) $(EXTRA_test_snprintf_DEPENDENCIES) @rm -f test-snprintf$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_snprintf_OBJECTS) $(test_snprintf_LDADD) $(LIBS) +test-sockets$(EXEEXT): $(test_sockets_OBJECTS) $(test_sockets_DEPENDENCIES) $(EXTRA_test_sockets_DEPENDENCIES) + @rm -f test-sockets$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(test_sockets_OBJECTS) $(test_sockets_LDADD) $(LIBS) + test-stat$(EXEEXT): $(test_stat_OBJECTS) $(test_stat_DEPENDENCIES) $(EXTRA_test_stat_DEPENDENCIES) @rm -f test-stat$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_stat_OBJECTS) $(test_stat_LDADD) $(LIBS) +test-stat-time$(EXEEXT): $(test_stat_time_OBJECTS) $(test_stat_time_DEPENDENCIES) $(EXTRA_test_stat_time_DEPENDENCIES) + @rm -f test-stat-time$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(test_stat_time_OBJECTS) $(test_stat_time_LDADD) $(LIBS) + test-stdalign$(EXEEXT): $(test_stdalign_OBJECTS) $(test_stdalign_DEPENDENCIES) $(EXTRA_test_stdalign_DEPENDENCIES) @rm -f test-stdalign$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_stdalign_OBJECTS) $(test_stdalign_LDADD) $(LIBS) @@ -2890,6 +3381,10 @@ @rm -f test-strerror$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_strerror_OBJECTS) $(test_strerror_LDADD) $(LIBS) +test-strerror_r$(EXEEXT): $(test_strerror_r_OBJECTS) $(test_strerror_r_DEPENDENCIES) $(EXTRA_test_strerror_r_DEPENDENCIES) + @rm -f test-strerror_r$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(test_strerror_r_OBJECTS) $(test_strerror_r_LDADD) $(LIBS) + test-striconv$(EXEEXT): $(test_striconv_OBJECTS) $(test_striconv_DEPENDENCIES) $(EXTRA_test_striconv_DEPENDENCIES) @rm -f test-striconv$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_striconv_OBJECTS) $(test_striconv_LDADD) $(LIBS) @@ -2926,14 +3421,34 @@ @rm -f test-symlink$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_symlink_OBJECTS) $(test_symlink_LDADD) $(LIBS) +test-sys_ioctl$(EXEEXT): $(test_sys_ioctl_OBJECTS) $(test_sys_ioctl_DEPENDENCIES) $(EXTRA_test_sys_ioctl_DEPENDENCIES) + @rm -f test-sys_ioctl$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(test_sys_ioctl_OBJECTS) $(test_sys_ioctl_LDADD) $(LIBS) + +test-sys_select$(EXEEXT): $(test_sys_select_OBJECTS) $(test_sys_select_DEPENDENCIES) $(EXTRA_test_sys_select_DEPENDENCIES) + @rm -f test-sys_select$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(test_sys_select_OBJECTS) $(test_sys_select_LDADD) $(LIBS) + +test-sys_socket$(EXEEXT): $(test_sys_socket_OBJECTS) $(test_sys_socket_DEPENDENCIES) $(EXTRA_test_sys_socket_DEPENDENCIES) + @rm -f test-sys_socket$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(test_sys_socket_OBJECTS) $(test_sys_socket_LDADD) $(LIBS) + test-sys_stat$(EXEEXT): $(test_sys_stat_OBJECTS) $(test_sys_stat_DEPENDENCIES) $(EXTRA_test_sys_stat_DEPENDENCIES) @rm -f test-sys_stat$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_sys_stat_OBJECTS) $(test_sys_stat_LDADD) $(LIBS) +test-sys_time$(EXEEXT): $(test_sys_time_OBJECTS) $(test_sys_time_DEPENDENCIES) $(EXTRA_test_sys_time_DEPENDENCIES) + @rm -f test-sys_time$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(test_sys_time_OBJECTS) $(test_sys_time_LDADD) $(LIBS) + test-sys_types$(EXEEXT): $(test_sys_types_OBJECTS) $(test_sys_types_DEPENDENCIES) $(EXTRA_test_sys_types_DEPENDENCIES) @rm -f test-sys_types$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_sys_types_OBJECTS) $(test_sys_types_LDADD) $(LIBS) +test-sys_uio$(EXEEXT): $(test_sys_uio_OBJECTS) $(test_sys_uio_DEPENDENCIES) $(EXTRA_test_sys_uio_DEPENDENCIES) + @rm -f test-sys_uio$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(test_sys_uio_OBJECTS) $(test_sys_uio_LDADD) $(LIBS) + test-time$(EXEEXT): $(test_time_OBJECTS) $(test_time_DEPENDENCIES) $(EXTRA_test_time_DEPENDENCIES) @rm -f test-time$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_time_OBJECTS) $(test_time_LDADD) $(LIBS) @@ -3042,41 +3557,62 @@ distclean-compile: -rm -f *.tab.c +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/accept.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/anytostr.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/asnprintf.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bind.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/connect.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dfa-match-aux.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dup-safer-flag.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fd-safer-flag.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fdopen.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/float.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ftruncate.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gettimeofday.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hash-pjw.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/imaxtostr.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/inet_pton.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/inttostr.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ioctl.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/itold.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/listen.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/localename-table.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/localename.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/localtime-buffer.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nanosleep.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/offtostr.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/perror.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pipe.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/printf-args.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/printf-parse.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/putenv.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/select.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setenv.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setlocale.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setsockopt.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sleep.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/snprintf.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/socket.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sockets.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strerror_r.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/symlink.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sys_socket.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-accept.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-alignof.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-alloca-opt.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-argmatch.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-arpa_inet.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-binary-io.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-bind.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-bitrotate.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-btowc.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-c-ctype.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-c-stack.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-c-strcasecmp.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-c-strncasecmp.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-chdir.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-cloexec.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-close.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-connect.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-ctype.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-dirent-safer.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-dirent.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-dup-safer.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-dup.Po@am__quote@ # am--include-marker @@ -3092,31 +3628,38 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-fdopendir.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-fgetc.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-float.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-fnmatch-h.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-fnmatch.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-fpending.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-fputc.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-fread.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-fstat.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-fstatat.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-ftruncate.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-fwrite.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-getcwd-lgpl.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-getdtablesize.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-getopt-gnu.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-getopt-posix.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-getprogname.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-gettimeofday.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-hash.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-i-ring.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-iconv-h.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-iconv.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-ignore-value.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-inet_pton.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-intprops.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-inttostr.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-inttypes.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-ioctl.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-isatty.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-isblank.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-iswblank.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-langinfo.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-limits-h.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-listen.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-localcharset.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-locale.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-localeconv.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-localename.Po@am__quote@ # am--include-marker @@ -3133,20 +3676,35 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-memchr.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-memchr2.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-memrchr.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-nanosleep.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-netinet_in.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-nl_langinfo.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-open.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-openat-safer.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-openat.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-pathmax.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-perror.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-perror2.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-pipe.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-quotearg-simple.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-raise.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-read.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-realloc-gnu.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-regex.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-select-fd.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-select-stdin.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-select.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-setenv.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-setlocale1.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-setlocale2.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-setsockopt.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-sigaction.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-signal-h.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-sigprocmask.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-sleep.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-snprintf.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-sockets.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-stat-time.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-stat.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-stdalign.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-stdbool.Po@am__quote@ # am--include-marker @@ -3155,6 +3713,7 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-stdio.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-stdlib.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-strerror.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-strerror_r.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-striconv.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-string.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-strnlen.Po@am__quote@ # am--include-marker @@ -3164,8 +3723,13 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-strtoull.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-strtoumax.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-symlink.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-sys_ioctl.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-sys_select.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-sys_socket.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-sys_stat.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-sys_time.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-sys_types.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-sys_uio.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-time.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-unistd.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-unsetenv.Po@am__quote@ # am--include-marker @@ -3199,22 +3763,20 @@ am--depfiles: $(am__depfiles_remade) .c.o: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(am__set_depbase) && \ -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $<; \ -@am__fastdepCC_TRUE@ if test $$? = 0; then $(am__mv) $$depbase.Tpo $$depbase.Po; \ -@am__fastdepCC_TRUE@ else rm -f $$depbase.Tpo; false; fi +@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ +@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(am__set_depbase) && \ -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $$($(CYGPATH_W) $<); \ -@am__fastdepCC_TRUE@ if test $$? = 0; then $(am__mv) $$depbase.Tpo $$depbase.Po; \ -@am__fastdepCC_TRUE@ else rm -f $$depbase.Tpo; false; fi +@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ +@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $$($(CYGPATH_W) $<) +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` # This directory's subdirectories are mostly independent; you can cd # into them and run 'make' without going through this Makefile. @@ -3435,7 +3997,7 @@ fi; \ $$success || exit 1 -check-TESTS: +check-TESTS: $(check_PROGRAMS) $(check_LIBRARIES) @list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list @list='$(RECHECK_LOGS:.log=.trs)'; test -z "$$list" || rm -f $$list @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) @@ -3445,7 +4007,7 @@ log_list=`echo $$log_list`; trs_list=`echo $$trs_list`; \ $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"; \ exit $$?; -recheck: all $(check_LIBRARIES) $(check_PROGRAMS) +recheck: all $(check_PROGRAMS) $(check_LIBRARIES) @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) @set +e; $(am__set_TESTS_bases); \ bases=`for i in $$bases; do echo $$i; done \ @@ -3456,6 +4018,13 @@ am__force_recheck=am--force-recheck \ TEST_LOGS="$$log_list"; \ exit $$? +test-accept.log: test-accept$(EXEEXT) + @p='test-accept$(EXEEXT)'; \ + b='test-accept'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) test-alignof.log: test-alignof$(EXEEXT) @p='test-alignof$(EXEEXT)'; \ b='test-alignof'; \ @@ -3477,6 +4046,13 @@ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) +test-arpa_inet.log: test-arpa_inet$(EXEEXT) + @p='test-arpa_inet$(EXEEXT)'; \ + b='test-arpa_inet'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) test-binary-io.sh.log: test-binary-io.sh @p='test-binary-io.sh'; \ b='test-binary-io.sh'; \ @@ -3484,6 +4060,13 @@ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) +test-bind.log: test-bind$(EXEEXT) + @p='test-bind$(EXEEXT)'; \ + b='test-bind'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) test-bitrotate.log: test-bitrotate$(EXEEXT) @p='test-bitrotate$(EXEEXT)'; \ b='test-bitrotate'; \ @@ -3512,6 +4095,20 @@ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) +test-c-stack.sh.log: test-c-stack.sh + @p='test-c-stack.sh'; \ + b='test-c-stack.sh'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +test-c-stack2.sh.log: test-c-stack2.sh + @p='test-c-stack2.sh'; \ + b='test-c-stack2.sh'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) test-c-strcase.sh.log: test-c-strcase.sh @p='test-c-strcase.sh'; \ b='test-c-strcase.sh'; \ @@ -3540,6 +4137,13 @@ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) +test-connect.log: test-connect$(EXEEXT) + @p='test-connect$(EXEEXT)'; \ + b='test-connect'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) test-ctype.log: test-ctype$(EXEEXT) @p='test-ctype$(EXEEXT)'; \ b='test-ctype'; \ @@ -3561,13 +4165,6 @@ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) -test-dirent-safer.log: test-dirent-safer$(EXEEXT) - @p='test-dirent-safer$(EXEEXT)'; \ - b='test-dirent-safer'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) test-dirent.log: test-dirent$(EXEEXT) @p='test-dirent$(EXEEXT)'; \ b='test-dirent'; \ @@ -3715,6 +4312,13 @@ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) +test-fnmatch-h.log: test-fnmatch-h$(EXEEXT) + @p='test-fnmatch-h$(EXEEXT)'; \ + b='test-fnmatch-h'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) test-fnmatch.log: test-fnmatch$(EXEEXT) @p='test-fnmatch$(EXEEXT)'; \ b='test-fnmatch'; \ @@ -3757,6 +4361,13 @@ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) +test-ftruncate.sh.log: test-ftruncate.sh + @p='test-ftruncate.sh'; \ + b='test-ftruncate.sh'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) test-fwrite.log: test-fwrite$(EXEEXT) @p='test-fwrite$(EXEEXT)'; \ b='test-fwrite'; \ @@ -3799,6 +4410,13 @@ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) +test-gettimeofday.log: test-gettimeofday$(EXEEXT) + @p='test-gettimeofday$(EXEEXT)'; \ + b='test-gettimeofday'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) test-hash.log: test-hash$(EXEEXT) @p='test-hash$(EXEEXT)'; \ b='test-hash'; \ @@ -3834,6 +4452,13 @@ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) +test-inet_pton.log: test-inet_pton$(EXEEXT) + @p='test-inet_pton$(EXEEXT)'; \ + b='test-inet_pton'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) test-intprops.log: test-intprops$(EXEEXT) @p='test-intprops$(EXEEXT)'; \ b='test-intprops'; \ @@ -3855,6 +4480,13 @@ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) +test-ioctl.log: test-ioctl$(EXEEXT) + @p='test-ioctl$(EXEEXT)'; \ + b='test-ioctl'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) test-isatty.log: test-isatty$(EXEEXT) @p='test-isatty$(EXEEXT)'; \ b='test-isatty'; \ @@ -3890,6 +4522,13 @@ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) +test-listen.log: test-listen$(EXEEXT) + @p='test-listen$(EXEEXT)'; \ + b='test-listen'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) test-locale.log: test-locale$(EXEEXT) @p='test-locale$(EXEEXT)'; \ b='test-locale'; \ @@ -4023,6 +4662,20 @@ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) +test-nanosleep.log: test-nanosleep$(EXEEXT) + @p='test-nanosleep$(EXEEXT)'; \ + b='test-nanosleep'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +test-netinet_in.log: test-netinet_in$(EXEEXT) + @p='test-netinet_in$(EXEEXT)'; \ + b='test-netinet_in'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) test-nl_langinfo.sh.log: test-nl_langinfo.sh @p='test-nl_langinfo.sh'; \ b='test-nl_langinfo.sh'; \ @@ -4058,6 +4711,20 @@ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) +test-perror.sh.log: test-perror.sh + @p='test-perror.sh'; \ + b='test-perror.sh'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +test-perror2.log: test-perror2$(EXEEXT) + @p='test-perror2$(EXEEXT)'; \ + b='test-perror2'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) test-pipe.log: test-pipe$(EXEEXT) @p='test-pipe$(EXEEXT)'; \ b='test-pipe'; \ @@ -4072,6 +4739,13 @@ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) +test-raise.log: test-raise$(EXEEXT) + @p='test-raise$(EXEEXT)'; \ + b='test-raise'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) test-read.log: test-read$(EXEEXT) @p='test-read$(EXEEXT)'; \ b='test-read'; \ @@ -4093,6 +4767,27 @@ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) +test-select.log: test-select$(EXEEXT) + @p='test-select$(EXEEXT)'; \ + b='test-select'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +test-select-in.sh.log: test-select-in.sh + @p='test-select-in.sh'; \ + b='test-select-in.sh'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +test-select-out.sh.log: test-select-out.sh + @p='test-select-out.sh'; \ + b='test-select-out.sh'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) test-setenv.log: test-setenv$(EXEEXT) @p='test-setenv$(EXEEXT)'; \ b='test-setenv'; \ @@ -4114,6 +4809,41 @@ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) +test-setsockopt.log: test-setsockopt$(EXEEXT) + @p='test-setsockopt$(EXEEXT)'; \ + b='test-setsockopt'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +test-sigaction.log: test-sigaction$(EXEEXT) + @p='test-sigaction$(EXEEXT)'; \ + b='test-sigaction'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +test-signal-h.log: test-signal-h$(EXEEXT) + @p='test-signal-h$(EXEEXT)'; \ + b='test-signal-h'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +test-sigprocmask.log: test-sigprocmask$(EXEEXT) + @p='test-sigprocmask$(EXEEXT)'; \ + b='test-sigprocmask'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +test-sleep.log: test-sleep$(EXEEXT) + @p='test-sleep$(EXEEXT)'; \ + b='test-sleep'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) test-snprintf.log: test-snprintf$(EXEEXT) @p='test-snprintf$(EXEEXT)'; \ b='test-snprintf'; \ @@ -4121,6 +4851,13 @@ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) +test-sockets.log: test-sockets$(EXEEXT) + @p='test-sockets$(EXEEXT)'; \ + b='test-sockets'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) test-stat.log: test-stat$(EXEEXT) @p='test-stat$(EXEEXT)'; \ b='test-stat'; \ @@ -4128,6 +4865,13 @@ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) +test-stat-time.log: test-stat-time$(EXEEXT) + @p='test-stat-time$(EXEEXT)'; \ + b='test-stat-time'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) test-stdalign.log: test-stdalign$(EXEEXT) @p='test-stdalign$(EXEEXT)'; \ b='test-stdalign'; \ @@ -4177,6 +4921,13 @@ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) +test-strerror_r.log: test-strerror_r$(EXEEXT) + @p='test-strerror_r$(EXEEXT)'; \ + b='test-strerror_r'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) test-striconv.log: test-striconv$(EXEEXT) @p='test-striconv$(EXEEXT)'; \ b='test-striconv'; \ @@ -4240,6 +4991,27 @@ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) +test-sys_ioctl.log: test-sys_ioctl$(EXEEXT) + @p='test-sys_ioctl$(EXEEXT)'; \ + b='test-sys_ioctl'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +test-sys_select.log: test-sys_select$(EXEEXT) + @p='test-sys_select$(EXEEXT)'; \ + b='test-sys_select'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +test-sys_socket.log: test-sys_socket$(EXEEXT) + @p='test-sys_socket$(EXEEXT)'; \ + b='test-sys_socket'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) test-sys_stat.log: test-sys_stat$(EXEEXT) @p='test-sys_stat$(EXEEXT)'; \ b='test-sys_stat'; \ @@ -4247,6 +5019,13 @@ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) +test-sys_time.log: test-sys_time$(EXEEXT) + @p='test-sys_time$(EXEEXT)'; \ + b='test-sys_time'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) test-sys_types.log: test-sys_types$(EXEEXT) @p='test-sys_types$(EXEEXT)'; \ b='test-sys_types'; \ @@ -4254,6 +5033,13 @@ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) +test-sys_uio.log: test-sys_uio$(EXEEXT) + @p='test-sys_uio$(EXEEXT)'; \ + b='test-sys_uio'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) test-init.sh.log: test-init.sh @p='test-init.sh'; \ b='test-init.sh'; \ @@ -4458,7 +5244,10 @@ @am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ @am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT) -distdir: $(DISTFILES) +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ @@ -4514,11 +5303,11 @@ fi; \ done check-am: all-am - $(MAKE) $(AM_MAKEFLAGS) $(check_LIBRARIES) $(check_PROGRAMS) + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) $(check_LIBRARIES) $(MAKE) $(AM_MAKEFLAGS) check-TESTS check: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) check-recursive -all-am: Makefile $(LIBRARIES) $(PROGRAMS) $(HEADERS) +all-am: Makefile $(PROGRAMS) $(LIBRARIES) $(HEADERS) installdirs: installdirs-recursive installdirs-am: install: $(BUILT_SOURCES) @@ -4571,41 +5360,62 @@ mostlyclean-am distclean: distclean-recursive - -rm -f ./$(DEPDIR)/anytostr.Po + -rm -f ./$(DEPDIR)/accept.Po + -rm -f ./$(DEPDIR)/anytostr.Po -rm -f ./$(DEPDIR)/asnprintf.Po + -rm -f ./$(DEPDIR)/bind.Po + -rm -f ./$(DEPDIR)/connect.Po -rm -f ./$(DEPDIR)/dfa-match-aux.Po - -rm -f ./$(DEPDIR)/dup-safer-flag.Po - -rm -f ./$(DEPDIR)/fd-safer-flag.Po -rm -f ./$(DEPDIR)/fdopen.Po -rm -f ./$(DEPDIR)/float.Po + -rm -f ./$(DEPDIR)/ftruncate.Po + -rm -f ./$(DEPDIR)/gettimeofday.Po -rm -f ./$(DEPDIR)/hash-pjw.Po -rm -f ./$(DEPDIR)/imaxtostr.Po + -rm -f ./$(DEPDIR)/inet_pton.Po -rm -f ./$(DEPDIR)/inttostr.Po + -rm -f ./$(DEPDIR)/ioctl.Po -rm -f ./$(DEPDIR)/itold.Po + -rm -f ./$(DEPDIR)/listen.Po + -rm -f ./$(DEPDIR)/localename-table.Po -rm -f ./$(DEPDIR)/localename.Po + -rm -f ./$(DEPDIR)/localtime-buffer.Po + -rm -f ./$(DEPDIR)/nanosleep.Po -rm -f ./$(DEPDIR)/offtostr.Po + -rm -f ./$(DEPDIR)/perror.Po -rm -f ./$(DEPDIR)/pipe.Po -rm -f ./$(DEPDIR)/printf-args.Po -rm -f ./$(DEPDIR)/printf-parse.Po -rm -f ./$(DEPDIR)/putenv.Po + -rm -f ./$(DEPDIR)/select.Po -rm -f ./$(DEPDIR)/setenv.Po -rm -f ./$(DEPDIR)/setlocale.Po + -rm -f ./$(DEPDIR)/setsockopt.Po + -rm -f ./$(DEPDIR)/sleep.Po -rm -f ./$(DEPDIR)/snprintf.Po + -rm -f ./$(DEPDIR)/socket.Po + -rm -f ./$(DEPDIR)/sockets.Po + -rm -f ./$(DEPDIR)/strerror_r.Po -rm -f ./$(DEPDIR)/symlink.Po + -rm -f ./$(DEPDIR)/sys_socket.Po + -rm -f ./$(DEPDIR)/test-accept.Po -rm -f ./$(DEPDIR)/test-alignof.Po -rm -f ./$(DEPDIR)/test-alloca-opt.Po -rm -f ./$(DEPDIR)/test-argmatch.Po + -rm -f ./$(DEPDIR)/test-arpa_inet.Po -rm -f ./$(DEPDIR)/test-binary-io.Po + -rm -f ./$(DEPDIR)/test-bind.Po -rm -f ./$(DEPDIR)/test-bitrotate.Po -rm -f ./$(DEPDIR)/test-btowc.Po -rm -f ./$(DEPDIR)/test-c-ctype.Po + -rm -f ./$(DEPDIR)/test-c-stack.Po -rm -f ./$(DEPDIR)/test-c-strcasecmp.Po -rm -f ./$(DEPDIR)/test-c-strncasecmp.Po -rm -f ./$(DEPDIR)/test-chdir.Po -rm -f ./$(DEPDIR)/test-cloexec.Po -rm -f ./$(DEPDIR)/test-close.Po + -rm -f ./$(DEPDIR)/test-connect.Po -rm -f ./$(DEPDIR)/test-ctype.Po - -rm -f ./$(DEPDIR)/test-dirent-safer.Po -rm -f ./$(DEPDIR)/test-dirent.Po -rm -f ./$(DEPDIR)/test-dup-safer.Po -rm -f ./$(DEPDIR)/test-dup.Po @@ -4621,31 +5431,38 @@ -rm -f ./$(DEPDIR)/test-fdopendir.Po -rm -f ./$(DEPDIR)/test-fgetc.Po -rm -f ./$(DEPDIR)/test-float.Po + -rm -f ./$(DEPDIR)/test-fnmatch-h.Po -rm -f ./$(DEPDIR)/test-fnmatch.Po -rm -f ./$(DEPDIR)/test-fpending.Po -rm -f ./$(DEPDIR)/test-fputc.Po -rm -f ./$(DEPDIR)/test-fread.Po -rm -f ./$(DEPDIR)/test-fstat.Po -rm -f ./$(DEPDIR)/test-fstatat.Po + -rm -f ./$(DEPDIR)/test-ftruncate.Po -rm -f ./$(DEPDIR)/test-fwrite.Po -rm -f ./$(DEPDIR)/test-getcwd-lgpl.Po -rm -f ./$(DEPDIR)/test-getdtablesize.Po -rm -f ./$(DEPDIR)/test-getopt-gnu.Po -rm -f ./$(DEPDIR)/test-getopt-posix.Po -rm -f ./$(DEPDIR)/test-getprogname.Po + -rm -f ./$(DEPDIR)/test-gettimeofday.Po -rm -f ./$(DEPDIR)/test-hash.Po -rm -f ./$(DEPDIR)/test-i-ring.Po -rm -f ./$(DEPDIR)/test-iconv-h.Po -rm -f ./$(DEPDIR)/test-iconv.Po -rm -f ./$(DEPDIR)/test-ignore-value.Po + -rm -f ./$(DEPDIR)/test-inet_pton.Po -rm -f ./$(DEPDIR)/test-intprops.Po -rm -f ./$(DEPDIR)/test-inttostr.Po -rm -f ./$(DEPDIR)/test-inttypes.Po + -rm -f ./$(DEPDIR)/test-ioctl.Po -rm -f ./$(DEPDIR)/test-isatty.Po -rm -f ./$(DEPDIR)/test-isblank.Po -rm -f ./$(DEPDIR)/test-iswblank.Po -rm -f ./$(DEPDIR)/test-langinfo.Po -rm -f ./$(DEPDIR)/test-limits-h.Po + -rm -f ./$(DEPDIR)/test-listen.Po + -rm -f ./$(DEPDIR)/test-localcharset.Po -rm -f ./$(DEPDIR)/test-locale.Po -rm -f ./$(DEPDIR)/test-localeconv.Po -rm -f ./$(DEPDIR)/test-localename.Po @@ -4662,20 +5479,35 @@ -rm -f ./$(DEPDIR)/test-memchr.Po -rm -f ./$(DEPDIR)/test-memchr2.Po -rm -f ./$(DEPDIR)/test-memrchr.Po + -rm -f ./$(DEPDIR)/test-nanosleep.Po + -rm -f ./$(DEPDIR)/test-netinet_in.Po -rm -f ./$(DEPDIR)/test-nl_langinfo.Po -rm -f ./$(DEPDIR)/test-open.Po -rm -f ./$(DEPDIR)/test-openat-safer.Po -rm -f ./$(DEPDIR)/test-openat.Po -rm -f ./$(DEPDIR)/test-pathmax.Po + -rm -f ./$(DEPDIR)/test-perror.Po + -rm -f ./$(DEPDIR)/test-perror2.Po -rm -f ./$(DEPDIR)/test-pipe.Po -rm -f ./$(DEPDIR)/test-quotearg-simple.Po + -rm -f ./$(DEPDIR)/test-raise.Po -rm -f ./$(DEPDIR)/test-read.Po -rm -f ./$(DEPDIR)/test-realloc-gnu.Po -rm -f ./$(DEPDIR)/test-regex.Po + -rm -f ./$(DEPDIR)/test-select-fd.Po + -rm -f ./$(DEPDIR)/test-select-stdin.Po + -rm -f ./$(DEPDIR)/test-select.Po -rm -f ./$(DEPDIR)/test-setenv.Po -rm -f ./$(DEPDIR)/test-setlocale1.Po -rm -f ./$(DEPDIR)/test-setlocale2.Po + -rm -f ./$(DEPDIR)/test-setsockopt.Po + -rm -f ./$(DEPDIR)/test-sigaction.Po + -rm -f ./$(DEPDIR)/test-signal-h.Po + -rm -f ./$(DEPDIR)/test-sigprocmask.Po + -rm -f ./$(DEPDIR)/test-sleep.Po -rm -f ./$(DEPDIR)/test-snprintf.Po + -rm -f ./$(DEPDIR)/test-sockets.Po + -rm -f ./$(DEPDIR)/test-stat-time.Po -rm -f ./$(DEPDIR)/test-stat.Po -rm -f ./$(DEPDIR)/test-stdalign.Po -rm -f ./$(DEPDIR)/test-stdbool.Po @@ -4684,6 +5516,7 @@ -rm -f ./$(DEPDIR)/test-stdio.Po -rm -f ./$(DEPDIR)/test-stdlib.Po -rm -f ./$(DEPDIR)/test-strerror.Po + -rm -f ./$(DEPDIR)/test-strerror_r.Po -rm -f ./$(DEPDIR)/test-striconv.Po -rm -f ./$(DEPDIR)/test-string.Po -rm -f ./$(DEPDIR)/test-strnlen.Po @@ -4693,8 +5526,13 @@ -rm -f ./$(DEPDIR)/test-strtoull.Po -rm -f ./$(DEPDIR)/test-strtoumax.Po -rm -f ./$(DEPDIR)/test-symlink.Po + -rm -f ./$(DEPDIR)/test-sys_ioctl.Po + -rm -f ./$(DEPDIR)/test-sys_select.Po + -rm -f ./$(DEPDIR)/test-sys_socket.Po -rm -f ./$(DEPDIR)/test-sys_stat.Po + -rm -f ./$(DEPDIR)/test-sys_time.Po -rm -f ./$(DEPDIR)/test-sys_types.Po + -rm -f ./$(DEPDIR)/test-sys_uio.Po -rm -f ./$(DEPDIR)/test-time.Po -rm -f ./$(DEPDIR)/test-unistd.Po -rm -f ./$(DEPDIR)/test-unsetenv.Po @@ -4765,41 +5603,62 @@ installcheck-am: maintainer-clean: maintainer-clean-recursive - -rm -f ./$(DEPDIR)/anytostr.Po + -rm -f ./$(DEPDIR)/accept.Po + -rm -f ./$(DEPDIR)/anytostr.Po -rm -f ./$(DEPDIR)/asnprintf.Po + -rm -f ./$(DEPDIR)/bind.Po + -rm -f ./$(DEPDIR)/connect.Po -rm -f ./$(DEPDIR)/dfa-match-aux.Po - -rm -f ./$(DEPDIR)/dup-safer-flag.Po - -rm -f ./$(DEPDIR)/fd-safer-flag.Po -rm -f ./$(DEPDIR)/fdopen.Po -rm -f ./$(DEPDIR)/float.Po + -rm -f ./$(DEPDIR)/ftruncate.Po + -rm -f ./$(DEPDIR)/gettimeofday.Po -rm -f ./$(DEPDIR)/hash-pjw.Po -rm -f ./$(DEPDIR)/imaxtostr.Po + -rm -f ./$(DEPDIR)/inet_pton.Po -rm -f ./$(DEPDIR)/inttostr.Po + -rm -f ./$(DEPDIR)/ioctl.Po -rm -f ./$(DEPDIR)/itold.Po + -rm -f ./$(DEPDIR)/listen.Po + -rm -f ./$(DEPDIR)/localename-table.Po -rm -f ./$(DEPDIR)/localename.Po + -rm -f ./$(DEPDIR)/localtime-buffer.Po + -rm -f ./$(DEPDIR)/nanosleep.Po -rm -f ./$(DEPDIR)/offtostr.Po + -rm -f ./$(DEPDIR)/perror.Po -rm -f ./$(DEPDIR)/pipe.Po -rm -f ./$(DEPDIR)/printf-args.Po -rm -f ./$(DEPDIR)/printf-parse.Po -rm -f ./$(DEPDIR)/putenv.Po + -rm -f ./$(DEPDIR)/select.Po -rm -f ./$(DEPDIR)/setenv.Po -rm -f ./$(DEPDIR)/setlocale.Po + -rm -f ./$(DEPDIR)/setsockopt.Po + -rm -f ./$(DEPDIR)/sleep.Po -rm -f ./$(DEPDIR)/snprintf.Po + -rm -f ./$(DEPDIR)/socket.Po + -rm -f ./$(DEPDIR)/sockets.Po + -rm -f ./$(DEPDIR)/strerror_r.Po -rm -f ./$(DEPDIR)/symlink.Po + -rm -f ./$(DEPDIR)/sys_socket.Po + -rm -f ./$(DEPDIR)/test-accept.Po -rm -f ./$(DEPDIR)/test-alignof.Po -rm -f ./$(DEPDIR)/test-alloca-opt.Po -rm -f ./$(DEPDIR)/test-argmatch.Po + -rm -f ./$(DEPDIR)/test-arpa_inet.Po -rm -f ./$(DEPDIR)/test-binary-io.Po + -rm -f ./$(DEPDIR)/test-bind.Po -rm -f ./$(DEPDIR)/test-bitrotate.Po -rm -f ./$(DEPDIR)/test-btowc.Po -rm -f ./$(DEPDIR)/test-c-ctype.Po + -rm -f ./$(DEPDIR)/test-c-stack.Po -rm -f ./$(DEPDIR)/test-c-strcasecmp.Po -rm -f ./$(DEPDIR)/test-c-strncasecmp.Po -rm -f ./$(DEPDIR)/test-chdir.Po -rm -f ./$(DEPDIR)/test-cloexec.Po -rm -f ./$(DEPDIR)/test-close.Po + -rm -f ./$(DEPDIR)/test-connect.Po -rm -f ./$(DEPDIR)/test-ctype.Po - -rm -f ./$(DEPDIR)/test-dirent-safer.Po -rm -f ./$(DEPDIR)/test-dirent.Po -rm -f ./$(DEPDIR)/test-dup-safer.Po -rm -f ./$(DEPDIR)/test-dup.Po @@ -4815,31 +5674,38 @@ -rm -f ./$(DEPDIR)/test-fdopendir.Po -rm -f ./$(DEPDIR)/test-fgetc.Po -rm -f ./$(DEPDIR)/test-float.Po + -rm -f ./$(DEPDIR)/test-fnmatch-h.Po -rm -f ./$(DEPDIR)/test-fnmatch.Po -rm -f ./$(DEPDIR)/test-fpending.Po -rm -f ./$(DEPDIR)/test-fputc.Po -rm -f ./$(DEPDIR)/test-fread.Po -rm -f ./$(DEPDIR)/test-fstat.Po -rm -f ./$(DEPDIR)/test-fstatat.Po + -rm -f ./$(DEPDIR)/test-ftruncate.Po -rm -f ./$(DEPDIR)/test-fwrite.Po -rm -f ./$(DEPDIR)/test-getcwd-lgpl.Po -rm -f ./$(DEPDIR)/test-getdtablesize.Po -rm -f ./$(DEPDIR)/test-getopt-gnu.Po -rm -f ./$(DEPDIR)/test-getopt-posix.Po -rm -f ./$(DEPDIR)/test-getprogname.Po + -rm -f ./$(DEPDIR)/test-gettimeofday.Po -rm -f ./$(DEPDIR)/test-hash.Po -rm -f ./$(DEPDIR)/test-i-ring.Po -rm -f ./$(DEPDIR)/test-iconv-h.Po -rm -f ./$(DEPDIR)/test-iconv.Po -rm -f ./$(DEPDIR)/test-ignore-value.Po + -rm -f ./$(DEPDIR)/test-inet_pton.Po -rm -f ./$(DEPDIR)/test-intprops.Po -rm -f ./$(DEPDIR)/test-inttostr.Po -rm -f ./$(DEPDIR)/test-inttypes.Po + -rm -f ./$(DEPDIR)/test-ioctl.Po -rm -f ./$(DEPDIR)/test-isatty.Po -rm -f ./$(DEPDIR)/test-isblank.Po -rm -f ./$(DEPDIR)/test-iswblank.Po -rm -f ./$(DEPDIR)/test-langinfo.Po -rm -f ./$(DEPDIR)/test-limits-h.Po + -rm -f ./$(DEPDIR)/test-listen.Po + -rm -f ./$(DEPDIR)/test-localcharset.Po -rm -f ./$(DEPDIR)/test-locale.Po -rm -f ./$(DEPDIR)/test-localeconv.Po -rm -f ./$(DEPDIR)/test-localename.Po @@ -4856,20 +5722,35 @@ -rm -f ./$(DEPDIR)/test-memchr.Po -rm -f ./$(DEPDIR)/test-memchr2.Po -rm -f ./$(DEPDIR)/test-memrchr.Po + -rm -f ./$(DEPDIR)/test-nanosleep.Po + -rm -f ./$(DEPDIR)/test-netinet_in.Po -rm -f ./$(DEPDIR)/test-nl_langinfo.Po -rm -f ./$(DEPDIR)/test-open.Po -rm -f ./$(DEPDIR)/test-openat-safer.Po -rm -f ./$(DEPDIR)/test-openat.Po -rm -f ./$(DEPDIR)/test-pathmax.Po + -rm -f ./$(DEPDIR)/test-perror.Po + -rm -f ./$(DEPDIR)/test-perror2.Po -rm -f ./$(DEPDIR)/test-pipe.Po -rm -f ./$(DEPDIR)/test-quotearg-simple.Po + -rm -f ./$(DEPDIR)/test-raise.Po -rm -f ./$(DEPDIR)/test-read.Po -rm -f ./$(DEPDIR)/test-realloc-gnu.Po -rm -f ./$(DEPDIR)/test-regex.Po + -rm -f ./$(DEPDIR)/test-select-fd.Po + -rm -f ./$(DEPDIR)/test-select-stdin.Po + -rm -f ./$(DEPDIR)/test-select.Po -rm -f ./$(DEPDIR)/test-setenv.Po -rm -f ./$(DEPDIR)/test-setlocale1.Po -rm -f ./$(DEPDIR)/test-setlocale2.Po + -rm -f ./$(DEPDIR)/test-setsockopt.Po + -rm -f ./$(DEPDIR)/test-sigaction.Po + -rm -f ./$(DEPDIR)/test-signal-h.Po + -rm -f ./$(DEPDIR)/test-sigprocmask.Po + -rm -f ./$(DEPDIR)/test-sleep.Po -rm -f ./$(DEPDIR)/test-snprintf.Po + -rm -f ./$(DEPDIR)/test-sockets.Po + -rm -f ./$(DEPDIR)/test-stat-time.Po -rm -f ./$(DEPDIR)/test-stat.Po -rm -f ./$(DEPDIR)/test-stdalign.Po -rm -f ./$(DEPDIR)/test-stdbool.Po @@ -4878,6 +5759,7 @@ -rm -f ./$(DEPDIR)/test-stdio.Po -rm -f ./$(DEPDIR)/test-stdlib.Po -rm -f ./$(DEPDIR)/test-strerror.Po + -rm -f ./$(DEPDIR)/test-strerror_r.Po -rm -f ./$(DEPDIR)/test-striconv.Po -rm -f ./$(DEPDIR)/test-string.Po -rm -f ./$(DEPDIR)/test-strnlen.Po @@ -4887,8 +5769,13 @@ -rm -f ./$(DEPDIR)/test-strtoull.Po -rm -f ./$(DEPDIR)/test-strtoumax.Po -rm -f ./$(DEPDIR)/test-symlink.Po + -rm -f ./$(DEPDIR)/test-sys_ioctl.Po + -rm -f ./$(DEPDIR)/test-sys_select.Po + -rm -f ./$(DEPDIR)/test-sys_socket.Po -rm -f ./$(DEPDIR)/test-sys_stat.Po + -rm -f ./$(DEPDIR)/test-sys_time.Po -rm -f ./$(DEPDIR)/test-sys_types.Po + -rm -f ./$(DEPDIR)/test-sys_uio.Po -rm -f ./$(DEPDIR)/test-time.Po -rm -f ./$(DEPDIR)/test-unistd.Po -rm -f ./$(DEPDIR)/test-unsetenv.Po @@ -4954,6 +5841,32 @@ .PRECIOUS: Makefile +# We need the following in order to create when the system +# doesn't have one. +arpa/inet.h: arpa_inet.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE_H) $(ARG_NONNULL_H) + $(AM_V_at)$(MKDIR_P) arpa + $(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|@''HAVE_FEATURES_H''@|$(HAVE_FEATURES_H)|g' \ + -e 's|@''NEXT_ARPA_INET_H''@|$(NEXT_ARPA_INET_H)|g' \ + -e 's|@''HAVE_ARPA_INET_H''@|$(HAVE_ARPA_INET_H)|g' \ + -e 's/@''GNULIB_INET_NTOP''@/$(GNULIB_INET_NTOP)/g' \ + -e 's/@''GNULIB_INET_PTON''@/$(GNULIB_INET_PTON)/g' \ + -e 's|@''HAVE_DECL_INET_NTOP''@|$(HAVE_DECL_INET_NTOP)|g' \ + -e 's|@''HAVE_DECL_INET_PTON''@|$(HAVE_DECL_INET_PTON)|g' \ + -e 's|@''REPLACE_INET_NTOP''@|$(REPLACE_INET_NTOP)|g' \ + -e 's|@''REPLACE_INET_PTON''@|$(REPLACE_INET_PTON)|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)' \ + < $(srcdir)/arpa_inet.in.h; \ + } > $@-t && \ + mv $@-t $@ + # We need the following in order to create when the system # doesn't have one that works with the given compiler. @GL_GENERATE_FLOAT_H_TRUE@float.h: float.in.h $(top_builddir)/config.status @@ -4971,6 +5884,152 @@ @GL_GENERATE_FLOAT_H_FALSE@float.h: $(top_builddir)/config.status @GL_GENERATE_FLOAT_H_FALSE@ rm -f $@ +# We need the following in order to create when the system +# doesn't have one. +@GL_GENERATE_NETINET_IN_H_TRUE@netinet/in.h: netinet_in.in.h $(top_builddir)/config.status +@GL_GENERATE_NETINET_IN_H_TRUE@ $(AM_V_at)$(MKDIR_P) netinet +@GL_GENERATE_NETINET_IN_H_TRUE@ $(AM_V_GEN)rm -f $@-t $@ && \ +@GL_GENERATE_NETINET_IN_H_TRUE@ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ +@GL_GENERATE_NETINET_IN_H_TRUE@ sed -e 's|@''GUARD_PREFIX''@|GL|g' \ +@GL_GENERATE_NETINET_IN_H_TRUE@ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ +@GL_GENERATE_NETINET_IN_H_TRUE@ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ +@GL_GENERATE_NETINET_IN_H_TRUE@ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ +@GL_GENERATE_NETINET_IN_H_TRUE@ -e 's|@''NEXT_NETINET_IN_H''@|$(NEXT_NETINET_IN_H)|g' \ +@GL_GENERATE_NETINET_IN_H_TRUE@ -e 's|@''HAVE_NETINET_IN_H''@|$(HAVE_NETINET_IN_H)|g' \ +@GL_GENERATE_NETINET_IN_H_TRUE@ < $(srcdir)/netinet_in.in.h; \ +@GL_GENERATE_NETINET_IN_H_TRUE@ } > $@-t && \ +@GL_GENERATE_NETINET_IN_H_TRUE@ mv $@-t $@ +@GL_GENERATE_NETINET_IN_H_FALSE@netinet/in.h: $(top_builddir)/config.status +@GL_GENERATE_NETINET_IN_H_FALSE@ rm -f $@ + +# We need the following in order to create when the system +# does not have a complete one. +sys/ioctl.h: sys_ioctl.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE_H) + $(AM_V_at)$(MKDIR_P) sys + $(AM_V_GEN)rm -f $@-t $@ && \ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ + sed -e 's|@''GUARD_PREFIX''@|GL|g' \ + -e 's|@''HAVE_SYS_IOCTL_H''@|$(HAVE_SYS_IOCTL_H)|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_SYS_IOCTL_H''@|$(NEXT_SYS_IOCTL_H)|g' \ + -e 's/@''GNULIB_IOCTL''@/$(GNULIB_IOCTL)/g' \ + -e 's|@''SYS_IOCTL_H_HAVE_WINSOCK2_H''@|$(SYS_IOCTL_H_HAVE_WINSOCK2_H)|g' \ + -e 's|@''SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS''@|$(SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS)|g' \ + -e 's|@''REPLACE_IOCTL''@|$(REPLACE_IOCTL)|g' \ + -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ + -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ + < $(srcdir)/sys_ioctl.in.h; \ + } > $@-t && \ + mv $@-t $@ + +# We need the following in order to create when the system +# doesn't have one that works with the given compiler. +sys/select.h: sys_select.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE_H) + $(AM_V_at)$(MKDIR_P) sys + $(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_SYS_SELECT_H''@|$(NEXT_SYS_SELECT_H)|g' \ + -e 's|@''HAVE_SYS_SELECT_H''@|$(HAVE_SYS_SELECT_H)|g' \ + -e 's/@''GNULIB_PSELECT''@/$(GNULIB_PSELECT)/g' \ + -e 's/@''GNULIB_SELECT''@/$(GNULIB_SELECT)/g' \ + -e 's|@''HAVE_WINSOCK2_H''@|$(HAVE_WINSOCK2_H)|g' \ + -e 's|@''HAVE_PSELECT''@|$(HAVE_PSELECT)|g' \ + -e 's|@''REPLACE_PSELECT''@|$(REPLACE_PSELECT)|g' \ + -e 's|@''REPLACE_SELECT''@|$(REPLACE_SELECT)|g' \ + -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ + -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ + < $(srcdir)/sys_select.in.h; \ + } > $@-t && \ + mv $@-t $@ + +# We need the following in order to create when the system +# doesn't have one that works with the given compiler. +sys/socket.h: sys_socket.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE_H) $(ARG_NONNULL_H) + $(AM_V_at)$(MKDIR_P) sys + $(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_SYS_SOCKET_H''@|$(NEXT_SYS_SOCKET_H)|g' \ + -e 's|@''HAVE_SYS_SOCKET_H''@|$(HAVE_SYS_SOCKET_H)|g' \ + -e 's/@''GNULIB_CLOSE''@/$(GNULIB_CLOSE)/g' \ + -e 's/@''GNULIB_SOCKET''@/$(GNULIB_SOCKET)/g' \ + -e 's/@''GNULIB_CONNECT''@/$(GNULIB_CONNECT)/g' \ + -e 's/@''GNULIB_ACCEPT''@/$(GNULIB_ACCEPT)/g' \ + -e 's/@''GNULIB_BIND''@/$(GNULIB_BIND)/g' \ + -e 's/@''GNULIB_GETPEERNAME''@/$(GNULIB_GETPEERNAME)/g' \ + -e 's/@''GNULIB_GETSOCKNAME''@/$(GNULIB_GETSOCKNAME)/g' \ + -e 's/@''GNULIB_GETSOCKOPT''@/$(GNULIB_GETSOCKOPT)/g' \ + -e 's/@''GNULIB_LISTEN''@/$(GNULIB_LISTEN)/g' \ + -e 's/@''GNULIB_RECV''@/$(GNULIB_RECV)/g' \ + -e 's/@''GNULIB_SEND''@/$(GNULIB_SEND)/g' \ + -e 's/@''GNULIB_RECVFROM''@/$(GNULIB_RECVFROM)/g' \ + -e 's/@''GNULIB_SENDTO''@/$(GNULIB_SENDTO)/g' \ + -e 's/@''GNULIB_SETSOCKOPT''@/$(GNULIB_SETSOCKOPT)/g' \ + -e 's/@''GNULIB_SHUTDOWN''@/$(GNULIB_SHUTDOWN)/g' \ + -e 's/@''GNULIB_ACCEPT4''@/$(GNULIB_ACCEPT4)/g' \ + -e 's|@''HAVE_WINSOCK2_H''@|$(HAVE_WINSOCK2_H)|g' \ + -e 's|@''HAVE_WS2TCPIP_H''@|$(HAVE_WS2TCPIP_H)|g' \ + -e 's|@''HAVE_STRUCT_SOCKADDR_STORAGE''@|$(HAVE_STRUCT_SOCKADDR_STORAGE)|g' \ + -e 's|@''HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY''@|$(HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY)|g' \ + -e 's|@''HAVE_SA_FAMILY_T''@|$(HAVE_SA_FAMILY_T)|g' \ + -e 's|@''HAVE_ACCEPT4''@|$(HAVE_ACCEPT4)|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)' \ + < $(srcdir)/sys_socket.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. +sys/time.h: sys_time.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) + $(AM_V_at)$(MKDIR_P) sys + $(AM_V_GEN)rm -f $@-t $@ && \ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ + sed -e 's|@''GUARD_PREFIX''@|GL|g' \ + -e 's/@''HAVE_SYS_TIME_H''@/$(HAVE_SYS_TIME_H)/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_SYS_TIME_H''@|$(NEXT_SYS_TIME_H)|g' \ + -e 's/@''GNULIB_GETTIMEOFDAY''@/$(GNULIB_GETTIMEOFDAY)/g' \ + -e 's|@''HAVE_WINSOCK2_H''@|$(HAVE_WINSOCK2_H)|g' \ + -e 's/@''HAVE_GETTIMEOFDAY''@/$(HAVE_GETTIMEOFDAY)/g' \ + -e 's/@''HAVE_STRUCT_TIMEVAL''@/$(HAVE_STRUCT_TIMEVAL)/g' \ + -e 's/@''REPLACE_GETTIMEOFDAY''@/$(REPLACE_GETTIMEOFDAY)/g' \ + -e 's/@''REPLACE_STRUCT_TIMEVAL''@/$(REPLACE_STRUCT_TIMEVAL)/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)' \ + < $(srcdir)/sys_time.in.h; \ + } > $@-t && \ + mv $@-t $@ + +# We need the following in order to create when the system +# doesn't have one that works with the given compiler. +sys/uio.h: sys_uio.in.h $(top_builddir)/config.status + $(AM_V_at)$(MKDIR_P) sys + $(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_SYS_UIO_H''@|$(NEXT_SYS_UIO_H)|g' \ + -e 's|@''HAVE_SYS_UIO_H''@|$(HAVE_SYS_UIO_H)|g' \ + < $(srcdir)/sys_uio.in.h; \ + } > $@-t && \ + mv -f $@-t $@ + # Clean up after Solaris cc. clean-local: rm -rf SunWS_cache diff -Nru grep-3.1/gnulib-tests/nanosleep.c grep-3.3/gnulib-tests/nanosleep.c --- grep-3.1/gnulib-tests/nanosleep.c 1970-01-01 00:00:00.000000000 +0000 +++ grep-3.3/gnulib-tests/nanosleep.c 2018-06-24 23:16:49.000000000 +0000 @@ -0,0 +1,276 @@ +/* Provide a replacement for the POSIX nanosleep function. + + Copyright (C) 1999-2000, 2002, 2004-2018 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 + and Bruno Haible for the native Windows part */ + +#include + +#include + +#include "intprops.h" +#include "sig-handler.h" +#include "verify.h" + +#include +#include +#include +#include +#include + +#include +#include + +#include + + +enum { BILLION = 1000 * 1000 * 1000 }; + +#if HAVE_BUG_BIG_NANOSLEEP + +int +nanosleep (const struct timespec *requested_delay, + struct timespec *remaining_delay) +# undef nanosleep +{ + /* nanosleep mishandles large sleeps due to internal overflow problems. + The worst known case of this is Linux 2.6.9 with glibc 2.3.4, which + can't sleep more than 24.85 days (2^31 milliseconds). Similarly, + cygwin 1.5.x, which can't sleep more than 49.7 days (2^32 milliseconds). + Solve this by breaking the sleep up into smaller chunks. */ + + if (requested_delay->tv_nsec < 0 || BILLION <= requested_delay->tv_nsec) + { + errno = EINVAL; + return -1; + } + + { + /* Verify that time_t is large enough. */ + verify (TYPE_MAXIMUM (time_t) / 24 / 24 / 60 / 60); + const time_t limit = 24 * 24 * 60 * 60; + time_t seconds = requested_delay->tv_sec; + struct timespec intermediate; + intermediate.tv_nsec = requested_delay->tv_nsec; + + while (limit < seconds) + { + int result; + intermediate.tv_sec = limit; + result = nanosleep (&intermediate, remaining_delay); + seconds -= limit; + if (result) + { + if (remaining_delay) + remaining_delay->tv_sec += seconds; + return result; + } + intermediate.tv_nsec = 0; + } + intermediate.tv_sec = seconds; + return nanosleep (&intermediate, remaining_delay); + } +} + +#elif defined _WIN32 && ! defined __CYGWIN__ +/* Native Windows platforms. */ + +# define WIN32_LEAN_AND_MEAN +# include + +/* The Windows API function Sleep() has a resolution of about 15 ms and takes + at least 5 ms to execute. We use this function for longer time periods. + Additionally, we use busy-looping over short time periods, to get a + resolution of about 0.01 ms. In order to measure such short timespans, + we use the QueryPerformanceCounter() function. */ + +int +nanosleep (const struct timespec *requested_delay, + struct timespec *remaining_delay) +{ + static bool initialized; + /* Number of performance counter increments per nanosecond, + or zero if it could not be determined. */ + static double ticks_per_nanosecond; + + if (requested_delay->tv_nsec < 0 || BILLION <= requested_delay->tv_nsec) + { + errno = EINVAL; + return -1; + } + + /* For requested delays of one second or more, 15ms resolution is + sufficient. */ + if (requested_delay->tv_sec == 0) + { + if (!initialized) + { + /* Initialize ticks_per_nanosecond. */ + LARGE_INTEGER ticks_per_second; + + if (QueryPerformanceFrequency (&ticks_per_second)) + ticks_per_nanosecond = + (double) ticks_per_second.QuadPart / 1000000000.0; + + initialized = true; + } + if (ticks_per_nanosecond) + { + /* QueryPerformanceFrequency worked. We can use + QueryPerformanceCounter. Use a combination of Sleep and + busy-looping. */ + /* Number of milliseconds to pass to the Sleep function. + Since Sleep can take up to 8 ms less or 8 ms more than requested + (or maybe more if the system is loaded), we subtract 10 ms. */ + int sleep_millis = (int) requested_delay->tv_nsec / 1000000 - 10; + /* Determine how many ticks to delay. */ + LONGLONG wait_ticks = requested_delay->tv_nsec * ticks_per_nanosecond; + /* Start. */ + LARGE_INTEGER counter_before; + if (QueryPerformanceCounter (&counter_before)) + { + /* Wait until the performance counter has reached this value. + We don't need to worry about overflow, because the performance + counter is reset at reboot, and with a frequency of 3.6E6 + ticks per second 63 bits suffice for over 80000 years. */ + LONGLONG wait_until = counter_before.QuadPart + wait_ticks; + /* Use Sleep for the longest part. */ + if (sleep_millis > 0) + Sleep (sleep_millis); + /* Busy-loop for the rest. */ + for (;;) + { + LARGE_INTEGER counter_after; + if (!QueryPerformanceCounter (&counter_after)) + /* QueryPerformanceCounter failed, but succeeded earlier. + Should not happen. */ + break; + if (counter_after.QuadPart >= wait_until) + /* The requested time has elapsed. */ + break; + } + goto done; + } + } + } + /* Implementation for long delays and as fallback. */ + Sleep (requested_delay->tv_sec * 1000 + requested_delay->tv_nsec / 1000000); + + done: + /* Sleep is not interruptible. So there is no remaining delay. */ + if (remaining_delay != NULL) + { + remaining_delay->tv_sec = 0; + remaining_delay->tv_nsec = 0; + } + return 0; +} + +#else +/* Unix platforms lacking nanosleep. */ + +/* Some systems (MSDOS) don't have SIGCONT. + Using SIGTERM here turns the signal-handling code below + into a no-op on such systems. */ +# ifndef SIGCONT +# define SIGCONT SIGTERM +# endif + +static sig_atomic_t volatile suspended; + +/* Handle SIGCONT. */ + +static void +sighandler (int sig) +{ + suspended = 1; +} + +/* Suspend execution for at least *TS_DELAY seconds. */ + +static int +my_usleep (const struct timespec *ts_delay) +{ + struct timeval tv_delay; + tv_delay.tv_sec = ts_delay->tv_sec; + tv_delay.tv_usec = (ts_delay->tv_nsec + 999) / 1000; + if (tv_delay.tv_usec == 1000000) + { + if (tv_delay.tv_sec == TYPE_MAXIMUM (time_t)) + tv_delay.tv_usec = 1000000 - 1; /* close enough */ + else + { + tv_delay.tv_sec++; + tv_delay.tv_usec = 0; + } + } + return select (0, NULL, NULL, NULL, &tv_delay); +} + +/* Suspend execution for at least *REQUESTED_DELAY seconds. The + *REMAINING_DELAY part isn't implemented yet. */ + +int +nanosleep (const struct timespec *requested_delay, + struct timespec *remaining_delay) +{ + static bool initialized; + + if (requested_delay->tv_nsec < 0 || BILLION <= requested_delay->tv_nsec) + { + errno = EINVAL; + return -1; + } + + /* set up sig handler */ + if (! initialized) + { + struct sigaction oldact; + + sigaction (SIGCONT, NULL, &oldact); + if (get_handler (&oldact) != SIG_IGN) + { + struct sigaction newact; + + newact.sa_handler = sighandler; + sigemptyset (&newact.sa_mask); + newact.sa_flags = 0; + sigaction (SIGCONT, &newact, NULL); + } + initialized = true; + } + + suspended = 0; + + if (my_usleep (requested_delay) == -1) + { + if (suspended) + { + /* Calculate time remaining. */ + /* FIXME: the code in sleep doesn't use this, so there's no + rush to implement it. */ + + errno = EINTR; + } + return -1; + } + + /* FIXME: Restore sig handler? */ + + return 0; +} +#endif diff -Nru grep-3.1/gnulib-tests/nap.h grep-3.3/gnulib-tests/nap.h --- grep-3.1/gnulib-tests/nap.h 1970-01-01 00:00:00.000000000 +0000 +++ grep-3.3/gnulib-tests/nap.h 2018-09-19 05:04:26.000000000 +0000 @@ -0,0 +1,155 @@ +/* Assist in file system timestamp tests. + Copyright (C) 2009-2018 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 Eric Blake , 2009. */ + +#ifndef GLTEST_NAP_H +# define GLTEST_NAP_H + +# include +# include + +# include + +/* Name of the witness file. */ +#define TEMPFILE BASE "nap.tmp" + +/* File descriptor used for the witness file. */ +static int nap_fd = -1; + +/* Return A - B, in ns. + Return 0 if the true result would be negative. + Return INT_MAX if the true result would be greater than INT_MAX. */ +static int +diff_timespec (struct timespec a, struct timespec b) +{ + time_t as = a.tv_sec; + time_t bs = b.tv_sec; + int ans = a.tv_nsec; + int bns = b.tv_nsec; + int sdiff; + + ASSERT (0 <= ans && ans < 2000000000); + ASSERT (0 <= bns && bns < 2000000000); + + if (! (bs < as || (bs == as && bns < ans))) + return 0; + + if (INT_SUBTRACT_WRAPV (as, bs, &sdiff) + || INT_MULTIPLY_WRAPV (sdiff, 1000000000, &sdiff) + || INT_ADD_WRAPV (sdiff, ans - bns, &sdiff)) + return INT_MAX; + + return sdiff; +} + +/* If DO_WRITE, bump the modification time of the file designated by NAP_FD. + Then fetch the new STAT information of NAP_FD. */ +static void +nap_get_stat (struct stat *st, int do_write) +{ + if (do_write) + { + ASSERT (write (nap_fd, "\n", 1) == 1); +#if defined _WIN32 || defined __CYGWIN__ + /* On Windows, the modification times are not changed until NAP_FD + is closed. See + https://msdn.microsoft.com/en-us/library/windows/desktop/aa365747(v=vs.85).aspx */ + close (nap_fd); + nap_fd = open (TEMPFILE, O_RDWR, 0600); + ASSERT (nap_fd != -1); + lseek (nap_fd, 0, SEEK_END); +#endif + } + ASSERT (fstat (nap_fd, st) == 0); +} + +/* Given a file whose descriptor is FD, see whether delaying by DELAY + nanoseconds causes a change in a file's mtime. + OLD_ST is the file's status, recently gotten. */ +static bool +nap_works (int delay, struct stat old_st) +{ + struct stat st; + struct timespec delay_spec; + delay_spec.tv_sec = delay / 1000000000; + delay_spec.tv_nsec = delay % 1000000000; + ASSERT (nanosleep (&delay_spec, 0) == 0); + nap_get_stat (&st, 1); + + if (diff_timespec (get_stat_mtime (&st), get_stat_mtime (&old_st))) + return true; + + return false; +} + +static void +clear_temp_file (void) +{ + if (0 <= nap_fd) + { + ASSERT (close (nap_fd) != -1); + ASSERT (unlink (TEMPFILE) != -1); + } +} + +/* Sleep long enough to notice a timestamp difference on the file + system in the current directory. Use an adaptive approach, trying + to find the smallest delay which works on the current file system + to make the timestamp difference appear. Assert a maximum delay of + ~2 seconds, more precisely sum(2^n) from 0 to 30 = 2^31 - 1 = 2.1s. + Assumes that BASE is defined, and requires that the test module + depends on nanosleep. */ +static void +nap (void) +{ + struct stat old_st; + static int delay = 1; + + if (-1 == nap_fd) + { + atexit (clear_temp_file); + ASSERT ((nap_fd = creat (TEMPFILE, 0600)) != -1); + nap_get_stat (&old_st, 0); + } + else + { + ASSERT (0 <= nap_fd); + nap_get_stat (&old_st, 1); + } + + if (1 < delay) + delay = delay / 2; /* Try half of the previous delay. */ + ASSERT (0 < delay); + + for (;;) + { + if (nap_works (delay, old_st)) + return; + if (delay <= (2147483647 - 1) / 2) + { + delay = delay * 2 + 1; + continue; + } + else + break; + } + + /* Bummer: even the highest nap delay didn't work. */ + ASSERT (0); +} + +#endif /* GLTEST_NAP_H */ diff -Nru grep-3.1/gnulib-tests/netinet_in.in.h grep-3.3/gnulib-tests/netinet_in.in.h --- grep-3.1/gnulib-tests/netinet_in.in.h 1970-01-01 00:00:00.000000000 +0000 +++ grep-3.3/gnulib-tests/netinet_in.in.h 2018-01-07 00:07:59.000000000 +0000 @@ -0,0 +1,47 @@ +/* Substitute for . + Copyright (C) 2007-2018 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@_NETINET_IN_H + +#if __GNUC__ >= 3 +@PRAGMA_SYSTEM_HEADER@ +#endif +@PRAGMA_COLUMNS@ + +#if @HAVE_NETINET_IN_H@ + +/* On many platforms, assumes prior inclusion of + . */ +# include + +/* The include_next requires a split double-inclusion guard. */ +# @INCLUDE_NEXT@ @NEXT_NETINET_IN_H@ + +#endif + +#ifndef _@GUARD_PREFIX@_NETINET_IN_H +#define _@GUARD_PREFIX@_NETINET_IN_H + +#if !@HAVE_NETINET_IN_H@ + +/* A platform that lacks . */ + +# include + +#endif + +#endif /* _@GUARD_PREFIX@_NETINET_IN_H */ +#endif /* _@GUARD_PREFIX@_NETINET_IN_H */ diff -Nru grep-3.1/gnulib-tests/_Noreturn.h grep-3.3/gnulib-tests/_Noreturn.h --- grep-3.1/gnulib-tests/_Noreturn.h 2017-03-17 04:33:17.000000000 +0000 +++ grep-3.3/gnulib-tests/_Noreturn.h 2018-12-21 02:51:47.000000000 +0000 @@ -1,8 +1,12 @@ -#if !defined _Noreturn && __STDC_VERSION__ < 201112 -# if (3 <= __GNUC__ || (__GNUC__ == 2 && 8 <= __GNUC_MINOR__) \ - || 0x5110 <= __SUNPRO_C) +#ifndef _Noreturn +# if 201103 <= (defined __cplusplus ? __cplusplus : 0) +# define _Noreturn [[noreturn]] +# elif (201112 <= (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) \ + || 4 < __GNUC__ + (7 <= __GNUC_MINOR__)) + /* _Noreturn works as-is. */ +# elif 2 < __GNUC__ + (8 <= __GNUC_MINOR__) || 0x5110 <= __SUNPRO_C # define _Noreturn __attribute__ ((__noreturn__)) -# elif 1200 <= _MSC_VER +# elif 1200 <= (defined _MSC_VER ? _MSC_VER : 0) # define _Noreturn __declspec (noreturn) # else # define _Noreturn diff -Nru grep-3.1/gnulib-tests/perror.c grep-3.3/gnulib-tests/perror.c --- grep-3.1/gnulib-tests/perror.c 1970-01-01 00:00:00.000000000 +0000 +++ grep-3.3/gnulib-tests/perror.c 2018-01-07 00:07:08.000000000 +0000 @@ -0,0 +1,49 @@ +/* Print a message describing error code. + Copyright (C) 2008-2018 Free Software Foundation, Inc. + Written by Bruno Haible and Simon Josefsson. + + 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 + +#include +#include +#include + +#include "strerror-override.h" + +/* Use the system functions, not the gnulib overrides in this file. */ +#undef fprintf + +void +perror (const char *string) +{ + char stackbuf[STACKBUF_LEN]; + int ret; + + /* Our implementation guarantees that this will be a non-empty + string, even if it returns EINVAL; and stackbuf should be sized + large enough to avoid ERANGE. */ + ret = strerror_r (errno, stackbuf, sizeof stackbuf); + if (ret == ERANGE) + abort (); + + if (string != NULL && *string != '\0') + fprintf (stderr, "%s: %s\n", string, stackbuf); + else + fprintf (stderr, "%s\n", stackbuf); +} diff -Nru grep-3.1/gnulib-tests/pipe.c grep-3.3/gnulib-tests/pipe.c --- grep-3.1/gnulib-tests/pipe.c 2017-01-01 11:25:46.000000000 +0000 +++ grep-3.3/gnulib-tests/pipe.c 2018-06-24 23:17:59.000000000 +0000 @@ -1,5 +1,5 @@ /* Create a pipe. - Copyright (C) 2009-2017 Free Software Foundation, Inc. + Copyright (C) 2009-2018 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 @@ -12,14 +12,14 @@ 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 . */ + with this program; if not, see . */ #include /* Specification. */ #include -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +#if defined _WIN32 && ! defined __CYGWIN__ /* Native Windows API. */ /* Get _pipe(). */ diff -Nru grep-3.1/gnulib-tests/printf-args.c grep-3.3/gnulib-tests/printf-args.c --- grep-3.1/gnulib-tests/printf-args.c 2017-01-01 11:25:46.000000000 +0000 +++ grep-3.3/gnulib-tests/printf-args.c 2018-01-07 00:08:00.000000000 +0000 @@ -1,5 +1,5 @@ /* Decomposed printf argument list. - Copyright (C) 1999, 2002-2003, 2005-2007, 2009-2017 Free Software + Copyright (C) 1999, 2002-2003, 2005-2007, 2009-2018 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify @@ -13,7 +13,7 @@ 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 . */ + with this program; if not, see . */ /* This file can be parametrized with the following macros: ENABLE_UNISTDIO Set to 1 to enable the unistdio extensions. diff -Nru grep-3.1/gnulib-tests/printf-args.h grep-3.3/gnulib-tests/printf-args.h --- grep-3.1/gnulib-tests/printf-args.h 2017-01-01 11:25:46.000000000 +0000 +++ grep-3.3/gnulib-tests/printf-args.h 2018-01-07 00:08:00.000000000 +0000 @@ -1,5 +1,5 @@ /* Decomposed printf argument list. - Copyright (C) 1999, 2002-2003, 2006-2007, 2011-2017 Free Software + Copyright (C) 1999, 2002-2003, 2006-2007, 2011-2018 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify @@ -13,7 +13,7 @@ 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 . */ + with this program; if not, see . */ #ifndef _PRINTF_ARGS_H #define _PRINTF_ARGS_H diff -Nru grep-3.1/gnulib-tests/printf-parse.c grep-3.3/gnulib-tests/printf-parse.c --- grep-3.1/gnulib-tests/printf-parse.c 2017-01-01 11:25:46.000000000 +0000 +++ grep-3.3/gnulib-tests/printf-parse.c 2018-06-24 23:17:59.000000000 +0000 @@ -1,5 +1,5 @@ /* Formatted output to strings. - Copyright (C) 1999-2000, 2002-2003, 2006-2017 Free Software Foundation, Inc. + Copyright (C) 1999-2000, 2002-2003, 2006-2018 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 @@ -12,7 +12,7 @@ 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 . */ + with this program; if not, see . */ /* This file can be parametrized with the following macros: CHAR_T The element type of the format string. @@ -419,7 +419,7 @@ cp++; } #endif -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +#if defined _WIN32 && ! defined __CYGWIN__ /* On native Windows, PRIdMAX is defined as "I64d". We cannot change it to "lld" because PRIdMAX must also be understood by the system's printf routines. */ diff -Nru grep-3.1/gnulib-tests/printf-parse.h grep-3.3/gnulib-tests/printf-parse.h --- grep-3.1/gnulib-tests/printf-parse.h 2017-01-01 11:25:46.000000000 +0000 +++ grep-3.3/gnulib-tests/printf-parse.h 2018-01-07 00:08:00.000000000 +0000 @@ -1,5 +1,5 @@ /* Parse printf format string. - Copyright (C) 1999, 2002-2003, 2005, 2007, 2010-2017 Free Software + Copyright (C) 1999, 2002-2003, 2005, 2007, 2010-2018 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify @@ -13,7 +13,7 @@ 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 . */ + with this program; if not, see . */ #ifndef _PRINTF_PARSE_H #define _PRINTF_PARSE_H diff -Nru grep-3.1/gnulib-tests/putenv.c grep-3.3/gnulib-tests/putenv.c --- grep-3.1/gnulib-tests/putenv.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/gnulib-tests/putenv.c 2018-06-24 23:16:49.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1994, 1997-1998, 2000, 2003-2017 Free Software +/* Copyright (C) 1991, 1994, 1997-1998, 2000, 2003-2018 Free Software Foundation, Inc. NOTE: The canonical source of this file is maintained with the GNU C @@ -15,7 +15,7 @@ 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 . */ + along with this program. If not, see . */ #include @@ -34,7 +34,7 @@ #include #include -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +#if defined _WIN32 && ! defined __CYGWIN__ # define WIN32_LEAN_AND_MEAN # include #endif @@ -153,7 +153,7 @@ *ep = string; break; } -# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +# if defined _WIN32 && ! defined __CYGWIN__ if (putenv_result == 0) { /* _putenv propagated "NAME= " into the subprocess environment; diff -Nru grep-3.1/gnulib-tests/select.c grep-3.3/gnulib-tests/select.c --- grep-3.1/gnulib-tests/select.c 1970-01-01 00:00:00.000000000 +0000 +++ grep-3.3/gnulib-tests/select.c 2018-09-19 05:05:04.000000000 +0000 @@ -0,0 +1,583 @@ +/* Emulation for select(2) + Contributed by Paolo Bonzini. + + Copyright 2008-2018 Free Software Foundation, Inc. + + This file is part of gnulib. + + 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 . */ + +#include +#include +#include + +#if defined _WIN32 && ! defined __CYGWIN__ +/* Native Windows. */ + +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +/* Get the overridden 'struct timeval'. */ +#include + +#if GNULIB_MSVC_NOTHROW +# include "msvc-nothrow.h" +#else +# include +#endif + +#undef select + +/* Avoid warnings from gcc -Wcast-function-type. */ +#define GetProcAddress \ + (void *) GetProcAddress + +struct bitset { + unsigned char in[FD_SETSIZE / CHAR_BIT]; + unsigned char out[FD_SETSIZE / CHAR_BIT]; +}; + +/* Declare data structures for ntdll functions. */ +typedef struct _FILE_PIPE_LOCAL_INFORMATION { + ULONG NamedPipeType; + ULONG NamedPipeConfiguration; + ULONG MaximumInstances; + ULONG CurrentInstances; + ULONG InboundQuota; + ULONG ReadDataAvailable; + ULONG OutboundQuota; + ULONG WriteQuotaAvailable; + ULONG NamedPipeState; + ULONG NamedPipeEnd; +} FILE_PIPE_LOCAL_INFORMATION, *PFILE_PIPE_LOCAL_INFORMATION; + +typedef struct _IO_STATUS_BLOCK +{ + union { + DWORD Status; + PVOID Pointer; + } u; + ULONG_PTR Information; +} IO_STATUS_BLOCK, *PIO_STATUS_BLOCK; + +typedef enum _FILE_INFORMATION_CLASS { + FilePipeLocalInformation = 24 +} FILE_INFORMATION_CLASS, *PFILE_INFORMATION_CLASS; + +typedef DWORD (WINAPI *PNtQueryInformationFile) + (HANDLE, IO_STATUS_BLOCK *, VOID *, ULONG, FILE_INFORMATION_CLASS); + +#ifndef PIPE_BUF +#define PIPE_BUF 512 +#endif + +static BOOL IsConsoleHandle (HANDLE h) +{ + DWORD mode; + return GetConsoleMode (h, &mode) != 0; +} + +static BOOL +IsSocketHandle (HANDLE h) +{ + WSANETWORKEVENTS ev; + + if (IsConsoleHandle (h)) + return FALSE; + + /* Under Wine, it seems that getsockopt returns 0 for pipes too. + WSAEnumNetworkEvents instead distinguishes the two correctly. */ + ev.lNetworkEvents = 0xDEADBEEF; + WSAEnumNetworkEvents ((SOCKET) h, NULL, &ev); + return ev.lNetworkEvents != 0xDEADBEEF; +} + +/* Compute output fd_sets for libc descriptor FD (whose Windows handle is + H). */ + +static int +windows_poll_handle (HANDLE h, int fd, + struct bitset *rbits, + struct bitset *wbits, + struct bitset *xbits) +{ + BOOL read, write, except; + int i, ret; + INPUT_RECORD *irbuffer; + DWORD avail, nbuffer; + BOOL bRet; + IO_STATUS_BLOCK iosb; + FILE_PIPE_LOCAL_INFORMATION fpli; + static PNtQueryInformationFile NtQueryInformationFile; + static BOOL once_only; + + read = write = except = FALSE; + switch (GetFileType (h)) + { + case FILE_TYPE_DISK: + read = TRUE; + write = TRUE; + break; + + case FILE_TYPE_PIPE: + if (!once_only) + { + NtQueryInformationFile = (PNtQueryInformationFile) + GetProcAddress (GetModuleHandle ("ntdll.dll"), + "NtQueryInformationFile"); + once_only = TRUE; + } + + if (PeekNamedPipe (h, NULL, 0, NULL, &avail, NULL) != 0) + { + if (avail) + read = TRUE; + } + else if (GetLastError () == ERROR_BROKEN_PIPE) + ; + + else + { + /* It was the write-end of the pipe. Check if it is writable. + If NtQueryInformationFile fails, optimistically assume the pipe is + writable. This could happen on Windows 9x, where + NtQueryInformationFile is not available, or if we inherit a pipe + that doesn't permit FILE_READ_ATTRIBUTES access on the write end + (I think this should not happen since Windows XP SP2; WINE seems + fine too). Otherwise, ensure that enough space is available for + atomic writes. */ + memset (&iosb, 0, sizeof (iosb)); + memset (&fpli, 0, sizeof (fpli)); + + if (!NtQueryInformationFile + || NtQueryInformationFile (h, &iosb, &fpli, sizeof (fpli), + FilePipeLocalInformation) + || fpli.WriteQuotaAvailable >= PIPE_BUF + || (fpli.OutboundQuota < PIPE_BUF && + fpli.WriteQuotaAvailable == fpli.OutboundQuota)) + write = TRUE; + } + break; + + case FILE_TYPE_CHAR: + write = TRUE; + if (!(rbits->in[fd / CHAR_BIT] & (1 << (fd & (CHAR_BIT - 1))))) + break; + + ret = WaitForSingleObject (h, 0); + if (ret == WAIT_OBJECT_0) + { + if (!IsConsoleHandle (h)) + { + read = TRUE; + break; + } + + nbuffer = avail = 0; + bRet = GetNumberOfConsoleInputEvents (h, &nbuffer); + + /* Screen buffers handles are filtered earlier. */ + assert (bRet); + if (nbuffer == 0) + { + except = TRUE; + break; + } + + irbuffer = (INPUT_RECORD *) alloca (nbuffer * sizeof (INPUT_RECORD)); + bRet = PeekConsoleInput (h, irbuffer, nbuffer, &avail); + if (!bRet || avail == 0) + { + except = TRUE; + break; + } + + for (i = 0; i < avail; i++) + if (irbuffer[i].EventType == KEY_EVENT) + read = TRUE; + } + break; + + default: + ret = WaitForSingleObject (h, 0); + write = TRUE; + if (ret == WAIT_OBJECT_0) + read = TRUE; + + break; + } + + ret = 0; + if (read && (rbits->in[fd / CHAR_BIT] & (1 << (fd & (CHAR_BIT - 1))))) + { + rbits->out[fd / CHAR_BIT] |= (1 << (fd & (CHAR_BIT - 1))); + ret++; + } + + if (write && (wbits->in[fd / CHAR_BIT] & (1 << (fd & (CHAR_BIT - 1))))) + { + wbits->out[fd / CHAR_BIT] |= (1 << (fd & (CHAR_BIT - 1))); + ret++; + } + + if (except && (xbits->in[fd / CHAR_BIT] & (1 << (fd & (CHAR_BIT - 1))))) + { + xbits->out[fd / CHAR_BIT] |= (1 << (fd & (CHAR_BIT - 1))); + ret++; + } + + return ret; +} + +int +rpl_select (int nfds, fd_set *rfds, fd_set *wfds, fd_set *xfds, + struct timeval *timeout) +#undef timeval +{ + static struct timeval tv0; + static HANDLE hEvent; + HANDLE h, handle_array[FD_SETSIZE + 2]; + fd_set handle_rfds, handle_wfds, handle_xfds; + struct bitset rbits, wbits, xbits; + unsigned char anyfds_in[FD_SETSIZE / CHAR_BIT]; + DWORD ret, wait_timeout, nhandles, nsock, nbuffer; + MSG msg; + int i, fd, rc; + clock_t tend; + + if (nfds > FD_SETSIZE) + nfds = FD_SETSIZE; + + if (!timeout) + wait_timeout = INFINITE; + else + { + wait_timeout = timeout->tv_sec * 1000 + timeout->tv_usec / 1000; + + /* select is also used as a portable usleep. */ + if (!rfds && !wfds && !xfds) + { + Sleep (wait_timeout); + return 0; + } + } + + if (!hEvent) + hEvent = CreateEvent (NULL, FALSE, FALSE, NULL); + + handle_array[0] = hEvent; + nhandles = 1; + nsock = 0; + + /* Copy descriptors to bitsets. At the same time, eliminate + bits in the "wrong" direction for console input buffers + and screen buffers, because screen buffers are waitable + and they will block until a character is available. */ + memset (&rbits, 0, sizeof (rbits)); + memset (&wbits, 0, sizeof (wbits)); + memset (&xbits, 0, sizeof (xbits)); + memset (anyfds_in, 0, sizeof (anyfds_in)); + if (rfds) + for (i = 0; i < rfds->fd_count; i++) + { + fd = rfds->fd_array[i]; + h = (HANDLE) _get_osfhandle (fd); + if (IsConsoleHandle (h) + && !GetNumberOfConsoleInputEvents (h, &nbuffer)) + continue; + + rbits.in[fd / CHAR_BIT] |= 1 << (fd & (CHAR_BIT - 1)); + anyfds_in[fd / CHAR_BIT] |= 1 << (fd & (CHAR_BIT - 1)); + } + else + rfds = (fd_set *) alloca (sizeof (fd_set)); + + if (wfds) + for (i = 0; i < wfds->fd_count; i++) + { + fd = wfds->fd_array[i]; + h = (HANDLE) _get_osfhandle (fd); + if (IsConsoleHandle (h) + && GetNumberOfConsoleInputEvents (h, &nbuffer)) + continue; + + wbits.in[fd / CHAR_BIT] |= 1 << (fd & (CHAR_BIT - 1)); + anyfds_in[fd / CHAR_BIT] |= 1 << (fd & (CHAR_BIT - 1)); + } + else + wfds = (fd_set *) alloca (sizeof (fd_set)); + + if (xfds) + for (i = 0; i < xfds->fd_count; i++) + { + fd = xfds->fd_array[i]; + xbits.in[fd / CHAR_BIT] |= 1 << (fd & (CHAR_BIT - 1)); + anyfds_in[fd / CHAR_BIT] |= 1 << (fd & (CHAR_BIT - 1)); + } + else + xfds = (fd_set *) alloca (sizeof (fd_set)); + + /* Zero all the fd_sets, including the application's. */ + FD_ZERO (rfds); + FD_ZERO (wfds); + FD_ZERO (xfds); + FD_ZERO (&handle_rfds); + FD_ZERO (&handle_wfds); + FD_ZERO (&handle_xfds); + + /* Classify handles. Create fd sets for sockets, poll the others. */ + for (i = 0; i < nfds; i++) + { + if ((anyfds_in[i / CHAR_BIT] & (1 << (i & (CHAR_BIT - 1)))) == 0) + continue; + + h = (HANDLE) _get_osfhandle (i); + if (!h) + { + errno = EBADF; + return -1; + } + + if (IsSocketHandle (h)) + { + int requested = FD_CLOSE; + + /* See above; socket handles are mapped onto select, but we + need to map descriptors to handles. */ + if (rbits.in[i / CHAR_BIT] & (1 << (i & (CHAR_BIT - 1)))) + { + requested |= FD_READ | FD_ACCEPT; + FD_SET ((SOCKET) h, rfds); + FD_SET ((SOCKET) h, &handle_rfds); + } + if (wbits.in[i / CHAR_BIT] & (1 << (i & (CHAR_BIT - 1)))) + { + requested |= FD_WRITE | FD_CONNECT; + FD_SET ((SOCKET) h, wfds); + FD_SET ((SOCKET) h, &handle_wfds); + } + if (xbits.in[i / CHAR_BIT] & (1 << (i & (CHAR_BIT - 1)))) + { + requested |= FD_OOB; + FD_SET ((SOCKET) h, xfds); + FD_SET ((SOCKET) h, &handle_xfds); + } + + WSAEventSelect ((SOCKET) h, hEvent, requested); + nsock++; + } + else + { + handle_array[nhandles++] = h; + + /* Poll now. If we get an event, do not wait below. */ + if (wait_timeout != 0 + && windows_poll_handle (h, i, &rbits, &wbits, &xbits)) + wait_timeout = 0; + } + } + + /* Place a sentinel at the end of the array. */ + handle_array[nhandles] = NULL; + + /* When will the waiting period expire? */ + if (wait_timeout != INFINITE) + tend = clock () + wait_timeout; + +restart: + if (wait_timeout == 0 || nsock == 0) + rc = 0; + else + { + /* See if we need to wait in the loop below. If any select is ready, + do MsgWaitForMultipleObjects anyway to dispatch messages, but + no need to call select again. */ + rc = select (0, &handle_rfds, &handle_wfds, &handle_xfds, &tv0); + if (rc == 0) + { + /* Restore the fd_sets for the other select we do below. */ + memcpy (&handle_rfds, rfds, sizeof (fd_set)); + memcpy (&handle_wfds, wfds, sizeof (fd_set)); + memcpy (&handle_xfds, xfds, sizeof (fd_set)); + } + else + wait_timeout = 0; + } + + /* How much is left to wait? */ + if (wait_timeout != INFINITE) + { + clock_t tnow = clock (); + if (tend >= tnow) + wait_timeout = tend - tnow; + else + wait_timeout = 0; + } + + for (;;) + { + ret = MsgWaitForMultipleObjects (nhandles, handle_array, FALSE, + wait_timeout, QS_ALLINPUT); + + if (ret == WAIT_OBJECT_0 + nhandles) + { + /* new input of some other kind */ + BOOL bRet; + while ((bRet = PeekMessage (&msg, NULL, 0, 0, PM_REMOVE)) != 0) + { + TranslateMessage (&msg); + DispatchMessage (&msg); + } + } + else + break; + } + + /* If we haven't done it yet, check the status of the sockets. */ + if (rc == 0 && nsock > 0) + rc = select (0, &handle_rfds, &handle_wfds, &handle_xfds, &tv0); + + if (nhandles > 1) + { + /* Count results that are not counted in the return value of select. */ + nhandles = 1; + for (i = 0; i < nfds; i++) + { + if ((anyfds_in[i / CHAR_BIT] & (1 << (i & (CHAR_BIT - 1)))) == 0) + continue; + + h = (HANDLE) _get_osfhandle (i); + if (h == handle_array[nhandles]) + { + /* Not a socket. */ + nhandles++; + windows_poll_handle (h, i, &rbits, &wbits, &xbits); + if (rbits.out[i / CHAR_BIT] & (1 << (i & (CHAR_BIT - 1))) + || wbits.out[i / CHAR_BIT] & (1 << (i & (CHAR_BIT - 1))) + || xbits.out[i / CHAR_BIT] & (1 << (i & (CHAR_BIT - 1)))) + rc++; + } + } + + if (rc == 0 + && (wait_timeout == INFINITE + /* If NHANDLES > 1, but no bits are set, it means we've + been told incorrectly that some handle was signaled. + This happens with anonymous pipes, which always cause + MsgWaitForMultipleObjects to exit immediately, but no + data is found ready to be read by windows_poll_handle. + To avoid a total failure (whereby we return zero and + don't wait at all), let's poll in a more busy loop. */ + || (wait_timeout != 0 && nhandles > 1))) + { + /* Sleep 1 millisecond to avoid busy wait and retry with the + original fd_sets. */ + memcpy (&handle_rfds, rfds, sizeof (fd_set)); + memcpy (&handle_wfds, wfds, sizeof (fd_set)); + memcpy (&handle_xfds, xfds, sizeof (fd_set)); + SleepEx (1, TRUE); + goto restart; + } + if (timeout && wait_timeout == 0 && rc == 0) + timeout->tv_sec = timeout->tv_usec = 0; + } + + /* Now fill in the results. */ + FD_ZERO (rfds); + FD_ZERO (wfds); + FD_ZERO (xfds); + nhandles = 1; + for (i = 0; i < nfds; i++) + { + if ((anyfds_in[i / CHAR_BIT] & (1 << (i & (CHAR_BIT - 1)))) == 0) + continue; + + h = (HANDLE) _get_osfhandle (i); + if (h != handle_array[nhandles]) + { + /* Perform handle->descriptor mapping. */ + WSAEventSelect ((SOCKET) h, NULL, 0); + if (FD_ISSET (h, &handle_rfds)) + FD_SET (i, rfds); + if (FD_ISSET (h, &handle_wfds)) + FD_SET (i, wfds); + if (FD_ISSET (h, &handle_xfds)) + FD_SET (i, xfds); + } + else + { + /* Not a socket. */ + nhandles++; + if (rbits.out[i / CHAR_BIT] & (1 << (i & (CHAR_BIT - 1)))) + FD_SET (i, rfds); + if (wbits.out[i / CHAR_BIT] & (1 << (i & (CHAR_BIT - 1)))) + FD_SET (i, wfds); + if (xbits.out[i / CHAR_BIT] & (1 << (i & (CHAR_BIT - 1)))) + FD_SET (i, xfds); + } + } + + return rc; +} + +#else /* ! Native Windows. */ + +#include +#include /* NULL */ +#include +#include + +#undef select + +int +rpl_select (int nfds, fd_set *rfds, fd_set *wfds, fd_set *xfds, + struct timeval *timeout) +{ + int i; + + /* FreeBSD 8.2 has a bug: it does not always detect invalid fds. */ + if (nfds < 0 || nfds > FD_SETSIZE) + { + errno = EINVAL; + return -1; + } + for (i = 0; i < nfds; i++) + { + if (((rfds && FD_ISSET (i, rfds)) + || (wfds && FD_ISSET (i, wfds)) + || (xfds && FD_ISSET (i, xfds))) + && dup2 (i, i) != i) + return -1; + } + + /* Interix 3.5 has a bug: it does not support nfds == 0. */ + if (nfds == 0) + { + nfds = 1; + rfds = NULL; + wfds = NULL; + xfds = NULL; + } + return select (nfds, rfds, wfds, xfds, timeout); +} + +#endif diff -Nru grep-3.1/gnulib-tests/setenv.c grep-3.3/gnulib-tests/setenv.c --- grep-3.1/gnulib-tests/setenv.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/gnulib-tests/setenv.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (C) 1992, 1995-2003, 2005-2017 Free Software Foundation, Inc. +/* Copyright (C) 1992, 1995-2003, 2005-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ #if !_LIBC /* Don't use __attribute__ __nonnull__ in this compilation unit. Otherwise gcc diff -Nru grep-3.1/gnulib-tests/setlocale.c grep-3.3/gnulib-tests/setlocale.c --- grep-3.1/gnulib-tests/setlocale.c 2017-05-14 01:09:51.000000000 +0000 +++ grep-3.3/gnulib-tests/setlocale.c 2018-09-19 05:04:26.000000000 +0000 @@ -1,5 +1,5 @@ /* Set the current locale. -*- coding: utf-8 -*- - Copyright (C) 2009, 2011-2017 Free Software Foundation, Inc. + Copyright (C) 2009, 2011-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ /* Written by Bruno Haible , 2009. */ @@ -29,11 +29,24 @@ /* Specification. */ #include +#include #include #include #include "localename.h" +#if HAVE_CFLOCALECOPYPREFERREDLANGUAGES || HAVE_CFPREFERENCESCOPYAPPVALUE +# if HAVE_CFLOCALECOPYPREFERREDLANGUAGES +# include +# elif HAVE_CFPREFERENCESCOPYAPPVALUE +# include +# endif +# include +# include +# include +extern void gl_locale_name_canonicalize (char *name); +#endif + #if 1 # undef setlocale @@ -72,7 +85,7 @@ return retval; } -# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +# if defined _WIN32 && ! defined __CYGWIN__ /* The native Windows setlocale() function expects locale names of the form "German" or "German_Germany" or "DEU", but not "de" or "de_DE". We need @@ -635,10 +648,8 @@ /* The native Windows implementation of setlocale understands the special locale name "C", but not "POSIX". Therefore map "POSIX" to "C". */ -#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ if (locale != NULL && strcmp (locale, "POSIX") == 0) locale = "C"; -#endif /* First, try setlocale with the original argument unchanged. */ result = setlocale (category, locale); @@ -824,6 +835,7 @@ /* Set LC_CTYPE first. Then the other categories. */ static int const categories[] = { + LC_CTYPE, LC_NUMERIC, LC_TIME, LC_COLLATE, @@ -850,9 +862,22 @@ if (base_name == NULL) base_name = gl_locale_name_default (); - if (setlocale_unixlike (LC_ALL, base_name) == NULL) - goto fail; -# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ + if (setlocale_unixlike (LC_ALL, base_name) != NULL) + { + /* LC_CTYPE category already set. */ + i = 1; + } + else + { + /* On Mac OS X, "UTF-8" is a valid locale name for LC_CTYPE but + not for LC_ALL. Therefore this call may fail. So, try + another base_name. */ + base_name = "C"; + if (setlocale_unixlike (LC_ALL, base_name) == NULL) + goto fail; + i = 0; + } +# if defined _WIN32 && ! defined __CYGWIN__ /* On native Windows, setlocale(LC_ALL,...) may succeed but set the LC_CTYPE category to an invalid value ("C") when it does not support the specified encoding. Report a failure instead. */ @@ -861,7 +886,7 @@ goto fail; # endif - for (i = 0; i < sizeof (categories) / sizeof (categories[0]); i++) + for (; i < sizeof (categories) / sizeof (categories[0]); i++) { int cat = categories[i]; const char *name; @@ -878,7 +903,85 @@ # endif ) if (setlocale_single (cat, name) == NULL) +# if defined __APPLE__ && defined __MACH__ + { + /* On Mac OS X 10.13, some locales can be set through + System Preferences > Language & Region, that are not + supported by libc. The system's setlocale() falls + back to "C" for these locale categories. We can possibly + do better. If we can't, print a warning, to limit user + expectations. */ + int warn = 1; + + if (cat == LC_CTYPE) + warn = (setlocale_single (cat, "UTF-8") == NULL); +# if HAVE_CFLOCALECOPYPREFERREDLANGUAGES || HAVE_CFPREFERENCESCOPYAPPVALUE /* MacOS X 10.4 or newer */ + else if (cat == LC_MESSAGES) + { + /* Take the primary language preference. */ +# if HAVE_CFLOCALECOPYPREFERREDLANGUAGES /* MacOS X 10.5 or newer */ + CFArrayRef prefArray = CFLocaleCopyPreferredLanguages (); +# elif HAVE_CFPREFERENCESCOPYAPPVALUE /* MacOS X 10.4 or newer */ + CFTypeRef preferences = + CFPreferencesCopyAppValue (CFSTR ("AppleLanguages"), + kCFPreferencesCurrentApplication); + if (preferences != NULL + && CFGetTypeID (preferences) == CFArrayGetTypeID ()) + { + CFArrayRef prefArray = (CFArrayRef)preferences; +# endif + int n = CFArrayGetCount (prefArray); + if (n > 0) + { + char buf[256]; + CFTypeRef element = CFArrayGetValueAtIndex (prefArray, 0); + if (element != NULL + && CFGetTypeID (element) == CFStringGetTypeID () + && CFStringGetCString ((CFStringRef)element, + buf, sizeof (buf), + kCFStringEncodingASCII)) + { + /* Remove the country. + E.g. "zh-Hans-DE" -> "zh-Hans". */ + char *last_minus = strrchr (buf, '-'); + if (last_minus != NULL) + *last_minus = '\0'; + + /* Convert to Unix locale name. + E.g. "zh-Hans" -> "zh_CN". */ + gl_locale_name_canonicalize (buf); + + /* Try setlocale with this value. */ + warn = (setlocale_single (cat, buf) == NULL); + } + } +# if HAVE_CFLOCALECOPYPREFERREDLANGUAGES /* MacOS X 10.5 or newer */ + CFRelease (prefArray); +# elif HAVE_CFPREFERENCESCOPYAPPVALUE /* MacOS X 10.4 or newer */ + } +# endif + } +# endif + /* No fallback possible for LC_NUMERIC. The application + should use the locale properties + kCFLocaleDecimalSeparator, kCFLocaleGroupingSeparator. + No fallback possible for LC_TIME. The application should + use the locale property kCFLocaleCalendarIdentifier. + No fallback possible for LC_COLLATE. The application + should use the locale properties + kCFLocaleCollationIdentifier, kCFLocaleCollatorIdentifier. + No fallback possible for LC_MONETARY. The application + should use the locale properties + kCFLocaleCurrencySymbol, kCFLocaleCurrencyCode. */ + + if (warn) + fprintf (stderr, + "Warning: Failed to set locale category %s to %s.\n", + category_to_name (cat), name); + } +# else goto fail; +# endif } /* All steps were successful. */ @@ -903,7 +1006,7 @@ } else { -# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +# if defined _WIN32 && ! defined __CYGWIN__ if (category == LC_ALL && locale != NULL && strchr (locale, '.') != NULL) { char *saved_locale; diff -Nru grep-3.1/gnulib-tests/setsockopt.c grep-3.3/gnulib-tests/setsockopt.c --- grep-3.1/gnulib-tests/setsockopt.c 1970-01-01 00:00:00.000000000 +0000 +++ grep-3.3/gnulib-tests/setsockopt.c 2018-01-07 00:07:08.000000000 +0000 @@ -0,0 +1,65 @@ +/* setsockopt.c --- wrappers for Windows setsockopt function + + Copyright (C) 2008-2018 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 Paolo Bonzini */ + +#include + +#define WIN32_LEAN_AND_MEAN +/* Get winsock2.h. */ +#include + +/* Get struct timeval. */ +#include + +/* Get set_winsock_errno, FD_TO_SOCKET etc. */ +#include "w32sock.h" + +#undef setsockopt + +int +rpl_setsockopt (int fd, int level, int optname, const void *optval, socklen_t optlen) +{ + SOCKET sock = FD_TO_SOCKET (fd); + int r; + + if (sock == INVALID_SOCKET) + { + errno = EBADF; + return -1; + } + else + { + if (level == SOL_SOCKET + && (optname == SO_RCVTIMEO || optname == SO_SNDTIMEO)) + { + const struct timeval *tv = optval; + int milliseconds = tv->tv_sec * 1000 + tv->tv_usec / 1000; + optval = &milliseconds; + r = setsockopt (sock, level, optname, optval, sizeof (int)); + } + else + { + r = setsockopt (sock, level, optname, optval, optlen); + } + + if (r < 0) + set_winsock_errno (); + + return r; + } +} diff -Nru grep-3.1/gnulib-tests/signature.h grep-3.3/gnulib-tests/signature.h --- grep-3.1/gnulib-tests/signature.h 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/gnulib-tests/signature.h 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ /* Macro for checking that a function declaration is compliant. - Copyright (C) 2009-2017 Free Software Foundation, Inc. + Copyright (C) 2009-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ #ifndef SIGNATURE_CHECK diff -Nru grep-3.1/gnulib-tests/size_max.h grep-3.3/gnulib-tests/size_max.h --- grep-3.1/gnulib-tests/size_max.h 2017-01-01 11:25:46.000000000 +0000 +++ grep-3.3/gnulib-tests/size_max.h 2018-01-07 00:08:00.000000000 +0000 @@ -1,5 +1,5 @@ /* size_max.h -- declare SIZE_MAX through system headers - Copyright (C) 2005-2006, 2009-2017 Free Software Foundation, Inc. + Copyright (C) 2005-2006, 2009-2018 Free Software Foundation, Inc. Written by Simon Josefsson. This program is free software; you can redistribute it and/or modify @@ -13,7 +13,7 @@ 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 . */ + along with this program; if not, see . */ #ifndef GNULIB_SIZE_MAX_H #define GNULIB_SIZE_MAX_H diff -Nru grep-3.1/gnulib-tests/sleep.c grep-3.3/gnulib-tests/sleep.c --- grep-3.1/gnulib-tests/sleep.c 1970-01-01 00:00:00.000000000 +0000 +++ grep-3.3/gnulib-tests/sleep.c 2018-06-24 23:16:49.000000000 +0000 @@ -0,0 +1,76 @@ +/* Pausing execution of the current thread. + Copyright (C) 2007, 2009-2018 Free Software Foundation, Inc. + Written by Bruno Haible , 2007. + + 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 + +#include + +#include "verify.h" + +#if defined _WIN32 && ! defined __CYGWIN__ + +# define WIN32_LEAN_AND_MEAN /* avoid including junk */ +# include + +unsigned int +sleep (unsigned int seconds) +{ + unsigned int remaining; + + /* Sleep for 1 second many times, because + 1. Sleep is not interruptible by Ctrl-C, + 2. we want to avoid arithmetic overflow while multiplying with 1000. */ + for (remaining = seconds; remaining > 0; remaining--) + Sleep (1000); + + return remaining; +} + +#elif HAVE_SLEEP + +# undef sleep + +/* Guarantee unlimited sleep and a reasonable return value. Cygwin + 1.5.x rejects attempts to sleep more than 49.7 days (2**32 + milliseconds), but uses uninitialized memory which results in a + garbage answer. Similarly, Linux 2.6.9 with glibc 2.3.4 has a too + small return value when asked to sleep more than 24.85 days. */ +unsigned int +rpl_sleep (unsigned int seconds) +{ + /* This requires int larger than 16 bits. */ + verify (UINT_MAX / 24 / 24 / 60 / 60); + const unsigned int limit = 24 * 24 * 60 * 60; + while (limit < seconds) + { + unsigned int result; + seconds -= limit; + result = sleep (limit); + if (result) + return seconds + result; + } + return sleep (seconds); +} + +#else /* !HAVE_SLEEP */ + + #error "Please port gnulib sleep.c to your platform, possibly using usleep() or select(), then report this to bug-gnulib." + +#endif diff -Nru grep-3.1/gnulib-tests/snprintf.c grep-3.3/gnulib-tests/snprintf.c --- grep-3.1/gnulib-tests/snprintf.c 2017-01-01 11:25:46.000000000 +0000 +++ grep-3.3/gnulib-tests/snprintf.c 2018-01-07 00:08:00.000000000 +0000 @@ -1,5 +1,5 @@ /* Formatted output to strings. - Copyright (C) 2004, 2006-2017 Free Software Foundation, Inc. + Copyright (C) 2004, 2006-2018 Free Software Foundation, Inc. Written by Simon Josefsson and Paul Eggert. This program is free software; you can redistribute it and/or modify @@ -13,7 +13,7 @@ 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 . */ + with this program; if not, see . */ #include diff -Nru grep-3.1/gnulib-tests/socket.c grep-3.3/gnulib-tests/socket.c --- grep-3.1/gnulib-tests/socket.c 1970-01-01 00:00:00.000000000 +0000 +++ grep-3.3/gnulib-tests/socket.c 2018-01-07 00:07:08.000000000 +0000 @@ -0,0 +1,49 @@ +/* socket.c --- wrappers for Windows socket function + + Copyright (C) 2008-2018 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 Paolo Bonzini */ + +#include + +#define WIN32_LEAN_AND_MEAN +/* Get winsock2.h. */ +#include + +/* Get set_winsock_errno, FD_TO_SOCKET etc. */ +#include "w32sock.h" + +#include "sockets.h" + +int +rpl_socket (int domain, int type, int protocol) +{ + SOCKET fh; + + gl_sockets_startup (SOCKETS_1_1); + + /* We have to use WSASocket() to create non-overlapped IO sockets. + Overlapped IO sockets cannot be used with read/write. */ + fh = WSASocket (domain, type, protocol, NULL, 0, 0); + + if (fh == INVALID_SOCKET) + { + set_winsock_errno (); + return -1; + } + else + return SOCKET_TO_FD (fh); +} diff -Nru grep-3.1/gnulib-tests/sockets.c grep-3.3/gnulib-tests/sockets.c --- grep-3.1/gnulib-tests/sockets.c 1970-01-01 00:00:00.000000000 +0000 +++ grep-3.3/gnulib-tests/sockets.c 2018-01-07 00:07:08.000000000 +0000 @@ -0,0 +1,161 @@ +/* sockets.c --- wrappers for Windows socket functions + + Copyright (C) 2008-2018 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 Simon Josefsson */ + +#include + +/* Specification. */ +#include "sockets.h" + +#if WINDOWS_SOCKETS + +/* This includes winsock2.h on MinGW. */ +# include + +# include "fd-hook.h" +# if GNULIB_MSVC_NOTHROW +# include "msvc-nothrow.h" +# else +# include +# endif + +/* Get set_winsock_errno, FD_TO_SOCKET etc. */ +# include "w32sock.h" + +static int +close_fd_maybe_socket (const struct fd_hook *remaining_list, + gl_close_fn primary, + int fd) +{ + /* Note about multithread-safety: There is a race condition where, between + our calls to closesocket() and the primary close(), some other thread + could make system calls that allocate precisely the same HANDLE value + as sock; then the primary close() would call CloseHandle() on it. */ + SOCKET sock; + WSANETWORKEVENTS ev; + + /* Test whether fd refers to a socket. */ + sock = FD_TO_SOCKET (fd); + ev.lNetworkEvents = 0xDEADBEEF; + WSAEnumNetworkEvents (sock, NULL, &ev); + if (ev.lNetworkEvents != 0xDEADBEEF) + { + /* fd refers to a socket. */ + /* FIXME: other applications, like squid, use an undocumented + _free_osfhnd free function. But this is not enough: The 'osfile' + flags for fd also needs to be cleared, but it is hard to access it. + Instead, here we just close twice the file descriptor. */ + if (closesocket (sock)) + { + set_winsock_errno (); + return -1; + } + else + { + /* This call frees the file descriptor and does a + CloseHandle ((HANDLE) _get_osfhandle (fd)), which fails. */ + _close (fd); + return 0; + } + } + else + /* Some other type of file descriptor. */ + return execute_close_hooks (remaining_list, primary, fd); +} + +static int +ioctl_fd_maybe_socket (const struct fd_hook *remaining_list, + gl_ioctl_fn primary, + int fd, int request, void *arg) +{ + SOCKET sock; + WSANETWORKEVENTS ev; + + /* Test whether fd refers to a socket. */ + sock = FD_TO_SOCKET (fd); + ev.lNetworkEvents = 0xDEADBEEF; + WSAEnumNetworkEvents (sock, NULL, &ev); + if (ev.lNetworkEvents != 0xDEADBEEF) + { + /* fd refers to a socket. */ + if (ioctlsocket (sock, request, arg) < 0) + { + set_winsock_errno (); + return -1; + } + else + return 0; + } + else + /* Some other type of file descriptor. */ + return execute_ioctl_hooks (remaining_list, primary, fd, request, arg); +} + +static struct fd_hook fd_sockets_hook; + +static int initialized_sockets_version /* = 0 */; + +#endif /* WINDOWS_SOCKETS */ + +int +gl_sockets_startup (int version _GL_UNUSED) +{ +#if WINDOWS_SOCKETS + if (version > initialized_sockets_version) + { + WSADATA data; + int err; + + err = WSAStartup (version, &data); + if (err != 0) + return 1; + + if (data.wVersion != version) + { + WSACleanup (); + return 2; + } + + if (initialized_sockets_version == 0) + register_fd_hook (close_fd_maybe_socket, ioctl_fd_maybe_socket, + &fd_sockets_hook); + + initialized_sockets_version = version; + } +#endif + + return 0; +} + +int +gl_sockets_cleanup (void) +{ +#if WINDOWS_SOCKETS + int err; + + initialized_sockets_version = 0; + + unregister_fd_hook (&fd_sockets_hook); + + err = WSACleanup (); + if (err != 0) + return 1; +#endif + + return 0; +} diff -Nru grep-3.1/gnulib-tests/sockets.h grep-3.3/gnulib-tests/sockets.h --- grep-3.1/gnulib-tests/sockets.h 1970-01-01 00:00:00.000000000 +0000 +++ grep-3.3/gnulib-tests/sockets.h 2018-01-07 00:07:08.000000000 +0000 @@ -0,0 +1,66 @@ +/* sockets.h - wrappers for Windows socket functions + + Copyright (C) 2008-2018 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 Simon Josefsson */ + +#ifndef SOCKETS_H +#define SOCKETS_H 1 + +#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) +#ifndef WINDOWS_SOCKETS + _GL_ATTRIBUTE_CONST +#endif + ; + +int gl_sockets_cleanup (void) +#ifndef WINDOWS_SOCKETS + _GL_ATTRIBUTE_CONST +#endif + ; + +/* 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. */ +#ifdef WINDOWS_SOCKETS + +# include + +# if GNULIB_MSVC_NOTHROW +# include "msvc-nothrow.h" +# else +# include +# endif + +static inline SOCKET +gl_fd_to_handle (int fd) +{ + return _get_osfhandle (fd); +} + +#else + +# define gl_fd_to_handle(x) (x) + +#endif /* WINDOWS_SOCKETS */ + +#endif /* SOCKETS_H */ diff -Nru grep-3.1/gnulib-tests/strerror_r.c grep-3.3/gnulib-tests/strerror_r.c --- grep-3.1/gnulib-tests/strerror_r.c 1970-01-01 00:00:00.000000000 +0000 +++ grep-3.3/gnulib-tests/strerror_r.c 2018-12-21 02:51:47.000000000 +0000 @@ -0,0 +1,451 @@ +/* strerror_r.c --- POSIX compatible system error routine + + Copyright (C) 2010-2018 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 , 2010. */ + +#include + +/* Enable declaration of sys_nerr and sys_errlist in on NetBSD. */ +#define _NETBSD_SOURCE 1 + +/* Specification. */ +#include + +#include +#include +#include +#if !HAVE_SNPRINTF +# include +#endif + +#include "strerror-override.h" + +#if (__GLIBC__ >= 2 || defined __UCLIBC__ || defined __CYGWIN__) && HAVE___XPG_STRERROR_R /* glibc >= 2.3.4, cygwin >= 1.7.9 */ + +# define USE_XPG_STRERROR_R 1 +extern +#ifdef __cplusplus +"C" +#endif +int __xpg_strerror_r (int errnum, char *buf, size_t buflen); + +#elif HAVE_DECL_STRERROR_R && !(__GLIBC__ >= 2 || defined __UCLIBC__ || defined __CYGWIN__) + +/* The system's strerror_r function is OK, except that its third argument + is 'int', not 'size_t', or its return type is wrong. */ + +# include + +# define USE_SYSTEM_STRERROR_R 1 + +#else /* (__GLIBC__ >= 2 || defined __UCLIBC__ || defined __CYGWIN__ ? !HAVE___XPG_STRERROR_R : !HAVE_DECL_STRERROR_R) */ + +/* Use the system's strerror(). Exclude glibc and cygwin because the + system strerror_r has the wrong return type, and cygwin 1.7.9 + strerror_r clobbers strerror. */ +# undef strerror + +# define USE_SYSTEM_STRERROR 1 + +# if defined __NetBSD__ || defined __hpux || (defined _WIN32 && !defined __CYGWIN__) || defined __sgi || (defined __sun && !defined _LP64) || defined __CYGWIN__ + +/* No locking needed. */ + +/* Get catgets internationalization functions. */ +# if HAVE_CATGETS +# include +# endif + +#ifdef __cplusplus +extern "C" { +#endif + +/* Get sys_nerr, sys_errlist on HP-UX (otherwise only declared in C++ mode). + Get sys_nerr, sys_errlist on IRIX (otherwise only declared with _SGIAPI). */ +# if defined __hpux || defined __sgi +extern int sys_nerr; +extern char *sys_errlist[]; +# endif + +/* Get sys_nerr on Solaris. */ +# if defined __sun && !defined _LP64 +extern int sys_nerr; +# endif + +#ifdef __cplusplus +} +#endif + +# else + +# include "glthread/lock.h" + +/* This lock protects the buffer returned by strerror(). We assume that + no other uses of strerror() exist in the program. */ +gl_lock_define_initialized(static, strerror_lock) + +# endif + +#endif + +/* On MSVC, there is no snprintf() function, just a _snprintf(). + It is of lower quality, but sufficient for the simple use here. + We only have to make sure to NUL terminate the result (_snprintf + does not NUL terminate, like strncpy). */ +#if !HAVE_SNPRINTF +static int +local_snprintf (char *buf, size_t buflen, const char *format, ...) +{ + va_list args; + int result; + + va_start (args, format); + result = _vsnprintf (buf, buflen, format, args); + va_end (args); + if (buflen > 0 && (result < 0 || result >= buflen)) + buf[buflen - 1] = '\0'; + return result; +} +# define snprintf local_snprintf +#endif + +/* Copy as much of MSG into BUF as possible, without corrupting errno. + Return 0 if MSG fit in BUFLEN, otherwise return ERANGE. */ +static int +safe_copy (char *buf, size_t buflen, const char *msg) +{ + size_t len = strlen (msg); + size_t moved = len < buflen ? len : buflen - 1; + + /* Although POSIX lets memmove corrupt errno, we don't + know of any implementation where this is a real problem. */ + memmove (buf, msg, moved); + buf[moved] = '\0'; + return len < buflen ? 0 : ERANGE; +} + + +int +strerror_r (int errnum, char *buf, size_t buflen) +#undef strerror_r +{ + /* Filter this out now, so that rest of this replacement knows that + there is room for a non-empty message and trailing NUL. */ + if (buflen <= 1) + { + if (buflen) + *buf = '\0'; + return ERANGE; + } + *buf = '\0'; + + /* Check for gnulib overrides. */ + { + char const *msg = strerror_override (errnum); + + if (msg) + return safe_copy (buf, buflen, msg); + } + + { + int ret; + int saved_errno = errno; + +#if USE_XPG_STRERROR_R + + { + ret = __xpg_strerror_r (errnum, buf, buflen); + if (ret < 0) + ret = errno; + if (!*buf) + { + /* glibc 2.13 would not touch buf on err, so we have to fall + back to GNU strerror_r which always returns a thread-safe + untruncated string to (partially) copy into our buf. */ + safe_copy (buf, buflen, strerror_r (errnum, buf, buflen)); + } + } + +#elif USE_SYSTEM_STRERROR_R + + if (buflen > INT_MAX) + buflen = INT_MAX; + +# ifdef __hpux + /* On HP-UX 11.31, strerror_r always fails when buflen < 80; it + also fails to change buf on EINVAL. */ + { + char stackbuf[80]; + + if (buflen < sizeof stackbuf) + { + ret = strerror_r (errnum, stackbuf, sizeof stackbuf); + if (ret == 0) + ret = safe_copy (buf, buflen, stackbuf); + } + else + ret = strerror_r (errnum, buf, buflen); + } +# else + ret = strerror_r (errnum, buf, buflen); + + /* Some old implementations may return (-1, EINVAL) instead of EINVAL. + But on Haiku, valid error numbers are negative. */ +# if !defined __HAIKU__ + if (ret < 0) + ret = errno; +# endif +# endif + +# if defined _AIX || defined __HAIKU__ + /* AIX and Haiku return 0 rather than ERANGE when truncating strings; try + again until we are sure we got the entire string. */ + if (!ret && strlen (buf) == buflen - 1) + { + char stackbuf[STACKBUF_LEN]; + size_t len; + strerror_r (errnum, stackbuf, sizeof stackbuf); + len = strlen (stackbuf); + /* STACKBUF_LEN should have been large enough. */ + if (len + 1 == sizeof stackbuf) + abort (); + if (buflen <= len) + ret = ERANGE; + } +# else + /* Solaris 10 does not populate buf on ERANGE. OpenBSD 4.7 + truncates early on ERANGE rather than return a partial integer. + We prefer the maximal string. We set buf[0] earlier, and we + know of no implementation that modifies buf to be an + unterminated string, so this strlen should be portable in + practice (rather than pulling in a safer strnlen). */ + if (ret == ERANGE && strlen (buf) < buflen - 1) + { + char stackbuf[STACKBUF_LEN]; + + /* STACKBUF_LEN should have been large enough. */ + if (strerror_r (errnum, stackbuf, sizeof stackbuf) == ERANGE) + abort (); + safe_copy (buf, buflen, stackbuf); + } +# endif + +#else /* USE_SYSTEM_STRERROR */ + + /* Try to do what strerror (errnum) does, but without clobbering the + buffer used by strerror(). */ + +# if defined __NetBSD__ || defined __hpux || (defined _WIN32 && !defined __CYGWIN__) || defined __CYGWIN__ /* NetBSD, HP-UX, native Windows, Cygwin */ + + /* NetBSD: sys_nerr, sys_errlist are declared through _NETBSD_SOURCE + and above. + HP-UX: sys_nerr, sys_errlist are declared explicitly above. + native Windows: sys_nerr, sys_errlist are declared in . + Cygwin: sys_nerr, sys_errlist are declared in . */ + if (errnum >= 0 && errnum < sys_nerr) + { +# if HAVE_CATGETS && (defined __NetBSD__ || defined __hpux) +# if defined __NetBSD__ + nl_catd catd = catopen ("libc", NL_CAT_LOCALE); + const char *errmsg = + (catd != (nl_catd)-1 + ? catgets (catd, 1, errnum, sys_errlist[errnum]) + : sys_errlist[errnum]); +# endif +# if defined __hpux + nl_catd catd = catopen ("perror", NL_CAT_LOCALE); + const char *errmsg = + (catd != (nl_catd)-1 + ? catgets (catd, 1, 1 + errnum, sys_errlist[errnum]) + : sys_errlist[errnum]); +# endif +# else + const char *errmsg = sys_errlist[errnum]; +# endif + if (errmsg == NULL || *errmsg == '\0') + ret = EINVAL; + else + ret = safe_copy (buf, buflen, errmsg); +# if HAVE_CATGETS && (defined __NetBSD__ || defined __hpux) + if (catd != (nl_catd)-1) + catclose (catd); +# endif + } + else + ret = EINVAL; + +# elif defined __sgi || (defined __sun && !defined _LP64) /* IRIX, Solaris <= 9 32-bit */ + + /* For a valid error number, the system's strerror() function returns + a pointer to a not copied string, not to a buffer. */ + if (errnum >= 0 && errnum < sys_nerr) + { + char *errmsg = strerror (errnum); + + if (errmsg == NULL || *errmsg == '\0') + ret = EINVAL; + else + ret = safe_copy (buf, buflen, errmsg); + } + else + ret = EINVAL; + +# else + + gl_lock_lock (strerror_lock); + + { + char *errmsg = strerror (errnum); + + /* For invalid error numbers, strerror() on + - IRIX 6.5 returns NULL, + - HP-UX 11 returns an empty string. */ + if (errmsg == NULL || *errmsg == '\0') + ret = EINVAL; + else + ret = safe_copy (buf, buflen, errmsg); + } + + gl_lock_unlock (strerror_lock); + +# endif + +#endif + +#if defined _WIN32 && !defined __CYGWIN__ + /* MSVC 14 defines names for many error codes in the range 100..140, + but _sys_errlist contains strings only for the error codes + < _sys_nerr = 43. */ + if (ret == EINVAL) + { + const char *errmsg; + + switch (errnum) + { + case 100 /* EADDRINUSE */: + errmsg = "Address already in use"; + break; + case 101 /* EADDRNOTAVAIL */: + errmsg = "Cannot assign requested address"; + break; + case 102 /* EAFNOSUPPORT */: + errmsg = "Address family not supported by protocol"; + break; + case 103 /* EALREADY */: + errmsg = "Operation already in progress"; + break; + case 105 /* ECANCELED */: + errmsg = "Operation canceled"; + break; + case 106 /* ECONNABORTED */: + errmsg = "Software caused connection abort"; + break; + case 107 /* ECONNREFUSED */: + errmsg = "Connection refused"; + break; + case 108 /* ECONNRESET */: + errmsg = "Connection reset by peer"; + break; + case 109 /* EDESTADDRREQ */: + errmsg = "Destination address required"; + break; + case 110 /* EHOSTUNREACH */: + errmsg = "No route to host"; + break; + case 112 /* EINPROGRESS */: + errmsg = "Operation now in progress"; + break; + case 113 /* EISCONN */: + errmsg = "Transport endpoint is already connected"; + break; + case 114 /* ELOOP */: + errmsg = "Too many levels of symbolic links"; + break; + case 115 /* EMSGSIZE */: + errmsg = "Message too long"; + break; + case 116 /* ENETDOWN */: + errmsg = "Network is down"; + break; + case 117 /* ENETRESET */: + errmsg = "Network dropped connection on reset"; + break; + case 118 /* ENETUNREACH */: + errmsg = "Network is unreachable"; + break; + case 119 /* ENOBUFS */: + errmsg = "No buffer space available"; + break; + case 123 /* ENOPROTOOPT */: + errmsg = "Protocol not available"; + break; + case 126 /* ENOTCONN */: + errmsg = "Transport endpoint is not connected"; + break; + case 128 /* ENOTSOCK */: + errmsg = "Socket operation on non-socket"; + break; + case 129 /* ENOTSUP */: + errmsg = "Not supported"; + break; + case 130 /* EOPNOTSUPP */: + errmsg = "Operation not supported"; + break; + case 132 /* EOVERFLOW */: + errmsg = "Value too large for defined data type"; + break; + case 133 /* EOWNERDEAD */: + errmsg = "Owner died"; + break; + case 134 /* EPROTO */: + errmsg = "Protocol error"; + break; + case 135 /* EPROTONOSUPPORT */: + errmsg = "Protocol not supported"; + break; + case 136 /* EPROTOTYPE */: + errmsg = "Protocol wrong type for socket"; + break; + case 138 /* ETIMEDOUT */: + errmsg = "Connection timed out"; + break; + case 140 /* EWOULDBLOCK */: + errmsg = "Operation would block"; + break; + default: + errmsg = NULL; + break; + } + if (errmsg != NULL) + ret = safe_copy (buf, buflen, errmsg); + } +#endif + + if (ret == EINVAL && !*buf) + { +#if defined __HAIKU__ + /* For consistency with perror(). */ + snprintf (buf, buflen, "Unknown Application Error (%d)", errnum); +#else + snprintf (buf, buflen, "Unknown error %d", errnum); +#endif + } + + errno = saved_errno; + return ret; + } +} diff -Nru grep-3.1/gnulib-tests/symlink.c grep-3.3/gnulib-tests/symlink.c --- grep-3.1/gnulib-tests/symlink.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/gnulib-tests/symlink.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ /* Stub for symlink(). - Copyright (C) 2009-2017 Free Software Foundation, Inc. + Copyright (C) 2009-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ #include diff -Nru grep-3.1/gnulib-tests/sys_ioctl.in.h grep-3.3/gnulib-tests/sys_ioctl.in.h --- grep-3.1/gnulib-tests/sys_ioctl.in.h 1970-01-01 00:00:00.000000000 +0000 +++ grep-3.3/gnulib-tests/sys_ioctl.in.h 2018-01-07 00:07:59.000000000 +0000 @@ -0,0 +1,79 @@ +/* Substitute for and wrapper around . + Copyright (C) 2008-2018 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@_SYS_IOCTL_H + +#if __GNUC__ >= 3 +@PRAGMA_SYSTEM_HEADER@ +#endif +@PRAGMA_COLUMNS@ + +/* The include_next requires a split double-inclusion guard. */ +#if @HAVE_SYS_IOCTL_H@ +# @INCLUDE_NEXT@ @NEXT_SYS_IOCTL_H@ +#endif + +#ifndef _@GUARD_PREFIX@_SYS_IOCTL_H +#define _@GUARD_PREFIX@_SYS_IOCTL_H + +/* AIX 5.1 and Solaris 10 declare ioctl() in and in , + but not in . + Haiku declares ioctl() in , but not in . + But avoid namespace pollution on glibc systems. */ +#ifndef __GLIBC__ +# include +#endif + +/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ + +/* The definition of _GL_WARN_ON_USE is copied here. */ + + +/* Declare overridden functions. */ + +#if @GNULIB_IOCTL@ +# if @REPLACE_IOCTL@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef ioctl +# define ioctl rpl_ioctl +# endif +_GL_FUNCDECL_RPL (ioctl, int, + (int fd, int request, ... /* {void *,char *} arg */)); +_GL_CXXALIAS_RPL (ioctl, int, + (int fd, int request, ... /* {void *,char *} arg */)); +# else +# if @SYS_IOCTL_H_HAVE_WINSOCK2_H@ || 1 +_GL_FUNCDECL_SYS (ioctl, int, + (int fd, int request, ... /* {void *,char *} arg */)); +# endif +_GL_CXXALIAS_SYS (ioctl, int, + (int fd, int request, ... /* {void *,char *} arg */)); +# endif +_GL_CXXALIASWARN (ioctl); +#elif @SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@ +# undef ioctl +# define ioctl ioctl_used_without_requesting_gnulib_module_ioctl +#elif defined GNULIB_POSIXCHECK +# undef ioctl +# if HAVE_RAW_DECL_IOCTL +_GL_WARN_ON_USE (ioctl, "ioctl does not portably work on sockets - " + "use gnulib module ioctl for portability"); +# endif +#endif + + +#endif /* _@GUARD_PREFIX@_SYS_IOCTL_H */ +#endif /* _@GUARD_PREFIX@_SYS_IOCTL_H */ diff -Nru grep-3.1/gnulib-tests/sys_select.in.h grep-3.3/gnulib-tests/sys_select.in.h --- grep-3.1/gnulib-tests/sys_select.in.h 1970-01-01 00:00:00.000000000 +0000 +++ grep-3.3/gnulib-tests/sys_select.in.h 2018-01-07 00:08:00.000000000 +0000 @@ -0,0 +1,319 @@ +/* Substitute for . + Copyright (C) 2007-2018 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 . */ + +# if __GNUC__ >= 3 +@PRAGMA_SYSTEM_HEADER@ +# endif +@PRAGMA_COLUMNS@ + +/* On OSF/1 and Solaris 2.6, and + both include . + On Cygwin, includes . + Simply delegate to the system's header in this case. */ +#if (@HAVE_SYS_SELECT_H@ \ + && !defined _GL_SYS_SELECT_H_REDIRECT_FROM_SYS_TYPES_H \ + && ((defined __osf__ && defined _SYS_TYPES_H_ \ + && defined _OSF_SOURCE) \ + || (defined __sun && defined _SYS_TYPES_H \ + && (! (defined _XOPEN_SOURCE || defined _POSIX_C_SOURCE) \ + || defined __EXTENSIONS__)))) + +# define _GL_SYS_SELECT_H_REDIRECT_FROM_SYS_TYPES_H +# @INCLUDE_NEXT@ @NEXT_SYS_SELECT_H@ + +#elif (@HAVE_SYS_SELECT_H@ \ + && (defined _CYGWIN_SYS_TIME_H \ + || (!defined _GL_SYS_SELECT_H_REDIRECT_FROM_SYS_TIME_H \ + && ((defined __osf__ && defined _SYS_TIME_H_ \ + && defined _OSF_SOURCE) \ + || (defined __sun && defined _SYS_TIME_H \ + && (! (defined _XOPEN_SOURCE \ + || defined _POSIX_C_SOURCE) \ + || defined __EXTENSIONS__)))))) + +# define _GL_SYS_SELECT_H_REDIRECT_FROM_SYS_TIME_H +# @INCLUDE_NEXT@ @NEXT_SYS_SELECT_H@ + +/* On IRIX 6.5, includes , which includes + , which includes . At this point we cannot + include , because that includes , which + gives a syntax error because has not been completely + processed. Simply delegate to the system's header in this case. */ +#elif @HAVE_SYS_SELECT_H@ && defined __sgi && (defined _SYS_BSD_TYPES_H && !defined _GL_SYS_SELECT_H_REDIRECT_FROM_SYS_BSD_TYPES_H) + +# define _GL_SYS_SELECT_H_REDIRECT_FROM_SYS_BSD_TYPES_H +# @INCLUDE_NEXT@ @NEXT_SYS_SELECT_H@ + +/* On OpenBSD 5.0, includes , which includes + . At this point we cannot include , because that + includes gnulib's pthread.h override, which gives a syntax error because + /usr/include/pthread.h has not been completely processed. Simply delegate + to the system's header in this case. */ +#elif @HAVE_SYS_SELECT_H@ && defined __OpenBSD__ && (defined _PTHREAD_H_ && !defined PTHREAD_MUTEX_INITIALIZER) + +# @INCLUDE_NEXT@ @NEXT_SYS_SELECT_H@ + +#else + +#ifndef _@GUARD_PREFIX@_SYS_SELECT_H + +/* On many platforms, assumes prior inclusion of + . Also, mingw defines sigset_t there, instead of + in where it belongs. */ +#include + +#if @HAVE_SYS_SELECT_H@ + +/* On OSF/1 4.0, provides only a forward declaration + 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 and "unknown type + name" problems on Cygwin. */ +# if !(defined __GLIBC__ || defined __CYGWIN__) +# include +# endif + +/* On AIX 7 and Solaris 10, provides an FD_ZERO implementation + that relies on memset(), but without including . + But in any case avoid namespace pollution on glibc systems. */ +# if (defined __OpenBSD__ || defined _AIX || defined __sun || defined __osf__ || defined __BEOS__) \ + && ! defined __GLIBC__ +# include +# endif + +/* The include_next requires a split double-inclusion guard. */ +# @INCLUDE_NEXT@ @NEXT_SYS_SELECT_H@ + +#endif + +/* Get definition of 'sigset_t'. + 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 __CYGWIN__) && !defined __UCLIBC__) +# include +#endif + +#ifndef _@GUARD_PREFIX@_SYS_SELECT_H +#define _@GUARD_PREFIX@_SYS_SELECT_H + +#if !@HAVE_SYS_SELECT_H@ +/* A platform that lacks . */ +/* Get the 'struct timeval' and 'fd_set' types and the FD_* macros + on most platforms. */ +# include +/* On HP-UX 11, provides an FD_ZERO implementation + that relies on memset(), but without including . */ +# if defined __hpux +# include +# endif +/* On native Windows platforms: + Get the 'fd_set' type. + Get the close() declaration before we override it. */ +# if @HAVE_WINSOCK2_H@ +# if !defined _GL_INCLUDING_WINSOCK2_H +# define _GL_INCLUDING_WINSOCK2_H +# include +# undef _GL_INCLUDING_WINSOCK2_H +# endif +# include +# endif +#endif + +/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ + +/* The definition of _GL_WARN_ON_USE is copied here. */ + + +/* Fix some definitions from . */ + +#if @HAVE_WINSOCK2_H@ + +# if !GNULIB_defined_rpl_fd_isset + +/* Re-define FD_ISSET to avoid a WSA call while we are not using + network sockets. */ +static int +rpl_fd_isset (SOCKET fd, fd_set * set) +{ + u_int i; + if (set == NULL) + return 0; + + for (i = 0; i < set->fd_count; i++) + if (set->fd_array[i] == fd) + return 1; + + return 0; +} + +# define GNULIB_defined_rpl_fd_isset 1 +# endif + +# undef FD_ISSET +# define FD_ISSET(fd, set) rpl_fd_isset(fd, set) + +#endif + +/* Hide some function declarations from . */ + +#if @HAVE_WINSOCK2_H@ +# if !defined _@GUARD_PREFIX@_UNISTD_H +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef close +# define close close_used_without_including_unistd_h +# else + _GL_WARN_ON_USE (close, + "close() used without including "); +# endif +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef gethostname +# define gethostname gethostname_used_without_including_unistd_h +# else + _GL_WARN_ON_USE (gethostname, + "gethostname() used without including "); +# endif +# endif +# if !defined _@GUARD_PREFIX@_SYS_SOCKET_H +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef socket +# define socket socket_used_without_including_sys_socket_h +# undef connect +# define connect connect_used_without_including_sys_socket_h +# undef accept +# define accept accept_used_without_including_sys_socket_h +# undef bind +# define bind bind_used_without_including_sys_socket_h +# undef getpeername +# define getpeername getpeername_used_without_including_sys_socket_h +# undef getsockname +# define getsockname getsockname_used_without_including_sys_socket_h +# undef getsockopt +# define getsockopt getsockopt_used_without_including_sys_socket_h +# undef listen +# define listen listen_used_without_including_sys_socket_h +# undef recv +# define recv recv_used_without_including_sys_socket_h +# undef send +# define send send_used_without_including_sys_socket_h +# undef recvfrom +# define recvfrom recvfrom_used_without_including_sys_socket_h +# undef sendto +# define sendto sendto_used_without_including_sys_socket_h +# undef setsockopt +# define setsockopt setsockopt_used_without_including_sys_socket_h +# undef shutdown +# define shutdown shutdown_used_without_including_sys_socket_h +# else + _GL_WARN_ON_USE (socket, + "socket() used without including "); + _GL_WARN_ON_USE (connect, + "connect() used without including "); + _GL_WARN_ON_USE (accept, + "accept() used without including "); + _GL_WARN_ON_USE (bind, + "bind() used without including "); + _GL_WARN_ON_USE (getpeername, + "getpeername() used without including "); + _GL_WARN_ON_USE (getsockname, + "getsockname() used without including "); + _GL_WARN_ON_USE (getsockopt, + "getsockopt() used without including "); + _GL_WARN_ON_USE (listen, + "listen() used without including "); + _GL_WARN_ON_USE (recv, + "recv() used without including "); + _GL_WARN_ON_USE (send, + "send() used without including "); + _GL_WARN_ON_USE (recvfrom, + "recvfrom() used without including "); + _GL_WARN_ON_USE (sendto, + "sendto() used without including "); + _GL_WARN_ON_USE (setsockopt, + "setsockopt() used without including "); + _GL_WARN_ON_USE (shutdown, + "shutdown() used without including "); +# endif +# endif +#endif + + +#if @GNULIB_PSELECT@ +# if @REPLACE_PSELECT@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef pselect +# define pselect rpl_pselect +# endif +_GL_FUNCDECL_RPL (pselect, int, + (int, fd_set *restrict, fd_set *restrict, fd_set *restrict, + struct timespec const *restrict, const sigset_t *restrict)); +_GL_CXXALIAS_RPL (pselect, int, + (int, fd_set *restrict, fd_set *restrict, fd_set *restrict, + struct timespec const *restrict, const sigset_t *restrict)); +# else +# if !@HAVE_PSELECT@ +_GL_FUNCDECL_SYS (pselect, int, + (int, fd_set *restrict, fd_set *restrict, fd_set *restrict, + struct timespec const *restrict, const sigset_t *restrict)); +# endif +_GL_CXXALIAS_SYS (pselect, int, + (int, fd_set *restrict, fd_set *restrict, fd_set *restrict, + struct timespec const *restrict, const sigset_t *restrict)); +# endif +_GL_CXXALIASWARN (pselect); +#elif defined GNULIB_POSIXCHECK +# undef pselect +# if HAVE_RAW_DECL_PSELECT +_GL_WARN_ON_USE (pselect, "pselect is not portable - " + "use gnulib module pselect for portability"); +# endif +#endif + +#if @GNULIB_SELECT@ +# if @REPLACE_SELECT@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef select +# define select rpl_select +# endif +_GL_FUNCDECL_RPL (select, int, + (int, fd_set *restrict, fd_set *restrict, fd_set *restrict, + struct timeval *restrict)); +_GL_CXXALIAS_RPL (select, int, + (int, fd_set *restrict, fd_set *restrict, fd_set *restrict, + struct timeval *restrict)); +# else +_GL_CXXALIAS_SYS (select, int, + (int, fd_set *restrict, fd_set *restrict, fd_set *restrict, + struct timeval *restrict)); +# endif +_GL_CXXALIASWARN (select); +#elif @HAVE_WINSOCK2_H@ +# undef select +# define select select_used_without_requesting_gnulib_module_select +#elif defined GNULIB_POSIXCHECK +# undef select +# if HAVE_RAW_DECL_SELECT +_GL_WARN_ON_USE (select, "select is not always POSIX compliant - " + "use gnulib module select for portability"); +# endif +#endif + + +#endif /* _@GUARD_PREFIX@_SYS_SELECT_H */ +#endif /* _@GUARD_PREFIX@_SYS_SELECT_H */ +#endif /* OSF/1 */ diff -Nru grep-3.1/gnulib-tests/sys_socket.c grep-3.3/gnulib-tests/sys_socket.c --- grep-3.1/gnulib-tests/sys_socket.c 1970-01-01 00:00:00.000000000 +0000 +++ grep-3.3/gnulib-tests/sys_socket.c 2016-11-21 17:32:00.000000000 +0000 @@ -0,0 +1,4 @@ +#include +#define _GL_SYS_SOCKET_INLINE _GL_EXTERN_INLINE +#include "sys/socket.h" +typedef int dummy; diff -Nru grep-3.1/gnulib-tests/sys_socket.in.h grep-3.3/gnulib-tests/sys_socket.in.h --- grep-3.1/gnulib-tests/sys_socket.in.h 1970-01-01 00:00:00.000000000 +0000 +++ grep-3.3/gnulib-tests/sys_socket.in.h 2018-06-24 23:18:00.000000000 +0000 @@ -0,0 +1,715 @@ +/* Provide a sys/socket header file for systems lacking it (read: MinGW) + and for systems where it is incomplete. + Copyright (C) 2005-2018 Free Software Foundation, Inc. + Written by Simon Josefsson. + + 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 . */ + +/* This file is supposed to be used on platforms that lack , + on platforms where cannot be included standalone, and on + platforms where does not provide all necessary definitions. + It is intended to provide definitions and prototypes needed by an + application. */ + +#if __GNUC__ >= 3 +@PRAGMA_SYSTEM_HEADER@ +#endif +@PRAGMA_COLUMNS@ + +#if defined _GL_ALREADY_INCLUDING_SYS_SOCKET_H +/* Special invocation convention: + - On Cygwin 1.5.x we have a sequence of nested includes + -> -> -> , + and the latter includes . In this situation, the functions + are not yet declared, therefore we cannot provide the C++ aliases. */ + +#@INCLUDE_NEXT@ @NEXT_SYS_SOCKET_H@ + +#else +/* Normal invocation convention. */ + +#ifndef _@GUARD_PREFIX@_SYS_SOCKET_H + +#if @HAVE_SYS_SOCKET_H@ + +# define _GL_ALREADY_INCLUDING_SYS_SOCKET_H + +/* On many platforms, assumes prior inclusion of + . */ +# include + +/* On FreeBSD 6.4, defines some macros that assume that NULL + is defined. */ +# include + +/* The include_next requires a split double-inclusion guard. */ +# @INCLUDE_NEXT@ @NEXT_SYS_SOCKET_H@ + +# undef _GL_ALREADY_INCLUDING_SYS_SOCKET_H + +#endif + +#ifndef _@GUARD_PREFIX@_SYS_SOCKET_H +#define _@GUARD_PREFIX@_SYS_SOCKET_H + +#ifndef _GL_INLINE_HEADER_BEGIN + #error "Please include config.h first." +#endif +_GL_INLINE_HEADER_BEGIN +#ifndef _GL_SYS_SOCKET_INLINE +# define _GL_SYS_SOCKET_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. */ + +#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 + +#if @HAVE_STRUCT_SOCKADDR_STORAGE@ +/* Make the 'struct sockaddr_storage' field 'ss_family' visible on AIX 7.1. */ +# if !@HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY@ +# ifndef ss_family +# define ss_family __ss_family +# endif +# endif +#else +# include +/* Code taken from glibc sysdeps/unix/sysv/linux/bits/socket.h on + 2009-05-08, licensed under LGPLv2.1+, plus portability fixes. */ +# define __ss_aligntype unsigned long int +# define _SS_SIZE 256 +# define _SS_PADSIZE \ + (_SS_SIZE - ((sizeof (sa_family_t) >= alignof (__ss_aligntype) \ + ? sizeof (sa_family_t) \ + : alignof (__ss_aligntype)) \ + + sizeof (__ss_aligntype))) + +# if !GNULIB_defined_struct_sockaddr_storage +struct sockaddr_storage +{ + sa_family_t ss_family; /* Address family, etc. */ + __ss_aligntype __ss_align; /* Force desired alignment. */ + char __ss_padding[_SS_PADSIZE]; +}; +# define GNULIB_defined_struct_sockaddr_storage 1 +# endif + +#endif + +/* Get struct iovec. */ +/* But avoid namespace pollution on glibc systems. */ +#if ! defined __GLIBC__ +# include +#endif + +#if @HAVE_SYS_SOCKET_H@ + +/* A platform that has . */ + +/* For shutdown(). */ +# if !defined SHUT_RD +# define SHUT_RD 0 +# endif +# if !defined SHUT_WR +# define SHUT_WR 1 +# endif +# if !defined SHUT_RDWR +# define SHUT_RDWR 2 +# endif + +# ifdef __VMS /* OpenVMS */ +# ifndef CMSG_SPACE +# define CMSG_SPACE(length) _CMSG_SPACE(length) +# endif +# ifndef CMSG_LEN +# define CMSG_LEN(length) _CMSG_LEN(length) +# endif +# endif + +#else + +# ifdef __CYGWIN__ +# error "Cygwin does have a sys/socket.h, doesn't it?!?" +# endif + +/* A platform that lacks . + + Currently only MinGW is supported. See the gnulib manual regarding + Windows sockets. MinGW has the header files winsock2.h and + ws2tcpip.h that declare the sys/socket.h definitions we need. Note + that you can influence which definitions you get by setting the + WINVER symbol before including these two files. For example, + getaddrinfo is only available if _WIN32_WINNT >= 0x0501 (that + symbol is set indirectly through WINVER). You can set this by + adding AC_DEFINE(WINVER, 0x0501) to configure.ac. Note that your + code may not run on older Windows releases then. My Windows 2000 + box was not able to run the code, for example. The situation is + slightly confusing because + + suggests that getaddrinfo should be available on all Windows + releases. */ + +# if @HAVE_WINSOCK2_H@ +# include +# endif +# if @HAVE_WS2TCPIP_H@ +# include +# endif + +/* For shutdown(). */ +# if !defined SHUT_RD && defined SD_RECEIVE +# define SHUT_RD SD_RECEIVE +# endif +# if !defined SHUT_WR && defined SD_SEND +# define SHUT_WR SD_SEND +# endif +# if !defined SHUT_RDWR && defined SD_BOTH +# define SHUT_RDWR SD_BOTH +# endif + +# if @HAVE_WINSOCK2_H@ +/* Include headers needed by the emulation code. */ +# include +# include + +# if !GNULIB_defined_socklen_t +typedef int socklen_t; +# define GNULIB_defined_socklen_t 1 +# endif + +# endif + +/* Rudimentary 'struct msghdr'; this works as long as you don't try to + access msg_control or msg_controllen. */ +struct msghdr { + void *msg_name; + socklen_t msg_namelen; + struct iovec *msg_iov; + int msg_iovlen; + int msg_flags; +}; + +#endif + +/* Ensure SO_REUSEPORT is defined. */ +/* For the subtle differences between SO_REUSEPORT and SO_REUSEADDR, see + https://stackoverflow.com/questions/14388706/socket-options-so-reuseaddr-and-so-reuseport-how-do-they-differ-do-they-mean-t + and https://lwn.net/Articles/542629/ + */ +#ifndef SO_REUSEPORT +# define SO_REUSEPORT SO_REUSEADDR +#endif + +/* Fix some definitions from . */ + +#if @HAVE_WINSOCK2_H@ + +# if !GNULIB_defined_rpl_fd_isset + +/* Re-define FD_ISSET to avoid a WSA call while we are not using + network sockets. */ +_GL_SYS_SOCKET_INLINE int +rpl_fd_isset (SOCKET fd, fd_set * set) +{ + u_int i; + if (set == NULL) + return 0; + + for (i = 0; i < set->fd_count; i++) + if (set->fd_array[i] == fd) + return 1; + + return 0; +} + +# define GNULIB_defined_rpl_fd_isset 1 +# endif + +# undef FD_ISSET +# define FD_ISSET(fd, set) rpl_fd_isset(fd, set) + +#endif + +/* Hide some function declarations from . */ + +#if @HAVE_WINSOCK2_H@ +# if !defined _@GUARD_PREFIX@_UNISTD_H +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef close +# define close close_used_without_including_unistd_h +# else + _GL_WARN_ON_USE (close, + "close() used without including "); +# endif +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef gethostname +# define gethostname gethostname_used_without_including_unistd_h +# else + _GL_WARN_ON_USE (gethostname, + "gethostname() used without including "); +# endif +# endif +# if !defined _@GUARD_PREFIX@_SYS_SELECT_H +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef select +# define select select_used_without_including_sys_select_h +# else + _GL_WARN_ON_USE (select, + "select() used without including "); +# endif +# endif +#endif + +/* Wrap everything else to use libc file descriptors for sockets. */ + +#if @GNULIB_SOCKET@ +# if @HAVE_WINSOCK2_H@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef socket +# define socket rpl_socket +# endif +_GL_FUNCDECL_RPL (socket, int, (int domain, int type, int protocol)); +_GL_CXXALIAS_RPL (socket, int, (int domain, int type, int protocol)); +# else +_GL_CXXALIAS_SYS (socket, int, (int domain, int type, int protocol)); +# endif +_GL_CXXALIASWARN (socket); +#elif @HAVE_WINSOCK2_H@ +# undef socket +# define socket socket_used_without_requesting_gnulib_module_socket +#elif defined GNULIB_POSIXCHECK +# undef socket +# if HAVE_RAW_DECL_SOCKET +_GL_WARN_ON_USE (socket, "socket is not always POSIX compliant - " + "use gnulib module socket for portability"); +# endif +#endif + +#if @GNULIB_CONNECT@ +# if @HAVE_WINSOCK2_H@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef connect +# define connect rpl_connect +# endif +_GL_FUNCDECL_RPL (connect, int, + (int fd, const struct sockaddr *addr, socklen_t addrlen) + _GL_ARG_NONNULL ((2))); +_GL_CXXALIAS_RPL (connect, int, + (int fd, const struct sockaddr *addr, socklen_t addrlen)); +# else +/* Need to cast, because on NonStop Kernel, the third parameter is + size_t addrlen. */ +_GL_CXXALIAS_SYS_CAST (connect, int, + (int fd, + const struct sockaddr *addr, socklen_t addrlen)); +# endif +_GL_CXXALIASWARN (connect); +#elif @HAVE_WINSOCK2_H@ +# undef connect +# define connect socket_used_without_requesting_gnulib_module_connect +#elif defined GNULIB_POSIXCHECK +# undef connect +# if HAVE_RAW_DECL_CONNECT +_GL_WARN_ON_USE (connect, "connect is not always POSIX compliant - " + "use gnulib module connect for portability"); +# endif +#endif + +#if @GNULIB_ACCEPT@ +# if @HAVE_WINSOCK2_H@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef accept +# define accept rpl_accept +# endif +_GL_FUNCDECL_RPL (accept, int, + (int fd, struct sockaddr *addr, socklen_t *addrlen)); +_GL_CXXALIAS_RPL (accept, int, + (int fd, struct sockaddr *addr, socklen_t *addrlen)); +# else +/* Need to cast, because on Solaris 10 systems, the third parameter is + void *addrlen. */ +_GL_CXXALIAS_SYS_CAST (accept, int, + (int fd, struct sockaddr *addr, socklen_t *addrlen)); +# endif +_GL_CXXALIASWARN (accept); +#elif @HAVE_WINSOCK2_H@ +# undef accept +# define accept accept_used_without_requesting_gnulib_module_accept +#elif defined GNULIB_POSIXCHECK +# undef accept +# if HAVE_RAW_DECL_ACCEPT +_GL_WARN_ON_USE (accept, "accept is not always POSIX compliant - " + "use gnulib module accept for portability"); +# endif +#endif + +#if @GNULIB_BIND@ +# if @HAVE_WINSOCK2_H@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef bind +# define bind rpl_bind +# endif +_GL_FUNCDECL_RPL (bind, int, + (int fd, const struct sockaddr *addr, socklen_t addrlen) + _GL_ARG_NONNULL ((2))); +_GL_CXXALIAS_RPL (bind, int, + (int fd, const struct sockaddr *addr, socklen_t addrlen)); +# else +/* Need to cast, because on NonStop Kernel, the third parameter is + size_t addrlen. */ +_GL_CXXALIAS_SYS_CAST (bind, int, + (int fd, + const struct sockaddr *addr, socklen_t addrlen)); +# endif +_GL_CXXALIASWARN (bind); +#elif @HAVE_WINSOCK2_H@ +# undef bind +# define bind bind_used_without_requesting_gnulib_module_bind +#elif defined GNULIB_POSIXCHECK +# undef bind +# if HAVE_RAW_DECL_BIND +_GL_WARN_ON_USE (bind, "bind is not always POSIX compliant - " + "use gnulib module bind for portability"); +# endif +#endif + +#if @GNULIB_GETPEERNAME@ +# if @HAVE_WINSOCK2_H@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef getpeername +# define getpeername rpl_getpeername +# endif +_GL_FUNCDECL_RPL (getpeername, int, + (int fd, struct sockaddr *addr, socklen_t *addrlen) + _GL_ARG_NONNULL ((2, 3))); +_GL_CXXALIAS_RPL (getpeername, int, + (int fd, struct sockaddr *addr, socklen_t *addrlen)); +# else +/* Need to cast, because on Solaris 10 systems, the third parameter is + void *addrlen. */ +_GL_CXXALIAS_SYS_CAST (getpeername, int, + (int fd, struct sockaddr *addr, socklen_t *addrlen)); +# endif +_GL_CXXALIASWARN (getpeername); +#elif @HAVE_WINSOCK2_H@ +# undef getpeername +# define getpeername getpeername_used_without_requesting_gnulib_module_getpeername +#elif defined GNULIB_POSIXCHECK +# undef getpeername +# if HAVE_RAW_DECL_GETPEERNAME +_GL_WARN_ON_USE (getpeername, "getpeername is not always POSIX compliant - " + "use gnulib module getpeername for portability"); +# endif +#endif + +#if @GNULIB_GETSOCKNAME@ +# if @HAVE_WINSOCK2_H@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef getsockname +# define getsockname rpl_getsockname +# endif +_GL_FUNCDECL_RPL (getsockname, int, + (int fd, struct sockaddr *addr, socklen_t *addrlen) + _GL_ARG_NONNULL ((2, 3))); +_GL_CXXALIAS_RPL (getsockname, int, + (int fd, struct sockaddr *addr, socklen_t *addrlen)); +# else +/* Need to cast, because on Solaris 10 systems, the third parameter is + void *addrlen. */ +_GL_CXXALIAS_SYS_CAST (getsockname, int, + (int fd, struct sockaddr *addr, socklen_t *addrlen)); +# endif +_GL_CXXALIASWARN (getsockname); +#elif @HAVE_WINSOCK2_H@ +# undef getsockname +# define getsockname getsockname_used_without_requesting_gnulib_module_getsockname +#elif defined GNULIB_POSIXCHECK +# undef getsockname +# if HAVE_RAW_DECL_GETSOCKNAME +_GL_WARN_ON_USE (getsockname, "getsockname is not always POSIX compliant - " + "use gnulib module getsockname for portability"); +# endif +#endif + +#if @GNULIB_GETSOCKOPT@ +# if @HAVE_WINSOCK2_H@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef getsockopt +# define getsockopt rpl_getsockopt +# endif +_GL_FUNCDECL_RPL (getsockopt, int, (int fd, int level, int optname, + void *optval, socklen_t *optlen) + _GL_ARG_NONNULL ((4, 5))); +_GL_CXXALIAS_RPL (getsockopt, int, (int fd, int level, int optname, + void *optval, socklen_t *optlen)); +# else +/* Need to cast, because on Solaris 10 systems, the fifth parameter is + void *optlen. */ +_GL_CXXALIAS_SYS_CAST (getsockopt, int, (int fd, int level, int optname, + void *optval, socklen_t *optlen)); +# endif +_GL_CXXALIASWARN (getsockopt); +#elif @HAVE_WINSOCK2_H@ +# undef getsockopt +# define getsockopt getsockopt_used_without_requesting_gnulib_module_getsockopt +#elif defined GNULIB_POSIXCHECK +# undef getsockopt +# if HAVE_RAW_DECL_GETSOCKOPT +_GL_WARN_ON_USE (getsockopt, "getsockopt is not always POSIX compliant - " + "use gnulib module getsockopt for portability"); +# endif +#endif + +#if @GNULIB_LISTEN@ +# if @HAVE_WINSOCK2_H@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef listen +# define listen rpl_listen +# endif +_GL_FUNCDECL_RPL (listen, int, (int fd, int backlog)); +_GL_CXXALIAS_RPL (listen, int, (int fd, int backlog)); +# else +_GL_CXXALIAS_SYS (listen, int, (int fd, int backlog)); +# endif +_GL_CXXALIASWARN (listen); +#elif @HAVE_WINSOCK2_H@ +# undef listen +# define listen listen_used_without_requesting_gnulib_module_listen +#elif defined GNULIB_POSIXCHECK +# undef listen +# if HAVE_RAW_DECL_LISTEN +_GL_WARN_ON_USE (listen, "listen is not always POSIX compliant - " + "use gnulib module listen for portability"); +# endif +#endif + +#if @GNULIB_RECV@ +# if @HAVE_WINSOCK2_H@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef recv +# define recv rpl_recv +# endif +_GL_FUNCDECL_RPL (recv, ssize_t, (int fd, void *buf, size_t len, int flags) + _GL_ARG_NONNULL ((2))); +_GL_CXXALIAS_RPL (recv, ssize_t, (int fd, void *buf, size_t len, int flags)); +# else +_GL_CXXALIAS_SYS (recv, ssize_t, (int fd, void *buf, size_t len, int flags)); +# endif +_GL_CXXALIASWARN (recv); +#elif @HAVE_WINSOCK2_H@ +# undef recv +# define recv recv_used_without_requesting_gnulib_module_recv +#elif defined GNULIB_POSIXCHECK +# undef recv +# if HAVE_RAW_DECL_RECV +_GL_WARN_ON_USE (recv, "recv is not always POSIX compliant - " + "use gnulib module recv for portability"); +# endif +#endif + +#if @GNULIB_SEND@ +# if @HAVE_WINSOCK2_H@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef send +# define send rpl_send +# endif +_GL_FUNCDECL_RPL (send, ssize_t, + (int fd, const void *buf, size_t len, int flags) + _GL_ARG_NONNULL ((2))); +_GL_CXXALIAS_RPL (send, ssize_t, + (int fd, const void *buf, size_t len, int flags)); +# else +_GL_CXXALIAS_SYS (send, ssize_t, + (int fd, const void *buf, size_t len, int flags)); +# endif +_GL_CXXALIASWARN (send); +#elif @HAVE_WINSOCK2_H@ +# undef send +# define send send_used_without_requesting_gnulib_module_send +#elif defined GNULIB_POSIXCHECK +# undef send +# if HAVE_RAW_DECL_SEND +_GL_WARN_ON_USE (send, "send is not always POSIX compliant - " + "use gnulib module send for portability"); +# endif +#endif + +#if @GNULIB_RECVFROM@ +# if @HAVE_WINSOCK2_H@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef recvfrom +# define recvfrom rpl_recvfrom +# endif +_GL_FUNCDECL_RPL (recvfrom, ssize_t, + (int fd, void *buf, size_t len, int flags, + struct sockaddr *from, socklen_t *fromlen) + _GL_ARG_NONNULL ((2))); +_GL_CXXALIAS_RPL (recvfrom, ssize_t, + (int fd, void *buf, size_t len, int flags, + struct sockaddr *from, socklen_t *fromlen)); +# else +/* Need to cast, because on Solaris 10 systems, the sixth parameter is + void *fromlen. */ +_GL_CXXALIAS_SYS_CAST (recvfrom, ssize_t, + (int fd, void *buf, size_t len, int flags, + struct sockaddr *from, socklen_t *fromlen)); +# endif +_GL_CXXALIASWARN (recvfrom); +#elif @HAVE_WINSOCK2_H@ +# undef recvfrom +# define recvfrom recvfrom_used_without_requesting_gnulib_module_recvfrom +#elif defined GNULIB_POSIXCHECK +# undef recvfrom +# if HAVE_RAW_DECL_RECVFROM +_GL_WARN_ON_USE (recvfrom, "recvfrom is not always POSIX compliant - " + "use gnulib module recvfrom for portability"); +# endif +#endif + +#if @GNULIB_SENDTO@ +# if @HAVE_WINSOCK2_H@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef sendto +# define sendto rpl_sendto +# endif +_GL_FUNCDECL_RPL (sendto, ssize_t, + (int fd, const void *buf, size_t len, int flags, + const struct sockaddr *to, socklen_t tolen) + _GL_ARG_NONNULL ((2))); +_GL_CXXALIAS_RPL (sendto, ssize_t, + (int fd, const void *buf, size_t len, int flags, + const struct sockaddr *to, socklen_t tolen)); +# else +/* Need to cast, because on NonStop Kernel, the sixth parameter is + size_t tolen. */ +_GL_CXXALIAS_SYS_CAST (sendto, ssize_t, + (int fd, const void *buf, size_t len, int flags, + const struct sockaddr *to, socklen_t tolen)); +# endif +_GL_CXXALIASWARN (sendto); +#elif @HAVE_WINSOCK2_H@ +# undef sendto +# define sendto sendto_used_without_requesting_gnulib_module_sendto +#elif defined GNULIB_POSIXCHECK +# undef sendto +# if HAVE_RAW_DECL_SENDTO +_GL_WARN_ON_USE (sendto, "sendto is not always POSIX compliant - " + "use gnulib module sendto for portability"); +# endif +#endif + +#if @GNULIB_SETSOCKOPT@ +# if @HAVE_WINSOCK2_H@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef setsockopt +# define setsockopt rpl_setsockopt +# endif +_GL_FUNCDECL_RPL (setsockopt, int, (int fd, int level, int optname, + const void * optval, socklen_t optlen) + _GL_ARG_NONNULL ((4))); +_GL_CXXALIAS_RPL (setsockopt, int, (int fd, int level, int optname, + const void * optval, socklen_t optlen)); +# else +/* Need to cast, because on NonStop Kernel, the fifth parameter is + size_t optlen. */ +_GL_CXXALIAS_SYS_CAST (setsockopt, int, + (int fd, int level, int optname, + const void * optval, socklen_t optlen)); +# endif +_GL_CXXALIASWARN (setsockopt); +#elif @HAVE_WINSOCK2_H@ +# undef setsockopt +# define setsockopt setsockopt_used_without_requesting_gnulib_module_setsockopt +#elif defined GNULIB_POSIXCHECK +# undef setsockopt +# if HAVE_RAW_DECL_SETSOCKOPT +_GL_WARN_ON_USE (setsockopt, "setsockopt is not always POSIX compliant - " + "use gnulib module setsockopt for portability"); +# endif +#endif + +#if @GNULIB_SHUTDOWN@ +# if @HAVE_WINSOCK2_H@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef shutdown +# define shutdown rpl_shutdown +# endif +_GL_FUNCDECL_RPL (shutdown, int, (int fd, int how)); +_GL_CXXALIAS_RPL (shutdown, int, (int fd, int how)); +# else +_GL_CXXALIAS_SYS (shutdown, int, (int fd, int how)); +# endif +_GL_CXXALIASWARN (shutdown); +#elif @HAVE_WINSOCK2_H@ +# undef shutdown +# define shutdown shutdown_used_without_requesting_gnulib_module_shutdown +#elif defined GNULIB_POSIXCHECK +# undef shutdown +# if HAVE_RAW_DECL_SHUTDOWN +_GL_WARN_ON_USE (shutdown, "shutdown is not always POSIX compliant - " + "use gnulib module shutdown for portability"); +# endif +#endif + +#if @GNULIB_ACCEPT4@ +/* Accept a connection on a socket, with specific opening flags. + The flags are a bitmask, possibly including O_CLOEXEC (defined in ) + and O_TEXT, O_BINARY (defined in "binary-io.h"). + See also the Linux man page at + . */ +# if @HAVE_ACCEPT4@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define accept4 rpl_accept4 +# endif +_GL_FUNCDECL_RPL (accept4, int, + (int sockfd, struct sockaddr *addr, socklen_t *addrlen, + int flags)); +_GL_CXXALIAS_RPL (accept4, int, + (int sockfd, struct sockaddr *addr, socklen_t *addrlen, + int flags)); +# else +_GL_FUNCDECL_SYS (accept4, int, + (int sockfd, struct sockaddr *addr, socklen_t *addrlen, + int flags)); +_GL_CXXALIAS_SYS (accept4, int, + (int sockfd, struct sockaddr *addr, socklen_t *addrlen, + int flags)); +# endif +_GL_CXXALIASWARN (accept4); +#elif defined GNULIB_POSIXCHECK +# undef accept4 +# if HAVE_RAW_DECL_ACCEPT4 +_GL_WARN_ON_USE (accept4, "accept4 is unportable - " + "use gnulib module accept4 for portability"); +# endif +#endif + +_GL_INLINE_HEADER_END + +#endif /* _@GUARD_PREFIX@_SYS_SOCKET_H */ +#endif /* _@GUARD_PREFIX@_SYS_SOCKET_H */ +#endif diff -Nru grep-3.1/gnulib-tests/sys_time.in.h grep-3.3/gnulib-tests/sys_time.in.h --- grep-3.1/gnulib-tests/sys_time.in.h 1970-01-01 00:00:00.000000000 +0000 +++ grep-3.3/gnulib-tests/sys_time.in.h 2018-01-07 00:08:00.000000000 +0000 @@ -0,0 +1,220 @@ +/* Provide a more complete sys/time.h. + + Copyright (C) 2007-2018 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 Paul Eggert. */ + +#ifndef _@GUARD_PREFIX@_SYS_TIME_H + +#if __GNUC__ >= 3 +@PRAGMA_SYSTEM_HEADER@ +#endif +@PRAGMA_COLUMNS@ + +/* On Cygwin and on many BSDish systems, includes itself + recursively via . + Simply delegate to the system's header in this case; it is a no-op. + Without this extra ifdef, the C++ gettimeofday declaration below + would be a forward declaration in gnulib's nested . */ +#if defined _CYGWIN_SYS_TIME_H || defined _SYS_TIME_H || defined _SYS_TIME_H_ +# @INCLUDE_NEXT@ @NEXT_SYS_TIME_H@ +#else + +/* The include_next requires a split double-inclusion guard. */ +#if @HAVE_SYS_TIME_H@ +# @INCLUDE_NEXT@ @NEXT_SYS_TIME_H@ +#endif + +#ifndef _@GUARD_PREFIX@_SYS_TIME_H +#define _@GUARD_PREFIX@_SYS_TIME_H + +#if ! @HAVE_SYS_TIME_H@ +# include +#endif + +/* On native Windows with MSVC, get the 'struct timeval' type. + Also, on native Windows with a 64-bit time_t, where we are overriding the + 'struct timeval' type, get all declarations of system functions whose + signature contains 'struct timeval'. */ +#if (defined _MSC_VER || @REPLACE_STRUCT_TIMEVAL@) && @HAVE_WINSOCK2_H@ && !defined _GL_INCLUDING_WINSOCK2_H +# define _GL_INCLUDING_WINSOCK2_H +# include +# undef _GL_INCLUDING_WINSOCK2_H +#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. */ + +#ifdef __cplusplus +extern "C" { +#endif + +#if !@HAVE_STRUCT_TIMEVAL@ || @REPLACE_STRUCT_TIMEVAL@ + +# if @REPLACE_STRUCT_TIMEVAL@ +# define timeval rpl_timeval +# endif + +# if !GNULIB_defined_struct_timeval +struct timeval +{ + time_t tv_sec; + long int tv_usec; +}; +# define GNULIB_defined_struct_timeval 1 +# endif + +#endif + +#ifdef __cplusplus +} +#endif + +#if @GNULIB_GETTIMEOFDAY@ +# if @REPLACE_GETTIMEOFDAY@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef gettimeofday +# define gettimeofday rpl_gettimeofday +# endif +_GL_FUNCDECL_RPL (gettimeofday, int, + (struct timeval *restrict, void *restrict) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (gettimeofday, int, + (struct timeval *restrict, void *restrict)); +# else +# if !@HAVE_GETTIMEOFDAY@ +_GL_FUNCDECL_SYS (gettimeofday, int, + (struct timeval *restrict, void *restrict) + _GL_ARG_NONNULL ((1))); +# endif +/* Need to cast, because on glibc systems, by default, the second argument is + struct timezone *. */ +_GL_CXXALIAS_SYS_CAST (gettimeofday, int, + (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 +_GL_WARN_ON_USE (gettimeofday, "gettimeofday is unportable - " + "use gnulib module gettimeofday for portability"); +# endif +#endif + +/* Hide some function declarations from . */ + +#if defined _MSC_VER && @HAVE_WINSOCK2_H@ +# if !defined _@GUARD_PREFIX@_UNISTD_H +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef close +# define close close_used_without_including_unistd_h +# else + _GL_WARN_ON_USE (close, + "close() used without including "); +# endif +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef gethostname +# define gethostname gethostname_used_without_including_unistd_h +# else + _GL_WARN_ON_USE (gethostname, + "gethostname() used without including "); +# endif +# endif +# if !defined _@GUARD_PREFIX@_SYS_SOCKET_H +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef socket +# define socket socket_used_without_including_sys_socket_h +# undef connect +# define connect connect_used_without_including_sys_socket_h +# undef accept +# define accept accept_used_without_including_sys_socket_h +# undef bind +# define bind bind_used_without_including_sys_socket_h +# undef getpeername +# define getpeername getpeername_used_without_including_sys_socket_h +# undef getsockname +# define getsockname getsockname_used_without_including_sys_socket_h +# undef getsockopt +# define getsockopt getsockopt_used_without_including_sys_socket_h +# undef listen +# define listen listen_used_without_including_sys_socket_h +# undef recv +# define recv recv_used_without_including_sys_socket_h +# undef send +# define send send_used_without_including_sys_socket_h +# undef recvfrom +# define recvfrom recvfrom_used_without_including_sys_socket_h +# undef sendto +# define sendto sendto_used_without_including_sys_socket_h +# undef setsockopt +# define setsockopt setsockopt_used_without_including_sys_socket_h +# undef shutdown +# define shutdown shutdown_used_without_including_sys_socket_h +# else + _GL_WARN_ON_USE (socket, + "socket() used without including "); + _GL_WARN_ON_USE (connect, + "connect() used without including "); + _GL_WARN_ON_USE (accept, + "accept() used without including "); + _GL_WARN_ON_USE (bind, + "bind() used without including "); + _GL_WARN_ON_USE (getpeername, + "getpeername() used without including "); + _GL_WARN_ON_USE (getsockname, + "getsockname() used without including "); + _GL_WARN_ON_USE (getsockopt, + "getsockopt() used without including "); + _GL_WARN_ON_USE (listen, + "listen() used without including "); + _GL_WARN_ON_USE (recv, + "recv() used without including "); + _GL_WARN_ON_USE (send, + "send() used without including "); + _GL_WARN_ON_USE (recvfrom, + "recvfrom() used without including "); + _GL_WARN_ON_USE (sendto, + "sendto() used without including "); + _GL_WARN_ON_USE (setsockopt, + "setsockopt() used without including "); + _GL_WARN_ON_USE (shutdown, + "shutdown() used without including "); +# endif +# endif +# if !defined _@GUARD_PREFIX@_SYS_SELECT_H +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef select +# define select select_used_without_including_sys_select_h +# else + _GL_WARN_ON_USE (select, + "select() used without including "); +# endif +# endif +#endif + +#endif /* _@GUARD_PREFIX@_SYS_TIME_H */ +#endif /* _CYGWIN_SYS_TIME_H */ +#endif /* _@GUARD_PREFIX@_SYS_TIME_H */ diff -Nru grep-3.1/gnulib-tests/sys_uio.in.h grep-3.3/gnulib-tests/sys_uio.in.h --- grep-3.1/gnulib-tests/sys_uio.in.h 1970-01-01 00:00:00.000000000 +0000 +++ grep-3.3/gnulib-tests/sys_uio.in.h 2018-01-07 00:08:00.000000000 +0000 @@ -0,0 +1,63 @@ +/* Substitute for . + Copyright (C) 2011-2018 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 . */ + +# if __GNUC__ >= 3 +@PRAGMA_SYSTEM_HEADER@ +# endif +@PRAGMA_COLUMNS@ + +#ifndef _@GUARD_PREFIX@_SYS_UIO_H + +#if @HAVE_SYS_UIO_H@ + +/* On OpenBSD 4.4, assumes prior inclusion of . */ +# include + +/* The include_next requires a split double-inclusion guard. */ +# @INCLUDE_NEXT@ @NEXT_SYS_UIO_H@ + +#endif + +#ifndef _@GUARD_PREFIX@_SYS_UIO_H +#define _@GUARD_PREFIX@_SYS_UIO_H + +#if !@HAVE_SYS_UIO_H@ +/* A platform that lacks . */ +/* Get 'size_t' and 'ssize_t'. */ +# include + +# ifdef __cplusplus +extern "C" { +# endif + +# if !GNULIB_defined_struct_iovec +/* All known platforms that lack also lack any declaration + of struct iovec in any other header. */ +struct iovec { + void *iov_base; + size_t iov_len; +}; +# define GNULIB_defined_struct_iovec 1 +# endif + +# ifdef __cplusplus +} +# endif + +#endif + +#endif /* _@GUARD_PREFIX@_SYS_UIO_H */ +#endif /* _@GUARD_PREFIX@_SYS_UIO_H */ diff -Nru grep-3.1/gnulib-tests/test-accept.c grep-3.3/gnulib-tests/test-accept.c --- grep-3.1/gnulib-tests/test-accept.c 1970-01-01 00:00:00.000000000 +0000 +++ grep-3.3/gnulib-tests/test-accept.c 2018-01-07 00:07:08.000000000 +0000 @@ -0,0 +1,56 @@ +/* Test accepting a connection to a server socket. + Copyright (C) 2011-2018 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 + +#include "signature.h" +SIGNATURE_CHECK (accept, int, (int, struct sockaddr *, socklen_t *)); + +#include +#include +#include + +#include "sockets.h" +#include "macros.h" + +int +main (void) +{ + (void) gl_sockets_startup (SOCKETS_1_1); + + /* Test behaviour for invalid file descriptors. */ + { + struct sockaddr_in addr; + socklen_t addrlen = sizeof (addr); + + errno = 0; + ASSERT (accept (-1, (struct sockaddr *) &addr, &addrlen) == -1); + ASSERT (errno == EBADF); + } + { + struct sockaddr_in addr; + socklen_t addrlen = sizeof (addr); + + close (99); + errno = 0; + ASSERT (accept (99, (struct sockaddr *) &addr, &addrlen) == -1); + ASSERT (errno == EBADF); + } + + return 0; +} diff -Nru grep-3.1/gnulib-tests/test-alignof.c grep-3.3/gnulib-tests/test-alignof.c --- grep-3.1/gnulib-tests/test-alignof.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/gnulib-tests/test-alignof.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ /* Test of . - Copyright (C) 2009-2017 Free Software Foundation, Inc. + Copyright (C) 2009-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ /* Written by Bruno Haible , 2009. */ diff -Nru grep-3.1/gnulib-tests/test-alloca-opt.c grep-3.3/gnulib-tests/test-alloca-opt.c --- grep-3.1/gnulib-tests/test-alloca-opt.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/gnulib-tests/test-alloca-opt.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ /* Test of optional automatic memory allocation. - Copyright (C) 2005, 2007, 2009-2017 Free Software Foundation, Inc. + Copyright (C) 2005, 2007, 2009-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ /* Written by Bruno Haible , 2007. */ diff -Nru grep-3.1/gnulib-tests/test-argmatch.c grep-3.3/gnulib-tests/test-argmatch.c --- grep-3.1/gnulib-tests/test-argmatch.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/gnulib-tests/test-argmatch.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ /* Test of exact or abbreviated match search. - Copyright (C) 1990, 1998-1999, 2001-2017 Free Software Foundation, Inc. + Copyright (C) 1990, 1998-1999, 2001-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ /* Written by Bruno Haible , 2007, based on test code by David MacKenzie . */ diff -Nru grep-3.1/gnulib-tests/test-arpa_inet.c grep-3.3/gnulib-tests/test-arpa_inet.c --- grep-3.1/gnulib-tests/test-arpa_inet.c 1970-01-01 00:00:00.000000000 +0000 +++ grep-3.3/gnulib-tests/test-arpa_inet.c 2018-01-07 00:07:08.000000000 +0000 @@ -0,0 +1,27 @@ +/* Test of substitute. + Copyright (C) 2007, 2009-2018 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 , 2007. */ + +#include + +#include + +int +main (void) +{ + return 0; +} diff -Nru grep-3.1/gnulib-tests/test-binary-io.c grep-3.3/gnulib-tests/test-binary-io.c --- grep-3.1/gnulib-tests/test-binary-io.c 2017-02-16 06:53:58.000000000 +0000 +++ grep-3.3/gnulib-tests/test-binary-io.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ /* Test of binary mode I/O. - Copyright (C) 2005, 2007-2017 Free Software Foundation, Inc. + Copyright (C) 2005, 2007-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ /* Written by Bruno Haible , 2005. */ diff -Nru grep-3.1/gnulib-tests/test-bind.c grep-3.3/gnulib-tests/test-bind.c --- grep-3.1/gnulib-tests/test-bind.c 1970-01-01 00:00:00.000000000 +0000 +++ grep-3.3/gnulib-tests/test-bind.c 2018-01-07 00:07:08.000000000 +0000 @@ -0,0 +1,58 @@ +/* Test binding a server socket to a port. + Copyright (C) 2011-2018 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 + +#include "signature.h" +SIGNATURE_CHECK (bind, int, (int, const struct sockaddr *, socklen_t)); + +#include +#include +#include +#include + +#include "sockets.h" +#include "macros.h" + +int +main (void) +{ + (void) gl_sockets_startup (SOCKETS_1_1); + + /* Test behaviour for invalid file descriptors. */ + { + struct sockaddr_in addr; + + addr.sin_family = AF_INET; + inet_pton (AF_INET, "127.0.0.1", &addr.sin_addr); + addr.sin_port = htons (80); + { + errno = 0; + ASSERT (bind (-1, (const struct sockaddr *) &addr, sizeof (addr)) == -1); + ASSERT (errno == EBADF); + } + { + close (99); + errno = 0; + ASSERT (bind (99, (const struct sockaddr *) &addr, sizeof (addr)) == -1); + ASSERT (errno == EBADF); + } + } + + return 0; +} diff -Nru grep-3.1/gnulib-tests/test-bitrotate.c grep-3.3/gnulib-tests/test-bitrotate.c --- grep-3.1/gnulib-tests/test-bitrotate.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/gnulib-tests/test-bitrotate.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ /* Test of substitute. - Copyright (C) 2007-2017 Free Software Foundation, Inc. + Copyright (C) 2007-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ /* Written by Simon Josefsson , 2008. */ diff -Nru grep-3.1/gnulib-tests/test-btowc.c grep-3.3/gnulib-tests/test-btowc.c --- grep-3.1/gnulib-tests/test-btowc.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/gnulib-tests/test-btowc.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ /* Test of conversion of unibyte character to wide character. - Copyright (C) 2008-2017 Free Software Foundation, Inc. + Copyright (C) 2008-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ /* Written by Bruno Haible , 2008. */ diff -Nru grep-3.1/gnulib-tests/test-c-ctype.c grep-3.3/gnulib-tests/test-c-ctype.c --- grep-3.1/gnulib-tests/test-c-ctype.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/gnulib-tests/test-c-ctype.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ /* Test of character handling in C locale. - Copyright (C) 2005, 2007-2017 Free Software Foundation, Inc. + Copyright (C) 2005, 2007-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ /* Written by Bruno Haible , 2005. */ diff -Nru grep-3.1/gnulib-tests/test-chdir.c grep-3.3/gnulib-tests/test-chdir.c --- grep-3.1/gnulib-tests/test-chdir.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/gnulib-tests/test-chdir.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ /* Test changing to a directory. - Copyright (C) 2011-2017 Free Software Foundation, Inc. + Copyright (C) 2011-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ #include diff -Nru grep-3.1/gnulib-tests/test-cloexec.c grep-3.3/gnulib-tests/test-cloexec.c --- grep-3.1/gnulib-tests/test-cloexec.c 2017-05-14 01:09:51.000000000 +0000 +++ grep-3.3/gnulib-tests/test-cloexec.c 2018-06-24 23:16:49.000000000 +0000 @@ -1,5 +1,5 @@ /* Test duplicating non-inheritable file descriptors. - Copyright (C) 2009-2017 Free Software Foundation, Inc. + Copyright (C) 2009-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ /* Written by Eric Blake , 2009. */ @@ -24,7 +24,7 @@ #include #include -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +#if defined _WIN32 && ! defined __CYGWIN__ /* Get declarations of the native Windows API functions. */ # define WIN32_LEAN_AND_MEAN # include @@ -43,7 +43,7 @@ static int is_inheritable (int fd) { -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +#if defined _WIN32 && ! defined __CYGWIN__ /* On native Windows, the initial state of unassigned standard file descriptors is that they are open but point to an INVALID_HANDLE_VALUE, and there is no fcntl. */ @@ -90,7 +90,7 @@ /* Normal use of set_cloexec_flag. */ ASSERT (set_cloexec_flag (fd, true) == 0); -#if !((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) +#if !(defined _WIN32 && ! defined __CYGWIN__) ASSERT (!is_inheritable (fd)); #endif ASSERT (set_cloexec_flag (fd, false) == 0); diff -Nru grep-3.1/gnulib-tests/test-close.c grep-3.3/gnulib-tests/test-close.c --- grep-3.1/gnulib-tests/test-close.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/gnulib-tests/test-close.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ /* Test closing a file or socket. - Copyright (C) 2011-2017 Free Software Foundation, Inc. + Copyright (C) 2011-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ #include diff -Nru grep-3.1/gnulib-tests/test-connect.c grep-3.3/gnulib-tests/test-connect.c --- grep-3.1/gnulib-tests/test-connect.c 1970-01-01 00:00:00.000000000 +0000 +++ grep-3.3/gnulib-tests/test-connect.c 2018-01-07 00:07:08.000000000 +0000 @@ -0,0 +1,60 @@ +/* Test connecting a client socket. + Copyright (C) 2011-2018 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 + +#include "signature.h" +SIGNATURE_CHECK (connect, int, (int, const struct sockaddr *, socklen_t)); + +#include +#include +#include +#include + +#include "sockets.h" +#include "macros.h" + +int +main (void) +{ + (void) gl_sockets_startup (SOCKETS_1_1); + + /* Test behaviour for invalid file descriptors. */ + { + struct sockaddr_in addr; + + addr.sin_family = AF_INET; + inet_pton (AF_INET, "127.0.0.1", &addr.sin_addr); + addr.sin_port = htons (80); + { + errno = 0; + ASSERT (connect (-1, (const struct sockaddr *) &addr, sizeof (addr)) + == -1); + ASSERT (errno == EBADF); + } + { + close (99); + errno = 0; + ASSERT (connect (99, (const struct sockaddr *) &addr, sizeof (addr)) + == -1); + ASSERT (errno == EBADF); + } + } + + return 0; +} diff -Nru grep-3.1/gnulib-tests/test-c-stack2.sh grep-3.3/gnulib-tests/test-c-stack2.sh --- grep-3.1/gnulib-tests/test-c-stack2.sh 1970-01-01 00:00:00.000000000 +0000 +++ grep-3.3/gnulib-tests/test-c-stack2.sh 2014-06-27 22:32:18.000000000 +0000 @@ -0,0 +1,36 @@ +#!/bin/sh + +tmpfiles="" +trap 'rm -fr $tmpfiles' 1 2 3 15 + +tmpfiles="t-c-stack2.tmp" + +# Sanitize exit status within a subshell, since some shells fail to +# redirect stderr on their message about death due to signal. +(./test-c-stack${EXEEXT} 1; exit $?) 2> t-c-stack2.tmp + +case $? in + 77) if grep 'stack overflow' t-c-stack2.tmp >/dev/null ; then + if test -z "$LIBSIGSEGV"; then + echo 'cannot tell stack overflow from crash; consider installing libsigsegv' >&2 + exit 77 + else + echo 'cannot tell stack overflow from crash, in spite of libsigsegv' >&2 + exit 1 + fi + else + cat t-c-stack2.tmp >&2 + exit 77 + fi + ;; + 0) (exit 1); exit 1 ;; +esac +if grep 'program error' t-c-stack2.tmp >/dev/null ; then + : +else + (exit 1); exit 1 +fi + +rm -fr $tmpfiles + +exit 0 diff -Nru grep-3.1/gnulib-tests/test-c-stack.c grep-3.3/gnulib-tests/test-c-stack.c --- grep-3.1/gnulib-tests/test-c-stack.c 1970-01-01 00:00:00.000000000 +0000 +++ grep-3.3/gnulib-tests/test-c-stack.c 2018-01-07 00:07:08.000000000 +0000 @@ -0,0 +1,73 @@ +/* Test of c-stack module. + Copyright (C) 2002, 2004, 2006, 2008-2018 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 "c-stack.h" + +#include "exitfail.h" +#include +#if HAVE_SETRLIMIT +/* At least FreeBSD 5.0 needs extra headers before + will compile. */ +# include +# include +# include +#endif + +#include "macros.h" + +static volatile int * +recurse_1 (volatile int n, volatile int *p) +{ + if (n >= 0) + *recurse_1 (n + 1, p) += n; + return p; +} + +static int +recurse (volatile int n) +{ + int sum = 0; + return *recurse_1 (n, &sum); +} + +int +main (int argc, char **argv) +{ +#if HAVE_SETRLIMIT && defined RLIMIT_STACK + /* Before starting the endless recursion, try to be friendly to the + user's machine. On some Linux 2.2.x systems, there is no stack + limit for user processes at all. We don't want to kill such + systems. */ + struct rlimit rl; + rl.rlim_cur = rl.rlim_max = 0x100000; /* 1 MB */ + setrlimit (RLIMIT_STACK, &rl); +#endif + + if (c_stack_action (NULL) == 0) + { + if (1 < argc) + { + exit_failure = 77; + ++*argv[argc]; /* Intentionally dereference NULL. */ + } + return recurse (0); + } + fputs ("skipping test: ", stderr); + perror ("c_stack_action"); + return 77; +} diff -Nru grep-3.1/gnulib-tests/test-c-stack.sh grep-3.3/gnulib-tests/test-c-stack.sh --- grep-3.1/gnulib-tests/test-c-stack.sh 1970-01-01 00:00:00.000000000 +0000 +++ grep-3.3/gnulib-tests/test-c-stack.sh 2014-06-27 22:32:18.000000000 +0000 @@ -0,0 +1,21 @@ +#!/bin/sh + +tmpfiles="" +trap 'rm -fr $tmpfiles' 1 2 3 15 + +tmpfiles="t-c-stack.tmp" +./test-c-stack${EXEEXT} 2> t-c-stack.tmp +case $? in + 77) cat t-c-stack.tmp >&2; (exit 77); exit 77 ;; + 1) ;; + *) (exit 1); exit 1 ;; +esac +if grep 'stack overflow' t-c-stack.tmp >/dev/null ; then + : +else + (exit 1); exit 1 +fi + +rm -fr $tmpfiles + +exit 0 diff -Nru grep-3.1/gnulib-tests/test-c-strcasecmp.c grep-3.3/gnulib-tests/test-c-strcasecmp.c --- grep-3.1/gnulib-tests/test-c-strcasecmp.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/gnulib-tests/test-c-strcasecmp.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ /* Test of case-insensitive string comparison function. - Copyright (C) 2007-2017 Free Software Foundation, Inc. + Copyright (C) 2007-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ /* Written by Bruno Haible , 2007. */ diff -Nru grep-3.1/gnulib-tests/test-c-strncasecmp.c grep-3.3/gnulib-tests/test-c-strncasecmp.c --- grep-3.1/gnulib-tests/test-c-strncasecmp.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/gnulib-tests/test-c-strncasecmp.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ /* Test of case-insensitive string comparison function. - Copyright (C) 2007-2017 Free Software Foundation, Inc. + Copyright (C) 2007-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ /* Written by Bruno Haible , 2007. */ diff -Nru grep-3.1/gnulib-tests/test-ctype.c grep-3.3/gnulib-tests/test-ctype.c --- grep-3.1/gnulib-tests/test-ctype.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/gnulib-tests/test-ctype.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ /* Test of substitute. - Copyright (C) 2009-2017 Free Software Foundation, Inc. + Copyright (C) 2009-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ /* Written by Eric Blake , 2009. */ diff -Nru grep-3.1/gnulib-tests/test-dirent.c grep-3.3/gnulib-tests/test-dirent.c --- grep-3.1/gnulib-tests/test-dirent.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/gnulib-tests/test-dirent.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ /* Test of substitute. - Copyright (C) 2009-2017 Free Software Foundation, Inc. + Copyright (C) 2009-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ /* Written by Eric Blake , 2009. */ diff -Nru grep-3.1/gnulib-tests/test-dirent-safer.c grep-3.3/gnulib-tests/test-dirent-safer.c --- grep-3.1/gnulib-tests/test-dirent-safer.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/gnulib-tests/test-dirent-safer.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,96 +0,0 @@ -/* Test that directory streams leave standard fds alone. - 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 . */ - -/* Written by Eric Blake , 2009. */ - -#include - -#include "dirent--.h" - -#include -#include -#include -#include - -#include "unistd-safer.h" - -/* This test intentionally closes stderr. So, we arrange to have fd 10 - (outside the range of interesting fd's during the test) set up to - duplicate the original stderr. */ - -#define BACKUP_STDERR_FILENO 10 -#define ASSERT_STREAM myerr -#include "macros.h" - -static FILE *myerr; - -int -main (void) -{ - int i; - DIR *dp; - /* The dirent-safer module works without the use of fdopendir (which - would also pull in fchdir and openat); but if those modules were - also used, we ensure that they are safe. In particular, the - gnulib version of fdopendir is unable to guarantee that - dirfd(fdopendir(fd))==fd, but we can at least guarantee that if - they are not equal, the fd returned by dirfd is safe. */ -#if HAVE_FDOPENDIR || GNULIB_TEST_FDOPENDIR - int dfd; -#endif - - /* We close fd 2 later, so save it in fd 10. */ - if (dup2 (STDERR_FILENO, BACKUP_STDERR_FILENO) != BACKUP_STDERR_FILENO - || (myerr = fdopen (BACKUP_STDERR_FILENO, "w")) == NULL) - return 2; - -#if HAVE_FDOPENDIR || GNULIB_TEST_FDOPENDIR - dfd = open (".", O_RDONLY); - ASSERT (STDERR_FILENO < dfd); -#endif - - /* Four iterations, with progressively more standard descriptors - closed. */ - for (i = -1; i <= STDERR_FILENO; i++) - { - if (0 <= i) - ASSERT (close (i) == 0); - dp = opendir ("."); - ASSERT (dp); - ASSERT (dirfd (dp) == -1 || STDERR_FILENO < dirfd (dp)); - ASSERT (closedir (dp) == 0); - -#if HAVE_FDOPENDIR || GNULIB_TEST_FDOPENDIR - { - int fd = dup_safer (dfd); - ASSERT (STDERR_FILENO < fd); - dp = fdopendir (fd); - ASSERT (dp); - ASSERT (dirfd (dp) == -1 || STDERR_FILENO < dirfd (dp)); - ASSERT (closedir (dp) == 0); - errno = 0; - ASSERT (close (fd) == -1); - ASSERT (errno == EBADF); - } -#endif - } - -#if HAVE_FDOPENDIR || GNULIB_TEST_FDOPENDIR - ASSERT (close (dfd) == 0); -#endif - - return 0; -} diff -Nru grep-3.1/gnulib-tests/test-dup2.c grep-3.3/gnulib-tests/test-dup2.c --- grep-3.1/gnulib-tests/test-dup2.c 2017-05-14 01:09:51.000000000 +0000 +++ grep-3.3/gnulib-tests/test-dup2.c 2018-06-24 23:16:49.000000000 +0000 @@ -1,5 +1,5 @@ /* Test duplicating file descriptors. - Copyright (C) 2009-2017 Free Software Foundation, Inc. + Copyright (C) 2009-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ /* Written by Eric Blake , 2009. */ @@ -36,7 +36,7 @@ # include "cloexec.h" #endif -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +#if defined _WIN32 && ! defined __CYGWIN__ /* Get declarations of the native Windows API functions. */ # define WIN32_LEAN_AND_MEAN # include @@ -54,7 +54,7 @@ static int is_open (int fd) { -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +#if defined _WIN32 && ! defined __CYGWIN__ /* On native Windows, the initial state of unassigned standard file descriptors is that they are open but point to an INVALID_HANDLE_VALUE, and there is no fcntl. */ @@ -72,7 +72,7 @@ static int is_inheritable (int fd) { -# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +# if defined _WIN32 && ! defined __CYGWIN__ /* On native Windows, the initial state of unassigned standard file descriptors is that they are open but point to an INVALID_HANDLE_VALUE, and there is no fcntl. */ diff -Nru grep-3.1/gnulib-tests/test-dup.c grep-3.3/gnulib-tests/test-dup.c --- grep-3.1/gnulib-tests/test-dup.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/gnulib-tests/test-dup.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ /* Test duplicating a file descriptor. - Copyright (C) 2011-2017 Free Software Foundation, Inc. + Copyright (C) 2011-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ #include diff -Nru grep-3.1/gnulib-tests/test-dup-safer.c grep-3.3/gnulib-tests/test-dup-safer.c --- grep-3.1/gnulib-tests/test-dup-safer.c 2017-05-14 01:09:51.000000000 +0000 +++ grep-3.3/gnulib-tests/test-dup-safer.c 2018-06-24 23:16:49.000000000 +0000 @@ -1,5 +1,5 @@ /* Test that dup_safer leaves standard fds alone. - Copyright (C) 2009-2017 Free Software Foundation, Inc. + Copyright (C) 2009-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ /* Written by Eric Blake , 2009. */ @@ -29,7 +29,7 @@ #include "binary-io.h" #include "cloexec.h" -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +#if defined _WIN32 && ! defined __CYGWIN__ /* Get declarations of the native Windows API functions. */ # define WIN32_LEAN_AND_MEAN # include @@ -60,7 +60,7 @@ static bool is_open (int fd) { -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +#if defined _WIN32 && ! defined __CYGWIN__ /* On native Windows, the initial state of unassigned standard file descriptors is that they are open but point to an INVALID_HANDLE_VALUE, and there is no fcntl. */ @@ -77,7 +77,7 @@ static bool is_inheritable (int fd) { -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +#if defined _WIN32 && ! defined __CYGWIN__ /* On native Windows, the initial state of unassigned standard file descriptors is that they are open but point to an INVALID_HANDLE_VALUE, and there is no fcntl. */ diff -Nru grep-3.1/gnulib-tests/test-environ.c grep-3.3/gnulib-tests/test-environ.c --- grep-3.1/gnulib-tests/test-environ.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/gnulib-tests/test-environ.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ /* Test of environ variable. - Copyright (C) 2008-2017 Free Software Foundation, Inc. + Copyright (C) 2008-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ /* Written by Bruno Haible , 2008. */ diff -Nru grep-3.1/gnulib-tests/test-errno.c grep-3.3/gnulib-tests/test-errno.c --- grep-3.1/gnulib-tests/test-errno.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/gnulib-tests/test-errno.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ /* Test of substitute. - Copyright (C) 2008-2017 Free Software Foundation, Inc. + Copyright (C) 2008-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ /* Written by Bruno Haible , 2008. */ diff -Nru grep-3.1/gnulib-tests/test-exclude1.sh grep-3.3/gnulib-tests/test-exclude1.sh --- grep-3.1/gnulib-tests/test-exclude1.sh 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/gnulib-tests/test-exclude1.sh 2018-01-07 00:07:08.000000000 +0000 @@ -1,6 +1,6 @@ #! /bin/sh # Test suite for exclude. -# Copyright (C) 2009-2017 Free Software Foundation, Inc. +# Copyright (C) 2009-2018 Free Software Foundation, Inc. # This file is part of the GNUlib Library. # # This program is free software: you can redistribute it and/or modify @@ -14,7 +14,7 @@ # 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 . +# along with this program. If not, see . . "${srcdir=.}/init.sh"; path_prepend_ . fail=0 diff -Nru grep-3.1/gnulib-tests/test-exclude2.sh grep-3.3/gnulib-tests/test-exclude2.sh --- grep-3.1/gnulib-tests/test-exclude2.sh 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/gnulib-tests/test-exclude2.sh 2018-01-07 00:07:08.000000000 +0000 @@ -1,6 +1,6 @@ #! /bin/sh # Test suite for exclude. -# Copyright (C) 2009-2017 Free Software Foundation, Inc. +# Copyright (C) 2009-2018 Free Software Foundation, Inc. # This file is part of the GNUlib Library. # # This program is free software: you can redistribute it and/or modify @@ -14,7 +14,7 @@ # 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 . +# along with this program. If not, see . . "${srcdir=.}/init.sh"; path_prepend_ . fail=0 diff -Nru grep-3.1/gnulib-tests/test-exclude3.sh grep-3.3/gnulib-tests/test-exclude3.sh --- grep-3.1/gnulib-tests/test-exclude3.sh 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/gnulib-tests/test-exclude3.sh 2018-01-07 00:07:08.000000000 +0000 @@ -1,6 +1,6 @@ #! /bin/sh # Test suite for exclude. -# Copyright (C) 2009-2017 Free Software Foundation, Inc. +# Copyright (C) 2009-2018 Free Software Foundation, Inc. # This file is part of the GNUlib Library. # # This program is free software: you can redistribute it and/or modify @@ -14,7 +14,7 @@ # 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 . +# along with this program. If not, see . . "${srcdir=.}/init.sh"; path_prepend_ . fail=0 diff -Nru grep-3.1/gnulib-tests/test-exclude4.sh grep-3.3/gnulib-tests/test-exclude4.sh --- grep-3.1/gnulib-tests/test-exclude4.sh 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/gnulib-tests/test-exclude4.sh 2018-01-07 00:07:08.000000000 +0000 @@ -1,6 +1,6 @@ #! /bin/sh # Test suite for exclude. -# Copyright (C) 2009-2017 Free Software Foundation, Inc. +# Copyright (C) 2009-2018 Free Software Foundation, Inc. # This file is part of the GNUlib Library. # # This program is free software: you can redistribute it and/or modify @@ -14,7 +14,7 @@ # 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 . +# along with this program. If not, see . . "${srcdir=.}/init.sh"; path_prepend_ . fail=0 diff -Nru grep-3.1/gnulib-tests/test-exclude5.sh grep-3.3/gnulib-tests/test-exclude5.sh --- grep-3.1/gnulib-tests/test-exclude5.sh 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/gnulib-tests/test-exclude5.sh 2018-01-07 00:07:08.000000000 +0000 @@ -1,6 +1,6 @@ #! /bin/sh # Test suite for exclude. -# Copyright (C) 2009-2017 Free Software Foundation, Inc. +# Copyright (C) 2009-2018 Free Software Foundation, Inc. # This file is part of the GNUlib Library. # # This program is free software: you can redistribute it and/or modify @@ -14,7 +14,7 @@ # 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 . +# along with this program. If not, see . . "${srcdir=.}/init.sh"; path_prepend_ . fail=0 diff -Nru grep-3.1/gnulib-tests/test-exclude6.sh grep-3.3/gnulib-tests/test-exclude6.sh --- grep-3.1/gnulib-tests/test-exclude6.sh 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/gnulib-tests/test-exclude6.sh 2018-01-07 00:07:08.000000000 +0000 @@ -1,6 +1,6 @@ #! /bin/sh # Test suite for exclude. -# Copyright (C) 2009-2017 Free Software Foundation, Inc. +# Copyright (C) 2009-2018 Free Software Foundation, Inc. # This file is part of the GNUlib Library. # # This program is free software: you can redistribute it and/or modify @@ -14,7 +14,7 @@ # 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 . +# along with this program. If not, see . . "${srcdir=.}/init.sh"; path_prepend_ . fail=0 diff -Nru grep-3.1/gnulib-tests/test-exclude7.sh grep-3.3/gnulib-tests/test-exclude7.sh --- grep-3.1/gnulib-tests/test-exclude7.sh 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/gnulib-tests/test-exclude7.sh 2018-01-07 00:07:08.000000000 +0000 @@ -1,6 +1,6 @@ #! /bin/sh # Test suite for exclude. -# Copyright (C) 2009-2017 Free Software Foundation, Inc. +# Copyright (C) 2009-2018 Free Software Foundation, Inc. # This file is part of the GNUlib Library. # # This program is free software: you can redistribute it and/or modify @@ -14,7 +14,7 @@ # 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 . +# along with this program. If not, see . . "${srcdir=.}/init.sh"; path_prepend_ . fail=0 diff -Nru grep-3.1/gnulib-tests/test-exclude8.sh grep-3.3/gnulib-tests/test-exclude8.sh --- grep-3.1/gnulib-tests/test-exclude8.sh 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/gnulib-tests/test-exclude8.sh 2018-01-07 00:07:08.000000000 +0000 @@ -1,6 +1,6 @@ #! /bin/sh # Test suite for exclude. -# Copyright (C) 2010-2017 Free Software Foundation, Inc. +# Copyright (C) 2010-2018 Free Software Foundation, Inc. # This file is part of the GNUlib Library. # # This program is free software: you can redistribute it and/or modify @@ -14,7 +14,7 @@ # 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 . +# along with this program. If not, see . . "${srcdir=.}/init.sh"; path_prepend_ . fail=0 diff -Nru grep-3.1/gnulib-tests/test-exclude.c grep-3.3/gnulib-tests/test-exclude.c --- grep-3.1/gnulib-tests/test-exclude.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/gnulib-tests/test-exclude.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ /* Test suite for exclude. - Copyright (C) 2009-2017 Free Software Foundation, Inc. + Copyright (C) 2009-2018 Free Software Foundation, Inc. This file is part of the GNUlib Library. This program is free software: you can redistribute it and/or modify @@ -13,7 +13,7 @@ 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 . */ + along with this program. If not, see . */ #include #include diff -Nru grep-3.1/gnulib-tests/test-fchdir.c grep-3.3/gnulib-tests/test-fchdir.c --- grep-3.1/gnulib-tests/test-fchdir.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/gnulib-tests/test-fchdir.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ /* Test changing to a directory named by a file descriptor. - Copyright (C) 2009-2017 Free Software Foundation, Inc. + Copyright (C) 2009-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ /* Written by Eric Blake , 2009. */ diff -Nru grep-3.1/gnulib-tests/test-fcntl.c grep-3.3/gnulib-tests/test-fcntl.c --- grep-3.1/gnulib-tests/test-fcntl.c 2017-05-14 01:09:51.000000000 +0000 +++ grep-3.3/gnulib-tests/test-fcntl.c 2018-06-24 23:16:49.000000000 +0000 @@ -1,5 +1,5 @@ /* Test of fcntl(2). - Copyright (C) 2009-2017 Free Software Foundation, Inc. + Copyright (C) 2009-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ /* Written by Eric Blake , 2009. */ @@ -30,7 +30,7 @@ #include #include -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +#if defined _WIN32 && ! defined __CYGWIN__ /* Get declarations of the native Windows API functions. */ # define WIN32_LEAN_AND_MEAN # include @@ -54,7 +54,7 @@ static bool is_open (int fd) { -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +#if defined _WIN32 && ! defined __CYGWIN__ /* On native Windows, the initial state of unassigned standard file descriptors is that they are open but point to an INVALID_HANDLE_VALUE, and there is no fcntl. */ @@ -71,7 +71,7 @@ static bool is_inheritable (int fd) { -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +#if defined _WIN32 && ! defined __CYGWIN__ /* On native Windows, the initial state of unassigned standard file descriptors is that they are open but point to an INVALID_HANDLE_VALUE, and there is no fcntl. */ @@ -266,7 +266,8 @@ ASSERT (errno == EINVAL); errno = 0; ASSERT (fcntl (fd, F_DUPFD_CLOEXEC, bad_fd) == -1); - ASSERT (errno == EINVAL); + ASSERT (errno == EINVAL + || errno == EMFILE /* WSL */); /* For F_DUPFD*, check for correct inheritance, as well as preservation of text vs. binary. */ diff -Nru grep-3.1/gnulib-tests/test-fcntl-h.c grep-3.3/gnulib-tests/test-fcntl-h.c --- grep-3.1/gnulib-tests/test-fcntl-h.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/gnulib-tests/test-fcntl-h.c 2018-09-19 05:04:26.000000000 +0000 @@ -1,5 +1,5 @@ /* Test of substitute. - Copyright (C) 2007, 2009-2017 Free Software Foundation, Inc. + Copyright (C) 2007, 2009-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ /* Written by Bruno Haible , 2007. */ @@ -22,8 +22,8 @@ /* Check that the various O_* macros are defined. */ int o = (O_DIRECT | O_DIRECTORY | O_DSYNC | O_IGNORE_CTTY | O_NDELAY | O_NOATIME - | O_NONBLOCK | O_NOCTTY | O_NOFOLLOW | O_NOLINK | O_NOLINKS | O_NOTRANS - | O_RSYNC | O_SYNC | O_TTY_INIT | O_BINARY | O_TEXT); + | O_NONBLOCK | O_NOCTTY | O_NOFOLLOW | O_NOLINK | O_NOLINKS | O_NOTRANS + | O_RSYNC | O_SYNC | O_TTY_INIT | O_BINARY | O_TEXT); /* Check that the various SEEK_* macros are defined. */ int sk[] = { SEEK_CUR, SEEK_END, SEEK_SET }; diff -Nru grep-3.1/gnulib-tests/test-fcntl-safer.c grep-3.3/gnulib-tests/test-fcntl-safer.c --- grep-3.1/gnulib-tests/test-fcntl-safer.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/gnulib-tests/test-fcntl-safer.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ /* Test of opening a file descriptor. - Copyright (C) 2007-2017 Free Software Foundation, Inc. + Copyright (C) 2007-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ /* Written by Bruno Haible , 2007. */ diff -Nru grep-3.1/gnulib-tests/test-fdopen.c grep-3.3/gnulib-tests/test-fdopen.c --- grep-3.1/gnulib-tests/test-fdopen.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/gnulib-tests/test-fdopen.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ /* Test opening a stream with a file descriptor. - Copyright (C) 2011-2017 Free Software Foundation, Inc. + Copyright (C) 2011-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ #include diff -Nru grep-3.1/gnulib-tests/test-fdopendir.c grep-3.3/gnulib-tests/test-fdopendir.c --- grep-3.1/gnulib-tests/test-fdopendir.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/gnulib-tests/test-fdopendir.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ /* Test opening a directory stream from a file descriptor. - Copyright (C) 2009-2017 Free Software Foundation, Inc. + Copyright (C) 2009-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ /* Written by Eric Blake , 2009. */ diff -Nru grep-3.1/gnulib-tests/test-fgetc.c grep-3.3/gnulib-tests/test-fgetc.c --- grep-3.1/gnulib-tests/test-fgetc.c 2017-05-14 01:09:51.000000000 +0000 +++ grep-3.3/gnulib-tests/test-fgetc.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ /* Test of fgetc() function. - Copyright (C) 2011-2017 Free Software Foundation, Inc. + Copyright (C) 2011-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program; if not, see . */ #include diff -Nru grep-3.1/gnulib-tests/test-float.c grep-3.3/gnulib-tests/test-float.c --- grep-3.1/gnulib-tests/test-float.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/gnulib-tests/test-float.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ /* Test of substitute. - Copyright (C) 2011-2017 Free Software Foundation, Inc. + Copyright (C) 2011-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ /* Written by Bruno Haible , 2011. */ diff -Nru grep-3.1/gnulib-tests/test-fnmatch.c grep-3.3/gnulib-tests/test-fnmatch.c --- grep-3.1/gnulib-tests/test-fnmatch.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/gnulib-tests/test-fnmatch.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ /* Test of fnmatch string matching function. - Copyright (C) 2009-2017 Free Software Foundation, Inc. + Copyright (C) 2009-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ /* Written by Simon Josefsson , 2009. */ diff -Nru grep-3.1/gnulib-tests/test-fnmatch-h.c grep-3.3/gnulib-tests/test-fnmatch-h.c --- grep-3.1/gnulib-tests/test-fnmatch-h.c 1970-01-01 00:00:00.000000000 +0000 +++ grep-3.3/gnulib-tests/test-fnmatch-h.c 2018-09-19 05:04:26.000000000 +0000 @@ -0,0 +1,31 @@ +/* Test of substitute. + Copyright (C) 2018 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 , 2018. */ + +#include + +#include + +/* Check that the various FNM_* macros are defined. */ +int ret = FNM_NOMATCH; +int options[] = { FNM_PATHNAME, FNM_PERIOD, FNM_NOESCAPE }; + +int +main (void) +{ + return 0; +} diff -Nru grep-3.1/gnulib-tests/test-fpending.c grep-3.3/gnulib-tests/test-fpending.c --- grep-3.1/gnulib-tests/test-fpending.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/gnulib-tests/test-fpending.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,6 +1,6 @@ /* Ensure that __fpending works. - Copyright (C) 2004, 2007-2017 Free Software Foundation, Inc. + Copyright (C) 2004, 2007-2018 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 @@ -13,7 +13,7 @@ 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 . + along with this program. If not, see . Written by Jim Meyering. */ diff -Nru grep-3.1/gnulib-tests/test-fputc.c grep-3.3/gnulib-tests/test-fputc.c --- grep-3.1/gnulib-tests/test-fputc.c 2017-05-14 01:09:51.000000000 +0000 +++ grep-3.3/gnulib-tests/test-fputc.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ /* Test of fputc() function. - Copyright (C) 2011-2017 Free Software Foundation, Inc. + Copyright (C) 2011-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program; if not, see . */ #include diff -Nru grep-3.1/gnulib-tests/test-fread.c grep-3.3/gnulib-tests/test-fread.c --- grep-3.1/gnulib-tests/test-fread.c 2017-05-14 01:09:51.000000000 +0000 +++ grep-3.3/gnulib-tests/test-fread.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ /* Test of fread() function. - Copyright (C) 2011-2017 Free Software Foundation, Inc. + Copyright (C) 2011-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program; if not, see . */ #include diff -Nru grep-3.1/gnulib-tests/test-fstatat.c grep-3.3/gnulib-tests/test-fstatat.c --- grep-3.1/gnulib-tests/test-fstatat.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/gnulib-tests/test-fstatat.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ /* Tests of fstatat. - Copyright (C) 2009-2017 Free Software Foundation, Inc. + Copyright (C) 2009-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ /* Written by Eric Blake , 2009. */ diff -Nru grep-3.1/gnulib-tests/test-fstat.c grep-3.3/gnulib-tests/test-fstat.c --- grep-3.1/gnulib-tests/test-fstat.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/gnulib-tests/test-fstat.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ /* Tests of fstat() function. - Copyright (C) 2011-2017 Free Software Foundation, Inc. + Copyright (C) 2011-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ #include diff -Nru grep-3.1/gnulib-tests/test-ftruncate.c grep-3.3/gnulib-tests/test-ftruncate.c --- grep-3.1/gnulib-tests/test-ftruncate.c 1970-01-01 00:00:00.000000000 +0000 +++ grep-3.3/gnulib-tests/test-ftruncate.c 2018-01-07 00:07:08.000000000 +0000 @@ -0,0 +1,60 @@ +/* Test truncating a file. + Copyright (C) 2011-2018 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 + +#include "signature.h" +SIGNATURE_CHECK (ftruncate, int, (int, off_t)); + +#include +#include + +#include "macros.h" + +int +main (int argc, char *argv[]) +{ + const char *filename = argv[1]; + + /* Test behaviour for invalid file descriptors. */ + { + errno = 0; + ASSERT (ftruncate (-1, 0) == -1); + ASSERT (errno == EBADF); + } + { + close (99); + errno = 0; + ASSERT (ftruncate (99, 0) == -1); + ASSERT (errno == EBADF); + } + + /* Test behaviour for read-only file descriptors. */ + { + int fd = open (filename, O_RDONLY); + ASSERT (fd >= 0); + errno = 0; + ASSERT (ftruncate (fd, 0) == -1); + ASSERT (errno == EBADF || errno == EINVAL + || errno == EACCES /* seen on mingw */ + ); + close (fd); + } + + return 0; +} diff -Nru grep-3.1/gnulib-tests/test-ftruncate.sh grep-3.3/gnulib-tests/test-ftruncate.sh --- grep-3.1/gnulib-tests/test-ftruncate.sh 1970-01-01 00:00:00.000000000 +0000 +++ grep-3.3/gnulib-tests/test-ftruncate.sh 2014-06-27 22:32:18.000000000 +0000 @@ -0,0 +1,3 @@ +#!/bin/sh + +exec ./test-ftruncate${EXEEXT} "$srcdir/test-ftruncate.sh" diff -Nru grep-3.1/gnulib-tests/test-fwrite.c grep-3.3/gnulib-tests/test-fwrite.c --- grep-3.1/gnulib-tests/test-fwrite.c 2017-05-14 01:09:51.000000000 +0000 +++ grep-3.3/gnulib-tests/test-fwrite.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ /* Test of fwrite() function. - Copyright (C) 2011-2017 Free Software Foundation, Inc. + Copyright (C) 2011-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program; if not, see . */ #include diff -Nru grep-3.1/gnulib-tests/test-getcwd-lgpl.c grep-3.3/gnulib-tests/test-getcwd-lgpl.c --- grep-3.1/gnulib-tests/test-getcwd-lgpl.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/gnulib-tests/test-getcwd-lgpl.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ /* Test of getcwd() function. - Copyright (C) 2009-2017 Free Software Foundation, Inc. + Copyright (C) 2009-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ #include diff -Nru grep-3.1/gnulib-tests/test-getdtablesize.c grep-3.3/gnulib-tests/test-getdtablesize.c --- grep-3.1/gnulib-tests/test-getdtablesize.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/gnulib-tests/test-getdtablesize.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ /* Test of getdtablesize() function. - Copyright (C) 2008-2017 Free Software Foundation, Inc. + Copyright (C) 2008-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ /* Written by Bruno Haible , 2008. */ diff -Nru grep-3.1/gnulib-tests/test-getopt-gnu.c grep-3.3/gnulib-tests/test-getopt-gnu.c --- grep-3.1/gnulib-tests/test-getopt-gnu.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/gnulib-tests/test-getopt-gnu.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ /* Test of command line argument processing. - Copyright (C) 2009-2017 Free Software Foundation, Inc. + Copyright (C) 2009-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ /* Written by Bruno Haible , 2009. */ diff -Nru grep-3.1/gnulib-tests/test-getopt.h grep-3.3/gnulib-tests/test-getopt.h --- grep-3.1/gnulib-tests/test-getopt.h 2017-05-21 00:31:28.000000000 +0000 +++ grep-3.3/gnulib-tests/test-getopt.h 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ /* Test of command line argument processing. - Copyright (C) 2009-2017 Free Software Foundation, Inc. + Copyright (C) 2009-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ /* Written by Bruno Haible , 2009. */ @@ -1367,7 +1367,7 @@ } /* Check that 'W' does not dump core: - http://sourceware.org/bugzilla/show_bug.cgi?id=12922 + https://sourceware.org/bugzilla/show_bug.cgi?id=12922 Technically, POSIX says the presence of ';' in the opt-string gives unspecified behavior, so we only test this when GNU compliance is desired. */ diff -Nru grep-3.1/gnulib-tests/test-getopt_long.h grep-3.3/gnulib-tests/test-getopt_long.h --- grep-3.1/gnulib-tests/test-getopt_long.h 2017-05-21 00:31:28.000000000 +0000 +++ grep-3.3/gnulib-tests/test-getopt_long.h 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ /* Test of command line argument processing. - Copyright (C) 2009-2017 Free Software Foundation, Inc. + Copyright (C) 2009-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ /* Written by Bruno Haible , 2009. */ @@ -315,7 +315,7 @@ } /* Test that 'W' does not dump core: - http://sourceware.org/bugzilla/show_bug.cgi?id=12922 */ + https://sourceware.org/bugzilla/show_bug.cgi?id=12922 */ { int argc = 0; const char *argv[10]; @@ -1815,7 +1815,7 @@ /* Test behavior of getopt_long when POSIXLY_CORRECT is set in the environment. Options with optional arguments should not change behavior just because of an environment variable. - http://lists.gnu.org/archive/html/bug-m4/2006-09/msg00028.html */ + https://lists.gnu.org/r/bug-m4/2006-09/msg00028.html */ static void test_getopt_long_posix (void) { diff -Nru grep-3.1/gnulib-tests/test-getopt-main.h grep-3.3/gnulib-tests/test-getopt-main.h --- grep-3.1/gnulib-tests/test-getopt-main.h 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/gnulib-tests/test-getopt-main.h 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ /* Test of command line argument processing. - Copyright (C) 2009-2017 Free Software Foundation, Inc. + Copyright (C) 2009-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ /* Written by Bruno Haible , 2009. */ diff -Nru grep-3.1/gnulib-tests/test-getopt-posix.c grep-3.3/gnulib-tests/test-getopt-posix.c --- grep-3.1/gnulib-tests/test-getopt-posix.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/gnulib-tests/test-getopt-posix.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ /* Test of command line argument processing. - Copyright (C) 2009-2017 Free Software Foundation, Inc. + Copyright (C) 2009-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ /* Written by Bruno Haible , 2009. */ diff -Nru grep-3.1/gnulib-tests/test-getprogname.c grep-3.3/gnulib-tests/test-getprogname.c --- grep-3.1/gnulib-tests/test-getprogname.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/gnulib-tests/test-getprogname.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ /* Test the gnulib getprogname module. - Copyright (C) 2016-2017 Free Software Foundation, Inc. + Copyright (C) 2016-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ #include diff -Nru grep-3.1/gnulib-tests/test-gettimeofday.c grep-3.3/gnulib-tests/test-gettimeofday.c --- grep-3.1/gnulib-tests/test-gettimeofday.c 1970-01-01 00:00:00.000000000 +0000 +++ grep-3.3/gnulib-tests/test-gettimeofday.c 2018-01-07 00:07:08.000000000 +0000 @@ -0,0 +1,47 @@ +/* + * Copyright (C) 2005, 2007, 2009-2018 Free Software Foundation, Inc. + * Written by Jim Meyering. + * + * 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 + +#include "signature.h" +SIGNATURE_CHECK (gettimeofday, int, + (struct timeval *, GETTIMEOFDAY_TIMEZONE *)); + +#include + +#include +#include + +int +main (void) +{ + time_t t = 0; + struct tm *lt; + struct tm saved_lt; + struct timeval tv; + lt = localtime (&t); + saved_lt = *lt; + gettimeofday (&tv, NULL); + if (memcmp (lt, &saved_lt, sizeof (struct tm)) != 0) + { + fprintf (stderr, "gettimeofday still clobbers the localtime buffer!\n"); + return 1; + } + return 0; +} diff -Nru grep-3.1/gnulib-tests/test-hash.c grep-3.3/gnulib-tests/test-hash.c --- grep-3.1/gnulib-tests/test-hash.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/gnulib-tests/test-hash.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2009-2017 Free Software Foundation, Inc. + * Copyright (C) 2009-2018 Free Software Foundation, Inc. * Written by Jim Meyering * * This program is free software: you can redistribute it and/or modify @@ -13,7 +13,7 @@ * 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 . */ + * along with this program. If not, see . */ #include diff -Nru grep-3.1/gnulib-tests/test-iconv.c grep-3.3/gnulib-tests/test-iconv.c --- grep-3.1/gnulib-tests/test-iconv.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/gnulib-tests/test-iconv.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ /* Test of character set conversion. - Copyright (C) 2007-2017 Free Software Foundation, Inc. + Copyright (C) 2007-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ /* Written by Bruno Haible , 2007. */ diff -Nru grep-3.1/gnulib-tests/test-iconv-h.c grep-3.3/gnulib-tests/test-iconv-h.c --- grep-3.1/gnulib-tests/test-iconv-h.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/gnulib-tests/test-iconv-h.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ /* Test of substitute. - Copyright (C) 2007-2017 Free Software Foundation, Inc. + Copyright (C) 2007-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ #include diff -Nru grep-3.1/gnulib-tests/test-ignore-value.c grep-3.3/gnulib-tests/test-ignore-value.c --- grep-3.1/gnulib-tests/test-ignore-value.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/gnulib-tests/test-ignore-value.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,6 +1,6 @@ /* Test the "ignore-value" module. - Copyright (C) 2011-2017 Free Software Foundation, Inc. + Copyright (C) 2011-2018 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 @@ -13,7 +13,7 @@ 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 . */ + along with this program. If not, see . */ /* Written by Eric Blake. */ diff -Nru grep-3.1/gnulib-tests/test-inet_pton.c grep-3.3/gnulib-tests/test-inet_pton.c --- grep-3.1/gnulib-tests/test-inet_pton.c 1970-01-01 00:00:00.000000000 +0000 +++ grep-3.3/gnulib-tests/test-inet_pton.c 2018-01-07 00:07:08.000000000 +0000 @@ -0,0 +1,58 @@ +/* Test of inet_pton function. + Copyright (C) 2009-2018 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 , 2009. */ + +#include + +#include + +#include "signature.h" +SIGNATURE_CHECK (inet_pton, int, (int, const char *, void *)); + +#include +#include + +#include "macros.h" + +int +main (void) +{ +#if defined AF_INET /* HAVE_IPV4 */ + { + /* This machine was for a long time known as + ma2s2.mathematik.uni-karlsruhe.de. */ + const char printable[] = "129.13.115.2"; + struct in_addr internal; + int ret; + + ret = inet_pton (AF_INET, printable, &internal); + ASSERT (ret == 1); + /* Verify that internal is filled in network byte order. */ + ASSERT (((unsigned char *) &internal)[0] == 0x81); + ASSERT (((unsigned char *) &internal)[1] == 0x0D); + ASSERT (((unsigned char *) &internal)[2] == 0x73); + ASSERT (((unsigned char *) &internal)[3] == 0x02); +# ifdef WORDS_BIGENDIAN + ASSERT (internal.s_addr == 0x810D7302); +# else + ASSERT (internal.s_addr == 0x02730D81); +# endif + } +#endif + + return 0; +} diff -Nru grep-3.1/gnulib-tests/test-init.sh grep-3.3/gnulib-tests/test-init.sh --- grep-3.1/gnulib-tests/test-init.sh 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/gnulib-tests/test-init.sh 2018-01-07 00:07:08.000000000 +0000 @@ -1,6 +1,6 @@ #!/bin/sh # Unit tests for init.sh -# Copyright (C) 2011-2017 Free Software Foundation, Inc. +# Copyright (C) 2011-2018 Free Software Foundation, Inc. # This file is part of the GNUlib Library. # # This program is free software: you can redistribute it and/or modify @@ -14,7 +14,7 @@ # 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 . */ +# along with this program. If not, see . */ : ${srcdir=.} . "$srcdir/init.sh"; path_prepend_ . diff -Nru grep-3.1/gnulib-tests/test-intprops.c grep-3.3/gnulib-tests/test-intprops.c --- grep-3.1/gnulib-tests/test-intprops.c 2017-05-14 01:09:51.000000000 +0000 +++ grep-3.3/gnulib-tests/test-intprops.c 2018-09-19 05:04:26.000000000 +0000 @@ -1,5 +1,5 @@ /* Test intprops.h. - Copyright (C) 2011-2017 Free Software Foundation, Inc. + Copyright (C) 2011-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ /* Written by Paul Eggert. */ @@ -39,13 +39,17 @@ #include "macros.h" +/* Compile-time verification of expression X. + In this file, we need it as a statement, rather than as a declaration. */ +#define verify_stmt(x) do { verify (x); } while (0) + /* VERIFY (X) uses a static assertion for compilers that are known to work, and falls back on a dynamic assertion for other compilers. These tests should be checkable via 'verify' rather than 'ASSERT', but using 'verify' would run into a bug with HP-UX 11.23 cc; see - . */ + . */ #if __GNUC__ || __SUNPRO_C -# define VERIFY(x) do { verify (x); } while (0) +# define VERIFY(x) verify_stmt (x) #else # define VERIFY(x) ASSERT (x) #endif @@ -114,8 +118,10 @@ VERIFY (TYPE_MINIMUM (unsigned long int) == 0); VERIFY (TYPE_MAXIMUM (unsigned long int) == ULONG_MAX); #ifdef LLONG_MAX - verify (TYPE_MINIMUM (long long int) == LLONG_MIN); - verify (TYPE_MAXIMUM (long long int) == LLONG_MAX); + verify_stmt (TYPE_MINIMUM (long long int) == LLONG_MIN); + verify_stmt (TYPE_MAXIMUM (long long int) == LLONG_MAX); + verify_stmt (TYPE_MINIMUM (unsigned long long int) == 0); + verify_stmt (TYPE_MAXIMUM (unsigned long long int) == ULLONG_MAX); #endif VERIFY (TYPE_MINIMUM (intmax_t) == INTMAX_MIN); VERIFY (TYPE_MAXIMUM (intmax_t) == INTMAX_MAX); @@ -124,18 +130,18 @@ /* TYPE_WIDTH. */ #ifdef CHAR_WIDTH - verify (TYPE_WIDTH (char) == CHAR_WIDTH); - verify (TYPE_WIDTH (signed char) == SCHAR_WIDTH); - verify (TYPE_WIDTH (unsigned char) == UCHAR_WIDTH); - verify (TYPE_WIDTH (short int) == SHRT_WIDTH); - verify (TYPE_WIDTH (unsigned short int) == USHRT_WIDTH); - verify (TYPE_WIDTH (int) == INT_WIDTH); - verify (TYPE_WIDTH (unsigned int) == UINT_WIDTH); - verify (TYPE_WIDTH (long int) == LONG_WIDTH); - verify (TYPE_WIDTH (unsigned long int) == ULONG_WIDTH); + verify_stmt (TYPE_WIDTH (char) == CHAR_WIDTH); + verify_stmt (TYPE_WIDTH (signed char) == SCHAR_WIDTH); + verify_stmt (TYPE_WIDTH (unsigned char) == UCHAR_WIDTH); + verify_stmt (TYPE_WIDTH (short int) == SHRT_WIDTH); + verify_stmt (TYPE_WIDTH (unsigned short int) == USHRT_WIDTH); + verify_stmt (TYPE_WIDTH (int) == INT_WIDTH); + verify_stmt (TYPE_WIDTH (unsigned int) == UINT_WIDTH); + verify_stmt (TYPE_WIDTH (long int) == LONG_WIDTH); + verify_stmt (TYPE_WIDTH (unsigned long int) == ULONG_WIDTH); #ifdef LLONG_WIDTH - verify (TYPE_WIDTH (long long int) == LLONG_WIDTH); - verify (TYPE_WIDTH (unsigned long long int) == ULLONG_WIDTH); + verify_stmt (TYPE_WIDTH (long long int) == LLONG_WIDTH); + verify_stmt (TYPE_WIDTH (unsigned long long int) == ULLONG_WIDTH); #endif #endif diff -Nru grep-3.1/gnulib-tests/test-inttostr.c grep-3.3/gnulib-tests/test-inttostr.c --- grep-3.1/gnulib-tests/test-inttostr.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/gnulib-tests/test-inttostr.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ /* Test inttostr functions, and incidentally, INT_BUFSIZE_BOUND - Copyright (C) 2010-2017 Free Software Foundation, Inc. + Copyright (C) 2010-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ /* Written by Jim Meyering. */ diff -Nru grep-3.1/gnulib-tests/test-inttypes.c grep-3.3/gnulib-tests/test-inttypes.c --- grep-3.1/gnulib-tests/test-inttypes.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/gnulib-tests/test-inttypes.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ /* Test of substitute. - Copyright (C) 2006-2007, 2009-2017 Free Software Foundation, Inc. + Copyright (C) 2006-2007, 2009-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ /* Written by Bruno Haible , 2007. */ diff -Nru grep-3.1/gnulib-tests/test-ioctl.c grep-3.3/gnulib-tests/test-ioctl.c --- grep-3.1/gnulib-tests/test-ioctl.c 1970-01-01 00:00:00.000000000 +0000 +++ grep-3.3/gnulib-tests/test-ioctl.c 2018-01-07 00:07:08.000000000 +0000 @@ -0,0 +1,51 @@ +/* Test of ioctl() function. + Copyright (C) 2011-2018 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 + +#include "signature.h" +SIGNATURE_CHECK (ioctl, int, (int, int, ...)); + +#include +#include + +#include "macros.h" + +int +main (void) +{ +#ifdef FIONREAD + /* Test behaviour for invalid file descriptors. */ + { + int value; + errno = 0; + ASSERT (ioctl (-1, FIONREAD, &value) == -1); + ASSERT (errno == EBADF); + } + { + int value; + close (99); + errno = 0; + ASSERT (ioctl (99, FIONREAD, &value) == -1); + ASSERT (errno == EBADF); + } +#endif + + return 0; +} diff -Nru grep-3.1/gnulib-tests/test-i-ring.c grep-3.3/gnulib-tests/test-i-ring.c --- grep-3.1/gnulib-tests/test-i-ring.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/gnulib-tests/test-i-ring.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ /* Test the simple ring buffer. - Copyright (C) 2006-2017 Free Software Foundation, Inc. + Copyright (C) 2006-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ /* written by Jim Meyering */ diff -Nru grep-3.1/gnulib-tests/test-isatty.c grep-3.3/gnulib-tests/test-isatty.c --- grep-3.1/gnulib-tests/test-isatty.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/gnulib-tests/test-isatty.c 2018-06-24 23:16:49.000000000 +0000 @@ -1,5 +1,5 @@ /* Test isatty() function. - Copyright (C) 2011-2017 Free Software Foundation, Inc. + Copyright (C) 2011-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ #include @@ -27,7 +27,7 @@ #include "macros.h" /* The name of the "always silent" device. */ -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +#if defined _WIN32 && ! defined __CYGWIN__ /* Native Windows API. */ # define DEV_NULL "NUL" #else diff -Nru grep-3.1/gnulib-tests/test-isblank.c grep-3.3/gnulib-tests/test-isblank.c --- grep-3.1/gnulib-tests/test-isblank.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/gnulib-tests/test-isblank.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ /* Test of isblank() function. - Copyright (C) 2009-2017 Free Software Foundation, Inc. + Copyright (C) 2009-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ /* Written by Bruno Haible , 2009. */ diff -Nru grep-3.1/gnulib-tests/test-iswblank.c grep-3.3/gnulib-tests/test-iswblank.c --- grep-3.1/gnulib-tests/test-iswblank.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/gnulib-tests/test-iswblank.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ /* Test of iswblank() function. - Copyright (C) 2007-2017 Free Software Foundation, Inc. + Copyright (C) 2007-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ #include diff -Nru grep-3.1/gnulib-tests/test-langinfo.c grep-3.3/gnulib-tests/test-langinfo.c --- grep-3.1/gnulib-tests/test-langinfo.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/gnulib-tests/test-langinfo.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ /* Test of substitute. - Copyright (C) 2009-2017 Free Software Foundation, Inc. + Copyright (C) 2009-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ /* Written by Bruno Haible , 2009. */ diff -Nru grep-3.1/gnulib-tests/test-limits-h.c grep-3.3/gnulib-tests/test-limits-h.c --- grep-3.1/gnulib-tests/test-limits-h.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/gnulib-tests/test-limits-h.c 2018-09-19 05:04:26.000000000 +0000 @@ -1,5 +1,5 @@ /* Test of substitute. - Copyright 2016-2017 Free Software Foundation, Inc. + Copyright 2016-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ /* Written by Paul Eggert. */ @@ -26,11 +26,78 @@ # pragma GCC diagnostic ignored "-Woverlength-strings" #endif -/* Macros specified by ISO/IEC TS 18661-1:2014. */ - #define verify_width(width, min, max) \ verify ((max) >> ((width) - 1 - ((min) < 0)) == 1) +/* Macros borrowed from intprops.h. */ +#define TYPE_SIGNED(t) (! ((t) 0 < (t) -1)) +#define TYPE_WIDTH(t) (sizeof (t) * CHAR_BIT) +#define TYPE_MINIMUM(t) ((t) ~ TYPE_MAXIMUM (t)) +#define TYPE_MAXIMUM(t) \ + ((t) (! TYPE_SIGNED (t) \ + ? (t) -1 \ + : ((((t) 1 << (TYPE_WIDTH (t) - 2)) - 1) * 2 + 1))) + +/* Type width macros. */ + +int type_bits[] = + { + CHAR_BIT, + WORD_BIT, + LONG_BIT + }; +verify_width (CHAR_BIT, CHAR_MIN, CHAR_MAX); +verify_width (WORD_BIT, INT_MIN, INT_MAX); +verify_width (LONG_BIT, LONG_MIN, LONG_MAX); + +/* Numerical limit macros. */ + +char limits1[] = { CHAR_MIN, CHAR_MAX }; +verify (TYPE_MINIMUM (char) == CHAR_MIN); +verify (TYPE_MAXIMUM (char) == CHAR_MAX); + +signed char limits2[] = { SCHAR_MIN, SCHAR_MAX }; +verify (TYPE_MINIMUM (signed char) == SCHAR_MIN); +verify (TYPE_MAXIMUM (signed char) == SCHAR_MAX); + +unsigned char limits3[] = { UCHAR_MAX }; +verify (TYPE_MINIMUM (unsigned char) == 0); +verify (TYPE_MAXIMUM (unsigned char) == UCHAR_MAX); + +short limits4[] = { SHRT_MIN, SHRT_MAX }; +verify (TYPE_MINIMUM (short int) == SHRT_MIN); +verify (TYPE_MAXIMUM (short int) == SHRT_MAX); + +unsigned short limits5[] = { USHRT_MAX }; +verify (TYPE_MINIMUM (unsigned short int) == 0); +verify (TYPE_MAXIMUM (unsigned short int) == USHRT_MAX); + +int limits6[] = { INT_MIN, INT_MAX }; +verify (TYPE_MINIMUM (int) == INT_MIN); +verify (TYPE_MAXIMUM (int) == INT_MAX); + +unsigned int limits7[] = { UINT_MAX }; +verify (TYPE_MINIMUM (unsigned int) == 0); +verify (TYPE_MAXIMUM (unsigned int) == UINT_MAX); + +long limits8[] = { LONG_MIN, LONG_MAX }; +verify (TYPE_MINIMUM (long int) == LONG_MIN); +verify (TYPE_MAXIMUM (long int) == LONG_MAX); + +unsigned long limits9[] = { ULONG_MAX }; +verify (TYPE_MINIMUM (unsigned long int) == 0); +verify (TYPE_MAXIMUM (unsigned long int) == ULONG_MAX); + +long long limits10[] = { LLONG_MIN, LLONG_MAX }; +verify (TYPE_MINIMUM (long long int) == LLONG_MIN); +verify (TYPE_MAXIMUM (long long int) == LLONG_MAX); + +unsigned long long limits11[] = { ULLONG_MAX }; +verify (TYPE_MINIMUM (unsigned long long int) == 0); +verify (TYPE_MAXIMUM (unsigned long long int) == ULLONG_MAX); + +/* Macros specified by ISO/IEC TS 18661-1:2014. */ + verify_width (CHAR_WIDTH, CHAR_MIN, CHAR_MAX); verify_width (SCHAR_WIDTH, SCHAR_MIN, SCHAR_MAX); verify_width (UCHAR_WIDTH, 0, UCHAR_MAX); diff -Nru grep-3.1/gnulib-tests/test-listen.c grep-3.3/gnulib-tests/test-listen.c --- grep-3.1/gnulib-tests/test-listen.c 1970-01-01 00:00:00.000000000 +0000 +++ grep-3.3/gnulib-tests/test-listen.c 2018-01-07 00:07:08.000000000 +0000 @@ -0,0 +1,49 @@ +/* Test listen() function. + Copyright (C) 2011-2018 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 + +#include "signature.h" +SIGNATURE_CHECK (listen, int, (int, int)); + +#include +#include + +#include "sockets.h" +#include "macros.h" + +int +main (void) +{ + (void) gl_sockets_startup (SOCKETS_1_1); + + /* Test behaviour for invalid file descriptors. */ + { + errno = 0; + ASSERT (listen (-1, 1) == -1); + ASSERT (errno == EBADF); + } + { + close (99); + errno = 0; + ASSERT (listen (99 ,1) == -1); + ASSERT (errno == EBADF); + } + + return 0; +} diff -Nru grep-3.1/gnulib-tests/test-localcharset.c grep-3.3/gnulib-tests/test-localcharset.c --- grep-3.1/gnulib-tests/test-localcharset.c 1970-01-01 00:00:00.000000000 +0000 +++ grep-3.3/gnulib-tests/test-localcharset.c 2018-09-19 05:04:26.000000000 +0000 @@ -0,0 +1,39 @@ +/* Manual test of localcharset() function. + Copyright (C) 2018 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 . */ + +/* This program prints the result of locale_charset in the current locale. + One way to use it is: + $ for l in `locale -a`; do + echo -n "$l "; LANG=$l ./test-localcharset; + done \ + | sort -k 2 + */ + +#include + +#include "localcharset.h" + +#include +#include + +int +main (void) +{ + setlocale (LC_ALL, ""); + printf ("%s\n", locale_charset ()); + + return 0; +} diff -Nru grep-3.1/gnulib-tests/test-locale.c grep-3.3/gnulib-tests/test-locale.c --- grep-3.1/gnulib-tests/test-locale.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/gnulib-tests/test-locale.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ /* Test of substitute. - Copyright (C) 2007, 2009-2017 Free Software Foundation, Inc. + Copyright (C) 2007, 2009-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ /* Written by Bruno Haible , 2007. */ diff -Nru grep-3.1/gnulib-tests/test-localeconv.c grep-3.3/gnulib-tests/test-localeconv.c --- grep-3.1/gnulib-tests/test-localeconv.c 2017-03-17 04:33:17.000000000 +0000 +++ grep-3.3/gnulib-tests/test-localeconv.c 2018-12-21 02:51:47.000000000 +0000 @@ -1,5 +1,5 @@ /* Test of localeconv() function. - Copyright (C) 2012-2017 Free Software Foundation, Inc. + Copyright (C) 2012-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ /* Written by Bruno Haible , 2012. */ @@ -37,13 +37,13 @@ ASSERT (STREQ (l->decimal_point, ".")); ASSERT (STREQ (l->thousands_sep, "")); -#if !((defined __FreeBSD__ || defined __DragonFly__) || defined __sun) +#if !((defined __FreeBSD__ || defined __DragonFly__) || defined __sun || defined __CYGWIN__) ASSERT (STREQ (l->grouping, "")); #endif ASSERT (STREQ (l->mon_decimal_point, "")); ASSERT (STREQ (l->mon_thousands_sep, "")); -#if !((defined __FreeBSD__ || defined __DragonFly__) || defined __sun) +#if !((defined __FreeBSD__ || defined __DragonFly__) || defined __sun || defined __CYGWIN__) ASSERT (STREQ (l->mon_grouping, "")); #endif ASSERT (STREQ (l->positive_sign, "")); diff -Nru grep-3.1/gnulib-tests/test-localename.c grep-3.3/gnulib-tests/test-localename.c --- grep-3.1/gnulib-tests/test-localename.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/gnulib-tests/test-localename.c 2018-12-21 03:31:37.000000000 +0000 @@ -1,5 +1,5 @@ /* Test of gl_locale_name function and its variants. - Copyright (C) 2007-2017 Free Software Foundation, Inc. + Copyright (C) 2007-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ /* Written by Bruno Haible , 2007. */ @@ -26,8 +26,12 @@ #include "macros.h" +#if HAVE_NEWLOCALE && HAVE_WORKING_USELOCALE && !HAVE_FAKE_LOCALES +# define HAVE_GOOD_USELOCALE 1 +#endif + -#if HAVE_NEWLOCALE && HAVE_USELOCALE +#if HAVE_GOOD_USELOCALE static struct { int cat; int mask; const char *string; } const categories[] = { @@ -63,6 +67,7 @@ static void test_locale_name (void) { + const char *ret; const char *name; /* Check that gl_locale_name returns non-NULL. */ @@ -70,7 +75,7 @@ /* Get into a defined state, */ setlocale (LC_ALL, "en_US.UTF-8"); -#if HAVE_NEWLOCALE && HAVE_USELOCALE +#if HAVE_GOOD_USELOCALE uselocale (LC_GLOBAL_LOCALE); #endif @@ -81,7 +86,21 @@ unsetenv ("LC_MESSAGES"); unsetenv ("LC_NUMERIC"); unsetenv ("LANG"); - setlocale (LC_ALL, ""); + /* Need also to unset all environment variables that specify standard or + non-standard locale categories. Otherwise, on glibc systems, when some + of these variables are set and reference a nonexistent locale, the + setlocale (LC_ALL, "") call below would fail. */ + unsetenv ("LC_COLLATE"); + unsetenv ("LC_MONETARY"); + unsetenv ("LC_TIME"); + unsetenv ("LC_ADDRESS"); + unsetenv ("LC_IDENTIFICATION"); + unsetenv ("LC_MEASUREMENT"); + unsetenv ("LC_NAME"); + unsetenv ("LC_PAPER"); + unsetenv ("LC_TELEPHONE"); + ret = setlocale (LC_ALL, ""); + ASSERT (ret != NULL); ASSERT (strcmp (gl_locale_name (LC_MESSAGES, "LC_MESSAGES"), gl_locale_name_default ()) == 0); ASSERT (strcmp (gl_locale_name (LC_NUMERIC, "LC_NUMERIC"), @@ -155,7 +174,16 @@ if (setlocale (LC_ALL, "") != NULL) { name = gl_locale_name (LC_CTYPE, "LC_CTYPE"); +#if defined _WIN32 && !defined __CYGWIN__ + /* On native Windows, here, + gl_locale_name_thread (LC_CTYPE, "LC_CTYPE") + returns NULL and + gl_locale_name_posix (LC_CTYPE, "LC_CTYPE") + returns either "de_DE" or "de_DE.UTF-8". */ + ASSERT (strcmp (name, "de_DE") == 0 || strcmp (name, "de_DE.UTF-8") == 0); +#else ASSERT (strcmp (name, "de_DE.UTF-8") == 0); +#endif name = gl_locale_name (LC_MESSAGES, "LC_MESSAGES"); ASSERT (strcmp (name, "fr_FR.UTF-8") == 0); } @@ -172,7 +200,7 @@ ASSERT (strcmp (name, "fr_FR.UTF-8") == 0); } -#if HAVE_NEWLOCALE && HAVE_USELOCALE +#if HAVE_GOOD_USELOCALE /* Check that gl_locale_name considers the thread locale. */ { locale_t locale = newlocale (LC_ALL_MASK, "fr_FR.UTF-8", NULL); @@ -232,7 +260,7 @@ /* Get into a defined state, */ setlocale (LC_ALL, "en_US.UTF-8"); -#if HAVE_NEWLOCALE && HAVE_USELOCALE +#if HAVE_GOOD_USELOCALE /* Check that gl_locale_name_thread returns NULL when no thread locale is set. */ uselocale (LC_GLOBAL_LOCALE); @@ -483,11 +511,12 @@ static void test_locale_name_posix (void) { + const char *ret; const char *name; /* Get into a defined state, */ setlocale (LC_ALL, "en_US.UTF-8"); -#if HAVE_NEWLOCALE && HAVE_USELOCALE +#if HAVE_GOOD_USELOCALE uselocale (LC_GLOBAL_LOCALE); #endif @@ -498,7 +527,21 @@ unsetenv ("LC_MESSAGES"); unsetenv ("LC_NUMERIC"); unsetenv ("LANG"); - setlocale (LC_ALL, ""); + /* Need also to unset all environment variables that specify standard or + non-standard locale categories. Otherwise, on glibc systems, when some + of these variables are set and reference a nonexistent locale, the + setlocale (LC_ALL, "") call below would fail. */ + unsetenv ("LC_COLLATE"); + unsetenv ("LC_MONETARY"); + unsetenv ("LC_TIME"); + unsetenv ("LC_ADDRESS"); + unsetenv ("LC_IDENTIFICATION"); + unsetenv ("LC_MEASUREMENT"); + unsetenv ("LC_NAME"); + unsetenv ("LC_PAPER"); + unsetenv ("LC_TELEPHONE"); + ret = setlocale (LC_ALL, ""); + ASSERT (ret != NULL); name = gl_locale_name_posix (LC_MESSAGES, "LC_MESSAGES"); ASSERT (name == NULL || strcmp (name, gl_locale_name_default ()) == 0); name = gl_locale_name_posix (LC_NUMERIC, "LC_NUMERIC"); @@ -575,7 +618,11 @@ if (setlocale (LC_ALL, "") != NULL) { name = gl_locale_name_posix (LC_CTYPE, "LC_CTYPE"); +#if defined _WIN32 && !defined __CYGWIN__ + ASSERT (strcmp (name, "de_DE") == 0 || strcmp (name, "de_DE.UTF-8") == 0); +#else ASSERT (strcmp (name, "de_DE.UTF-8") == 0); +#endif name = gl_locale_name_posix (LC_MESSAGES, "LC_MESSAGES"); ASSERT (strcmp (name, "fr_FR.UTF-8") == 0); } @@ -592,7 +639,7 @@ ASSERT (strcmp (name, "fr_FR.UTF-8") == 0); } -#if HAVE_NEWLOCALE && HAVE_USELOCALE +#if HAVE_GOOD_USELOCALE /* Check that gl_locale_name_posix ignores the thread locale. */ { locale_t locale = newlocale (LC_ALL_MASK, "fr_FR.UTF-8", NULL); @@ -621,7 +668,7 @@ /* Get into a defined state, */ setlocale (LC_ALL, "en_US.UTF-8"); -#if HAVE_NEWLOCALE && HAVE_USELOCALE +#if HAVE_GOOD_USELOCALE uselocale (LC_GLOBAL_LOCALE); #endif @@ -706,7 +753,7 @@ name = gl_locale_name_environ (LC_MESSAGES, "LC_MESSAGES"); ASSERT (strcmp (name, "fr_FR.UTF-8") == 0); -#if HAVE_NEWLOCALE && HAVE_USELOCALE +#if HAVE_GOOD_USELOCALE /* Check that gl_locale_name_environ ignores the thread locale. */ { locale_t locale = newlocale (LC_ALL_MASK, "fr_FR.UTF-8", NULL); @@ -737,11 +784,11 @@ /* Only Mac OS X and Windows have a facility for the user to set the default locale. */ -#if !((defined __APPLE__ && defined __MACH__) || (defined _WIN32 || defined __WIN32__ || defined __CYGWIN__)) +#if !((defined __APPLE__ && defined __MACH__) || (defined _WIN32 || defined __CYGWIN__)) ASSERT (strcmp (name, "C") == 0); #endif -#if HAVE_NEWLOCALE && HAVE_USELOCALE +#if HAVE_GOOD_USELOCALE /* Check that gl_locale_name_default ignores the thread locale. */ { locale_t locale = newlocale (LC_ALL_MASK, "fr_FR.UTF-8", NULL); diff -Nru grep-3.1/gnulib-tests/test-lseek.c grep-3.3/gnulib-tests/test-lseek.c --- grep-3.1/gnulib-tests/test-lseek.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/gnulib-tests/test-lseek.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ /* Test of lseek() function. - Copyright (C) 2007-2017 Free Software Foundation, Inc. + Copyright (C) 2007-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ /* Written by Eric Blake, 2007. */ diff -Nru grep-3.1/gnulib-tests/test-lstat.c grep-3.3/gnulib-tests/test-lstat.c --- grep-3.1/gnulib-tests/test-lstat.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/gnulib-tests/test-lstat.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ /* Test of lstat() function. - Copyright (C) 2008-2017 Free Software Foundation, Inc. + Copyright (C) 2008-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ /* Written by Simon Josefsson, 2008; and Eric Blake, 2009. */ diff -Nru grep-3.1/gnulib-tests/test-lstat.h grep-3.3/gnulib-tests/test-lstat.h --- grep-3.1/gnulib-tests/test-lstat.h 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/gnulib-tests/test-lstat.h 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ /* Test of lstat() function. - Copyright (C) 2008-2017 Free Software Foundation, Inc. + Copyright (C) 2008-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ /* Written by Simon Josefsson, 2008; and Eric Blake, 2009. */ diff -Nru grep-3.1/gnulib-tests/test-malloca.c grep-3.3/gnulib-tests/test-malloca.c --- grep-3.1/gnulib-tests/test-malloca.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/gnulib-tests/test-malloca.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ /* Test of safe automatic memory allocation. - Copyright (C) 2005, 2007, 2009-2017 Free Software Foundation, Inc. + Copyright (C) 2005, 2007, 2009-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ /* Written by Bruno Haible , 2005. */ diff -Nru grep-3.1/gnulib-tests/test-malloc-gnu.c grep-3.3/gnulib-tests/test-malloc-gnu.c --- grep-3.1/gnulib-tests/test-malloc-gnu.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/gnulib-tests/test-malloc-gnu.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ /* Test of malloc function. - Copyright (C) 2010-2017 Free Software Foundation, Inc. + Copyright (C) 2010-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ #include diff -Nru grep-3.1/gnulib-tests/test-mbscasecmp.c grep-3.3/gnulib-tests/test-mbscasecmp.c --- grep-3.1/gnulib-tests/test-mbscasecmp.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/gnulib-tests/test-mbscasecmp.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ /* Test of case-insensitive string comparison function. - Copyright (C) 2007-2017 Free Software Foundation, Inc. + Copyright (C) 2007-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ /* Written by Bruno Haible , 2007. */ diff -Nru grep-3.1/gnulib-tests/test-mbsinit.c grep-3.3/gnulib-tests/test-mbsinit.c --- grep-3.1/gnulib-tests/test-mbsinit.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/gnulib-tests/test-mbsinit.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ /* Test of test for initial conversion state. - Copyright (C) 2008-2017 Free Software Foundation, Inc. + Copyright (C) 2008-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ /* Written by Bruno Haible , 2008. */ diff -Nru grep-3.1/gnulib-tests/test-mbsrtowcs.c grep-3.3/gnulib-tests/test-mbsrtowcs.c --- grep-3.1/gnulib-tests/test-mbsrtowcs.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/gnulib-tests/test-mbsrtowcs.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ /* Test of conversion of string to wide string. - Copyright (C) 2008-2017 Free Software Foundation, Inc. + Copyright (C) 2008-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ /* Written by Bruno Haible , 2008. */ diff -Nru grep-3.1/gnulib-tests/test-mbsstr1.c grep-3.3/gnulib-tests/test-mbsstr1.c --- grep-3.1/gnulib-tests/test-mbsstr1.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/gnulib-tests/test-mbsstr1.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ /* Test of searching in a string. - Copyright (C) 2007-2017 Free Software Foundation, Inc. + Copyright (C) 2007-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ /* Written by Bruno Haible , 2007. */ diff -Nru grep-3.1/gnulib-tests/test-mbsstr2.c grep-3.3/gnulib-tests/test-mbsstr2.c --- grep-3.1/gnulib-tests/test-mbsstr2.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/gnulib-tests/test-mbsstr2.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ /* Test of searching in a string. - Copyright (C) 2007-2017 Free Software Foundation, Inc. + Copyright (C) 2007-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ /* Written by Bruno Haible , 2007. */ diff -Nru grep-3.1/gnulib-tests/test-mbsstr3.c grep-3.3/gnulib-tests/test-mbsstr3.c --- grep-3.1/gnulib-tests/test-mbsstr3.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/gnulib-tests/test-mbsstr3.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ /* Test of searching in a string. - Copyright (C) 2007-2017 Free Software Foundation, Inc. + Copyright (C) 2007-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ /* Written by Bruno Haible , 2007. */ diff -Nru grep-3.1/gnulib-tests/test-memchr2.c grep-3.3/gnulib-tests/test-memchr2.c --- grep-3.1/gnulib-tests/test-memchr2.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/gnulib-tests/test-memchr2.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2017 Free Software Foundation, Inc. + * Copyright (C) 2008-2018 Free Software Foundation, Inc. * Written by Eric Blake * * This program is free software: you can redistribute it and/or modify @@ -13,7 +13,7 @@ * 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 . */ + * along with this program. If not, see . */ #include diff -Nru grep-3.1/gnulib-tests/test-memchr.c grep-3.3/gnulib-tests/test-memchr.c --- grep-3.1/gnulib-tests/test-memchr.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/gnulib-tests/test-memchr.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2017 Free Software Foundation, Inc. + * Copyright (C) 2008-2018 Free Software Foundation, Inc. * Written by Eric Blake and Bruno Haible * * This program is free software: you can redistribute it and/or modify @@ -13,7 +13,7 @@ * 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 . */ + * along with this program. If not, see . */ #include diff -Nru grep-3.1/gnulib-tests/test-memrchr.c grep-3.3/gnulib-tests/test-memrchr.c --- grep-3.1/gnulib-tests/test-memrchr.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/gnulib-tests/test-memrchr.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2017 Free Software Foundation, Inc. + * Copyright (C) 2008-2018 Free Software Foundation, Inc. * Written by Eric Blake and Bruno Haible * * This program is free software: you can redistribute it and/or modify @@ -13,7 +13,7 @@ * 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 . */ + * along with this program. If not, see . */ #include diff -Nru grep-3.1/gnulib-tests/test-nanosleep.c grep-3.3/gnulib-tests/test-nanosleep.c --- grep-3.1/gnulib-tests/test-nanosleep.c 1970-01-01 00:00:00.000000000 +0000 +++ grep-3.3/gnulib-tests/test-nanosleep.c 2018-01-07 00:07:08.000000000 +0000 @@ -0,0 +1,83 @@ +/* Test of nanosleep() function. + Copyright (C) 2009-2018 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 Eric Blake , 2009. */ + +#include + +#include + +#include "signature.h" +SIGNATURE_CHECK (nanosleep, int, (struct timespec const *, struct timespec *)); + +#include +#include +#include + +#include "macros.h" + +#if HAVE_DECL_ALARM +static void +handle_alarm (int sig) +{ + if (sig != SIGALRM) + _exit (1); +} +#endif + +int +main (void) +{ + struct timespec ts; + + ts.tv_sec = 1000; + ts.tv_nsec = -1; + errno = 0; + ASSERT (nanosleep (&ts, NULL) == -1); + ASSERT (errno == EINVAL); + ts.tv_nsec = 1000000000; + errno = 0; + ASSERT (nanosleep (&ts, NULL) == -1); + ASSERT (errno == EINVAL); + + ts.tv_sec = 0; + ts.tv_nsec = 1; + ASSERT (nanosleep (&ts, &ts) == 0); + /* Remaining time is only defined on EINTR failure; but on success, + it is typically either 0 or unchanged from input. At any rate, + it shouldn't be randomly changed to unrelated values. */ + ASSERT (ts.tv_sec == 0); + ASSERT (ts.tv_nsec == 0 || ts.tv_nsec == 1); + ts.tv_nsec = 0; + ASSERT (nanosleep (&ts, NULL) == 0); + +#if HAVE_DECL_ALARM + { + const time_t pentecost = 50 * 24 * 60 * 60; /* 50 days. */ + signal (SIGALRM, handle_alarm); + alarm (1); + ts.tv_sec = pentecost; + ts.tv_nsec = 999999999; + errno = 0; + ASSERT (nanosleep (&ts, &ts) == -1); + ASSERT (errno == EINTR); + ASSERT (pentecost - 10 < ts.tv_sec && ts.tv_sec <= pentecost); + ASSERT (0 <= ts.tv_nsec && ts.tv_nsec <= 999999999); + } +#endif + + return 0; +} diff -Nru grep-3.1/gnulib-tests/test-netinet_in.c grep-3.3/gnulib-tests/test-netinet_in.c --- grep-3.1/gnulib-tests/test-netinet_in.c 1970-01-01 00:00:00.000000000 +0000 +++ grep-3.3/gnulib-tests/test-netinet_in.c 2018-01-07 00:07:08.000000000 +0000 @@ -0,0 +1,27 @@ +/* Test of substitute. + Copyright (C) 2007, 2009-2018 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 , 2007. */ + +#include + +#include + +int +main (void) +{ + return 0; +} diff -Nru grep-3.1/gnulib-tests/test-nl_langinfo.c grep-3.3/gnulib-tests/test-nl_langinfo.c --- grep-3.1/gnulib-tests/test-nl_langinfo.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/gnulib-tests/test-nl_langinfo.c 2018-02-26 06:09:46.000000000 +0000 @@ -1,5 +1,5 @@ /* Test of nl_langinfo replacement. - Copyright (C) 2009-2017 Free Software Foundation, Inc. + Copyright (C) 2009-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ /* Written by Bruno Haible , 2009. */ @@ -92,6 +92,32 @@ ASSERT (strlen (nl_langinfo (MON_10)) > 0); ASSERT (strlen (nl_langinfo (MON_11)) > 0); ASSERT (strlen (nl_langinfo (MON_12)) > 0); + ASSERT (strlen (nl_langinfo (ALTMON_1)) > 0); + ASSERT (strlen (nl_langinfo (ALTMON_2)) > 0); + ASSERT (strlen (nl_langinfo (ALTMON_3)) > 0); + ASSERT (strlen (nl_langinfo (ALTMON_4)) > 0); + ASSERT (strlen (nl_langinfo (ALTMON_5)) > 0); + ASSERT (strlen (nl_langinfo (ALTMON_6)) > 0); + ASSERT (strlen (nl_langinfo (ALTMON_7)) > 0); + ASSERT (strlen (nl_langinfo (ALTMON_8)) > 0); + ASSERT (strlen (nl_langinfo (ALTMON_9)) > 0); + ASSERT (strlen (nl_langinfo (ALTMON_10)) > 0); + ASSERT (strlen (nl_langinfo (ALTMON_11)) > 0); + ASSERT (strlen (nl_langinfo (ALTMON_12)) > 0); + /* In the tested locales, alternate month names and month names ought to be + the same. */ + ASSERT (strcmp (nl_langinfo (ALTMON_1), nl_langinfo (MON_1)) == 0); + ASSERT (strcmp (nl_langinfo (ALTMON_2), nl_langinfo (MON_2)) == 0); + ASSERT (strcmp (nl_langinfo (ALTMON_3), nl_langinfo (MON_3)) == 0); + ASSERT (strcmp (nl_langinfo (ALTMON_4), nl_langinfo (MON_4)) == 0); + ASSERT (strcmp (nl_langinfo (ALTMON_5), nl_langinfo (MON_5)) == 0); + ASSERT (strcmp (nl_langinfo (ALTMON_6), nl_langinfo (MON_6)) == 0); + ASSERT (strcmp (nl_langinfo (ALTMON_7), nl_langinfo (MON_7)) == 0); + ASSERT (strcmp (nl_langinfo (ALTMON_8), nl_langinfo (MON_8)) == 0); + ASSERT (strcmp (nl_langinfo (ALTMON_9), nl_langinfo (MON_9)) == 0); + ASSERT (strcmp (nl_langinfo (ALTMON_10), nl_langinfo (MON_10)) == 0); + ASSERT (strcmp (nl_langinfo (ALTMON_11), nl_langinfo (MON_11)) == 0); + ASSERT (strcmp (nl_langinfo (ALTMON_12), nl_langinfo (MON_12)) == 0); ASSERT (strlen (nl_langinfo (ABMON_1)) > 0); ASSERT (strlen (nl_langinfo (ABMON_2)) > 0); ASSERT (strlen (nl_langinfo (ABMON_3)) > 0); diff -Nru grep-3.1/gnulib-tests/test-openat.c grep-3.3/gnulib-tests/test-openat.c --- grep-3.1/gnulib-tests/test-openat.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/gnulib-tests/test-openat.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ /* Test that openat works. - Copyright (C) 2009-2017 Free Software Foundation, Inc. + Copyright (C) 2009-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ /* Written by Eric Blake , 2009. */ diff -Nru grep-3.1/gnulib-tests/test-openat-safer.c grep-3.3/gnulib-tests/test-openat-safer.c --- grep-3.1/gnulib-tests/test-openat-safer.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/gnulib-tests/test-openat-safer.c 2018-12-21 02:51:47.000000000 +0000 @@ -1,5 +1,5 @@ /* Test that openat_safer leave standard fds alone. - Copyright (C) 2009-2017 Free Software Foundation, Inc. + Copyright (C) 2009-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ /* Written by Eric Blake , 2009. */ @@ -96,11 +96,15 @@ errno = 0; ASSERT (openat (dfd, witness "/", O_RDONLY) == -1); ASSERT (errno == ENOTDIR || errno == EISDIR || errno == EINVAL); +#ifdef __linux__ /* Using a bad directory is okay for absolute paths. */ fd = openat (-1, "/dev/null", O_WRONLY); ASSERT (STDERR_FILENO < fd); +#endif /* Using a non-directory is wrong for relative paths. */ errno = 0; + fd = open ("/dev/null", O_RDONLY); + ASSERT (STDERR_FILENO < fd); ASSERT (openat (fd, ".", O_RDONLY) == -1); ASSERT (errno == EBADF || errno == ENOTDIR); ASSERT (close (fd) == 0); diff -Nru grep-3.1/gnulib-tests/test-open.c grep-3.3/gnulib-tests/test-open.c --- grep-3.1/gnulib-tests/test-open.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/gnulib-tests/test-open.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ /* Test of opening a file descriptor. - Copyright (C) 2007-2017 Free Software Foundation, Inc. + Copyright (C) 2007-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ /* Written by Bruno Haible , 2007. */ diff -Nru grep-3.1/gnulib-tests/test-open.h grep-3.3/gnulib-tests/test-open.h --- grep-3.1/gnulib-tests/test-open.h 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/gnulib-tests/test-open.h 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ /* Test of opening a file descriptor. - Copyright (C) 2007-2017 Free Software Foundation, Inc. + Copyright (C) 2007-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ /* Written by Bruno Haible , 2007. */ diff -Nru grep-3.1/gnulib-tests/test-pathmax.c grep-3.3/gnulib-tests/test-pathmax.c --- grep-3.1/gnulib-tests/test-pathmax.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/gnulib-tests/test-pathmax.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ /* Test of "pathmax.h". - Copyright (C) 2011-2017 Free Software Foundation, Inc. + Copyright (C) 2011-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ /* Written by Bruno Haible , 2011. */ diff -Nru grep-3.1/gnulib-tests/test-perror2.c grep-3.3/gnulib-tests/test-perror2.c --- grep-3.1/gnulib-tests/test-perror2.c 1970-01-01 00:00:00.000000000 +0000 +++ grep-3.3/gnulib-tests/test-perror2.c 2018-01-07 00:07:08.000000000 +0000 @@ -0,0 +1,136 @@ +/* Test of perror() function. + Copyright (C) 2011-2018 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 . */ + +#include + +#include + +#include +#include +#include + +/* This test intentionally parses stderr. So, we arrange to have fd 10 + (outside the range of interesting fd's during the test) set up to + duplicate the original stderr. */ +#define BACKUP_STDERR_FILENO 10 +#define ASSERT_STREAM myerr +#include "macros.h" + +static FILE *myerr; + +#define BASE "test-perror2" + +int +main (void) +{ + /* We change fd 2 later, so save it in fd 10. */ + if (dup2 (STDERR_FILENO, BACKUP_STDERR_FILENO) != BACKUP_STDERR_FILENO + || (myerr = fdopen (BACKUP_STDERR_FILENO, "w")) == NULL) + return 2; + + ASSERT (freopen (BASE ".tmp", "w+", stderr) == stderr); + + /* Test that perror does not clobber strerror buffer. */ + { + const char *msg1; + const char *msg2; + const char *msg3; + const char *msg4; + char *str1; + char *str2; + char *str3; + char *str4; + + msg1 = strerror (ENOENT); + ASSERT (msg1); + str1 = strdup (msg1); + ASSERT (str1); + + msg2 = strerror (ERANGE); + ASSERT (msg2); + str2 = strdup (msg2); + ASSERT (str2); + + msg3 = strerror (-4); + ASSERT (msg3); + str3 = strdup (msg3); + ASSERT (str3); + + msg4 = strerror (1729576); + ASSERT (msg4); + str4 = strdup (msg4); + ASSERT (str4); + + errno = EACCES; + perror (""); + errno = -5; + perror (""); + ASSERT (!ferror (stderr)); + ASSERT (msg1 == msg2 || msg1 == msg4 || STREQ (msg1, str1)); + ASSERT (msg2 == msg4 || STREQ (msg2, str2)); + ASSERT (msg3 == msg4 || STREQ (msg3, str3)); + ASSERT (STREQ (msg4, str4)); + + free (str1); + free (str2); + free (str3); + free (str4); + } + + /* Test that perror uses the same message as strerror. */ + { + int errs[] = { EACCES, 0, -3, }; + int i; + for (i = 0; i < SIZEOF (errs); i++) + { + char buf[256]; + char *err = strerror (errs[i]); + + ASSERT (err); + ASSERT (strlen (err) < sizeof buf); + rewind (stderr); + ASSERT (ftruncate (fileno (stderr), 0) == 0); + errno = errs[i]; + perror (NULL); + ASSERT (!ferror (stderr)); + rewind (stderr); + ASSERT (fgets (buf, sizeof buf, stderr) == buf); + ASSERT (strstr (buf, err)); + } + } + + /* Test that perror reports write failure. */ + { + ASSERT (freopen (BASE ".tmp", "r", stderr) == stderr); + ASSERT (setvbuf (stderr, NULL, _IONBF, BUFSIZ) == 0); + errno = -1; + ASSERT (!ferror (stderr)); + perror (NULL); +#if 0 + /* Commented out until cygwin behaves: + https://sourceware.org/ml/newlib/2011/msg00228.html */ + ASSERT (errno > 0); + /* Commented out until glibc behaves: + https://sourceware.org/bugzilla/show_bug.cgi?id=12792 */ + ASSERT (ferror (stderr)); +#endif + } + + ASSERT (fclose (stderr) == 0); + ASSERT (remove (BASE ".tmp") == 0); + + return 0; +} diff -Nru grep-3.1/gnulib-tests/test-perror.c grep-3.3/gnulib-tests/test-perror.c --- grep-3.1/gnulib-tests/test-perror.c 1970-01-01 00:00:00.000000000 +0000 +++ grep-3.3/gnulib-tests/test-perror.c 2018-01-07 00:07:08.000000000 +0000 @@ -0,0 +1,36 @@ +/* Test of perror() function. + Copyright (C) 2008-2018 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 . */ + +#include + +#include + +#include "signature.h" +SIGNATURE_CHECK (perror, void, (char const *)); + +#include + +int +main (int argc, char **argv) +{ + const char *prefix = (argc > 1 ? argv[1] : NULL); + + errno = EACCES; perror (prefix); + errno = ETIMEDOUT; perror (prefix); + errno = EOVERFLOW; perror (prefix); + + return 0; +} diff -Nru grep-3.1/gnulib-tests/test-perror.sh grep-3.3/gnulib-tests/test-perror.sh --- grep-3.1/gnulib-tests/test-perror.sh 1970-01-01 00:00:00.000000000 +0000 +++ grep-3.3/gnulib-tests/test-perror.sh 2017-03-17 04:33:17.000000000 +0000 @@ -0,0 +1,26 @@ +#!/bin/sh +: ${srcdir=.} +. "$srcdir/init.sh"; path_prepend_ . + +# Test NULL prefix. Result should not contain a number, except in lines that +# start with 'EDC' (IBM z/OS libc produces an error identifier before the +# error message). +test-perror 2>&1 >/dev/null | LC_ALL=C tr -d '\r' > t-perror.tmp +grep -v '^EDC' t-perror.tmp | grep '[0-9]' > /dev/null \ + && fail_ "result should not contain a number" + +# Test empty prefix. Result should be the same. +test-perror '' 2>&1 >/dev/null | LC_ALL=C tr -d '\r' > t-perror1.tmp +diff t-perror.tmp t-perror1.tmp \ + || fail_ "empty prefix should behave like NULL argument" + +# Test non-empty prefix. +test-perror foo 2>&1 >/dev/null | LC_ALL=C tr -d '\r' > t-perror3.tmp +sed -e 's/^/foo: /' < t-perror.tmp > t-perror2.tmp +diff t-perror2.tmp t-perror3.tmp || fail_ "prefix applied incorrectly" + +# Test exit status. +test-perror >out 2>/dev/null || fail_ "unexpected exit status" +test -s out && fail_ "unexpected output" + +Exit 0 diff -Nru grep-3.1/gnulib-tests/test-pipe.c grep-3.3/gnulib-tests/test-pipe.c --- grep-3.1/gnulib-tests/test-pipe.c 2017-05-14 01:09:51.000000000 +0000 +++ grep-3.3/gnulib-tests/test-pipe.c 2018-06-24 23:16:49.000000000 +0000 @@ -1,5 +1,5 @@ /* Test of pipe. - Copyright (C) 2009-2017 Free Software Foundation, Inc. + Copyright (C) 2009-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program; if not, see . */ #include @@ -24,7 +24,7 @@ #include #include -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +#if defined _WIN32 && ! defined __CYGWIN__ /* Get declarations of the native Windows API functions. */ # define WIN32_LEAN_AND_MEAN # include @@ -43,7 +43,7 @@ static bool is_open (int fd) { -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +#if defined _WIN32 && ! defined __CYGWIN__ /* On native Windows, the initial state of unassigned standard file descriptors is that they are open but point to an INVALID_HANDLE_VALUE, and there is no fcntl. */ @@ -60,7 +60,7 @@ static bool is_cloexec (int fd) { -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +#if defined _WIN32 && ! defined __CYGWIN__ HANDLE h = (HANDLE) _get_osfhandle (fd); DWORD flags; ASSERT (GetHandleInformation (h, &flags)); @@ -76,7 +76,7 @@ static bool is_nonblocking (int fd) { -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +#if defined _WIN32 && ! defined __CYGWIN__ /* We don't use the non-blocking mode for sockets here. */ return 0; #else diff -Nru grep-3.1/gnulib-tests/test-quotearg.h grep-3.3/gnulib-tests/test-quotearg.h --- grep-3.1/gnulib-tests/test-quotearg.h 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/gnulib-tests/test-quotearg.h 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ /* Test of quotearg family of functions. - Copyright (C) 2008-2017 Free Software Foundation, Inc. + Copyright (C) 2008-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program; if not, see . */ /* Written by Eric Blake , 2008. */ diff -Nru grep-3.1/gnulib-tests/test-quotearg-simple.c grep-3.3/gnulib-tests/test-quotearg-simple.c --- grep-3.1/gnulib-tests/test-quotearg-simple.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/gnulib-tests/test-quotearg-simple.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ /* Test of quotearg family of functions. - Copyright (C) 2008-2017 Free Software Foundation, Inc. + Copyright (C) 2008-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program; if not, see . */ /* Written by Eric Blake , 2008. */ diff -Nru grep-3.1/gnulib-tests/test-raise.c grep-3.3/gnulib-tests/test-raise.c --- grep-3.1/gnulib-tests/test-raise.c 1970-01-01 00:00:00.000000000 +0000 +++ grep-3.3/gnulib-tests/test-raise.c 2018-01-07 00:07:08.000000000 +0000 @@ -0,0 +1,50 @@ +/* Test raising a signal. + Copyright (C) 2011-2018 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 + +#include "signature.h" +SIGNATURE_CHECK (raise, int, (int)); + +#include + +#include "macros.h" + +/* It is safe to use _Noreturn here: exit() never returns, and GCC knows that + exit() is a non-returning function, even on platforms where its declaration + in does not have the 'noreturn' attribute. */ +static _Noreturn void +handler (int sig) +{ + exit (0); +} + +int +main (void) +{ + /* Test behaviour for invalid argument. */ + ASSERT (raise (-1) != 0); + + /* Test behaviour for SIGINT. */ + ASSERT (signal (SIGINT, handler) != SIG_ERR); + + raise (SIGINT); + + /* We should not get here, because the handler takes away the control. */ + exit (1); +} diff -Nru grep-3.1/gnulib-tests/test-read.c grep-3.3/gnulib-tests/test-read.c --- grep-3.1/gnulib-tests/test-read.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/gnulib-tests/test-read.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ /* Test the read() function. - Copyright (C) 2011-2017 Free Software Foundation, Inc. + Copyright (C) 2011-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ #include diff -Nru grep-3.1/gnulib-tests/test-realloc-gnu.c grep-3.3/gnulib-tests/test-realloc-gnu.c --- grep-3.1/gnulib-tests/test-realloc-gnu.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/gnulib-tests/test-realloc-gnu.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ /* Test of realloc function. - Copyright (C) 2010-2017 Free Software Foundation, Inc. + Copyright (C) 2010-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ #include diff -Nru grep-3.1/gnulib-tests/test-regex.c grep-3.3/gnulib-tests/test-regex.c --- grep-3.1/gnulib-tests/test-regex.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/gnulib-tests/test-regex.c 2018-12-21 02:51:47.000000000 +0000 @@ -1,5 +1,5 @@ /* Test regular expressions - Copyright 1996-2001, 2003-2017 Free Software Foundation, Inc. + Copyright 1996-2001, 2003-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ #include @@ -48,7 +48,7 @@ if (setlocale (LC_ALL, "en_US.UTF-8")) { { - /* http://sourceware.org/ml/libc-hacker/2006-09/msg00008.html + /* https://sourceware.org/ml/libc-hacker/2006-09/msg00008.html This test needs valgrind to catch the bug on Debian GNU/Linux 3.1 x86, but it might catch the bug better on other platforms and it shouldn't hurt to try the @@ -83,7 +83,7 @@ { /* This test is from glibc bug 15078. The test case is from Andreas Schwab in - . + . */ static char const pat[] = "[^x]x"; static char const data[] = @@ -220,7 +220,7 @@ } /* Catch a bug reported by Vin Shelton in - http://lists.gnu.org/archive/html/bug-coreutils/2007-06/msg00089.html + https://lists.gnu.org/r/bug-coreutils/2007-06/msg00089.html */ re_set_syntax (RE_SYNTAX_POSIX_BASIC & ~RE_CONTEXT_INVALID_DUP @@ -237,6 +237,17 @@ if (! REG_STARTEND) result |= 64; + /* Matching with the compiled form of this regexp would provoke + an assertion failure prior to glibc-2.28: + regexec.c:1375: pop_fail_stack: Assertion 'num >= 0' failed + With glibc-2.28, compilation fails and reports the invalid + back reference. */ + re_set_syntax (RE_SYNTAX_POSIX_EGREP); + memset (®ex, 0, sizeof regex); + s = re_compile_pattern ("0|()0|\\1|0", 10, ®ex); + if (!s || strcmp (s, "Invalid back reference")) + result |= 64; + #if 0 /* It would be nice to reject hosts whose regoff_t values are too narrow (including glibc on hosts with 64-bit ptrdiff_t and diff -Nru grep-3.1/gnulib-tests/test-select.c grep-3.3/gnulib-tests/test-select.c --- grep-3.1/gnulib-tests/test-select.c 1970-01-01 00:00:00.000000000 +0000 +++ grep-3.3/gnulib-tests/test-select.c 2018-01-07 00:07:08.000000000 +0000 @@ -0,0 +1,34 @@ +/* Test of select() substitute. + Copyright (C) 2008-2018 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 Paolo Bonzini, 2008. */ + +#include + +#include + +#include "signature.h" + +SIGNATURE_CHECK (select, int, (int, fd_set *, fd_set *, fd_set *, + struct timeval *)); + +#include "test-select.h" + +int +main (void) +{ + return test_function (select); +} diff -Nru grep-3.1/gnulib-tests/test-select-fd.c grep-3.3/gnulib-tests/test-select-fd.c --- grep-3.1/gnulib-tests/test-select-fd.c 1970-01-01 00:00:00.000000000 +0000 +++ grep-3.3/gnulib-tests/test-select-fd.c 2018-01-07 00:07:08.000000000 +0000 @@ -0,0 +1,72 @@ +/* Test of select() substitute, reading or writing from a given file descriptor. + Copyright (C) 2008-2018 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 , 2008. */ + +#include + +#include +#include +#include + +int +main (int argc, char *argv[]) +{ + if (argc == 4) + { + char mode = argv[1][0]; + + if (mode == 'r' || mode == 'w') + { + int fd = atoi (argv[2]); + + if (fd >= 0) + { + const char *result_file_name = argv[3]; + FILE *result_file = fopen (result_file_name, "wb"); + + if (result_file != NULL) + { + fd_set fds; + struct timeval timeout; + int ret; + + FD_ZERO (&fds); + FD_SET (fd, &fds); + timeout.tv_sec = 0; + timeout.tv_usec = 10000; + ret = (mode == 'r' + ? select (fd + 1, &fds, NULL, NULL, &timeout) + : select (fd + 1, NULL, &fds, NULL, &timeout)); + if (ret < 0) + { + perror ("select failed"); + exit (1); + } + if ((ret == 0) != ! FD_ISSET (fd, &fds)) + { + fprintf (stderr, "incorrect return value\n"); + exit (1); + } + fprintf (result_file, "%d\n", ret); + exit (0); + } + } + } + } + fprintf (stderr, "Usage: test-select-fd mode fd result-file-name\n"); + exit (1); +} diff -Nru grep-3.1/gnulib-tests/test-select.h grep-3.3/gnulib-tests/test-select.h --- grep-3.1/gnulib-tests/test-select.h 1970-01-01 00:00:00.000000000 +0000 +++ grep-3.3/gnulib-tests/test-select.h 2018-12-21 02:51:47.000000000 +0000 @@ -0,0 +1,466 @@ +/* Test of select() substitute. + Copyright (C) 2008-2018 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 Paolo Bonzini, 2008. */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "macros.h" + +#if defined _WIN32 && ! defined __CYGWIN__ +# define WINDOWS_NATIVE +#endif + +#ifdef HAVE_SYS_WAIT_H +# include +#endif + +#define TEST_PORT 12345 + + +typedef int (*select_fn) (int, fd_set *, fd_set *, fd_set *, struct timeval *); + + +/* Minimal testing infrastructure. */ + +static int failures; + +static void +failed (const char *reason) +{ + if (++failures > 1) + printf (" "); + printf ("failed (%s)\n", reason); +} + +static int +test (void (*fn) (select_fn), select_fn my_select, const char *msg) +{ + failures = 0; + printf ("%s... ", msg); + fflush (stdout); + fn (my_select); + + if (!failures) + printf ("passed\n"); + + return failures; +} + + +/* Funny socket code. */ + +static int +open_server_socket (void) +{ + int s, x; + struct sockaddr_in ia; + + s = socket (AF_INET, SOCK_STREAM, 0); + + x = 1; + setsockopt (s, SOL_SOCKET, SO_REUSEPORT, &x, sizeof (x)); + + memset (&ia, 0, sizeof (ia)); + ia.sin_family = AF_INET; + inet_pton (AF_INET, "127.0.0.1", &ia.sin_addr); + ia.sin_port = htons (TEST_PORT); + if (bind (s, (struct sockaddr *) &ia, sizeof (ia)) < 0) + { + perror ("bind"); + exit (77); + } + + if (listen (s, 1) < 0) + { + perror ("listen"); + exit (77); + } + + return s; +} + +static int +connect_to_socket (bool blocking) +{ + int s; + struct sockaddr_in ia; + + s = socket (AF_INET, SOCK_STREAM, 0); + + memset (&ia, 0, sizeof (ia)); + ia.sin_family = AF_INET; + inet_pton (AF_INET, "127.0.0.1", &ia.sin_addr); + ia.sin_port = htons (TEST_PORT); + + if (!blocking) + { +#ifdef WINDOWS_NATIVE + unsigned long iMode = 1; + ioctl (s, FIONBIO, (char *) &iMode); + +#elif defined F_GETFL + int oldflags = fcntl (s, F_GETFL, NULL); + + if (!(oldflags & O_NONBLOCK)) + fcntl (s, F_SETFL, oldflags | O_NONBLOCK); +#endif + } + + if (connect (s, (struct sockaddr *) &ia, sizeof (ia)) < 0 + && (blocking || errno != EINPROGRESS)) + { + perror ("connect"); + exit (77); + } + + return s; +} + + +/* A slightly more convenient interface to select(2). + Waits until a specific event occurs on a file descriptor FD. + EV is a bit mask of events to look for: + SEL_IN - input can be polled without blocking, + SEL_OUT - output can be provided without blocking, + SEL_EXC - an exception occurred, + A maximum wait time is specified by TIMEOUT. + *TIMEOUT = { 0, 0 } means to return immediately, + TIMEOUT = NULL means to wait indefinitely. */ + +enum { SEL_IN = 1, SEL_OUT = 2, SEL_EXC = 4 }; + +static int +do_select (int fd, int ev, struct timeval *timeout, select_fn my_select) +{ + fd_set rfds, wfds, xfds; + int r, rev; + + FD_ZERO (&rfds); + FD_ZERO (&wfds); + FD_ZERO (&xfds); + if (ev & SEL_IN) + FD_SET (fd, &rfds); + if (ev & SEL_OUT) + FD_SET (fd, &wfds); + if (ev & SEL_EXC) + FD_SET (fd, &xfds); + r = my_select (fd + 1, &rfds, &wfds, &xfds, timeout); + if (r < 0) + return r; + + rev = 0; + if (FD_ISSET (fd, &rfds)) + rev |= SEL_IN; + if (FD_ISSET (fd, &wfds)) + rev |= SEL_OUT; + if (FD_ISSET (fd, &xfds)) + rev |= SEL_EXC; + if (rev && r == 0) + failed ("select returned 0"); + if (rev & ~ev) + failed ("select returned unrequested events"); + + return rev; +} + +static int +do_select_nowait (int fd, int ev, select_fn my_select) +{ + struct timeval tv0; + tv0.tv_sec = 0; + tv0.tv_usec = 0; + return do_select (fd, ev, &tv0, my_select); +} + +static int +do_select_wait (int fd, int ev, select_fn my_select) +{ + return do_select (fd, ev, NULL, my_select); +} + + +/* Test select(2) for TTYs. */ + +#ifdef INTERACTIVE +static void +test_tty (select_fn my_select) +{ + if (do_select_nowait (0, SEL_IN, my_select) != 0) + failed ("can read"); + if (do_select_nowait (0, SEL_OUT, my_select) == 0) + failed ("cannot write"); + + if (do_select_wait (0, SEL_IN, my_select) == 0) + failed ("return with infinite timeout"); + + getchar (); + if (do_select_nowait (0, SEL_IN, my_select) != 0) + failed ("can read after getc"); +} +#endif + + +static int +do_select_bad_nfd_nowait (int nfd, select_fn my_select) +{ + struct timeval tv0; + tv0.tv_sec = 0; + tv0.tv_usec = 0; + errno = 0; + return my_select (nfd, NULL, NULL, NULL, &tv0); +} + +static void +test_bad_nfd (select_fn my_select) +{ + if (do_select_bad_nfd_nowait (-1, my_select) != -1 || errno != EINVAL) + failed ("invalid errno after negative nfds"); + /* Can't test FD_SETSIZE + 1 for EINVAL, since some systems allow + dynamically larger set size by redefining FD_SETSIZE anywhere up + to the actual maximum fd. */ +#if 0 + if (do_select_bad_nfd_nowait (FD_SETSIZE + 1, my_select) != -1 + || errno != EINVAL) + failed ("invalid errno after bogus nfds"); +#endif +} + +/* Test select(2) on invalid file descriptors. */ + +static int +do_select_bad_fd (int fd, int ev, struct timeval *timeout, select_fn my_select) +{ + fd_set rfds, wfds, xfds; + + FD_ZERO (&rfds); + FD_ZERO (&wfds); + FD_ZERO (&xfds); + if (ev & SEL_IN) + FD_SET (fd, &rfds); + if (ev & SEL_OUT) + FD_SET (fd, &wfds); + if (ev & SEL_EXC) + FD_SET (fd, &xfds); + errno = 0; + return my_select (fd + 1, &rfds, &wfds, &xfds, timeout); + /* In this case, when fd is invalid, on some platforms, the bit for fd + is left alone in the fd_set, whereas on other platforms it is cleared. + So, don't check the bit for fd here. */ +} + +static int +do_select_bad_fd_nowait (int fd, int ev, select_fn my_select) +{ + struct timeval tv0; + tv0.tv_sec = 0; + tv0.tv_usec = 0; + return do_select_bad_fd (fd, ev, &tv0, my_select); +} + +static void +test_bad_fd (select_fn my_select) +{ + /* This tests fails on OSF/1 and native Windows, even with fd = 16. */ +#if !(defined __osf__ || defined WINDOWS_NATIVE) + int fd; + + /* On Linux, Mac OS X, *BSD, values of fd like 99 or 399 are discarded + by the kernel early and therefore do *not* lead to EBADF, as required + by POSIX. */ +# if defined __linux__ || (defined __APPLE__ && defined __MACH__) || (defined __FreeBSD__ || defined __DragonFly__) || defined __OpenBSD__ || defined __NetBSD__ + fd = 14; +# else + fd = 99; +# endif + /* Even on the best POSIX compliant platforms, values of fd >= FD_SETSIZE + require an nfds argument that is > FD_SETSIZE and thus may lead to EINVAL, + not EBADF. */ + if (fd >= FD_SETSIZE) + fd = FD_SETSIZE - 1; + close (fd); + + if (do_select_bad_fd_nowait (fd, SEL_IN, my_select) == 0 || errno != EBADF) + failed ("invalid fd among rfds"); + if (do_select_bad_fd_nowait (fd, SEL_OUT, my_select) == 0 || errno != EBADF) + failed ("invalid fd among wfds"); + if (do_select_bad_fd_nowait (fd, SEL_EXC, my_select) == 0 || errno != EBADF) + failed ("invalid fd among xfds"); +#endif +} + + +/* Test select(2) for unconnected nonblocking sockets. */ + +static void +test_connect_first (select_fn my_select) +{ + int s = open_server_socket (); + struct sockaddr_in ia; + socklen_t addrlen; + + int c1, c2; + + if (do_select_nowait (s, SEL_IN | SEL_EXC, my_select) != 0) + failed ("can read, socket not connected"); + + c1 = connect_to_socket (false); + + if (do_select_wait (s, SEL_IN | SEL_EXC, my_select) != SEL_IN) + failed ("expecting readability on passive socket"); + if (do_select_nowait (s, SEL_IN | SEL_EXC, my_select) != SEL_IN) + failed ("expecting readability on passive socket"); + + addrlen = sizeof (ia); + c2 = accept (s, (struct sockaddr *) &ia, &addrlen); + ASSERT (close (s) == 0); + ASSERT (close (c1) == 0); + ASSERT (close (c2) == 0); +} + + +/* Test select(2) for unconnected blocking sockets. */ + +static void +test_accept_first (select_fn my_select) +{ +#ifndef WINDOWS_NATIVE + int s = open_server_socket (); + struct sockaddr_in ia; + socklen_t addrlen; + char buf[3]; + int c, pid; + + pid = fork (); + if (pid < 0) + return; + + if (pid == 0) + { + addrlen = sizeof (ia); + c = accept (s, (struct sockaddr *) &ia, &addrlen); + ASSERT (close (s) == 0); + ASSERT (write (c, "foo", 3) == 3); + ASSERT (read (c, buf, 3) == 3); + shutdown (c, SHUT_RD); + ASSERT (close (c) == 0); + exit (0); + } + else + { + ASSERT (close (s) == 0); + c = connect_to_socket (true); + if (do_select_nowait (c, SEL_OUT, my_select) != SEL_OUT) + failed ("cannot write after blocking connect"); + ASSERT (write (c, "foo", 3) == 3); + wait (&pid); + if (do_select_wait (c, SEL_IN, my_select) != SEL_IN) + failed ("cannot read data left in the socket by closed process"); + ASSERT (read (c, buf, 3) == 3); + ASSERT (write (c, "foo", 3) == 3); + (void) close (c); /* may fail with errno = ECONNRESET */ + } +#endif +} + + +/* Common code for pipes and connected sockets. */ + +static void +test_pair (int rd, int wd, select_fn my_select) +{ + char buf[3]; + if (do_select_wait (wd, SEL_IN | SEL_OUT | SEL_EXC, my_select) != SEL_OUT) + failed ("expecting writability before writing"); + if (do_select_nowait (wd, SEL_IN | SEL_OUT | SEL_EXC, my_select) != SEL_OUT) + failed ("expecting writability before writing"); + + ASSERT (write (wd, "foo", 3) == 3); + if (do_select_wait (rd, SEL_IN, my_select) != SEL_IN) + failed ("expecting readability after writing"); + if (do_select_nowait (rd, SEL_IN, my_select) != SEL_IN) + failed ("expecting readability after writing"); + + ASSERT (read (rd, buf, 3) == 3); +} + + +/* Test select(2) on connected sockets. */ + +static void +test_socket_pair (select_fn my_select) +{ + struct sockaddr_in ia; + + socklen_t addrlen = sizeof (ia); + int s = open_server_socket (); + int c1 = connect_to_socket (false); + int c2 = accept (s, (struct sockaddr *) &ia, &addrlen); + + ASSERT (close (s) == 0); + + test_pair (c1, c2, my_select); + ASSERT (close (c1) == 0); + ASSERT (write (c2, "foo", 3) == 3); + (void) close (c2); /* may fail with errno = ECONNRESET */ +} + + +/* Test select(2) on pipes. */ + +static void +test_pipe (select_fn my_select) +{ + int fd[2]; + + ASSERT (pipe (fd) == 0); + test_pair (fd[0], fd[1], my_select); + ASSERT (close (fd[0]) == 0); + ASSERT (close (fd[1]) == 0); +} + + +/* Do them all. */ + +static int +test_function (select_fn my_select) +{ + int result = 0; + +#ifdef INTERACTIVE + printf ("Please press Enter\n"); + test (test_tty, "TTY", my_select); +#endif + + result += test (test_bad_nfd, my_select, "Invalid nfd test"); + result += test (test_bad_fd, my_select, "Invalid fd test"); + result += test (test_connect_first, my_select, "Unconnected socket test"); + result += test (test_socket_pair, my_select, "Connected sockets test"); + result += test (test_accept_first, my_select, "General socket test with fork"); + result += test (test_pipe, my_select, "Pipe test"); + + return result; +} diff -Nru grep-3.1/gnulib-tests/test-select-in.sh grep-3.3/gnulib-tests/test-select-in.sh --- grep-3.1/gnulib-tests/test-select-in.sh 1970-01-01 00:00:00.000000000 +0000 +++ grep-3.3/gnulib-tests/test-select-in.sh 2014-06-27 22:32:18.000000000 +0000 @@ -0,0 +1,38 @@ +#!/bin/sh +# Test select() on file descriptors opened for reading. + +# This test is known to fail on Solaris 2.6 and older, due to its handling +# of /dev/null. + +tmpfiles="" +trap 'rm -fr $tmpfiles' 1 2 3 15 + +tmpfiles="$tmpfiles t-select-in.tmp" + +# Regular files. + +rm -f t-select-in.tmp +./test-select-fd${EXEEXT} r 0 t-select-in.tmp < ./test-select-fd${EXEEXT} +test `cat t-select-in.tmp` = "1" || exit 1 + +# Pipes. + +rm -f t-select-in.tmp +{ sleep 1; echo abc; } | \ + { ./test-select-fd${EXEEXT} r 0 t-select-in.tmp; cat > /dev/null; } +test `cat t-select-in.tmp` = "0" || exit 1 + +rm -f t-select-in.tmp +echo abc | { sleep 1; ./test-select-fd${EXEEXT} r 0 t-select-in.tmp; } +test `cat t-select-in.tmp` = "1" || exit 1 + +# Special files. +# This part of the test is known to fail on Solaris 2.6 and older. + +rm -f t-select-in.tmp +./test-select-fd${EXEEXT} r 0 t-select-in.tmp < /dev/null +test `cat t-select-in.tmp` = "1" || exit 1 + +rm -fr $tmpfiles + +exit 0 diff -Nru grep-3.1/gnulib-tests/test-select-out.sh grep-3.3/gnulib-tests/test-select-out.sh --- grep-3.1/gnulib-tests/test-select-out.sh 1970-01-01 00:00:00.000000000 +0000 +++ grep-3.3/gnulib-tests/test-select-out.sh 2014-06-27 22:32:18.000000000 +0000 @@ -0,0 +1,35 @@ +#!/bin/sh +# Test select() on file descriptors opened for writing. + +tmpfiles="" +trap 'rm -fr $tmpfiles' 1 2 3 15 + +tmpfiles="$tmpfiles t-select-out.out t-select-out.tmp" + +# Regular files. + +rm -f t-select-out.tmp +./test-select-fd${EXEEXT} w 1 t-select-out.tmp > t-select-out.out +test `cat t-select-out.tmp` = "1" || exit 1 + +# Pipes. + +if false; then # This test fails on some platforms. + rm -f t-select-out.tmp + ( { echo abc; ./test-select-fd${EXEEXT} w 1 t-select-out.tmp; } | { sleep 1; cat; } ) > /dev/null + test `cat t-select-out.tmp` = "0" || exit 1 +fi + +rm -f t-select-out.tmp +( { sleep 1; echo abc; ./test-select-fd${EXEEXT} w 1 t-select-out.tmp; } | cat) > /dev/null +test `cat t-select-out.tmp` = "1" || exit 1 + +# Special files. + +rm -f t-select-out.tmp +./test-select-fd${EXEEXT} w 1 t-select-out.tmp > /dev/null +test `cat t-select-out.tmp` = "1" || exit 1 + +rm -fr $tmpfiles + +exit 0 diff -Nru grep-3.1/gnulib-tests/test-select-stdin.c grep-3.3/gnulib-tests/test-select-stdin.c --- grep-3.1/gnulib-tests/test-select-stdin.c 1970-01-01 00:00:00.000000000 +0000 +++ grep-3.3/gnulib-tests/test-select-stdin.c 2018-01-07 00:07:08.000000000 +0000 @@ -0,0 +1,83 @@ +/* Test of select() substitute, reading from stdin. + Copyright (C) 2008-2018 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 , 2008. */ + +#include + +#include +#include +#include +#include +#include + +#include "macros.h" + +int +main (void) +{ + printf ("Applying select() from standard input. Press Ctrl-C to abort.\n"); + for (;;) + { + struct timeval before; + struct timeval after; + unsigned long spent_usec; + fd_set readfds; + struct timeval timeout; + int ret; + + gettimeofday (&before, NULL); + + FD_ZERO (&readfds); + FD_SET (0, &readfds); + timeout.tv_sec = 0; + timeout.tv_usec = 500000; + ret = select (1, &readfds, NULL, NULL, &timeout); + + gettimeofday (&after, NULL); + spent_usec = (after.tv_sec - before.tv_sec) * 1000000 + + after.tv_usec - before.tv_usec; + + if (ret < 0) + { + perror ("select failed"); + exit (1); + } + if ((ret == 0) != ! FD_ISSET (0, &readfds)) + { + fprintf (stderr, "incorrect return value\n"); + exit (1); + } + if (ret == 0) + { + if (spent_usec < 250000) + { + fprintf (stderr, "returned too early\n"); + exit (1); + } + /* Timeout */ + printf ("."); + ASSERT (fflush (stdout) == 0); + } + else + { + char c; + + printf ("Input available! Trying to read 1 byte...\n"); + ASSERT (read (0, &c, 1) == 1); + } + } +} diff -Nru grep-3.1/gnulib-tests/test-setenv.c grep-3.3/gnulib-tests/test-setenv.c --- grep-3.1/gnulib-tests/test-setenv.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/gnulib-tests/test-setenv.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ /* Tests of setenv. - Copyright (C) 2009-2017 Free Software Foundation, Inc. + Copyright (C) 2009-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ /* Written by Eric Blake , 2009. */ diff -Nru grep-3.1/gnulib-tests/test-setlocale1.c grep-3.3/gnulib-tests/test-setlocale1.c --- grep-3.1/gnulib-tests/test-setlocale1.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/gnulib-tests/test-setlocale1.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ /* Test of setting the current locale. - Copyright (C) 2011-2017 Free Software Foundation, Inc. + Copyright (C) 2011-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ #include diff -Nru grep-3.1/gnulib-tests/test-setlocale2.c grep-3.3/gnulib-tests/test-setlocale2.c --- grep-3.1/gnulib-tests/test-setlocale2.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/gnulib-tests/test-setlocale2.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ /* Test of setting the current locale. - Copyright (C) 2011-2017 Free Software Foundation, Inc. + Copyright (C) 2011-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ #include diff -Nru grep-3.1/gnulib-tests/test-setlocale2.sh grep-3.3/gnulib-tests/test-setlocale2.sh --- grep-3.1/gnulib-tests/test-setlocale2.sh 2014-06-27 22:32:18.000000000 +0000 +++ grep-3.3/gnulib-tests/test-setlocale2.sh 2018-01-07 00:06:41.000000000 +0000 @@ -10,7 +10,7 @@ French_France.65001 Japanese_Japan.65001 Turkish_Turkey.65001 \ Chinese_Taiwan.65001 Chinese_China.54936 Chinese_China.65001; do # Here we use 'env' to set the LC_ALL environment variable, because on - # Solaris 11 2011-11, the /bin/sh refuses to do it for Turkish_Turkey.65001. + # Solaris 11.0, the /bin/sh refuses to do it for Turkish_Turkey.65001. env LC_ALL="$name" ./test-setlocale2${EXEEXT} 1 || exit 1 done diff -Nru grep-3.1/gnulib-tests/test-setsockopt.c grep-3.3/gnulib-tests/test-setsockopt.c --- grep-3.1/gnulib-tests/test-setsockopt.c 1970-01-01 00:00:00.000000000 +0000 +++ grep-3.3/gnulib-tests/test-setsockopt.c 2018-01-07 00:07:08.000000000 +0000 @@ -0,0 +1,55 @@ +/* Test setsockopt() function. + Copyright (C) 2011-2018 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 + +#include "signature.h" +SIGNATURE_CHECK (setsockopt, int, (int, int, int, const void *, socklen_t)); + +#include +#include + +#include "sockets.h" +#include "macros.h" + +int +main (void) +{ + (void) gl_sockets_startup (SOCKETS_1_1); + + /* Test behaviour for invalid file descriptors. */ + { + int value = 1; + + errno = 0; + ASSERT (setsockopt (-1, SOL_SOCKET, SO_REUSEADDR, &value, sizeof (value)) + == -1); + ASSERT (errno == EBADF); + } + { + int value = 1; + + close (99); + errno = 0; + ASSERT (setsockopt (99, SOL_SOCKET, SO_REUSEADDR, &value, sizeof (value)) + == -1); + ASSERT (errno == EBADF); + } + + return 0; +} diff -Nru grep-3.1/gnulib-tests/test-sigaction.c grep-3.3/gnulib-tests/test-sigaction.c --- grep-3.1/gnulib-tests/test-sigaction.c 1970-01-01 00:00:00.000000000 +0000 +++ grep-3.3/gnulib-tests/test-sigaction.c 2018-01-07 00:07:08.000000000 +0000 @@ -0,0 +1,122 @@ +/* Test of sigaction() function. + Copyright (C) 2008-2018 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 Eric Blake , 2008. */ + +#include + +#include + +#include "signature.h" +SIGNATURE_CHECK (sigaction, int, (int, struct sigaction const *, + struct sigaction *)); + +#include + +#include "macros.h" + +#ifndef SA_NOCLDSTOP +# define SA_NOCLDSTOP 0 +#endif +#ifndef SA_ONSTACK +# define SA_ONSTACK 0 +#endif +#ifndef SA_RESETHAND +# define SA_RESETHAND 0 +#endif +#ifndef SA_RESTART +# define SA_RESTART 0 +#endif +#ifndef SA_SIGINFO +# define SA_SIGINFO 0 +#endif +#ifndef SA_NOCLDWAIT +# define SA_NOCLDWAIT 0 +#endif + +/* Define a mask of flags required by POSIX. Some implementations + provide other flags as extensions, such as SA_RESTORER, that we + must ignore in this test. */ +#define MASK_SA_FLAGS (SA_NOCLDSTOP | SA_ONSTACK | SA_RESETHAND | SA_RESTART \ + | SA_SIGINFO | SA_NOCLDWAIT | SA_NODEFER) + +/* This test is unsafe in the presence of an asynchronous SIGABRT, + because we install a signal-handler that is intentionally not + async-safe. Hopefully, this does not lead to too many reports of + false failures, since people don't generally use 'kill -s SIGABRT' + to end a runaway program. */ + +static void +handler (int sig) +{ + static int entry_count; + struct sigaction sa; + ASSERT (sig == SIGABRT); + ASSERT (sigaction (SIGABRT, NULL, &sa) == 0); + ASSERT ((sa.sa_flags & SA_SIGINFO) == 0); + switch (entry_count++) + { + case 0: + ASSERT ((sa.sa_flags & SA_RESETHAND) == 0); + ASSERT (sa.sa_handler == handler); + break; + case 1: + /* This assertion fails on glibc-2.3.6 systems with LinuxThreads, + when this program is linked with -lpthread, due to the sigaction() + override in libpthread.so. */ +#if !(defined __GLIBC__ || defined __UCLIBC__) + ASSERT (sa.sa_handler == SIG_DFL); +#endif + break; + default: + ASSERT (0); + } +} + +int +main (void) +{ + struct sigaction sa; + struct sigaction old_sa; + sa.sa_handler = handler; + + sa.sa_flags = 0; + ASSERT (sigemptyset (&sa.sa_mask) == 0); + ASSERT (sigaction (SIGABRT, &sa, NULL) == 0); + ASSERT (raise (SIGABRT) == 0); + + sa.sa_flags = SA_RESETHAND | SA_NODEFER; + ASSERT (sigaction (SIGABRT, &sa, &old_sa) == 0); + ASSERT ((old_sa.sa_flags & MASK_SA_FLAGS) == 0); + ASSERT (old_sa.sa_handler == handler); + ASSERT (raise (SIGABRT) == 0); + + sa.sa_handler = SIG_DFL; + ASSERT (sigaction (SIGABRT, &sa, &old_sa) == 0); + ASSERT ((old_sa.sa_flags & SA_SIGINFO) == 0); +#if !(defined __GLIBC__ || defined __UCLIBC__) /* see above */ + ASSERT (old_sa.sa_handler == SIG_DFL); +#endif + + sa.sa_handler = SIG_IGN; + ASSERT (sigaction (SIGABRT, &sa, NULL) == 0); + ASSERT (raise (SIGABRT) == 0); + ASSERT (sigaction (SIGABRT, NULL, &old_sa) == 0); + ASSERT (old_sa.sa_handler == SIG_IGN); + ASSERT (raise (SIGABRT) == 0); + + return 0; +} diff -Nru grep-3.1/gnulib-tests/test-signal-h.c grep-3.3/gnulib-tests/test-signal-h.c --- grep-3.1/gnulib-tests/test-signal-h.c 1970-01-01 00:00:00.000000000 +0000 +++ grep-3.3/gnulib-tests/test-signal-h.c 2018-01-07 00:07:08.000000000 +0000 @@ -0,0 +1,129 @@ +/* Test of substitute. + Copyright (C) 2009-2018 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 Eric Blake , 2009. */ + +#include + +#include + +/* Check for required types. */ +struct +{ + size_t a; + uid_t b; + volatile sig_atomic_t c; + sigset_t d; + pid_t e; +#if 0 + /* Not guaranteed by gnulib. */ + pthread_t f; + struct timespec g; +#endif +} s; + +/* Check that NSIG is defined. */ +int nsig = NSIG; + +int +main (void) +{ + switch (0) + { + /* The following are guaranteed by C. */ + case 0: + case SIGABRT: + case SIGFPE: + case SIGILL: + case SIGINT: + case SIGSEGV: + case SIGTERM: + /* The following is guaranteed by gnulib. */ +#if GNULIB_SIGPIPE || defined SIGPIPE + case SIGPIPE: +#endif + /* Ensure no conflict with other standardized names. */ +#ifdef SIGALRM + case SIGALRM: +#endif + /* On Haiku, SIGBUS is mistakenly equal to SIGSEGV. */ +#if defined SIGBUS && SIGBUS != SIGSEGV + case SIGBUS: +#endif +#ifdef SIGCHLD + case SIGCHLD: +#endif +#ifdef SIGCONT + case SIGCONT: +#endif +#ifdef SIGHUP + case SIGHUP: +#endif +#ifdef SIGKILL + case SIGKILL: +#endif +#ifdef SIGQUIT + case SIGQUIT: +#endif +#ifdef SIGSTOP + case SIGSTOP: +#endif +#ifdef SIGTSTP + case SIGTSTP: +#endif +#ifdef SIGTTIN + case SIGTTIN: +#endif +#ifdef SIGTTOU + case SIGTTOU: +#endif +#ifdef SIGUSR1 + case SIGUSR1: +#endif +#ifdef SIGUSR2 + case SIGUSR2: +#endif +#ifdef SIGSYS + case SIGSYS: +#endif +#ifdef SIGTRAP + case SIGTRAP: +#endif +#ifdef SIGURG + case SIGURG: +#endif +#ifdef SIGVTALRM + case SIGVTALRM: +#endif +#ifdef SIGXCPU + case SIGXCPU: +#endif +#ifdef SIGXFSZ + case SIGXFSZ: +#endif + /* SIGRTMIN and SIGRTMAX need not be compile-time constants. */ +#if 0 +# ifdef SIGRTMIN + case SIGRTMIN: +# endif +# ifdef SIGRTMAX + case SIGRTMAX: +# endif +#endif + ; + } + return s.a + s.b + s.c + s.e; +} diff -Nru grep-3.1/gnulib-tests/test-sigprocmask.c grep-3.3/gnulib-tests/test-sigprocmask.c --- grep-3.1/gnulib-tests/test-sigprocmask.c 1970-01-01 00:00:00.000000000 +0000 +++ grep-3.3/gnulib-tests/test-sigprocmask.c 2018-06-24 23:16:49.000000000 +0000 @@ -0,0 +1,102 @@ +/* Test of sigprocmask. + Copyright (C) 2011-2018 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 , 2011. */ + +#include + +#include + +#include "signature.h" +SIGNATURE_CHECK (sigprocmask, int, (int, const sigset_t *, sigset_t *)); + +#include +#include +#include +#include + +#include "macros.h" + +#if !(defined _WIN32 && !defined __CYGWIN__) + +static volatile int sigint_occurred; + +static void +sigint_handler (int sig) +{ + sigint_occurred++; +} + +int +main (int argc, char *argv[]) +{ + sigset_t set; + pid_t pid = getpid (); + char command[80]; + + if (sizeof (int) < sizeof pid && 0x7fffffff < pid) + { + fputs ("Skipping test: pid too large\n", stderr); + return 77; + } + + signal (SIGINT, sigint_handler); + + sigemptyset (&set); + sigaddset (&set, SIGINT); + + /* Check error handling. */ + ASSERT (sigprocmask (1729, &set, NULL) == -1); + ASSERT (errno == EINVAL); + + /* Block SIGINT. */ + ASSERT (sigprocmask (SIG_BLOCK, &set, NULL) == 0); + + /* Request a SIGINT signal from outside. */ + sprintf (command, "sh -c 'sleep 1; kill -%d %d' &", SIGINT, (int) pid); + ASSERT (system (command) == 0); + + /* Wait. */ + sleep (2); + + /* The signal should not have arrived yet, because it is blocked. */ + ASSERT (sigint_occurred == 0); + + /* Unblock SIGINT. */ + ASSERT (sigprocmask (SIG_UNBLOCK, &set, NULL) == 0); + + /* The signal should have arrived now, because POSIX says + "If there are any pending unblocked signals after the call to + sigprocmask(), at least one of those signals shall be delivered + before the call to sigprocmask() returns." */ + ASSERT (sigint_occurred == 1); + + return 0; +} + +#else + +/* On native Windows, getpid() values and the arguments that are passed to + the (Cygwin?) 'kill' program are not necessarily related. */ + +int +main () +{ + fputs ("Skipping test: native Windows platform\n", stderr); + return 77; +} + +#endif diff -Nru grep-3.1/gnulib-tests/test-sleep.c grep-3.3/gnulib-tests/test-sleep.c --- grep-3.1/gnulib-tests/test-sleep.c 1970-01-01 00:00:00.000000000 +0000 +++ grep-3.3/gnulib-tests/test-sleep.c 2018-01-07 00:07:08.000000000 +0000 @@ -0,0 +1,58 @@ +/* Test of sleep() function. + Copyright (C) 2007-2018 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 , 2007. */ + +#include + +#include + +#include "signature.h" +SIGNATURE_CHECK (sleep, unsigned int, (unsigned int)); + +#include + +#include "macros.h" + +#if HAVE_DECL_ALARM +static void +handle_alarm (int sig) +{ + if (sig != SIGALRM) + _exit (1); +} +#endif + +int +main (void) +{ + ASSERT (sleep (1) <= 1); + + ASSERT (sleep (0) == 0); + +#if HAVE_DECL_ALARM + { + const unsigned int pentecost = 50 * 24 * 60 * 60; /* 50 days. */ + unsigned int remaining; + signal (SIGALRM, handle_alarm); + alarm (1); + remaining = sleep (pentecost); + ASSERT (pentecost - 10 < remaining && remaining <= pentecost); + } +#endif + + return 0; +} diff -Nru grep-3.1/gnulib-tests/test-snprintf.c grep-3.3/gnulib-tests/test-snprintf.c --- grep-3.1/gnulib-tests/test-snprintf.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/gnulib-tests/test-snprintf.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ /* Test of snprintf() function. - Copyright (C) 2007-2017 Free Software Foundation, Inc. + Copyright (C) 2007-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ /* Written by Bruno Haible , 2007. */ diff -Nru grep-3.1/gnulib-tests/test-sockets.c grep-3.3/gnulib-tests/test-sockets.c --- grep-3.1/gnulib-tests/test-sockets.c 1970-01-01 00:00:00.000000000 +0000 +++ grep-3.3/gnulib-tests/test-sockets.c 2018-01-07 00:07:08.000000000 +0000 @@ -0,0 +1,46 @@ +/* + * Copyright (C) 2008-2018 Free Software Foundation, Inc. + * Written by Simon Josefsson. + * + * 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 + +#include "sockets.h" + +int +main (void) +{ + int err; + + err = gl_sockets_startup (SOCKETS_1_1); + if (err != 0) + { + printf ("wsastartup failed %d\n", err); + return 1; + } + + err = gl_sockets_cleanup (); + if (err != 0) + { + printf ("wsacleanup failed %d\n", err); + return 1; + } + + (void) gl_fd_to_handle (0); + + return 0; +} diff -Nru grep-3.1/gnulib-tests/test-stat.c grep-3.3/gnulib-tests/test-stat.c --- grep-3.1/gnulib-tests/test-stat.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/gnulib-tests/test-stat.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ /* Tests of stat. - Copyright (C) 2009-2017 Free Software Foundation, Inc. + Copyright (C) 2009-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ /* Written by Eric Blake , 2009. */ diff -Nru grep-3.1/gnulib-tests/test-stat.h grep-3.3/gnulib-tests/test-stat.h --- grep-3.1/gnulib-tests/test-stat.h 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/gnulib-tests/test-stat.h 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ /* Tests of stat. - Copyright (C) 2009-2017 Free Software Foundation, Inc. + Copyright (C) 2009-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ /* Written by Eric Blake , 2009. */ diff -Nru grep-3.1/gnulib-tests/test-stat-time.c grep-3.3/gnulib-tests/test-stat-time.c --- grep-3.1/gnulib-tests/test-stat-time.c 1970-01-01 00:00:00.000000000 +0000 +++ grep-3.3/gnulib-tests/test-stat-time.c 2018-06-24 23:16:49.000000000 +0000 @@ -0,0 +1,248 @@ +/* Test of . + Copyright (C) 2007-2018 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 James Youngman , 2007. */ + +#include + +#include "stat-time.h" + +#include +#include +#include +#include +#include +#include + +#include "macros.h" + +#define BASE "test-stat-time.t" +#include "nap.h" + +enum { NFILES = 4 }; + +static char filename_stamp1[50]; +static char filename_testfile[50]; +static char filename_stamp2[50]; +static char filename_stamp3[50]; + +/* Use file names that are different at each run. + This is necessary for test_birthtime() to pass on native Windows: + On this platform, the file system apparently remembers the creation time + of a file even after it is removed and created anew. See + "Windows NT Contains File System Tunneling Capabilities" + */ +static void +initialize_filenames (void) +{ + long t = (long) time (NULL); + sprintf (filename_stamp1, "t-stt-%ld-stamp1", t); + sprintf (filename_testfile, "t-stt-%ld-testfile", t); + sprintf (filename_stamp2, "t-stt-%ld-stamp2", t); + sprintf (filename_stamp3, "t-stt-%ld-stamp3", t); +} + +static int +force_unlink (const char *filename) +{ + /* This chmod is necessary on mingw, where unlink() of a read-only file + fails with EPERM. */ + chmod (filename, 0600); + return unlink (filename); +} + +static void +cleanup (int sig) +{ + /* Remove temporary files. */ + force_unlink (filename_stamp1); + force_unlink (filename_testfile); + force_unlink (filename_stamp2); + force_unlink (filename_stamp3); + + if (sig != 0) + _exit (1); +} + +static int +open_file (const char *filename, int flags) +{ + int fd = open (filename, flags | O_WRONLY, 0500); + if (fd >= 0) + { + close (fd); + return 1; + } + else + { + return 0; + } +} + +static void +create_file (const char *filename) +{ + ASSERT (open_file (filename, O_CREAT | O_EXCL)); +} + +static void +do_stat (const char *filename, struct stat *p) +{ + ASSERT (stat (filename, p) == 0); +} + +static void +prepare_test (struct stat *statinfo, struct timespec *modtimes) +{ + int i; + + create_file (filename_stamp1); + nap (); + create_file (filename_testfile); + nap (); + create_file (filename_stamp2); + nap (); + ASSERT (chmod (filename_testfile, 0400) == 0); + nap (); + create_file (filename_stamp3); + + do_stat (filename_stamp1, &statinfo[0]); + do_stat (filename_testfile, &statinfo[1]); + do_stat (filename_stamp2, &statinfo[2]); + do_stat (filename_stamp3, &statinfo[3]); + + /* Now use our access functions. */ + for (i = 0; i < NFILES; ++i) + { + modtimes[i] = get_stat_mtime (&statinfo[i]); + } +} + +static void +test_mtime (const struct stat *statinfo, struct timespec *modtimes) +{ + int i; + + /* Use the struct stat fields directly. */ + /* mtime(stamp1) < mtime(stamp2) */ + ASSERT (statinfo[0].st_mtime < statinfo[2].st_mtime + || (statinfo[0].st_mtime == statinfo[2].st_mtime + && (get_stat_mtime_ns (&statinfo[0]) + < get_stat_mtime_ns (&statinfo[2])))); + /* mtime(stamp2) < mtime(stamp3) */ + ASSERT (statinfo[2].st_mtime < statinfo[3].st_mtime + || (statinfo[2].st_mtime == statinfo[3].st_mtime + && (get_stat_mtime_ns (&statinfo[2]) + < get_stat_mtime_ns (&statinfo[3])))); + + /* Now check the result of the access functions. */ + /* mtime(stamp1) < mtime(stamp2) */ + ASSERT (modtimes[0].tv_sec < modtimes[2].tv_sec + || (modtimes[0].tv_sec == modtimes[2].tv_sec + && modtimes[0].tv_nsec < modtimes[2].tv_nsec)); + /* mtime(stamp2) < mtime(stamp3) */ + ASSERT (modtimes[2].tv_sec < modtimes[3].tv_sec + || (modtimes[2].tv_sec == modtimes[3].tv_sec + && modtimes[2].tv_nsec < modtimes[3].tv_nsec)); + + /* verify equivalence */ + for (i = 0; i < NFILES; ++i) + { + struct timespec ts; + ts = get_stat_mtime (&statinfo[i]); + ASSERT (ts.tv_sec == statinfo[i].st_mtime); + } +} + +#if defined _WIN32 && !defined __CYGWIN__ +/* Skip the ctime tests on native Windows platforms, because their + st_ctime is either the same as st_mtime (plus or minus an offset) + or set to the file _creation_ time, and is not influenced by rename + or chmod. */ +# define test_ctime(ignored) ((void) 0) +#else +static void +test_ctime (const struct stat *statinfo) +{ + /* On some buggy NFS clients, mtime and ctime are disproportionately + skewed from one another. Skip this test in that case. */ + if (statinfo[0].st_mtime != statinfo[0].st_ctime) + return; + + /* mtime(stamp2) < ctime(testfile) */ + ASSERT (statinfo[2].st_mtime < statinfo[1].st_ctime + || (statinfo[2].st_mtime == statinfo[1].st_ctime + && (get_stat_mtime_ns (&statinfo[2]) + < get_stat_ctime_ns (&statinfo[1])))); +} +#endif + +static void +test_birthtime (const struct stat *statinfo, + const struct timespec *modtimes, + struct timespec *birthtimes) +{ + int i; + + /* Collect the birth times. */ + for (i = 0; i < NFILES; ++i) + { + birthtimes[i] = get_stat_birthtime (&statinfo[i]); + if (birthtimes[i].tv_nsec < 0) + return; + } + + /* mtime(stamp1) < birthtime(testfile) */ + ASSERT (modtimes[0].tv_sec < birthtimes[1].tv_sec + || (modtimes[0].tv_sec == birthtimes[1].tv_sec + && modtimes[0].tv_nsec < birthtimes[1].tv_nsec)); + /* birthtime(testfile) < mtime(stamp2) */ + ASSERT (birthtimes[1].tv_sec < modtimes[2].tv_sec + || (birthtimes[1].tv_sec == modtimes[2].tv_sec + && birthtimes[1].tv_nsec < modtimes[2].tv_nsec)); +} + +int +main (void) +{ + struct stat statinfo[NFILES]; + struct timespec modtimes[NFILES]; + struct timespec birthtimes[NFILES]; + + initialize_filenames (); + +#ifdef SIGHUP + signal (SIGHUP, cleanup); +#endif +#ifdef SIGINT + signal (SIGINT, cleanup); +#endif +#ifdef SIGQUIT + signal (SIGQUIT, cleanup); +#endif +#ifdef SIGTERM + signal (SIGTERM, cleanup); +#endif + + cleanup (0); + prepare_test (statinfo, modtimes); + test_mtime (statinfo, modtimes); + test_ctime (statinfo); + test_birthtime (statinfo, modtimes, birthtimes); + + cleanup (0); + return 0; +} diff -Nru grep-3.1/gnulib-tests/test-stdalign.c grep-3.3/gnulib-tests/test-stdalign.c --- grep-3.1/gnulib-tests/test-stdalign.c 2017-03-22 03:19:46.000000000 +0000 +++ grep-3.3/gnulib-tests/test-stdalign.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ /* Test of . - Copyright 2009-2017 Free Software Foundation, Inc. + Copyright 2009-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ /* Written by Paul Eggert, inspired by Bruno Haible's test-alignof.c. */ @@ -86,7 +86,7 @@ return 77; #elif defined __HP_cc && __ia64 /* Avoid a test failure due to HP-UX Itanium cc bug; see: - http://lists.gnu.org/archive/html/bug-gnulib/2017-03/msg00078.html */ + https://lists.gnu.org/r/bug-gnulib/2017-03/msg00078.html */ fputs ("Skipping test: known HP-UX Itanium cc compiler bug\n", stderr); return 77; #else diff -Nru grep-3.1/gnulib-tests/test-stdbool.c grep-3.3/gnulib-tests/test-stdbool.c --- grep-3.1/gnulib-tests/test-stdbool.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/gnulib-tests/test-stdbool.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ /* Test of substitute. - Copyright (C) 2002-2007, 2009-2017 Free Software Foundation, Inc. + Copyright (C) 2002-2007, 2009-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ /* Written by Bruno Haible , 2007. */ @@ -81,8 +81,8 @@ char o[sizeof n == m * sizeof n[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 + https://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html + https://lists.gnu.org/r/bug-coreutils/2005-11/msg00161.html */ _Bool q = true; _Bool *pq = &q; @@ -105,7 +105,7 @@ /* Catch a bug in IBM AIX xlc compiler version 6.0.0.0 reported by James Lemley on 2005-10-05; see - http://lists.gnu.org/archive/html/bug-coreutils/2005-10/msg00086.html + https://lists.gnu.org/r/bug-coreutils/2005-10/msg00086.html This is a runtime test, since a corresponding compile-time test would rely on initializer extensions. */ { diff -Nru grep-3.1/gnulib-tests/test-stddef.c grep-3.3/gnulib-tests/test-stddef.c --- grep-3.1/gnulib-tests/test-stddef.c 2017-02-16 06:53:58.000000000 +0000 +++ grep-3.3/gnulib-tests/test-stddef.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ /* Test of substitute. - Copyright (C) 2009-2017 Free Software Foundation, Inc. + Copyright (C) 2009-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ /* Written by Eric Blake , 2009. */ diff -Nru grep-3.1/gnulib-tests/test-stdint.c grep-3.3/gnulib-tests/test-stdint.c --- grep-3.1/gnulib-tests/test-stdint.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/gnulib-tests/test-stdint.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ /* Test of substitute. - Copyright (C) 2006-2017 Free Software Foundation, Inc. + Copyright (C) 2006-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ /* Written by Bruno Haible , 2006. */ diff -Nru grep-3.1/gnulib-tests/test-stdio.c grep-3.3/gnulib-tests/test-stdio.c --- grep-3.1/gnulib-tests/test-stdio.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/gnulib-tests/test-stdio.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ /* Test of substitute. - Copyright (C) 2007, 2009-2017 Free Software Foundation, Inc. + Copyright (C) 2007, 2009-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ /* Written by Bruno Haible , 2007. */ diff -Nru grep-3.1/gnulib-tests/test-stdlib.c grep-3.3/gnulib-tests/test-stdlib.c --- grep-3.1/gnulib-tests/test-stdlib.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/gnulib-tests/test-stdlib.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ /* Test of substitute. - Copyright (C) 2007, 2009-2017 Free Software Foundation, Inc. + Copyright (C) 2007, 2009-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ /* Written by Bruno Haible , 2007. */ diff -Nru grep-3.1/gnulib-tests/test-strerror.c grep-3.3/gnulib-tests/test-strerror.c --- grep-3.1/gnulib-tests/test-strerror.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/gnulib-tests/test-strerror.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ /* Test of strerror() function. - Copyright (C) 2007-2017 Free Software Foundation, Inc. + Copyright (C) 2007-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program; if not, see . */ /* Written by Eric Blake , 2007. */ diff -Nru grep-3.1/gnulib-tests/test-strerror_r.c grep-3.3/gnulib-tests/test-strerror_r.c --- grep-3.1/gnulib-tests/test-strerror_r.c 1970-01-01 00:00:00.000000000 +0000 +++ grep-3.3/gnulib-tests/test-strerror_r.c 2018-01-07 00:07:08.000000000 +0000 @@ -0,0 +1,181 @@ +/* Test of strerror_r() function. + Copyright (C) 2007-2018 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 . */ + +#include + +#include + +#include "signature.h" +SIGNATURE_CHECK (strerror_r, int, (int, char *, size_t)); + +#include + +#include "macros.h" + +int +main (void) +{ + char buf[100]; + int ret; + + /* Test results with valid errnum and enough room. */ + + errno = 0; + buf[0] = '\0'; + ASSERT (strerror_r (EACCES, buf, sizeof buf) == 0); + ASSERT (buf[0] != '\0'); + ASSERT (errno == 0); + ASSERT (strlen (buf) < sizeof buf); + + errno = 0; + buf[0] = '\0'; + ASSERT (strerror_r (ETIMEDOUT, buf, sizeof buf) == 0); + ASSERT (buf[0] != '\0'); + ASSERT (errno == 0); + ASSERT (strlen (buf) < sizeof buf); + + errno = 0; + buf[0] = '\0'; + ASSERT (strerror_r (EOVERFLOW, buf, sizeof buf) == 0); + ASSERT (buf[0] != '\0'); + ASSERT (errno == 0); + ASSERT (strlen (buf) < sizeof buf); + + /* POSIX requires strerror (0) to succeed. Reject use of "Unknown + error", but allow "Success", "No error", or even Solaris' "Error + 0" which are distinct patterns from true out-of-range strings. + http://austingroupbugs.net/view.php?id=382 */ + errno = 0; + buf[0] = '\0'; + ret = strerror_r (0, buf, sizeof buf); + ASSERT (ret == 0); + ASSERT (buf[0]); + ASSERT (errno == 0); + ASSERT (strstr (buf, "nknown") == NULL); + ASSERT (strstr (buf, "ndefined") == NULL); + + /* Test results with out-of-range errnum and enough room. POSIX + allows an empty string on success, and allows an unchanged buf on + error, but these are not useful, so we guarantee contents. */ + errno = 0; + buf[0] = '^'; + ret = strerror_r (-3, buf, sizeof buf); + ASSERT (ret == 0 || ret == EINVAL); + ASSERT (buf[0] != '^'); + ASSERT (*buf); + ASSERT (errno == 0); + ASSERT (strlen (buf) < sizeof buf); + + /* Test results with a too small buffer. POSIX requires an error; + only ERANGE for 0 and valid errors, and a choice of ERANGE or + EINVAL for out-of-range values. On error, POSIX permits buf to + be empty, unchanged, or unterminated, but these are not useful, + so we guarantee NUL-terminated truncated contents for all but + size 0. http://austingroupbugs.net/view.php?id=398. Also ensure + that no out-of-bounds writes occur. */ + { + int errs[] = { EACCES, 0, -3, }; + int j; + + buf[sizeof buf - 1] = '\0'; + for (j = 0; j < SIZEOF (errs); j++) + { + int err = errs[j]; + char buf2[sizeof buf] = ""; + size_t len; + size_t i; + + strerror_r (err, buf2, sizeof buf2); + len = strlen (buf2); + ASSERT (len < sizeof buf); + + for (i = 0; i <= len; i++) + { + memset (buf, '^', sizeof buf - 1); + errno = 0; + ret = strerror_r (err, buf, i); + ASSERT (errno == 0); + if (j == 2) + ASSERT (ret == ERANGE || ret == EINVAL); + else + ASSERT (ret == ERANGE); + if (i) + { + ASSERT (strncmp (buf, buf2, i - 1) == 0); + ASSERT (buf[i - 1] == '\0'); + } + ASSERT (strspn (buf + i, "^") == sizeof buf - 1 - i); + } + + strcpy (buf, "BADFACE"); + errno = 0; + ret = strerror_r (err, buf, len + 1); + ASSERT (ret != ERANGE); + ASSERT (errno == 0); + ASSERT (strcmp (buf, buf2) == 0); + } + } + +#if GNULIB_STRERROR + /* Test that strerror_r does not clobber strerror buffer. On some + platforms, this test can only succeed if gnulib also replaces + strerror. */ + { + const char *msg1; + const char *msg2; + const char *msg3; + const char *msg4; + char *str1; + char *str2; + char *str3; + char *str4; + + msg1 = strerror (ENOENT); + ASSERT (msg1); + str1 = strdup (msg1); + ASSERT (str1); + + msg2 = strerror (ERANGE); + ASSERT (msg2); + str2 = strdup (msg2); + ASSERT (str2); + + msg3 = strerror (-4); + ASSERT (msg3); + str3 = strdup (msg3); + ASSERT (str3); + + msg4 = strerror (1729576); + ASSERT (msg4); + str4 = strdup (msg4); + ASSERT (str4); + + strerror_r (EACCES, buf, sizeof buf); + strerror_r (-5, buf, sizeof buf); + ASSERT (msg1 == msg2 || msg1 == msg4 || STREQ (msg1, str1)); + ASSERT (msg2 == msg4 || STREQ (msg2, str2)); + ASSERT (msg3 == msg4 || STREQ (msg3, str3)); + ASSERT (STREQ (msg4, str4)); + + free (str1); + free (str2); + free (str3); + free (str4); + } +#endif + + return 0; +} diff -Nru grep-3.1/gnulib-tests/test-striconv.c grep-3.3/gnulib-tests/test-striconv.c --- grep-3.1/gnulib-tests/test-striconv.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/gnulib-tests/test-striconv.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ /* Test of character set conversion. - Copyright (C) 2007-2017 Free Software Foundation, Inc. + Copyright (C) 2007-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ /* Written by Bruno Haible , 2007. */ diff -Nru grep-3.1/gnulib-tests/test-string.c grep-3.3/gnulib-tests/test-string.c --- grep-3.1/gnulib-tests/test-string.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/gnulib-tests/test-string.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ /* Test of substitute. - Copyright (C) 2007, 2009-2017 Free Software Foundation, Inc. + Copyright (C) 2007, 2009-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ /* Written by Bruno Haible , 2007. */ diff -Nru grep-3.1/gnulib-tests/test-strnlen.c grep-3.3/gnulib-tests/test-strnlen.c --- grep-3.1/gnulib-tests/test-strnlen.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/gnulib-tests/test-strnlen.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010-2017 Free Software Foundation, Inc. + * Copyright (C) 2010-2018 Free Software Foundation, Inc. * Written by Eric Blake * * This program is free software: you can redistribute it and/or modify @@ -13,7 +13,7 @@ * 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 . */ + * along with this program. If not, see . */ #include diff -Nru grep-3.1/gnulib-tests/test-strstr.c grep-3.3/gnulib-tests/test-strstr.c --- grep-3.1/gnulib-tests/test-strstr.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/gnulib-tests/test-strstr.c 2018-09-19 05:04:26.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004, 2007-2017 Free Software Foundation, Inc. + * Copyright (C) 2004, 2007-2018 Free Software Foundation, Inc. * Written by Bruno Haible and Eric Blake * * This program is free software: you can redistribute it and/or modify @@ -13,7 +13,7 @@ * 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 . */ + * along with this program. If not, see . */ #include @@ -58,7 +58,7 @@ /* On some platforms, the memchr() functions reads past the first occurrence of the byte to be searched, leading to an out-of-bounds read access for strstr(). - See . + See . This is a bug in memchr(), see the Austin Group's clarification . */ const char *fix = "aBaaaaaaaaaaax"; @@ -275,5 +275,27 @@ free (haystack); } + /* Test long needles. */ + { + size_t m = 1024; + char *haystack = (char *) malloc (2 * m + 1); + char *needle = (char *) malloc (m + 1); + if (haystack != NULL && needle != NULL) + { + const char *p; + haystack[0] = 'x'; + memset (haystack + 1, ' ', m - 1); + memset (haystack + m, 'x', m); + haystack[2 * m] = '\0'; + memset (needle, 'x', m); + needle[m] = '\0'; + p = strstr (haystack, needle); + ASSERT (p); + ASSERT (p - haystack == m); + } + free (needle); + free (haystack); + } + return 0; } diff -Nru grep-3.1/gnulib-tests/test-strtoimax.c grep-3.3/gnulib-tests/test-strtoimax.c --- grep-3.1/gnulib-tests/test-strtoimax.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/gnulib-tests/test-strtoimax.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2011-2017 Free Software Foundation, Inc. + * Copyright (C) 2011-2018 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 @@ -12,7 +12,7 @@ * 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 . */ + * along with this program. If not, see . */ #include diff -Nru grep-3.1/gnulib-tests/test-strtoll.c grep-3.3/gnulib-tests/test-strtoll.c --- grep-3.1/gnulib-tests/test-strtoll.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/gnulib-tests/test-strtoll.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2011-2017 Free Software Foundation, Inc. + * Copyright (C) 2011-2018 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 @@ -12,7 +12,7 @@ * 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 . */ + * along with this program. If not, see . */ #include diff -Nru grep-3.1/gnulib-tests/test-strtoull.c grep-3.3/gnulib-tests/test-strtoull.c --- grep-3.1/gnulib-tests/test-strtoull.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/gnulib-tests/test-strtoull.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2011-2017 Free Software Foundation, Inc. + * Copyright (C) 2011-2018 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 @@ -12,7 +12,7 @@ * 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 . */ + * along with this program. If not, see . */ #include diff -Nru grep-3.1/gnulib-tests/test-strtoumax.c grep-3.3/gnulib-tests/test-strtoumax.c --- grep-3.1/gnulib-tests/test-strtoumax.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/gnulib-tests/test-strtoumax.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2011-2017 Free Software Foundation, Inc. + * Copyright (C) 2011-2018 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 @@ -12,7 +12,7 @@ * 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 . */ + * along with this program. If not, see . */ #include diff -Nru grep-3.1/gnulib-tests/test-symlink.c grep-3.3/gnulib-tests/test-symlink.c --- grep-3.1/gnulib-tests/test-symlink.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/gnulib-tests/test-symlink.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ /* Tests of symlink. - Copyright (C) 2009-2017 Free Software Foundation, Inc. + Copyright (C) 2009-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ /* Written by Eric Blake , 2009. */ diff -Nru grep-3.1/gnulib-tests/test-symlink.h grep-3.3/gnulib-tests/test-symlink.h --- grep-3.1/gnulib-tests/test-symlink.h 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/gnulib-tests/test-symlink.h 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ /* Tests of symlink. - Copyright (C) 2009-2017 Free Software Foundation, Inc. + Copyright (C) 2009-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ /* Written by Eric Blake , 2009. */ diff -Nru grep-3.1/gnulib-tests/test-sys_ioctl.c grep-3.3/gnulib-tests/test-sys_ioctl.c --- grep-3.1/gnulib-tests/test-sys_ioctl.c 1970-01-01 00:00:00.000000000 +0000 +++ grep-3.3/gnulib-tests/test-sys_ioctl.c 2018-01-07 00:07:08.000000000 +0000 @@ -0,0 +1,27 @@ +/* Test of substitute. + Copyright (C) 2009-2018 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 Eric Blake , 2009. */ + +#include + +#include + +int +main (void) +{ + return 0; +} diff -Nru grep-3.1/gnulib-tests/test-sys_select.c grep-3.3/gnulib-tests/test-sys_select.c --- grep-3.1/gnulib-tests/test-sys_select.c 1970-01-01 00:00:00.000000000 +0000 +++ grep-3.3/gnulib-tests/test-sys_select.c 2018-01-07 00:07:08.000000000 +0000 @@ -0,0 +1,59 @@ +/* Test of substitute. + Copyright (C) 2007-2018 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 , 2007. */ + +#include + +#include + +#include "signature.h" + +/* The following may be macros without underlying functions, so only + check signature if they are not macros. */ +#ifndef FD_CLR +SIGNATURE_CHECK (FD_CLR, void, (int, fd_set *)); +#endif +#ifndef FD_ISSET +SIGNATURE_CHECK (FD_ISSET, void, (int, fd_set *)); +#endif +#ifndef FD_SET +SIGNATURE_CHECK (FD_SET, int, (int, fd_set *)); +#endif +#ifndef FD_ZERO +SIGNATURE_CHECK (FD_ZERO, void, (fd_set *)); +#endif + +/* Check that the 'struct timeval' type is defined. */ +struct timeval a; + +/* Check that a.tv_sec is wide enough to hold a time_t, ignoring + signedness issues. */ +typedef int verify_tv_sec_type[sizeof (time_t) <= sizeof (a.tv_sec) ? 1 : -1]; + +/* Check that sigset_t is defined. */ +sigset_t t2; + +int +main (void) +{ + /* Check that FD_ZERO can be used. This should not yield a warning + such as "warning: implicit declaration of function 'memset'". */ + fd_set fds; + FD_ZERO (&fds); + + return 0; +} diff -Nru grep-3.1/gnulib-tests/test-sys_socket.c grep-3.3/gnulib-tests/test-sys_socket.c --- grep-3.1/gnulib-tests/test-sys_socket.c 1970-01-01 00:00:00.000000000 +0000 +++ grep-3.3/gnulib-tests/test-sys_socket.c 2018-01-07 00:07:08.000000000 +0000 @@ -0,0 +1,68 @@ +/* Test of substitute. + Copyright (C) 2007, 2009-2018 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 , 2007. */ + +#include + +#include + +#include + +#if HAVE_SHUTDOWN +/* Check some integer constant expressions. */ +int a[] = { SHUT_RD, SHUT_WR, SHUT_RDWR }; +#endif + +/* Check that the 'socklen_t' type is defined. */ +socklen_t t1; + +/* Check that the 'size_t' and 'ssize_t' types are defined. */ +size_t t2; +ssize_t t3; + +/* Check that 'struct iovec' is defined. */ +struct iovec io; + +/* Check that a minimal set of 'struct msghdr' is defined. */ +struct msghdr msg; + +int +main (void) +{ + struct sockaddr_storage x; + sa_family_t i; + + /* Check some errno values. */ + switch (ENOTSOCK) + { + case ENOTSOCK: + case EADDRINUSE: + case ENETRESET: + case ECONNABORTED: + case ECONNRESET: + case ENOTCONN: + case ESHUTDOWN: + break; + } + + x.ss_family = 42; + i = 42; + msg.msg_iov = &io; + + return (x.ss_family - i + msg.msg_namelen + msg.msg_iov->iov_len + + msg.msg_iovlen); +} diff -Nru grep-3.1/gnulib-tests/test-sys_stat.c grep-3.3/gnulib-tests/test-sys_stat.c --- grep-3.1/gnulib-tests/test-sys_stat.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/gnulib-tests/test-sys_stat.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ /* Test of substitute. - Copyright (C) 2007-2017 Free Software Foundation, Inc. + Copyright (C) 2007-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ /* Written by Bruno Haible , 2007. */ diff -Nru grep-3.1/gnulib-tests/test-sys_time.c grep-3.3/gnulib-tests/test-sys_time.c --- grep-3.1/gnulib-tests/test-sys_time.c 1970-01-01 00:00:00.000000000 +0000 +++ grep-3.3/gnulib-tests/test-sys_time.c 2018-01-07 00:07:08.000000000 +0000 @@ -0,0 +1,34 @@ +/* Test of substitute. + Copyright (C) 2007, 2009-2018 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 , 2007. */ + +#include + +#include + +/* Check that the 'struct timeval' type is defined. */ +struct timeval a; + +/* Check that a.tv_sec is wide enough to hold a time_t, ignoring + signedness issues. */ +typedef int verify_tv_sec_type[sizeof (time_t) <= sizeof (a.tv_sec) ? 1 : -1]; + +int +main (void) +{ + return 0; +} diff -Nru grep-3.1/gnulib-tests/test-sys_types.c grep-3.3/gnulib-tests/test-sys_types.c --- grep-3.1/gnulib-tests/test-sys_types.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/gnulib-tests/test-sys_types.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ /* Test of substitute. - Copyright (C) 2011-2017 Free Software Foundation, Inc. + Copyright (C) 2011-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ /* Written by Bruno Haible , 2011. */ diff -Nru grep-3.1/gnulib-tests/test-sys_uio.c grep-3.3/gnulib-tests/test-sys_uio.c --- grep-3.1/gnulib-tests/test-sys_uio.c 1970-01-01 00:00:00.000000000 +0000 +++ grep-3.3/gnulib-tests/test-sys_uio.c 2018-01-07 00:07:08.000000000 +0000 @@ -0,0 +1,32 @@ +/* Test of substitute. + Copyright (C) 2011-2018 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 Eric Blake , 2011. */ + +#include + +#include + +/* Check that necessary types are defined. */ +size_t a; +ssize_t b; +struct iovec c; + +int +main (void) +{ + return a + b + !!c.iov_base + c.iov_len; +} diff -Nru grep-3.1/gnulib-tests/test-sys_wait.h grep-3.3/gnulib-tests/test-sys_wait.h --- grep-3.1/gnulib-tests/test-sys_wait.h 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/gnulib-tests/test-sys_wait.h 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ /* Test of macros shared between and . - Copyright (C) 2010-2017 Free Software Foundation, Inc. + Copyright (C) 2010-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ /* Written by Eric Blake , 2010. */ diff -Nru grep-3.1/gnulib-tests/test-time.c grep-3.3/gnulib-tests/test-time.c --- grep-3.1/gnulib-tests/test-time.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/gnulib-tests/test-time.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ /* Test of substitute. - Copyright (C) 2007, 2009-2017 Free Software Foundation, Inc. + Copyright (C) 2007, 2009-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ /* Written by Bruno Haible , 2007. */ diff -Nru grep-3.1/gnulib-tests/test-unistd.c grep-3.3/gnulib-tests/test-unistd.c --- grep-3.1/gnulib-tests/test-unistd.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/gnulib-tests/test-unistd.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ /* Test of substitute. - Copyright (C) 2007, 2009-2017 Free Software Foundation, Inc. + Copyright (C) 2007, 2009-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ /* Written by Bruno Haible , 2007. */ diff -Nru grep-3.1/gnulib-tests/test-unsetenv.c grep-3.3/gnulib-tests/test-unsetenv.c --- grep-3.1/gnulib-tests/test-unsetenv.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/gnulib-tests/test-unsetenv.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ /* Tests of unsetenv. - Copyright (C) 2009-2017 Free Software Foundation, Inc. + Copyright (C) 2009-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ /* Written by Eric Blake , 2009. */ diff -Nru grep-3.1/gnulib-tests/test-vasnprintf.c grep-3.3/gnulib-tests/test-vasnprintf.c --- grep-3.1/gnulib-tests/test-vasnprintf.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/gnulib-tests/test-vasnprintf.c 2018-12-15 18:14:26.000000000 +0000 @@ -1,5 +1,5 @@ /* Test of vasnprintf() and asnprintf() functions. - Copyright (C) 2007-2017 Free Software Foundation, Inc. + Copyright (C) 2007-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ /* Written by Bruno Haible , 2007. */ @@ -53,7 +53,34 @@ ASSERT (result != NULL); ASSERT (strcmp (result, "12345") == 0); ASSERT (length == 5); - if (size < 6) + if (size < 5 + 1) + ASSERT (result != buf); + ASSERT (memcmp (buf + size, &"DEADBEEF"[size], 8 - size) == 0); + if (result != buf) + free (result); + } + + /* Note: This test assumes IEEE 754 representation of 'double' floats. */ + for (size = 0; size <= 8; size++) + { + size_t length; + char *result; + + memcpy (buf, "DEADBEEF", 8); + length = size; + result = my_asnprintf (buf, &length, "%2.0f", 1.6314159265358979e+125); + ASSERT (result != NULL); + /* The exact result and the result on glibc systems is + 163141592653589790215729350939528493057529598899734151772468186268423257777068536614838678161083520756952076273094236944990208 + On Cygwin, the result is + 163141592653589790215729350939528493057529600000000000000000000000000000000000000000000000000000000000000000000000000000000000 + On HP-UX 11.31 / hppa and IRIX 6.5, the result is + 163141592653589790000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 + */ + ASSERT (strlen (result) == 126); + ASSERT (memcmp (result, "163141592653589790", 18) == 0); + ASSERT (length == 126); + if (size < 126 + 1) ASSERT (result != buf); ASSERT (memcmp (buf + size, &"DEADBEEF"[size], 8 - size) == 0); if (result != buf) diff -Nru grep-3.1/gnulib-tests/test-vc-list-files-cvs.sh grep-3.3/gnulib-tests/test-vc-list-files-cvs.sh --- grep-3.1/gnulib-tests/test-vc-list-files-cvs.sh 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/gnulib-tests/test-vc-list-files-cvs.sh 2018-01-07 00:07:08.000000000 +0000 @@ -1,6 +1,6 @@ #!/bin/sh # Unit tests for vc-list-files -# Copyright (C) 2008-2017 Free Software Foundation, Inc. +# Copyright (C) 2008-2018 Free Software Foundation, Inc. # This file is part of the GNUlib Library. # # This program is free software: you can redistribute it and/or modify @@ -14,7 +14,7 @@ # 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 . */ +# along with this program. If not, see . */ : ${srcdir=.} . "$srcdir/init.sh"; path_prepend_ "$abs_aux_dir" . diff -Nru grep-3.1/gnulib-tests/test-vc-list-files-git.sh grep-3.3/gnulib-tests/test-vc-list-files-git.sh --- grep-3.1/gnulib-tests/test-vc-list-files-git.sh 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/gnulib-tests/test-vc-list-files-git.sh 2018-01-07 00:07:08.000000000 +0000 @@ -1,6 +1,6 @@ #!/bin/sh # Unit tests for vc-list-files -# Copyright (C) 2008-2017 Free Software Foundation, Inc. +# Copyright (C) 2008-2018 Free Software Foundation, Inc. # This file is part of the GNUlib Library. # # This program is free software: you can redistribute it and/or modify @@ -14,7 +14,7 @@ # 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 . */ +# along with this program. If not, see . */ : ${srcdir=.} . "$srcdir/init.sh"; path_prepend_ "$abs_aux_dir" . diff -Nru grep-3.1/gnulib-tests/test-verify.c grep-3.3/gnulib-tests/test-verify.c --- grep-3.1/gnulib-tests/test-verify.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/gnulib-tests/test-verify.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,6 +1,6 @@ /* Test the "verify" module. - Copyright (C) 2005, 2009-2017 Free Software Foundation, Inc. + Copyright (C) 2005, 2009-2018 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 @@ -13,7 +13,7 @@ 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 . */ + along with this program. If not, see . */ /* Written by Bruno Haible. */ diff -Nru grep-3.1/gnulib-tests/test-verify-try.c grep-3.3/gnulib-tests/test-verify-try.c --- grep-3.1/gnulib-tests/test-verify-try.c 2017-05-14 01:09:51.000000000 +0000 +++ grep-3.3/gnulib-tests/test-verify-try.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,6 +1,6 @@ /* Test the "verify" module. - Copyright (C) 2017 Free Software Foundation, Inc. + Copyright (C) 2017-2018 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 @@ -13,7 +13,7 @@ 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 . */ + along with this program. If not, see . */ /* This is a separate source file, so that the execution of test-verify.sh does not interfere with the building of the 'test-verify' program. */ diff -Nru grep-3.1/gnulib-tests/test-version-etc.c grep-3.3/gnulib-tests/test-version-etc.c --- grep-3.1/gnulib-tests/test-version-etc.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/gnulib-tests/test-version-etc.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ /* Test suite for version-etc. - Copyright (C) 2009-2017 Free Software Foundation, Inc. + Copyright (C) 2009-2018 Free Software Foundation, Inc. This file is part of the GNUlib Library. This program is free software: you can redistribute it and/or modify @@ -13,7 +13,7 @@ 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 . */ + along with this program. If not, see . */ #include diff -Nru grep-3.1/gnulib-tests/test-version-etc.sh grep-3.3/gnulib-tests/test-version-etc.sh --- grep-3.1/gnulib-tests/test-version-etc.sh 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/gnulib-tests/test-version-etc.sh 2018-04-21 23:36:13.000000000 +0000 @@ -1,6 +1,6 @@ #! /bin/sh # Test suite for version-etc. -# Copyright (C) 2009-2017 Free Software Foundation, Inc. +# Copyright (C) 2009-2018 Free Software Foundation, Inc. # This file is part of the GNUlib Library. # # This program is free software: you can redistribute it and/or modify @@ -14,7 +14,9 @@ # 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 . +# along with this program. If not, see . + +. "${srcdir=.}/init.sh"; path_prepend_ . TMP=ve-expected.tmp LC_ALL=C @@ -24,19 +26,19 @@ cat > $TMP <. +License GPLv3+: GNU GPL version 3 or later . This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Written by Sergey Poznyakoff and Eric Blake. EOT -./test-version-etc${EXEEXT} --version | +test-version-etc${EXEEXT} --version | sed '1s/test-version-etc (.*) .*/test-version-etc (PROJECT) VERSION/ /^Packaged by/d 2,3 s/Copyright (C) [0-9]\{4,4\}/COPYRIGHT/' | tr -d '\015' | - diff -c $TMP - || ERR=1 + compare $TMP - || ERR=1 rm $TMP diff -Nru grep-3.1/gnulib-tests/test-wchar.c grep-3.3/gnulib-tests/test-wchar.c --- grep-3.1/gnulib-tests/test-wchar.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/gnulib-tests/test-wchar.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ /* Test of substitute. - Copyright (C) 2007-2017 Free Software Foundation, Inc. + Copyright (C) 2007-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ /* Written by Bruno Haible , 2007. */ diff -Nru grep-3.1/gnulib-tests/test-wcrtomb.c grep-3.3/gnulib-tests/test-wcrtomb.c --- grep-3.1/gnulib-tests/test-wcrtomb.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/gnulib-tests/test-wcrtomb.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ /* Test of conversion of wide character to multibyte character. - Copyright (C) 2008-2017 Free Software Foundation, Inc. + Copyright (C) 2008-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ /* Written by Bruno Haible , 2008. */ diff -Nru grep-3.1/gnulib-tests/test-wcrtomb-w32.c grep-3.3/gnulib-tests/test-wcrtomb-w32.c --- grep-3.1/gnulib-tests/test-wcrtomb-w32.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/gnulib-tests/test-wcrtomb-w32.c 2018-06-24 23:16:49.000000000 +0000 @@ -1,5 +1,5 @@ /* Test of conversion of wide character to multibyte character. - Copyright (C) 2008-2017 Free Software Foundation, Inc. + Copyright (C) 2008-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ #include @@ -25,7 +25,7 @@ #include "macros.h" -#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ +#if defined _WIN32 && !defined __CYGWIN__ static int test_one_locale (const char *name, int codepage) diff -Nru grep-3.1/gnulib-tests/test-wctype-h.c grep-3.3/gnulib-tests/test-wctype-h.c --- grep-3.1/gnulib-tests/test-wctype-h.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/gnulib-tests/test-wctype-h.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ /* Test of substitute. - Copyright (C) 2007-2017 Free Software Foundation, Inc. + Copyright (C) 2007-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ /* Written by Bruno Haible , 2007. */ diff -Nru grep-3.1/gnulib-tests/test-wcwidth.c grep-3.3/gnulib-tests/test-wcwidth.c --- grep-3.1/gnulib-tests/test-wcwidth.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/gnulib-tests/test-wcwidth.c 2018-09-19 05:04:26.000000000 +0000 @@ -1,5 +1,5 @@ /* Test of wcwidth() function. - Copyright (C) 2007-2017 Free Software Foundation, Inc. + Copyright (C) 2007-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ /* Written by Bruno Haible , 2007. */ @@ -35,10 +35,12 @@ { wchar_t wc; -#ifdef C_CTYPE_ASCII +#if !GNULIB_WCHAR_SINGLE +# ifdef C_CTYPE_ASCII /* Test width of ASCII characters. */ for (wc = 0x20; wc < 0x7F; wc++) ASSERT (wcwidth (wc) == 1); +# endif #endif /* Switch to an UTF-8 locale. */ diff -Nru grep-3.1/gnulib-tests/test-xalloc-die.c grep-3.3/gnulib-tests/test-xalloc-die.c --- grep-3.1/gnulib-tests/test-xalloc-die.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/gnulib-tests/test-xalloc-die.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ /* Test of xalloc_die() function. - Copyright (C) 2009-2017 Free Software Foundation, Inc. + Copyright (C) 2009-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ /* Written by Simon Josefsson , 2009. */ diff -Nru grep-3.1/gnulib-tests/test-xalloc-die.sh grep-3.3/gnulib-tests/test-xalloc-die.sh --- grep-3.1/gnulib-tests/test-xalloc-die.sh 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/gnulib-tests/test-xalloc-die.sh 2018-01-07 00:07:08.000000000 +0000 @@ -1,6 +1,6 @@ #!/bin/sh # Test suite for xalloc_die. -# Copyright (C) 2009-2017 Free Software Foundation, Inc. +# Copyright (C) 2009-2018 Free Software Foundation, Inc. # This file is part of the GNUlib Library. # # This program is free software: you can redistribute it and/or modify @@ -14,7 +14,7 @@ # 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 . +# along with this program. If not, see . . "${srcdir=.}/init.sh"; path_prepend_ . diff -Nru grep-3.1/gnulib-tests/test-xstrtol.c grep-3.3/gnulib-tests/test-xstrtol.c --- grep-3.1/gnulib-tests/test-xstrtol.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/gnulib-tests/test-xstrtol.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ /* Test of xstrtol module. - Copyright (C) 1995-1996, 1998-2001, 2003-2017 Free Software Foundation, Inc. + Copyright (C) 1995-1996, 1998-2001, 2003-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ #include diff -Nru grep-3.1/gnulib-tests/unistr/test-u8-mbtoucr.c grep-3.3/gnulib-tests/unistr/test-u8-mbtoucr.c --- grep-3.1/gnulib-tests/unistr/test-u8-mbtoucr.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/gnulib-tests/unistr/test-u8-mbtoucr.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ /* Test of u8_mbtoucr() function. - Copyright (C) 2010-2017 Free Software Foundation, Inc. + Copyright (C) 2010-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ /* Written by Bruno Haible , 2010. */ diff -Nru grep-3.1/gnulib-tests/unistr/test-u8-uctomb.c grep-3.3/gnulib-tests/unistr/test-u8-uctomb.c --- grep-3.1/gnulib-tests/unistr/test-u8-uctomb.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/gnulib-tests/unistr/test-u8-uctomb.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ /* Test of u8_uctomb() function. - Copyright (C) 2010-2017 Free Software Foundation, Inc. + Copyright (C) 2010-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ /* Written by Bruno Haible , 2010. */ diff -Nru grep-3.1/gnulib-tests/uniwidth/test-uc_width2.c grep-3.3/gnulib-tests/uniwidth/test-uc_width2.c --- grep-3.1/gnulib-tests/uniwidth/test-uc_width2.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/gnulib-tests/uniwidth/test-uc_width2.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ /* Test of uc_width() function. - Copyright (C) 2007-2017 Free Software Foundation, Inc. + Copyright (C) 2007-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ /* Written by Bruno Haible , 2008. */ diff -Nru grep-3.1/gnulib-tests/uniwidth/test-uc_width2.sh grep-3.3/gnulib-tests/uniwidth/test-uc_width2.sh --- grep-3.1/gnulib-tests/uniwidth/test-uc_width2.sh 2016-11-21 17:32:00.000000000 +0000 +++ grep-3.3/gnulib-tests/uniwidth/test-uc_width2.sh 2018-01-07 00:07:08.000000000 +0000 @@ -65,8 +65,8 @@ 0829..082D 0 082E..0858 A 0859..085B 0 -085C..08E2 A -08E3..0902 0 +085C..08D3 A +08D4..0902 0 0903..0939 A 093A 0 093B A @@ -251,7 +251,9 @@ 17DD 0 17DE..180A A 180B..180E 0 -180F..18A8 A +180F..1884 A +1885..1886 0 +1887..18A8 A 18A9 0 18AA..191F A 1920..1922 0 @@ -327,8 +329,8 @@ 1CF8..1CF9 0 1CFA..1DBF A 1DC0..1DF5 0 -1DF6..1DFB A -1DFC..1DFF 0 +1DF6..1DFA A +1DFB..1DFF 0 1E00..200A A 200B..200F 0 2010..2029 A @@ -376,8 +378,8 @@ A80C..A824 A A825..A826 0 A827..A8C3 A -A8C4 0 -A8C5..A8DF A +A8C4..A8C5 0 +A8C6..A8DF A A8E0..A8F1 0 A8F2..A925 A A926..A92D 0 @@ -493,7 +495,9 @@ 11234 0 11235 1 11236..11237 0 -11238..112DE 1 +11238..1123D 1 +1123E 0 +1123F..112DE 1 112DF 0 112E0..112E2 1 112E3..112EA 0 @@ -507,7 +511,13 @@ 11366..1136C 0 1136D..1136F 1 11370..11374 0 -11375..114B2 1 +11375..11437 1 +11438..1143F 0 +11440..11441 1 +11442..11444 0 +11445 1 +11446 0 +11447..114B2 1 114B3..114B8 0 114B9 1 114BA 0 @@ -543,7 +553,19 @@ 11722..11725 0 11726 1 11727..1172B 0 -1172C..16AEF 1 +1172C..11C2F 1 +11C30..11C36 0 +11C37 1 +11C38..11C3D 0 +11C3E..11C91 1 +11C92..11CA7 0 +11CA8..11CA9 1 +11CAA..11CB0 0 +11CB1 1 +11CB2..11CB3 0 +11CB4 1 +11CB5..11CB6 0 +11CB7..16AEF 1 16AF0..16AF4 0 16AF5..16B2F 1 16B30..16B36 0 @@ -575,9 +597,21 @@ 1DA9B..1DA9F 0 1DAA0 1 1DAA1..1DAAF 0 -1DAB0..1E8CF 1 +1DAB0..1DFFF 1 +1E000..1E006 0 +1E007 1 +1E008..1E018 0 +1E019..1E01A 1 +1E01B..1E021 0 +1E022 1 +1E023..1E024 0 +1E025 1 +1E026..1E02A 0 +1E02B..1E8CF 1 1E8D0..1E8D6 0 -1E8D7..1FFFF 1 +1E8D7..1E943 1 +1E944..1E94A 0 +1E94B..1FFFF 1 20000..3FFFF 2 40000..E0000 1 E0001 0 diff -Nru grep-3.1/gnulib-tests/uniwidth/test-uc_width.c grep-3.3/gnulib-tests/uniwidth/test-uc_width.c --- grep-3.1/gnulib-tests/uniwidth/test-uc_width.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/gnulib-tests/uniwidth/test-uc_width.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ /* Test of uc_width() function. - Copyright (C) 2007-2017 Free Software Foundation, Inc. + Copyright (C) 2007-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ /* Written by Bruno Haible , 2007. */ diff -Nru grep-3.1/gnulib-tests/unsetenv.c grep-3.3/gnulib-tests/unsetenv.c --- grep-3.1/gnulib-tests/unsetenv.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/gnulib-tests/unsetenv.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (C) 1992, 1995-2002, 2005-2017 Free Software Foundation, Inc. +/* Copyright (C) 1992, 1995-2002, 2005-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ /* Don't use __attribute__ __nonnull__ in this compilation unit. Otherwise gcc optimizes away the name == NULL test below. */ diff -Nru grep-3.1/gnulib-tests/unused-parameter.h grep-3.3/gnulib-tests/unused-parameter.h --- grep-3.1/gnulib-tests/unused-parameter.h 2017-03-17 04:34:41.000000000 +0000 +++ grep-3.3/gnulib-tests/unused-parameter.h 2018-01-07 00:08:01.000000000 +0000 @@ -1,5 +1,5 @@ /* A C macro for declaring that specific function parameters are not used. - Copyright (C) 2008-2017 Free Software Foundation, Inc. + Copyright (C) 2008-2018 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 @@ -12,7 +12,7 @@ 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 . */ + 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 diff -Nru grep-3.1/gnulib-tests/vasnprintf.c grep-3.3/gnulib-tests/vasnprintf.c --- grep-3.1/gnulib-tests/vasnprintf.c 2017-05-21 00:32:47.000000000 +0000 +++ grep-3.3/gnulib-tests/vasnprintf.c 2018-10-16 23:22:22.000000000 +0000 @@ -1,5 +1,5 @@ /* vsprintf with automatic memory allocation. - Copyright (C) 1999, 2002-2017 Free Software Foundation, Inc. + Copyright (C) 1999, 2002-2018 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 @@ -12,7 +12,7 @@ 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 . */ + with this program; if not, see . */ /* This file can be parametrized with the following macros: VASNPRINTF The name of the function being defined. @@ -860,7 +860,9 @@ size_t a_len = a.nlimbs; /* 0.03345 is slightly larger than log(2)/(9*log(10)). */ size_t c_len = 9 * ((size_t)(a_len * (GMP_LIMB_BITS * 0.03345f)) + 1); - char *c_ptr = (char *) malloc (xsum (c_len, extra_zeroes)); + /* We need extra_zeroes bytes for zeroes, followed by c_len bytes for the + digits of a, followed by 1 byte for the terminating NUL. */ + char *c_ptr = (char *) malloc (xsum (xsum (extra_zeroes, c_len), 1)); if (c_ptr != NULL) { char *d_ptr = c_ptr; @@ -2694,7 +2696,7 @@ errno = EILSEQ; return NULL; } - if (precision < count) + if (precision < (unsigned int) count) break; arg_end++; characters += count; @@ -4243,7 +4245,7 @@ static const wchar_t decimal_format[] = /* Produce the same number of exponent digits as the native printf implementation. */ -# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +# if defined _WIN32 && ! defined __CYGWIN__ { '%', '+', '.', '3', 'd', '\0' }; # else { '%', '+', '.', '2', 'd', '\0' }; @@ -4257,7 +4259,7 @@ static const char decimal_format[] = /* Produce the same number of exponent digits as the native printf implementation. */ -# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +# if defined _WIN32 && ! defined __CYGWIN__ "%+.3d"; # else "%+.2d"; @@ -4436,7 +4438,7 @@ static const wchar_t decimal_format[] = /* Produce the same number of exponent digits as the native printf implementation. */ -# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +# if defined _WIN32 && ! defined __CYGWIN__ { '%', '+', '.', '3', 'd', '\0' }; # else { '%', '+', '.', '2', 'd', '\0' }; @@ -4450,7 +4452,7 @@ static const char decimal_format[] = /* Produce the same number of exponent digits as the native printf implementation. */ -# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +# if defined _WIN32 && ! defined __CYGWIN__ "%+.3d"; # else "%+.2d"; @@ -4508,7 +4510,7 @@ *p++ = '+'; /* Produce the same number of exponent digits as the native printf implementation. */ -# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +# if defined _WIN32 && ! defined __CYGWIN__ *p++ = '0'; # endif *p++ = '0'; @@ -4836,7 +4838,7 @@ #if HAVE_LONG_LONG_INT case TYPE_LONGLONGINT: case TYPE_ULONGLONGINT: -# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +# if defined _WIN32 && ! defined __CYGWIN__ *fbp++ = 'I'; *fbp++ = '6'; *fbp++ = '4'; @@ -4869,7 +4871,10 @@ #endif *fbp = dp->conversion; #if USE_SNPRINTF -# if !(((__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 3)) && !defined __UCLIBC__) || ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__)) +# if ! (((__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 3)) \ + && !defined __UCLIBC__) \ + || (defined __APPLE__ && defined __MACH__) \ + || (defined _WIN32 && ! defined __CYGWIN__)) fbp[1] = '%'; fbp[2] = 'n'; fbp[3] = '\0'; @@ -4883,6 +4888,13 @@ in format strings in writable memory may crash the program (if compiled with _FORTIFY_SOURCE=2), so we should avoid it in this situation. */ + /* On Mac OS X 10.3 or newer, we know that snprintf's return + value conforms to ISO C 99: the tests gl_SNPRINTF_RETVAL_C99 + and gl_SNPRINTF_TRUNCATION_C99 pass. + Therefore we can avoid using %n in this situation. + On Mac OS X 10.13 or newer, the use of %n in format strings + in writable memory by default crashes the program, so we + should avoid it in this situation. */ /* On native Windows systems (such as mingw), we can avoid using %n because: - Although the gl_SNPRINTF_TRUNCATION_C99 test fails, @@ -4895,8 +4907,8 @@ On native Windows systems (such as mingw) where the OS is Windows Vista, the use of %n in format strings by default crashes the program. See - and - + and + So we should avoid %n in this situation. */ fbp[1] = '\0'; # endif @@ -5115,7 +5127,7 @@ { /* Verify that snprintf() has NUL-terminated its result. */ - if (count < maxlen + if ((unsigned int) count < maxlen && ((TCHAR_T *) (result + length)) [count] != '\0') abort (); /* Portability hack. */ diff -Nru grep-3.1/gnulib-tests/vasnprintf.h grep-3.3/gnulib-tests/vasnprintf.h --- grep-3.1/gnulib-tests/vasnprintf.h 2017-01-01 11:25:46.000000000 +0000 +++ grep-3.3/gnulib-tests/vasnprintf.h 2018-01-07 00:08:01.000000000 +0000 @@ -1,5 +1,5 @@ /* vsprintf with automatic memory allocation. - Copyright (C) 2002-2004, 2007-2017 Free Software Foundation, Inc. + Copyright (C) 2002-2004, 2007-2018 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 @@ -12,7 +12,7 @@ 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 . */ + with this program; if not, see . */ #ifndef _VASNPRINTF_H #define _VASNPRINTF_H diff -Nru grep-3.1/gnulib-tests/w32sock.h grep-3.3/gnulib-tests/w32sock.h --- grep-3.1/gnulib-tests/w32sock.h 1970-01-01 00:00:00.000000000 +0000 +++ grep-3.3/gnulib-tests/w32sock.h 2018-01-07 00:07:08.000000000 +0000 @@ -0,0 +1,140 @@ +/* w32sock.h --- internal auxiliary functions for Windows socket functions + + Copyright (C) 2008-2018 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 Paolo Bonzini */ + +#include + +/* Get O_RDWR and O_BINARY. */ +#include + +/* Get _open_osfhandle(). */ +#include + +/* Get _get_osfhandle(). */ +#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)) + +static inline void +set_winsock_errno (void) +{ + int err = WSAGetLastError (); + + /* Map some WSAE* errors to the runtime library's error codes. */ + switch (err) + { + case WSA_INVALID_HANDLE: + errno = EBADF; + break; + case WSA_NOT_ENOUGH_MEMORY: + errno = ENOMEM; + break; + case WSA_INVALID_PARAMETER: + errno = EINVAL; + break; + case WSAENAMETOOLONG: + errno = ENAMETOOLONG; + break; + case WSAENOTEMPTY: + errno = ENOTEMPTY; + break; + case WSAEWOULDBLOCK: + errno = EWOULDBLOCK; + break; + case WSAEINPROGRESS: + errno = EINPROGRESS; + break; + case WSAEALREADY: + errno = EALREADY; + break; + case WSAENOTSOCK: + errno = ENOTSOCK; + break; + case WSAEDESTADDRREQ: + errno = EDESTADDRREQ; + break; + case WSAEMSGSIZE: + errno = EMSGSIZE; + break; + case WSAEPROTOTYPE: + errno = EPROTOTYPE; + break; + case WSAENOPROTOOPT: + errno = ENOPROTOOPT; + break; + case WSAEPROTONOSUPPORT: + errno = EPROTONOSUPPORT; + break; + case WSAEOPNOTSUPP: + errno = EOPNOTSUPP; + break; + case WSAEAFNOSUPPORT: + errno = EAFNOSUPPORT; + break; + case WSAEADDRINUSE: + errno = EADDRINUSE; + break; + case WSAEADDRNOTAVAIL: + errno = EADDRNOTAVAIL; + break; + case WSAENETDOWN: + errno = ENETDOWN; + break; + case WSAENETUNREACH: + errno = ENETUNREACH; + break; + case WSAENETRESET: + errno = ENETRESET; + break; + case WSAECONNABORTED: + errno = ECONNABORTED; + break; + case WSAECONNRESET: + errno = ECONNRESET; + break; + case WSAENOBUFS: + errno = ENOBUFS; + break; + case WSAEISCONN: + errno = EISCONN; + break; + case WSAENOTCONN: + errno = ENOTCONN; + break; + case WSAETIMEDOUT: + errno = ETIMEDOUT; + break; + case WSAECONNREFUSED: + errno = ECONNREFUSED; + break; + case WSAELOOP: + errno = ELOOP; + break; + case WSAEHOSTUNREACH: + errno = EHOSTUNREACH; + break; + default: + errno = (err > 10000 && err < 10025) ? err - 10000 : err; + break; + } +} diff -Nru grep-3.1/gnulib-tests/warn-on-use.h grep-3.3/gnulib-tests/warn-on-use.h --- grep-3.1/gnulib-tests/warn-on-use.h 2017-03-17 04:34:41.000000000 +0000 +++ grep-3.3/gnulib-tests/warn-on-use.h 2018-09-19 05:05:04.000000000 +0000 @@ -1,5 +1,5 @@ /* A C macro for emitting warnings if a function is used. - Copyright (C) 2010-2017 Free Software Foundation, Inc. + Copyright (C) 2010-2018 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 @@ -12,7 +12,7 @@ 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 . */ + 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 @@ -20,23 +20,32 @@ 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 + _GL_WARN_ON_USE_ATTRIBUTE ("literal string") expands to the + attribute used in _GL_WARN_ON_USE. If the compiler does not support + this feature, it expands to empty. + + These macros are 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. + instead. + _GL_WARN_ON_USE is for functions with 'extern' linkage. + _GL_WARN_ON_USE_ATTRIBUTE is for functions with 'static' or 'inline' + linkage. + + 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 ]], @@ -54,12 +63,21 @@ (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 + #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 + or better (avoiding contradictory use of 'static' and 'extern'): + #if HAVE_RAW_DECL_ENVIRON + static char *** + _GL_WARN_ON_USE_ATTRIBUTE ("environ is not always properly declared") + rpl_environ (void) { return &environ; } + # undef environ + # define environ (*rpl_environ ()) + #endif */ #ifndef _GL_WARN_ON_USE @@ -67,13 +85,17 @@ /* 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))) +# define _GL_WARN_ON_USE_ATTRIBUTE(message) \ + __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 +# define _GL_WARN_ON_USE_ATTRIBUTE(message) # else /* Unsupported. */ # define _GL_WARN_ON_USE(function, message) \ _GL_WARN_EXTERN_C int _gl_warn_on_use +# define _GL_WARN_ON_USE_ATTRIBUTE(message) # endif #endif diff -Nru grep-3.1/gnulib-tests/xsize.h grep-3.3/gnulib-tests/xsize.h --- grep-3.1/gnulib-tests/xsize.h 2017-01-01 11:25:46.000000000 +0000 +++ grep-3.3/gnulib-tests/xsize.h 2018-01-07 00:08:01.000000000 +0000 @@ -1,6 +1,6 @@ /* xsize.h -- Checked size_t computations. - Copyright (C) 2003, 2008-2017 Free Software Foundation, Inc. + Copyright (C) 2003, 2008-2018 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 @@ -13,7 +13,7 @@ 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 . */ + along with this program; if not, see . */ #ifndef _XSIZE_H #define _XSIZE_H diff -Nru grep-3.1/gnulib-tests/zerosize-ptr.h grep-3.3/gnulib-tests/zerosize-ptr.h --- grep-3.1/gnulib-tests/zerosize-ptr.h 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/gnulib-tests/zerosize-ptr.h 2018-09-19 05:04:26.000000000 +0000 @@ -1,5 +1,5 @@ /* Return a pointer to a zero-size object in memory. - Copyright (C) 2009-2017 Free Software Foundation, Inc. + Copyright (C) 2009-2018 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 @@ -12,12 +12,25 @@ 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 . */ + along with this program. If not, see . */ /* ISO C 99 does not allow memcmp(), memchr() etc. to be invoked with a NULL argument. Therefore this file produces a non-NULL pointer which cannot be dereferenced, if possible. */ +/* On Android, when targeting Android 4.4 or older with a GCC toolchain, + prevent a compilation error + "error: call to 'mmap' declared with attribute error: mmap is not + available with _FILE_OFFSET_BITS=64 when using GCC until android-21. + Either raise your minSdkVersion, disable _FILE_OFFSET_BITS=64, or + switch to Clang." + The files that we access in this compilation unit are less than 2 GB + large. */ +#if defined __ANDROID__ +# undef _FILE_OFFSET_BITS +# undef __USE_FILE_OFFSET64 +#endif + #include /* Test whether mmap() and mprotect() are available. diff -Nru grep-3.1/GNUmakefile grep-3.3/GNUmakefile --- grep-3.1/GNUmakefile 2017-06-22 01:21:13.000000000 +0000 +++ grep-3.3/GNUmakefile 2018-12-21 04:30:23.000000000 +0000 @@ -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-2017 Free Software Foundation, Inc. +# Copyright (C) 2001, 2003, 2006-2018 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,7 +18,7 @@ # 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 . +# along with this program. If not, see . # If the user runs GNU make but has not yet run ./configure, # give them a diagnostic. diff -Nru grep-3.1/lib/alignof.h grep-3.3/lib/alignof.h --- grep-3.1/lib/alignof.h 2017-01-01 11:25:46.000000000 +0000 +++ grep-3.3/lib/alignof.h 2018-01-07 00:08:01.000000000 +0000 @@ -1,5 +1,5 @@ /* Determine alignment of types. - Copyright (C) 2003-2004, 2006, 2009-2017 Free Software Foundation, Inc. + Copyright (C) 2003-2004, 2006, 2009-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program; if not, see . */ #ifndef _ALIGNOF_H #define _ALIGNOF_H diff -Nru grep-3.1/lib/alloca.in.h grep-3.3/lib/alloca.in.h --- grep-3.1/lib/alloca.in.h 2017-01-01 11:25:46.000000000 +0000 +++ grep-3.3/lib/alloca.in.h 2018-01-07 00:08:01.000000000 +0000 @@ -1,6 +1,6 @@ /* Memory allocation on the stack. - Copyright (C) 1995, 1999, 2001-2004, 2006-2017 Free Software Foundation, + Copyright (C) 1995, 1999, 2001-2004, 2006-2018 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it @@ -15,7 +15,7 @@ You should have received a copy of the GNU General Public License along with this program; if not, see - . + . */ /* Avoid using the symbol _ALLOCA_H here, as Bison assumes _ALLOCA_H diff -Nru grep-3.1/lib/argmatch.c grep-3.3/lib/argmatch.c --- grep-3.1/lib/argmatch.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/lib/argmatch.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,6 +1,6 @@ /* argmatch.c -- find a match for a string in an array - Copyright (C) 1990, 1998-1999, 2001-2007, 2009-2017 Free Software + Copyright (C) 1990, 1998-1999, 2001-2007, 2009-2018 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify @@ -14,7 +14,7 @@ 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 . */ + along with this program. If not, see . */ /* Written by David MacKenzie Modified by Akim Demaille */ diff -Nru grep-3.1/lib/argmatch.h grep-3.3/lib/argmatch.h --- grep-3.1/lib/argmatch.h 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/lib/argmatch.h 2018-01-07 00:07:08.000000000 +0000 @@ -1,6 +1,6 @@ /* argmatch.h -- definitions and prototypes for argmatch.c - Copyright (C) 1990, 1998-1999, 2001-2002, 2004-2005, 2009-2017 Free Software + Copyright (C) 1990, 1998-1999, 2001-2002, 2004-2005, 2009-2018 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify @@ -14,7 +14,7 @@ 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 . */ + along with this program. If not, see . */ /* Written by David MacKenzie Modified by Akim Demaille */ diff -Nru grep-3.1/lib/arg-nonnull.h grep-3.3/lib/arg-nonnull.h --- grep-3.1/lib/arg-nonnull.h 2017-03-17 04:34:41.000000000 +0000 +++ grep-3.3/lib/arg-nonnull.h 2018-01-07 00:08:01.000000000 +0000 @@ -1,5 +1,5 @@ /* A C macro for declaring that specific arguments must not be NULL. - Copyright (C) 2009-2017 Free Software Foundation, Inc. + Copyright (C) 2009-2018 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 @@ -12,7 +12,7 @@ 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 . */ + 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. diff -Nru grep-3.1/lib/assure.h grep-3.3/lib/assure.h --- grep-3.1/lib/assure.h 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/lib/assure.h 2018-12-15 18:14:26.000000000 +0000 @@ -1,6 +1,6 @@ /* Run-time assert-like macros. - Copyright (C) 2014-2017 Free Software Foundation, Inc. + Copyright (C) 2014-2018 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 @@ -13,7 +13,7 @@ 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 . */ + along with this program. If not, see . */ /* Written by Paul Eggert. */ @@ -23,7 +23,7 @@ #include /* Check E's value at runtime, and report an error and abort if not. - However, do nothng if NDEBUG is defined. + However, do nothing if NDEBUG is defined. Unlike standard 'assert', this macro always compiles E even when NDEBUG is defined, so as to catch typos and avoid some GCC warnings. */ diff -Nru grep-3.1/lib/at-func.c grep-3.3/lib/at-func.c --- grep-3.1/lib/at-func.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/lib/at-func.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ /* Define at-style functions like fstatat, unlinkat, fchownat, etc. - Copyright (C) 2006, 2009-2017 Free Software Foundation, Inc. + Copyright (C) 2006, 2009-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ /* written by Jim Meyering */ diff -Nru grep-3.1/lib/basename-lgpl.c grep-3.3/lib/basename-lgpl.c --- grep-3.1/lib/basename-lgpl.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/lib/basename-lgpl.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,6 +1,6 @@ /* basename.c -- return the last element in a file name - Copyright (C) 1990, 1998-2001, 2003-2006, 2009-2017 Free Software + Copyright (C) 1990, 1998-2001, 2003-2006, 2009-2018 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify @@ -14,7 +14,7 @@ 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 . */ + along with this program. If not, see . */ #include diff -Nru grep-3.1/lib/binary-io.c grep-3.3/lib/binary-io.c --- grep-3.1/lib/binary-io.c 2017-02-16 17:20:58.000000000 +0000 +++ grep-3.3/lib/binary-io.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ /* Binary mode I/O. - Copyright 2017 Free Software Foundation, Inc. + Copyright 2017-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ #include diff -Nru grep-3.1/lib/binary-io.h grep-3.3/lib/binary-io.h --- grep-3.1/lib/binary-io.h 2017-02-16 17:20:58.000000000 +0000 +++ grep-3.3/lib/binary-io.h 2018-03-07 13:57:39.000000000 +0000 @@ -1,5 +1,5 @@ /* Binary mode I/O. - Copyright (C) 2001, 2003, 2005, 2008-2017 Free Software Foundation, Inc. + Copyright (C) 2001, 2003, 2005, 2008-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ #ifndef _BINARY_H #define _BINARY_H @@ -47,10 +47,8 @@ /* Use a function rather than a macro, to avoid gcc warnings "warning: statement with no effect". */ BINARY_IO_INLINE int -__gl_setmode (int fd, int mode) +__gl_setmode (int fd _GL_UNUSED, int mode _GL_UNUSED) { - (void) fd; - (void) mode; return O_BINARY; } #endif @@ -59,7 +57,7 @@ extern int __gl_setmode_check (int); #else BINARY_IO_INLINE int -__gl_setmode_check (int fd) { return 0; } +__gl_setmode_check (int fd _GL_UNUSED) { return 0; } #endif /* Set FD's mode to MODE, which should be either O_TEXT or O_BINARY. diff -Nru grep-3.1/lib/bitrotate.h grep-3.3/lib/bitrotate.h --- grep-3.1/lib/bitrotate.h 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/lib/bitrotate.h 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ /* bitrotate.h - Rotate bits in integers - Copyright (C) 2008-2017 Free Software Foundation, Inc. + Copyright (C) 2008-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ /* Written by Simon Josefsson , 2008. */ diff -Nru grep-3.1/lib/btowc.c grep-3.3/lib/btowc.c --- grep-3.1/lib/btowc.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/lib/btowc.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ /* Convert unibyte character to wide character. - Copyright (C) 2008, 2010-2017 Free Software Foundation, Inc. + Copyright (C) 2008, 2010-2018 Free Software Foundation, Inc. Written by Bruno Haible , 2008. This program is free software: you can redistribute it and/or modify @@ -13,7 +13,7 @@ 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 . */ + along with this program. If not, see . */ #include diff -Nru grep-3.1/lib/c-ctype.h grep-3.3/lib/c-ctype.h --- grep-3.1/lib/c-ctype.h 2017-02-02 19:20:03.000000000 +0000 +++ grep-3.3/lib/c-ctype.h 2018-01-07 00:08:01.000000000 +0000 @@ -5,7 +5,7 @@ functions' behaviour depends on the current locale set via setlocale. - Copyright (C) 2000-2003, 2006, 2008-2017 Free Software Foundation, Inc. + Copyright (C) 2000-2003, 2006, 2008-2018 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,7 +18,7 @@ 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 . */ +along with this program; if not, see . */ #ifndef C_CTYPE_H #define C_CTYPE_H diff -Nru grep-3.1/lib/c++defs.h grep-3.3/lib/c++defs.h --- grep-3.1/lib/c++defs.h 2017-03-17 04:34:41.000000000 +0000 +++ grep-3.3/lib/c++defs.h 2018-01-07 00:08:01.000000000 +0000 @@ -1,5 +1,5 @@ /* C++ compatible function declaration macros. - Copyright (C) 2010-2017 Free Software Foundation, Inc. + Copyright (C) 2010-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ #ifndef _GL_CXXDEFS_H #define _GL_CXXDEFS_H @@ -266,7 +266,7 @@ _GL_CXXALIASWARN_1 (func, GNULIB_NAMESPACE) # define _GL_CXXALIASWARN_1(func,namespace) \ _GL_CXXALIASWARN_2 (func, namespace) -/* To work around GCC bug , +/* To work around GCC bug , we enable the warning only when not optimizing. */ # if !__OPTIMIZE__ # define _GL_CXXALIASWARN_2(func,namespace) \ @@ -294,7 +294,7 @@ 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 , +/* 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) \ diff -Nru grep-3.1/lib/cdefs.h grep-3.3/lib/cdefs.h --- grep-3.1/lib/cdefs.h 1970-01-01 00:00:00.000000000 +0000 +++ grep-3.3/lib/cdefs.h 2018-12-21 03:32:18.000000000 +0000 @@ -0,0 +1,514 @@ +/* Copyright (C) 1992-2018 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 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 _SYS_CDEFS_H +#define _SYS_CDEFS_H 1 + +/* We are almost always included from features.h. */ +#ifndef _FEATURES_H +# include +#endif + +/* The GNU libc does not support any K&R compilers or the traditional mode + of ISO C compilers anymore. Check for some of the combinations not + anymore supported. */ +#if defined __GNUC__ && !defined __STDC__ +# error "You need a ISO C conforming compiler to use the glibc headers" +#endif + +/* Some user header file might have defined this before. */ +#undef __P +#undef __PMT + +#ifdef __GNUC__ + +/* All functions, except those with callbacks or those that + synchronize memory, are leaf functions. */ +# if __GNUC_PREREQ (4, 6) && !defined _LIBC +# define __LEAF , __leaf__ +# define __LEAF_ATTR __attribute__ ((__leaf__)) +# else +# define __LEAF +# define __LEAF_ATTR +# endif + +/* GCC can always grok prototypes. For C++ programs we add throw() + to help it optimize the function calls. But this works only with + gcc 2.8.x and egcs. For gcc 3.2 and up we even mark C functions + as non-throwing using a function attribute since programs can use + the -fexceptions options for C code as well. */ +# if !defined __cplusplus && __GNUC_PREREQ (3, 3) +# define __THROW __attribute__ ((__nothrow__ __LEAF)) +# define __THROWNL __attribute__ ((__nothrow__)) +# define __NTH(fct) __attribute__ ((__nothrow__ __LEAF)) fct +# define __NTHNL(fct) __attribute__ ((__nothrow__)) fct +# else +# if defined __cplusplus && __GNUC_PREREQ (2,8) +# define __THROW throw () +# define __THROWNL throw () +# define __NTH(fct) __LEAF_ATTR fct throw () +# define __NTHNL(fct) fct throw () +# else +# define __THROW +# define __THROWNL +# define __NTH(fct) fct +# define __NTHNL(fct) fct +# endif +# endif + +#else /* Not GCC. */ + +# if (defined __cplusplus \ + || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L)) +# define __inline inline +# else +# define __inline /* No inline functions. */ +# endif + +# define __THROW +# define __THROWNL +# define __NTH(fct) fct + +#endif /* GCC. */ + +/* Compilers that are not clang may object to + #if defined __clang__ && __has_extension(...) + even though they do not need to evaluate the right-hand side of the &&. */ +#if defined __clang__ && defined __has_extension +# define __glibc_clang_has_extension(ext) __has_extension (ext) +#else +# define __glibc_clang_has_extension(ext) 0 +#endif + +/* These two macros are not used in glibc anymore. They are kept here + only because some other projects expect the macros to be defined. */ +#define __P(args) args +#define __PMT(args) args + +/* For these things, GCC behaves the ANSI way normally, + and the non-ANSI way under -traditional. */ + +#define __CONCAT(x,y) x ## y +#define __STRING(x) #x + +/* This is not a typedef so `const __ptr_t' does the right thing. */ +#define __ptr_t void * + + +/* C++ needs to know that types and declarations are C, not C++. */ +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS +# define __END_DECLS +#endif + + +/* Fortify support. */ +#define __bos(ptr) __builtin_object_size (ptr, __USE_FORTIFY_LEVEL > 1) +#define __bos0(ptr) __builtin_object_size (ptr, 0) + +#if __GNUC_PREREQ (4,3) +# define __warndecl(name, msg) \ + extern void name (void) __attribute__((__warning__ (msg))) +# define __warnattr(msg) __attribute__((__warning__ (msg))) +# define __errordecl(name, msg) \ + extern void name (void) __attribute__((__error__ (msg))) +#else +# define __warndecl(name, msg) extern void name (void) +# define __warnattr(msg) +# define __errordecl(name, msg) extern void name (void) +#endif + +/* Support for flexible arrays. + Headers that should use flexible arrays only if they're "real" + (e.g. only if they won't affect sizeof()) should test + #if __glibc_c99_flexarr_available. */ +#if defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L && !defined __HP_cc +# define __flexarr [] +# define __glibc_c99_flexarr_available 1 +#elif __GNUC_PREREQ (2,97) +/* GCC 2.97 supports C99 flexible array members as an extension, + even when in C89 mode or compiling C++ (any version). */ +# define __flexarr [] +# define __glibc_c99_flexarr_available 1 +#elif defined __GNUC__ +/* Pre-2.97 GCC did not support C99 flexible arrays but did have + an equivalent extension with slightly different notation. */ +# define __flexarr [0] +# define __glibc_c99_flexarr_available 1 +#else +/* Some other non-C99 compiler. Approximate with [1]. */ +# define __flexarr [1] +# define __glibc_c99_flexarr_available 0 +#endif + + +/* __asm__ ("xyz") is used throughout the headers to rename functions + at the assembly language level. This is wrapped by the __REDIRECT + macro, in order to support compilers that can do this some other + way. When compilers don't support asm-names at all, we have to do + preprocessor tricks instead (which don't have exactly the right + semantics, but it's the best we can do). + + Example: + int __REDIRECT(setpgrp, (__pid_t pid, __pid_t pgrp), setpgid); */ + +#if defined __GNUC__ && __GNUC__ >= 2 + +# define __REDIRECT(name, proto, alias) name proto __asm__ (__ASMNAME (#alias)) +# ifdef __cplusplus +# define __REDIRECT_NTH(name, proto, alias) \ + name proto __THROW __asm__ (__ASMNAME (#alias)) +# define __REDIRECT_NTHNL(name, proto, alias) \ + name proto __THROWNL __asm__ (__ASMNAME (#alias)) +# else +# define __REDIRECT_NTH(name, proto, alias) \ + name proto __asm__ (__ASMNAME (#alias)) __THROW +# define __REDIRECT_NTHNL(name, proto, alias) \ + name proto __asm__ (__ASMNAME (#alias)) __THROWNL +# endif +# define __ASMNAME(cname) __ASMNAME2 (__USER_LABEL_PREFIX__, cname) +# define __ASMNAME2(prefix, cname) __STRING (prefix) cname + +/* +#elif __SOME_OTHER_COMPILER__ + +# define __REDIRECT(name, proto, alias) name proto; \ + _Pragma("let " #name " = " #alias) +*/ +#endif + +/* GCC has various useful declarations that can be made with the + `__attribute__' syntax. All of the ways we use this do fine if + they are omitted for compilers that don't understand it. */ +#if !defined __GNUC__ || __GNUC__ < 2 +# define __attribute__(xyz) /* Ignore */ +#endif + +/* At some point during the gcc 2.96 development the `malloc' attribute + for functions was introduced. We don't want to use it unconditionally + (although this would be possible) since it generates warnings. */ +#if __GNUC_PREREQ (2,96) +# define __attribute_malloc__ __attribute__ ((__malloc__)) +#else +# define __attribute_malloc__ /* Ignore */ +#endif + +/* Tell the compiler which arguments to an allocation function + indicate the size of the allocation. */ +#if __GNUC_PREREQ (4, 3) +# define __attribute_alloc_size__(params) \ + __attribute__ ((__alloc_size__ params)) +#else +# define __attribute_alloc_size__(params) /* Ignore. */ +#endif + +/* At some point during the gcc 2.96 development the `pure' attribute + for functions was introduced. We don't want to use it unconditionally + (although this would be possible) since it generates warnings. */ +#if __GNUC_PREREQ (2,96) +# define __attribute_pure__ __attribute__ ((__pure__)) +#else +# define __attribute_pure__ /* Ignore */ +#endif + +/* This declaration tells the compiler that the value is constant. */ +#if __GNUC_PREREQ (2,5) +# define __attribute_const__ __attribute__ ((__const__)) +#else +# define __attribute_const__ /* Ignore */ +#endif + +/* At some point during the gcc 3.1 development the `used' attribute + for functions was introduced. We don't want to use it unconditionally + (although this would be possible) since it generates warnings. */ +#if __GNUC_PREREQ (3,1) +# define __attribute_used__ __attribute__ ((__used__)) +# define __attribute_noinline__ __attribute__ ((__noinline__)) +#else +# define __attribute_used__ __attribute__ ((__unused__)) +# define __attribute_noinline__ /* Ignore */ +#endif + +/* Since version 3.2, gcc allows marking deprecated functions. */ +#if __GNUC_PREREQ (3,2) +# define __attribute_deprecated__ __attribute__ ((__deprecated__)) +#else +# define __attribute_deprecated__ /* Ignore */ +#endif + +/* Since version 4.5, gcc also allows one to specify the message printed + when a deprecated function is used. clang claims to be gcc 4.2, but + may also support this feature. */ +#if __GNUC_PREREQ (4,5) || \ + __glibc_clang_has_extension (__attribute_deprecated_with_message__) +# define __attribute_deprecated_msg__(msg) \ + __attribute__ ((__deprecated__ (msg))) +#else +# define __attribute_deprecated_msg__(msg) __attribute_deprecated__ +#endif + +/* At some point during the gcc 2.8 development the `format_arg' attribute + for functions was introduced. We don't want to use it unconditionally + (although this would be possible) since it generates warnings. + If several `format_arg' attributes are given for the same function, in + gcc-3.0 and older, all but the last one are ignored. In newer gccs, + all designated arguments are considered. */ +#if __GNUC_PREREQ (2,8) +# define __attribute_format_arg__(x) __attribute__ ((__format_arg__ (x))) +#else +# define __attribute_format_arg__(x) /* Ignore */ +#endif + +/* At some point during the gcc 2.97 development the `strfmon' format + attribute for functions was introduced. We don't want to use it + unconditionally (although this would be possible) since it + generates warnings. */ +#if __GNUC_PREREQ (2,97) +# define __attribute_format_strfmon__(a,b) \ + __attribute__ ((__format__ (__strfmon__, a, b))) +#else +# define __attribute_format_strfmon__(a,b) /* Ignore */ +#endif + +/* The nonnull function attribute marks pointer parameters that + must not be NULL. Do not define __nonnull if it is already defined, + for portability when this file is used in Gnulib. */ +#ifndef __nonnull +# if __GNUC_PREREQ (3,3) +# define __nonnull(params) __attribute__ ((__nonnull__ params)) +# else +# define __nonnull(params) +# endif +#endif + +/* If fortification mode, we warn about unused results of certain + function calls which can lead to problems. */ +#if __GNUC_PREREQ (3,4) +# define __attribute_warn_unused_result__ \ + __attribute__ ((__warn_unused_result__)) +# if defined __USE_FORTIFY_LEVEL && __USE_FORTIFY_LEVEL > 0 +# define __wur __attribute_warn_unused_result__ +# endif +#else +# define __attribute_warn_unused_result__ /* empty */ +#endif +#ifndef __wur +# define __wur /* Ignore */ +#endif + +/* Forces a function to be always inlined. */ +#if __GNUC_PREREQ (3,2) +/* The Linux kernel defines __always_inline in stddef.h (283d7573), and + it conflicts with this definition. Therefore undefine it first to + allow either header to be included first. */ +# undef __always_inline +# define __always_inline __inline __attribute__ ((__always_inline__)) +#else +# undef __always_inline +# define __always_inline __inline +#endif + +/* Associate error messages with the source location of the call site rather + than with the source location inside the function. */ +#if __GNUC_PREREQ (4,3) +# define __attribute_artificial__ __attribute__ ((__artificial__)) +#else +# define __attribute_artificial__ /* Ignore */ +#endif + +/* GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99 + inline semantics, unless -fgnu89-inline is used. Using __GNUC_STDC_INLINE__ + or __GNUC_GNU_INLINE is not a good enough check for gcc because gcc versions + older than 4.3 may define these macros and still not guarantee GNU inlining + semantics. + + clang++ identifies itself as gcc-4.2, but has support for GNU inlining + semantics, that can be checked fot by using the __GNUC_STDC_INLINE_ and + __GNUC_GNU_INLINE__ macro definitions. */ +#if (!defined __cplusplus || __GNUC_PREREQ (4,3) \ + || (defined __clang__ && (defined __GNUC_STDC_INLINE__ \ + || defined __GNUC_GNU_INLINE__))) +# if defined __GNUC_STDC_INLINE__ || defined __cplusplus +# define __extern_inline extern __inline __attribute__ ((__gnu_inline__)) +# define __extern_always_inline \ + extern __always_inline __attribute__ ((__gnu_inline__)) +# else +# define __extern_inline extern __inline +# define __extern_always_inline extern __always_inline +# endif +#endif + +#ifdef __extern_always_inline +# define __fortify_function __extern_always_inline __attribute_artificial__ +#endif + +/* GCC 4.3 and above allow passing all anonymous arguments of an + __extern_always_inline function to some other vararg function. */ +#if __GNUC_PREREQ (4,3) +# define __va_arg_pack() __builtin_va_arg_pack () +# define __va_arg_pack_len() __builtin_va_arg_pack_len () +#endif + +/* It is possible to compile containing GCC extensions even if GCC is + run in pedantic mode if the uses are carefully marked using the + `__extension__' keyword. But this is not generally available before + version 2.8. */ +#if !__GNUC_PREREQ (2,8) +# define __extension__ /* Ignore */ +#endif + +/* __restrict is known in EGCS 1.2 and above. */ +#if !__GNUC_PREREQ (2,92) +# if defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L +# define __restrict restrict +# else +# define __restrict /* Ignore */ +# endif +#endif + +/* ISO C99 also allows to declare arrays as non-overlapping. The syntax is + array_name[restrict] + GCC 3.1 supports this. */ +#if __GNUC_PREREQ (3,1) && !defined __GNUG__ +# define __restrict_arr __restrict +#else +# ifdef __GNUC__ +# define __restrict_arr /* Not supported in old GCC. */ +# else +# if defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L +# define __restrict_arr restrict +# else +/* Some other non-C99 compiler. */ +# define __restrict_arr /* Not supported. */ +# endif +# endif +#endif + +#if __GNUC__ >= 3 +# define __glibc_unlikely(cond) __builtin_expect ((cond), 0) +# define __glibc_likely(cond) __builtin_expect ((cond), 1) +#else +# define __glibc_unlikely(cond) (cond) +# define __glibc_likely(cond) (cond) +#endif + +#ifdef __has_attribute +# define __glibc_has_attribute(attr) __has_attribute (attr) +#else +# define __glibc_has_attribute(attr) 0 +#endif + +#if (!defined _Noreturn \ + && (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) < 201112 \ + && !__GNUC_PREREQ (4,7)) +# if __GNUC_PREREQ (2,8) +# define _Noreturn __attribute__ ((__noreturn__)) +# else +# define _Noreturn +# endif +#endif + +#if __GNUC_PREREQ (8, 0) +/* Describes a char array whose address can safely be passed as the first + argument to strncpy and strncat, as the char array is not necessarily + a NUL-terminated string. */ +# define __attribute_nonstring__ __attribute__ ((__nonstring__)) +#else +# define __attribute_nonstring__ +#endif + +#if (!defined _Static_assert && !defined __cplusplus \ + && (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) < 201112 \ + && (!__GNUC_PREREQ (4, 6) || defined __STRICT_ANSI__)) +# define _Static_assert(expr, diagnostic) \ + extern int (*__Static_assert_function (void)) \ + [!!sizeof (struct { int __error_if_negative: (expr) ? 2 : -1; })] +#endif + +/* The #ifndef lets Gnulib avoid including these on non-glibc + platforms, where the includes typically do not exist. */ +#ifndef __WORDSIZE +# include +# include +#endif + +#if defined __LONG_DOUBLE_MATH_OPTIONAL && defined __NO_LONG_DOUBLE_MATH +# define __LDBL_COMPAT 1 +# ifdef __REDIRECT +# define __LDBL_REDIR1(name, proto, alias) __REDIRECT (name, proto, alias) +# define __LDBL_REDIR(name, proto) \ + __LDBL_REDIR1 (name, proto, __nldbl_##name) +# define __LDBL_REDIR1_NTH(name, proto, alias) __REDIRECT_NTH (name, proto, alias) +# define __LDBL_REDIR_NTH(name, proto) \ + __LDBL_REDIR1_NTH (name, proto, __nldbl_##name) +# define __LDBL_REDIR1_DECL(name, alias) \ + extern __typeof (name) name __asm (__ASMNAME (#alias)); +# define __LDBL_REDIR_DECL(name) \ + extern __typeof (name) name __asm (__ASMNAME ("__nldbl_" #name)); +# define __REDIRECT_LDBL(name, proto, alias) \ + __LDBL_REDIR1 (name, proto, __nldbl_##alias) +# define __REDIRECT_NTH_LDBL(name, proto, alias) \ + __LDBL_REDIR1_NTH (name, proto, __nldbl_##alias) +# endif +#endif +#if !defined __LDBL_COMPAT || !defined __REDIRECT +# define __LDBL_REDIR1(name, proto, alias) name proto +# define __LDBL_REDIR(name, proto) name proto +# define __LDBL_REDIR1_NTH(name, proto, alias) name proto __THROW +# define __LDBL_REDIR_NTH(name, proto) name proto __THROW +# define __LDBL_REDIR_DECL(name) +# ifdef __REDIRECT +# define __REDIRECT_LDBL(name, proto, alias) __REDIRECT (name, proto, alias) +# define __REDIRECT_NTH_LDBL(name, proto, alias) \ + __REDIRECT_NTH (name, proto, alias) +# endif +#endif + +/* __glibc_macro_warning (MESSAGE) issues warning MESSAGE. This is + intended for use in preprocessor macros. + + Note: MESSAGE must be a _single_ string; concatenation of string + literals is not supported. */ +#if __GNUC_PREREQ (4,8) || __glibc_clang_prereq (3,5) +# define __glibc_macro_warning1(message) _Pragma (#message) +# define __glibc_macro_warning(message) \ + __glibc_macro_warning1 (GCC warning message) +#else +# define __glibc_macro_warning(msg) +#endif + +/* Generic selection (ISO C11) is a C-only feature, available in GCC + since version 4.9. Previous versions do not provide generic + selection, even though they might set __STDC_VERSION__ to 201112L, + when in -std=c11 mode. Thus, we must check for !defined __GNUC__ + when testing __STDC_VERSION__ for generic selection support. + On the other hand, Clang also defines __GNUC__, so a clang-specific + check is required to enable the use of generic selection. */ +#if !defined __cplusplus \ + && (__GNUC_PREREQ (4, 9) \ + || __glibc_clang_has_extension (c_generic_selections) \ + || (!defined __GNUC__ && defined __STDC_VERSION__ \ + && __STDC_VERSION__ >= 201112L)) +# define __HAVE_GENERIC_SELECTION 1 +#else +# define __HAVE_GENERIC_SELECTION 0 +#endif + +#endif /* sys/cdefs.h */ diff -Nru grep-3.1/lib/chdir-long.c grep-3.3/lib/chdir-long.c --- grep-3.1/lib/chdir-long.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/lib/chdir-long.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ /* provide a chdir function that tries not to fail due to ENAMETOOLONG - Copyright (C) 2004-2017 Free Software Foundation, Inc. + Copyright (C) 2004-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ /* written by Jim Meyering */ diff -Nru grep-3.1/lib/chdir-long.h grep-3.3/lib/chdir-long.h --- grep-3.1/lib/chdir-long.h 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/lib/chdir-long.h 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ /* provide a chdir function that tries not to fail due to ENAMETOOLONG - Copyright (C) 2004-2005, 2009-2017 Free Software Foundation, Inc. + Copyright (C) 2004-2005, 2009-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ /* Written by Jim Meyering. */ diff -Nru grep-3.1/lib/cloexec.c grep-3.3/lib/cloexec.c --- grep-3.1/lib/cloexec.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/lib/cloexec.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,6 +1,6 @@ -/* closexec.c - set or clear the close-on-exec descriptor flag +/* cloexec.c - set or clear the close-on-exec descriptor flag - Copyright (C) 1991, 2004-2006, 2009-2017 Free Software Foundation, Inc. + Copyright (C) 1991, 2004-2006, 2009-2018 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 @@ -13,7 +13,7 @@ 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 . + along with this program. If not, see . The code is taken from glibc/manual/llio.texi */ diff -Nru grep-3.1/lib/cloexec.h grep-3.3/lib/cloexec.h --- grep-3.1/lib/cloexec.h 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/lib/cloexec.h 2018-01-07 00:07:08.000000000 +0000 @@ -1,6 +1,6 @@ -/* closexec.c - set or clear the close-on-exec descriptor flag +/* cloexec.c - set or clear the close-on-exec descriptor flag - Copyright (C) 2004, 2009-2017 Free Software Foundation, Inc. + Copyright (C) 2004, 2009-2018 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 @@ -13,7 +13,7 @@ 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 . + along with this program. If not, see . */ diff -Nru grep-3.1/lib/close.c grep-3.3/lib/close.c --- grep-3.1/lib/close.c 2017-05-14 01:09:51.000000000 +0000 +++ grep-3.3/lib/close.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ /* close replacement. - Copyright (C) 2008-2017 Free Software Foundation, Inc. + Copyright (C) 2008-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ #include diff -Nru grep-3.1/lib/closedir.c grep-3.3/lib/closedir.c --- grep-3.1/lib/closedir.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/lib/closedir.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ /* Stop reading the entries of a directory. - Copyright (C) 2006-2017 Free Software Foundation, Inc. + Copyright (C) 2006-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ #include diff -Nru grep-3.1/lib/closeout.c grep-3.3/lib/closeout.c --- grep-3.1/lib/closeout.c 2017-05-21 00:31:28.000000000 +0000 +++ grep-3.3/lib/closeout.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,6 +1,6 @@ /* Close standard output and standard error, exiting with a diagnostic on error. - Copyright (C) 1998-2002, 2004, 2006, 2008-2017 Free Software Foundation, + Copyright (C) 1998-2002, 2004, 2006, 2008-2018 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify @@ -14,7 +14,7 @@ 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 . */ + along with this program. If not, see . */ #include diff -Nru grep-3.1/lib/closeout.h grep-3.3/lib/closeout.h --- grep-3.1/lib/closeout.h 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/lib/closeout.h 2018-01-07 00:07:08.000000000 +0000 @@ -1,6 +1,6 @@ /* Close standard output and standard error. - Copyright (C) 1998, 2000, 2003-2004, 2006, 2008-2017 Free Software + Copyright (C) 1998, 2000, 2003-2004, 2006, 2008-2018 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify @@ -14,7 +14,7 @@ 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 . */ + along with this program. If not, see . */ #ifndef CLOSEOUT_H # define CLOSEOUT_H 1 diff -Nru grep-3.1/lib/close-stream.c grep-3.3/lib/close-stream.c --- grep-3.1/lib/close-stream.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/lib/close-stream.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,6 +1,6 @@ /* Close a stream, with nicer error checking than fclose's. - Copyright (C) 1998-2002, 2004, 2006-2017 Free Software Foundation, Inc. + Copyright (C) 1998-2002, 2004, 2006-2018 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 @@ -13,7 +13,7 @@ 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 . */ + along with this program. If not, see . */ #include diff -Nru grep-3.1/lib/colorize.h grep-3.3/lib/colorize.h --- grep-3.1/lib/colorize.h 2017-01-01 11:34:33.000000000 +0000 +++ grep-3.3/lib/colorize.h 2018-01-07 00:09:11.000000000 +0000 @@ -1,6 +1,6 @@ /* Output colorization. - Copyright 2011-2017 Free Software Foundation, Inc. + Copyright 2011-2018 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) diff -Nru grep-3.1/lib/colorize-posix.c grep-3.3/lib/colorize-posix.c --- grep-3.1/lib/colorize-posix.c 2017-01-01 11:34:33.000000000 +0000 +++ grep-3.3/lib/colorize-posix.c 2018-01-07 00:09:11.000000000 +0000 @@ -1,5 +1,5 @@ /* Output colorization. - Copyright 2011-2017 Free Software Foundation, Inc. + Copyright 2011-2018 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 -Nru grep-3.1/lib/colorize-w32.c grep-3.3/lib/colorize-w32.c --- grep-3.1/lib/colorize-w32.c 2017-01-01 11:34:33.000000000 +0000 +++ grep-3.3/lib/colorize-w32.c 2018-01-07 00:09:11.000000000 +0000 @@ -1,5 +1,5 @@ /* Output colorization on MS-Windows. - Copyright 2011-2017 Free Software Foundation, Inc. + Copyright 2011-2018 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 -Nru grep-3.1/lib/config.charset grep-3.3/lib/config.charset --- grep-3.1/lib/config.charset 2017-01-01 11:25:47.000000000 +0000 +++ grep-3.3/lib/config.charset 1970-01-01 00:00:00.000000000 +0000 @@ -1,682 +0,0 @@ -#! /bin/sh -# Output a system dependent table of character encoding aliases. -# -# 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 -# 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 . -# -# The table consists of lines of the form -# ALIAS CANONICAL -# -# ALIAS is the (system dependent) result of "nl_langinfo (CODESET)". -# ALIAS is compared in a case sensitive way. -# -# CANONICAL is the GNU canonical name for this character encoding. -# It must be an encoding supported by libiconv. Support by GNU libc is -# also desirable. CANONICAL is case insensitive. Usually an upper case -# MIME charset name is preferred. -# The current list of GNU canonical charset names is as follows. -# -# name MIME? used by which systems -# (darwin = Mac OS X, woe32 = native Windows) -# -# ASCII, ANSI_X3.4-1968 glibc solaris freebsd netbsd darwin cygwin -# ISO-8859-1 Y glibc aix hpux irix osf solaris freebsd netbsd openbsd darwin cygwin -# ISO-8859-2 Y glibc aix hpux irix osf solaris freebsd netbsd openbsd darwin cygwin -# ISO-8859-3 Y glibc solaris cygwin -# ISO-8859-4 Y osf solaris freebsd netbsd openbsd darwin -# ISO-8859-5 Y glibc aix hpux irix osf solaris freebsd netbsd openbsd darwin cygwin -# ISO-8859-6 Y glibc aix hpux solaris cygwin -# ISO-8859-7 Y glibc aix hpux irix osf solaris netbsd openbsd darwin cygwin -# ISO-8859-8 Y glibc aix hpux osf solaris cygwin -# ISO-8859-9 Y glibc aix hpux irix osf solaris darwin cygwin -# ISO-8859-13 glibc netbsd openbsd darwin cygwin -# ISO-8859-14 glibc cygwin -# ISO-8859-15 glibc aix osf solaris freebsd netbsd openbsd darwin cygwin -# KOI8-R Y glibc solaris freebsd netbsd openbsd darwin -# KOI8-U Y glibc freebsd netbsd openbsd darwin cygwin -# KOI8-T glibc -# CP437 dos -# CP775 dos -# CP850 aix osf dos -# CP852 dos -# CP855 dos -# CP856 aix -# CP857 dos -# CP861 dos -# CP862 dos -# CP864 dos -# CP865 dos -# CP866 freebsd netbsd openbsd darwin dos -# CP869 dos -# CP874 woe32 dos -# CP922 aix -# CP932 aix cygwin woe32 dos -# CP943 aix -# CP949 osf darwin woe32 dos -# CP950 woe32 dos -# CP1046 aix -# CP1124 aix -# CP1125 dos -# CP1129 aix -# CP1131 darwin -# CP1250 woe32 -# CP1251 glibc solaris netbsd openbsd darwin cygwin woe32 -# CP1252 aix woe32 -# CP1253 woe32 -# CP1254 woe32 -# CP1255 glibc woe32 -# CP1256 woe32 -# CP1257 woe32 -# GB2312 Y glibc aix hpux irix solaris freebsd netbsd darwin -# EUC-JP Y glibc aix hpux irix osf solaris freebsd netbsd darwin -# EUC-KR Y glibc aix hpux irix osf solaris freebsd netbsd darwin cygwin -# EUC-TW glibc aix hpux irix osf solaris netbsd -# BIG5 Y glibc aix hpux osf solaris freebsd netbsd darwin cygwin -# BIG5-HKSCS glibc solaris darwin -# GBK glibc aix osf solaris darwin cygwin woe32 dos -# GB18030 glibc solaris netbsd darwin -# SHIFT_JIS Y hpux osf solaris freebsd netbsd darwin -# JOHAB glibc solaris woe32 -# TIS-620 glibc aix hpux osf solaris cygwin -# VISCII Y glibc -# TCVN5712-1 glibc -# ARMSCII-8 glibc darwin -# GEORGIAN-PS glibc cygwin -# PT154 glibc -# HP-ROMAN8 hpux -# HP-ARABIC8 hpux -# HP-GREEK8 hpux -# HP-HEBREW8 hpux -# HP-TURKISH8 hpux -# HP-KANA8 hpux -# DEC-KANJI osf -# DEC-HANYU osf -# UTF-8 Y glibc aix hpux osf solaris netbsd darwin cygwin -# -# Note: Names which are not marked as being a MIME name should not be used in -# Internet protocols for information interchange (mail, news, etc.). -# -# Note: ASCII and ANSI_X3.4-1968 are synonymous canonical names. Applications -# must understand both names and treat them as equivalent. -# -# The first argument passed to this file is the canonical host specification, -# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM -# or -# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM - -host="$1" -os=`echo "$host" | sed -e 's/^[^-]*-[^-]*-\(.*\)$/\1/'` -echo "# This file contains a table of character encoding aliases," -echo "# suitable for operating system '${os}'." -echo "# It was automatically generated from config.charset." -# List of references, updated during installation: -echo "# Packages using this file: " -case "$os" in - linux-gnulibc1*) - # Linux libc5 doesn't have nl_langinfo(CODESET); therefore - # localcharset.c falls back to using the full locale name - # from the environment variables. - echo "C ASCII" - echo "POSIX ASCII" - for l in af af_ZA ca ca_ES da da_DK de de_AT de_BE de_CH de_DE de_LU \ - en en_AU en_BW en_CA en_DK en_GB en_IE en_NZ en_US en_ZA \ - en_ZW es es_AR es_BO es_CL es_CO es_DO es_EC es_ES es_GT \ - es_HN es_MX es_PA es_PE es_PY es_SV es_US es_UY es_VE et \ - et_EE eu eu_ES fi fi_FI fo fo_FO fr fr_BE fr_CA fr_CH fr_FR \ - fr_LU ga ga_IE gl gl_ES id id_ID in in_ID is is_IS it it_CH \ - it_IT kl kl_GL nl nl_BE nl_NL no no_NO pt pt_BR pt_PT sv \ - sv_FI sv_SE; do - echo "$l ISO-8859-1" - echo "$l.iso-8859-1 ISO-8859-1" - echo "$l.iso-8859-15 ISO-8859-15" - echo "$l.iso-8859-15@euro ISO-8859-15" - echo "$l@euro ISO-8859-15" - echo "$l.cp-437 CP437" - echo "$l.cp-850 CP850" - echo "$l.cp-1252 CP1252" - echo "$l.cp-1252@euro CP1252" - #echo "$l.atari-st ATARI-ST" # not a commonly used encoding - echo "$l.utf-8 UTF-8" - echo "$l.utf-8@euro UTF-8" - done - for l in cs cs_CZ hr hr_HR hu hu_HU pl pl_PL ro ro_RO sk sk_SK sl \ - sl_SI sr sr_CS sr_YU; do - echo "$l ISO-8859-2" - echo "$l.iso-8859-2 ISO-8859-2" - echo "$l.cp-852 CP852" - echo "$l.cp-1250 CP1250" - echo "$l.utf-8 UTF-8" - done - for l in mk mk_MK ru ru_RU; do - echo "$l ISO-8859-5" - echo "$l.iso-8859-5 ISO-8859-5" - echo "$l.koi8-r KOI8-R" - echo "$l.cp-866 CP866" - echo "$l.cp-1251 CP1251" - echo "$l.utf-8 UTF-8" - done - for l in ar ar_SA; do - echo "$l ISO-8859-6" - echo "$l.iso-8859-6 ISO-8859-6" - echo "$l.cp-864 CP864" - #echo "$l.cp-868 CP868" # not a commonly used encoding - echo "$l.cp-1256 CP1256" - echo "$l.utf-8 UTF-8" - done - for l in el el_GR gr gr_GR; do - echo "$l ISO-8859-7" - echo "$l.iso-8859-7 ISO-8859-7" - echo "$l.cp-869 CP869" - echo "$l.cp-1253 CP1253" - echo "$l.cp-1253@euro CP1253" - echo "$l.utf-8 UTF-8" - echo "$l.utf-8@euro UTF-8" - done - for l in he he_IL iw iw_IL; do - echo "$l ISO-8859-8" - echo "$l.iso-8859-8 ISO-8859-8" - echo "$l.cp-862 CP862" - echo "$l.cp-1255 CP1255" - echo "$l.utf-8 UTF-8" - done - for l in tr tr_TR; do - echo "$l ISO-8859-9" - echo "$l.iso-8859-9 ISO-8859-9" - echo "$l.cp-857 CP857" - echo "$l.cp-1254 CP1254" - echo "$l.utf-8 UTF-8" - done - for l in lt lt_LT lv lv_LV; do - #echo "$l BALTIC" # not a commonly used encoding, wrong encoding name - echo "$l ISO-8859-13" - done - for l in ru_UA uk uk_UA; do - echo "$l KOI8-U" - done - for l in zh zh_CN; do - #echo "$l GB_2312-80" # not a commonly used encoding, wrong encoding name - echo "$l GB2312" - done - for l in ja ja_JP ja_JP.EUC; do - echo "$l EUC-JP" - done - for l in ko ko_KR; do - echo "$l EUC-KR" - done - for l in th th_TH; do - echo "$l TIS-620" - done - for l in fa fa_IR; do - #echo "$l ISIRI-3342" # a broken encoding - echo "$l.utf-8 UTF-8" - done - ;; - linux* | *-gnu*) - # With glibc-2.1 or newer, we don't need any canonicalization, - # because glibc has iconv and both glibc and libiconv support all - # GNU canonical names directly. Therefore, the Makefile does not - # need to install the alias file at all. - # The following applies only to glibc-2.0.x and older libcs. - echo "ISO_646.IRV:1983 ASCII" - ;; - aix*) - echo "ISO8859-1 ISO-8859-1" - echo "ISO8859-2 ISO-8859-2" - echo "ISO8859-5 ISO-8859-5" - echo "ISO8859-6 ISO-8859-6" - echo "ISO8859-7 ISO-8859-7" - echo "ISO8859-8 ISO-8859-8" - echo "ISO8859-9 ISO-8859-9" - echo "ISO8859-15 ISO-8859-15" - echo "IBM-850 CP850" - echo "IBM-856 CP856" - echo "IBM-921 ISO-8859-13" - echo "IBM-922 CP922" - echo "IBM-932 CP932" - echo "IBM-943 CP943" - echo "IBM-1046 CP1046" - echo "IBM-1124 CP1124" - echo "IBM-1129 CP1129" - echo "IBM-1252 CP1252" - echo "IBM-eucCN GB2312" - echo "IBM-eucJP EUC-JP" - echo "IBM-eucKR EUC-KR" - echo "IBM-eucTW EUC-TW" - echo "big5 BIG5" - echo "GBK GBK" - echo "TIS-620 TIS-620" - echo "UTF-8 UTF-8" - ;; - hpux*) - echo "iso88591 ISO-8859-1" - echo "iso88592 ISO-8859-2" - echo "iso88595 ISO-8859-5" - echo "iso88596 ISO-8859-6" - echo "iso88597 ISO-8859-7" - echo "iso88598 ISO-8859-8" - echo "iso88599 ISO-8859-9" - echo "iso885915 ISO-8859-15" - echo "roman8 HP-ROMAN8" - echo "arabic8 HP-ARABIC8" - echo "greek8 HP-GREEK8" - echo "hebrew8 HP-HEBREW8" - echo "turkish8 HP-TURKISH8" - echo "kana8 HP-KANA8" - echo "tis620 TIS-620" - echo "big5 BIG5" - echo "eucJP EUC-JP" - echo "eucKR EUC-KR" - echo "eucTW EUC-TW" - echo "hp15CN GB2312" - #echo "ccdc ?" # what is this? - echo "SJIS SHIFT_JIS" - echo "utf8 UTF-8" - ;; - irix*) - echo "ISO8859-1 ISO-8859-1" - echo "ISO8859-2 ISO-8859-2" - echo "ISO8859-5 ISO-8859-5" - echo "ISO8859-7 ISO-8859-7" - echo "ISO8859-9 ISO-8859-9" - echo "eucCN GB2312" - echo "eucJP EUC-JP" - echo "eucKR EUC-KR" - echo "eucTW EUC-TW" - ;; - osf*) - echo "ISO8859-1 ISO-8859-1" - echo "ISO8859-2 ISO-8859-2" - echo "ISO8859-4 ISO-8859-4" - echo "ISO8859-5 ISO-8859-5" - echo "ISO8859-7 ISO-8859-7" - echo "ISO8859-8 ISO-8859-8" - echo "ISO8859-9 ISO-8859-9" - echo "ISO8859-15 ISO-8859-15" - echo "cp850 CP850" - echo "big5 BIG5" - echo "dechanyu DEC-HANYU" - echo "dechanzi GB2312" - echo "deckanji DEC-KANJI" - echo "deckorean EUC-KR" - echo "eucJP EUC-JP" - echo "eucKR EUC-KR" - echo "eucTW EUC-TW" - echo "GBK GBK" - echo "KSC5601 CP949" - echo "sdeckanji EUC-JP" - echo "SJIS SHIFT_JIS" - echo "TACTIS TIS-620" - echo "UTF-8 UTF-8" - ;; - solaris*) - echo "646 ASCII" - echo "ISO8859-1 ISO-8859-1" - echo "ISO8859-2 ISO-8859-2" - echo "ISO8859-3 ISO-8859-3" - echo "ISO8859-4 ISO-8859-4" - echo "ISO8859-5 ISO-8859-5" - echo "ISO8859-6 ISO-8859-6" - echo "ISO8859-7 ISO-8859-7" - echo "ISO8859-8 ISO-8859-8" - echo "ISO8859-9 ISO-8859-9" - echo "ISO8859-15 ISO-8859-15" - echo "koi8-r KOI8-R" - echo "ansi-1251 CP1251" - echo "BIG5 BIG5" - echo "Big5-HKSCS BIG5-HKSCS" - echo "gb2312 GB2312" - echo "GBK GBK" - echo "GB18030 GB18030" - echo "cns11643 EUC-TW" - echo "5601 EUC-KR" - echo "ko_KR.johap92 JOHAB" - echo "eucJP EUC-JP" - echo "PCK SHIFT_JIS" - echo "TIS620.2533 TIS-620" - #echo "sun_eu_greek ?" # what is this? - echo "UTF-8 UTF-8" - ;; - freebsd*) - # FreeBSD 4.2 doesn't have nl_langinfo(CODESET); therefore - # localcharset.c falls back to using the full locale name - # from the environment variables. - echo "C ASCII" - echo "US-ASCII ASCII" - for l in la_LN lt_LN; do - echo "$l.ASCII ASCII" - done - for l in da_DK de_AT de_CH de_DE en_AU en_CA en_GB en_US es_ES \ - fi_FI fr_BE fr_CA fr_CH fr_FR is_IS it_CH it_IT la_LN \ - lt_LN nl_BE nl_NL no_NO pt_PT sv_SE; do - echo "$l.ISO_8859-1 ISO-8859-1" - echo "$l.DIS_8859-15 ISO-8859-15" - done - for l in cs_CZ hr_HR hu_HU la_LN lt_LN pl_PL sl_SI; do - echo "$l.ISO_8859-2 ISO-8859-2" - done - for l in la_LN lt_LT; do - echo "$l.ISO_8859-4 ISO-8859-4" - done - for l in ru_RU ru_SU; do - echo "$l.KOI8-R KOI8-R" - echo "$l.ISO_8859-5 ISO-8859-5" - echo "$l.CP866 CP866" - done - echo "uk_UA.KOI8-U KOI8-U" - echo "zh_TW.BIG5 BIG5" - echo "zh_TW.Big5 BIG5" - echo "zh_CN.EUC GB2312" - echo "ja_JP.EUC EUC-JP" - echo "ja_JP.SJIS SHIFT_JIS" - echo "ja_JP.Shift_JIS SHIFT_JIS" - echo "ko_KR.EUC EUC-KR" - ;; - netbsd*) - echo "646 ASCII" - echo "ISO8859-1 ISO-8859-1" - echo "ISO8859-2 ISO-8859-2" - echo "ISO8859-4 ISO-8859-4" - echo "ISO8859-5 ISO-8859-5" - echo "ISO8859-7 ISO-8859-7" - echo "ISO8859-13 ISO-8859-13" - echo "ISO8859-15 ISO-8859-15" - echo "eucCN GB2312" - echo "eucJP EUC-JP" - echo "eucKR EUC-KR" - echo "eucTW EUC-TW" - echo "BIG5 BIG5" - echo "SJIS SHIFT_JIS" - ;; - openbsd*) - echo "646 ASCII" - echo "ISO8859-1 ISO-8859-1" - echo "ISO8859-2 ISO-8859-2" - echo "ISO8859-4 ISO-8859-4" - echo "ISO8859-5 ISO-8859-5" - echo "ISO8859-7 ISO-8859-7" - echo "ISO8859-13 ISO-8859-13" - echo "ISO8859-15 ISO-8859-15" - ;; - darwin[56]*) - # Darwin 6.8 doesn't have nl_langinfo(CODESET); therefore - # localcharset.c falls back to using the full locale name - # from the environment variables. - echo "C ASCII" - for l in en_AU en_CA en_GB en_US la_LN; do - echo "$l.US-ASCII ASCII" - done - for l in da_DK de_AT de_CH de_DE en_AU en_CA en_GB en_US es_ES \ - fi_FI fr_BE fr_CA fr_CH fr_FR is_IS it_CH it_IT nl_BE \ - nl_NL no_NO pt_PT sv_SE; do - echo "$l ISO-8859-1" - echo "$l.ISO8859-1 ISO-8859-1" - echo "$l.ISO8859-15 ISO-8859-15" - done - for l in la_LN; do - echo "$l.ISO8859-1 ISO-8859-1" - echo "$l.ISO8859-15 ISO-8859-15" - done - for l in cs_CZ hr_HR hu_HU la_LN pl_PL sl_SI; do - echo "$l.ISO8859-2 ISO-8859-2" - done - for l in la_LN lt_LT; do - echo "$l.ISO8859-4 ISO-8859-4" - done - for l in ru_RU; do - echo "$l.KOI8-R KOI8-R" - echo "$l.ISO8859-5 ISO-8859-5" - echo "$l.CP866 CP866" - done - for l in bg_BG; do - echo "$l.CP1251 CP1251" - done - echo "uk_UA.KOI8-U KOI8-U" - echo "zh_TW.BIG5 BIG5" - echo "zh_TW.Big5 BIG5" - echo "zh_CN.EUC GB2312" - echo "ja_JP.EUC EUC-JP" - echo "ja_JP.SJIS SHIFT_JIS" - echo "ko_KR.EUC EUC-KR" - ;; - darwin*) - # Darwin 7.5 has nl_langinfo(CODESET), but sometimes its value is - # useless: - # - It returns the empty string when LANG is set to a locale of the - # form ll_CC, although ll_CC/LC_CTYPE is a symlink to an UTF-8 - # LC_CTYPE file. - # - The environment variables LANG, LC_CTYPE, LC_ALL are not set by - # the system; nl_langinfo(CODESET) returns "US-ASCII" in this case. - # - The documentation says: - # "... all code that calls BSD system routines should ensure - # that the const *char parameters of these routines are in UTF-8 - # encoding. All BSD system functions expect their string - # parameters to be in UTF-8 encoding and nothing else." - # It also says - # "An additional caveat is that string parameters for files, - # paths, and other file-system entities must be in canonical - # UTF-8. In a canonical UTF-8 Unicode string, all decomposable - # characters are decomposed ..." - # but this is not true: You can pass non-decomposed UTF-8 strings - # to file system functions, and it is the OS which will convert - # them to decomposed UTF-8 before accessing the file system. - # - The Apple Terminal application displays UTF-8 by default. - # - However, other applications are free to use different encodings: - # - xterm uses ISO-8859-1 by default. - # - TextEdit uses MacRoman by default. - # We prefer UTF-8 over decomposed UTF-8-MAC because one should - # minimize the use of decomposed Unicode. Unfortunately, through the - # Darwin file system, decomposed UTF-8 strings are leaked into user - # space nevertheless. - # Then there are also the locales with encodings other than US-ASCII - # and UTF-8. These locales can be occasionally useful to users (e.g. - # when grepping through ISO-8859-1 encoded text files), when all their - # file names are in US-ASCII. - echo "ISO8859-1 ISO-8859-1" - echo "ISO8859-2 ISO-8859-2" - echo "ISO8859-4 ISO-8859-4" - echo "ISO8859-5 ISO-8859-5" - echo "ISO8859-7 ISO-8859-7" - echo "ISO8859-9 ISO-8859-9" - echo "ISO8859-13 ISO-8859-13" - echo "ISO8859-15 ISO-8859-15" - echo "KOI8-R KOI8-R" - echo "KOI8-U KOI8-U" - echo "CP866 CP866" - echo "CP949 CP949" - echo "CP1131 CP1131" - echo "CP1251 CP1251" - echo "eucCN GB2312" - echo "GB2312 GB2312" - echo "eucJP EUC-JP" - echo "eucKR EUC-KR" - echo "Big5 BIG5" - echo "Big5HKSCS BIG5-HKSCS" - echo "GBK GBK" - echo "GB18030 GB18030" - echo "SJIS SHIFT_JIS" - echo "ARMSCII-8 ARMSCII-8" - echo "PT154 PT154" - #echo "ISCII-DEV ?" - echo "* UTF-8" - ;; - beos* | haiku*) - # BeOS and Haiku have a single locale, and it has UTF-8 encoding. - echo "* UTF-8" - ;; - msdosdjgpp*) - # DJGPP 2.03 doesn't have nl_langinfo(CODESET); therefore - # localcharset.c falls back to using the full locale name - # from the environment variables. - echo "#" - echo "# The encodings given here may not all be correct." - echo "# If you find that the encoding given for your language and" - echo "# country is not the one your DOS machine actually uses, just" - echo "# correct it in this file, and send a mail to" - echo "# Juan Manuel Guerrero " - echo "# and Bruno Haible ." - echo "#" - echo "C ASCII" - # ISO-8859-1 languages - echo "ca CP850" - echo "ca_ES CP850" - echo "da CP865" # not CP850 ?? - echo "da_DK CP865" # not CP850 ?? - echo "de CP850" - echo "de_AT CP850" - echo "de_CH CP850" - echo "de_DE CP850" - echo "en CP850" - echo "en_AU CP850" # not CP437 ?? - echo "en_CA CP850" - echo "en_GB CP850" - echo "en_NZ CP437" - echo "en_US CP437" - echo "en_ZA CP850" # not CP437 ?? - echo "es CP850" - echo "es_AR CP850" - echo "es_BO CP850" - echo "es_CL CP850" - echo "es_CO CP850" - echo "es_CR CP850" - echo "es_CU CP850" - echo "es_DO CP850" - echo "es_EC CP850" - echo "es_ES CP850" - echo "es_GT CP850" - echo "es_HN CP850" - echo "es_MX CP850" - echo "es_NI CP850" - echo "es_PA CP850" - echo "es_PY CP850" - echo "es_PE CP850" - echo "es_SV CP850" - echo "es_UY CP850" - echo "es_VE CP850" - echo "et CP850" - echo "et_EE CP850" - echo "eu CP850" - echo "eu_ES CP850" - echo "fi CP850" - echo "fi_FI CP850" - echo "fr CP850" - echo "fr_BE CP850" - echo "fr_CA CP850" - echo "fr_CH CP850" - echo "fr_FR CP850" - echo "ga CP850" - echo "ga_IE CP850" - echo "gd CP850" - echo "gd_GB CP850" - echo "gl CP850" - echo "gl_ES CP850" - echo "id CP850" # not CP437 ?? - echo "id_ID CP850" # not CP437 ?? - echo "is CP861" # not CP850 ?? - echo "is_IS CP861" # not CP850 ?? - echo "it CP850" - echo "it_CH CP850" - echo "it_IT CP850" - echo "lt CP775" - echo "lt_LT CP775" - echo "lv CP775" - echo "lv_LV CP775" - echo "nb CP865" # not CP850 ?? - echo "nb_NO CP865" # not CP850 ?? - echo "nl CP850" - echo "nl_BE CP850" - echo "nl_NL CP850" - echo "nn CP865" # not CP850 ?? - echo "nn_NO CP865" # not CP850 ?? - echo "no CP865" # not CP850 ?? - echo "no_NO CP865" # not CP850 ?? - echo "pt CP850" - echo "pt_BR CP850" - echo "pt_PT CP850" - echo "sv CP850" - echo "sv_SE CP850" - # ISO-8859-2 languages - echo "cs CP852" - echo "cs_CZ CP852" - echo "hr CP852" - echo "hr_HR CP852" - echo "hu CP852" - echo "hu_HU CP852" - echo "pl CP852" - echo "pl_PL CP852" - echo "ro CP852" - echo "ro_RO CP852" - echo "sk CP852" - echo "sk_SK CP852" - echo "sl CP852" - echo "sl_SI CP852" - echo "sq CP852" - echo "sq_AL CP852" - echo "sr CP852" # CP852 or CP866 or CP855 ?? - echo "sr_CS CP852" # CP852 or CP866 or CP855 ?? - echo "sr_YU CP852" # CP852 or CP866 or CP855 ?? - # ISO-8859-3 languages - echo "mt CP850" - echo "mt_MT CP850" - # ISO-8859-5 languages - echo "be CP866" - echo "be_BE CP866" - echo "bg CP866" # not CP855 ?? - echo "bg_BG CP866" # not CP855 ?? - echo "mk CP866" # not CP855 ?? - echo "mk_MK CP866" # not CP855 ?? - echo "ru CP866" - echo "ru_RU CP866" - echo "uk CP1125" - echo "uk_UA CP1125" - # ISO-8859-6 languages - echo "ar CP864" - echo "ar_AE CP864" - echo "ar_DZ CP864" - echo "ar_EG CP864" - echo "ar_IQ CP864" - echo "ar_IR CP864" - echo "ar_JO CP864" - echo "ar_KW CP864" - echo "ar_MA CP864" - echo "ar_OM CP864" - echo "ar_QA CP864" - echo "ar_SA CP864" - echo "ar_SY CP864" - # ISO-8859-7 languages - echo "el CP869" - echo "el_GR CP869" - # ISO-8859-8 languages - echo "he CP862" - echo "he_IL CP862" - # ISO-8859-9 languages - echo "tr CP857" - echo "tr_TR CP857" - # Japanese - echo "ja CP932" - echo "ja_JP CP932" - # Chinese - echo "zh_CN GBK" - echo "zh_TW CP950" # not CP938 ?? - # Korean - echo "kr CP949" # not CP934 ?? - echo "kr_KR CP949" # not CP934 ?? - # Thai - echo "th CP874" - echo "th_TH CP874" - # Other - echo "eo CP850" - echo "eo_EO CP850" - ;; -esac diff -Nru grep-3.1/lib/creat-safer.c grep-3.3/lib/creat-safer.c --- grep-3.1/lib/creat-safer.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/lib/creat-safer.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,6 +1,6 @@ /* Invoke creat, but avoid some glitches. - Copyright (C) 2005-2006, 2009-2017 Free Software Foundation, Inc. + Copyright (C) 2005-2006, 2009-2018 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 @@ -13,7 +13,7 @@ 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 . */ + along with this program. If not, see . */ /* Written by Jim Meyering. */ diff -Nru grep-3.1/lib/c-stack.c grep-3.3/lib/c-stack.c --- grep-3.1/lib/c-stack.c 1970-01-01 00:00:00.000000000 +0000 +++ grep-3.3/lib/c-stack.c 2018-04-21 23:36:13.000000000 +0000 @@ -0,0 +1,334 @@ +/* Stack overflow handling. + + Copyright (C) 2002, 2004, 2006, 2008-2018 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. */ + +/* NOTES: + + A program that uses alloca, dynamic arrays, or large local + variables may extend the stack by more than a page at a time. If + so, when the stack overflows the operating system may not detect + the overflow until the program uses the array, and this module may + incorrectly report a program error instead of a stack overflow. + + To avoid this problem, allocate only small objects on the stack; a + program should be OK if it limits single allocations to a page or + less. Allocate larger arrays in static storage, or on the heap + (e.g., with malloc). Yes, this is a pain, but we don't know of any + better solution that is portable. + + No attempt has been made to deal with multithreaded applications. */ + +#include + +#ifndef __attribute__ +# if __GNUC__ < 3 +# define __attribute__(x) +# endif +#endif + +#include "gettext.h" +#define _(msgid) gettext (msgid) + +#include + +#include +#if ! HAVE_STACK_T && ! defined stack_t +typedef struct sigaltstack stack_t; +#endif +#ifndef SIGSTKSZ +# define SIGSTKSZ 16384 +#elif HAVE_LIBSIGSEGV && SIGSTKSZ < 16384 +/* libsigsegv 2.6 through 2.8 have a bug where some architectures use + more than the Linux default of an 8k alternate stack when deciding + if a fault was caused by stack overflow. */ +# undef SIGSTKSZ +# define SIGSTKSZ 16384 +#endif + +#include +#include + +/* Posix 2001 declares ucontext_t in , Posix 200x in + . */ +#if HAVE_UCONTEXT_H +# include +#endif + +#include + +#if HAVE_LIBSIGSEGV +# include +#endif + +#include "c-stack.h" +#include "exitfail.h" +#include "ignore-value.h" +#include "getprogname.h" + +#if defined SA_ONSTACK && defined SA_SIGINFO +# define SIGINFO_WORKS 1 +#else +# define SIGINFO_WORKS 0 +# ifndef SA_ONSTACK +# define SA_ONSTACK 0 +# endif +#endif + +/* The user-specified action to take when a SEGV-related program error + or stack overflow occurs. */ +static void (* volatile segv_action) (int); + +/* Translated messages for program errors and stack overflow. Do not + translate them in the signal handler, since gettext is not + async-signal-safe. */ +static char const * volatile program_error_message; +static char const * volatile stack_overflow_message; + +#if ((HAVE_LIBSIGSEGV && ! HAVE_XSI_STACK_OVERFLOW_HEURISTIC) \ + || (HAVE_SIGALTSTACK && HAVE_DECL_SIGALTSTACK \ + && HAVE_STACK_OVERFLOW_HANDLING)) + +/* Output an error message, then exit with status EXIT_FAILURE if it + appears to have been a stack overflow, or with a core dump + otherwise. This function is async-signal-safe. */ + +static _Noreturn void +die (int signo) +{ + char const *message; +#if !SIGINFO_WORKS && !HAVE_LIBSIGSEGV + /* We can't easily determine whether it is a stack overflow; so + assume that the rest of our program is perfect (!) and that + this segmentation violation is a stack overflow. */ + signo = 0; +#endif /* !SIGINFO_WORKS && !HAVE_LIBSIGSEGV */ + segv_action (signo); + message = signo ? program_error_message : stack_overflow_message; + ignore_value (write (STDERR_FILENO, getprogname (), strlen (getprogname ()))); + ignore_value (write (STDERR_FILENO, ": ", 2)); + ignore_value (write (STDERR_FILENO, message, strlen (message))); + ignore_value (write (STDERR_FILENO, "\n", 1)); + if (! signo) + _exit (exit_failure); + raise (signo); + abort (); +} +#endif + +#if (HAVE_SIGALTSTACK && HAVE_DECL_SIGALTSTACK \ + && HAVE_STACK_OVERFLOW_HANDLING) || HAVE_LIBSIGSEGV + +/* Storage for the alternate signal stack. */ +static union +{ + char buffer[SIGSTKSZ]; + + /* These other members are for proper alignment. There's no + standard way to guarantee stack alignment, but this seems enough + in practice. */ + long double ld; + long l; + void *p; +} alternate_signal_stack; + +static void +null_action (int signo __attribute__ ((unused))) +{ +} + +#endif /* SIGALTSTACK || LIBSIGSEGV */ + +/* Only use libsigsegv if we need it; platforms like Solaris can + detect stack overflow without the overhead of an external + library. */ +#if HAVE_LIBSIGSEGV && ! HAVE_XSI_STACK_OVERFLOW_HEURISTIC + +/* Nonzero if general segv handler could not be installed. */ +static volatile int segv_handler_missing; + +/* Handle a segmentation violation and exit if it cannot be stack + overflow. This function is async-signal-safe. */ + +static int segv_handler (void *address __attribute__ ((unused)), + int serious) +{ +# if DEBUG + { + char buf[1024]; + sprintf (buf, "segv_handler serious=%d\n", serious); + write (STDERR_FILENO, buf, strlen (buf)); + } +# endif + + /* If this fault is not serious, return 0 to let the stack overflow + handler take a shot at it. */ + if (!serious) + return 0; + die (SIGSEGV); +} + +/* Handle a segmentation violation that is likely to be a stack + overflow and exit. This function is async-signal-safe. */ + +static _Noreturn void +overflow_handler (int emergency, + stackoverflow_context_t context __attribute__ ((unused))) +{ +# if DEBUG + { + char buf[1024]; + sprintf (buf, "overflow_handler emergency=%d segv_handler_missing=%d\n", + emergency, segv_handler_missing); + write (STDERR_FILENO, buf, strlen (buf)); + } +# endif + + die ((!emergency || segv_handler_missing) ? 0 : SIGSEGV); +} + +int +c_stack_action (void (*action) (int)) +{ + segv_action = action ? action : null_action; + program_error_message = _("program error"); + stack_overflow_message = _("stack overflow"); + + /* Always install the overflow handler. */ + if (stackoverflow_install_handler (overflow_handler, + alternate_signal_stack.buffer, + sizeof alternate_signal_stack.buffer)) + { + errno = ENOTSUP; + return -1; + } + /* Try installing a general handler; if it fails, then treat all + segv as stack overflow. */ + segv_handler_missing = sigsegv_install_handler (segv_handler); + return 0; +} + +#elif HAVE_SIGALTSTACK && HAVE_DECL_SIGALTSTACK && HAVE_STACK_OVERFLOW_HANDLING + +# if SIGINFO_WORKS + +/* Handle a segmentation violation and exit. This function is + async-signal-safe. */ + +static _Noreturn void +segv_handler (int signo, siginfo_t *info, + void *context __attribute__ ((unused))) +{ + /* Clear SIGNO if it seems to have been a stack overflow. */ +# if ! HAVE_XSI_STACK_OVERFLOW_HEURISTIC + /* We can't easily determine whether it is a stack overflow; so + assume that the rest of our program is perfect (!) and that + this segmentation violation is a stack overflow. + + Note that although both Linux and Solaris provide + sigaltstack, SA_ONSTACK, and SA_SIGINFO, currently only + Solaris satisfies the XSI heuristic. This is because + Solaris populates uc_stack with the details of the + interrupted stack, while Linux populates it with the details + of the current stack. */ + signo = 0; +# else + if (0 < info->si_code) + { + /* If the faulting address is within the stack, or within one + page of the stack, assume that it is a stack overflow. */ + ucontext_t const *user_context = context; + char const *stack_base = user_context->uc_stack.ss_sp; + size_t stack_size = user_context->uc_stack.ss_size; + char const *faulting_address = info->si_addr; + size_t page_size = sysconf (_SC_PAGESIZE); + size_t s = faulting_address - stack_base + page_size; + if (s < stack_size + 2 * page_size) + signo = 0; + +# if DEBUG + { + char buf[1024]; + sprintf (buf, + "segv_handler fault=%p base=%p size=%lx page=%lx signo=%d\n", + faulting_address, stack_base, (unsigned long) stack_size, + (unsigned long) page_size, signo); + write (STDERR_FILENO, buf, strlen (buf)); + } +# endif + } +# endif + + die (signo); +} +# endif + +int +c_stack_action (void (*action) (int)) +{ + int r; + stack_t st; + struct sigaction act; + st.ss_flags = 0; +# if SIGALTSTACK_SS_REVERSED + /* Irix mistakenly treats ss_sp as the upper bound, rather than + lower bound, of the alternate stack. */ + st.ss_sp = alternate_signal_stack.buffer + SIGSTKSZ - sizeof (void *); + st.ss_size = sizeof alternate_signal_stack.buffer - sizeof (void *); +# else + st.ss_sp = alternate_signal_stack.buffer; + st.ss_size = sizeof alternate_signal_stack.buffer; +# endif + r = sigaltstack (&st, NULL); + if (r != 0) + return r; + + segv_action = action ? action : null_action; + program_error_message = _("program error"); + stack_overflow_message = _("stack overflow"); + + sigemptyset (&act.sa_mask); + +# if SIGINFO_WORKS + /* POSIX 1003.1-2001 says SA_RESETHAND implies SA_NODEFER, but + this is not true on Solaris 8 at least. It doesn't hurt to use + SA_NODEFER here, so leave it in. */ + act.sa_flags = SA_NODEFER | SA_ONSTACK | SA_RESETHAND | SA_SIGINFO; + act.sa_sigaction = segv_handler; +# else + act.sa_flags = SA_NODEFER | SA_ONSTACK | SA_RESETHAND; + act.sa_handler = die; +# endif + +# if FAULT_YIELDS_SIGBUS + if (sigaction (SIGBUS, &act, NULL) < 0) + return -1; +# endif + return sigaction (SIGSEGV, &act, NULL); +} + +#else /* ! ((HAVE_SIGALTSTACK && HAVE_DECL_SIGALTSTACK + && HAVE_STACK_OVERFLOW_HANDLING) || HAVE_LIBSIGSEGV) */ + +int +c_stack_action (void (*action) (int) __attribute__ ((unused))) +{ + errno = ENOTSUP; + return -1; +} + +#endif diff -Nru grep-3.1/lib/c-stack.h grep-3.3/lib/c-stack.h --- grep-3.1/lib/c-stack.h 1970-01-01 00:00:00.000000000 +0000 +++ grep-3.3/lib/c-stack.h 2018-01-07 00:07:08.000000000 +0000 @@ -0,0 +1,44 @@ +/* Stack overflow handling. + + Copyright (C) 2002, 2004, 2008-2018 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 . */ + + +/* Set up ACTION so that it is invoked on C stack overflow and on other, + stack-unrelated, segmentation violation. + Return -1 (setting errno) if this cannot be done. + + When a stack overflow or segmentation violation occurs: + 1) ACTION is called. It is passed an argument equal to + - 0, for a stack overflow, + - SIGSEGV, for a segmentation violation that does not appear related + to stack overflow. + On many platforms the two cases are hard to distinguish; when in doubt, + zero is passed. + 2) If ACTION returns, a message is written to standard error, and the + program is terminated: in the case of stack overflow, with exit code + exit_failure (see "exitfail.h"), otherwise through a signal SIGSEGV. + + A null ACTION acts like an action that does nothing. + + ACTION must be async-signal-safe. ACTION together with its callees + must not require more than SIGSTKSZ bytes of stack space. Also, + ACTION should not call longjmp, because this implementation does + not guarantee that it is safe to return to the original stack. + + This function may install a handler for the SIGSEGV signal or for the SIGBUS + signal or exercise other system dependent exception handling APIs. */ + +extern int c_stack_action (void (* /*action*/) (int)); diff -Nru grep-3.1/lib/c-strcasecmp.c grep-3.3/lib/c-strcasecmp.c --- grep-3.1/lib/c-strcasecmp.c 2017-01-01 11:25:46.000000000 +0000 +++ grep-3.3/lib/c-strcasecmp.c 2018-01-07 00:08:01.000000000 +0000 @@ -1,5 +1,5 @@ /* c-strcasecmp.c -- case insensitive string comparator in C locale - Copyright (C) 1998-1999, 2005-2006, 2009-2017 Free Software Foundation, Inc. + Copyright (C) 1998-1999, 2005-2006, 2009-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program; if not, see . */ #include diff -Nru grep-3.1/lib/c-strcaseeq.h grep-3.3/lib/c-strcaseeq.h --- grep-3.1/lib/c-strcaseeq.h 2017-01-01 11:25:46.000000000 +0000 +++ grep-3.3/lib/c-strcaseeq.h 2018-01-07 00:08:01.000000000 +0000 @@ -1,5 +1,5 @@ /* Optimized case-insensitive string comparison in C locale. - Copyright (C) 2001-2002, 2007, 2009-2017 Free Software Foundation, Inc. + Copyright (C) 2001-2002, 2007, 2009-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ /* Written by Bruno Haible . */ diff -Nru grep-3.1/lib/c-strcase.h grep-3.3/lib/c-strcase.h --- grep-3.1/lib/c-strcase.h 2017-01-01 11:25:46.000000000 +0000 +++ grep-3.3/lib/c-strcase.h 2018-01-07 00:08:01.000000000 +0000 @@ -1,5 +1,5 @@ /* Case-insensitive string comparison functions in C locale. - Copyright (C) 1995-1996, 2001, 2003, 2005, 2009-2017 Free Software + Copyright (C) 1995-1996, 2001, 2003, 2005, 2009-2018 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify @@ -13,7 +13,7 @@ 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 . */ + along with this program; if not, see . */ #ifndef C_STRCASE_H #define C_STRCASE_H diff -Nru grep-3.1/lib/c-strncasecmp.c grep-3.3/lib/c-strncasecmp.c --- grep-3.1/lib/c-strncasecmp.c 2017-01-01 11:25:46.000000000 +0000 +++ grep-3.3/lib/c-strncasecmp.c 2018-01-07 00:08:01.000000000 +0000 @@ -1,5 +1,5 @@ /* c-strncasecmp.c -- case insensitive string comparator in C locale - Copyright (C) 1998-1999, 2005-2006, 2009-2017 Free Software Foundation, Inc. + Copyright (C) 1998-1999, 2005-2006, 2009-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program; if not, see . */ #include diff -Nru grep-3.1/lib/ctype.in.h grep-3.3/lib/ctype.in.h --- grep-3.1/lib/ctype.in.h 2017-01-01 11:25:47.000000000 +0000 +++ grep-3.3/lib/ctype.in.h 2018-01-07 00:08:01.000000000 +0000 @@ -1,6 +1,6 @@ /* A substitute for ISO C99 , for platforms on which it is incomplete. - Copyright (C) 2009-2017 Free Software Foundation, Inc. + Copyright (C) 2009-2018 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 @@ -13,7 +13,7 @@ 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 . */ + along with this program; if not, see . */ /* Written by Bruno Haible. */ diff -Nru grep-3.1/lib/cycle-check.c grep-3.3/lib/cycle-check.c --- grep-3.1/lib/cycle-check.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/lib/cycle-check.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,6 +1,6 @@ /* help detect directory cycles efficiently - Copyright (C) 2003-2006, 2009-2017 Free Software Foundation, Inc. + Copyright (C) 2003-2006, 2009-2018 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 @@ -13,7 +13,7 @@ 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 . */ + along with this program. If not, see . */ /* Written by Jim Meyering */ diff -Nru grep-3.1/lib/cycle-check.h grep-3.3/lib/cycle-check.h --- grep-3.1/lib/cycle-check.h 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/lib/cycle-check.h 2018-01-07 00:07:08.000000000 +0000 @@ -1,6 +1,6 @@ /* help detect directory cycles efficiently - Copyright (C) 2003-2004, 2006, 2009-2017 Free Software Foundation, Inc. + Copyright (C) 2003-2004, 2006, 2009-2018 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 @@ -13,7 +13,7 @@ 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 . */ + along with this program. If not, see . */ /* Written by Jim Meyering */ diff -Nru grep-3.1/lib/dfa.c grep-3.3/lib/dfa.c --- grep-3.1/lib/dfa.c 2017-05-20 00:00:26.000000000 +0000 +++ grep-3.3/lib/dfa.c 2018-12-21 04:04:42.000000000 +0000 @@ -1,5 +1,5 @@ /* dfa.c - deterministic extended regexp routines for GNU - Copyright (C) 1988, 1998, 2000, 2002, 2004-2005, 2007-2017 Free Software + Copyright (C) 1988, 1998, 2000, 2002, 2004-2005, 2007-2018 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify @@ -227,43 +227,20 @@ end of input; any value of END or less in the parse tree is such a symbol. Accepting states of the DFA are those that would have - a transition on END. */ + a transition on END. This is -1, not some + more-negative value, to tweak the speed of + comparisons to END. */ /* Ordinary character values are terminal symbols that match themselves. */ + /* CSET must come last in the following list of special tokens. Otherwise, + the list order matters only for performance. Related special tokens + should have nearby values so that code like (t == ANYCHAR || t == MBCSET + || CSET <= t) can be done with a single machine-level comparison. */ + EMPTY = NOTCHAR, /* EMPTY is a terminal symbol that matches the empty string. */ - BACKREF, /* BACKREF is generated by \ - or by any other construct that - is not completely handled. If the scanner - detects a transition on backref, it returns - a kind of "semi-success" indicating that - the match will have to be verified with - a backtracking matcher. */ - - BEGLINE, /* BEGLINE is a terminal symbol that matches - the empty string at the beginning of a - line. */ - - ENDLINE, /* ENDLINE is a terminal symbol that matches - the empty string at the end of a line. */ - - BEGWORD, /* BEGWORD is a terminal symbol that matches - the empty string at the beginning of a - word. */ - - ENDWORD, /* ENDWORD is a terminal symbol that matches - the empty string at the end of a word. */ - - LIMWORD, /* LIMWORD is a terminal symbol that matches - the empty string at the beginning or the - end of a word. */ - - NOTLIMWORD, /* NOTLIMWORD is a terminal symbol that - matches the empty string not at - the beginning or end of a word. */ - QMARK, /* QMARK is an operator of one argument that matches zero or one occurrences of its argument. */ @@ -293,16 +270,49 @@ RPAREN, /* RPAREN never appears in the parse tree. */ + WCHAR, /* Only returned by lex. wctok contains + the wide character representation. */ + ANYCHAR, /* ANYCHAR is a terminal symbol that matches a valid multibyte (or single byte) character. It is used only if MB_CUR_MAX > 1. */ + BEG, /* BEG is an initial symbol that matches the + beginning of input. */ + + BEGLINE, /* BEGLINE is a terminal symbol that matches + the empty string at the beginning of a + line. */ + + ENDLINE, /* ENDLINE is a terminal symbol that matches + the empty string at the end of a line. */ + + BEGWORD, /* BEGWORD is a terminal symbol that matches + the empty string at the beginning of a + word. */ + + ENDWORD, /* ENDWORD is a terminal symbol that matches + the empty string at the end of a word. */ + + LIMWORD, /* LIMWORD is a terminal symbol that matches + the empty string at the beginning or the + end of a word. */ + + NOTLIMWORD, /* NOTLIMWORD is a terminal symbol that + matches the empty string not at + the beginning or end of a word. */ + + BACKREF, /* BACKREF is generated by \ + or by any other construct that + is not completely handled. If the scanner + detects a transition on backref, it returns + a kind of "semi-success" indicating that + the match will have to be verified with + a backtracking matcher. */ + MBCSET, /* MBCSET is similar to CSET, but for multibyte characters. */ - WCHAR, /* Only returned by lex. wctok contains - the wide character representation. */ - CSET /* CSET and (and any value greater) is a terminal symbol that matches any of a class of characters. */ @@ -327,13 +337,6 @@ ptrdiff_t alloc; /* Number of elements allocated in ELEMS. */ } position_set; -/* Sets of leaves are also stored as arrays. */ -typedef struct -{ - size_t *elems; /* Elements of this position set. */ - size_t nelem; /* Number of elements in this set. */ -} leaf_set; - /* A state of the dfa consists of a set of positions, some flags, and the token value of the lowest-numbered position of the state that contains an END token. */ @@ -510,6 +513,12 @@ string matching, but anchored to the beginning of the buffer. */ + /* Fields filled by dfaanalyze. */ + int *constraints; /* Array of union of accepting constraints + in the follow of a position. */ + int *separates; /* Array of contexts on follow of a + position. */ + /* Fields filled by dfaexec. */ state_num tralloc; /* Number of transition tables that have slots so far, not counting trans[-1] and @@ -630,9 +639,9 @@ static void prtok (token t) { - if (t < 0) + if (t <= END) fprintf (stderr, "END"); - else if (t < NOTCHAR) + else if (0 <= t && t < NOTCHAR) { unsigned int ch = t; fprintf (stderr, "0x%02x", ch); @@ -642,6 +651,9 @@ char const *s; switch (t) { + case BEG: + s = "BEG"; + break; case EMPTY: s = "EMPTY"; break; @@ -780,7 +792,7 @@ static void * xpalloc (void *pa, ptrdiff_t *nitems, ptrdiff_t nitems_incr_min, - ptrdiff_t nitems_max, ptrdiff_t item_size) + ptrdiff_t nitems_max, ptrdiff_t item_size) { ptrdiff_t n0 = *nitems; @@ -814,8 +826,8 @@ *nitems = 0; if (n - n0 < nitems_incr_min && (INT_ADD_WRAPV (n0, nitems_incr_min, &n) - || (0 <= nitems_max && nitems_max < n) - || INT_MULTIPLY_WRAPV (n, item_size, &nbytes))) + || (0 <= nitems_max && nitems_max < n) + || INT_MULTIPLY_WRAPV (n, item_size, &nbytes))) xalloc_die (); pa = xrealloc (pa, nbytes); *nitems = n; @@ -1797,7 +1809,30 @@ static void atom (struct dfa *dfa) { - if (dfa->parse.tok == WCHAR) + if ((0 <= dfa->parse.tok && dfa->parse.tok < NOTCHAR) + || dfa->parse.tok >= CSET + || dfa->parse.tok == BEG || dfa->parse.tok == BACKREF + || dfa->parse.tok == BEGLINE || dfa->parse.tok == ENDLINE + || dfa->parse.tok == BEGWORD || dfa->parse.tok == ENDWORD + || dfa->parse.tok == LIMWORD || dfa->parse.tok == NOTLIMWORD + || dfa->parse.tok == ANYCHAR || dfa->parse.tok == MBCSET) + { + if (dfa->parse.tok == ANYCHAR && dfa->localeinfo.using_utf8) + { + /* For UTF-8 expand the period to a series of CSETs that define a + valid UTF-8 character. This avoids using the slow multibyte + path. I'm pretty sure it would be both profitable and correct to + do it for any encoding; however, the optimization must be done + manually as it is done above in add_utf8_anychar. So, let's + start with UTF-8: it is the most used, and the structure of the + encoding makes the correctness more obvious. */ + add_utf8_anychar (dfa); + } + else + addtok (dfa, dfa->parse.tok); + dfa->parse.tok = lex (dfa); + } + else if (dfa->parse.tok == WCHAR) { if (dfa->lex.wctok == WEOF) addtok (dfa, BACKREF); @@ -1820,28 +1855,6 @@ dfa->parse.tok = lex (dfa); } - else if (dfa->parse.tok == ANYCHAR && dfa->localeinfo.using_utf8) - { - /* For UTF-8 expand the period to a series of CSETs that define a valid - UTF-8 character. This avoids using the slow multibyte path. I'm - pretty sure it would be both profitable and correct to do it for - any encoding; however, the optimization must be done manually as - it is done above in add_utf8_anychar. So, let's start with - UTF-8: it is the most used, and the structure of the encoding - makes the correctness more obvious. */ - add_utf8_anychar (dfa); - dfa->parse.tok = lex (dfa); - } - else if ((0 <= dfa->parse.tok && dfa->parse.tok < NOTCHAR) - || dfa->parse.tok >= CSET || dfa->parse.tok == BACKREF - || dfa->parse.tok == BEGLINE || dfa->parse.tok == ENDLINE - || dfa->parse.tok == BEGWORD || dfa->parse.tok == ANYCHAR - || dfa->parse.tok == MBCSET || dfa->parse.tok == ENDWORD - || dfa->parse.tok == LIMWORD || dfa->parse.tok == NOTLIMWORD) - { - addtok (dfa, dfa->parse.tok); - dfa->parse.tok = lex (dfa); - } else if (dfa->parse.tok == LPAREN) { dfa->parse.tok = lex (dfa); @@ -1967,6 +1980,9 @@ if (!d->syntax.syntax_bits_set) dfaerror (_("no syntax specified")); + if (!d->nregexps) + addtok (d, BEG); + d->parse.tok = lex (d); d->parse.depth = d->depth; @@ -2021,7 +2037,7 @@ while (lo < hi) { ptrdiff_t mid = (lo + hi) >> 1; - if (s->elems[mid].index > p.index) + if (s->elems[mid].index < p.index) lo = mid + 1; else if (s->elems[mid].index == p.index) { @@ -2039,6 +2055,14 @@ ++s->nelem; } +static void +append (position p, position_set *s) +{ + ptrdiff_t count = s->nelem; + s->elems = maybe_realloc (s->elems, count, &s->alloc, -1, sizeof *s->elems); + s->elems[s->nelem++] = p; +} + /* Merge S1 and S2 (with the additional constraint C2) into M. The result is as if the positions of S1, and of S2 with the additional constraint C2, were inserted into an initially empty set. */ @@ -2057,7 +2081,7 @@ m->nelem = 0; while (i < s1->nelem || j < s2->nelem) if (! (j < s2->nelem) - || (i < s1->nelem && s1->elems[i].index >= s2->elems[j].index)) + || (i < s1->nelem && s1->elems[i].index <= s2->elems[j].index)) { unsigned int c = ((i < s1->nelem && j < s2->nelem && s1->elems[i].index == s2->elems[j].index) @@ -2085,6 +2109,21 @@ merge_constrained (s1, s2, -1, m); } +static void +merge2 (position_set *dst, position_set const *src, position_set *m) +{ + if (src->nelem < 4) + { + for (ptrdiff_t i = 0; i < src->nelem; ++i) + insert (src->elems[i], dst); + } + else + { + merge (src, dst, m); + copy (m, dst); + } +} + /* Delete a position from a set. Return the nonzero constraint of the deleted position, or zero if there was no such position. */ static unsigned int @@ -2095,7 +2134,7 @@ while (lo < hi) { size_t mid = (lo + hi) >> 1; - if (s->elems[mid].index > del) + if (s->elems[mid].index < del) lo = mid + 1; else if (s->elems[mid].index == del) { @@ -2179,8 +2218,9 @@ for (state_num j = 0; j < s->nelem; j++) { - int c = s->elems[j].constraint; - if (d->tokens[s->elems[j].index] < 0) + int c = d->constraints[s->elems[j].index]; + + if (c != 0) { if (succeeds_in_context (c, context, CTX_ANY)) constraint |= c; @@ -2216,7 +2256,7 @@ constraint. Repeat exhaustively until no funny positions are left. S->elems must be large enough to hold the result. */ static void -epsclosure (position_set *initial, struct dfa const *d) +epsclosure (struct dfa const *d) { position_set tmp; alloc_position_set (&tmp, d->nleaves); @@ -2256,8 +2296,6 @@ for (size_t j = 0; j < d->tindex; j++) if (i != j && d->follows[j].nelem > 0) replace (&d->follows[j], i, &d->follows[i], constraint, &tmp); - - replace (initial, i, &d->follows[i], constraint, &tmp); } free (tmp.elems); } @@ -2290,21 +2328,228 @@ in the complement set will have the same follow set. */ static int _GL_ATTRIBUTE_PURE -state_separate_contexts (position_set const *s) +state_separate_contexts (struct dfa *d, position_set const *s) { int separate_contexts = 0; for (size_t j = 0; j < s->nelem; j++) + separate_contexts |= d->separates[s->elems[j].index]; + + return separate_contexts; +} + +enum +{ + /* Single token is repeated. It is distinguished from non-repeated. */ + OPT_REPEAT = (1 << 0), + + /* Multiple tokens are repeated. This flag is on at head of tokens. The + node is not merged. */ + OPT_LPAREN = (1 << 1), + + /* Multiple branches are joined. The node is not merged. */ + OPT_RPAREN = (1 << 2), + + /* The node is walked. If the node is found in walking again, OPT_RPAREN + flag is turned on. */ + OPT_WALKED = (1 << 3), + + /* The node is queued. The node is not queued again. */ + OPT_QUEUED = (1 << 4) +}; + +static void +merge_nfa_state (struct dfa *d, size_t tindex, char *flags, + position_set *merged) +{ + position_set *follows = d->follows; + ptrdiff_t nelem = 0; + + d->constraints[tindex] = 0; + + for (ptrdiff_t i = 0; i < follows[tindex].nelem; i++) { - if (prev_newline_dependent (s->elems[j].constraint)) - separate_contexts |= CTX_NEWLINE; - if (prev_letter_dependent (s->elems[j].constraint)) - separate_contexts |= CTX_LETTER; + size_t sindex = follows[tindex].elems[i].index; + + /* Skip the node as pruned in future. */ + unsigned int iconstraint = follows[tindex].elems[i].constraint; + if (iconstraint == 0) + continue; + + if (d->tokens[follows[tindex].elems[i].index] <= END) + { + d->constraints[tindex] |= follows[tindex].elems[i].constraint; + continue; + } + + if (!(flags[sindex] & (OPT_LPAREN | OPT_RPAREN))) + { + ptrdiff_t j; + + for (j = 0; j < nelem; j++) + { + size_t dindex = follows[tindex].elems[j].index; + + if (follows[tindex].elems[j].constraint != iconstraint) + continue; + + if (flags[dindex] & (OPT_LPAREN | OPT_RPAREN)) + continue; + + if (d->tokens[sindex] != d->tokens[dindex]) + continue; + + if ((flags[sindex] ^ flags[dindex]) & OPT_REPEAT) + continue; + + if (flags[sindex] & OPT_REPEAT) + delete (sindex, &follows[sindex]); + + merge2 (&follows[dindex], &follows[sindex], merged); + + break; + } + + if (j < nelem) + continue; + } + + follows[tindex].elems[nelem++] = follows[tindex].elems[i]; + flags[sindex] |= OPT_QUEUED; } - return separate_contexts; + follows[tindex].nelem = nelem; } +static int +compare (const void *a, const void *b) +{ + int aindex; + int bindex; + + aindex = (int) ((position *) a)->index; + bindex = (int) ((position *) b)->index; + + return aindex - bindex; +} + +static void +reorder_tokens (struct dfa *d) +{ + ptrdiff_t nleaves; + ptrdiff_t *map; + token *tokens; + position_set *follows; + int *constraints; + char *multibyte_prop; + + nleaves = 0; + + map = xnmalloc (d->tindex, sizeof *map); + + map[0] = nleaves++; + + for (ptrdiff_t i = 1; i < d->tindex; i++) + map[i] = -1; + + tokens = xnmalloc (d->nleaves, sizeof *tokens); + follows = xnmalloc (d->nleaves, sizeof *follows); + constraints = xnmalloc (d->nleaves, sizeof *constraints); + + if (d->localeinfo.multibyte) + multibyte_prop = xnmalloc (d->nleaves, sizeof *multibyte_prop); + else + multibyte_prop = NULL; + + for (ptrdiff_t i = 0; i < d->tindex; i++) + { + if (map[i] == -1) + { + free (d->follows[i].elems); + d->follows[i].elems = NULL; + d->follows[i].nelem = 0; + continue; + } + + tokens[map[i]] = d->tokens[i]; + follows[map[i]] = d->follows[i]; + constraints[map[i]] = d->constraints[i]; + + if (multibyte_prop != NULL) + multibyte_prop[map[i]] = d->multibyte_prop[i]; + + for (ptrdiff_t j = 0; j < d->follows[i].nelem; j++) + { + if (map[d->follows[i].elems[j].index] == -1) + map[d->follows[i].elems[j].index] = nleaves++; + + d->follows[i].elems[j].index = map[d->follows[i].elems[j].index]; + } + + qsort (d->follows[i].elems, d->follows[i].nelem, + sizeof *d->follows[i].elems, compare); + } + + for (ptrdiff_t i = 0; i < nleaves; i++) + { + d->tokens[i] = tokens[i]; + d->follows[i] = follows[i]; + d->constraints[i] = constraints[i]; + + if (multibyte_prop != NULL) + d->multibyte_prop[i] = multibyte_prop[i]; + } + + d->tindex = d->nleaves = nleaves; + + free (tokens); + free (follows); + free (constraints); + free (multibyte_prop); + free (map); +} + +static void +dfaoptimize (struct dfa *d) +{ + char *flags; + position_set merged0; + position_set *merged; + + flags = xmalloc (d->tindex * sizeof *flags); + memset (flags, 0, d->tindex * sizeof *flags); + + for (size_t i = 0; i < d->tindex; i++) + { + for (ptrdiff_t j = 0; j < d->follows[i].nelem; j++) + { + if (d->follows[i].elems[j].index == i) + flags[d->follows[i].elems[j].index] |= OPT_REPEAT; + else if (d->follows[i].elems[j].index < i) + flags[d->follows[i].elems[j].index] |= OPT_LPAREN; + else if (flags[d->follows[i].elems[j].index] &= OPT_WALKED) + flags[d->follows[i].elems[j].index] |= OPT_RPAREN; + else + flags[d->follows[i].elems[j].index] |= OPT_WALKED; + } + } + + flags[0] |= OPT_QUEUED; + + merged = &merged0; + alloc_position_set (merged, d->nleaves); + + d->constraints = xnmalloc (d->tindex, sizeof *d->constraints); + + for (ptrdiff_t i = 0; i < d->tindex; i++) + if (flags[i] & OPT_QUEUED) + merge_nfa_state (d, i, flags, merged); + + reorder_tokens (d); + + free (merged->elems); + free (flags); +} /* Perform bottom-up analysis on the parse tree, computing various functions. Note that at this point, we're pretending constructs like \< are real @@ -2364,8 +2609,10 @@ /* Array allocated to hold position sets. */ position *posalloc = xnmalloc (d->nleaves, 2 * sizeof *posalloc); /* Firstpos and lastpos elements. */ - position *firstpos = posalloc + d->nleaves; + position *firstpos = posalloc; position *lastpos = firstpos + d->nleaves; + position pos; + position_set tmp; /* Stack for element counts and nullable flags. */ struct @@ -2380,6 +2627,8 @@ position_set merged; /* Result of merging sets. */ + addtok (d, CAT); + #ifdef DEBUG fprintf (stderr, "dfaanalyze:\n"); for (size_t i = 0; i < d->tindex; ++i) @@ -2412,14 +2661,13 @@ /* Every element in the firstpos of the argument is in the follow of every element in the lastpos. */ { - position_set tmp; + tmp.elems = firstpos - stk[-1].nfirstpos; tmp.nelem = stk[-1].nfirstpos; - tmp.elems = firstpos; - position *pos = lastpos; + position *p = lastpos - stk[-1].nlastpos; for (size_t j = 0; j < stk[-1].nlastpos; j++) { - merge (&tmp, &d->follows[pos[j].index], &merged); - copy (&merged, &d->follows[pos[j].index]); + merge (&tmp, &d->follows[p[j].index], &merged); + copy (&merged, &d->follows[p[j].index]); } } FALLTHROUGH; @@ -2433,14 +2681,13 @@ /* Every element in the firstpos of the second argument is in the follow of every element in the lastpos of the first argument. */ { - position_set tmp; tmp.nelem = stk[-1].nfirstpos; - tmp.elems = firstpos; - position *pos = lastpos + stk[-1].nlastpos; + tmp.elems = firstpos - stk[-1].nfirstpos; + position *p = lastpos - stk[-1].nlastpos - stk[-2].nlastpos; for (size_t j = 0; j < stk[-2].nlastpos; j++) { - merge (&tmp, &d->follows[pos[j].index], &merged); - copy (&merged, &d->follows[pos[j].index]); + merge (&tmp, &d->follows[p[j].index], &merged); + copy (&merged, &d->follows[p[j].index]); } } @@ -2449,7 +2696,7 @@ if (stk[-2].nullable) stk[-2].nfirstpos += stk[-1].nfirstpos; else - firstpos += stk[-1].nfirstpos; + firstpos -= stk[-1].nfirstpos; /* The lastpos of a CAT node is the lastpos of the second argument, union that of the first argument if the second is nullable. */ @@ -2457,10 +2704,10 @@ stk[-2].nlastpos += stk[-1].nlastpos; else { - position *pos = lastpos + stk[-2].nlastpos; - for (size_t j = stk[-1].nlastpos; j-- > 0;) - pos[j] = lastpos[j]; - lastpos += stk[-2].nlastpos; + position *p = lastpos - stk[-1].nlastpos - stk[-2].nlastpos; + for (size_t j = 0; j < stk[-1].nlastpos; j++) + p[j] = p[j + stk[-2].nlastpos]; + lastpos -= stk[-2].nlastpos; stk[-2].nlastpos = stk[-1].nlastpos; } @@ -2493,9 +2740,9 @@ stk->nfirstpos = stk->nlastpos = 1; stk++; - --firstpos, --lastpos; firstpos->index = lastpos->index = i; firstpos->constraint = lastpos->constraint = NO_CONSTRAINT; + firstpos++, lastpos++; break; } @@ -2507,31 +2754,37 @@ fprintf (stderr, stk[-1].nullable ? " nullable: yes\n" : " nullable: no\n"); fprintf (stderr, " firstpos:"); - for (size_t j = stk[-1].nfirstpos; j-- > 0;) + for (size_t j = 0; j < stk[-1].nfirstpos; j++) { - fprintf (stderr, " %zu:", firstpos[j].index); - prtok (d->tokens[firstpos[j].index]); + fprintf (stderr, " %zu:", firstpos[j - stk[-1].nfirstpos].index); + prtok (d->tokens[firstpos[j - stk[-1].nfirstpos].index]); } fprintf (stderr, "\n lastpos:"); - for (size_t j = stk[-1].nlastpos; j-- > 0;) + for (size_t j = 0; j < stk[-1].nlastpos; j++) { - fprintf (stderr, " %zu:", lastpos[j].index); - prtok (d->tokens[lastpos[j].index]); + fprintf (stderr, " %zu:", lastpos[j - stk[-1].nlastpos].index); + prtok (d->tokens[lastpos[j - stk[-1].nlastpos].index]); } putc ('\n', stderr); #endif } + /* For each follow set that is the follow set of a real position, replace + it with its epsilon closure. */ + epsclosure (d); + + dfaoptimize (d); + #ifdef DEBUG for (size_t i = 0; i < d->tindex; ++i) - if (d->tokens[i] < NOTCHAR || d->tokens[i] == BACKREF - || d->tokens[i] == ANYCHAR || d->tokens[i] == MBCSET - || d->tokens[i] >= CSET) + if (d->tokens[i] == BEG || d->tokens[i] < NOTCHAR + || d->tokens[i] == BACKREF || d->tokens[i] == ANYCHAR + || d->tokens[i] == MBCSET || d->tokens[i] >= CSET) { fprintf (stderr, "follows(%zu:", i); prtok (d->tokens[i]); fprintf (stderr, "):"); - for (size_t j = d->follows[i].nelem; j-- > 0;) + for (size_t j = 0; j < d->follows[i].nelem; j++) { fprintf (stderr, " %zu:", d->follows[i].elems[j].index); prtok (d->tokens[d->follows[i].elems[j].index]); @@ -2540,32 +2793,50 @@ } #endif - /* Get the epsilon closure of the firstpos of the regexp. The result will - be the set of positions of state 0. */ - merged.nelem = 0; - for (size_t i = 0; i < stk[-1].nfirstpos; ++i) - insert (firstpos[i], &merged); + pos.index = 0; + pos.constraint = NO_CONSTRAINT; - /* For each follow set that is the follow set of a real position, replace - it with its epsilon closure. */ - epsclosure (&merged, d); + alloc_position_set (&tmp, 1); + + append (pos, &tmp); + + d->separates = xnmalloc (d->tindex, sizeof *d->separates); + + for (ptrdiff_t i = 0; i < d->tindex; i++) + { + d->separates[i] = 0; + + if (prev_newline_dependent (d->constraints[i])) + d->separates[i] |= CTX_NEWLINE; + if (prev_letter_dependent (d->constraints[i])) + d->separates[i] |= CTX_LETTER; + + for (ptrdiff_t j = 0; j < d->follows[i].nelem; j++) + { + if (prev_newline_dependent (d->follows[i].elems[j].constraint)) + d->separates[i] |= CTX_NEWLINE; + if (prev_letter_dependent (d->follows[i].elems[j].constraint)) + d->separates[i] |= CTX_LETTER; + } + } /* Context wanted by some position. */ - int separate_contexts = state_separate_contexts (&merged); + int separate_contexts = state_separate_contexts (d, &tmp); /* Build the initial state. */ if (separate_contexts & CTX_NEWLINE) - state_index (d, &merged, CTX_NEWLINE); + state_index (d, &tmp, CTX_NEWLINE); d->initstate_notbol = d->min_trcount - = state_index (d, &merged, separate_contexts ^ CTX_ANY); + = state_index (d, &tmp, separate_contexts ^ CTX_ANY); if (separate_contexts & CTX_LETTER) - d->min_trcount = state_index (d, &merged, CTX_LETTER); + d->min_trcount = state_index (d, &tmp, CTX_LETTER); d->min_trcount++; d->trcount = 0; free (posalloc); free (stkalloc); free (merged.elems); + free (tmp.elems); } /* Make sure D's state arrays are large enough to hold NEW_STATE. */ @@ -2639,7 +2910,9 @@ static state_num build_state (state_num s, struct dfa *d, unsigned char uc) { - position_set follows; /* Union of the follows of the group. */ + position_set follows; /* Union of the follows for each + position of the current state. */ + position_set group; /* Positions that match the input char. */ position_set tmp; /* Temporary space for merging sets. */ state_num state; /* New state. */ state_num state_newline; /* New state on a newline transition. */ @@ -2688,19 +2961,27 @@ if (accepts_in_context (d->states[s].context, CTX_NONE, s, d)) d->success[s] |= CTX_NONE; + alloc_position_set (&follows, d->nleaves); + + /* Find the union of the follows of the positions of the group. + This is a hideously inefficient loop. Fix it someday. */ + for (size_t j = 0; j < d->states[s].elems.nelem; ++j) + for (size_t k = 0; + k < d->follows[d->states[s].elems.elems[j].index].nelem; ++k) + insert (d->follows[d->states[s].elems.elems[j].index].elems[k], + &follows); + /* Positions that match the input char. */ - leaf_set group; - group.elems = xnmalloc (d->nleaves, sizeof *group.elems); - group.nelem = 0; + alloc_position_set (&group, d->nleaves); /* The group's label. */ charclass label; fillset (&label); - for (size_t i = 0; i < d->states[s].elems.nelem; ++i) + for (size_t i = 0; i < follows.nelem; ++i) { charclass matches; /* Set of matching characters. */ - position pos = d->states[s].elems.elems[i]; + position pos = follows.elems[i]; bool matched = false; if (d->tokens[pos.index] >= 0 && d->tokens[pos.index] < NOTCHAR) { @@ -2731,10 +3012,8 @@ CTX_NONE)) { if (d->states[s].mbps.nelem == 0) - alloc_position_set (&d->states[s].mbps, - d->follows[pos.index].nelem); - for (size_t j = 0; j < d->follows[pos.index].nelem; j++) - insert (d->follows[pos.index].elems[j], &d->states[s].mbps); + alloc_position_set (&d->states[s].mbps, 1); + insert (pos, &d->states[s].mbps); } } else @@ -2782,7 +3061,7 @@ { for (size_t k = 0; k < CHARCLASS_WORDS; ++k) label.w[k] &= matches.w[k]; - group.elems[group.nelem++] = pos.index; + append (pos, &group); } else { @@ -2791,19 +3070,10 @@ } } - alloc_position_set (&follows, d->nleaves); alloc_position_set (&tmp, d->nleaves); if (group.nelem > 0) { - follows.nelem = 0; - - /* Find the union of the follows of the positions of the group. - This is a hideously inefficient loop. Fix it someday. */ - for (size_t j = 0; j < group.nelem; ++j) - for (size_t k = 0; k < d->follows[group.elems[j]].nelem; ++k) - insert (d->follows[group.elems[j]].elems[k], &follows); - /* If we are building a searching matcher, throw in the positions of state 0 as well, if possible. */ if (d->searchflag) @@ -2829,13 +3099,13 @@ if (!mergeit) { mergeit = true; - for (size_t j = 0; mergeit && j < follows.nelem; j++) - mergeit &= d->multibyte_prop[follows.elems[j].index]; + for (size_t j = 0; mergeit && j < group.nelem; j++) + mergeit &= d->multibyte_prop[group.elems[j].index]; } if (mergeit) { - merge (&d->states[0].elems, &follows, &tmp); - copy (&tmp, &follows); + merge (&d->states[0].elems, &group, &tmp); + copy (&tmp, &group); } } @@ -2843,19 +3113,19 @@ by calculating possible contexts that the group can match, and separate contexts that the new state wants to know. */ int possible_contexts = charclass_context (d, &label); - int separate_contexts = state_separate_contexts (&follows); + int separate_contexts = state_separate_contexts (d, &group); /* Find the state(s) corresponding to the union of the follows. */ if (possible_contexts & ~separate_contexts) - state = state_index (d, &follows, separate_contexts ^ CTX_ANY); + state = state_index (d, &group, separate_contexts ^ CTX_ANY); else state = -1; if (separate_contexts & possible_contexts & CTX_NEWLINE) - state_newline = state_index (d, &follows, CTX_NEWLINE); + state_newline = state_index (d, &group, CTX_NEWLINE); else state_newline = state; if (separate_contexts & possible_contexts & CTX_LETTER) - state_letter = state_index (d, &follows, CTX_LETTER); + state_letter = state_index (d, &group, CTX_LETTER); else state_letter = state; @@ -3019,7 +3289,7 @@ else merge (&d->states[s1].mbps, &d->states[s].elems, &d->mb_follows); - int separate_contexts = state_separate_contexts (&d->mb_follows); + int separate_contexts = state_separate_contexts (d, &d->mb_follows); state_num s2 = state_index (d, &d->mb_follows, separate_contexts ^ CTX_ANY); realloc_trans_if_necessary (d); @@ -3347,8 +3617,10 @@ return true; } +/* Disable use of the superset DFA if it is not likely to help + performance. */ static void -dfaoptimize (struct dfa *d) +maybe_disable_superset_dfa (struct dfa *d) { if (!d->localeinfo.using_utf8) return; @@ -3398,6 +3670,8 @@ sup->superset = NULL; sup->states = NULL; sup->sindex = 0; + sup->constraints = NULL; + sup->separates = NULL; sup->follows = NULL; sup->tralloc = 0; sup->trans = NULL; @@ -3476,7 +3750,7 @@ if (dfa_supported (d)) { - dfaoptimize (d); + maybe_disable_superset_dfa (d); dfaanalyze (d, searchflag); } else @@ -3501,6 +3775,9 @@ if (d->localeinfo.multibyte) free_mbdata (d); + free (d->constraints); + free (d->separates); + for (size_t i = 0; i < d->sindex; ++i) { free (d->states[i].elems.elems); @@ -3530,7 +3807,10 @@ } if (d->superset) - dfafree (d->superset); + { + dfafree (d->superset); + free (d->superset); + } } /* Having found the postfix representation of the regular expression, @@ -3780,7 +4060,7 @@ bool need_endline = false; bool case_fold_unibyte = d->syntax.case_fold && MB_CUR_MAX == 1; - for (size_t ri = 0; ri < d->tindex; ++ri) + for (size_t ri = 1; ri + 1 < d->tindex; ri++) { token t = d->tokens[ri]; switch (t) diff -Nru grep-3.1/lib/dfa.h grep-3.3/lib/dfa.h --- grep-3.1/lib/dfa.h 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/lib/dfa.h 2018-06-24 23:16:49.000000000 +0000 @@ -1,5 +1,5 @@ /* dfa.h - declarations for GNU deterministic regexp compiler - Copyright (C) 1988, 1998, 2007, 2009-2017 Free Software Foundation, Inc. + Copyright (C) 1988, 1998, 2007, 2009-2018 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,12 +22,6 @@ #include #include -#if 3 <= __GNUC__ -# define _GL_ATTRIBUTE_MALLOC __attribute__ ((__malloc__)) -#else -# define _GL_ATTRIBUTE_MALLOC -#endif - struct localeinfo; /* See localeinfo.h. */ /* Element of a list of strings, at least one of which is known to diff -Nru grep-3.1/lib/dirent--.h grep-3.3/lib/dirent--.h --- grep-3.1/lib/dirent--.h 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/lib/dirent--.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,24 +0,0 @@ -/* Like dirent.h, but redefine some names to avoid glitches. - - 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 . */ - -/* Written by Eric Blake. */ - -#include "dirent-safer.h" - -#undef opendir -#define opendir opendir_safer -#define GNULIB_defined_opendir 1 diff -Nru grep-3.1/lib/dirent.in.h grep-3.3/lib/dirent.in.h --- grep-3.1/lib/dirent.in.h 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/lib/dirent.in.h 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ /* A GNU-like . - Copyright (C) 2006-2017 Free Software Foundation, Inc. + Copyright (C) 2006-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ #ifndef _@GUARD_PREFIX@_DIRENT_H diff -Nru grep-3.1/lib/dirent-private.h grep-3.3/lib/dirent-private.h --- grep-3.1/lib/dirent-private.h 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/lib/dirent-private.h 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ /* Private details of the DIR type. - Copyright (C) 2011-2017 Free Software Foundation, Inc. + Copyright (C) 2011-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ #ifndef _DIRENT_PRIVATE_H #define _DIRENT_PRIVATE_H 1 diff -Nru grep-3.1/lib/dirent-safer.h grep-3.3/lib/dirent-safer.h --- grep-3.1/lib/dirent-safer.h 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/lib/dirent-safer.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,22 +0,0 @@ -/* Invoke dirent-like functions, but avoid some glitches. - - 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 . */ - -/* Written by Eric Blake. */ - -#include - -DIR *opendir_safer (const char *name); diff -Nru grep-3.1/lib/dirfd.c grep-3.3/lib/dirfd.c --- grep-3.1/lib/dirfd.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/lib/dirfd.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,6 +1,6 @@ /* dirfd.c -- return the file descriptor associated with an open DIR* - Copyright (C) 2001, 2006, 2008-2017 Free Software Foundation, Inc. + Copyright (C) 2001, 2006, 2008-2018 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 @@ -13,7 +13,7 @@ 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 . */ + along with this program. If not, see . */ /* Written by Jim Meyering. */ diff -Nru grep-3.1/lib/dirname.h grep-3.3/lib/dirname.h --- grep-3.1/lib/dirname.h 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/lib/dirname.h 2018-06-24 23:16:49.000000000 +0000 @@ -1,6 +1,6 @@ /* Take file names apart into directory and base names. - Copyright (C) 1998, 2001, 2003-2006, 2009-2017 Free Software Foundation, + Copyright (C) 1998, 2001, 2003-2006, 2009-2018 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify @@ -14,7 +14,7 @@ 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 . */ + along with this program. If not, see . */ #ifndef DIRNAME_H_ # define DIRNAME_H_ 1 @@ -36,7 +36,7 @@ #endif # if GNULIB_DIRNAME -char *base_name (char const *file); +char *base_name (char const *file) _GL_ATTRIBUTE_MALLOC; char *dir_name (char const *file); # endif diff -Nru grep-3.1/lib/dirname-lgpl.c grep-3.3/lib/dirname-lgpl.c --- grep-3.1/lib/dirname-lgpl.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/lib/dirname-lgpl.c 2018-01-07 00:07:08.000000000 +0000 @@ -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-2017 Free Software + Copyright (C) 1990, 1998, 2000-2001, 2003-2006, 2009-2018 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify @@ -14,7 +14,7 @@ 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 . */ + along with this program. If not, see . */ #include diff -Nru grep-3.1/lib/dosname.h grep-3.3/lib/dosname.h --- grep-3.1/lib/dosname.h 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/lib/dosname.h 2018-06-24 23:16:49.000000000 +0000 @@ -1,6 +1,6 @@ /* File names on MS-DOS/Windows systems. - Copyright (C) 2000-2001, 2004-2006, 2009-2017 Free Software Foundation, Inc. + Copyright (C) 2000-2001, 2004-2006, 2009-2018 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 @@ -13,16 +13,15 @@ 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 . + along with this program. If not, see . From Paul Eggert and Jim Meyering. */ #ifndef _DOSNAME_H #define _DOSNAME_H -#if (defined _WIN32 || defined __WIN32__ || \ - defined __MSDOS__ || defined __CYGWIN__ || \ - defined __EMX__ || defined __DJGPP__) +#if (defined _WIN32 || defined __CYGWIN__ \ + || defined __EMX__ || defined __MSDOS__ || defined __DJGPP__) /* This internal macro assumes ASCII, but all hosts that support drive letters use ASCII. */ # define _IS_DRIVE_LETTER(C) (((unsigned int) (C) | ('a' - 'A')) - 'a' \ diff -Nru grep-3.1/lib/dup2.c grep-3.3/lib/dup2.c --- grep-3.1/lib/dup2.c 2017-05-14 01:09:51.000000000 +0000 +++ grep-3.3/lib/dup2.c 2018-06-24 23:16:49.000000000 +0000 @@ -1,6 +1,6 @@ /* Duplicate an open file descriptor to a specified file descriptor. - Copyright (C) 1999, 2004-2007, 2009-2017 Free Software Foundation, Inc. + Copyright (C) 1999, 2004-2007, 2009-2018 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 @@ -13,7 +13,7 @@ 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 . */ + along with this program. If not, see . */ /* written by Paul Eggert */ @@ -29,7 +29,7 @@ # undef dup2 -# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +# if defined _WIN32 && ! defined __CYGWIN__ /* Get declarations of the native Windows API functions. */ # define WIN32_LEAN_AND_MEAN @@ -88,7 +88,7 @@ } /* Wine 1.0.1 return 0 when desired_fd is negative but not -1: - http://bugs.winehq.org/show_bug.cgi?id=21289 */ + https://bugs.winehq.org/show_bug.cgi?id=21289 */ if (desired_fd < 0) { errno = EBADF; diff -Nru grep-3.1/lib/dup.c grep-3.3/lib/dup.c --- grep-3.1/lib/dup.c 2017-05-14 01:09:51.000000000 +0000 +++ grep-3.3/lib/dup.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,6 +1,6 @@ /* Duplicate an open file descriptor. - Copyright (C) 2011-2017 Free Software Foundation, Inc. + Copyright (C) 2011-2018 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 @@ -13,7 +13,7 @@ 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 . */ + along with this program. If not, see . */ #include diff -Nru grep-3.1/lib/dup-safer.c grep-3.3/lib/dup-safer.c --- grep-3.1/lib/dup-safer.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/lib/dup-safer.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,6 +1,6 @@ /* Invoke dup, but avoid some glitches. - Copyright (C) 2001, 2004-2006, 2009-2017 Free Software Foundation, Inc. + Copyright (C) 2001, 2004-2006, 2009-2018 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 @@ -13,7 +13,7 @@ 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 . */ + along with this program. If not, see . */ /* Written by Paul Eggert. */ diff -Nru grep-3.1/lib/dup-safer-flag.c grep-3.3/lib/dup-safer-flag.c --- grep-3.1/lib/dup-safer-flag.c 1970-01-01 00:00:00.000000000 +0000 +++ grep-3.3/lib/dup-safer-flag.c 2018-01-07 00:07:08.000000000 +0000 @@ -0,0 +1,38 @@ +/* Duplicate a file descriptor result, avoiding clobbering + STD{IN,OUT,ERR}_FILENO, with specific flags. + + Copyright (C) 2001, 2004-2006, 2009-2018 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 and Eric Blake. */ + +#include + +/* Specification. */ +#include "unistd-safer.h" + +#include +#include + +/* Like dup, but do not return STDIN_FILENO, STDOUT_FILENO, or + STDERR_FILENO. If FLAG contains O_CLOEXEC, behave like + fcntl(F_DUPFD_CLOEXEC) rather than fcntl(F_DUPFD). */ + +int +dup_safer_flag (int fd, int flag) +{ + return fcntl (fd, (flag & O_CLOEXEC) ? F_DUPFD_CLOEXEC : F_DUPFD, + STDERR_FILENO + 1); +} diff -Nru grep-3.1/lib/errno.in.h grep-3.3/lib/errno.in.h --- grep-3.1/lib/errno.in.h 2017-01-01 11:25:47.000000000 +0000 +++ grep-3.3/lib/errno.in.h 2018-06-24 23:18:01.000000000 +0000 @@ -1,6 +1,6 @@ /* A POSIX-like . - Copyright (C) 2008-2017 Free Software Foundation, Inc. + Copyright (C) 2008-2018 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 @@ -13,7 +13,7 @@ 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 . */ + along with this program; if not, see . */ #ifndef _@GUARD_PREFIX@_ERRNO_H @@ -30,7 +30,7 @@ /* On native Windows platforms, many macros are not defined. */ -# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +# if defined _WIN32 && ! defined __CYGWIN__ /* These are the same values as defined by MSVC 10, for interoperability. */ @@ -248,7 +248,7 @@ interoperability. */ # define EOWNERDEAD 58 # define ENOTRECOVERABLE 59 -# elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +# elif defined _WIN32 && ! defined __CYGWIN__ /* We have a conflict here: pthreads-win32 defines these values differently than MSVC 10. It's hairy to decide which one to use. */ # if defined __MINGW32__ && !defined USE_WINDOWS_THREADS diff -Nru grep-3.1/lib/error.c grep-3.3/lib/error.c --- grep-3.1/lib/error.c 2017-06-10 16:44:24.000000000 +0000 +++ grep-3.3/lib/error.c 2018-06-24 23:16:49.000000000 +0000 @@ -1,5 +1,5 @@ /* Error handler for noninteractive utilities - Copyright (C) 1990-1998, 2000-2007, 2009-2017 Free Software Foundation, Inc. + Copyright (C) 1990-1998, 2000-2007, 2009-2018 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 @@ -13,7 +13,7 @@ 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 . */ + along with this program. If not, see . */ /* Written by David MacKenzie . */ @@ -93,7 +93,7 @@ # include # include -# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +# if defined _WIN32 && ! defined __CYGWIN__ /* Get declarations of the native Windows API functions. */ # define WIN32_LEAN_AND_MEAN # include @@ -131,7 +131,7 @@ static int is_open (int fd) { -# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +# if defined _WIN32 && ! defined __CYGWIN__ /* On native Windows: The initial state of unassigned standard file descriptors is that they are open but point to an INVALID_HANDLE_VALUE. There is no fcntl, and the gnulib replacement fcntl does not support diff -Nru grep-3.1/lib/error.h grep-3.3/lib/error.h --- grep-3.1/lib/error.h 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/lib/error.h 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ /* Declaration for error-reporting function - Copyright (C) 1995-1997, 2003, 2006, 2008-2017 Free Software Foundation, + Copyright (C) 1995-1997, 2003, 2006, 2008-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -14,7 +14,7 @@ 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 . */ + along with this program. If not, see . */ #ifndef _ERROR_H #define _ERROR_H 1 diff -Nru grep-3.1/lib/exclude.c grep-3.3/lib/exclude.c --- grep-3.1/lib/exclude.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/lib/exclude.c 2018-09-19 05:04:26.000000000 +0000 @@ -1,6 +1,6 @@ /* exclude.c -- exclude file names - Copyright (C) 1992-1994, 1997, 1999-2007, 2009-2017 Free Software + Copyright (C) 1992-1994, 1997, 1999-2007, 2009-2018 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify @@ -14,7 +14,7 @@ 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 . */ + along with this program. If not, see . */ /* Written by Paul Eggert and Sergey Poznyakoff . @@ -146,20 +146,20 @@ { switch (*str++) { - case '.': - case '{': - case '}': - case '(': - case ')': - if (options & EXCLUDE_REGEX) - return true; - break; + case '.': + case '{': + case '}': + case '(': + case ')': + if (options & EXCLUDE_REGEX) + return true; + break; case '\\': - if (options & EXCLUDE_REGEX) - continue; - else - str += ! (options & FNM_NOESCAPE) && *str; + if (options & EXCLUDE_REGEX) + continue; + else + str += ! (options & FNM_NOESCAPE) && *str; break; case '+': case '@': case '!': @@ -287,10 +287,10 @@ { case exclude_pattern: for (i = 0; i < seg->v.pat.exclude_count; i++) - { - if (seg->v.pat.exclude[i].options & EXCLUDE_REGEX) - regfree (&seg->v.pat.exclude[i].v.re); - } + { + if (seg->v.pat.exclude[i].options & EXCLUDE_REGEX) + regfree (&seg->v.pat.exclude[i].v.re); + } free (seg->v.pat.exclude); break; @@ -387,7 +387,7 @@ if (! (options & EXCLUDE_ANCHORED)) for (p = f; *p && ! matched; p++) if (*p == '/' && p[1] != '/') - matched = ((*matcher) (pattern, p + 1, options) == 0); + matched = ((*matcher) (pattern, p + 1, options) == 0); return matched; } @@ -525,9 +525,9 @@ && fnmatch_pattern_has_wildcards (pattern, options)) { if (! (ex->head && ex->head->type == exclude_pattern - && ((ex->head->options & EXCLUDE_INCLUDE) - == (options & EXCLUDE_INCLUDE)))) - new_exclude_segment (ex, exclude_pattern, options); + && ((ex->head->options & EXCLUDE_INCLUDE) + == (options & EXCLUDE_INCLUDE)))) + new_exclude_segment (ex, exclude_pattern, options); seg = ex->head; @@ -539,48 +539,48 @@ patopts->options = options; if (options & EXCLUDE_REGEX) - { - int rc; - int cflags = REG_NOSUB|REG_EXTENDED| - ((options & FNM_CASEFOLD) ? REG_ICASE : 0); - - if (options & FNM_LEADING_DIR) - { - char *tmp; - size_t len = strlen (pattern); - - while (len > 0 && ISSLASH (pattern[len-1])) - --len; - - if (len == 0) - rc = 1; - else - { - tmp = xmalloc (len + 7); - memcpy (tmp, pattern, len); - strcpy (tmp + len, "(/.*)?"); - rc = regcomp (&patopts->v.re, tmp, cflags); - free (tmp); - } - } - else - rc = regcomp (&patopts->v.re, pattern, cflags); - - if (rc) - { - pat->exclude_count--; - return; - } - } + { + int rc; + int cflags = REG_NOSUB|REG_EXTENDED| + ((options & FNM_CASEFOLD) ? REG_ICASE : 0); + + if (options & FNM_LEADING_DIR) + { + char *tmp; + size_t len = strlen (pattern); + + while (len > 0 && ISSLASH (pattern[len-1])) + --len; + + if (len == 0) + rc = 1; + else + { + tmp = xmalloc (len + 7); + memcpy (tmp, pattern, len); + strcpy (tmp + len, "(/.*)?"); + rc = regcomp (&patopts->v.re, tmp, cflags); + free (tmp); + } + } + else + rc = regcomp (&patopts->v.re, pattern, cflags); + + if (rc) + { + pat->exclude_count--; + return; + } + } else - { - if (options & EXCLUDE_ALLOC) - { - pattern = xstrdup (pattern); - exclude_add_pattern_buffer (ex, (char*) pattern); - } - patopts->v.pattern = pattern; - } + { + if (options & EXCLUDE_ALLOC) + { + pattern = xstrdup (pattern); + exclude_add_pattern_buffer (ex, (char*) pattern); + } + patopts->v.pattern = pattern; + } } else { @@ -609,9 +609,9 @@ int add_exclude_fp (void (*add_func) (struct exclude *, char const *, int, void *), - struct exclude *ex, FILE *fp, int options, - char line_end, - void *data) + struct exclude *ex, FILE *fp, int options, + char line_end, + void *data) { char *buf = NULL; char *p; @@ -674,8 +674,8 @@ int add_exclude_file (void (*add_func) (struct exclude *, char const *, int), - struct exclude *ex, char const *file_name, int options, - char line_end) + struct exclude *ex, char const *file_name, int options, + char line_end) { bool use_stdin = file_name[0] == '-' && !file_name[1]; FILE *in; diff -Nru grep-3.1/lib/exclude.h grep-3.3/lib/exclude.h --- grep-3.1/lib/exclude.h 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/lib/exclude.h 2018-09-19 05:04:26.000000000 +0000 @@ -1,6 +1,6 @@ /* exclude.h -- declarations for excluding file names - Copyright (C) 1992-1994, 1997, 1999, 2001-2003, 2005-2006, 2009-2017 Free + Copyright (C) 1992-1994, 1997, 1999, 2001-2003, 2005-2006, 2009-2018 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify @@ -14,7 +14,7 @@ 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 . */ + along with this program. If not, see . */ #ifndef _GL_EXCLUDE_H #define _GL_EXCLUDE_H 1 @@ -48,13 +48,13 @@ bool fnmatch_pattern_has_wildcards (const char *, int) _GL_ATTRIBUTE_PURE; -struct exclude *new_exclude (void); +struct exclude *new_exclude (void) _GL_ATTRIBUTE_MALLOC; void free_exclude (struct exclude *); void add_exclude (struct exclude *, char const *, int); int add_exclude_file (void (*) (struct exclude *, char const *, int), struct exclude *, char const *, int, char); int add_exclude_fp (void (*) (struct exclude *, char const *, int, void *), - struct exclude *, FILE *, int, char, void *); + struct exclude *, FILE *, int, char, void *); bool excluded_file_name (struct exclude const *, char const *); void exclude_add_pattern_buffer (struct exclude *ex, char *buf); bool exclude_fnmatch (char const *, char const *, int); diff -Nru grep-3.1/lib/exitfail.c grep-3.3/lib/exitfail.c --- grep-3.1/lib/exitfail.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/lib/exitfail.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,6 +1,6 @@ /* Failure exit status - Copyright (C) 2002-2003, 2005-2007, 2009-2017 Free Software Foundation, Inc. + Copyright (C) 2002-2003, 2005-2007, 2009-2018 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 @@ -13,7 +13,7 @@ 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 . */ + along with this program. If not, see . */ #include diff -Nru grep-3.1/lib/exitfail.h grep-3.3/lib/exitfail.h --- grep-3.1/lib/exitfail.h 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/lib/exitfail.h 2018-01-07 00:07:08.000000000 +0000 @@ -1,6 +1,6 @@ /* Failure exit status - Copyright (C) 2002, 2009-2017 Free Software Foundation, Inc. + Copyright (C) 2002, 2009-2018 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 @@ -13,6 +13,6 @@ 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 . */ + along with this program. If not, see . */ extern int volatile exit_failure; diff -Nru grep-3.1/lib/fchdir.c grep-3.3/lib/fchdir.c --- grep-3.1/lib/fchdir.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/lib/fchdir.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ /* fchdir replacement. - Copyright (C) 2006-2017 Free Software Foundation, Inc. + Copyright (C) 2006-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ #include diff -Nru grep-3.1/lib/fcntl.c grep-3.3/lib/fcntl.c --- grep-3.1/lib/fcntl.c 2017-05-14 01:09:51.000000000 +0000 +++ grep-3.3/lib/fcntl.c 2018-12-15 18:14:26.000000000 +0000 @@ -1,6 +1,6 @@ /* Provide file descriptor control. - Copyright (C) 2009-2017 Free Software Foundation, Inc. + Copyright (C) 2009-2018 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 @@ -13,7 +13,7 @@ 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 . */ + along with this program. If not, see . */ /* Written by Eric Blake . */ @@ -27,12 +27,12 @@ #include #include -#if !HAVE_FCNTL -# define rpl_fcntl fcntl +#ifdef __KLIBC__ +# define INCL_DOS +# include #endif -#undef fcntl -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +#if defined _WIN32 && ! defined __CYGWIN__ /* Get declarations of the native Windows API functions. */ # define WIN32_LEAN_AND_MEAN # include @@ -166,93 +166,18 @@ } #endif /* W32 */ +/* Forward declarations, because we '#undef fcntl' in the middle of this + compilation unit. */ +/* Our implementation of fcntl (fd, F_DUPFD, target). */ +static int rpl_fcntl_DUPFD (int fd, int target); +/* Our implementation of fcntl (fd, F_DUPFD_CLOEXEC, target). */ +static int rpl_fcntl_DUPFD_CLOEXEC (int fd, int target); #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 +/* Adds support for fcntl on directories. */ +static int klibc_fcntl (int fd, int action, /* arg */...); #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 @@ -273,110 +198,35 @@ return -1 and set errno. */ int -rpl_fcntl (int fd, int action, /* arg */...) +fcntl (int fd, int action, /* arg */...) +#undef fcntl +#ifdef __KLIBC__ +# define fcntl klibc_fcntl +#endif { va_list arg; int result = -1; va_start (arg, action); switch (action) { - -#if !HAVE_FCNTL case F_DUPFD: { int target = va_arg (arg, int); - result = dupfd (fd, target, 0); + result = rpl_fcntl_DUPFD (fd, target); break; } -#elif FCNTL_DUPFD_BUGGY || REPLACE_FCHDIR - case F_DUPFD: - { - int target = va_arg (arg, int); - /* Detect invalid target; needed for cygwin 1.5.x. */ - if (target < 0 || getdtablesize () <= target) - errno = EINVAL; - else - { - /* Haiku alpha 2 loses fd flags on original. */ - int flags = fcntl (fd, F_GETFD); - if (flags < 0) - { - result = -1; - break; - } - result = fcntl (fd, action, target); - if (0 <= result && fcntl (fd, F_SETFD, flags) == -1) - { - int saved_errno = errno; - close (result); - result = -1; - errno = saved_errno; - } -# if REPLACE_FCHDIR - if (0 <= result) - result = _gl_register_dup (fd, result); -# endif - } - break; - } /* F_DUPFD */ -#endif /* FCNTL_DUPFD_BUGGY || REPLACE_FCHDIR */ case F_DUPFD_CLOEXEC: { int target = va_arg (arg, int); - -#if !HAVE_FCNTL - result = dupfd (fd, target, O_CLOEXEC); - break; -#else /* HAVE_FCNTL */ - /* Try the system call first, if the headers claim it exists - (that is, if GNULIB_defined_F_DUPFD_CLOEXEC is 0), since we - may be running with a glibc that has the macro but with an - older kernel that does not support it. Cache the - information on whether the system call really works, but - avoid caching failure if the corresponding F_DUPFD fails - for any reason. 0 = unknown, 1 = yes, -1 = no. */ - static int have_dupfd_cloexec = GNULIB_defined_F_DUPFD_CLOEXEC ? -1 : 0; - if (0 <= have_dupfd_cloexec) - { - result = fcntl (fd, action, target); - if (0 <= result || errno != EINVAL) - { - have_dupfd_cloexec = 1; -# if REPLACE_FCHDIR - if (0 <= result) - result = _gl_register_dup (fd, result); -# endif - } - else - { - result = rpl_fcntl (fd, F_DUPFD, target); - if (result < 0) - break; - have_dupfd_cloexec = -1; - } - } - else - result = rpl_fcntl (fd, F_DUPFD, target); - if (0 <= result && have_dupfd_cloexec == -1) - { - int flags = fcntl (result, F_GETFD); - if (flags < 0 || fcntl (result, F_SETFD, flags | FD_CLOEXEC) == -1) - { - int saved_errno = errno; - close (result); - errno = saved_errno; - result = -1; - } - } + result = rpl_fcntl_DUPFD_CLOEXEC (fd, target); break; -#endif /* HAVE_FCNTL */ - } /* F_DUPFD_CLOEXEC */ + } #if !HAVE_FCNTL case F_GETFD: { -# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +# if defined _WIN32 && ! defined __CYGWIN__ HANDLE handle = (HANDLE) _get_osfhandle (fd); DWORD flags; if (handle == INVALID_HANDLE_VALUE @@ -405,8 +255,183 @@ default: { #if HAVE_FCNTL - void *p = va_arg (arg, void *); - result = fcntl (fd, action, p); + switch (action) + { + #ifdef F_BARRIERFSYNC /* macOS */ + case F_BARRIERFSYNC: + #endif + #ifdef F_CHKCLEAN /* macOS */ + case F_CHKCLEAN: + #endif + #ifdef F_CLOSEM /* NetBSD, HP-UX */ + case F_CLOSEM: + #endif + #ifdef F_FLUSH_DATA /* macOS */ + case F_FLUSH_DATA: + #endif + #ifdef F_FREEZE_FS /* macOS */ + case F_FREEZE_FS: + #endif + #ifdef F_FULLFSYNC /* macOS */ + case F_FULLFSYNC: + #endif + #ifdef F_GETCONFINED /* macOS */ + case F_GETCONFINED: + #endif + #ifdef F_GETDEFAULTPROTLEVEL /* macOS */ + case F_GETDEFAULTPROTLEVEL: + #endif + #ifdef F_GETFD /* POSIX */ + case F_GETFD: + #endif + #ifdef F_GETFL /* POSIX */ + case F_GETFL: + #endif + #ifdef F_GETLEASE /* Linux */ + case F_GETLEASE: + #endif + #ifdef F_GETNOSIGPIPE /* macOS */ + case F_GETNOSIGPIPE: + #endif + #ifdef F_GETOWN /* POSIX */ + case F_GETOWN: + #endif + #ifdef F_GETPIPE_SZ /* Linux */ + case F_GETPIPE_SZ: + #endif + #ifdef F_GETPROTECTIONCLASS /* macOS */ + case F_GETPROTECTIONCLASS: + #endif + #ifdef F_GETPROTECTIONLEVEL /* macOS */ + case F_GETPROTECTIONLEVEL: + #endif + #ifdef F_GET_SEALS /* Linux */ + case F_GET_SEALS: + #endif + #ifdef F_GETSIG /* Linux */ + case F_GETSIG: + #endif + #ifdef F_MAXFD /* NetBSD */ + case F_MAXFD: + #endif + #ifdef F_RECYCLE /* macOS */ + case F_RECYCLE: + #endif + #ifdef F_SETFIFOENH /* HP-UX */ + case F_SETFIFOENH: + #endif + #ifdef F_THAW_FS /* macOS */ + case F_THAW_FS: + #endif + /* These actions take no argument. */ + result = fcntl (fd, action); + break; + + #ifdef F_ADD_SEALS /* Linux */ + case F_ADD_SEALS: + #endif + #ifdef F_BADFD /* Solaris */ + case F_BADFD: + #endif + #ifdef F_CHECK_OPENEVT /* macOS */ + case F_CHECK_OPENEVT: + #endif + #ifdef F_DUP2FD /* FreeBSD, AIX, Solaris */ + case F_DUP2FD: + #endif + #ifdef F_DUP2FD_CLOEXEC /* FreeBSD, Solaris */ + case F_DUP2FD_CLOEXEC: + #endif + #ifdef F_DUP2FD_CLOFORK /* Solaris */ + case F_DUP2FD_CLOFORK: + #endif + #ifdef F_DUPFD /* POSIX */ + case F_DUPFD: + #endif + #ifdef F_DUPFD_CLOEXEC /* POSIX */ + case F_DUPFD_CLOEXEC: + #endif + #ifdef F_DUPFD_CLOFORK /* Solaris */ + case F_DUPFD_CLOFORK: + #endif + #ifdef F_GETXFL /* Solaris */ + case F_GETXFL: + #endif + #ifdef F_GLOBAL_NOCACHE /* macOS */ + case F_GLOBAL_NOCACHE: + #endif + #ifdef F_MAKECOMPRESSED /* macOS */ + case F_MAKECOMPRESSED: + #endif + #ifdef F_MOVEDATAEXTENTS /* macOS */ + case F_MOVEDATAEXTENTS: + #endif + #ifdef F_NOCACHE /* macOS */ + case F_NOCACHE: + #endif + #ifdef F_NODIRECT /* macOS */ + case F_NODIRECT: + #endif + #ifdef F_NOTIFY /* Linux */ + case F_NOTIFY: + #endif + #ifdef F_OPLKACK /* IRIX */ + case F_OPLKACK: + #endif + #ifdef F_OPLKREG /* IRIX */ + case F_OPLKREG: + #endif + #ifdef F_RDAHEAD /* macOS */ + case F_RDAHEAD: + #endif + #ifdef F_SETBACKINGSTORE /* macOS */ + case F_SETBACKINGSTORE: + #endif + #ifdef F_SETCONFINED /* macOS */ + case F_SETCONFINED: + #endif + #ifdef F_SETFD /* POSIX */ + case F_SETFD: + #endif + #ifdef F_SETFL /* POSIX */ + case F_SETFL: + #endif + #ifdef F_SETLEASE /* Linux */ + case F_SETLEASE: + #endif + #ifdef F_SETNOSIGPIPE /* macOS */ + case F_SETNOSIGPIPE: + #endif + #ifdef F_SETOWN /* POSIX */ + case F_SETOWN: + #endif + #ifdef F_SETPIPE_SZ /* Linux */ + case F_SETPIPE_SZ: + #endif + #ifdef F_SETPROTECTIONCLASS /* macOS */ + case F_SETPROTECTIONCLASS: + #endif + #ifdef F_SETSIG /* Linux */ + case F_SETSIG: + #endif + #ifdef F_SINGLE_WRITER /* macOS */ + case F_SINGLE_WRITER: + #endif + /* These actions take an 'int' argument. */ + { + int x = va_arg (arg, int); + result = fcntl (fd, action, x); + } + break; + + default: + /* Other actions take a pointer argument. */ + { + void *p = va_arg (arg, void *); + result = fcntl (fd, action, p); + } + break; + } #else errno = EINVAL; #endif @@ -416,3 +441,186 @@ va_end (arg); return result; } + +static int +rpl_fcntl_DUPFD (int fd, int target) +{ + int result; +#if !HAVE_FCNTL + result = dupfd (fd, target, 0); +#elif FCNTL_DUPFD_BUGGY || REPLACE_FCHDIR + /* Detect invalid target; needed for cygwin 1.5.x. */ + if (target < 0 || getdtablesize () <= target) + { + result = -1; + errno = EINVAL; + } + else + { + /* Haiku alpha 2 loses fd flags on original. */ + int flags = fcntl (fd, F_GETFD); + if (flags < 0) + result = -1; + else + { + result = fcntl (fd, F_DUPFD, target); + if (0 <= result && fcntl (fd, F_SETFD, flags) == -1) + { + int saved_errno = errno; + close (result); + result = -1; + errno = saved_errno; + } +# if REPLACE_FCHDIR + if (0 <= result) + result = _gl_register_dup (fd, result); +# endif + } + } +#else + result = fcntl (fd, F_DUPFD, target); +#endif + return result; +} + +static int +rpl_fcntl_DUPFD_CLOEXEC (int fd, int target) +{ + int result; +#if !HAVE_FCNTL + result = dupfd (fd, target, O_CLOEXEC); +#else /* HAVE_FCNTL */ +# if defined __HAIKU__ + /* On Haiku, the system fcntl (fd, F_DUPFD_CLOEXEC, target) sets + the FD_CLOEXEC flag on fd, not on target. Therefore avoid the + system fcntl in this case. */ +# define have_dupfd_cloexec -1 +# else + /* Try the system call first, if the headers claim it exists + (that is, if GNULIB_defined_F_DUPFD_CLOEXEC is 0), since we + may be running with a glibc that has the macro but with an + older kernel that does not support it. Cache the + information on whether the system call really works, but + avoid caching failure if the corresponding F_DUPFD fails + for any reason. 0 = unknown, 1 = yes, -1 = no. */ + static int have_dupfd_cloexec = GNULIB_defined_F_DUPFD_CLOEXEC ? -1 : 0; + if (0 <= have_dupfd_cloexec) + { + result = fcntl (fd, F_DUPFD_CLOEXEC, target); + if (0 <= result || errno != EINVAL) + { + have_dupfd_cloexec = 1; +# if REPLACE_FCHDIR + if (0 <= result) + result = _gl_register_dup (fd, result); +# endif + } + else + { + result = rpl_fcntl_DUPFD (fd, target); + if (result >= 0) + have_dupfd_cloexec = -1; + } + } + else +# endif + result = rpl_fcntl_DUPFD (fd, target); + if (0 <= result && have_dupfd_cloexec == -1) + { + int flags = fcntl (result, F_GETFD); + if (flags < 0 || fcntl (result, F_SETFD, flags | FD_CLOEXEC) == -1) + { + int saved_errno = errno; + close (result); + errno = saved_errno; + result = -1; + } + } +#endif /* HAVE_FCNTL */ + return result; +} + +#undef fcntl + +#ifdef __KLIBC__ + +static int +klibc_fcntl (int fd, int action, /* arg */...); +{ + va_list arg_ptr; + int arg; + struct stat sbuf; + int result; + + 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; +} + +#endif diff -Nru grep-3.1/lib/fcntl--.h grep-3.3/lib/fcntl--.h --- grep-3.1/lib/fcntl--.h 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/lib/fcntl--.h 2018-01-07 00:07:08.000000000 +0000 @@ -1,6 +1,6 @@ /* Like fcntl.h, but redefine some names to avoid glitches. - Copyright (C) 2005, 2009-2017 Free Software Foundation, Inc. + Copyright (C) 2005, 2009-2018 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 @@ -13,7 +13,7 @@ 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 . */ + along with this program. If not, see . */ /* Written by Paul Eggert. */ diff -Nru grep-3.1/lib/fcntl.in.h grep-3.3/lib/fcntl.in.h --- grep-3.1/lib/fcntl.in.h 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/lib/fcntl.in.h 2018-06-24 23:16:49.000000000 +0000 @@ -1,6 +1,6 @@ /* Like , but with non-working flags defined to 0. - Copyright (C) 2006-2017 Free Software Foundation, Inc. + Copyright (C) 2006-2018 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 @@ -13,7 +13,7 @@ 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 . */ + along with this program. If not, see . */ /* written by Paul Eggert */ @@ -68,7 +68,7 @@ /* Native Windows platforms declare open(), creat() in . */ #if (@GNULIB_OPEN@ || defined GNULIB_POSIXCHECK) \ - && ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) + && (defined _WIN32 && ! defined __CYGWIN__) # include #endif @@ -213,7 +213,10 @@ #endif #ifndef O_CLOEXEC -# define O_CLOEXEC 0 +# define O_CLOEXEC 0x40000000 /* Try to not collide with system O_* flags. */ +# define GNULIB_defined_O_CLOEXEC 1 +#else +# define GNULIB_defined_O_CLOEXEC 0 #endif #ifndef O_DIRECT diff -Nru grep-3.1/lib/fcntl-safer.h grep-3.3/lib/fcntl-safer.h --- grep-3.1/lib/fcntl-safer.h 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/lib/fcntl-safer.h 2018-01-07 00:07:08.000000000 +0000 @@ -1,6 +1,6 @@ /* Invoke fcntl-like functions, but avoid some glitches. - Copyright (C) 2005, 2009-2017 Free Software Foundation, Inc. + Copyright (C) 2005, 2009-2018 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 @@ -13,7 +13,7 @@ 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 . */ + along with this program. If not, see . */ /* Written by Paul Eggert. */ diff -Nru grep-3.1/lib/fd-hook.c grep-3.3/lib/fd-hook.c --- grep-3.1/lib/fd-hook.c 2017-06-10 16:45:35.000000000 +0000 +++ grep-3.3/lib/fd-hook.c 2018-01-07 00:08:01.000000000 +0000 @@ -1,5 +1,5 @@ /* Hook for making file descriptor functions close(), ioctl() extensible. - Copyright (C) 2009-2017 Free Software Foundation, Inc. + Copyright (C) 2009-2018 Free Software Foundation, Inc. Written by Bruno Haible , 2009. This program is free software: you can redistribute it and/or modify it @@ -13,7 +13,7 @@ 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 . */ + along with this program. If not, see . */ #include diff -Nru grep-3.1/lib/fd-hook.h grep-3.3/lib/fd-hook.h --- grep-3.1/lib/fd-hook.h 2017-06-10 16:45:35.000000000 +0000 +++ grep-3.3/lib/fd-hook.h 2018-01-07 00:08:01.000000000 +0000 @@ -1,5 +1,5 @@ /* Hook for making file descriptor functions close(), ioctl() extensible. - Copyright (C) 2009-2017 Free Software Foundation, Inc. + Copyright (C) 2009-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ #ifndef FD_HOOK_H diff -Nru grep-3.1/lib/fdopendir.c grep-3.3/lib/fdopendir.c --- grep-3.1/lib/fdopendir.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/lib/fdopendir.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ /* provide a replacement fdopendir function - Copyright (C) 2004-2017 Free Software Foundation, Inc. + Copyright (C) 2004-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ /* written by Jim Meyering */ diff -Nru grep-3.1/lib/fd-safer.c grep-3.3/lib/fd-safer.c --- grep-3.1/lib/fd-safer.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/lib/fd-safer.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,6 +1,6 @@ /* Return a safer copy of a file descriptor. - Copyright (C) 2005-2006, 2009-2017 Free Software Foundation, Inc. + Copyright (C) 2005-2006, 2009-2018 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 @@ -13,7 +13,7 @@ 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 . */ + along with this program. If not, see . */ /* Written by Paul Eggert. */ diff -Nru grep-3.1/lib/fd-safer-flag.c grep-3.3/lib/fd-safer-flag.c --- grep-3.1/lib/fd-safer-flag.c 1970-01-01 00:00:00.000000000 +0000 +++ grep-3.3/lib/fd-safer-flag.c 2018-01-07 00:07:08.000000000 +0000 @@ -0,0 +1,52 @@ +/* Adjust a file descriptor result so that it avoids clobbering + STD{IN,OUT,ERR}_FILENO, with specific flags. + + Copyright (C) 2005-2006, 2009-2018 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 and Eric Blake. */ + +#include + +/* Specification. */ +#include "unistd-safer.h" + +#include +#include + +/* Return FD, unless FD would be a copy of standard input, output, or + error; in that case, return a duplicate of FD, closing FD. If FLAG + contains O_CLOEXEC, the returned FD will have close-on-exec + semantics. On failure to duplicate, close FD, set errno, and + return -1. Preserve errno if FD is negative, so that the caller + can always inspect errno when the returned value is negative. + + This function is usefully wrapped around functions that return file + descriptors, e.g., fd_safer_flag (open ("file", O_RDONLY | flag), flag). */ + +int +fd_safer_flag (int fd, int flag) +{ + if (STDIN_FILENO <= fd && fd <= STDERR_FILENO) + { + int f = dup_safer_flag (fd, flag); + int e = errno; + close (fd); + errno = e; + fd = f; + } + + return fd; +} diff -Nru grep-3.1/lib/filenamecat.h grep-3.3/lib/filenamecat.h --- grep-3.1/lib/filenamecat.h 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/lib/filenamecat.h 2018-01-07 00:07:08.000000000 +0000 @@ -1,6 +1,6 @@ /* Concatenate two arbitrary file names. - Copyright (C) 1996-1997, 2003, 2005, 2007, 2009-2017 Free Software + Copyright (C) 1996-1997, 2003, 2005, 2007, 2009-2018 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify @@ -14,7 +14,7 @@ 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 . */ + along with this program. If not, see . */ /* Written by Jim Meyering. */ diff -Nru grep-3.1/lib/filenamecat-lgpl.c grep-3.3/lib/filenamecat-lgpl.c --- grep-3.1/lib/filenamecat-lgpl.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/lib/filenamecat-lgpl.c 2018-02-26 06:09:46.000000000 +0000 @@ -1,6 +1,6 @@ /* Concatenate two arbitrary file names. - Copyright (C) 1996-2007, 2009-2017 Free Software Foundation, Inc. + Copyright (C) 1996-2007, 2009-2018 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 @@ -13,7 +13,7 @@ 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 . */ + along with this program. If not, see . */ /* Written by Jim Meyering. */ @@ -31,55 +31,54 @@ # define mempcpy(D, S, N) ((void *) ((char *) memcpy (D, S, N) + (N))) #endif -/* Return the longest suffix of F that is a relative file name. - If it has no such suffix, return the empty string. */ - -static char const * _GL_ATTRIBUTE_PURE -longest_relative_suffix (char const *f) -{ - for (f += FILE_SYSTEM_PREFIX_LEN (f); ISSLASH (*f); f++) - continue; - return f; -} - -/* Concatenate two file name components, DIR and ABASE, in +/* Concatenate two file name components, DIR and BASE, in newly-allocated storage and return the result. The resulting file name F is such that the commands "ls F" and "(cd - DIR; ls BASE)" refer to the same file, where BASE is ABASE with any - file system prefixes and leading separators removed. - Arrange for a directory separator if necessary between DIR and BASE - in the result, removing any redundant separators. + DIR; ls ./BASE)" refer to the same file. If necessary, put + a separator between DIR and BASE in the result. Typically this + separator is "/", but in rare cases it might be ".". In any case, if BASE_IN_RESULT is non-NULL, set - *BASE_IN_RESULT to point to the copy of ABASE in the returned - concatenation. However, if ABASE begins with more than one slash, - set *BASE_IN_RESULT to point to the sole corresponding slash that - is copied into the result buffer. + *BASE_IN_RESULT to point to the copy of BASE at the end of the + returned concatenation. Return NULL if malloc fails. */ char * -mfile_name_concat (char const *dir, char const *abase, char **base_in_result) +mfile_name_concat (char const *dir, char const *base, char **base_in_result) { char const *dirbase = last_component (dir); size_t dirbaselen = base_len (dirbase); size_t dirlen = dirbase - dir + dirbaselen; - size_t needs_separator = (dirbaselen && ! ISSLASH (dirbase[dirbaselen - 1])); - - char const *base = longest_relative_suffix (abase); size_t baselen = strlen (base); + char sep = '\0'; + if (dirbaselen) + { + /* DIR is not a file system root, so separate with / if needed. */ + if (! ISSLASH (dir[dirlen - 1]) && ! ISSLASH (*base)) + sep = '/'; + } + else if (ISSLASH (*base)) + { + /* DIR is a file system root and BASE begins with a slash, so + separate with ".". For example, if DIR is "/" and BASE is + "/foo" then return "/./foo", as "//foo" would be wrong on + some POSIX systems. A fancier algorithm could omit "." in + some cases but is not worth the trouble. */ + sep = '.'; + } - char *p_concat = malloc (dirlen + needs_separator + baselen + 1); + char *p_concat = malloc (dirlen + (sep != '\0') + baselen + 1); char *p; if (p_concat == NULL) return NULL; p = mempcpy (p_concat, dir, dirlen); - *p = DIRECTORY_SEPARATOR; - p += needs_separator; + *p = sep; + p += sep != '\0'; if (base_in_result) - *base_in_result = p - IS_ABSOLUTE_FILE_NAME (abase); + *base_in_result = p; p = mempcpy (p, base, baselen); *p = '\0'; diff -Nru grep-3.1/lib/filename.h grep-3.3/lib/filename.h --- grep-3.1/lib/filename.h 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/lib/filename.h 2018-06-24 23:16:49.000000000 +0000 @@ -1,5 +1,5 @@ /* Basic filename support macros. - Copyright (C) 2001-2004, 2007-2017 Free Software Foundation, Inc. + Copyright (C) 2001-2004, 2007-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ #ifndef _FILENAME_H #define _FILENAME_H @@ -28,7 +28,7 @@ it may be concatenated to a directory pathname. IS_PATH_WITH_DIR(P) tests whether P contains a directory specification. */ -#if defined _WIN32 || defined __WIN32__ || defined __CYGWIN__ || defined __EMX__ || defined __DJGPP__ +#if defined _WIN32 || defined __CYGWIN__ || defined __EMX__ || defined __DJGPP__ /* Native Windows, Cygwin, OS/2, DOS */ # define ISSLASH(C) ((C) == '/' || (C) == '\\') # define HAS_DEVICE(P) \ diff -Nru grep-3.1/lib/flexmember.h grep-3.3/lib/flexmember.h --- grep-3.1/lib/flexmember.h 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/lib/flexmember.h 2018-01-07 00:08:02.000000000 +0000 @@ -1,19 +1,22 @@ /* Sizes of structs with flexible array members. - Copyright 2016-2017 Free Software Foundation, Inc. + Copyright 2016-2018 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 file is part of the GNU C Library. - This program is distributed in the hope that it will be useful, + 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. + 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 + . Written by Paul Eggert. */ diff -Nru grep-3.1/lib/fnmatch.c grep-3.3/lib/fnmatch.c --- grep-3.1/lib/fnmatch.c 2017-05-21 00:32:48.000000000 +0000 +++ grep-3.3/lib/fnmatch.c 2018-01-07 00:08:02.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-1993, 1996-2007, 2009-2017 Free Software Foundation, Inc. +/* Copyright (C) 1991-1993, 1996-2007, 2009-2018 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 @@ -11,7 +11,7 @@ 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 . */ + along with this program; if not, see . */ #ifndef _LIBC # include diff -Nru grep-3.1/lib/fnmatch.in.h grep-3.3/lib/fnmatch.in.h --- grep-3.1/lib/fnmatch.in.h 2017-01-01 11:25:47.000000000 +0000 +++ grep-3.3/lib/fnmatch.in.h 2018-09-19 05:05:05.000000000 +0000 @@ -1,4 +1,5 @@ -/* Copyright (C) 1991-1993, 1996-1999, 2001-2003, 2005, 2007, 2009-2017 Free +/* Substitute for and wrapper around . + Copyright (C) 1991-1993, 1996-1999, 2001-2003, 2005, 2007, 2009-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -14,17 +15,31 @@ 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 . */ + along with this program; if not, see . */ -#ifndef _FNMATCH_H -#define _FNMATCH_H 1 +#ifndef _@GUARD_PREFIX@_FNMATCH_H -/* The definition of _GL_ARG_NONNULL is copied here. */ +#if __GNUC__ >= 3 +@PRAGMA_SYSTEM_HEADER@ +#endif +@PRAGMA_COLUMNS@ -#ifdef __cplusplus -extern "C" { +/* The include_next requires a split double-inclusion guard. */ +#if @HAVE_FNMATCH_H@ && !@REPLACE_FNMATCH@ +# @INCLUDE_NEXT@ @NEXT_FNMATCH_H@ #endif +#ifndef _@GUARD_PREFIX@_FNMATCH_H +#define _@GUARD_PREFIX@_FNMATCH_H + +/* 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. */ + +#if !@HAVE_FNMATCH_H@ || @REPLACE_FNMATCH@ + /* We #undef these before defining them because some losing systems (HP-UX A.08.07 for example) define these in . */ #undef FNM_PATHNAME @@ -54,14 +69,42 @@ # define FNM_NOSYS (-1) #endif +#endif + + +#if @GNULIB_FNMATCH@ /* Match NAME against the file name pattern PATTERN, returning zero if it matches, FNM_NOMATCH if not. */ -extern int fnmatch (const char *__pattern, const char *__name, - int __flags) - _GL_ARG_NONNULL ((1, 2)); - -#ifdef __cplusplus -} +# if @REPLACE_FNMATCH@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define fnmatch rpl_fnmatch +# endif +_GL_FUNCDECL_RPL (fnmatch, int, + (const char *pattern, const char *name, int flags) + _GL_ARG_NONNULL ((1, 2))); +_GL_CXXALIAS_RPL (fnmatch, int, + (const char *pattern, const char *name, int flags)); +# else +# if !@HAVE_FNMATCH@ +_GL_FUNCDECL_SYS (fnmatch, int, + (const char *pattern, const char *name, int flags) + _GL_ARG_NONNULL ((1, 2))); +# endif +_GL_CXXALIAS_SYS (fnmatch, int, + (const char *pattern, const char *name, int flags)); +# endif +# if !GNULIB_FNMATCH_GNU +_GL_CXXALIASWARN (fnmatch); +# endif +#elif defined GNULIB_POSIXCHECK +# undef fnmatch +# if HAVE_RAW_DECL_FNMATCH +_GL_WARN_ON_USE (fnmatch, + "fnmatch does not portably work - " + "use gnulib module fnmatch for portability or gnulib module fnmatch-gnu for a glibc compatible implementation"); +# endif #endif -#endif /* fnmatch.h */ + +#endif /* _@GUARD_PREFIX@_FNMATCH_H */ +#endif /* _@GUARD_PREFIX@_FNMATCH_H */ diff -Nru grep-3.1/lib/fnmatch_loop.c grep-3.3/lib/fnmatch_loop.c --- grep-3.1/lib/fnmatch_loop.c 2017-05-21 00:32:48.000000000 +0000 +++ grep-3.3/lib/fnmatch_loop.c 2018-01-07 00:08:02.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-1993, 1996-2006, 2009-2017 Free Software Foundation, Inc. +/* Copyright (C) 1991-1993, 1996-2006, 2009-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program; if not, see . */ /* Match STRING against the file name pattern PATTERN, returning zero if it matches, nonzero if not. */ diff -Nru grep-3.1/lib/fpending.c grep-3.3/lib/fpending.c --- grep-3.1/lib/fpending.c 2017-01-16 17:27:38.000000000 +0000 +++ grep-3.3/lib/fpending.c 2018-09-19 05:04:26.000000000 +0000 @@ -1,5 +1,5 @@ /* fpending.c -- return the number of pending output bytes on a stream - Copyright (C) 2000, 2004, 2006-2007, 2009-2017 Free Software Foundation, + Copyright (C) 2000, 2004, 2006-2007, 2009-2018 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify @@ -13,7 +13,7 @@ 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 . */ + along with this program. If not, see . */ /* Written by Jim Meyering. */ @@ -24,6 +24,9 @@ #include "stdio-impl.h" +/* This file is not used on systems that already have the __fpending function, + namely glibc >= 2.2, Solaris >= 7, Android API >= 23. */ + /* Return the number of pending (aka buffered, unflushed) bytes on the stream, FP, that is open for writing. */ size_t @@ -32,7 +35,8 @@ /* Most systems provide FILE as a struct and the necessary bitmask in , because they need it for implementing getc() and putc() as fast macros. */ -#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ +#if defined _IO_EOF_SEEN || defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 + /* GNU libc, BeOS, Haiku, Linux libc5 */ return fp->_IO_write_ptr - fp->_IO_write_base; #elif defined __sferror || defined __DragonFly__ || defined __ANDROID__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Minix 3, Android */ @@ -41,7 +45,7 @@ return fp->_ptr - fp->_buffer; #elif defined __minix /* Minix */ return fp_->_ptr - fp_->_buf; -#elif defined _IOERR /* AIX, HP-UX, IRIX, OSF/1, Solaris, OpenServer, mingw, MSVC, NonStop Kernel */ +#elif defined _IOERR /* AIX, HP-UX, IRIX, OSF/1, Solaris, OpenServer, mingw, MSVC, NonStop Kernel, OpenVMS */ return (fp_->_ptr ? fp_->_ptr - fp_->_base : 0); #elif defined __UCLIBC__ /* uClibc */ return (fp->__modeflags & __FLAG_WRITING ? fp->__bufpos - fp->__bufstart : 0); @@ -51,8 +55,6 @@ return fp->__bufp - fp->__buffer; #elif defined EPLAN9 /* Plan9 */ return fp->wp - fp->buf; -#elif defined __VMS /* VMS */ - return (*fp)->_ptr - (*fp)->_base; #else # error "Please port gnulib fpending.c to your platform!" return 1; diff -Nru grep-3.1/lib/fpending.h grep-3.3/lib/fpending.h --- grep-3.1/lib/fpending.h 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/lib/fpending.h 2018-01-07 00:07:08.000000000 +0000 @@ -1,6 +1,6 @@ /* Declare __fpending. - Copyright (C) 2000, 2003, 2005-2006, 2009-2017 Free Software Foundation, + Copyright (C) 2000, 2003, 2005-2006, 2009-2018 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify @@ -14,7 +14,7 @@ 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 . + along with this program. If not, see . Written by Jim Meyering. */ diff -Nru grep-3.1/lib/fstatat.c grep-3.3/lib/fstatat.c --- grep-3.1/lib/fstatat.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/lib/fstatat.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,6 +1,6 @@ /* Work around an fstatat bug on Solaris 9. - Copyright (C) 2006, 2009-2017 Free Software Foundation, Inc. + Copyright (C) 2006, 2009-2018 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 @@ -13,7 +13,7 @@ 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 . */ + along with this program. If not, see . */ /* Written by Paul Eggert and Jim Meyering. */ @@ -28,7 +28,7 @@ #include #undef __need_system_sys_stat_h -#if HAVE_FSTATAT +#if HAVE_FSTATAT && HAVE_WORKING_FSTATAT_ZERO_FLAG static int orig_fstatat (int fd, char const *filename, struct stat *buf, int flags) { @@ -41,6 +41,8 @@ above. */ #include "sys/stat.h" +#include "stat-time.h" + #include #include #include @@ -51,6 +53,12 @@ # define LSTAT_FOLLOWS_SLASHED_SYMLINK 0 # endif +static int +normal_fstatat (int fd, char const *file, struct stat *st, int flag) +{ + return stat_time_normalize (orig_fstatat (fd, file, st, flag), st); +} + /* fstatat should always follow symbolic links that end in /, but on Solaris 9 it doesn't if AT_SYMLINK_NOFOLLOW is specified. Likewise, trailing slash on a non-directory should be an error. @@ -63,7 +71,7 @@ int rpl_fstatat (int fd, char const *file, struct stat *st, int flag) { - int result = orig_fstatat (fd, file, st, flag); + int result = normal_fstatat (fd, file, st, flag); size_t len; if (LSTAT_FOLLOWS_SLASHED_SYMLINK || result != 0) @@ -79,7 +87,7 @@ errno = ENOTDIR; return -1; } - result = orig_fstatat (fd, file, st, flag & ~AT_SYMLINK_NOFOLLOW); + result = normal_fstatat (fd, file, st, flag & ~AT_SYMLINK_NOFOLLOW); } /* Fix stat behavior. */ if (result == 0 && !S_ISDIR (st->st_mode) && file[len - 1] == '/') @@ -111,7 +119,7 @@ # endif /* Replacement for Solaris' function by the same name. - + First, try to simulate it via l?stat ("/proc/self/fd/FD/FILE"). Failing that, simulate it via save_cwd/fchdir/(stat|lstat)/restore_cwd. If either the save_cwd or the restore_cwd fails (relatively unlikely), diff -Nru grep-3.1/lib/fstat.c grep-3.3/lib/fstat.c --- grep-3.1/lib/fstat.c 2017-05-14 01:09:51.000000000 +0000 +++ grep-3.3/lib/fstat.c 2018-06-24 23:16:49.000000000 +0000 @@ -1,5 +1,5 @@ /* fstat() replacement. - Copyright (C) 2011-2017 Free Software Foundation, Inc. + Copyright (C) 2011-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ /* If the user's config.h happens to include , let it include only the system's here, so that orig_fstat doesn't recurse to @@ -25,7 +25,7 @@ #include #undef __need_system_sys_stat_h -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +#if defined _WIN32 && ! defined __CYGWIN__ # define WINDOWS_NATIVE #endif @@ -45,6 +45,8 @@ above. */ #include "sys/stat.h" +#include "stat-time.h" + #include #include #ifdef WINDOWS_NATIVE @@ -73,7 +75,7 @@ /* 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) @@ -83,6 +85,6 @@ } return _gl_fstat_by_handle (h, NULL, buf); #else - return orig_fstat (fd, buf); + return stat_time_normalize (orig_fstat (fd, buf), buf); #endif } diff -Nru grep-3.1/lib/fts.c grep-3.3/lib/fts.c --- grep-3.1/lib/fts.c 2017-05-21 00:31:28.000000000 +0000 +++ grep-3.3/lib/fts.c 2018-12-21 02:51:47.000000000 +0000 @@ -1,6 +1,6 @@ /* Traverse a file hierarchy. - Copyright (C) 2004-2017 Free Software Foundation, Inc. + Copyright (C) 2004-2018 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 @@ -13,7 +13,7 @@ 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 . */ + along with this program. If not, see . */ /*- * Copyright (c) 1990, 1993, 1994 @@ -71,13 +71,9 @@ #if ! _LIBC # include "fcntl--.h" -# include "dirent--.h" -# include "unistd--.h" -/* FIXME - use fcntl(F_DUPFD_CLOEXEC)/openat(O_CLOEXEC) once they are - supported. */ -# include "cloexec.h" # include "flexmember.h" # include "openat.h" +# include "opendirat.h" # include "same-inode.h" #endif @@ -299,32 +295,6 @@ : FTS_NO_STAT_REQUIRED); } -/* file-descriptor-relative opendir. */ -/* FIXME: if others need this function, move it into lib/openat.c */ -static DIR * -internal_function -opendirat (int fd, char const *dir, int extra_flags, int *pdir_fd) -{ - int new_fd = openat (fd, dir, - (O_RDONLY | O_DIRECTORY | O_NOCTTY | O_NONBLOCK - | extra_flags)); - DIR *dirp; - - if (new_fd < 0) - return NULL; - set_cloexec_flag (new_fd, true); - dirp = fdopendir (new_fd); - if (dirp) - *pdir_fd = new_fd; - else - { - int saved_errno = errno; - close (new_fd); - errno = saved_errno; - } - return dirp; -} - /* Virtual fchdir. Advance SP's working directory file descriptor, SP->fts_cwd_fd, to FD, and push the previous value onto the fd_ring. CHDIR_DOWN_ONE is true if FD corresponds to an entry in the directory @@ -375,15 +345,12 @@ internal_function diropen (FTS const *sp, char const *dir) { - int open_flags = (O_SEARCH | O_DIRECTORY | O_NOCTTY | O_NONBLOCK - | (ISSET (FTS_PHYSICAL) ? O_NOFOLLOW : 0) - | (ISSET (FTS_NOATIME) ? O_NOATIME : 0)); + int open_flags = (O_SEARCH | O_CLOEXEC | O_DIRECTORY | O_NOCTTY | O_NONBLOCK + | (ISSET (FTS_PHYSICAL) ? O_NOFOLLOW : 0)); int fd = (ISSET (FTS_CWDFD) ? openat (sp->fts_cwd_fd, dir, open_flags) : open (dir, open_flags)); - if (0 <= fd) - set_cloexec_flag (fd, true); return fd; } @@ -434,8 +401,7 @@ early, doing it here saves us the trouble of ensuring later (where it'd be messier) that "." can in fact be opened. If not, revert to FTS_NOCHDIR mode. */ - int fd = open (".", - O_SEARCH | (ISSET (FTS_NOATIME) ? O_NOATIME : 0)); + int fd = open (".", O_SEARCH); if (fd < 0) { /* Even if "." is unreadable, don't revert to FTS_NOCHDIR mode @@ -479,6 +445,7 @@ if ((parent = fts_alloc(sp, "", 0)) == NULL) goto mem2; parent->fts_level = FTS_ROOTPARENTLEVEL; + parent->fts_n_dirs_remaining = -1; } /* The classic fts implementation would call fts_stat with @@ -553,6 +520,7 @@ goto mem3; sp->fts_cur->fts_link = root; sp->fts_cur->fts_info = FTS_INIT; + sp->fts_cur->fts_level = 1; if (! setup_dir (sp)) goto mem3; @@ -665,42 +633,145 @@ return (0); } +/* Minimum link count of a traditional Unix directory. When leaf + optimization is OK and MIN_DIR_NLINK <= st_nlink, then st_nlink is + an upper bound on the number of subdirectories (counting "." and + ".."). */ +enum { MIN_DIR_NLINK = 2 }; + +/* Whether leaf optimization is OK for a directory. */ +enum leaf_optimization + { + /* st_nlink is not reliable for this directory's subdirectories. */ + NO_LEAF_OPTIMIZATION, + + /* Leaf optimization is OK, but is not useful for avoiding stat calls. */ + OK_LEAF_OPTIMIZATION, + + /* Leaf optimization is not only OK: it is useful for avoiding + stat calls, because dirent.d_type does not work. */ + NOSTAT_LEAF_OPTIMIZATION + }; + #if defined __linux__ \ && HAVE_SYS_VFS_H && HAVE_FSTATFS && HAVE_STRUCT_STATFS_F_TYPE # include /* Linux-specific constants from coreutils' src/fs.h */ -# define S_MAGIC_TMPFS 0x1021994 +# define S_MAGIC_AFS 0x5346414F +# define S_MAGIC_CIFS 0xFF534D42 # define S_MAGIC_NFS 0x6969 +# define S_MAGIC_PROC 0x9FA0 # define S_MAGIC_REISERFS 0x52654973 +# define S_MAGIC_TMPFS 0x1021994 # define S_MAGIC_XFS 0x58465342 -# define S_MAGIC_PROC 0x9FA0 -/* Return false if it is easy to determine the file system type of - the directory on which DIR_FD is open, and sorting dirents on - inode numbers is known not to improve traversal performance with - that type of file system. Otherwise, return true. */ +# ifdef HAVE___FSWORD_T +typedef __fsword_t fsword; +# else +typedef long int fsword; +# endif + +/* Map a stat.st_dev number to a file system type number f_ftype. */ +struct dev_type +{ + dev_t st_dev; + fsword f_type; +}; + +/* Use a tiny initial size. If a traversal encounters more than + a few devices, the cost of growing/rehashing this table will be + rendered negligible by the number of inodes processed. */ +enum { DEV_TYPE_HT_INITIAL_SIZE = 13 }; + +static size_t +dev_type_hash (void const *x, size_t table_size) +{ + struct dev_type const *ax = x; + uintmax_t dev = ax->st_dev; + return dev % table_size; +} + static bool -dirent_inode_sort_may_be_useful (int dir_fd) +dev_type_compare (void const *x, void const *y) +{ + struct dev_type const *ax = x; + struct dev_type const *ay = y; + return ax->st_dev == ay->st_dev; +} + +/* Return the file system type of P with file descriptor FD, or 0 if not known. + If FD is negative, P's file descriptor is unavailable. + Try to cache known values. */ + +static fsword +filesystem_type (FTSENT const *p, int fd) +{ + FTS *sp = p->fts_fts; + Hash_table *h = sp->fts_leaf_optimization_works_ht; + struct dev_type *ent; + struct statfs fs_buf; + + /* If we're not in CWDFD mode, don't bother with this optimization, + since the caller is not serious about performance. */ + if (!ISSET (FTS_CWDFD)) + return 0; + + if (! h) + h = sp->fts_leaf_optimization_works_ht + = hash_initialize (DEV_TYPE_HT_INITIAL_SIZE, NULL, dev_type_hash, + dev_type_compare, free); + if (h) + { + struct dev_type tmp; + tmp.st_dev = p->fts_statp->st_dev; + ent = hash_lookup (h, &tmp); + if (ent) + return ent->f_type; + } + + /* Look-up failed. Query directly and cache the result. */ + if (fd < 0 || fstatfs (fd, &fs_buf) != 0) + return 0; + + if (h) + { + struct dev_type *t2 = malloc (sizeof *t2); + if (t2) + { + t2->st_dev = p->fts_statp->st_dev; + t2->f_type = fs_buf.f_type; + + ent = hash_insert (h, t2); + if (ent) + fts_assert (ent == t2); + else + free (t2); + } + } + + return fs_buf.f_type; +} + +/* Return true if sorting dirents on inode numbers is known to improve + traversal performance for the directory P with descriptor DIR_FD. + Return false otherwise. When in doubt, return true. + DIR_FD is negative if unavailable. */ +static bool +dirent_inode_sort_may_be_useful (FTSENT const *p, int dir_fd) { /* Skip the sort only if we can determine efficiently that skipping it is the right thing to do. The cost of performing an unnecessary sort is negligible, while the cost of *not* performing it can be O(N^2) with a very large constant. */ - struct statfs fs_buf; - /* If fstatfs fails, assume sorting would be useful. */ - if (fstatfs (dir_fd, &fs_buf) != 0) - return true; - - /* FIXME: what about when f_type is not an integral type? - deal with that if/when it's encountered. */ - switch (fs_buf.f_type) + switch (filesystem_type (p, dir_fd)) { - case S_MAGIC_TMPFS: + case S_MAGIC_CIFS: case S_MAGIC_NFS: + case S_MAGIC_TMPFS: /* On a file system of any of these types, sorting is unnecessary, and hence wasteful. */ return false; @@ -710,31 +781,35 @@ } } -/* Given a file descriptor DIR_FD open on a directory D, - return true if it is valid to apply the leaf-optimization - technique of counting directories in D via stat.st_nlink. */ -static bool -leaf_optimization_applies (int dir_fd) +/* Given an FTS entry P for a directory with descriptor DIR_FD, + return true if it is both useful and valid to apply leaf optimization. + The optimization is useful only for file systems that lack usable + dirent.d_type info. The optimization is valid if an st_nlink value + of at least MIN_DIR_NLINK is an upper bound on the number of + subdirectories of D, counting "." and ".." as subdirectories. + DIR_FD is negative if unavailable. */ +static enum leaf_optimization +leaf_optimization (FTSENT const *p, int dir_fd) { - struct statfs fs_buf; - - /* If fstatfs fails, assume we can't use the optimization. */ - if (fstatfs (dir_fd, &fs_buf) != 0) - return false; - - /* FIXME: do we need to detect AFS mount points? I doubt it, - unless fstatfs can report S_MAGIC_REISERFS for such a directory. */ - - switch (fs_buf.f_type) + switch (filesystem_type (p, dir_fd)) { - /* List here the file system types that lack usable dirent.d_type + /* List here the file system types that may lack usable dirent.d_type info, yet for which the optimization does apply. */ case S_MAGIC_REISERFS: - case S_MAGIC_XFS: - return true; + case S_MAGIC_XFS: /* XFS lacked it until 2013-08-22 commit. */ + return NOSTAT_LEAF_OPTIMIZATION; - /* Explicitly list here any other file system type for which the - optimization is not applicable, but need documentation. */ + case 0: + /* Leaf optimization is unsafe if the file system type is unknown. */ + FALLTHROUGH; + case S_MAGIC_AFS: + /* Although AFS mount points are not counted in st_nlink, they + act like directories. See . */ + FALLTHROUGH; + case S_MAGIC_CIFS: + /* Leaf optimization causes 'find' to abort. See + . */ + FALLTHROUGH; case S_MAGIC_NFS: /* NFS provides usable dirent.d_type but not necessarily for all entries of large directories, so as per @@ -742,102 +817,28 @@ all implementations as per . */ FALLTHROUGH; case S_MAGIC_PROC: - /* Per /proc may have - bogus stat.st_nlink values. */ - FALLTHROUGH; + /* Per /proc + may have bogus stat.st_nlink values. */ + return NO_LEAF_OPTIMIZATION; + default: - return false; + return OK_LEAF_OPTIMIZATION; } } #else static bool -dirent_inode_sort_may_be_useful (int dir_fd _GL_UNUSED) { return true; } -static bool -leaf_optimization_applies (int dir_fd _GL_UNUSED) { return false; } -#endif - -/* link-count-optimization entry: - map a stat.st_dev number to a boolean: leaf_optimization_works */ -struct LCO_ent -{ - dev_t st_dev; - bool opt_ok; -}; - -/* Use a tiny initial size. If a traversal encounters more than - a few devices, the cost of growing/rehashing this table will be - rendered negligible by the number of inodes processed. */ -enum { LCO_HT_INITIAL_SIZE = 13 }; - -static size_t -LCO_hash (void const *x, size_t table_size) +dirent_inode_sort_may_be_useful (FTSENT const *p _GL_UNUSED, + int dir_fd _GL_UNUSED) { - struct LCO_ent const *ax = x; - return (uintmax_t) ax->st_dev % table_size; + return true; } - -static bool -LCO_compare (void const *x, void const *y) +static enum leaf_optimization +leaf_optimization (FTSENT const *p _GL_UNUSED, int dir_fd _GL_UNUSED) { - struct LCO_ent const *ax = x; - struct LCO_ent const *ay = y; - return ax->st_dev == ay->st_dev; -} - -/* Ask the same question as leaf_optimization_applies, but query - the cache first (FTS.fts_leaf_optimization_works_ht), and if necessary, - update that cache. */ -static bool -link_count_optimize_ok (FTSENT const *p) -{ - FTS *sp = p->fts_fts; - Hash_table *h = sp->fts_leaf_optimization_works_ht; - struct LCO_ent tmp; - struct LCO_ent *ent; - bool opt_ok; - struct LCO_ent *t2; - - /* If we're not in CWDFD mode, don't bother with this optimization, - since the caller is not serious about performance. */ - if (!ISSET(FTS_CWDFD)) - return false; - - /* map st_dev to the boolean, leaf_optimization_works */ - if (h == NULL) - { - h = sp->fts_leaf_optimization_works_ht - = hash_initialize (LCO_HT_INITIAL_SIZE, NULL, LCO_hash, - LCO_compare, free); - if (h == NULL) - return false; - } - tmp.st_dev = p->fts_statp->st_dev; - ent = hash_lookup (h, &tmp); - if (ent) - return ent->opt_ok; - - /* Look-up failed. Query directly and cache the result. */ - t2 = malloc (sizeof *t2); - if (t2 == NULL) - return false; - - /* Is it ok to perform the optimization in the dir, FTS_CWD_FD? */ - opt_ok = leaf_optimization_applies (sp->fts_cwd_fd); - t2->opt_ok = opt_ok; - t2->st_dev = p->fts_statp->st_dev; - - ent = hash_insert (h, t2); - if (ent == NULL) - { - /* insertion failed */ - free (t2); - return false; - } - fts_assert (ent == t2); - - return opt_ok; + return NO_LEAF_OPTIMIZATION; } +#endif /* * Special case of "/" at the end of the file name so that slashes aren't @@ -1024,13 +1025,11 @@ if (p->fts_statp->st_size == FTS_STAT_REQUIRED) { FTSENT *parent = p->fts_parent; - if (FTS_ROOTLEVEL < p->fts_level - /* ->fts_n_dirs_remaining is not valid - for command-line-specified names. */ - && parent->fts_n_dirs_remaining == 0 + if (parent->fts_n_dirs_remaining == 0 && ISSET(FTS_NOSTAT) && ISSET(FTS_PHYSICAL) - && link_count_optimize_ok (parent)) + && (leaf_optimization (parent, sp->fts_cwd_fd) + == NOSTAT_LEAF_OPTIMIZATION)) { /* nothing more needed */ } @@ -1039,7 +1038,8 @@ p->fts_info = fts_stat(sp, p, false); if (S_ISDIR(p->fts_statp->st_mode) && p->fts_level != FTS_ROOTLEVEL - && parent->fts_n_dirs_remaining) + && 0 < parent->fts_n_dirs_remaining + && parent->fts_n_dirs_remaining != (nlink_t) -1) parent->fts_n_dirs_remaining--; } } @@ -1278,8 +1278,7 @@ (((ISSET(FTS_PHYSICAL) \ && ! (ISSET(FTS_COMFOLLOW) \ && cur->fts_level == FTS_ROOTLEVEL)) \ - ? O_NOFOLLOW : 0) \ - | (ISSET (FTS_NOATIME) ? O_NOATIME : 0)), \ + ? O_NOFOLLOW : 0)), \ Pdir_fd) /* @@ -1308,13 +1307,12 @@ bool descend; bool doadjust; ptrdiff_t level; - nlink_t nlinks; - bool nostat; size_t len, maxlen, new_len; char *cp; int dir_fd; FTSENT *cur = sp->fts_cur; bool continue_readdir = !!cur->fts_dirp; + bool sort_by_inode = false; size_t max_entries; /* When cur->fts_dirp is non-NULL, that means we should @@ -1380,24 +1378,6 @@ max_entries = sp->fts_compar ? SIZE_MAX : FTS_MAX_READDIR_ENTRIES; /* - * Nlinks is the number of possible entries of type directory in the - * directory if we're cheating on stat calls, 0 if we're not doing - * any stat calls at all, (nlink_t) -1 if we're statting everything. - */ - if (type == BNAMES) { - nlinks = 0; - /* Be quiet about nostat, GCC. */ - nostat = false; - } else if (ISSET(FTS_NOSTAT) && ISSET(FTS_PHYSICAL)) { - nlinks = (cur->fts_statp->st_nlink - - (ISSET(FTS_SEEDOT) ? 0 : 2)); - nostat = true; - } else { - nlinks = -1; - nostat = false; - } - - /* * If we're going to need to stat anything or we want to descend * and stay in the directory, chdir. If this fails we keep going, * but set a flag so we don't chdir after the post-order visit. @@ -1418,15 +1398,22 @@ the required dirp and dir_fd. */ descend = true; } - else if (nlinks || type == BREAD) { + else + { + /* Try to descend unless it is a names-only fts_children, + or the directory is known to lack subdirectories. */ + descend = (type != BNAMES + && ! (ISSET (FTS_NOSTAT) && ISSET (FTS_PHYSICAL) + && ! ISSET (FTS_SEEDOT) + && cur->fts_statp->st_nlink == MIN_DIR_NLINK + && (leaf_optimization (cur, dir_fd) + != NO_LEAF_OPTIMIZATION))); + if (descend || type == BREAD) + { if (ISSET(FTS_CWDFD)) - { - dir_fd = dup (dir_fd); - if (0 <= dir_fd) - set_cloexec_flag (dir_fd, true); - } + dir_fd = fcntl (dir_fd, F_DUPFD_CLOEXEC, STDERR_FILENO + 1); if (dir_fd < 0 || fts_safe_changedir(sp, cur, dir_fd, NULL)) { - if (nlinks && type == BREAD) + if (descend && type == BREAD) cur->fts_errno = errno; cur->fts_flags |= FTS_DONTCHDIR; descend = false; @@ -1436,8 +1423,8 @@ cur->fts_dirp = NULL; } else descend = true; - } else - descend = false; + } + } /* * Figure out the max file name length that can be stored in the @@ -1468,7 +1455,6 @@ tail = NULL; nitems = 0; while (cur->fts_dirp) { - bool is_dir; size_t d_namelen; __set_errno (0); struct dirent *dp = readdir(cur->fts_dirp); @@ -1569,19 +1555,10 @@ to caller, when possible. */ set_stat_type (p->fts_statp, D_TYPE (dp)); fts_set_stat_required(p, !skip_stat); - is_dir = (ISSET(FTS_PHYSICAL) - && DT_MUST_BE(dp, DT_DIR)); } else { p->fts_info = fts_stat(sp, p, false); - is_dir = (p->fts_info == FTS_D - || p->fts_info == FTS_DC - || p->fts_info == FTS_DOT); } - /* Decrement link count if applicable. */ - if (nlinks > 0 && is_dir) - nlinks -= nostat; - /* We walk in directory order so "ls -f" doesn't get upset. */ p->fts_link = NULL; if (head == NULL) @@ -1590,6 +1567,19 @@ tail->fts_link = p; tail = p; } + + /* If there are many entries, no sorting function has been + specified, and this file system is of a type that may be + slow with a large number of entries, arrange to sort the + directory entries on increasing inode numbers. + + The NITEMS comparison uses ==, not >, because the test + needs to be tried at most once once, and NITEMS will exceed + the threshold after it is incremented below. */ + if (nitems == _FTS_INODE_SORT_DIR_ENTRIES_THRESHOLD + && !sp->fts_compar) + sort_by_inode = dirent_inode_sort_may_be_useful (cur, dir_fd); + ++nitems; if (max_entries <= nitems) { /* When there are too many dir entries, leave @@ -1647,14 +1637,7 @@ return (NULL); } - /* If there are many entries, no sorting function has been specified, - and this file system is of a type that may be slow with a large - number of entries, then sort the directory entries on increasing - inode numbers. */ - if (nitems > _FTS_INODE_SORT_DIR_ENTRIES_THRESHOLD - && !sp->fts_compar - && ISSET (FTS_CWDFD) - && dirent_inode_sort_may_be_useful (sp->fts_cwd_fd)) { + if (sort_by_inode) { sp->fts_compar = fts_compare_ino; head = fts_sort (sp, head, nitems); sp->fts_compar = NULL; @@ -1777,7 +1760,7 @@ I_ring fd_w = sp->fts_fd_ring; int cwd_fd = sp->fts_cwd_fd; - cwd_fd = dup (cwd_fd); + cwd_fd = fcntl (cwd_fd, F_DUPFD_CLOEXEC, STDERR_FILENO + 1); char *dot = getcwdat (cwd_fd, NULL, 0); error (0, 0, "===== check ===== cwd: %s", dot); free (dot); @@ -1786,7 +1769,8 @@ int fd = i_ring_pop (&fd_w); if (0 <= fd) { - int parent_fd = openat (cwd_fd, "..", O_SEARCH | O_NOATIME); + int open_flags = O_SEARCH | O_CLOEXEC; + int parent_fd = openat (cwd_fd, "..", open_flags); if (parent_fd < 0) { // Warn? @@ -1815,7 +1799,6 @@ fts_stat(FTS *sp, register FTSENT *p, bool follow) { struct stat *sbp = p->fts_statp; - int saved_errno; if (p->fts_level == FTS_ROOTLEVEL && ISSET(FTS_COMFOLLOW)) follow = true; @@ -1827,13 +1810,12 @@ */ if (ISSET(FTS_LOGICAL) || follow) { if (stat(p->fts_accpath, sbp)) { - saved_errno = errno; if (errno == ENOENT && lstat(p->fts_accpath, sbp) == 0) { __set_errno (0); return (FTS_SLNONE); } - p->fts_errno = saved_errno; + p->fts_errno = errno; goto err; } } else if (fstatat(sp->fts_cwd_fd, p->fts_accpath, sbp, @@ -1844,8 +1826,11 @@ } if (S_ISDIR(sbp->st_mode)) { - p->fts_n_dirs_remaining = (sbp->st_nlink - - (ISSET(FTS_SEEDOT) ? 0 : 2)); + p->fts_n_dirs_remaining + = ((sbp->st_nlink < MIN_DIR_NLINK + || p->fts_level <= FTS_ROOTLEVEL) + ? -1 + : sbp->st_nlink - (ISSET (FTS_SEEDOT) ? 0 : MIN_DIR_NLINK)); if (ISDOT(p->fts_name)) { /* Command-line "." and ".." are real directories. */ return (p->fts_level == FTS_ROOTLEVEL ? FTS_D : FTS_DOT); diff -Nru grep-3.1/lib/fts-cycle.c grep-3.3/lib/fts-cycle.c --- grep-3.1/lib/fts-cycle.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/lib/fts-cycle.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,6 +1,6 @@ /* Detect cycles in file tree walks. - Copyright (C) 2003-2006, 2009-2017 Free Software Foundation, Inc. + Copyright (C) 2003-2006, 2009-2018 Free Software Foundation, Inc. Written by Jim Meyering. @@ -15,7 +15,7 @@ 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 . */ + along with this program. If not, see . */ #include "cycle-check.h" #include "hash.h" diff -Nru grep-3.1/lib/fts_.h grep-3.3/lib/fts_.h --- grep-3.1/lib/fts_.h 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/lib/fts_.h 2018-12-15 18:14:26.000000000 +0000 @@ -1,6 +1,6 @@ /* Traverse a file hierarchy. - Copyright (C) 2004-2017 Free Software Foundation, Inc. + Copyright (C) 2004-2018 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 @@ -13,7 +13,7 @@ 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 . */ + along with this program. If not, see . */ /* * Copyright (c) 1989, 1993 @@ -149,16 +149,14 @@ dirent.d_type data. */ # define FTS_DEFER_STAT 0x0400 -# define FTS_NOATIME 0x0800 /* use O_NOATIME during traversal */ - /* Use this flag to disable stripping of trailing slashes from input path names during fts_open initialization. */ -# define FTS_VERBATIM 0x1000 +# define FTS_VERBATIM 0x0800 -# define FTS_OPTIONMASK 0x1fff /* valid user option mask */ +# define FTS_OPTIONMASK 0x0fff /* valid user option mask */ -# define FTS_NAMEONLY 0x2000 /* (private) child names only */ -# define FTS_STOP 0x4000 /* (private) unrecoverable error */ +# define FTS_NAMEONLY 0x1000 /* (private) child names only */ +# define FTS_STOP 0x2000 /* (private) unrecoverable error */ int fts_options; /* fts_open options, global flags */ /* Map a directory's device number to a boolean. The boolean is @@ -220,7 +218,11 @@ ptrdiff_t fts_level; /* depth (-1 to N) */ size_t fts_namelen; /* strlen(fts_name) */ - nlink_t fts_n_dirs_remaining; /* count down from st_nlink */ + + /* If not (nlink_t) -1, an upper bound on the number of + remaining subdirectories of interest. If this becomes + zero, some work can be avoided. */ + nlink_t fts_n_dirs_remaining; # define FTS_D 1 /* preorder directory */ # define FTS_DC 2 /* directory that causes cycles */ diff -Nru grep-3.1/lib/getcwd-lgpl.c grep-3.3/lib/getcwd-lgpl.c --- grep-3.1/lib/getcwd-lgpl.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/lib/getcwd-lgpl.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (C) 2011-2017 Free Software Foundation, Inc. +/* Copyright (C) 2011-2018 Free Software Foundation, Inc. This file is part of gnulib. This program is free software: you can redistribute it and/or modify @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ #include diff -Nru grep-3.1/lib/getdtablesize.c grep-3.3/lib/getdtablesize.c --- grep-3.1/lib/getdtablesize.c 2017-05-14 01:09:51.000000000 +0000 +++ grep-3.3/lib/getdtablesize.c 2018-06-24 23:16:49.000000000 +0000 @@ -1,5 +1,5 @@ -/* getdtablesize() function for platforms that don't have it. - Copyright (C) 2008-2017 Free Software Foundation, Inc. +/* getdtablesize() function: Return maximum possible file descriptor value + 1. + Copyright (C) 2008-2018 Free Software Foundation, Inc. Written by Bruno Haible , 2008. This program is free software: you can redistribute it and/or modify @@ -13,14 +13,14 @@ 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 . */ + along with this program. If not, see . */ #include /* Specification. */ #include -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +#if defined _WIN32 && ! defined __CYGWIN__ # include diff -Nru grep-3.1/lib/getopt1.c grep-3.3/lib/getopt1.c --- grep-3.1/lib/getopt1.c 2017-05-14 01:10:18.000000000 +0000 +++ grep-3.3/lib/getopt1.c 2018-01-07 00:08:02.000000000 +0000 @@ -1,5 +1,5 @@ /* getopt_long and getopt_long_only entry points for GNU getopt. - Copyright (C) 1987-2017 Free Software Foundation, Inc. + Copyright (C) 1987-2018 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. @@ -15,7 +15,7 @@ You should have received a copy of the GNU General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _LIBC # include diff -Nru grep-3.1/lib/getopt.c grep-3.3/lib/getopt.c --- grep-3.1/lib/getopt.c 2017-05-14 01:10:18.000000000 +0000 +++ grep-3.3/lib/getopt.c 2018-06-24 23:18:01.000000000 +0000 @@ -1,5 +1,5 @@ /* Getopt for GNU. - Copyright (C) 1987-2017 Free Software Foundation, Inc. + Copyright (C) 1987-2018 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. @@ -15,7 +15,7 @@ You should have received a copy of the GNU General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _LIBC # include @@ -46,7 +46,7 @@ /* When used standalone, flockfile and funlockfile might not be available. */ # if (!defined _POSIX_THREAD_SAFE_FUNCTIONS \ - || ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__)) + || (defined _WIN32 && ! defined __CYGWIN__)) # define flockfile(fp) /* nop */ # define funlockfile(fp) /* nop */ # endif diff -Nru grep-3.1/lib/getopt-cdefs.in.h grep-3.3/lib/getopt-cdefs.in.h --- grep-3.1/lib/getopt-cdefs.in.h 2017-05-14 01:10:17.000000000 +0000 +++ grep-3.3/lib/getopt-cdefs.in.h 2018-01-07 00:08:02.000000000 +0000 @@ -1,22 +1,22 @@ /* getopt-on-non-glibc compatibility macros. - Copyright (C) 1989-2017 Free Software Foundation, Inc. + Copyright (C) 1989-2018 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 + 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. - gnulib is distributed in the hope that it will be useful, but + 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 gnulib; if not, see - . */ + . */ #ifndef _GETOPT_CDEFS_H #define _GETOPT_CDEFS_H 1 diff -Nru grep-3.1/lib/getopt-core.h grep-3.3/lib/getopt-core.h --- grep-3.1/lib/getopt-core.h 2017-05-14 01:10:17.000000000 +0000 +++ grep-3.3/lib/getopt-core.h 2018-01-07 00:08:02.000000000 +0000 @@ -1,5 +1,5 @@ /* Declarations for getopt (basic, portable features only). - Copyright (C) 1989-2017 Free Software Foundation, Inc. + Copyright (C) 1989-2018 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. @@ -15,7 +15,7 @@ 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 diff -Nru grep-3.1/lib/getopt-ext.h grep-3.3/lib/getopt-ext.h --- grep-3.1/lib/getopt-ext.h 2017-05-14 01:10:17.000000000 +0000 +++ grep-3.3/lib/getopt-ext.h 2018-01-07 00:08:02.000000000 +0000 @@ -1,5 +1,5 @@ /* Declarations for getopt (GNU extensions). - Copyright (C) 1989-2017 Free Software Foundation, Inc. + Copyright (C) 1989-2018 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. @@ -15,7 +15,7 @@ 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 diff -Nru grep-3.1/lib/getopt.in.h grep-3.3/lib/getopt.in.h --- grep-3.1/lib/getopt.in.h 2017-05-14 01:10:18.000000000 +0000 +++ grep-3.3/lib/getopt.in.h 2018-01-07 00:08:02.000000000 +0000 @@ -1,22 +1,22 @@ /* Declarations for getopt. - Copyright (C) 1989-2017 Free Software Foundation, Inc. + Copyright (C) 1989-2018 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. - gnulib is free software; you can redistribute it and/or modify it + This file is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by 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 + 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 gnulib; if not, see . */ + License along with gnulib; if not, see . */ #ifndef _@GUARD_PREFIX@_GETOPT_H diff -Nru grep-3.1/lib/getopt_int.h grep-3.3/lib/getopt_int.h --- grep-3.1/lib/getopt_int.h 2017-05-14 01:10:18.000000000 +0000 +++ grep-3.3/lib/getopt_int.h 2018-01-07 00:08:02.000000000 +0000 @@ -1,5 +1,5 @@ /* Internal declarations for getopt. - Copyright (C) 1989-2017 Free Software Foundation, Inc. + Copyright (C) 1989-2018 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. @@ -15,7 +15,7 @@ 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 diff -Nru grep-3.1/lib/getopt-pfx-core.h grep-3.3/lib/getopt-pfx-core.h --- grep-3.1/lib/getopt-pfx-core.h 2017-06-21 16:11:23.000000000 +0000 +++ grep-3.3/lib/getopt-pfx-core.h 2018-01-07 00:08:02.000000000 +0000 @@ -1,22 +1,22 @@ /* getopt (basic, portable features) gnulib wrapper header. - Copyright (C) 1989-2017 Free Software Foundation, Inc. + Copyright (C) 1989-2018 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 + 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. - gnulib is distributed in the hope that it will be useful, but + 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 gnulib; if not, see - . */ + . */ #ifndef _GETOPT_PFX_CORE_H #define _GETOPT_PFX_CORE_H 1 diff -Nru grep-3.1/lib/getopt-pfx-ext.h grep-3.3/lib/getopt-pfx-ext.h --- grep-3.1/lib/getopt-pfx-ext.h 2017-06-21 16:11:23.000000000 +0000 +++ grep-3.3/lib/getopt-pfx-ext.h 2018-01-07 00:08:02.000000000 +0000 @@ -1,22 +1,22 @@ /* getopt (GNU extensions) gnulib wrapper header. - Copyright (C) 1989-2017 Free Software Foundation, Inc. + Copyright (C) 1989-2018 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 + 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. - gnulib is distributed in the hope that it will be useful, but + 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 gnulib; if not, see - . */ + . */ #ifndef _GETOPT_PFX_EXT_H #define _GETOPT_PFX_EXT_H 1 diff -Nru grep-3.1/lib/getpagesize.c grep-3.3/lib/getpagesize.c --- grep-3.1/lib/getpagesize.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/lib/getpagesize.c 2018-06-24 23:16:49.000000000 +0000 @@ -1,6 +1,6 @@ /* getpagesize emulation for systems where it cannot be done in a C macro. - Copyright (C) 2007, 2009-2017 Free Software Foundation, Inc. + Copyright (C) 2007, 2009-2018 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 @@ -13,7 +13,7 @@ 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 . */ + along with this program. If not, see . */ /* Written by Bruno Haible and Martin Lambers. */ @@ -23,7 +23,7 @@ #include /* This implementation is only for native Windows systems. */ -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +#if defined _WIN32 && ! defined __CYGWIN__ # define WIN32_LEAN_AND_MEAN # include diff -Nru grep-3.1/lib/getprogname.c grep-3.3/lib/getprogname.c --- grep-3.1/lib/getprogname.c 2017-01-16 17:29:13.000000000 +0000 +++ grep-3.3/lib/getprogname.c 2018-10-16 23:22:22.000000000 +0000 @@ -1,5 +1,5 @@ /* Program name management. - Copyright (C) 2016-2017 Free Software Foundation, Inc. + Copyright (C) 2016-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ #include @@ -64,7 +64,7 @@ /* 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 */ + /* https://docs.oracle.com/cd/E19253-01/816-5168/6mbb3hrb1/index.html */ const char *p = getexecname (); if (!p) p = "?"; @@ -74,7 +74,7 @@ const char *p = __argv && __argv[0] ? __argv[0] : "?"; return last_component (p); # elif HAVE_VAR___PROGNAME /* OpenBSD, QNX */ - /* http://man.openbsd.org/style.9 */ + /* https://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, @@ -85,9 +85,8 @@ 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 + https://lists.gnu.org/r/bug-gnulib/2010-12/msg00095.html + Reference: https://www.ibm.com/support/knowledgecenter/en/ssw_aix_61/com.ibm.aix.basetrf1/getprocs.htm */ static char *p; static int first = 1; @@ -111,9 +110,73 @@ 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 (pstat_getproc (&status, sizeof status, 0, pid) > 0) + { + char *ucomm = status.pst_ucomm; + char *cmd = status.pst_cmd; + if (strlen (ucomm) < PST_UCOMMLEN - 1) + p = ucomm; + else + { + /* ucomm is truncated to length PST_UCOMMLEN - 1. + Look at cmd instead. */ + char *space = strchr (cmd, ' '); + if (space != NULL) + *space = '\0'; + p = strrchr (cmd, '/'); + if (p != NULL) + p++; + else + p = cmd; + if (strlen (p) > PST_UCOMMLEN - 1 + && memcmp (p, ucomm, PST_UCOMMLEN - 1) == 0) + /* p is less truncated than ucomm. */ + ; + else + p = ucomm; + } + p = strdup (p); + } + else + { +# if !defined __LP64__ + /* Support for 32-bit programs running in 64-bit HP-UX. + The documented way to do this is to use the same source code + as above, but in a compilation unit where '#define _PSTAT64 1' + is in effect. I prefer a single compilation unit; the struct + size and the offsets are not going to change. */ + char status64[1216]; + if (__pstat_getproc64 (status64, sizeof status64, 0, pid) > 0) + { + char *ucomm = status64 + 288; + char *cmd = status64 + 168; + if (strlen (ucomm) < PST_UCOMMLEN - 1) + p = ucomm; + else + { + /* ucomm is truncated to length PST_UCOMMLEN - 1. + Look at cmd instead. */ + char *space = strchr (cmd, ' '); + if (space != NULL) + *space = '\0'; + p = strrchr (cmd, '/'); + if (p != NULL) + p++; + else + p = cmd; + if (strlen (p) > PST_UCOMMLEN - 1 + && memcmp (p, ucomm, PST_UCOMMLEN - 1) == 0) + /* p is less truncated than ucomm. */ + ; + else + p = ucomm; + } + p = strdup (p); + } + else +# endif + p = NULL; + } if (!p) p = "?"; } @@ -165,7 +228,7 @@ if (ioctl_ok) { char *name = buf.pr_fname; - char *namesize = sizeof buf.pr_fname; + size_t namesize = sizeof buf.pr_fname; char *namenul = memchr (name, '\0', namesize); size_t namelen = namenul ? namenul - name : namesize; char *namecopy = malloc (namelen + 1); @@ -183,3 +246,10 @@ } #endif + +/* + * Hey Emacs! + * Local Variables: + * coding: utf-8 + * End: + */ diff -Nru grep-3.1/lib/getprogname.h grep-3.3/lib/getprogname.h --- grep-3.1/lib/getprogname.h 2017-01-01 11:25:47.000000000 +0000 +++ grep-3.3/lib/getprogname.h 2018-01-07 00:08:02.000000000 +0000 @@ -1,5 +1,5 @@ /* Program name management. - Copyright (C) 2016-2017 Free Software Foundation, Inc. + Copyright (C) 2016-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ #ifndef _GL_GETPROGNAME_H #define _GL_GETPROGNAME_H diff -Nru grep-3.1/lib/gettext.h grep-3.3/lib/gettext.h --- grep-3.1/lib/gettext.h 2017-06-21 16:11:23.000000000 +0000 +++ grep-3.3/lib/gettext.h 2018-12-21 03:32:18.000000000 +0000 @@ -1,5 +1,5 @@ /* Convenience header for conditional use of GNU . - Copyright (C) 1995-1998, 2000-2002, 2004-2006, 2009-2017 Free Software + Copyright (C) 1995-1998, 2000-2002, 2004-2006, 2009-2018 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify @@ -13,7 +13,7 @@ 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 . */ + with this program; if not, see . */ #ifndef _LIBGETTEXT_H #define _LIBGETTEXT_H 1 @@ -185,7 +185,7 @@ #include #if (((__GNUC__ >= 3 || __GNUG__ >= 2) && !defined __STRICT_ANSI__) \ - /* || __STDC_VERSION__ == 199901L + /* || (__STDC_VERSION__ == 199901L && !defined __HP_cc) || (__STDC_VERSION__ >= 201112L && !defined __STDC_NO_VLA__) */ ) # define _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS 1 #else diff -Nru grep-3.1/lib/glthread/lock.c grep-3.3/lib/glthread/lock.c --- grep-3.1/lib/glthread/lock.c 2017-03-17 04:34:47.000000000 +0000 +++ grep-3.3/lib/glthread/lock.c 2018-01-07 00:08:02.000000000 +0000 @@ -1,5 +1,5 @@ /* Locking in multithreaded situations. - Copyright (C) 2005-2017 Free Software Foundation, Inc. + Copyright (C) 2005-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program; if not, see . */ /* Written by Bruno Haible , 2005. Based on GCC's gthr-posix.h, gthr-posix95.h, gthr-solaris.h, diff -Nru grep-3.1/lib/glthread/lock.h grep-3.3/lib/glthread/lock.h --- grep-3.1/lib/glthread/lock.h 2017-03-22 03:20:24.000000000 +0000 +++ grep-3.3/lib/glthread/lock.h 2018-06-24 23:18:01.000000000 +0000 @@ -1,5 +1,5 @@ /* Locking in multithreaded situations. - Copyright (C) 2005-2017 Free Software Foundation, Inc. + Copyright (C) 2005-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program; if not, see . */ /* Written by Bruno Haible , 2005. Based on GCC's gthr-posix.h, gthr-posix95.h, gthr-solaris.h, @@ -149,8 +149,14 @@ # endif # if !PTHREAD_IN_USE_DETECTION_HARD -# pragma weak pthread_cancel -# define pthread_in_use() (pthread_cancel != NULL) + /* Considering all platforms with USE_POSIX_THREADS_WEAK, only few symbols + can be used to determine whether libpthread is in use. These are: + pthread_mutexattr_gettype + pthread_rwlockattr_destroy + pthread_rwlockattr_init + */ +# pragma weak pthread_mutexattr_gettype +# define pthread_in_use() (pthread_mutexattr_gettype != NULL) # endif # else diff -Nru grep-3.1/lib/glthread/threadlib.c grep-3.3/lib/glthread/threadlib.c --- grep-3.1/lib/glthread/threadlib.c 2017-01-01 11:25:47.000000000 +0000 +++ grep-3.3/lib/glthread/threadlib.c 2018-01-07 00:08:02.000000000 +0000 @@ -1,5 +1,5 @@ /* Multithreading primitives. - Copyright (C) 2005-2017 Free Software Foundation, Inc. + Copyright (C) 2005-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program; if not, see . */ /* Written by Bruno Haible , 2005. */ diff -Nru grep-3.1/lib/gnulib.mk grep-3.3/lib/gnulib.mk --- grep-3.1/lib/gnulib.mk 2017-05-21 00:32:55.000000000 +0000 +++ grep-3.3/lib/gnulib.mk 2018-12-21 02:52:50.000000000 +0000 @@ -1,6 +1,6 @@ ## DO NOT EDIT! GENERATED AUTOMATICALLY! ## Process this file with automake to produce Makefile.in. -# Copyright (C) 2002-2017 Free Software Foundation, Inc. +# Copyright (C) 2002-2018 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 @@ -13,7 +13,7 @@ # 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 . +# 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 @@ -21,7 +21,98 @@ # the same distribution terms as the rest of that program. # # Generated by gnulib-tool. -# Reproduce by: gnulib-tool --import --local-dir=gl --lib=libgreputils --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=gnulib-tests --aux-dir=build-aux --with-tests --avoid=lock-tests --avoid=mbrtowc-tests --avoid=update-copyright-tests --makefile-name=gnulib.mk --no-conditional-dependencies --no-libtool --macro-prefix=gl alloca announce-gen argmatch c-ctype closeout dfa do-release-commit-and-tag error exclude fcntl-h fdl fnmatch fstatat fts getopt-gnu getpagesize getprogname gettext-h git-version-gen gitlog-to-changelog gnu-web-doc-update gnupload ignore-value intprops inttypes isatty isblank iswctype largefile locale lseek maintainer-makefile malloc-gnu manywarnings mbrlen mbrtowc memchr memchr2 mempcpy minmax obstack openat-safer perl propername quote readme-release realloc-gnu regex safe-read same-inode ssize_t stddef stdlib stpcpy strerror string strstr strtoull strtoumax sys_stat unistd unlocked-io update-copyright useless-if-before-free verify version-etc-fsf wchar wcrtomb wctob wctype-h xalloc xbinary-io xstrtoimax +# Reproduce by: +# gnulib-tool --import --local-dir=gl \ +# --lib=libgreputils \ +# --source-base=lib \ +# --m4-base=m4 \ +# --doc-base=doc \ +# --tests-base=gnulib-tests \ +# --aux-dir=build-aux \ +# --with-tests \ +# --makefile-name=gnulib.mk \ +# --no-conditional-dependencies \ +# --no-libtool \ +# --macro-prefix=gl \ +# --avoid=lock-tests \ +# --avoid=mbrtowc-tests \ +# --avoid=update-copyright-tests \ +# alloca \ +# announce-gen \ +# argmatch \ +# c-ctype \ +# c-stack \ +# closeout \ +# configmake \ +# dfa \ +# do-release-commit-and-tag \ +# error \ +# exclude \ +# fcntl-h \ +# fdl \ +# fnmatch \ +# fstatat \ +# fts \ +# getopt-gnu \ +# getpagesize \ +# getprogname \ +# gettext-h \ +# git-version-gen \ +# gitlog-to-changelog \ +# gnu-web-doc-update \ +# gnupload \ +# ignore-value \ +# intprops \ +# inttypes \ +# isatty \ +# isblank \ +# iswctype \ +# largefile \ +# locale \ +# lseek \ +# maintainer-makefile \ +# malloc-gnu \ +# manywarnings \ +# mbrlen \ +# mbrtowc \ +# memchr \ +# memchr2 \ +# mempcpy \ +# minmax \ +# obstack \ +# openat-safer \ +# perl \ +# propername \ +# quote \ +# readme-release \ +# realloc-gnu \ +# regex \ +# safe-read \ +# same-inode \ +# ssize_t \ +# stddef \ +# stdlib \ +# stpcpy \ +# strerror \ +# string \ +# strstr \ +# strtoull \ +# strtoumax \ +# sys_stat \ +# unistd \ +# unlocked-io \ +# update-copyright \ +# useless-if-before-free \ +# verify \ +# version-etc-fsf \ +# wchar \ +# wcrtomb \ +# wctob \ +# wctype-h \ +# windows-stat-inodes \ +# xalloc \ +# xbinary-io \ +# xstrtoimax MOSTLYCLEANFILES += core *.stackdump @@ -142,6 +233,12 @@ ## end gnulib module c-ctype +## begin gnulib module c-stack + +libgreputils_a_SOURCES += c-stack.h c-stack.c + +## end gnulib module c-stack + ## begin gnulib module c-strcase libgreputils_a_SOURCES += c-strcase.h c-strcasecmp.c c-strncasecmp.c @@ -349,14 +446,6 @@ ## end gnulib module dirent -## begin gnulib module dirent-safer - -libgreputils_a_SOURCES += opendir-safer.c - -EXTRA_DIST += dirent--.h dirent-safer.h - -## end gnulib module dirent-safer - ## begin gnulib module dirfd @@ -534,6 +623,12 @@ ## end gnulib module fd-hook +## begin gnulib module fd-safer-flag + +libgreputils_a_SOURCES += fd-safer-flag.c dup-safer-flag.c + +## end gnulib module fd-safer-flag + ## begin gnulib module fdopendir @@ -567,29 +662,46 @@ ## begin gnulib module fnmatch + +EXTRA_DIST += fnmatch.c fnmatch_loop.c + +EXTRA_libgreputils_a_SOURCES += fnmatch.c fnmatch_loop.c + +## end gnulib module fnmatch + +## begin gnulib module fnmatch-h + BUILT_SOURCES += $(FNMATCH_H) -# We need the following in order to create when the system -# doesn't have one that supports the required API. +# We need the following in order to create . if GL_GENERATE_FNMATCH_H -fnmatch.h: fnmatch.in.h $(top_builddir)/config.status $(ARG_NONNULL_H) +fnmatch.h: fnmatch.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - sed -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ + sed -e 's|@''GUARD_PREFIX''@|GL|g' \ + -e 's|@''HAVE_FNMATCH_H''@|$(HAVE_FNMATCH_H)|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_FNMATCH_H''@|$(NEXT_FNMATCH_H)|g' \ + -e 's/@''GNULIB_FNMATCH''@/$(GNULIB_FNMATCH)/g' \ + -e 's|@''HAVE_FNMATCH''@|$(HAVE_FNMATCH)|g' \ + -e 's|@''REPLACE_FNMATCH''@|$(REPLACE_FNMATCH)|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)' \ < $(srcdir)/fnmatch.in.h; \ } > $@-t && \ - mv -f $@-t $@ + mv $@-t $@ else fnmatch.h: $(top_builddir)/config.status rm -f $@ endif MOSTLYCLEANFILES += fnmatch.h fnmatch.h-t -EXTRA_DIST += fnmatch.c fnmatch.in.h fnmatch_loop.c +EXTRA_DIST += fnmatch.in.h -EXTRA_libgreputils_a_SOURCES += fnmatch.c fnmatch_loop.c - -## end gnulib module fnmatch +## end gnulib module fnmatch-h ## begin gnulib module fpending @@ -658,7 +770,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 +getopt.h: getopt.in.h $(top_builddir)/config.status $(ARG_NONNULL_H) $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e 's|@''GUARD_PREFIX''@|GL|g' \ @@ -824,19 +936,19 @@ ## begin gnulib module iconv_open -iconv_open-aix.h: iconv_open-aix.gperf +$(srcdir)/iconv_open-aix.h: $(srcdir)/iconv_open-aix.gperf $(V_GPERF)$(GPERF) -m 10 $(srcdir)/iconv_open-aix.gperf > $(srcdir)/iconv_open-aix.h-t && \ mv $(srcdir)/iconv_open-aix.h-t $(srcdir)/iconv_open-aix.h -iconv_open-hpux.h: iconv_open-hpux.gperf +$(srcdir)/iconv_open-hpux.h: $(srcdir)/iconv_open-hpux.gperf $(V_GPERF)$(GPERF) -m 10 $(srcdir)/iconv_open-hpux.gperf > $(srcdir)/iconv_open-hpux.h-t && \ mv $(srcdir)/iconv_open-hpux.h-t $(srcdir)/iconv_open-hpux.h -iconv_open-irix.h: iconv_open-irix.gperf +$(srcdir)/iconv_open-irix.h: $(srcdir)/iconv_open-irix.gperf $(V_GPERF)$(GPERF) -m 10 $(srcdir)/iconv_open-irix.gperf > $(srcdir)/iconv_open-irix.h-t && \ mv $(srcdir)/iconv_open-irix.h-t $(srcdir)/iconv_open-irix.h -iconv_open-osf.h: iconv_open-osf.gperf +$(srcdir)/iconv_open-osf.h: $(srcdir)/iconv_open-osf.gperf $(V_GPERF)$(GPERF) -m 10 $(srcdir)/iconv_open-osf.gperf > $(srcdir)/iconv_open-osf.h-t && \ mv $(srcdir)/iconv_open-osf.h-t $(srcdir)/iconv_open-osf.h -iconv_open-solaris.h: iconv_open-solaris.gperf +$(srcdir)/iconv_open-solaris.h: $(srcdir)/iconv_open-solaris.gperf $(V_GPERF)$(GPERF) -m 10 $(srcdir)/iconv_open-solaris.gperf > $(srcdir)/iconv_open-solaris.h-t && \ mv $(srcdir)/iconv_open-solaris.h-t $(srcdir)/iconv_open-solaris.h BUILT_SOURCES += iconv_open-aix.h iconv_open-hpux.h iconv_open-irix.h iconv_open-osf.h iconv_open-solaris.h @@ -891,6 +1003,7 @@ -e 's/@''HAVE_DECL_IMAXDIV''@/$(HAVE_DECL_IMAXDIV)/g' \ -e 's/@''HAVE_DECL_STRTOIMAX''@/$(HAVE_DECL_STRTOIMAX)/g' \ -e 's/@''HAVE_DECL_STRTOUMAX''@/$(HAVE_DECL_STRTOUMAX)/g' \ + -e 's/@''HAVE_IMAXDIV_T''@/$(HAVE_IMAXDIV_T)/g' \ -e 's/@''REPLACE_STRTOIMAX''@/$(REPLACE_STRTOIMAX)/g' \ -e 's/@''REPLACE_STRTOUMAX''@/$(REPLACE_STRTOUMAX)/g' \ -e 's/@''INT32_MAX_LT_INTMAX_MAX''@/$(INT32_MAX_LT_INTMAX_MAX)/g' \ @@ -963,6 +1076,7 @@ -e 's/@''GNULIB_NL_LANGINFO''@/$(GNULIB_NL_LANGINFO)/g' \ -e 's|@''HAVE_LANGINFO_CODESET''@|$(HAVE_LANGINFO_CODESET)|g' \ -e 's|@''HAVE_LANGINFO_T_FMT_AMPM''@|$(HAVE_LANGINFO_T_FMT_AMPM)|g' \ + -e 's|@''HAVE_LANGINFO_ALTMON''@|$(HAVE_LANGINFO_ALTMON)|g' \ -e 's|@''HAVE_LANGINFO_ERA''@|$(HAVE_LANGINFO_ERA)|g' \ -e 's|@''HAVE_LANGINFO_YESEXPR''@|$(HAVE_LANGINFO_YESEXPR)|g' \ -e 's|@''HAVE_NL_LANGINFO''@|$(HAVE_NL_LANGINFO)|g' \ @@ -978,6 +1092,13 @@ ## end gnulib module langinfo +## begin gnulib module libc-config + + +EXTRA_DIST += cdefs.h libc-config.h + +## end gnulib module libc-config + ## begin gnulib module limits-h BUILT_SOURCES += $(LIMITS_H) @@ -1008,75 +1129,9 @@ ## begin gnulib module localcharset -libgreputils_a_SOURCES += localcharset.h localcharset.c - -# 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 -# is not used by another installed package. -# On systems with glibc-2.1 or newer, the file is redundant, therefore we -# avoid installing it. - -all-local: charset.alias ref-add.sed ref-del.sed - -charset_alias = $(DESTDIR)$(libdir)/charset.alias -charset_tmp = $(DESTDIR)$(libdir)/charset.tmp -install-exec-local: install-exec-localcharset -install-exec-localcharset: all-local - if test $(GLIBC21) = no; then \ - case '$(host_os)' in \ - darwin[56]*) \ - need_charset_alias=true ;; \ - darwin* | cygwin* | mingw* | pw32* | cegcc*) \ - need_charset_alias=false ;; \ - *) \ - need_charset_alias=true ;; \ - esac ; \ - else \ - need_charset_alias=false ; \ - fi ; \ - if $$need_charset_alias; then \ - $(mkinstalldirs) $(DESTDIR)$(libdir) ; \ - fi ; \ - if test -f $(charset_alias); then \ - sed -f ref-add.sed $(charset_alias) > $(charset_tmp) ; \ - $(INSTALL_DATA) $(charset_tmp) $(charset_alias) ; \ - rm -f $(charset_tmp) ; \ - else \ - if $$need_charset_alias; then \ - sed -f ref-add.sed charset.alias > $(charset_tmp) ; \ - $(INSTALL_DATA) $(charset_tmp) $(charset_alias) ; \ - rm -f $(charset_tmp) ; \ - fi ; \ - fi - -uninstall-local: uninstall-localcharset -uninstall-localcharset: all-local - if test -f $(charset_alias); then \ - sed -f ref-del.sed $(charset_alias) > $(charset_tmp); \ - if grep '^# Packages using this file: $$' $(charset_tmp) \ - > /dev/null; then \ - rm -f $(charset_alias); \ - else \ - $(INSTALL_DATA) $(charset_tmp) $(charset_alias); \ - fi; \ - rm -f $(charset_tmp); \ - fi - -charset.alias: config.charset - $(AM_V_GEN)rm -f t-$@ $@ && \ - $(SHELL) $(srcdir)/config.charset '$(host)' > t-$@ && \ - mv t-$@ $@ - -SUFFIXES += .sed .sin -.sin.sed: - $(AM_V_GEN)rm -f t-$@ $@ && \ - sed -e '/^#/d' -e 's/@''PACKAGE''@/$(PACKAGE)/g' $< > t-$@ && \ - mv t-$@ $@ +libgreputils_a_SOURCES += localcharset.c -CLEANFILES += charset.alias ref-add.sed ref-del.sed - -EXTRA_DIST += config.charset ref-add.sin ref-del.sin +EXTRA_DIST += localcharset.h ## end gnulib module localcharset @@ -1097,11 +1152,16 @@ -e 's/@''GNULIB_LOCALECONV''@/$(GNULIB_LOCALECONV)/g' \ -e 's/@''GNULIB_SETLOCALE''@/$(GNULIB_SETLOCALE)/g' \ -e 's/@''GNULIB_DUPLOCALE''@/$(GNULIB_DUPLOCALE)/g' \ + -e 's/@''GNULIB_LOCALENAME''@/$(GNULIB_LOCALENAME)/g' \ + -e 's|@''HAVE_NEWLOCALE''@|$(HAVE_NEWLOCALE)|g' \ -e 's|@''HAVE_DUPLOCALE''@|$(HAVE_DUPLOCALE)|g' \ + -e 's|@''HAVE_FREELOCALE''@|$(HAVE_FREELOCALE)|g' \ -e 's|@''HAVE_XLOCALE_H''@|$(HAVE_XLOCALE_H)|g' \ -e 's|@''REPLACE_LOCALECONV''@|$(REPLACE_LOCALECONV)|g' \ -e 's|@''REPLACE_SETLOCALE''@|$(REPLACE_SETLOCALE)|g' \ + -e 's|@''REPLACE_NEWLOCALE''@|$(REPLACE_NEWLOCALE)|g' \ -e 's|@''REPLACE_DUPLOCALE''@|$(REPLACE_DUPLOCALE)|g' \ + -e 's|@''REPLACE_FREELOCALE''@|$(REPLACE_FREELOCALE)|g' \ -e 's|@''REPLACE_STRUCT_LCONV''@|$(REPLACE_STRUCT_LCONV)|g' \ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ @@ -1176,7 +1236,7 @@ libgreputils_a_SOURCES += malloca.c -EXTRA_DIST += malloca.h malloca.valgrind +EXTRA_DIST += malloca.h ## end gnulib module malloca @@ -1390,6 +1450,14 @@ ## end gnulib module opendir +## begin gnulib module opendirat + +libgreputils_a_SOURCES += opendirat.c + +EXTRA_DIST += opendirat.h + +## end gnulib module opendirat + ## begin gnulib module pathmax @@ -1418,6 +1486,15 @@ ## end gnulib module quotearg +## begin gnulib module raise + + +EXTRA_DIST += raise.c + +EXTRA_libgreputils_a_SOURCES += raise.c + +## end gnulib module raise + ## begin gnulib module read @@ -1467,7 +1544,7 @@ libgreputils_a_SOURCES += safe-read.c -EXTRA_DIST += safe-read.h +EXTRA_DIST += safe-read.h sys-limits.h ## end gnulib module safe-read @@ -1486,6 +1563,67 @@ ## end gnulib module save-cwd +## begin gnulib module sigaction + +libgreputils_a_SOURCES += sig-handler.c + +EXTRA_DIST += sig-handler.h sigaction.c + +EXTRA_libgreputils_a_SOURCES += sigaction.c + +## end gnulib module sigaction + +## begin gnulib module signal-h + +BUILT_SOURCES += signal.h + +# We need the following in order to create when the system +# doesn't have a complete one. +signal.h: signal.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) + $(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_SIGNAL_H''@|$(NEXT_SIGNAL_H)|g' \ + -e 's/@''GNULIB_PTHREAD_SIGMASK''@/$(GNULIB_PTHREAD_SIGMASK)/g' \ + -e 's/@''GNULIB_RAISE''@/$(GNULIB_RAISE)/g' \ + -e 's/@''GNULIB_SIGNAL_H_SIGPIPE''@/$(GNULIB_SIGNAL_H_SIGPIPE)/g' \ + -e 's/@''GNULIB_SIGPROCMASK''@/$(GNULIB_SIGPROCMASK)/g' \ + -e 's/@''GNULIB_SIGACTION''@/$(GNULIB_SIGACTION)/g' \ + -e 's|@''HAVE_POSIX_SIGNALBLOCKING''@|$(HAVE_POSIX_SIGNALBLOCKING)|g' \ + -e 's|@''HAVE_PTHREAD_SIGMASK''@|$(HAVE_PTHREAD_SIGMASK)|g' \ + -e 's|@''HAVE_RAISE''@|$(HAVE_RAISE)|g' \ + -e 's|@''HAVE_SIGSET_T''@|$(HAVE_SIGSET_T)|g' \ + -e 's|@''HAVE_SIGINFO_T''@|$(HAVE_SIGINFO_T)|g' \ + -e 's|@''HAVE_SIGACTION''@|$(HAVE_SIGACTION)|g' \ + -e 's|@''HAVE_STRUCT_SIGACTION_SA_SIGACTION''@|$(HAVE_STRUCT_SIGACTION_SA_SIGACTION)|g' \ + -e 's|@''HAVE_TYPE_VOLATILE_SIG_ATOMIC_T''@|$(HAVE_TYPE_VOLATILE_SIG_ATOMIC_T)|g' \ + -e 's|@''HAVE_SIGHANDLER_T''@|$(HAVE_SIGHANDLER_T)|g' \ + -e 's|@''REPLACE_PTHREAD_SIGMASK''@|$(REPLACE_PTHREAD_SIGMASK)|g' \ + -e 's|@''REPLACE_RAISE''@|$(REPLACE_RAISE)|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)' \ + < $(srcdir)/signal.in.h; \ + } > $@-t && \ + mv $@-t $@ +MOSTLYCLEANFILES += signal.h signal.h-t + +EXTRA_DIST += signal.in.h + +## end gnulib module signal-h + +## begin gnulib module sigprocmask + + +EXTRA_DIST += sigprocmask.c + +EXTRA_libgreputils_a_SOURCES += sigprocmask.c + +## end gnulib module sigprocmask + ## begin gnulib module snippet/_Noreturn # Because this Makefile snippet defines a variable used by other @@ -1555,6 +1693,14 @@ ## end gnulib module stat +## begin gnulib module stat-time + +libgreputils_a_SOURCES += stat-time.c + +EXTRA_DIST += stat-time.h + +## end gnulib module stat-time + ## begin gnulib module stdalign BUILT_SOURCES += $(STDALIGN_H) @@ -1877,6 +2023,7 @@ -e 's/@''GNULIB_RANDOM''@/$(GNULIB_RANDOM)/g' \ -e 's/@''GNULIB_RANDOM_R''@/$(GNULIB_RANDOM_R)/g' \ -e 's/@''GNULIB_REALLOC_POSIX''@/$(GNULIB_REALLOC_POSIX)/g' \ + -e 's/@''GNULIB_REALLOCARRAY''@/$(GNULIB_REALLOCARRAY)/g' \ -e 's/@''GNULIB_REALPATH''@/$(GNULIB_REALPATH)/g' \ -e 's/@''GNULIB_RPMATCH''@/$(GNULIB_RPMATCH)/g' \ -e 's/@''GNULIB_SECURE_GETENV''@/$(GNULIB_SECURE_GETENV)/g' \ @@ -1895,6 +2042,7 @@ -e 's|@''HAVE_DECL_GETLOADAVG''@|$(HAVE_DECL_GETLOADAVG)|g' \ -e 's|@''HAVE_GETSUBOPT''@|$(HAVE_GETSUBOPT)|g' \ -e 's|@''HAVE_GRANTPT''@|$(HAVE_GRANTPT)|g' \ + -e 's|@''HAVE_DECL_INITSTATE''@|$(HAVE_DECL_INITSTATE)|g' \ -e 's|@''HAVE_MKDTEMP''@|$(HAVE_MKDTEMP)|g' \ -e 's|@''HAVE_MKOSTEMP''@|$(HAVE_MKOSTEMP)|g' \ -e 's|@''HAVE_MKOSTEMPS''@|$(HAVE_MKOSTEMPS)|g' \ @@ -1907,10 +2055,12 @@ -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' \ + -e 's|@''HAVE_REALLOCARRAY''@|$(HAVE_REALLOCARRAY)|g' \ -e 's|@''HAVE_REALPATH''@|$(HAVE_REALPATH)|g' \ -e 's|@''HAVE_RPMATCH''@|$(HAVE_RPMATCH)|g' \ -e 's|@''HAVE_SECURE_GETENV''@|$(HAVE_SECURE_GETENV)|g' \ -e 's|@''HAVE_DECL_SETENV''@|$(HAVE_DECL_SETENV)|g' \ + -e 's|@''HAVE_DECL_SETSTATE''@|$(HAVE_DECL_SETSTATE)|g' \ -e 's|@''HAVE_STRTOD''@|$(HAVE_STRTOD)|g' \ -e 's|@''HAVE_STRTOLL''@|$(HAVE_STRTOLL)|g' \ -e 's|@''HAVE_STRTOULL''@|$(HAVE_STRTOULL)|g' \ @@ -2011,6 +2161,7 @@ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_STRING_H''@|$(NEXT_STRING_H)|g' \ + -e 's/@''GNULIB_EXPLICIT_BZERO''@/$(GNULIB_EXPLICIT_BZERO)/g' \ -e 's/@''GNULIB_FFSL''@/$(GNULIB_FFSL)/g' \ -e 's/@''GNULIB_FFSLL''@/$(GNULIB_FFSLL)/g' \ -e 's/@''GNULIB_MBSLEN''@/$(GNULIB_MBSLEN)/g' \ @@ -2049,7 +2200,8 @@ -e 's/@''GNULIB_STRSIGNAL''@/$(GNULIB_STRSIGNAL)/g' \ -e 's/@''GNULIB_STRVERSCMP''@/$(GNULIB_STRVERSCMP)/g' \ < $(srcdir)/string.in.h | \ - sed -e 's|@''HAVE_FFSL''@|$(HAVE_FFSL)|g' \ + sed -e 's|@''HAVE_EXPLICIT_BZERO''@|$(HAVE_EXPLICIT_BZERO)|g' \ + -e 's|@''HAVE_FFSL''@|$(HAVE_FFSL)|g' \ -e 's|@''HAVE_FFSLL''@|$(HAVE_FFSLL)|g' \ -e 's|@''HAVE_MBSLEN''@|$(HAVE_MBSLEN)|g' \ -e 's|@''HAVE_MEMCHR''@|$(HAVE_MEMCHR)|g' \ @@ -2070,20 +2222,20 @@ -e 's|@''HAVE_DECL_STRERROR_R''@|$(HAVE_DECL_STRERROR_R)|g' \ -e 's|@''HAVE_DECL_STRSIGNAL''@|$(HAVE_DECL_STRSIGNAL)|g' \ -e 's|@''HAVE_STRVERSCMP''@|$(HAVE_STRVERSCMP)|g' \ - -e 's|@''REPLACE_STPNCPY''@|$(REPLACE_STPNCPY)|g' \ -e 's|@''REPLACE_MEMCHR''@|$(REPLACE_MEMCHR)|g' \ -e 's|@''REPLACE_MEMMEM''@|$(REPLACE_MEMMEM)|g' \ - -e 's|@''REPLACE_STRCASESTR''@|$(REPLACE_STRCASESTR)|g' \ + -e 's|@''REPLACE_STPNCPY''@|$(REPLACE_STPNCPY)|g' \ -e 's|@''REPLACE_STRCHRNUL''@|$(REPLACE_STRCHRNUL)|g' \ -e 's|@''REPLACE_STRDUP''@|$(REPLACE_STRDUP)|g' \ - -e 's|@''REPLACE_STRSTR''@|$(REPLACE_STRSTR)|g' \ - -e 's|@''REPLACE_STRERROR''@|$(REPLACE_STRERROR)|g' \ - -e 's|@''REPLACE_STRERROR_R''@|$(REPLACE_STRERROR_R)|g' \ -e 's|@''REPLACE_STRNCAT''@|$(REPLACE_STRNCAT)|g' \ -e 's|@''REPLACE_STRNDUP''@|$(REPLACE_STRNDUP)|g' \ -e 's|@''REPLACE_STRNLEN''@|$(REPLACE_STRNLEN)|g' \ - -e 's|@''REPLACE_STRSIGNAL''@|$(REPLACE_STRSIGNAL)|g' \ + -e 's|@''REPLACE_STRSTR''@|$(REPLACE_STRSTR)|g' \ + -e 's|@''REPLACE_STRCASESTR''@|$(REPLACE_STRCASESTR)|g' \ -e 's|@''REPLACE_STRTOK_R''@|$(REPLACE_STRTOK_R)|g' \ + -e 's|@''REPLACE_STRERROR''@|$(REPLACE_STRERROR)|g' \ + -e 's|@''REPLACE_STRERROR_R''@|$(REPLACE_STRERROR_R)|g' \ + -e 's|@''REPLACE_STRSIGNAL''@|$(REPLACE_STRSIGNAL)|g' \ -e 's|@''UNDEFINE_STRTOK_R''@|$(UNDEFINE_STRTOK_R)|g' \ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ @@ -2357,6 +2509,7 @@ -e 's/@''GNULIB_GETLOGIN''@/$(GNULIB_GETLOGIN)/g' \ -e 's/@''GNULIB_GETLOGIN_R''@/$(GNULIB_GETLOGIN_R)/g' \ -e 's/@''GNULIB_GETPAGESIZE''@/$(GNULIB_GETPAGESIZE)/g' \ + -e 's/@''GNULIB_GETPASS''@/$(GNULIB_GETPASS)/g' \ -e 's/@''GNULIB_GETUSERSHELL''@/$(GNULIB_GETUSERSHELL)/g' \ -e 's/@''GNULIB_GROUP_MEMBER''@/$(GNULIB_GROUP_MEMBER)/g' \ -e 's/@''GNULIB_ISATTY''@/$(GNULIB_ISATTY)/g' \ @@ -2400,6 +2553,7 @@ -e 's|@''HAVE_GETGROUPS''@|$(HAVE_GETGROUPS)|g' \ -e 's|@''HAVE_GETHOSTNAME''@|$(HAVE_GETHOSTNAME)|g' \ -e 's|@''HAVE_GETPAGESIZE''@|$(HAVE_GETPAGESIZE)|g' \ + -e 's|@''HAVE_GETPASS''@|$(HAVE_GETPASS)|g' \ -e 's|@''HAVE_GROUP_MEMBER''@|$(HAVE_GROUP_MEMBER)|g' \ -e 's|@''HAVE_LCHOWN''@|$(HAVE_LCHOWN)|g' \ -e 's|@''HAVE_LINK''@|$(HAVE_LINK)|g' \ @@ -2414,7 +2568,6 @@ -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' \ @@ -2426,6 +2579,7 @@ -e 's|@''HAVE_DECL_GETPAGESIZE''@|$(HAVE_DECL_GETPAGESIZE)|g' \ -e 's|@''HAVE_DECL_GETUSERSHELL''@|$(HAVE_DECL_GETUSERSHELL)|g' \ -e 's|@''HAVE_DECL_SETHOSTNAME''@|$(HAVE_DECL_SETHOSTNAME)|g' \ + -e 's|@''HAVE_DECL_TRUNCATE''@|$(HAVE_DECL_TRUNCATE)|g' \ -e 's|@''HAVE_DECL_TTYNAME_R''@|$(HAVE_DECL_TTYNAME_R)|g' \ -e 's|@''HAVE_OS_H''@|$(HAVE_OS_H)|g' \ -e 's|@''HAVE_SYS_PARAM_H''@|$(HAVE_SYS_PARAM_H)|g' \ @@ -2434,6 +2588,7 @@ -e 's|@''REPLACE_CLOSE''@|$(REPLACE_CLOSE)|g' \ -e 's|@''REPLACE_DUP''@|$(REPLACE_DUP)|g' \ -e 's|@''REPLACE_DUP2''@|$(REPLACE_DUP2)|g' \ + -e 's|@''REPLACE_FACCESSAT''@|$(REPLACE_FACCESSAT)|g' \ -e 's|@''REPLACE_FCHOWNAT''@|$(REPLACE_FCHOWNAT)|g' \ -e 's|@''REPLACE_FTRUNCATE''@|$(REPLACE_FTRUNCATE)|g' \ -e 's|@''REPLACE_GETCWD''@|$(REPLACE_GETCWD)|g' \ @@ -2442,6 +2597,7 @@ -e 's|@''REPLACE_GETLOGIN_R''@|$(REPLACE_GETLOGIN_R)|g' \ -e 's|@''REPLACE_GETGROUPS''@|$(REPLACE_GETGROUPS)|g' \ -e 's|@''REPLACE_GETPAGESIZE''@|$(REPLACE_GETPAGESIZE)|g' \ + -e 's|@''REPLACE_GETPASS''@|$(REPLACE_GETPASS)|g' \ -e 's|@''REPLACE_ISATTY''@|$(REPLACE_ISATTY)|g' \ -e 's|@''REPLACE_LCHOWN''@|$(REPLACE_LCHOWN)|g' \ -e 's|@''REPLACE_LINK''@|$(REPLACE_LINK)|g' \ diff -Nru grep-3.1/lib/hard-locale.c grep-3.3/lib/hard-locale.c --- grep-3.1/lib/hard-locale.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/lib/hard-locale.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,6 +1,6 @@ /* hard-locale.c -- Determine whether a locale is hard. - Copyright (C) 1997-1999, 2002-2004, 2006-2007, 2009-2017 Free Software + Copyright (C) 1997-1999, 2002-2004, 2006-2007, 2009-2018 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify @@ -14,7 +14,7 @@ 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 . */ + along with this program. If not, see . */ #include diff -Nru grep-3.1/lib/hard-locale.h grep-3.3/lib/hard-locale.h --- grep-3.1/lib/hard-locale.h 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/lib/hard-locale.h 2018-01-07 00:07:08.000000000 +0000 @@ -1,6 +1,6 @@ /* Determine whether a locale is hard. - Copyright (C) 1999, 2003-2004, 2009-2017 Free Software Foundation, Inc. + Copyright (C) 1999, 2003-2004, 2009-2018 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 @@ -13,7 +13,7 @@ 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 . */ + along with this program. If not, see . */ #ifndef HARD_LOCALE_H_ # define HARD_LOCALE_H_ 1 diff -Nru grep-3.1/lib/hash.c grep-3.3/lib/hash.c --- grep-3.1/lib/hash.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/lib/hash.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,6 +1,6 @@ /* hash - hashing table processing. - Copyright (C) 1998-2004, 2006-2007, 2009-2017 Free Software Foundation, Inc. + Copyright (C) 1998-2004, 2006-2007, 2009-2018 Free Software Foundation, Inc. Written by Jim Meyering, 1992. @@ -15,7 +15,7 @@ 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 . */ + along with this program. If not, see . */ /* A generic hash table package. */ diff -Nru grep-3.1/lib/hash.h grep-3.3/lib/hash.h --- grep-3.1/lib/hash.h 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/lib/hash.h 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ /* hash - hashing table processing. - Copyright (C) 1998-1999, 2001, 2003, 2009-2017 Free Software Foundation, + Copyright (C) 1998-1999, 2001, 2003, 2009-2018 Free Software Foundation, Inc. Written by Jim Meyering , 1998. @@ -14,7 +14,7 @@ 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 . */ + along with this program. If not, see . */ /* A generic hash table package. */ diff -Nru grep-3.1/lib/iconv.c grep-3.3/lib/iconv.c --- grep-3.1/lib/iconv.c 2017-01-01 11:25:47.000000000 +0000 +++ grep-3.3/lib/iconv.c 2018-01-07 00:08:02.000000000 +0000 @@ -1,5 +1,5 @@ /* Character set conversion. - Copyright (C) 1999-2001, 2007, 2009-2017 Free Software Foundation, Inc. + Copyright (C) 1999-2001, 2007, 2009-2018 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 @@ -12,7 +12,7 @@ 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 . */ + with this program; if not, see . */ #include diff -Nru grep-3.1/lib/iconv_close.c grep-3.3/lib/iconv_close.c --- grep-3.1/lib/iconv_close.c 2017-01-01 11:25:47.000000000 +0000 +++ grep-3.3/lib/iconv_close.c 2018-01-07 00:08:02.000000000 +0000 @@ -1,5 +1,5 @@ /* Character set conversion. - Copyright (C) 2007, 2009-2017 Free Software Foundation, Inc. + Copyright (C) 2007, 2009-2018 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 @@ -12,7 +12,7 @@ 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 . */ + with this program; if not, see . */ #include diff -Nru grep-3.1/lib/iconv.in.h grep-3.3/lib/iconv.in.h --- grep-3.1/lib/iconv.in.h 2017-01-01 11:25:47.000000000 +0000 +++ grep-3.3/lib/iconv.in.h 2018-09-19 05:05:05.000000000 +0000 @@ -1,6 +1,6 @@ /* A GNU-like . - Copyright (C) 2007-2017 Free Software Foundation, Inc. + Copyright (C) 2007-2018 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 @@ -13,7 +13,7 @@ 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 . */ + along with this program; if not, see . */ #ifndef _@GUARD_PREFIX@_ICONV_H @@ -52,6 +52,12 @@ (const char *tocode, const char *fromcode)); # endif _GL_CXXALIASWARN (iconv_open); +#elif defined GNULIB_POSIXCHECK +# undef iconv_open +# if HAVE_RAW_DECL_ICONV_OPEN +_GL_WARN_ON_USE (iconv_open, "iconv_open is not working correctly everywhere - " + "use gnulib module iconv for portability"); +# endif #endif #if @REPLACE_ICONV_UTF@ @@ -90,6 +96,12 @@ # ifndef ICONV_CONST # define ICONV_CONST @ICONV_CONST@ # endif +#elif defined GNULIB_POSIXCHECK +# undef iconv +# if HAVE_RAW_DECL_ICONV +_GL_WARN_ON_USE (iconv, "iconv is not working correctly everywhere - " + "use gnulib module iconv for portability"); +# endif #endif #if @GNULIB_ICONV@ diff -Nru grep-3.1/lib/iconv_open.c grep-3.3/lib/iconv_open.c --- grep-3.1/lib/iconv_open.c 2017-01-01 11:25:47.000000000 +0000 +++ grep-3.3/lib/iconv_open.c 2018-01-07 00:08:02.000000000 +0000 @@ -1,5 +1,5 @@ /* Character set conversion. - Copyright (C) 2007, 2009-2017 Free Software Foundation, Inc. + Copyright (C) 2007, 2009-2018 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 @@ -12,7 +12,7 @@ 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 . */ + with this program; if not, see . */ #include diff -Nru grep-3.1/lib/ignore-value.h grep-3.3/lib/ignore-value.h --- grep-3.1/lib/ignore-value.h 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/lib/ignore-value.h 2018-01-07 00:07:08.000000000 +0000 @@ -1,6 +1,6 @@ /* ignore a function return without a compiler warning. -*- coding: utf-8 -*- - Copyright (C) 2008-2017 Free Software Foundation, Inc. + Copyright (C) 2008-2018 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 @@ -13,7 +13,7 @@ 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 . */ + along with this program. If not, see . */ /* Written by Jim Meyering, Eric Blake and Pádraig Brady. */ diff -Nru grep-3.1/lib/intprops.h grep-3.3/lib/intprops.h --- grep-3.1/lib/intprops.h 2017-06-10 16:45:36.000000000 +0000 +++ grep-3.3/lib/intprops.h 2018-09-19 05:05:05.000000000 +0000 @@ -1,6 +1,6 @@ /* intprops.h -- properties of integer types - Copyright (C) 2001-2017 Free Software Foundation, Inc. + Copyright (C) 2001-2018 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 @@ -13,7 +13,7 @@ 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 . */ + along with this program. If not, see . */ /* Written by Paul Eggert. */ @@ -22,12 +22,13 @@ #include -/* 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)) +/* Return a value with the common real type of E and V and the value of V. + Do not evaluate E. */ +#define _GL_INT_CONVERT(e, v) ((1 ? 0 : (e)) + (v)) /* Act like _GL_INT_CONVERT (E, -V) but work around a bug in IRIX 6.5 cc; see - . */ -#define _GL_INT_NEGATE_CONVERT(e, v) (0 * (e) - (v)) + . */ +#define _GL_INT_NEGATE_CONVERT(e, v) ((1 ? 0 : (e)) - (v)) /* The extra casts in the following macros work around compiler bugs, e.g., in Cray C 5.0.3.0. */ @@ -40,13 +41,14 @@ #define TYPE_SIGNED(t) (! ((t) 0 < (t) -1)) /* Return 1 if the real expression E, after promotion, has a - signed or floating type. */ + signed or floating type. Do not evaluate E. */ #define EXPR_SIGNED(e) (_GL_INT_NEGATE_CONVERT (e, 1) < 0) /* Minimum and maximum values for integer types and expressions. */ /* The width in bits of the integer type or expression T. + Do not evaluate T. Padding bits are not supported; this is checked at compile-time below. */ #define TYPE_WIDTH(t) (sizeof (t) * CHAR_BIT) @@ -58,7 +60,7 @@ : ((((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. */ + after integer promotion. E is not evaluated. */ #define _GL_INT_MINIMUM(e) \ (EXPR_SIGNED (e) \ ? ~ _GL_SIGNED_INT_MAXIMUM (e) \ @@ -179,7 +181,7 @@ /* Return 1 if A * B would overflow in [MIN,MAX] arithmetic. See above for restrictions. Avoid && and || as they tickle bugs in Sun C 5.11 2010/08/13 and other compilers; see - . */ + . */ #define INT_MULTIPLY_RANGE_OVERFLOW(a, b, min, max) \ ((b) < 0 \ ? ((a) < 0 \ @@ -340,8 +342,8 @@ Arguments should be free of side effects. */ #define _GL_BINARY_OP_OVERFLOW(a, b, op_result_overflow) \ op_result_overflow (a, b, \ - _GL_INT_MINIMUM (0 * (b) + (a)), \ - _GL_INT_MAXIMUM (0 * (b) + (a))) + _GL_INT_MINIMUM (_GL_INT_CONVERT (a, b)), \ + _GL_INT_MAXIMUM (_GL_INT_CONVERT (a, b))) /* 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. */ @@ -443,7 +445,7 @@ 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 + https://lists.gnu.org/r/bug-gnulib/2017-04/msg00049.html As the compiler bug is real, don't try to work around the theoretical problem. */ diff -Nru grep-3.1/lib/inttypes.in.h grep-3.3/lib/inttypes.in.h --- grep-3.1/lib/inttypes.in.h 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/lib/inttypes.in.h 2018-09-19 05:04:26.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (C) 2006-2017 Free Software Foundation, Inc. +/* Copyright (C) 2006-2018 Free Software Foundation, Inc. Written by Paul Eggert, Bruno Haible, Derek Price. This file is part of gnulib. @@ -13,7 +13,7 @@ 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 . */ + along with this program. If not, see . */ /* * ISO C 99 for platforms that lack it. @@ -52,7 +52,7 @@ /* Get CHAR_BIT. */ #include /* On mingw, __USE_MINGW_ANSI_STDIO only works if is also included */ -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +#if defined _WIN32 && ! defined __CYGWIN__ # include #endif @@ -1067,11 +1067,13 @@ #endif #if @GNULIB_IMAXDIV@ -# if !@HAVE_DECL_IMAXDIV@ +# if !@HAVE_IMAXDIV_T@ # if !GNULIB_defined_imaxdiv_t typedef struct { intmax_t quot; intmax_t rem; } imaxdiv_t; # define GNULIB_defined_imaxdiv_t 1 # endif +# endif +# if !@HAVE_DECL_IMAXDIV@ extern imaxdiv_t imaxdiv (intmax_t, intmax_t); # endif #elif defined GNULIB_POSIXCHECK diff -Nru grep-3.1/lib/i-ring.c grep-3.3/lib/i-ring.c --- grep-3.1/lib/i-ring.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/lib/i-ring.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ /* a simple ring buffer - Copyright (C) 2006, 2009-2017 Free Software Foundation, Inc. + Copyright (C) 2006, 2009-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ /* written by Jim Meyering */ diff -Nru grep-3.1/lib/i-ring.h grep-3.3/lib/i-ring.h --- grep-3.1/lib/i-ring.h 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/lib/i-ring.h 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ /* definitions for a simple ring buffer - Copyright (C) 2006, 2009-2017 Free Software Foundation, Inc. + Copyright (C) 2006, 2009-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ #include #include "verify.h" diff -Nru grep-3.1/lib/isatty.c grep-3.3/lib/isatty.c --- grep-3.1/lib/isatty.c 2017-05-14 01:09:51.000000000 +0000 +++ grep-3.3/lib/isatty.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ /* isatty() replacement. - Copyright (C) 2012-2017 Free Software Foundation, Inc. + Copyright (C) 2012-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ #include diff -Nru grep-3.1/lib/isblank.c grep-3.3/lib/isblank.c --- grep-3.1/lib/isblank.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/lib/isblank.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,6 +1,6 @@ /* Test whether a character is a blank. - Copyright (C) 2009-2017 Free Software Foundation, Inc. + Copyright (C) 2009-2018 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 @@ -13,7 +13,7 @@ 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 . */ + along with this program. If not, see . */ #include diff -Nru grep-3.1/lib/iswblank.c grep-3.3/lib/iswblank.c --- grep-3.1/lib/iswblank.c 2017-01-01 11:25:47.000000000 +0000 +++ grep-3.3/lib/iswblank.c 2018-01-07 00:08:02.000000000 +0000 @@ -1,5 +1,5 @@ /* Test wide character for being blank. - Copyright (C) 2008-2017 Free Software Foundation, Inc. + Copyright (C) 2008-2018 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 @@ -12,7 +12,7 @@ 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 . */ + with this program; if not, see . */ #include diff -Nru grep-3.1/lib/iswctype.c grep-3.3/lib/iswctype.c --- grep-3.1/lib/iswctype.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/lib/iswctype.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ /* Test whether a wide character has a given property. - Copyright (C) 2011-2017 Free Software Foundation, Inc. + Copyright (C) 2011-2018 Free Software Foundation, Inc. Written by Bruno Haible , 2011. This program is free software: you can redistribute it and/or modify @@ -13,7 +13,7 @@ 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 . */ + along with this program. If not, see . */ #include diff -Nru grep-3.1/lib/iswctype-impl.h grep-3.3/lib/iswctype-impl.h --- grep-3.1/lib/iswctype-impl.h 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/lib/iswctype-impl.h 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ /* Test whether a wide character has a given property. - Copyright (C) 2011-2017 Free Software Foundation, Inc. + Copyright (C) 2011-2018 Free Software Foundation, Inc. Written by Bruno Haible , 2011. This program is free software: you can redistribute it and/or modify @@ -13,7 +13,7 @@ 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 . */ + along with this program. If not, see . */ int iswctype (wint_t wc, wctype_t desc) diff -Nru grep-3.1/lib/langinfo.in.h grep-3.3/lib/langinfo.in.h --- grep-3.1/lib/langinfo.in.h 2017-01-01 11:25:47.000000000 +0000 +++ grep-3.3/lib/langinfo.in.h 2018-02-26 06:10:46.000000000 +0000 @@ -1,5 +1,5 @@ /* Substitute for and wrapper around . - Copyright (C) 2009-2017 Free Software Foundation, Inc. + Copyright (C) 2009-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program; if not, see . */ /* * POSIX for platforms that lack it or have an incomplete one. @@ -86,6 +86,18 @@ # define MON_10 (MON_1 + 9) # define MON_11 (MON_1 + 10) # define MON_12 (MON_1 + 11) +# define ALTMON_1 10200 +# define ALTMON_2 (ALTMON_1 + 1) +# define ALTMON_3 (ALTMON_1 + 2) +# define ALTMON_4 (ALTMON_1 + 3) +# define ALTMON_5 (ALTMON_1 + 4) +# define ALTMON_6 (ALTMON_1 + 5) +# define ALTMON_7 (ALTMON_1 + 6) +# define ALTMON_8 (ALTMON_1 + 7) +# define ALTMON_9 (ALTMON_1 + 8) +# define ALTMON_10 (ALTMON_1 + 9) +# define ALTMON_11 (ALTMON_1 + 10) +# define ALTMON_12 (ALTMON_1 + 11) # define ABMON_1 10035 # define ABMON_2 (ABMON_1 + 1) # define ABMON_3 (ABMON_1 + 2) @@ -138,6 +150,22 @@ # define GNULIB_defined_T_FMT_AMPM 1 # endif +# if !@HAVE_LANGINFO_ALTMON@ +# define ALTMON_1 10200 +# define ALTMON_2 (ALTMON_1 + 1) +# define ALTMON_3 (ALTMON_1 + 2) +# define ALTMON_4 (ALTMON_1 + 3) +# define ALTMON_5 (ALTMON_1 + 4) +# define ALTMON_6 (ALTMON_1 + 5) +# define ALTMON_7 (ALTMON_1 + 6) +# define ALTMON_8 (ALTMON_1 + 7) +# define ALTMON_9 (ALTMON_1 + 8) +# define ALTMON_10 (ALTMON_1 + 9) +# define ALTMON_11 (ALTMON_1 + 10) +# define ALTMON_12 (ALTMON_1 + 11) +# define GNULIB_defined_ALTMON 1 +# endif + # if !@HAVE_LANGINFO_ERA@ # define ERA 10047 # define ERA_D_FMT 10048 diff -Nru grep-3.1/lib/libc-config.h grep-3.3/lib/libc-config.h --- grep-3.1/lib/libc-config.h 1970-01-01 00:00:00.000000000 +0000 +++ grep-3.3/lib/libc-config.h 2018-10-16 23:22:20.000000000 +0000 @@ -0,0 +1,174 @@ +/* System definitions for code taken from the GNU C Library + + Copyright 2017-2018 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. */ + +/* This is intended to be a good-enough substitute for glibc system + macros like those defined in , so that Gnulib code + shared with glibc can do this as the first #include: + + #ifndef _LIBC + # include + #endif + + When compiled as part of glibc this is a no-op; when compiled as + part of Gnulib this includes Gnulib's and defines macros + that glibc library code would normally assume. */ + +#include + +/* On glibc this includes and and #defines + _FEATURES_H, __WORDSIZE, and __set_errno. On FreeBSD 11 it + includes which defines __nonnull. Elsewhere it + is harmless. */ +#include + +/* From glibc . */ +#ifndef __set_errno +# define __set_errno(val) (errno = (val)) +#endif + +/* From glibc . */ + +#ifndef __GNUC_PREREQ +# if defined __GNUC__ && defined __GNUC_MINOR__ +# define __GNUC_PREREQ(maj, min) ((maj) < __GNUC__ + ((min) <= __GNUC_MINOR__)) +# else +# define __GNUC_PREREQ(maj, min) 0 +# endif +#endif + +#ifndef __glibc_clang_prereq +# if defined __clang_major__ && defined __clang_minor__ +# define __glibc_clang_prereq(maj, min) \ + ((maj) < __clang_major__ + ((min) <= __clang_minor__)) +# else +# define __glibc_clang_prereq(maj, min) 0 +# endif +#endif + + +/* Prepare to include , which is our copy of glibc + . */ + +/* Define _FEATURES_H so that does not include . */ +#ifndef _FEATURES_H +# define _FEATURES_H 1 +#endif +/* Define __WORDSIZE so that does not attempt to include + nonexistent files. Make it a syntax error, since Gnulib does not + use __WORDSIZE now, and if Gnulib uses it later the syntax error + will let us know that __WORDSIZE needs configuring. */ +#ifndef __WORDSIZE +# define __WORDSIZE %%% +#endif +/* Undef the macros unconditionally defined by our copy of glibc + , so that they do not clash with any system-defined + versions. */ +#undef _SYS_CDEFS_H +#undef __ASMNAME +#undef __ASMNAME2 +#undef __BEGIN_DECLS +#undef __CONCAT +#undef __END_DECLS +#undef __HAVE_GENERIC_SELECTION +#undef __LDBL_COMPAT +#undef __LDBL_REDIR +#undef __LDBL_REDIR1 +#undef __LDBL_REDIR1_DECL +#undef __LDBL_REDIR1_NTH +#undef __LDBL_REDIR_DECL +#undef __LDBL_REDIR_NTH +#undef __LEAF +#undef __LEAF_ATTR +#undef __NTH +#undef __NTHNL +#undef __P +#undef __PMT +#undef __REDIRECT +#undef __REDIRECT_LDBL +#undef __REDIRECT_NTH +#undef __REDIRECT_NTHNL +#undef __REDIRECT_NTH_LDBL +#undef __STRING +#undef __THROW +#undef __THROWNL +#undef __always_inline +#undef __attribute__ +#undef __attribute_alloc_size__ +#undef __attribute_artificial__ +#undef __attribute_const__ +#undef __attribute_deprecated__ +#undef __attribute_deprecated_msg__ +#undef __attribute_format_arg__ +#undef __attribute_format_strfmon__ +#undef __attribute_malloc__ +#undef __attribute_noinline__ +#undef __attribute_nonstring__ +#undef __attribute_pure__ +#undef __attribute_used__ +#undef __attribute_warn_unused_result__ +#undef __bos +#undef __bos0 +#undef __errordecl +#undef __extension__ +#undef __extern_always_inline +#undef __extern_inline +#undef __flexarr +#undef __fortify_function +#undef __glibc_c99_flexarr_available +#undef __glibc_clang_has_extension +#undef __glibc_likely +#undef __glibc_macro_warning +#undef __glibc_macro_warning1 +#undef __glibc_unlikely +#undef __inline +#undef __ptr_t +#undef __restrict +#undef __restrict_arr +#undef __va_arg_pack +#undef __va_arg_pack_len +#undef __warnattr +#undef __warndecl + +/* Include our copy of glibc . */ +#include + +/* __inline is too pessimistic for non-GCC. */ +#undef __inline +#ifndef HAVE___INLINE +# if 199901 <= __STDC_VERSION__ || defined inline +# define __inline inline +# else +# define __inline +# endif +#endif + + +/* A substitute for glibc , good enough for Gnulib. */ +#define attribute_hidden +#define libc_hidden_proto(name, ...) +#define libc_hidden_def(name) +#define libc_hidden_weak(name) +#define libc_hidden_ver(local, name) +#define strong_alias(name, aliasname) +#define weak_alias(name, aliasname) + +/* A substitute for glibc , good enough for Gnulib. */ +#define SHLIB_COMPAT(lib, introduced, obsoleted) 0 +#define versioned_symbol(lib, local, symbol, version) diff -Nru grep-3.1/lib/limits.in.h grep-3.3/lib/limits.in.h --- grep-3.1/lib/limits.in.h 2017-03-17 04:34:47.000000000 +0000 +++ grep-3.3/lib/limits.in.h 2018-09-19 05:05:05.000000000 +0000 @@ -1,6 +1,6 @@ /* A GNU-like . - Copyright 2016-2017 Free Software Foundation, Inc. + Copyright 2016-2018 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 @@ -13,7 +13,7 @@ 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 . */ + along with this program; if not, see . */ #ifndef _@GUARD_PREFIX@_LIMITS_H @@ -28,15 +28,32 @@ #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 +#ifndef LLONG_MIN +# if defined LONG_LONG_MIN /* HP-UX 11.31 */ +# define LLONG_MIN LONG_LONG_MIN +# elif defined LONGLONG_MIN /* IRIX 6.5 */ +# define LLONG_MIN LONGLONG_MIN +# elif defined __GNUC__ +# define LLONG_MIN (- __LONG_LONG_MAX__ - 1LL) +# endif #endif -#if defined LONG_LONG_MAX && !defined LLONG_MAX -# define LLONG_MAX LONG_LONG_MAX +#ifndef LLONG_MAX +# if defined LONG_LONG_MAX /* HP-UX 11.31 */ +# define LLONG_MAX LONG_LONG_MAX +# elif defined LONGLONG_MAX /* IRIX 6.5 */ +# define LLONG_MAX LONGLONG_MAX +# elif defined __GNUC__ +# define LLONG_MAX __LONG_LONG_MAX__ +# endif #endif -#if defined ULONG_LONG_MAX && !defined ULLONG_MAX -# define ULLONG_MAX ULONG_LONG_MAX +#ifndef ULLONG_MAX +# if defined ULONG_LONG_MAX /* HP-UX 11.31 */ +# define ULLONG_MAX ULONG_LONG_MAX +# elif defined ULONGLONG_MAX /* IRIX 6.5 */ +# define ULLONG_MAX ULONGLONG_MAX +# elif defined __GNUC__ +# define ULLONG_MAX (__LONG_LONG_MAX__ * 2ULL + 1ULL) +# endif #endif /* The number of usable bits in an unsigned or signed integer type @@ -53,6 +70,19 @@ #define _GL_COB8(n) (_GL_COB4 ((n) >> 4) + _GL_COB4 (n)) #define _GL_COB4(n) (!!((n) & 8) + !!((n) & 4) + !!((n) & 2) + !!((n) & 1)) +#ifndef WORD_BIT +/* Assume 'int' is 32 bits wide. */ +# define WORD_BIT 32 +#endif +#ifndef LONG_BIT +/* Assume 'long' is 32 or 64 bits wide. */ +# if LONG_MAX == INT_MAX +# define LONG_BIT 32 +# else +# define LONG_BIT 64 +# endif +#endif + /* Macros specified by ISO/IEC TS 18661-1:2014. */ #if (! defined ULLONG_WIDTH \ diff -Nru grep-3.1/lib/localcharset.c grep-3.3/lib/localcharset.c --- grep-3.1/lib/localcharset.c 2017-05-21 00:32:48.000000000 +0000 +++ grep-3.3/lib/localcharset.c 2018-09-19 05:05:05.000000000 +0000 @@ -1,6 +1,6 @@ /* Determine a canonical name for the current locale's character encoding. - Copyright (C) 2000-2006, 2008-2017 Free Software Foundation, Inc. + Copyright (C) 2000-2006, 2008-2018 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 @@ -13,7 +13,7 @@ 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 . */ + with this program; if not, see . */ /* Written by Bruno Haible . */ @@ -22,7 +22,6 @@ /* Specification. */ #include "localcharset.h" -#include #include #include #include @@ -32,7 +31,7 @@ # define DARWIN7 /* Darwin 7 or newer, i.e. Mac OS X 10.3 or newer */ #endif -#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ +#if defined _WIN32 && !defined __CYGWIN__ # define WINDOWS_NATIVE # include #endif @@ -45,11 +44,10 @@ #endif #if !defined WINDOWS_NATIVE -# include # if HAVE_LANGINFO_CODESET # include # else -# if 0 /* see comment below */ +# if 0 /* see comment regarding use of setlocale(), below */ # include # endif # endif @@ -71,321 +69,613 @@ # include #endif -#if ENABLE_RELOCATABLE -# include "relocatable.h" -#else -# define relocate(pathname) (pathname) -# define relocate2(pathname,allocatedp) (*(allocatedp) = NULL, (pathname)) -#endif - -/* Get LIBDIR. */ -#ifndef LIBDIR -# include "configmake.h" -#endif - -/* Define O_NOFOLLOW to 0 on platforms where it does not exist. */ -#ifndef O_NOFOLLOW -# define O_NOFOLLOW 0 -#endif - -#if defined _WIN32 || defined __WIN32__ || defined __CYGWIN__ || defined __EMX__ || defined __DJGPP__ - /* Native Windows, Cygwin, OS/2, DOS */ -# define ISSLASH(C) ((C) == '/' || (C) == '\\') -#endif -#ifndef DIRECTORY_SEPARATOR -# define DIRECTORY_SEPARATOR '/' -#endif +#if HAVE_LANGINFO_CODESET || defined WINDOWS_NATIVE || defined OS2 -#ifndef ISSLASH -# define ISSLASH(C) ((C) == DIRECTORY_SEPARATOR) -#endif +/* On these platforms, we use a mapping from non-canonical encoding name + to GNU canonical encoding name. */ -#if HAVE_DECL_GETC_UNLOCKED -# undef getc -# define getc getc_unlocked -#endif +/* With glibc-2.1 or newer, we don't need any canonicalization, + because glibc has iconv and both glibc and libiconv support all + GNU canonical names directly. */ +# if !((defined __GNU_LIBRARY__ && __GLIBC__ >= 2) || defined __UCLIBC__) -/* The following static variable is declared 'volatile' to avoid a - possible multithread problem in the function get_charset_aliases. If we - are running in a threaded environment, and if two threads initialize - 'charset_aliases' simultaneously, both will produce the same value, - and everything will be ok if the two assignments to 'charset_aliases' - are atomic. But I don't know what will happen if the two assignments mix. */ -#if __STDC__ != 1 -# define volatile /* empty */ -#endif -/* Pointer to the contents of the charset.alias file, if it has already been - read, else NULL. Its format is: - ALIAS_1 '\0' CANONICAL_1 '\0' ... ALIAS_n '\0' CANONICAL_n '\0' '\0' */ -static const char * volatile charset_aliases; - -/* Return a pointer to the contents of the charset.alias file. */ -static const char * -get_charset_aliases (void) +struct table_entry { - const char *cp; - - cp = charset_aliases; - if (cp == NULL) - { -#if !(defined DARWIN7 || defined VMS || defined WINDOWS_NATIVE || defined __CYGWIN__ || defined OS2) - char *malloc_dir = NULL; - const char *dir; - const char *base = "charset.alias"; - char *file_name; - - /* Make it possible to override the charset.alias location. This is - necessary for running the testsuite before "make install". */ - dir = getenv ("CHARSETALIASDIR"); - if (dir == NULL || dir[0] == '\0') - dir = relocate2 (LIBDIR, &malloc_dir); - - /* Concatenate dir and base into freshly allocated file_name. */ - { - size_t dir_len = strlen (dir); - size_t base_len = strlen (base); - int add_slash = (dir_len > 0 && !ISSLASH (dir[dir_len - 1])); - file_name = (char *) malloc (dir_len + add_slash + base_len + 1); - if (file_name != NULL) - { - memcpy (file_name, dir, dir_len); - if (add_slash) - file_name[dir_len] = DIRECTORY_SEPARATOR; - memcpy (file_name + dir_len + add_slash, base, base_len + 1); - } - } - - free (malloc_dir); - - if (file_name == NULL) - /* Out of memory. Treat the file as empty. */ - cp = ""; - else - { - int fd; - - /* Open the file. Reject symbolic links on platforms that support - O_NOFOLLOW. This is a security feature. Without it, an attacker - could retrieve parts of the contents (namely, the tail of the - first line that starts with "* ") of an arbitrary file by placing - a symbolic link to that file under the name "charset.alias" in - some writable directory and defining the environment variable - CHARSETALIASDIR to point to that directory. */ - fd = open (file_name, - O_RDONLY | (HAVE_WORKING_O_NOFOLLOW ? O_NOFOLLOW : 0)); - if (fd < 0) - /* File not found. Treat it as empty. */ - cp = ""; - else - { - FILE *fp; - - fp = fdopen (fd, "r"); - if (fp == NULL) - { - /* Out of memory. Treat the file as empty. */ - close (fd); - cp = ""; - } - else - { - /* Parse the file's contents. */ - char *res_ptr = NULL; - size_t res_size = 0; - - for (;;) - { - int c; - char buf1[50+1]; - char buf2[50+1]; - size_t l1, l2; - char *old_res_ptr; - - c = getc (fp); - if (c == EOF) - break; - if (c == '\n' || c == ' ' || c == '\t') - continue; - if (c == '#') - { - /* Skip comment, to end of line. */ - do - c = getc (fp); - while (!(c == EOF || c == '\n')); - if (c == EOF) - break; - continue; - } - ungetc (c, fp); - if (fscanf (fp, "%50s %50s", buf1, buf2) < 2) - break; - l1 = strlen (buf1); - l2 = strlen (buf2); - old_res_ptr = res_ptr; - if (res_size == 0) - { - res_size = l1 + 1 + l2 + 1; - res_ptr = (char *) malloc (res_size + 1); - } - else - { - res_size += l1 + 1 + l2 + 1; - res_ptr = (char *) realloc (res_ptr, res_size + 1); - } - if (res_ptr == NULL) - { - /* Out of memory. */ - res_size = 0; - free (old_res_ptr); - break; - } - strcpy (res_ptr + res_size - (l2 + 1) - (l1 + 1), buf1); - strcpy (res_ptr + res_size - (l2 + 1), buf2); - } - fclose (fp); - if (res_size == 0) - cp = ""; - else - { - *(res_ptr + res_size) = '\0'; - cp = res_ptr; - } - } - } + const char alias[11+1]; + const char canonical[11+1]; +}; + +/* Table of platform-dependent mappings, sorted in ascending order. */ +static const struct table_entry alias_table[] = + { +# if defined __FreeBSD__ /* FreeBSD */ + /*{ "ARMSCII-8", "ARMSCII-8" },*/ + { "Big5", "BIG5" }, + { "C", "ASCII" }, + /*{ "CP1131", "CP1131" },*/ + /*{ "CP1251", "CP1251" },*/ + /*{ "CP866", "CP866" },*/ + /*{ "GB18030", "GB18030" },*/ + /*{ "GB2312", "GB2312" },*/ + /*{ "GBK", "GBK" },*/ + /*{ "ISCII-DEV", "?" },*/ + { "ISO8859-1", "ISO-8859-1" }, + { "ISO8859-13", "ISO-8859-13" }, + { "ISO8859-15", "ISO-8859-15" }, + { "ISO8859-2", "ISO-8859-2" }, + { "ISO8859-5", "ISO-8859-5" }, + { "ISO8859-7", "ISO-8859-7" }, + { "ISO8859-9", "ISO-8859-9" }, + /*{ "KOI8-R", "KOI8-R" },*/ + /*{ "KOI8-U", "KOI8-U" },*/ + { "SJIS", "SHIFT_JIS" }, + { "US-ASCII", "ASCII" }, + { "eucCN", "GB2312" }, + { "eucJP", "EUC-JP" }, + { "eucKR", "EUC-KR" } +# define alias_table_defined +# endif +# if defined __NetBSD__ /* NetBSD */ + { "646", "ASCII" }, + /*{ "ARMSCII-8", "ARMSCII-8" },*/ + /*{ "BIG5", "BIG5" },*/ + { "Big5-HKSCS", "BIG5-HKSCS" }, + /*{ "CP1251", "CP1251" },*/ + /*{ "CP866", "CP866" },*/ + /*{ "GB18030", "GB18030" },*/ + /*{ "GB2312", "GB2312" },*/ + { "ISO8859-1", "ISO-8859-1" }, + { "ISO8859-13", "ISO-8859-13" }, + { "ISO8859-15", "ISO-8859-15" }, + { "ISO8859-2", "ISO-8859-2" }, + { "ISO8859-4", "ISO-8859-4" }, + { "ISO8859-5", "ISO-8859-5" }, + { "ISO8859-7", "ISO-8859-7" }, + /*{ "KOI8-R", "KOI8-R" },*/ + /*{ "KOI8-U", "KOI8-U" },*/ + /*{ "PT154", "PT154" },*/ + { "SJIS", "SHIFT_JIS" }, + { "eucCN", "GB2312" }, + { "eucJP", "EUC-JP" }, + { "eucKR", "EUC-KR" }, + { "eucTW", "EUC-TW" } +# define alias_table_defined +# endif +# if defined __OpenBSD__ /* OpenBSD */ + { "646", "ASCII" }, + { "ISO8859-1", "ISO-8859-1" }, + { "ISO8859-13", "ISO-8859-13" }, + { "ISO8859-15", "ISO-8859-15" }, + { "ISO8859-2", "ISO-8859-2" }, + { "ISO8859-4", "ISO-8859-4" }, + { "ISO8859-5", "ISO-8859-5" }, + { "ISO8859-7", "ISO-8859-7" } +# define alias_table_defined +# endif +# if defined __APPLE__ && defined __MACH__ /* Mac OS X */ + /* Darwin 7.5 has nl_langinfo(CODESET), but sometimes its value is + useless: + - It returns the empty string when LANG is set to a locale of the + form ll_CC, although ll_CC/LC_CTYPE is a symlink to an UTF-8 + LC_CTYPE file. + - The environment variables LANG, LC_CTYPE, LC_ALL are not set by + the system; nl_langinfo(CODESET) returns "US-ASCII" in this case. + - The documentation says: + "... all code that calls BSD system routines should ensure + that the const *char parameters of these routines are in UTF-8 + encoding. All BSD system functions expect their string + parameters to be in UTF-8 encoding and nothing else." + It also says + "An additional caveat is that string parameters for files, + paths, and other file-system entities must be in canonical + UTF-8. In a canonical UTF-8 Unicode string, all decomposable + characters are decomposed ..." + but this is not true: You can pass non-decomposed UTF-8 strings + to file system functions, and it is the OS which will convert + them to decomposed UTF-8 before accessing the file system. + - The Apple Terminal application displays UTF-8 by default. + - However, other applications are free to use different encodings: + - xterm uses ISO-8859-1 by default. + - TextEdit uses MacRoman by default. + We prefer UTF-8 over decomposed UTF-8-MAC because one should + minimize the use of decomposed Unicode. Unfortunately, through the + Darwin file system, decomposed UTF-8 strings are leaked into user + space nevertheless. + Then there are also the locales with encodings other than US-ASCII + and UTF-8. These locales can be occasionally useful to users (e.g. + when grepping through ISO-8859-1 encoded text files), when all their + file names are in US-ASCII. + */ + { "ARMSCII-8", "ARMSCII-8" }, + { "Big5", "BIG5" }, + { "Big5HKSCS", "BIG5-HKSCS" }, + { "CP1131", "CP1131" }, + { "CP1251", "CP1251" }, + { "CP866", "CP866" }, + { "CP949", "CP949" }, + { "GB18030", "GB18030" }, + { "GB2312", "GB2312" }, + { "GBK", "GBK" }, + /*{ "ISCII-DEV", "?" },*/ + { "ISO8859-1", "ISO-8859-1" }, + { "ISO8859-13", "ISO-8859-13" }, + { "ISO8859-15", "ISO-8859-15" }, + { "ISO8859-2", "ISO-8859-2" }, + { "ISO8859-4", "ISO-8859-4" }, + { "ISO8859-5", "ISO-8859-5" }, + { "ISO8859-7", "ISO-8859-7" }, + { "ISO8859-9", "ISO-8859-9" }, + { "KOI8-R", "KOI8-R" }, + { "KOI8-U", "KOI8-U" }, + { "PT154", "PT154" }, + { "SJIS", "SHIFT_JIS" }, + { "eucCN", "GB2312" }, + { "eucJP", "EUC-JP" }, + { "eucKR", "EUC-KR" } +# define alias_table_defined +# endif +# if defined _AIX /* AIX */ + /*{ "GBK", "GBK" },*/ + { "IBM-1046", "CP1046" }, + { "IBM-1124", "CP1124" }, + { "IBM-1129", "CP1129" }, + { "IBM-1252", "CP1252" }, + { "IBM-850", "CP850" }, + { "IBM-856", "CP856" }, + { "IBM-921", "ISO-8859-13" }, + { "IBM-922", "CP922" }, + { "IBM-932", "CP932" }, + { "IBM-943", "CP943" }, + { "IBM-eucCN", "GB2312" }, + { "IBM-eucJP", "EUC-JP" }, + { "IBM-eucKR", "EUC-KR" }, + { "IBM-eucTW", "EUC-TW" }, + { "ISO8859-1", "ISO-8859-1" }, + { "ISO8859-15", "ISO-8859-15" }, + { "ISO8859-2", "ISO-8859-2" }, + { "ISO8859-5", "ISO-8859-5" }, + { "ISO8859-6", "ISO-8859-6" }, + { "ISO8859-7", "ISO-8859-7" }, + { "ISO8859-8", "ISO-8859-8" }, + { "ISO8859-9", "ISO-8859-9" }, + { "TIS-620", "TIS-620" }, + /*{ "UTF-8", "UTF-8" },*/ + { "big5", "BIG5" } +# define alias_table_defined +# endif +# if defined __hpux /* HP-UX */ + { "SJIS", "SHIFT_JIS" }, + { "arabic8", "HP-ARABIC8" }, + { "big5", "BIG5" }, + { "cp1251", "CP1251" }, + { "eucJP", "EUC-JP" }, + { "eucKR", "EUC-KR" }, + { "eucTW", "EUC-TW" }, + { "gb18030", "GB18030" }, + { "greek8", "HP-GREEK8" }, + { "hebrew8", "HP-HEBREW8" }, + { "hkbig5", "BIG5-HKSCS" }, + { "hp15CN", "GB2312" }, + { "iso88591", "ISO-8859-1" }, + { "iso885913", "ISO-8859-13" }, + { "iso885915", "ISO-8859-15" }, + { "iso88592", "ISO-8859-2" }, + { "iso88594", "ISO-8859-4" }, + { "iso88595", "ISO-8859-5" }, + { "iso88596", "ISO-8859-6" }, + { "iso88597", "ISO-8859-7" }, + { "iso88598", "ISO-8859-8" }, + { "iso88599", "ISO-8859-9" }, + { "kana8", "HP-KANA8" }, + { "koi8r", "KOI8-R" }, + { "roman8", "HP-ROMAN8" }, + { "tis620", "TIS-620" }, + { "turkish8", "HP-TURKISH8" }, + { "utf8", "UTF-8" } +# define alias_table_defined +# endif +# if defined __sgi /* IRIX */ + { "ISO8859-1", "ISO-8859-1" }, + { "ISO8859-15", "ISO-8859-15" }, + { "ISO8859-2", "ISO-8859-2" }, + { "ISO8859-5", "ISO-8859-5" }, + { "ISO8859-7", "ISO-8859-7" }, + { "ISO8859-9", "ISO-8859-9" }, + { "eucCN", "GB2312" }, + { "eucJP", "EUC-JP" }, + { "eucKR", "EUC-KR" }, + { "eucTW", "EUC-TW" } +# define alias_table_defined +# endif +# if defined __osf__ /* OSF/1 */ + /*{ "GBK", "GBK" },*/ + { "ISO8859-1", "ISO-8859-1" }, + { "ISO8859-15", "ISO-8859-15" }, + { "ISO8859-2", "ISO-8859-2" }, + { "ISO8859-4", "ISO-8859-4" }, + { "ISO8859-5", "ISO-8859-5" }, + { "ISO8859-7", "ISO-8859-7" }, + { "ISO8859-8", "ISO-8859-8" }, + { "ISO8859-9", "ISO-8859-9" }, + { "KSC5601", "CP949" }, + { "SJIS", "SHIFT_JIS" }, + { "TACTIS", "TIS-620" }, + /*{ "UTF-8", "UTF-8" },*/ + { "big5", "BIG5" }, + { "cp850", "CP850" }, + { "dechanyu", "DEC-HANYU" }, + { "dechanzi", "GB2312" }, + { "deckanji", "DEC-KANJI" }, + { "deckorean", "EUC-KR" }, + { "eucJP", "EUC-JP" }, + { "eucKR", "EUC-KR" }, + { "eucTW", "EUC-TW" }, + { "sdeckanji", "EUC-JP" } +# define alias_table_defined +# endif +# if defined __sun /* Solaris */ + { "5601", "EUC-KR" }, + { "646", "ASCII" }, + /*{ "BIG5", "BIG5" },*/ + { "Big5-HKSCS", "BIG5-HKSCS" }, + { "GB18030", "GB18030" }, + /*{ "GBK", "GBK" },*/ + { "ISO8859-1", "ISO-8859-1" }, + { "ISO8859-11", "TIS-620" }, + { "ISO8859-13", "ISO-8859-13" }, + { "ISO8859-15", "ISO-8859-15" }, + { "ISO8859-2", "ISO-8859-2" }, + { "ISO8859-3", "ISO-8859-3" }, + { "ISO8859-4", "ISO-8859-4" }, + { "ISO8859-5", "ISO-8859-5" }, + { "ISO8859-6", "ISO-8859-6" }, + { "ISO8859-7", "ISO-8859-7" }, + { "ISO8859-8", "ISO-8859-8" }, + { "ISO8859-9", "ISO-8859-9" }, + { "PCK", "SHIFT_JIS" }, + { "TIS620.2533", "TIS-620" }, + /*{ "UTF-8", "UTF-8" },*/ + { "ansi-1251", "CP1251" }, + { "cns11643", "EUC-TW" }, + { "eucJP", "EUC-JP" }, + { "gb2312", "GB2312" }, + { "koi8-r", "KOI8-R" } +# define alias_table_defined +# endif +# if defined __minix /* Minix */ + { "646", "ASCII" } +# define alias_table_defined +# endif +# if defined WINDOWS_NATIVE || defined __CYGWIN__ /* Windows */ + { "CP1361", "JOHAB" }, + { "CP20127", "ASCII" }, + { "CP20866", "KOI8-R" }, + { "CP20936", "GB2312" }, + { "CP21866", "KOI8-RU" }, + { "CP28591", "ISO-8859-1" }, + { "CP28592", "ISO-8859-2" }, + { "CP28593", "ISO-8859-3" }, + { "CP28594", "ISO-8859-4" }, + { "CP28595", "ISO-8859-5" }, + { "CP28596", "ISO-8859-6" }, + { "CP28597", "ISO-8859-7" }, + { "CP28598", "ISO-8859-8" }, + { "CP28599", "ISO-8859-9" }, + { "CP28605", "ISO-8859-15" }, + { "CP38598", "ISO-8859-8" }, + { "CP51932", "EUC-JP" }, + { "CP51936", "GB2312" }, + { "CP51949", "EUC-KR" }, + { "CP51950", "EUC-TW" }, + { "CP54936", "GB18030" }, + { "CP65001", "UTF-8" }, + { "CP936", "GBK" } +# define alias_table_defined +# endif +# if defined OS2 /* OS/2 */ + /* The list of encodings is taken from "List of OS/2 Codepages" + by Alex Taylor: + . + See also "IBM Globalization - Code page identifiers": + . */ + { "CP1089", "ISO-8859-6" }, + { "CP1208", "UTF-8" }, + { "CP1381", "GB2312" }, + { "CP1386", "GBK" }, + { "CP3372", "EUC-JP" }, + { "CP813", "ISO-8859-7" }, + { "CP819", "ISO-8859-1" }, + { "CP878", "KOI8-R" }, + { "CP912", "ISO-8859-2" }, + { "CP913", "ISO-8859-3" }, + { "CP914", "ISO-8859-4" }, + { "CP915", "ISO-8859-5" }, + { "CP916", "ISO-8859-8" }, + { "CP920", "ISO-8859-9" }, + { "CP921", "ISO-8859-13" }, + { "CP923", "ISO-8859-15" }, + { "CP954", "EUC-JP" }, + { "CP964", "EUC-TW" }, + { "CP970", "EUC-KR" } +# define alias_table_defined +# endif +# if defined VMS /* OpenVMS */ + /* The list of encodings is taken from the OpenVMS 7.3-1 documentation + "Compaq C Run-Time Library Reference Manual for OpenVMS systems" + section 10.7 "Handling Different Character Sets". */ + { "DECHANYU", "DEC-HANYU" }, + { "DECHANZI", "GB2312" }, + { "DECKANJI", "DEC-KANJI" }, + { "DECKOREAN", "EUC-KR" }, + { "ISO8859-1", "ISO-8859-1" }, + { "ISO8859-2", "ISO-8859-2" }, + { "ISO8859-5", "ISO-8859-5" }, + { "ISO8859-7", "ISO-8859-7" }, + { "ISO8859-8", "ISO-8859-8" }, + { "ISO8859-9", "ISO-8859-9" }, + { "SDECKANJI", "EUC-JP" }, + { "SJIS", "SHIFT_JIS" }, + { "eucJP", "EUC-JP" }, + { "eucTW", "EUC-TW" } +# define alias_table_defined +# endif +# ifndef alias_table_defined + /* Just a dummy entry, to avoid a C syntax error. */ + { "", "" } +# endif + }; - free (file_name); - } +# endif #else -# if defined DARWIN7 - /* To avoid the trouble of installing a file that is shared by many - GNU packages -- many packaging systems have problems with this --, - simply inline the aliases here. */ - cp = "ISO8859-1" "\0" "ISO-8859-1" "\0" - "ISO8859-2" "\0" "ISO-8859-2" "\0" - "ISO8859-4" "\0" "ISO-8859-4" "\0" - "ISO8859-5" "\0" "ISO-8859-5" "\0" - "ISO8859-7" "\0" "ISO-8859-7" "\0" - "ISO8859-9" "\0" "ISO-8859-9" "\0" - "ISO8859-13" "\0" "ISO-8859-13" "\0" - "ISO8859-15" "\0" "ISO-8859-15" "\0" - "KOI8-R" "\0" "KOI8-R" "\0" - "KOI8-U" "\0" "KOI8-U" "\0" - "CP866" "\0" "CP866" "\0" - "CP949" "\0" "CP949" "\0" - "CP1131" "\0" "CP1131" "\0" - "CP1251" "\0" "CP1251" "\0" - "eucCN" "\0" "GB2312" "\0" - "GB2312" "\0" "GB2312" "\0" - "eucJP" "\0" "EUC-JP" "\0" - "eucKR" "\0" "EUC-KR" "\0" - "Big5" "\0" "BIG5" "\0" - "Big5HKSCS" "\0" "BIG5-HKSCS" "\0" - "GBK" "\0" "GBK" "\0" - "GB18030" "\0" "GB18030" "\0" - "SJIS" "\0" "SHIFT_JIS" "\0" - "ARMSCII-8" "\0" "ARMSCII-8" "\0" - "PT154" "\0" "PT154" "\0" - /*"ISCII-DEV" "\0" "?" "\0"*/ - "*" "\0" "UTF-8" "\0"; -# endif - -# if defined VMS - /* To avoid the troubles of an extra file charset.alias_vms in the - sources of many GNU packages, simply inline the aliases here. */ - /* The list of encodings is taken from the OpenVMS 7.3-1 documentation - "Compaq C Run-Time Library Reference Manual for OpenVMS systems" - section 10.7 "Handling Different Character Sets". */ - cp = "ISO8859-1" "\0" "ISO-8859-1" "\0" - "ISO8859-2" "\0" "ISO-8859-2" "\0" - "ISO8859-5" "\0" "ISO-8859-5" "\0" - "ISO8859-7" "\0" "ISO-8859-7" "\0" - "ISO8859-8" "\0" "ISO-8859-8" "\0" - "ISO8859-9" "\0" "ISO-8859-9" "\0" - /* Japanese */ - "eucJP" "\0" "EUC-JP" "\0" - "SJIS" "\0" "SHIFT_JIS" "\0" - "DECKANJI" "\0" "DEC-KANJI" "\0" - "SDECKANJI" "\0" "EUC-JP" "\0" - /* Chinese */ - "eucTW" "\0" "EUC-TW" "\0" - "DECHANYU" "\0" "DEC-HANYU" "\0" - "DECHANZI" "\0" "GB2312" "\0" - /* Korean */ - "DECKOREAN" "\0" "EUC-KR" "\0"; -# endif - -# if defined WINDOWS_NATIVE || defined __CYGWIN__ - /* To avoid the troubles of installing a separate file in the same - directory as the DLL and of retrieving the DLL's directory at - runtime, simply inline the aliases here. */ - - cp = "CP936" "\0" "GBK" "\0" - "CP1361" "\0" "JOHAB" "\0" - "CP20127" "\0" "ASCII" "\0" - "CP20866" "\0" "KOI8-R" "\0" - "CP20936" "\0" "GB2312" "\0" - "CP21866" "\0" "KOI8-RU" "\0" - "CP28591" "\0" "ISO-8859-1" "\0" - "CP28592" "\0" "ISO-8859-2" "\0" - "CP28593" "\0" "ISO-8859-3" "\0" - "CP28594" "\0" "ISO-8859-4" "\0" - "CP28595" "\0" "ISO-8859-5" "\0" - "CP28596" "\0" "ISO-8859-6" "\0" - "CP28597" "\0" "ISO-8859-7" "\0" - "CP28598" "\0" "ISO-8859-8" "\0" - "CP28599" "\0" "ISO-8859-9" "\0" - "CP28605" "\0" "ISO-8859-15" "\0" - "CP38598" "\0" "ISO-8859-8" "\0" - "CP51932" "\0" "EUC-JP" "\0" - "CP51936" "\0" "GB2312" "\0" - "CP51949" "\0" "EUC-KR" "\0" - "CP51950" "\0" "EUC-TW" "\0" - "CP54936" "\0" "GB18030" "\0" - "CP65001" "\0" "UTF-8" "\0"; -# endif -# if defined OS2 - /* To avoid the troubles of installing a separate file in the same - directory as the DLL and of retrieving the DLL's directory at - runtime, simply inline the aliases here. */ - - /* The list of encodings is taken from "List of OS/2 Codepages" - by Alex Taylor: - . - See also "IBM Globalization - Code page identifiers": - . */ - cp = "CP813" "\0" "ISO-8859-7" "\0" - "CP878" "\0" "KOI8-R" "\0" - "CP819" "\0" "ISO-8859-1" "\0" - "CP912" "\0" "ISO-8859-2" "\0" - "CP913" "\0" "ISO-8859-3" "\0" - "CP914" "\0" "ISO-8859-4" "\0" - "CP915" "\0" "ISO-8859-5" "\0" - "CP916" "\0" "ISO-8859-8" "\0" - "CP920" "\0" "ISO-8859-9" "\0" - "CP921" "\0" "ISO-8859-13" "\0" - "CP923" "\0" "ISO-8859-15" "\0" - "CP954" "\0" "EUC-JP" "\0" - "CP964" "\0" "EUC-TW" "\0" - "CP970" "\0" "EUC-KR" "\0" - "CP1089" "\0" "ISO-8859-6" "\0" - "CP1208" "\0" "UTF-8" "\0" - "CP1381" "\0" "GB2312" "\0" - "CP1386" "\0" "GBK" "\0" - "CP3372" "\0" "EUC-JP" "\0"; +/* On these platforms, we use a mapping from locale name to GNU canonical + encoding name. */ + +struct table_entry +{ + const char locale[17+1]; + const char canonical[11+1]; +}; + +/* Table of platform-dependent mappings, sorted in ascending order. */ +static const struct table_entry locale_table[] = + { +# if defined __FreeBSD__ /* FreeBSD 4.2 */ + { "cs_CZ.ISO_8859-2", "ISO-8859-2" }, + { "da_DK.DIS_8859-15", "ISO-8859-15" }, + { "da_DK.ISO_8859-1", "ISO-8859-1" }, + { "de_AT.DIS_8859-15", "ISO-8859-15" }, + { "de_AT.ISO_8859-1", "ISO-8859-1" }, + { "de_CH.DIS_8859-15", "ISO-8859-15" }, + { "de_CH.ISO_8859-1", "ISO-8859-1" }, + { "de_DE.DIS_8859-15", "ISO-8859-15" }, + { "de_DE.ISO_8859-1", "ISO-8859-1" }, + { "en_AU.DIS_8859-15", "ISO-8859-15" }, + { "en_AU.ISO_8859-1", "ISO-8859-1" }, + { "en_CA.DIS_8859-15", "ISO-8859-15" }, + { "en_CA.ISO_8859-1", "ISO-8859-1" }, + { "en_GB.DIS_8859-15", "ISO-8859-15" }, + { "en_GB.ISO_8859-1", "ISO-8859-1" }, + { "en_US.DIS_8859-15", "ISO-8859-15" }, + { "en_US.ISO_8859-1", "ISO-8859-1" }, + { "es_ES.DIS_8859-15", "ISO-8859-15" }, + { "es_ES.ISO_8859-1", "ISO-8859-1" }, + { "fi_FI.DIS_8859-15", "ISO-8859-15" }, + { "fi_FI.ISO_8859-1", "ISO-8859-1" }, + { "fr_BE.DIS_8859-15", "ISO-8859-15" }, + { "fr_BE.ISO_8859-1", "ISO-8859-1" }, + { "fr_CA.DIS_8859-15", "ISO-8859-15" }, + { "fr_CA.ISO_8859-1", "ISO-8859-1" }, + { "fr_CH.DIS_8859-15", "ISO-8859-15" }, + { "fr_CH.ISO_8859-1", "ISO-8859-1" }, + { "fr_FR.DIS_8859-15", "ISO-8859-15" }, + { "fr_FR.ISO_8859-1", "ISO-8859-1" }, + { "hr_HR.ISO_8859-2", "ISO-8859-2" }, + { "hu_HU.ISO_8859-2", "ISO-8859-2" }, + { "is_IS.DIS_8859-15", "ISO-8859-15" }, + { "is_IS.ISO_8859-1", "ISO-8859-1" }, + { "it_CH.DIS_8859-15", "ISO-8859-15" }, + { "it_CH.ISO_8859-1", "ISO-8859-1" }, + { "it_IT.DIS_8859-15", "ISO-8859-15" }, + { "it_IT.ISO_8859-1", "ISO-8859-1" }, + { "ja_JP.EUC", "EUC-JP" }, + { "ja_JP.SJIS", "SHIFT_JIS" }, + { "ja_JP.Shift_JIS", "SHIFT_JIS" }, + { "ko_KR.EUC", "EUC-KR" }, + { "la_LN.ASCII", "ASCII" }, + { "la_LN.DIS_8859-15", "ISO-8859-15" }, + { "la_LN.ISO_8859-1", "ISO-8859-1" }, + { "la_LN.ISO_8859-2", "ISO-8859-2" }, + { "la_LN.ISO_8859-4", "ISO-8859-4" }, + { "lt_LN.ASCII", "ASCII" }, + { "lt_LN.DIS_8859-15", "ISO-8859-15" }, + { "lt_LN.ISO_8859-1", "ISO-8859-1" }, + { "lt_LN.ISO_8859-2", "ISO-8859-2" }, + { "lt_LT.ISO_8859-4", "ISO-8859-4" }, + { "nl_BE.DIS_8859-15", "ISO-8859-15" }, + { "nl_BE.ISO_8859-1", "ISO-8859-1" }, + { "nl_NL.DIS_8859-15", "ISO-8859-15" }, + { "nl_NL.ISO_8859-1", "ISO-8859-1" }, + { "no_NO.DIS_8859-15", "ISO-8859-15" }, + { "no_NO.ISO_8859-1", "ISO-8859-1" }, + { "pl_PL.ISO_8859-2", "ISO-8859-2" }, + { "pt_PT.DIS_8859-15", "ISO-8859-15" }, + { "pt_PT.ISO_8859-1", "ISO-8859-1" }, + { "ru_RU.CP866", "CP866" }, + { "ru_RU.ISO_8859-5", "ISO-8859-5" }, + { "ru_RU.KOI8-R", "KOI8-R" }, + { "ru_SU.CP866", "CP866" }, + { "ru_SU.ISO_8859-5", "ISO-8859-5" }, + { "ru_SU.KOI8-R", "KOI8-R" }, + { "sl_SI.ISO_8859-2", "ISO-8859-2" }, + { "sv_SE.DIS_8859-15", "ISO-8859-15" }, + { "sv_SE.ISO_8859-1", "ISO-8859-1" }, + { "uk_UA.KOI8-U", "KOI8-U" }, + { "zh_CN.EUC", "GB2312" }, + { "zh_TW.BIG5", "BIG5" }, + { "zh_TW.Big5", "BIG5" } +# define locale_table_defined # endif -#endif +# if defined __DJGPP__ /* DOS / DJGPP 2.03 */ + /* The encodings given here may not all be correct. + If you find that the encoding given for your language and + country is not the one your DOS machine actually uses, just + correct it in this file, and send a mail to + Juan Manuel Guerrero + and . */ + { "C", "ASCII" }, + { "ar", "CP864" }, + { "ar_AE", "CP864" }, + { "ar_DZ", "CP864" }, + { "ar_EG", "CP864" }, + { "ar_IQ", "CP864" }, + { "ar_IR", "CP864" }, + { "ar_JO", "CP864" }, + { "ar_KW", "CP864" }, + { "ar_MA", "CP864" }, + { "ar_OM", "CP864" }, + { "ar_QA", "CP864" }, + { "ar_SA", "CP864" }, + { "ar_SY", "CP864" }, + { "be", "CP866" }, + { "be_BE", "CP866" }, + { "bg", "CP866" }, /* not CP855 ?? */ + { "bg_BG", "CP866" }, /* not CP855 ?? */ + { "ca", "CP850" }, + { "ca_ES", "CP850" }, + { "cs", "CP852" }, + { "cs_CZ", "CP852" }, + { "da", "CP865" }, /* not CP850 ?? */ + { "da_DK", "CP865" }, /* not CP850 ?? */ + { "de", "CP850" }, + { "de_AT", "CP850" }, + { "de_CH", "CP850" }, + { "de_DE", "CP850" }, + { "el", "CP869" }, + { "el_GR", "CP869" }, + { "en", "CP850" }, + { "en_AU", "CP850" }, /* not CP437 ?? */ + { "en_CA", "CP850" }, + { "en_GB", "CP850" }, + { "en_NZ", "CP437" }, + { "en_US", "CP437" }, + { "en_ZA", "CP850" }, /* not CP437 ?? */ + { "eo", "CP850" }, + { "eo_EO", "CP850" }, + { "es", "CP850" }, + { "es_AR", "CP850" }, + { "es_BO", "CP850" }, + { "es_CL", "CP850" }, + { "es_CO", "CP850" }, + { "es_CR", "CP850" }, + { "es_CU", "CP850" }, + { "es_DO", "CP850" }, + { "es_EC", "CP850" }, + { "es_ES", "CP850" }, + { "es_GT", "CP850" }, + { "es_HN", "CP850" }, + { "es_MX", "CP850" }, + { "es_NI", "CP850" }, + { "es_PA", "CP850" }, + { "es_PE", "CP850" }, + { "es_PY", "CP850" }, + { "es_SV", "CP850" }, + { "es_UY", "CP850" }, + { "es_VE", "CP850" }, + { "et", "CP850" }, + { "et_EE", "CP850" }, + { "eu", "CP850" }, + { "eu_ES", "CP850" }, + { "fi", "CP850" }, + { "fi_FI", "CP850" }, + { "fr", "CP850" }, + { "fr_BE", "CP850" }, + { "fr_CA", "CP850" }, + { "fr_CH", "CP850" }, + { "fr_FR", "CP850" }, + { "ga", "CP850" }, + { "ga_IE", "CP850" }, + { "gd", "CP850" }, + { "gd_GB", "CP850" }, + { "gl", "CP850" }, + { "gl_ES", "CP850" }, + { "he", "CP862" }, + { "he_IL", "CP862" }, + { "hr", "CP852" }, + { "hr_HR", "CP852" }, + { "hu", "CP852" }, + { "hu_HU", "CP852" }, + { "id", "CP850" }, /* not CP437 ?? */ + { "id_ID", "CP850" }, /* not CP437 ?? */ + { "is", "CP861" }, /* not CP850 ?? */ + { "is_IS", "CP861" }, /* not CP850 ?? */ + { "it", "CP850" }, + { "it_CH", "CP850" }, + { "it_IT", "CP850" }, + { "ja", "CP932" }, + { "ja_JP", "CP932" }, + { "kr", "CP949" }, /* not CP934 ?? */ + { "kr_KR", "CP949" }, /* not CP934 ?? */ + { "lt", "CP775" }, + { "lt_LT", "CP775" }, + { "lv", "CP775" }, + { "lv_LV", "CP775" }, + { "mk", "CP866" }, /* not CP855 ?? */ + { "mk_MK", "CP866" }, /* not CP855 ?? */ + { "mt", "CP850" }, + { "mt_MT", "CP850" }, + { "nb", "CP865" }, /* not CP850 ?? */ + { "nb_NO", "CP865" }, /* not CP850 ?? */ + { "nl", "CP850" }, + { "nl_BE", "CP850" }, + { "nl_NL", "CP850" }, + { "nn", "CP865" }, /* not CP850 ?? */ + { "nn_NO", "CP865" }, /* not CP850 ?? */ + { "no", "CP865" }, /* not CP850 ?? */ + { "no_NO", "CP865" }, /* not CP850 ?? */ + { "pl", "CP852" }, + { "pl_PL", "CP852" }, + { "pt", "CP850" }, + { "pt_BR", "CP850" }, + { "pt_PT", "CP850" }, + { "ro", "CP852" }, + { "ro_RO", "CP852" }, + { "ru", "CP866" }, + { "ru_RU", "CP866" }, + { "sk", "CP852" }, + { "sk_SK", "CP852" }, + { "sl", "CP852" }, + { "sl_SI", "CP852" }, + { "sq", "CP852" }, + { "sq_AL", "CP852" }, + { "sr", "CP852" }, /* CP852 or CP866 or CP855 ?? */ + { "sr_CS", "CP852" }, /* CP852 or CP866 or CP855 ?? */ + { "sr_YU", "CP852" }, /* CP852 or CP866 or CP855 ?? */ + { "sv", "CP850" }, + { "sv_SE", "CP850" }, + { "th", "CP874" }, + { "th_TH", "CP874" }, + { "tr", "CP857" }, + { "tr_TR", "CP857" }, + { "uk", "CP1125" }, + { "uk_UA", "CP1125" }, + { "zh_CN", "GBK" }, + { "zh_TW", "CP950" } /* not CP938 ?? */ +# define locale_table_defined +# endif +# ifndef locale_table_defined + /* Just a dummy entry, to avoid a C syntax error. */ + { "", "" } +# endif + }; - charset_aliases = cp; - } +#endif - return cp; -} /* Determine the current locale's character encoding, and canonicalize it - into one of the canonical names listed in config.charset. + into one of the canonical names listed in localcharset.h. The result must not be freed; it is statically allocated. If the canonical name cannot be determined, the result is a non-canonical name. */ @@ -397,9 +687,8 @@ locale_charset (void) { const char *codeset; - const char *aliases; -#if !(defined WINDOWS_NATIVE || defined OS2) +#if HAVE_LANGINFO_CODESET || defined WINDOWS_NATIVE || defined OS2 # if HAVE_LANGINFO_CODESET @@ -462,37 +751,11 @@ } # endif -# else - - /* On old systems which lack it, use setlocale or getenv. */ - const char *locale = NULL; - - /* But most old systems don't have a complete set of locales. Some - (like SunOS 4 or DJGPP) have only the C locale. Therefore we don't - use setlocale here; it would return "C" when it doesn't support the - locale name the user has set. */ -# if 0 - locale = setlocale (LC_CTYPE, NULL); -# endif - if (locale == NULL || locale[0] == '\0') - { - locale = getenv ("LC_ALL"); - if (locale == NULL || locale[0] == '\0') - { - locale = getenv ("LC_CTYPE"); - if (locale == NULL || locale[0] == '\0') - locale = getenv ("LANG"); - } - } - - /* On some old systems, one used to set locale = "iso8859_1". On others, - you set it to "language_COUNTRY.charset". In any case, we resolve it - through the charset.alias file. */ - codeset = locale; + if (codeset == NULL) + /* The canonical name cannot be determined. */ + codeset = ""; -# endif - -#elif defined WINDOWS_NATIVE +# elif defined WINDOWS_NATIVE static char buf[2 + 10 + 1]; @@ -526,7 +789,7 @@ } codeset = buf; -#elif defined OS2 +# elif defined OS2 const char *locale; static char buf[2 + 10 + 1]; @@ -583,28 +846,144 @@ } } -#endif +# else - if (codeset == NULL) - /* The canonical name cannot be determined. */ - codeset = ""; +# error "Add code for other platforms here." + +# endif + + /* Resolve alias. */ + { +# ifdef alias_table_defined + /* On some platforms, UTF-8 locales are the most frequently used ones. + Speed up the common case and slow down the less common cases by + testing for this case first. */ +# if defined __OpenBSD__ || (defined __APPLE__ && defined __MACH__) || defined __sun || defined __CYGWIN__ + if (strcmp (codeset, "UTF-8") == 0) + goto done_table_lookup; + else +# endif + { + const struct table_entry * const table = alias_table; + size_t const table_size = + sizeof (alias_table) / sizeof (struct table_entry); + /* The table is sorted. Perform a binary search. */ + size_t hi = table_size; + size_t lo = 0; + while (lo < hi) + { + /* Invariant: + for i < lo, strcmp (table[i].alias, codeset) < 0, + for i >= hi, strcmp (table[i].alias, codeset) > 0. */ + size_t mid = (hi + lo) >> 1; /* >= lo, < hi */ + int cmp = strcmp (table[mid].alias, codeset); + if (cmp < 0) + lo = mid + 1; + else if (cmp > 0) + hi = mid; + else + { + /* Found an i with + strcmp (table[i].alias, codeset) == 0. */ + codeset = table[mid].canonical; + goto done_table_lookup; + } + } + } + if (0) + done_table_lookup: ; + else +# endif + { + /* Did not find it in the table. */ + /* On Mac OS X, all modern locales use the UTF-8 encoding. + BeOS and Haiku have a single locale, and it has UTF-8 encoding. */ +# if (defined __APPLE__ && defined __MACH__) || defined __BEOS__ || defined __HAIKU__ + codeset = "UTF-8"; +# else + /* Don't return an empty string. GNU libc and GNU libiconv interpret + the empty string as denoting "the locale's character encoding", + thus GNU libiconv would call this function a second time. */ + if (codeset[0] == '\0') + codeset = "ASCII"; +# endif + } + } + +#else + + /* On old systems which lack it, use setlocale or getenv. */ + const char *locale = NULL; - /* Resolve alias. */ - for (aliases = get_charset_aliases (); - *aliases != '\0'; - aliases += strlen (aliases) + 1, aliases += strlen (aliases) + 1) - if (strcmp (codeset, aliases) == 0 - || (aliases[0] == '*' && aliases[1] == '\0')) + /* But most old systems don't have a complete set of locales. Some + (like DJGPP) have only the C locale. Therefore we don't use setlocale + here; it would return "C" when it doesn't support the locale name the + user has set. */ +# if 0 + locale = setlocale (LC_CTYPE, NULL); +# endif + if (locale == NULL || locale[0] == '\0') + { + locale = getenv ("LC_ALL"); + if (locale == NULL || locale[0] == '\0') + { + locale = getenv ("LC_CTYPE"); + if (locale == NULL || locale[0] == '\0') + locale = getenv ("LANG"); + if (locale == NULL) + locale = ""; + } + } + + /* Map locale name to canonical encoding name. */ + { +# ifdef locale_table_defined + const struct table_entry * const table = locale_table; + size_t const table_size = + sizeof (locale_table) / sizeof (struct table_entry); + /* The table is sorted. Perform a binary search. */ + size_t hi = table_size; + size_t lo = 0; + while (lo < hi) { - codeset = aliases + strlen (aliases) + 1; - break; + /* Invariant: + for i < lo, strcmp (table[i].locale, locale) < 0, + for i >= hi, strcmp (table[i].locale, locale) > 0. */ + size_t mid = (hi + lo) >> 1; /* >= lo, < hi */ + int cmp = strcmp (table[mid].locale, locale); + if (cmp < 0) + lo = mid + 1; + else if (cmp > 0) + hi = mid; + else + { + /* Found an i with + strcmp (table[i].locale, locale) == 0. */ + codeset = table[mid].canonical; + goto done_table_lookup; + } } + if (0) + done_table_lookup: ; + else +# endif + { + /* Did not find it in the table. */ + /* On Mac OS X, all modern locales use the UTF-8 encoding. + BeOS and Haiku have a single locale, and it has UTF-8 encoding. */ +# if (defined __APPLE__ && defined __MACH__) || defined __BEOS__ || defined __HAIKU__ + codeset = "UTF-8"; +# else + /* The canonical name cannot be determined. */ + /* Don't return an empty string. GNU libc and GNU libiconv interpret + the empty string as denoting "the locale's character encoding", + thus GNU libiconv would call this function a second time. */ + codeset = "ASCII"; +# endif + } + } - /* Don't return an empty string. GNU libc and GNU libiconv interpret - the empty string as denoting "the locale's character encoding", - thus GNU libiconv would call this function a second time. */ - if (codeset[0] == '\0') - codeset = "ASCII"; +#endif #ifdef DARWIN7 /* Mac OS X sets MB_CUR_MAX to 1 when LC_ALL=C, and "UTF-8" diff -Nru grep-3.1/lib/localcharset.h grep-3.3/lib/localcharset.h --- grep-3.1/lib/localcharset.h 2017-01-01 11:25:47.000000000 +0000 +++ grep-3.3/lib/localcharset.h 2018-09-19 05:05:05.000000000 +0000 @@ -1,5 +1,5 @@ /* Determine a canonical name for the current locale's character encoding. - Copyright (C) 2000-2003, 2009-2017 Free Software Foundation, Inc. + Copyright (C) 2000-2003, 2009-2018 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 @@ -13,7 +13,7 @@ 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 . */ + with this program; if not, see . */ #ifndef _LOCALCHARSET_H #define _LOCALCHARSET_H @@ -25,12 +25,106 @@ /* Determine the current locale's character encoding, and canonicalize it - into one of the canonical names listed in config.charset. + into one of the canonical names listed below. The result must not be freed; it is statically allocated. If the canonical name cannot be determined, the result is a non-canonical name. */ extern const char * locale_charset (void); +/* About GNU canonical names for character encodings: + + Every canonical name must be supported by GNU libiconv. Support by GNU libc + is also desirable. + + The name is case insensitive. Usually an upper case MIME charset name is + preferred. + + The current list of these GNU canonical names is: + + name MIME? used by which systems + (darwin = Mac OS X, windows = native Windows) + + ASCII, ANSI_X3.4-1968 glibc solaris freebsd netbsd darwin minix cygwin + ISO-8859-1 Y glibc aix hpux irix osf solaris freebsd netbsd openbsd darwin cygwin + ISO-8859-2 Y glibc aix hpux irix osf solaris freebsd netbsd openbsd darwin cygwin + ISO-8859-3 Y glibc solaris cygwin + ISO-8859-4 Y hpux osf solaris freebsd netbsd openbsd darwin + ISO-8859-5 Y glibc aix hpux irix osf solaris freebsd netbsd openbsd darwin cygwin + ISO-8859-6 Y glibc aix hpux solaris cygwin + ISO-8859-7 Y glibc aix hpux irix osf solaris freebsd netbsd openbsd darwin cygwin + ISO-8859-8 Y glibc aix hpux osf solaris cygwin + ISO-8859-9 Y glibc aix hpux irix osf solaris freebsd darwin cygwin + ISO-8859-13 glibc hpux solaris freebsd netbsd openbsd darwin cygwin + ISO-8859-14 glibc cygwin + ISO-8859-15 glibc aix irix osf solaris freebsd netbsd openbsd darwin cygwin + KOI8-R Y glibc hpux solaris freebsd netbsd openbsd darwin + KOI8-U Y glibc freebsd netbsd openbsd darwin cygwin + KOI8-T glibc + CP437 dos + CP775 dos + CP850 aix osf dos + CP852 dos + CP855 dos + CP856 aix + CP857 dos + CP861 dos + CP862 dos + CP864 dos + CP865 dos + CP866 freebsd netbsd openbsd darwin dos + CP869 dos + CP874 windows dos + CP922 aix + CP932 aix cygwin windows dos + CP943 aix + CP949 osf darwin windows dos + CP950 windows dos + CP1046 aix + CP1124 aix + CP1125 dos + CP1129 aix + CP1131 freebsd darwin + CP1250 windows + CP1251 glibc hpux solaris freebsd netbsd openbsd darwin cygwin windows + CP1252 aix windows + CP1253 windows + CP1254 windows + CP1255 glibc windows + CP1256 windows + CP1257 windows + GB2312 Y glibc aix hpux irix solaris freebsd netbsd darwin cygwin + EUC-JP Y glibc aix hpux irix osf solaris freebsd netbsd darwin cygwin + EUC-KR Y glibc aix hpux irix osf solaris freebsd netbsd darwin cygwin + EUC-TW glibc aix hpux irix osf solaris netbsd + BIG5 Y glibc aix hpux osf solaris freebsd netbsd darwin cygwin + BIG5-HKSCS glibc hpux solaris netbsd darwin + GBK glibc aix osf solaris freebsd darwin cygwin windows dos + GB18030 glibc hpux solaris freebsd netbsd darwin + SHIFT_JIS Y hpux osf solaris freebsd netbsd darwin + JOHAB glibc solaris windows + TIS-620 glibc aix hpux osf solaris cygwin + VISCII Y glibc + TCVN5712-1 glibc + ARMSCII-8 glibc freebsd netbsd darwin + GEORGIAN-PS glibc cygwin + PT154 glibc netbsd cygwin + HP-ROMAN8 hpux + HP-ARABIC8 hpux + HP-GREEK8 hpux + HP-HEBREW8 hpux + HP-TURKISH8 hpux + HP-KANA8 hpux + DEC-KANJI osf + DEC-HANYU osf + UTF-8 Y glibc aix hpux osf solaris netbsd darwin cygwin + + Note: Names which are not marked as being a MIME name should not be used in + Internet protocols for information interchange (mail, news, etc.). + + Note: ASCII and ANSI_X3.4-1968 are synonymous canonical names. Applications + must understand both names and treat them as equivalent. + */ + #ifdef __cplusplus } diff -Nru grep-3.1/lib/localeconv.c grep-3.3/lib/localeconv.c --- grep-3.1/lib/localeconv.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/lib/localeconv.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ /* Query locale dependent information for formatting numbers. - Copyright (C) 2012-2017 Free Software Foundation, Inc. + Copyright (C) 2012-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ #include diff -Nru grep-3.1/lib/localeinfo.c grep-3.3/lib/localeinfo.c --- grep-3.1/lib/localeinfo.c 2017-01-16 17:27:38.000000000 +0000 +++ grep-3.3/lib/localeinfo.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,6 +1,6 @@ /* locale information - Copyright 2016-2017 Free Software Foundation, Inc. + Copyright 2016-2018 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 -Nru grep-3.1/lib/localeinfo.h grep-3.3/lib/localeinfo.h --- grep-3.1/lib/localeinfo.h 2017-01-16 17:27:38.000000000 +0000 +++ grep-3.3/lib/localeinfo.h 2018-01-07 00:07:08.000000000 +0000 @@ -1,6 +1,6 @@ /* locale information - Copyright 2016-2017 Free Software Foundation, Inc. + Copyright 2016-2018 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 -Nru grep-3.1/lib/locale.in.h grep-3.3/lib/locale.in.h --- grep-3.1/lib/locale.in.h 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/lib/locale.in.h 2018-12-21 02:51:47.000000000 +0000 @@ -1,5 +1,5 @@ /* A POSIX . - Copyright (C) 2007-2017 Free Software Foundation, Inc. + Copyright (C) 2007-2018 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 @@ -12,17 +12,20 @@ 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 . */ + along with this program. If not, see . */ #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ #endif @PRAGMA_COLUMNS@ -#ifdef _GL_ALREADY_INCLUDING_LOCALE_H +#if (defined _WIN32 && !defined __CYGWIN__ && defined __need_locale_t) \ + || defined _GL_ALREADY_INCLUDING_LOCALE_H -/* Special invocation conventions to handle Solaris header files - (through Solaris 10) when combined with gettext's libintl.h. */ +/* Special invocation convention: + - Inside mingw header files, + - To handle Solaris header files (through Solaris 10) when combined + with gettext's libintl.h. */ #@INCLUDE_NEXT@ @NEXT_LOCALE_H@ @@ -187,11 +190,40 @@ # endif #endif -#if @GNULIB_DUPLOCALE@ +#if /*@GNULIB_NEWLOCALE@ ||*/ (@GNULIB_LOCALENAME@ && @HAVE_NEWLOCALE@) +# if @REPLACE_NEWLOCALE@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef newlocale +# define newlocale rpl_newlocale +# define GNULIB_defined_newlocale 1 +# endif +_GL_FUNCDECL_RPL (newlocale, locale_t, + (int category_mask, const char *name, locale_t base) + _GL_ARG_NONNULL ((2))); +_GL_CXXALIAS_RPL (newlocale, locale_t, + (int category_mask, const char *name, locale_t base)); +# else +# if @HAVE_NEWLOCALE@ +_GL_CXXALIAS_SYS (newlocale, locale_t, + (int category_mask, const char *name, locale_t base)); +# endif +# endif +# if @HAVE_NEWLOCALE@ +_GL_CXXALIASWARN (newlocale); +# endif +#elif defined GNULIB_POSIXCHECK +# undef newlocale +# if HAVE_RAW_DECL_NEWLOCALE +_GL_WARN_ON_USE (newlocale, "newlocale is not portable"); +# endif +#endif + +#if @GNULIB_DUPLOCALE@ || (@GNULIB_LOCALENAME@ && @HAVE_DUPLOCALE@) # if @REPLACE_DUPLOCALE@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef duplocale # define duplocale rpl_duplocale +# define GNULIB_defined_duplocale 1 # endif _GL_FUNCDECL_RPL (duplocale, locale_t, (locale_t locale) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (duplocale, locale_t, (locale_t locale)); @@ -211,6 +243,30 @@ # endif #endif +#if /*@GNULIB_FREELOCALE@ ||*/ (@GNULIB_LOCALENAME@ && @HAVE_FREELOCALE@) +# if @REPLACE_FREELOCALE@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef freelocale +# define freelocale rpl_freelocale +# define GNULIB_defined_freelocale 1 +# endif +_GL_FUNCDECL_RPL (freelocale, void, (locale_t locale) _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (freelocale, void, (locale_t locale)); +# else +# if @HAVE_FREELOCALE@ +_GL_CXXALIAS_SYS (freelocale, void, (locale_t locale)); +# endif +# endif +# if @HAVE_FREELOCALE@ +_GL_CXXALIASWARN (freelocale); +# endif +#elif defined GNULIB_POSIXCHECK +# undef freelocale +# if HAVE_RAW_DECL_FREELOCALE +_GL_WARN_ON_USE (freelocale, "freelocale is not portable"); +# endif +#endif + #endif /* _@GUARD_PREFIX@_LOCALE_H */ -#endif /* ! _GL_ALREADY_INCLUDING_LOCALE_H */ #endif /* _@GUARD_PREFIX@_LOCALE_H */ +#endif /* !(__need_locale_t || _GL_ALREADY_INCLUDING_LOCALE_H) */ diff -Nru grep-3.1/lib/lseek.c grep-3.3/lib/lseek.c --- grep-3.1/lib/lseek.c 2017-05-14 01:10:19.000000000 +0000 +++ grep-3.3/lib/lseek.c 2018-06-24 23:18:01.000000000 +0000 @@ -1,5 +1,5 @@ /* An lseek() function that detects pipes. - Copyright (C) 2007, 2009-2017 Free Software Foundation, Inc. + Copyright (C) 2007, 2009-2018 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 @@ -12,14 +12,14 @@ 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 . */ + with this program; if not, see . */ #include /* Specification. */ #include -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +#if defined _WIN32 && ! defined __CYGWIN__ /* Windows platforms. */ /* Get GetFileType. */ # include @@ -39,7 +39,7 @@ off_t rpl_lseek (int fd, off_t offset, int whence) { -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +#if defined _WIN32 && ! defined __CYGWIN__ /* mingw lseek mistakenly succeeds on pipes, sockets, and terminals. */ HANDLE h = (HANDLE) _get_osfhandle (fd); if (h == INVALID_HANDLE_VALUE) diff -Nru grep-3.1/lib/lstat.c grep-3.3/lib/lstat.c --- grep-3.1/lib/lstat.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/lib/lstat.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,6 +1,6 @@ /* Work around a bug of lstat on some systems - Copyright (C) 1997-2006, 2008-2017 Free Software Foundation, Inc. + Copyright (C) 1997-2006, 2008-2018 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 @@ -13,7 +13,7 @@ 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 . */ + along with this program. If not, see . */ /* written by Jim Meyering */ @@ -47,6 +47,8 @@ above. */ # include "sys/stat.h" +# include "stat-time.h" + # include # include @@ -66,32 +68,33 @@ int rpl_lstat (const char *file, struct stat *sbuf) { - size_t len; - int lstat_result = orig_lstat (file, sbuf); - - if (lstat_result != 0) - return lstat_result; + int result = orig_lstat (file, sbuf); /* This replacement file can blindly check against '/' rather than using the ISSLASH macro, because all platforms with '\\' either lack symlinks (mingw) or have working lstat (cygwin) and thus do not compile this file. 0 len should have already been filtered out above, with a failure return of ENOENT. */ - len = strlen (file); - if (file[len - 1] != '/' || S_ISDIR (sbuf->st_mode)) - return 0; - - /* At this point, a trailing slash is only permitted on - symlink-to-dir; but it should have found information on the - directory, not the symlink. Call stat() to get info about the - link's referent. Our replacement stat guarantees valid results, - even if the symlink is not pointing to a directory. */ - if (!S_ISLNK (sbuf->st_mode)) + if (result == 0) { - errno = ENOTDIR; - return -1; + if (S_ISDIR (sbuf->st_mode) || file[strlen (file) - 1] != '/') + result = stat_time_normalize (result, sbuf); + else + { + /* At this point, a trailing slash is permitted only on + symlink-to-dir; but it should have found information on the + directory, not the symlink. Call 'stat' to get info about the + link's referent. Our replacement stat guarantees valid results, + even if the symlink is not pointing to a directory. */ + if (!S_ISLNK (sbuf->st_mode)) + { + errno = ENOTDIR; + return -1; + } + result = stat (file, sbuf); + } } - return stat (file, sbuf); + return result; } #endif /* HAVE_LSTAT */ diff -Nru grep-3.1/lib/Makefile.am grep-3.3/lib/Makefile.am --- grep-3.1/lib/Makefile.am 2017-01-01 11:34:33.000000000 +0000 +++ grep-3.3/lib/Makefile.am 2018-04-21 23:35:48.000000000 +0000 @@ -1,4 +1,4 @@ -# Copyright 1997-1998, 2005-2017 Free Software Foundation, Inc. +# Copyright 1997-1998, 2005-2018 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 @@ -11,7 +11,7 @@ # 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 . +# along with this program. If not, see . # AM_CFLAGS = diff -Nru grep-3.1/lib/Makefile.in grep-3.3/lib/Makefile.in --- grep-3.1/lib/Makefile.in 2017-07-02 20:12:56.000000000 +0000 +++ grep-3.3/lib/Makefile.in 2018-12-21 03:59:31.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.99a from Makefile.am. +# Makefile.in generated by automake 1.16a from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2015 Free Software Foundation, Inc. +# Copyright (C) 1994-2018 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -14,7 +14,7 @@ @SET_MAKE@ -# Copyright 1997-1998, 2005-2017 Free Software Foundation, Inc. +# Copyright 1997-1998, 2005-2018 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 @@ -27,10 +27,10 @@ # 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 . +# along with this program. If not, see . # -# Copyright (C) 2002-2017 Free Software Foundation, Inc. +# Copyright (C) 2002-2018 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 @@ -43,7 +43,7 @@ # 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 . +# 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 @@ -51,7 +51,98 @@ # the same distribution terms as the rest of that program. # # Generated by gnulib-tool. -# Reproduce by: gnulib-tool --import --local-dir=gl --lib=libgreputils --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=gnulib-tests --aux-dir=build-aux --with-tests --avoid=lock-tests --avoid=mbrtowc-tests --avoid=update-copyright-tests --makefile-name=gnulib.mk --no-conditional-dependencies --no-libtool --macro-prefix=gl alloca announce-gen argmatch c-ctype closeout dfa do-release-commit-and-tag error exclude fcntl-h fdl fnmatch fstatat fts getopt-gnu getpagesize getprogname gettext-h git-version-gen gitlog-to-changelog gnu-web-doc-update gnupload ignore-value intprops inttypes isatty isblank iswctype largefile locale lseek maintainer-makefile malloc-gnu manywarnings mbrlen mbrtowc memchr memchr2 mempcpy minmax obstack openat-safer perl propername quote readme-release realloc-gnu regex safe-read same-inode ssize_t stddef stdlib stpcpy strerror string strstr strtoull strtoumax sys_stat unistd unlocked-io update-copyright useless-if-before-free verify version-etc-fsf wchar wcrtomb wctob wctype-h xalloc xbinary-io xstrtoimax +# Reproduce by: +# gnulib-tool --import --local-dir=gl \ +# --lib=libgreputils \ +# --source-base=lib \ +# --m4-base=m4 \ +# --doc-base=doc \ +# --tests-base=gnulib-tests \ +# --aux-dir=build-aux \ +# --with-tests \ +# --makefile-name=gnulib.mk \ +# --no-conditional-dependencies \ +# --no-libtool \ +# --macro-prefix=gl \ +# --avoid=lock-tests \ +# --avoid=mbrtowc-tests \ +# --avoid=update-copyright-tests \ +# alloca \ +# announce-gen \ +# argmatch \ +# c-ctype \ +# c-stack \ +# closeout \ +# configmake \ +# dfa \ +# do-release-commit-and-tag \ +# error \ +# exclude \ +# fcntl-h \ +# fdl \ +# fnmatch \ +# fstatat \ +# fts \ +# getopt-gnu \ +# getpagesize \ +# getprogname \ +# gettext-h \ +# git-version-gen \ +# gitlog-to-changelog \ +# gnu-web-doc-update \ +# gnupload \ +# ignore-value \ +# intprops \ +# inttypes \ +# isatty \ +# isblank \ +# iswctype \ +# largefile \ +# locale \ +# lseek \ +# maintainer-makefile \ +# malloc-gnu \ +# manywarnings \ +# mbrlen \ +# mbrtowc \ +# memchr \ +# memchr2 \ +# mempcpy \ +# minmax \ +# obstack \ +# openat-safer \ +# perl \ +# propername \ +# quote \ +# readme-release \ +# realloc-gnu \ +# regex \ +# safe-read \ +# same-inode \ +# ssize_t \ +# stddef \ +# stdlib \ +# stpcpy \ +# strerror \ +# string \ +# strstr \ +# strtoull \ +# strtoumax \ +# sys_stat \ +# unistd \ +# unlocked-io \ +# update-copyright \ +# useless-if-before-free \ +# verify \ +# version-etc-fsf \ +# wchar \ +# wcrtomb \ +# wctob \ +# wctype-h \ +# windows-stat-inodes \ +# xalloc \ +# xbinary-io \ +# xstrtoimax VPATH = @srcdir@ am__is_gnu_make = { \ @@ -132,17 +223,18 @@ subdir = lib ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \ + $(top_srcdir)/m4/__inline.m4 \ $(top_srcdir)/m4/absolute-header.m4 $(top_srcdir)/m4/alloca.m4 \ - $(top_srcdir)/m4/assert.m4 $(top_srcdir)/m4/btowc.m4 \ - $(top_srcdir)/m4/builtin-expect.m4 \ - $(top_srcdir)/m4/chdir-long.m4 \ + $(top_srcdir)/m4/arpa_inet_h.m4 $(top_srcdir)/m4/assert.m4 \ + $(top_srcdir)/m4/btowc.m4 $(top_srcdir)/m4/builtin-expect.m4 \ + $(top_srcdir)/m4/c-stack.m4 $(top_srcdir)/m4/chdir-long.m4 \ $(top_srcdir)/m4/close-stream.m4 $(top_srcdir)/m4/close.m4 \ $(top_srcdir)/m4/closedir.m4 $(top_srcdir)/m4/closeout.m4 \ $(top_srcdir)/m4/codeset.m4 $(top_srcdir)/m4/configmake.m4 \ $(top_srcdir)/m4/ctype.m4 $(top_srcdir)/m4/cycle-check.m4 \ $(top_srcdir)/m4/d-ino.m4 $(top_srcdir)/m4/d-type.m4 \ - $(top_srcdir)/m4/dirent-safer.m4 $(top_srcdir)/m4/dirent_h.m4 \ - $(top_srcdir)/m4/dirfd.m4 $(top_srcdir)/m4/dirname.m4 \ + $(top_srcdir)/m4/dirent_h.m4 $(top_srcdir)/m4/dirfd.m4 \ + $(top_srcdir)/m4/dirname.m4 \ $(top_srcdir)/m4/double-slash-root.m4 $(top_srcdir)/m4/dup.m4 \ $(top_srcdir)/m4/dup2.m4 $(top_srcdir)/m4/eealloc.m4 \ $(top_srcdir)/m4/environ.m4 $(top_srcdir)/m4/errno_h.m4 \ @@ -154,32 +246,38 @@ $(top_srcdir)/m4/fdopen.m4 $(top_srcdir)/m4/fdopendir.m4 \ $(top_srcdir)/m4/filenamecat.m4 $(top_srcdir)/m4/flexmember.m4 \ $(top_srcdir)/m4/float_h.m4 $(top_srcdir)/m4/fnmatch.m4 \ - $(top_srcdir)/m4/fpending.m4 $(top_srcdir)/m4/fpieee.m4 \ - $(top_srcdir)/m4/fstat.m4 $(top_srcdir)/m4/fstatat.m4 \ + $(top_srcdir)/m4/fnmatch_h.m4 $(top_srcdir)/m4/fpending.m4 \ + $(top_srcdir)/m4/fpieee.m4 $(top_srcdir)/m4/fstat.m4 \ + $(top_srcdir)/m4/fstatat.m4 $(top_srcdir)/m4/ftruncate.m4 \ $(top_srcdir)/m4/fts.m4 $(top_srcdir)/m4/getcwd.m4 \ $(top_srcdir)/m4/getdtablesize.m4 $(top_srcdir)/m4/getopt.m4 \ $(top_srcdir)/m4/getpagesize.m4 \ $(top_srcdir)/m4/getprogname.m4 $(top_srcdir)/m4/gettext.m4 \ - $(top_srcdir)/m4/glibc21.m4 $(top_srcdir)/m4/gnulib-common.m4 \ + $(top_srcdir)/m4/gettimeofday.m4 $(top_srcdir)/m4/glibc21.m4 \ + $(top_srcdir)/m4/gnulib-common.m4 \ $(top_srcdir)/m4/gnulib-comp.m4 \ - $(top_srcdir)/m4/hard-locale.m4 $(top_srcdir)/m4/i-ring.m4 \ + $(top_srcdir)/m4/host-cpu-c-abi.m4 $(top_srcdir)/m4/i-ring.m4 \ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/iconv_h.m4 \ $(top_srcdir)/m4/iconv_open.m4 \ - $(top_srcdir)/m4/include_next.m4 $(top_srcdir)/m4/inline.m4 \ + $(top_srcdir)/m4/include_next.m4 $(top_srcdir)/m4/inet_pton.m4 \ + $(top_srcdir)/m4/inline.m4 \ + $(top_srcdir)/m4/intl-thread-locale.m4 \ $(top_srcdir)/m4/intlmacosx.m4 $(top_srcdir)/m4/intmax_t.m4 \ $(top_srcdir)/m4/inttostr.m4 $(top_srcdir)/m4/inttypes-pri.m4 \ $(top_srcdir)/m4/inttypes.m4 $(top_srcdir)/m4/inttypes_h.m4 \ - $(top_srcdir)/m4/isatty.m4 $(top_srcdir)/m4/isblank.m4 \ - $(top_srcdir)/m4/iswblank.m4 $(top_srcdir)/m4/iswctype.m4 \ - $(top_srcdir)/m4/langinfo_h.m4 $(top_srcdir)/m4/largefile.m4 \ - $(top_srcdir)/m4/lcmessage.m4 $(top_srcdir)/m4/lib-ld.m4 \ - $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ + $(top_srcdir)/m4/ioctl.m4 $(top_srcdir)/m4/isatty.m4 \ + $(top_srcdir)/m4/isblank.m4 $(top_srcdir)/m4/iswblank.m4 \ + $(top_srcdir)/m4/iswctype.m4 $(top_srcdir)/m4/langinfo_h.m4 \ + $(top_srcdir)/m4/largefile.m4 $(top_srcdir)/m4/lcmessage.m4 \ + $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ + $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libsigsegv.m4 \ $(top_srcdir)/m4/libunistring-base.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-tr.m4 $(top_srcdir)/m4/locale-zh.m4 \ $(top_srcdir)/m4/locale_h.m4 $(top_srcdir)/m4/localeconv.m4 \ - $(top_srcdir)/m4/localename.m4 $(top_srcdir)/m4/lock.m4 \ + $(top_srcdir)/m4/localename.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/manywarnings.m4 \ @@ -192,35 +290,46 @@ $(top_srcdir)/m4/minmax.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/nanosleep.m4 $(top_srcdir)/m4/netinet_in_h.m4 \ $(top_srcdir)/m4/nl_langinfo.m4 $(top_srcdir)/m4/nls.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/off_t.m4 $(top_srcdir)/m4/open-cloexec.m4 \ $(top_srcdir)/m4/open.m4 $(top_srcdir)/m4/openat.m4 \ $(top_srcdir)/m4/opendir.m4 $(top_srcdir)/m4/pathmax.m4 \ $(top_srcdir)/m4/pcre.m4 $(top_srcdir)/m4/perl.m4 \ - $(top_srcdir)/m4/pipe.m4 $(top_srcdir)/m4/pkg.m4 \ - $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/printf.m4 \ - $(top_srcdir)/m4/progtest.m4 \ + $(top_srcdir)/m4/perror.m4 $(top_srcdir)/m4/pipe.m4 \ + $(top_srcdir)/m4/pkg.m4 $(top_srcdir)/m4/po.m4 \ + $(top_srcdir)/m4/printf.m4 $(top_srcdir)/m4/progtest.m4 \ $(top_srcdir)/m4/pthread_rwlock_rdlock.m4 \ $(top_srcdir)/m4/putenv.m4 $(top_srcdir)/m4/quote.m4 \ - $(top_srcdir)/m4/quotearg.m4 $(top_srcdir)/m4/read.m4 \ - $(top_srcdir)/m4/readdir.m4 $(top_srcdir)/m4/realloc.m4 \ - $(top_srcdir)/m4/regex.m4 $(top_srcdir)/m4/safe-read.m4 \ - $(top_srcdir)/m4/save-cwd.m4 $(top_srcdir)/m4/setenv.m4 \ - $(top_srcdir)/m4/setlocale.m4 $(top_srcdir)/m4/size_max.m4 \ - $(top_srcdir)/m4/snprintf.m4 $(top_srcdir)/m4/ssize_t.m4 \ - $(top_srcdir)/m4/stat.m4 $(top_srcdir)/m4/std-gnu11.m4 \ - $(top_srcdir)/m4/stdalign.m4 $(top_srcdir)/m4/stdarg.m4 \ - $(top_srcdir)/m4/stdbool.m4 $(top_srcdir)/m4/stddef_h.m4 \ - $(top_srcdir)/m4/stdint.m4 $(top_srcdir)/m4/stdint_h.m4 \ - $(top_srcdir)/m4/stdio_h.m4 $(top_srcdir)/m4/stdlib_h.m4 \ - $(top_srcdir)/m4/stpcpy.m4 $(top_srcdir)/m4/strdup.m4 \ - $(top_srcdir)/m4/strerror.m4 $(top_srcdir)/m4/string_h.m4 \ + $(top_srcdir)/m4/quotearg.m4 $(top_srcdir)/m4/raise.m4 \ + $(top_srcdir)/m4/read.m4 $(top_srcdir)/m4/readdir.m4 \ + $(top_srcdir)/m4/realloc.m4 $(top_srcdir)/m4/regex.m4 \ + $(top_srcdir)/m4/safe-read.m4 $(top_srcdir)/m4/save-cwd.m4 \ + $(top_srcdir)/m4/select.m4 $(top_srcdir)/m4/setenv.m4 \ + $(top_srcdir)/m4/setlocale.m4 $(top_srcdir)/m4/sigaction.m4 \ + $(top_srcdir)/m4/signal_h.m4 \ + $(top_srcdir)/m4/signalblocking.m4 \ + $(top_srcdir)/m4/size_max.m4 $(top_srcdir)/m4/sleep.m4 \ + $(top_srcdir)/m4/snprintf.m4 $(top_srcdir)/m4/socketlib.m4 \ + $(top_srcdir)/m4/sockets.m4 $(top_srcdir)/m4/socklen.m4 \ + $(top_srcdir)/m4/sockpfaf.m4 $(top_srcdir)/m4/ssize_t.m4 \ + $(top_srcdir)/m4/stat-time.m4 $(top_srcdir)/m4/stat.m4 \ + $(top_srcdir)/m4/std-gnu11.m4 $(top_srcdir)/m4/stdalign.m4 \ + $(top_srcdir)/m4/stdarg.m4 $(top_srcdir)/m4/stdbool.m4 \ + $(top_srcdir)/m4/stddef_h.m4 $(top_srcdir)/m4/stdint.m4 \ + $(top_srcdir)/m4/stdint_h.m4 $(top_srcdir)/m4/stdio_h.m4 \ + $(top_srcdir)/m4/stdlib_h.m4 $(top_srcdir)/m4/stpcpy.m4 \ + $(top_srcdir)/m4/strdup.m4 $(top_srcdir)/m4/strerror.m4 \ + $(top_srcdir)/m4/strerror_r.m4 $(top_srcdir)/m4/string_h.m4 \ $(top_srcdir)/m4/strnlen.m4 $(top_srcdir)/m4/strstr.m4 \ $(top_srcdir)/m4/strtoimax.m4 $(top_srcdir)/m4/strtoll.m4 \ $(top_srcdir)/m4/strtoull.m4 $(top_srcdir)/m4/strtoumax.m4 \ - $(top_srcdir)/m4/symlink.m4 $(top_srcdir)/m4/sys_socket_h.m4 \ - $(top_srcdir)/m4/sys_stat_h.m4 $(top_srcdir)/m4/sys_types_h.m4 \ + $(top_srcdir)/m4/symlink.m4 $(top_srcdir)/m4/sys_ioctl_h.m4 \ + $(top_srcdir)/m4/sys_select_h.m4 \ + $(top_srcdir)/m4/sys_socket_h.m4 \ + $(top_srcdir)/m4/sys_stat_h.m4 $(top_srcdir)/m4/sys_time_h.m4 \ + $(top_srcdir)/m4/sys_types_h.m4 $(top_srcdir)/m4/sys_uio_h.m4 \ $(top_srcdir)/m4/threadlib.m4 $(top_srcdir)/m4/time_h.m4 \ $(top_srcdir)/m4/unistd-safer.m4 $(top_srcdir)/m4/unistd_h.m4 \ $(top_srcdir)/m4/unlocked-io.m4 $(top_srcdir)/m4/vasnprintf.m4 \ @@ -229,9 +338,11 @@ $(top_srcdir)/m4/wchar_h.m4 $(top_srcdir)/m4/wchar_t.m4 \ $(top_srcdir)/m4/wcrtomb.m4 $(top_srcdir)/m4/wctob.m4 \ $(top_srcdir)/m4/wctomb.m4 $(top_srcdir)/m4/wctype_h.m4 \ - $(top_srcdir)/m4/wcwidth.m4 $(top_srcdir)/m4/wint_t.m4 \ - $(top_srcdir)/m4/xalloc.m4 $(top_srcdir)/m4/xsize.m4 \ - $(top_srcdir)/m4/xstrtol.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/m4/wcwidth.m4 \ + $(top_srcdir)/m4/windows-stat-inodes.m4 \ + $(top_srcdir)/m4/wint_t.m4 $(top_srcdir)/m4/xalloc.m4 \ + $(top_srcdir)/m4/xsize.m4 $(top_srcdir)/m4/xstrtol.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) @@ -247,46 +358,49 @@ libgreputils_a_AR = $(AR) $(ARFLAGS) am__DEPENDENCIES_1 = am__libgreputils_a_SOURCES_DIST = argmatch.c binary-io.h binary-io.c \ - bitrotate.h bitrotate.c c-ctype.h c-ctype.c c-strcase.h \ - c-strcasecmp.c c-strncasecmp.c cloexec.c close-stream.c \ - closeout.c cycle-check.c dfa.c localeinfo.c opendir-safer.c \ + bitrotate.h bitrotate.c c-ctype.h c-ctype.c c-stack.h \ + c-stack.c c-strcase.h c-strcasecmp.c c-strncasecmp.c cloexec.c \ + close-stream.c closeout.c cycle-check.c dfa.c localeinfo.c \ dirname-lgpl.c basename-lgpl.c stripslash.c exclude.c \ exitfail.c creat-safer.c open-safer.c fd-hook.c \ - filenamecat-lgpl.c getprogname.h getprogname.c gettext.h \ - hard-locale.c hash.c i-ring.c localcharset.h localcharset.c \ - glthread/lock.h glthread/lock.c malloca.c mbchar.c mbiter.h \ - mbiter.c mbscasecmp.c mbslen.c mbsstr.c mbuiter.h mbuiter.c \ - memchr2.h memchr2.c minmax.h openat-die.c openat-safer.c \ - propername.h propername.c quotearg.c safe-read.c save-cwd.c \ - striconv.h striconv.c strnlen1.h strnlen1.c \ + fd-safer-flag.c dup-safer-flag.c filenamecat-lgpl.c \ + getprogname.h getprogname.c gettext.h hard-locale.c hash.c \ + i-ring.c localcharset.c glthread/lock.h glthread/lock.c \ + malloca.c mbchar.c mbiter.h mbiter.c mbscasecmp.c mbslen.c \ + mbsstr.c mbuiter.h mbuiter.c memchr2.h memchr2.c minmax.h \ + openat-die.c openat-safer.c opendirat.c propername.h \ + propername.c quotearg.c safe-read.c save-cwd.c sig-handler.c \ + stat-time.c striconv.h striconv.c strnlen1.h strnlen1.c \ glthread/threadlib.c trim.c unistd.c dup-safer.c fd-safer.c \ pipe-safer.c unistr/u8-mbtoucr.c unistr/u8-uctomb.c \ unistr/u8-uctomb-aux.c uniwidth/width.c version-etc.h \ version-etc.c version-etc-fsf.c wctype-h.c xmalloc.c \ xalloc-die.c xbinary-io.h xbinary-io.c xstriconv.h xstriconv.c \ xstrtoimax.c xstrtol.c xstrtoul.c xstrtol-error.c colorize.h -am__dirstamp = .dirstamp +am__dirstamp = $(am__leading_dot)dirstamp @LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUCR_TRUE@am__objects_1 = unistr/u8-mbtoucr.$(OBJEXT) @LIBUNISTRING_COMPILE_UNISTR_U8_UCTOMB_TRUE@am__objects_2 = unistr/u8-uctomb.$(OBJEXT) \ @LIBUNISTRING_COMPILE_UNISTR_U8_UCTOMB_TRUE@ unistr/u8-uctomb-aux.$(OBJEXT) @LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_TRUE@am__objects_3 = uniwidth/width.$(OBJEXT) am_libgreputils_a_OBJECTS = argmatch.$(OBJEXT) binary-io.$(OBJEXT) \ - bitrotate.$(OBJEXT) c-ctype.$(OBJEXT) c-strcasecmp.$(OBJEXT) \ - c-strncasecmp.$(OBJEXT) cloexec.$(OBJEXT) \ - close-stream.$(OBJEXT) closeout.$(OBJEXT) \ + bitrotate.$(OBJEXT) c-ctype.$(OBJEXT) c-stack.$(OBJEXT) \ + c-strcasecmp.$(OBJEXT) c-strncasecmp.$(OBJEXT) \ + cloexec.$(OBJEXT) close-stream.$(OBJEXT) closeout.$(OBJEXT) \ cycle-check.$(OBJEXT) dfa.$(OBJEXT) localeinfo.$(OBJEXT) \ - opendir-safer.$(OBJEXT) dirname-lgpl.$(OBJEXT) \ - basename-lgpl.$(OBJEXT) stripslash.$(OBJEXT) exclude.$(OBJEXT) \ - exitfail.$(OBJEXT) creat-safer.$(OBJEXT) open-safer.$(OBJEXT) \ - fd-hook.$(OBJEXT) filenamecat-lgpl.$(OBJEXT) \ - getprogname.$(OBJEXT) hard-locale.$(OBJEXT) hash.$(OBJEXT) \ - i-ring.$(OBJEXT) localcharset.$(OBJEXT) \ - glthread/lock.$(OBJEXT) malloca.$(OBJEXT) mbchar.$(OBJEXT) \ - mbiter.$(OBJEXT) mbscasecmp.$(OBJEXT) mbslen.$(OBJEXT) \ - mbsstr.$(OBJEXT) mbuiter.$(OBJEXT) memchr2.$(OBJEXT) \ - openat-die.$(OBJEXT) openat-safer.$(OBJEXT) \ + dirname-lgpl.$(OBJEXT) basename-lgpl.$(OBJEXT) \ + stripslash.$(OBJEXT) exclude.$(OBJEXT) exitfail.$(OBJEXT) \ + creat-safer.$(OBJEXT) open-safer.$(OBJEXT) fd-hook.$(OBJEXT) \ + fd-safer-flag.$(OBJEXT) dup-safer-flag.$(OBJEXT) \ + filenamecat-lgpl.$(OBJEXT) getprogname.$(OBJEXT) \ + hard-locale.$(OBJEXT) hash.$(OBJEXT) i-ring.$(OBJEXT) \ + localcharset.$(OBJEXT) glthread/lock.$(OBJEXT) \ + malloca.$(OBJEXT) mbchar.$(OBJEXT) mbiter.$(OBJEXT) \ + mbscasecmp.$(OBJEXT) mbslen.$(OBJEXT) mbsstr.$(OBJEXT) \ + mbuiter.$(OBJEXT) memchr2.$(OBJEXT) openat-die.$(OBJEXT) \ + openat-safer.$(OBJEXT) opendirat.$(OBJEXT) \ propername.$(OBJEXT) quotearg.$(OBJEXT) safe-read.$(OBJEXT) \ - save-cwd.$(OBJEXT) striconv.$(OBJEXT) strnlen1.$(OBJEXT) \ + save-cwd.$(OBJEXT) sig-handler.$(OBJEXT) stat-time.$(OBJEXT) \ + striconv.$(OBJEXT) strnlen1.$(OBJEXT) \ glthread/threadlib.$(OBJEXT) trim.$(OBJEXT) unistd.$(OBJEXT) \ dup-safer.$(OBJEXT) fd-safer.$(OBJEXT) pipe-safer.$(OBJEXT) \ $(am__objects_1) $(am__objects_2) $(am__objects_3) \ @@ -316,27 +430,29 @@ ./$(DEPDIR)/at-func.Po ./$(DEPDIR)/basename-lgpl.Po \ ./$(DEPDIR)/binary-io.Po ./$(DEPDIR)/bitrotate.Po \ ./$(DEPDIR)/btowc.Po ./$(DEPDIR)/c-ctype.Po \ - ./$(DEPDIR)/c-strcasecmp.Po ./$(DEPDIR)/c-strncasecmp.Po \ - ./$(DEPDIR)/chdir-long.Po ./$(DEPDIR)/cloexec.Po \ - ./$(DEPDIR)/close-stream.Po ./$(DEPDIR)/close.Po \ - ./$(DEPDIR)/closedir.Po ./$(DEPDIR)/closeout.Po \ - ./$(DEPDIR)/colorize.Po ./$(DEPDIR)/creat-safer.Po \ - ./$(DEPDIR)/cycle-check.Po ./$(DEPDIR)/dfa.Po \ - ./$(DEPDIR)/dirfd.Po ./$(DEPDIR)/dirname-lgpl.Po \ + ./$(DEPDIR)/c-stack.Po ./$(DEPDIR)/c-strcasecmp.Po \ + ./$(DEPDIR)/c-strncasecmp.Po ./$(DEPDIR)/chdir-long.Po \ + ./$(DEPDIR)/cloexec.Po ./$(DEPDIR)/close-stream.Po \ + ./$(DEPDIR)/close.Po ./$(DEPDIR)/closedir.Po \ + ./$(DEPDIR)/closeout.Po ./$(DEPDIR)/colorize.Po \ + ./$(DEPDIR)/creat-safer.Po ./$(DEPDIR)/cycle-check.Po \ + ./$(DEPDIR)/dfa.Po ./$(DEPDIR)/dirfd.Po \ + ./$(DEPDIR)/dirname-lgpl.Po ./$(DEPDIR)/dup-safer-flag.Po \ ./$(DEPDIR)/dup-safer.Po ./$(DEPDIR)/dup.Po \ ./$(DEPDIR)/dup2.Po ./$(DEPDIR)/error.Po \ ./$(DEPDIR)/exclude.Po ./$(DEPDIR)/exitfail.Po \ ./$(DEPDIR)/fchdir.Po ./$(DEPDIR)/fcntl.Po \ - ./$(DEPDIR)/fd-hook.Po ./$(DEPDIR)/fd-safer.Po \ - ./$(DEPDIR)/fdopendir.Po ./$(DEPDIR)/filenamecat-lgpl.Po \ - ./$(DEPDIR)/fnmatch.Po ./$(DEPDIR)/fnmatch_loop.Po \ - ./$(DEPDIR)/fpending.Po ./$(DEPDIR)/fstat.Po \ - ./$(DEPDIR)/fstatat.Po ./$(DEPDIR)/fts-cycle.Po \ - ./$(DEPDIR)/fts.Po ./$(DEPDIR)/getcwd-lgpl.Po \ - ./$(DEPDIR)/getdtablesize.Po ./$(DEPDIR)/getopt.Po \ - ./$(DEPDIR)/getopt1.Po ./$(DEPDIR)/getpagesize.Po \ - ./$(DEPDIR)/getprogname.Po ./$(DEPDIR)/hard-locale.Po \ - ./$(DEPDIR)/hash.Po ./$(DEPDIR)/i-ring.Po ./$(DEPDIR)/iconv.Po \ + ./$(DEPDIR)/fd-hook.Po ./$(DEPDIR)/fd-safer-flag.Po \ + ./$(DEPDIR)/fd-safer.Po ./$(DEPDIR)/fdopendir.Po \ + ./$(DEPDIR)/filenamecat-lgpl.Po ./$(DEPDIR)/fnmatch.Po \ + ./$(DEPDIR)/fnmatch_loop.Po ./$(DEPDIR)/fpending.Po \ + ./$(DEPDIR)/fstat.Po ./$(DEPDIR)/fstatat.Po \ + ./$(DEPDIR)/fts-cycle.Po ./$(DEPDIR)/fts.Po \ + ./$(DEPDIR)/getcwd-lgpl.Po ./$(DEPDIR)/getdtablesize.Po \ + ./$(DEPDIR)/getopt.Po ./$(DEPDIR)/getopt1.Po \ + ./$(DEPDIR)/getpagesize.Po ./$(DEPDIR)/getprogname.Po \ + ./$(DEPDIR)/hard-locale.Po ./$(DEPDIR)/hash.Po \ + ./$(DEPDIR)/i-ring.Po ./$(DEPDIR)/iconv.Po \ ./$(DEPDIR)/iconv_close.Po ./$(DEPDIR)/iconv_open.Po \ ./$(DEPDIR)/isatty.Po ./$(DEPDIR)/isblank.Po \ ./$(DEPDIR)/iswblank.Po ./$(DEPDIR)/iswctype.Po \ @@ -356,36 +472,38 @@ ./$(DEPDIR)/obstack.Po ./$(DEPDIR)/open-safer.Po \ ./$(DEPDIR)/open.Po ./$(DEPDIR)/openat-die.Po \ ./$(DEPDIR)/openat-proc.Po ./$(DEPDIR)/openat-safer.Po \ - ./$(DEPDIR)/openat.Po ./$(DEPDIR)/opendir-safer.Po \ - ./$(DEPDIR)/opendir.Po ./$(DEPDIR)/pipe-safer.Po \ + ./$(DEPDIR)/openat.Po ./$(DEPDIR)/opendir.Po \ + ./$(DEPDIR)/opendirat.Po ./$(DEPDIR)/pipe-safer.Po \ ./$(DEPDIR)/propername.Po ./$(DEPDIR)/quotearg.Po \ - ./$(DEPDIR)/read.Po ./$(DEPDIR)/readdir.Po \ - ./$(DEPDIR)/realloc.Po ./$(DEPDIR)/regcomp.Po \ - ./$(DEPDIR)/regex.Po ./$(DEPDIR)/regex_internal.Po \ - ./$(DEPDIR)/regexec.Po ./$(DEPDIR)/safe-read.Po \ - ./$(DEPDIR)/save-cwd.Po ./$(DEPDIR)/stat-w32.Po \ - ./$(DEPDIR)/stat.Po ./$(DEPDIR)/stpcpy.Po \ - ./$(DEPDIR)/strdup.Po ./$(DEPDIR)/strerror-override.Po \ - ./$(DEPDIR)/strerror.Po ./$(DEPDIR)/striconv.Po \ - ./$(DEPDIR)/stripslash.Po ./$(DEPDIR)/strnlen.Po \ - ./$(DEPDIR)/strnlen1.Po ./$(DEPDIR)/strstr.Po \ - ./$(DEPDIR)/strtoimax.Po ./$(DEPDIR)/strtol.Po \ - ./$(DEPDIR)/strtoll.Po ./$(DEPDIR)/strtoul.Po \ - ./$(DEPDIR)/strtoull.Po ./$(DEPDIR)/strtoumax.Po \ - ./$(DEPDIR)/trim.Po ./$(DEPDIR)/unistd.Po \ - ./$(DEPDIR)/version-etc-fsf.Po ./$(DEPDIR)/version-etc.Po \ - ./$(DEPDIR)/wcrtomb.Po ./$(DEPDIR)/wctob.Po \ - ./$(DEPDIR)/wctomb.Po ./$(DEPDIR)/wctype-h.Po \ - ./$(DEPDIR)/wcwidth.Po ./$(DEPDIR)/xalloc-die.Po \ - ./$(DEPDIR)/xbinary-io.Po ./$(DEPDIR)/xmalloc.Po \ - ./$(DEPDIR)/xstriconv.Po ./$(DEPDIR)/xstrtoimax.Po \ - ./$(DEPDIR)/xstrtol-error.Po ./$(DEPDIR)/xstrtol.Po \ - ./$(DEPDIR)/xstrtoul.Po glthread/$(DEPDIR)/lock.Po \ - glthread/$(DEPDIR)/threadlib.Po unistr/$(DEPDIR)/u8-mbtoucr.Po \ + ./$(DEPDIR)/raise.Po ./$(DEPDIR)/read.Po \ + ./$(DEPDIR)/readdir.Po ./$(DEPDIR)/realloc.Po \ + ./$(DEPDIR)/regcomp.Po ./$(DEPDIR)/regex.Po \ + ./$(DEPDIR)/regex_internal.Po ./$(DEPDIR)/regexec.Po \ + ./$(DEPDIR)/safe-read.Po ./$(DEPDIR)/save-cwd.Po \ + ./$(DEPDIR)/sig-handler.Po ./$(DEPDIR)/sigaction.Po \ + ./$(DEPDIR)/sigprocmask.Po ./$(DEPDIR)/stat-time.Po \ + ./$(DEPDIR)/stat-w32.Po ./$(DEPDIR)/stat.Po \ + ./$(DEPDIR)/stpcpy.Po ./$(DEPDIR)/strdup.Po \ + ./$(DEPDIR)/strerror-override.Po ./$(DEPDIR)/strerror.Po \ + ./$(DEPDIR)/striconv.Po ./$(DEPDIR)/stripslash.Po \ + ./$(DEPDIR)/strnlen.Po ./$(DEPDIR)/strnlen1.Po \ + ./$(DEPDIR)/strstr.Po ./$(DEPDIR)/strtoimax.Po \ + ./$(DEPDIR)/strtol.Po ./$(DEPDIR)/strtoll.Po \ + ./$(DEPDIR)/strtoul.Po ./$(DEPDIR)/strtoull.Po \ + ./$(DEPDIR)/strtoumax.Po ./$(DEPDIR)/trim.Po \ + ./$(DEPDIR)/unistd.Po ./$(DEPDIR)/version-etc-fsf.Po \ + ./$(DEPDIR)/version-etc.Po ./$(DEPDIR)/wcrtomb.Po \ + ./$(DEPDIR)/wctob.Po ./$(DEPDIR)/wctomb.Po \ + ./$(DEPDIR)/wctype-h.Po ./$(DEPDIR)/wcwidth.Po \ + ./$(DEPDIR)/xalloc-die.Po ./$(DEPDIR)/xbinary-io.Po \ + ./$(DEPDIR)/xmalloc.Po ./$(DEPDIR)/xstriconv.Po \ + ./$(DEPDIR)/xstrtoimax.Po ./$(DEPDIR)/xstrtol-error.Po \ + ./$(DEPDIR)/xstrtol.Po ./$(DEPDIR)/xstrtoul.Po \ + glthread/$(DEPDIR)/lock.Po glthread/$(DEPDIR)/threadlib.Po \ + unistr/$(DEPDIR)/u8-mbtoucr.Po \ unistr/$(DEPDIR)/u8-uctomb-aux.Po \ unistr/$(DEPDIR)/u8-uctomb.Po uniwidth/$(DEPDIR)/width.Po am__mv = mv -f -am__set_depbase = depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.[^.]*$$||'` COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) @@ -477,8 +595,11 @@ GLIBC21 = @GLIBC21@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ +GNULIB_ACCEPT = @GNULIB_ACCEPT@ +GNULIB_ACCEPT4 = @GNULIB_ACCEPT4@ GNULIB_ALPHASORT = @GNULIB_ALPHASORT@ GNULIB_ATOLL = @GNULIB_ATOLL@ +GNULIB_BIND = @GNULIB_BIND@ GNULIB_BTOWC = @GNULIB_BTOWC@ GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@ GNULIB_CANONICALIZE_FILE_NAME = @GNULIB_CANONICALIZE_FILE_NAME@ @@ -486,6 +607,7 @@ GNULIB_CHOWN = @GNULIB_CHOWN@ GNULIB_CLOSE = @GNULIB_CLOSE@ GNULIB_CLOSEDIR = @GNULIB_CLOSEDIR@ +GNULIB_CONNECT = @GNULIB_CONNECT@ GNULIB_CTIME = @GNULIB_CTIME@ GNULIB_DIRFD = @GNULIB_DIRFD@ GNULIB_DPRINTF = @GNULIB_DPRINTF@ @@ -495,6 +617,7 @@ GNULIB_DUPLOCALE = @GNULIB_DUPLOCALE@ GNULIB_ENVIRON = @GNULIB_ENVIRON@ GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@ +GNULIB_EXPLICIT_BZERO = @GNULIB_EXPLICIT_BZERO@ GNULIB_FACCESSAT = @GNULIB_FACCESSAT@ GNULIB_FCHDIR = @GNULIB_FCHDIR@ GNULIB_FCHMODAT = @GNULIB_FCHMODAT@ @@ -509,6 +632,7 @@ GNULIB_FFSLL = @GNULIB_FFSLL@ GNULIB_FGETC = @GNULIB_FGETC@ GNULIB_FGETS = @GNULIB_FGETS@ +GNULIB_FNMATCH = @GNULIB_FNMATCH@ GNULIB_FOPEN = @GNULIB_FOPEN@ GNULIB_FPRINTF = @GNULIB_FPRINTF@ GNULIB_FPRINTF_POSIX = @GNULIB_FPRINTF_POSIX@ @@ -541,6 +665,10 @@ GNULIB_GETLOGIN = @GNULIB_GETLOGIN@ GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@ GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@ +GNULIB_GETPASS = @GNULIB_GETPASS@ +GNULIB_GETPEERNAME = @GNULIB_GETPEERNAME@ +GNULIB_GETSOCKNAME = @GNULIB_GETSOCKNAME@ +GNULIB_GETSOCKOPT = @GNULIB_GETSOCKOPT@ GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@ GNULIB_GETTIMEOFDAY = @GNULIB_GETTIMEOFDAY@ GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@ @@ -550,6 +678,9 @@ GNULIB_ICONV = @GNULIB_ICONV@ GNULIB_IMAXABS = @GNULIB_IMAXABS@ GNULIB_IMAXDIV = @GNULIB_IMAXDIV@ +GNULIB_INET_NTOP = @GNULIB_INET_NTOP@ +GNULIB_INET_PTON = @GNULIB_INET_PTON@ +GNULIB_IOCTL = @GNULIB_IOCTL@ GNULIB_ISATTY = @GNULIB_ISATTY@ GNULIB_ISBLANK = @GNULIB_ISBLANK@ GNULIB_ISWBLANK = @GNULIB_ISWBLANK@ @@ -558,7 +689,9 @@ GNULIB_LCHOWN = @GNULIB_LCHOWN@ GNULIB_LINK = @GNULIB_LINK@ GNULIB_LINKAT = @GNULIB_LINKAT@ +GNULIB_LISTEN = @GNULIB_LISTEN@ GNULIB_LOCALECONV = @GNULIB_LOCALECONV@ +GNULIB_LOCALENAME = @GNULIB_LOCALENAME@ GNULIB_LOCALTIME = @GNULIB_LOCALTIME@ GNULIB_LSEEK = @GNULIB_LSEEK@ GNULIB_LSTAT = @GNULIB_LSTAT@ @@ -617,6 +750,8 @@ GNULIB_PREAD = @GNULIB_PREAD@ GNULIB_PRINTF = @GNULIB_PRINTF@ GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@ +GNULIB_PSELECT = @GNULIB_PSELECT@ +GNULIB_PTHREAD_SIGMASK = @GNULIB_PTHREAD_SIGMASK@ GNULIB_PTSNAME = @GNULIB_PTSNAME@ GNULIB_PTSNAME_R = @GNULIB_PTSNAME_R@ GNULIB_PUTC = @GNULIB_PUTC@ @@ -625,6 +760,7 @@ GNULIB_PUTS = @GNULIB_PUTS@ GNULIB_PWRITE = @GNULIB_PWRITE@ GNULIB_QSORT_R = @GNULIB_QSORT_R@ +GNULIB_RAISE = @GNULIB_RAISE@ GNULIB_RANDOM = @GNULIB_RANDOM@ GNULIB_RANDOM_R = @GNULIB_RANDOM_R@ GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@ @@ -632,8 +768,11 @@ GNULIB_READDIR = @GNULIB_READDIR@ GNULIB_READLINK = @GNULIB_READLINK@ GNULIB_READLINKAT = @GNULIB_READLINKAT@ +GNULIB_REALLOCARRAY = @GNULIB_REALLOCARRAY@ GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@ GNULIB_REALPATH = @GNULIB_REALPATH@ +GNULIB_RECV = @GNULIB_RECV@ +GNULIB_RECVFROM = @GNULIB_RECVFROM@ GNULIB_REMOVE = @GNULIB_REMOVE@ GNULIB_RENAME = @GNULIB_RENAME@ GNULIB_RENAMEAT = @GNULIB_RENAMEAT@ @@ -643,11 +782,20 @@ GNULIB_SCANDIR = @GNULIB_SCANDIR@ GNULIB_SCANF = @GNULIB_SCANF@ GNULIB_SECURE_GETENV = @GNULIB_SECURE_GETENV@ +GNULIB_SELECT = @GNULIB_SELECT@ +GNULIB_SEND = @GNULIB_SEND@ +GNULIB_SENDTO = @GNULIB_SENDTO@ GNULIB_SETENV = @GNULIB_SETENV@ GNULIB_SETHOSTNAME = @GNULIB_SETHOSTNAME@ GNULIB_SETLOCALE = @GNULIB_SETLOCALE@ +GNULIB_SETSOCKOPT = @GNULIB_SETSOCKOPT@ +GNULIB_SHUTDOWN = @GNULIB_SHUTDOWN@ +GNULIB_SIGACTION = @GNULIB_SIGACTION@ +GNULIB_SIGNAL_H_SIGPIPE = @GNULIB_SIGNAL_H_SIGPIPE@ +GNULIB_SIGPROCMASK = @GNULIB_SIGPROCMASK@ GNULIB_SLEEP = @GNULIB_SLEEP@ GNULIB_SNPRINTF = @GNULIB_SNPRINTF@ +GNULIB_SOCKET = @GNULIB_SOCKET@ GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@ GNULIB_STAT = @GNULIB_STAT@ GNULIB_STDIO_H_NONBLOCKING = @GNULIB_STDIO_H_NONBLOCKING@ @@ -745,7 +893,9 @@ GNULIB_WRITE = @GNULIB_WRITE@ GNULIB__EXIT = @GNULIB__EXIT@ GREP = @GREP@ +HAVE_ACCEPT4 = @HAVE_ACCEPT4@ HAVE_ALPHASORT = @HAVE_ALPHASORT@ +HAVE_ARPA_INET_H = @HAVE_ARPA_INET_H@ HAVE_ATOLL = @HAVE_ATOLL@ HAVE_BTOWC = @HAVE_BTOWC@ HAVE_C99_STDINT_H = @HAVE_C99_STDINT_H@ @@ -771,12 +921,16 @@ HAVE_DECL_GETUSERSHELL = @HAVE_DECL_GETUSERSHELL@ HAVE_DECL_IMAXABS = @HAVE_DECL_IMAXABS@ HAVE_DECL_IMAXDIV = @HAVE_DECL_IMAXDIV@ +HAVE_DECL_INET_NTOP = @HAVE_DECL_INET_NTOP@ +HAVE_DECL_INET_PTON = @HAVE_DECL_INET_PTON@ +HAVE_DECL_INITSTATE = @HAVE_DECL_INITSTATE@ HAVE_DECL_LOCALTIME_R = @HAVE_DECL_LOCALTIME_R@ HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@ HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@ HAVE_DECL_OBSTACK_PRINTF = @HAVE_DECL_OBSTACK_PRINTF@ HAVE_DECL_SETENV = @HAVE_DECL_SETENV@ HAVE_DECL_SETHOSTNAME = @HAVE_DECL_SETHOSTNAME@ +HAVE_DECL_SETSTATE = @HAVE_DECL_SETSTATE@ HAVE_DECL_SNPRINTF = @HAVE_DECL_SNPRINTF@ HAVE_DECL_STRDUP = @HAVE_DECL_STRDUP@ HAVE_DECL_STRERROR_R = @HAVE_DECL_STRERROR_R@ @@ -786,6 +940,7 @@ HAVE_DECL_STRTOIMAX = @HAVE_DECL_STRTOIMAX@ HAVE_DECL_STRTOK_R = @HAVE_DECL_STRTOK_R@ HAVE_DECL_STRTOUMAX = @HAVE_DECL_STRTOUMAX@ +HAVE_DECL_TRUNCATE = @HAVE_DECL_TRUNCATE@ HAVE_DECL_TTYNAME_R = @HAVE_DECL_TTYNAME_R@ HAVE_DECL_UNSETENV = @HAVE_DECL_UNSETENV@ HAVE_DECL_VSNPRINTF = @HAVE_DECL_VSNPRINTF@ @@ -797,6 +952,7 @@ HAVE_DUP3 = @HAVE_DUP3@ HAVE_DUPLOCALE = @HAVE_DUPLOCALE@ HAVE_EUIDACCESS = @HAVE_EUIDACCESS@ +HAVE_EXPLICIT_BZERO = @HAVE_EXPLICIT_BZERO@ HAVE_FACCESSAT = @HAVE_FACCESSAT@ HAVE_FCHDIR = @HAVE_FCHDIR@ HAVE_FCHMODAT = @HAVE_FCHMODAT@ @@ -807,6 +963,9 @@ HAVE_FEATURES_H = @HAVE_FEATURES_H@ HAVE_FFSL = @HAVE_FFSL@ HAVE_FFSLL = @HAVE_FFSLL@ +HAVE_FNMATCH = @HAVE_FNMATCH@ +HAVE_FNMATCH_H = @HAVE_FNMATCH_H@ +HAVE_FREELOCALE = @HAVE_FREELOCALE@ HAVE_FSEEKO = @HAVE_FSEEKO@ HAVE_FSTATAT = @HAVE_FSTATAT@ HAVE_FSYNC = @HAVE_FSYNC@ @@ -819,13 +978,17 @@ HAVE_GETLOGIN = @HAVE_GETLOGIN@ HAVE_GETOPT_H = @HAVE_GETOPT_H@ HAVE_GETPAGESIZE = @HAVE_GETPAGESIZE@ +HAVE_GETPASS = @HAVE_GETPASS@ HAVE_GETSUBOPT = @HAVE_GETSUBOPT@ +HAVE_GETTIMEOFDAY = @HAVE_GETTIMEOFDAY@ HAVE_GRANTPT = @HAVE_GRANTPT@ HAVE_GROUP_MEMBER = @HAVE_GROUP_MEMBER@ +HAVE_IMAXDIV_T = @HAVE_IMAXDIV_T@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_ISBLANK = @HAVE_ISBLANK@ HAVE_ISWBLANK = @HAVE_ISWBLANK@ HAVE_ISWCNTRL = @HAVE_ISWCNTRL@ +HAVE_LANGINFO_ALTMON = @HAVE_LANGINFO_ALTMON@ HAVE_LANGINFO_CODESET = @HAVE_LANGINFO_CODESET@ HAVE_LANGINFO_ERA = @HAVE_LANGINFO_ERA@ HAVE_LANGINFO_H = @HAVE_LANGINFO_H@ @@ -833,6 +996,7 @@ HAVE_LANGINFO_YESEXPR = @HAVE_LANGINFO_YESEXPR@ HAVE_LCHMOD = @HAVE_LCHMOD@ HAVE_LCHOWN = @HAVE_LCHOWN@ +HAVE_LIBSIGSEGV = @HAVE_LIBSIGSEGV@ HAVE_LINK = @HAVE_LINK@ HAVE_LINKAT = @HAVE_LINKAT@ HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@ @@ -858,6 +1022,8 @@ HAVE_MKSTEMPS = @HAVE_MKSTEMPS@ HAVE_MSVC_INVALID_PARAMETER_HANDLER = @HAVE_MSVC_INVALID_PARAMETER_HANDLER@ HAVE_NANOSLEEP = @HAVE_NANOSLEEP@ +HAVE_NETINET_IN_H = @HAVE_NETINET_IN_H@ +HAVE_NEWLOCALE = @HAVE_NEWLOCALE@ HAVE_NL_LANGINFO = @HAVE_NL_LANGINFO@ HAVE_OPENAT = @HAVE_OPENAT@ HAVE_OPENDIR = @HAVE_OPENDIR@ @@ -867,11 +1033,15 @@ HAVE_PIPE2 = @HAVE_PIPE2@ HAVE_POPEN = @HAVE_POPEN@ HAVE_POSIX_OPENPT = @HAVE_POSIX_OPENPT@ +HAVE_POSIX_SIGNALBLOCKING = @HAVE_POSIX_SIGNALBLOCKING@ HAVE_PREAD = @HAVE_PREAD@ +HAVE_PSELECT = @HAVE_PSELECT@ +HAVE_PTHREAD_SIGMASK = @HAVE_PTHREAD_SIGMASK@ HAVE_PTSNAME = @HAVE_PTSNAME@ HAVE_PTSNAME_R = @HAVE_PTSNAME_R@ HAVE_PWRITE = @HAVE_PWRITE@ HAVE_QSORT_R = @HAVE_QSORT_R@ +HAVE_RAISE = @HAVE_RAISE@ HAVE_RANDOM = @HAVE_RANDOM@ HAVE_RANDOM_H = @HAVE_RANDOM_H@ HAVE_RANDOM_R = @HAVE_RANDOM_R@ @@ -879,17 +1049,23 @@ HAVE_READDIR = @HAVE_READDIR@ HAVE_READLINK = @HAVE_READLINK@ HAVE_READLINKAT = @HAVE_READLINKAT@ +HAVE_REALLOCARRAY = @HAVE_REALLOCARRAY@ HAVE_REALPATH = @HAVE_REALPATH@ HAVE_RENAMEAT = @HAVE_RENAMEAT@ HAVE_REWINDDIR = @HAVE_REWINDDIR@ HAVE_RPMATCH = @HAVE_RPMATCH@ +HAVE_SA_FAMILY_T = @HAVE_SA_FAMILY_T@ HAVE_SCANDIR = @HAVE_SCANDIR@ HAVE_SECURE_GETENV = @HAVE_SECURE_GETENV@ HAVE_SETENV = @HAVE_SETENV@ HAVE_SETHOSTNAME = @HAVE_SETHOSTNAME@ +HAVE_SIGACTION = @HAVE_SIGACTION@ +HAVE_SIGHANDLER_T = @HAVE_SIGHANDLER_T@ +HAVE_SIGINFO_T = @HAVE_SIGINFO_T@ HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@ HAVE_SIGNED_WCHAR_T = @HAVE_SIGNED_WCHAR_T@ HAVE_SIGNED_WINT_T = @HAVE_SIGNED_WINT_T@ +HAVE_SIGSET_T = @HAVE_SIGSET_T@ HAVE_SLEEP = @HAVE_SLEEP@ HAVE_STDINT_H = @HAVE_STDINT_H@ HAVE_STPCPY = @HAVE_STPCPY@ @@ -903,18 +1079,27 @@ HAVE_STRTOLL = @HAVE_STRTOLL@ HAVE_STRTOULL = @HAVE_STRTOULL@ HAVE_STRUCT_RANDOM_DATA = @HAVE_STRUCT_RANDOM_DATA@ +HAVE_STRUCT_SIGACTION_SA_SIGACTION = @HAVE_STRUCT_SIGACTION_SA_SIGACTION@ +HAVE_STRUCT_SOCKADDR_STORAGE = @HAVE_STRUCT_SOCKADDR_STORAGE@ +HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY = @HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY@ +HAVE_STRUCT_TIMEVAL = @HAVE_STRUCT_TIMEVAL@ HAVE_STRVERSCMP = @HAVE_STRVERSCMP@ HAVE_SYMLINK = @HAVE_SYMLINK@ HAVE_SYMLINKAT = @HAVE_SYMLINKAT@ HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@ HAVE_SYS_CDEFS_H = @HAVE_SYS_CDEFS_H@ HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@ +HAVE_SYS_IOCTL_H = @HAVE_SYS_IOCTL_H@ HAVE_SYS_LOADAVG_H = @HAVE_SYS_LOADAVG_H@ HAVE_SYS_PARAM_H = @HAVE_SYS_PARAM_H@ +HAVE_SYS_SELECT_H = @HAVE_SYS_SELECT_H@ +HAVE_SYS_SOCKET_H = @HAVE_SYS_SOCKET_H@ +HAVE_SYS_TIME_H = @HAVE_SYS_TIME_H@ HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ +HAVE_SYS_UIO_H = @HAVE_SYS_UIO_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@ @@ -963,6 +1148,7 @@ HAVE_WMEMCPY = @HAVE_WMEMCPY@ HAVE_WMEMMOVE = @HAVE_WMEMMOVE@ HAVE_WMEMSET = @HAVE_WMEMSET@ +HAVE_WS2TCPIP_H = @HAVE_WS2TCPIP_H@ HAVE_XLOCALE_H = @HAVE_XLOCALE_H@ HAVE__BOOL = @HAVE__BOOL@ HAVE__EXIT = @HAVE__EXIT@ @@ -970,6 +1156,7 @@ ICONV_H = @ICONV_H@ INCLUDE_NEXT = @INCLUDE_NEXT@ INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@ +INET_PTON_LIB = @INET_PTON_LIB@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -980,6 +1167,7 @@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ LDFLAGS = @LDFLAGS@ +LIBCSTACK = @LIBCSTACK@ LIBGREPUTILS_LIBDEPS = @LIBGREPUTILS_LIBDEPS@ LIBGREPUTILS_LTLIBDEPS = @LIBGREPUTILS_LTLIBDEPS@ LIBICONV = @LIBICONV@ @@ -989,11 +1177,16 @@ LIBPTH = @LIBPTH@ LIBPTH_PREFIX = @LIBPTH_PREFIX@ LIBS = @LIBS@ +LIBSIGSEGV = @LIBSIGSEGV@ +LIBSIGSEGV_PREFIX = @LIBSIGSEGV_PREFIX@ +LIBSOCKET = @LIBSOCKET@ LIBTESTS_LIBDEPS = @LIBTESTS_LIBDEPS@ LIBTHREAD = @LIBTHREAD@ LIBUNISTRING_UNISTR_H = @LIBUNISTRING_UNISTR_H@ LIBUNISTRING_UNITYPES_H = @LIBUNISTRING_UNITYPES_H@ LIBUNISTRING_UNIWIDTH_H = @LIBUNISTRING_UNIWIDTH_H@ +LIB_NANOSLEEP = @LIB_NANOSLEEP@ +LIB_SELECT = @LIB_SELECT@ LIMITS_H = @LIMITS_H@ LOCALCHARSET_TESTS_ENVIRONMENT = @LOCALCHARSET_TESTS_ENVIRONMENT@ LOCALE_FR = @LOCALE_FR@ @@ -1001,36 +1194,49 @@ LOCALE_JA = @LOCALE_JA@ LOCALE_TR_UTF8 = @LOCALE_TR_UTF8@ LOCALE_ZH_CN = @LOCALE_ZH_CN@ +LTLIBCSTACK = @LTLIBCSTACK@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBMULTITHREAD = @LTLIBMULTITHREAD@ LTLIBOBJS = @LTLIBOBJS@ LTLIBPTH = @LTLIBPTH@ +LTLIBSIGSEGV = @LTLIBSIGSEGV@ LTLIBTHREAD = @LTLIBTHREAD@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ +NETINET_IN_H = @NETINET_IN_H@ +NEXT_ARPA_INET_H = @NEXT_ARPA_INET_H@ +NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H = @NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H@ NEXT_AS_FIRST_DIRECTIVE_CTYPE_H = @NEXT_AS_FIRST_DIRECTIVE_CTYPE_H@ NEXT_AS_FIRST_DIRECTIVE_DIRENT_H = @NEXT_AS_FIRST_DIRECTIVE_DIRENT_H@ NEXT_AS_FIRST_DIRECTIVE_ERRNO_H = @NEXT_AS_FIRST_DIRECTIVE_ERRNO_H@ NEXT_AS_FIRST_DIRECTIVE_FCNTL_H = @NEXT_AS_FIRST_DIRECTIVE_FCNTL_H@ NEXT_AS_FIRST_DIRECTIVE_FLOAT_H = @NEXT_AS_FIRST_DIRECTIVE_FLOAT_H@ +NEXT_AS_FIRST_DIRECTIVE_FNMATCH_H = @NEXT_AS_FIRST_DIRECTIVE_FNMATCH_H@ NEXT_AS_FIRST_DIRECTIVE_GETOPT_H = @NEXT_AS_FIRST_DIRECTIVE_GETOPT_H@ NEXT_AS_FIRST_DIRECTIVE_ICONV_H = @NEXT_AS_FIRST_DIRECTIVE_ICONV_H@ NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H = @NEXT_AS_FIRST_DIRECTIVE_INTTYPES_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_NETINET_IN_H = @NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H@ +NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H = @NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H@ NEXT_AS_FIRST_DIRECTIVE_STDARG_H = @NEXT_AS_FIRST_DIRECTIVE_STDARG_H@ NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@ NEXT_AS_FIRST_DIRECTIVE_STDINT_H = @NEXT_AS_FIRST_DIRECTIVE_STDINT_H@ NEXT_AS_FIRST_DIRECTIVE_STDIO_H = @NEXT_AS_FIRST_DIRECTIVE_STDIO_H@ NEXT_AS_FIRST_DIRECTIVE_STDLIB_H = @NEXT_AS_FIRST_DIRECTIVE_STDLIB_H@ NEXT_AS_FIRST_DIRECTIVE_STRING_H = @NEXT_AS_FIRST_DIRECTIVE_STRING_H@ +NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H@ +NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H@ +NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H@ +NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H@ +NEXT_AS_FIRST_DIRECTIVE_SYS_UIO_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_UIO_H@ NEXT_AS_FIRST_DIRECTIVE_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_TIME_H@ NEXT_AS_FIRST_DIRECTIVE_UNISTD_H = @NEXT_AS_FIRST_DIRECTIVE_UNISTD_H@ NEXT_AS_FIRST_DIRECTIVE_WCHAR_H = @NEXT_AS_FIRST_DIRECTIVE_WCHAR_H@ @@ -1040,20 +1246,28 @@ NEXT_ERRNO_H = @NEXT_ERRNO_H@ NEXT_FCNTL_H = @NEXT_FCNTL_H@ NEXT_FLOAT_H = @NEXT_FLOAT_H@ +NEXT_FNMATCH_H = @NEXT_FNMATCH_H@ NEXT_GETOPT_H = @NEXT_GETOPT_H@ NEXT_ICONV_H = @NEXT_ICONV_H@ NEXT_INTTYPES_H = @NEXT_INTTYPES_H@ NEXT_LANGINFO_H = @NEXT_LANGINFO_H@ NEXT_LIMITS_H = @NEXT_LIMITS_H@ NEXT_LOCALE_H = @NEXT_LOCALE_H@ +NEXT_NETINET_IN_H = @NEXT_NETINET_IN_H@ +NEXT_SIGNAL_H = @NEXT_SIGNAL_H@ NEXT_STDARG_H = @NEXT_STDARG_H@ NEXT_STDDEF_H = @NEXT_STDDEF_H@ NEXT_STDINT_H = @NEXT_STDINT_H@ NEXT_STDIO_H = @NEXT_STDIO_H@ NEXT_STDLIB_H = @NEXT_STDLIB_H@ NEXT_STRING_H = @NEXT_STRING_H@ +NEXT_SYS_IOCTL_H = @NEXT_SYS_IOCTL_H@ +NEXT_SYS_SELECT_H = @NEXT_SYS_SELECT_H@ +NEXT_SYS_SOCKET_H = @NEXT_SYS_SOCKET_H@ NEXT_SYS_STAT_H = @NEXT_SYS_STAT_H@ +NEXT_SYS_TIME_H = @NEXT_SYS_TIME_H@ NEXT_SYS_TYPES_H = @NEXT_SYS_TYPES_H@ +NEXT_SYS_UIO_H = @NEXT_SYS_UIO_H@ NEXT_TIME_H = @NEXT_TIME_H@ NEXT_UNISTD_H = @NEXT_UNISTD_H@ NEXT_WCHAR_H = @NEXT_WCHAR_H@ @@ -1093,15 +1307,18 @@ REPLACE_DUP = @REPLACE_DUP@ REPLACE_DUP2 = @REPLACE_DUP2@ REPLACE_DUPLOCALE = @REPLACE_DUPLOCALE@ +REPLACE_FACCESSAT = @REPLACE_FACCESSAT@ REPLACE_FCHOWNAT = @REPLACE_FCHOWNAT@ REPLACE_FCLOSE = @REPLACE_FCLOSE@ REPLACE_FCNTL = @REPLACE_FCNTL@ REPLACE_FDOPEN = @REPLACE_FDOPEN@ REPLACE_FDOPENDIR = @REPLACE_FDOPENDIR@ REPLACE_FFLUSH = @REPLACE_FFLUSH@ +REPLACE_FNMATCH = @REPLACE_FNMATCH@ REPLACE_FOPEN = @REPLACE_FOPEN@ REPLACE_FPRINTF = @REPLACE_FPRINTF@ REPLACE_FPURGE = @REPLACE_FPURGE@ +REPLACE_FREELOCALE = @REPLACE_FREELOCALE@ REPLACE_FREOPEN = @REPLACE_FREOPEN@ REPLACE_FSEEK = @REPLACE_FSEEK@ REPLACE_FSEEKO = @REPLACE_FSEEKO@ @@ -1119,10 +1336,15 @@ REPLACE_GETLINE = @REPLACE_GETLINE@ REPLACE_GETLOGIN_R = @REPLACE_GETLOGIN_R@ REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@ +REPLACE_GETPASS = @REPLACE_GETPASS@ +REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@ REPLACE_GMTIME = @REPLACE_GMTIME@ REPLACE_ICONV = @REPLACE_ICONV@ REPLACE_ICONV_OPEN = @REPLACE_ICONV_OPEN@ REPLACE_ICONV_UTF = @REPLACE_ICONV_UTF@ +REPLACE_INET_NTOP = @REPLACE_INET_NTOP@ +REPLACE_INET_PTON = @REPLACE_INET_PTON@ +REPLACE_IOCTL = @REPLACE_IOCTL@ REPLACE_ISATTY = @REPLACE_ISATTY@ REPLACE_ISWBLANK = @REPLACE_ISWBLANK@ REPLACE_ISWCNTRL = @REPLACE_ISWCNTRL@ @@ -1151,6 +1373,7 @@ REPLACE_MKSTEMP = @REPLACE_MKSTEMP@ REPLACE_MKTIME = @REPLACE_MKTIME@ REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@ +REPLACE_NEWLOCALE = @REPLACE_NEWLOCALE@ REPLACE_NL_LANGINFO = @REPLACE_NL_LANGINFO@ REPLACE_NULL = @REPLACE_NULL@ REPLACE_OBSTACK_PRINTF = @REPLACE_OBSTACK_PRINTF@ @@ -1161,11 +1384,14 @@ REPLACE_POPEN = @REPLACE_POPEN@ REPLACE_PREAD = @REPLACE_PREAD@ REPLACE_PRINTF = @REPLACE_PRINTF@ +REPLACE_PSELECT = @REPLACE_PSELECT@ +REPLACE_PTHREAD_SIGMASK = @REPLACE_PTHREAD_SIGMASK@ REPLACE_PTSNAME = @REPLACE_PTSNAME@ REPLACE_PTSNAME_R = @REPLACE_PTSNAME_R@ REPLACE_PUTENV = @REPLACE_PUTENV@ REPLACE_PWRITE = @REPLACE_PWRITE@ REPLACE_QSORT_R = @REPLACE_QSORT_R@ +REPLACE_RAISE = @REPLACE_RAISE@ REPLACE_RANDOM_R = @REPLACE_RANDOM_R@ REPLACE_READ = @REPLACE_READ@ REPLACE_READLINK = @REPLACE_READLINK@ @@ -1176,6 +1402,7 @@ REPLACE_RENAME = @REPLACE_RENAME@ REPLACE_RENAMEAT = @REPLACE_RENAMEAT@ REPLACE_RMDIR = @REPLACE_RMDIR@ +REPLACE_SELECT = @REPLACE_SELECT@ REPLACE_SETENV = @REPLACE_SETENV@ REPLACE_SETLOCALE = @REPLACE_SETLOCALE@ REPLACE_SLEEP = @REPLACE_SLEEP@ @@ -1201,6 +1428,7 @@ REPLACE_STRTOK_R = @REPLACE_STRTOK_R@ REPLACE_STRTOUMAX = @REPLACE_STRTOUMAX@ REPLACE_STRUCT_LCONV = @REPLACE_STRUCT_LCONV@ +REPLACE_STRUCT_TIMEVAL = @REPLACE_STRUCT_TIMEVAL@ REPLACE_SYMLINK = @REPLACE_SYMLINK@ REPLACE_SYMLINKAT = @REPLACE_SYMLINKAT@ REPLACE_TIMEGM = @REPLACE_TIMEGM@ @@ -1240,6 +1468,8 @@ STDDEF_H = @STDDEF_H@ STDINT_H = @STDINT_H@ STRIP = @STRIP@ +SYS_IOCTL_H_HAVE_WINSOCK2_H = @SYS_IOCTL_H_HAVE_WINSOCK2_H@ +SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@ SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@ TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@ UINT32_MAX_LT_UINTMAX_MAX = @UINT32_MAX_LT_UINTMAX_MAX@ @@ -1268,6 +1498,7 @@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ +am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ @@ -1324,25 +1555,23 @@ fcntl.h $(FNMATCH_H) $(GETOPT_H) $(GETOPT_CDEFS_H) $(ICONV_H) \ iconv_open-aix.h iconv_open-hpux.h iconv_open-irix.h \ iconv_open-osf.h iconv_open-solaris.h inttypes.h langinfo.h \ - $(LIMITS_H) locale.h $(STDALIGN_H) $(STDARG_H) $(STDBOOL_H) \ - $(STDDEF_H) $(STDINT_H) stdio.h stdlib.h string.h sys/stat.h \ - sys/types.h time.h unistd.h $(LIBUNISTRING_UNISTR_H) \ - $(LIBUNISTRING_UNITYPES_H) $(LIBUNISTRING_UNIWIDTH_H) wchar.h \ - wctype.h -CLEANFILES = configmake.h configmake.h-t charset.alias ref-add.sed \ - ref-del.sed colorize.c + $(LIMITS_H) locale.h signal.h $(STDALIGN_H) $(STDARG_H) \ + $(STDBOOL_H) $(STDDEF_H) $(STDINT_H) stdio.h stdlib.h string.h \ + sys/stat.h sys/types.h time.h unistd.h \ + $(LIBUNISTRING_UNISTR_H) $(LIBUNISTRING_UNITYPES_H) \ + $(LIBUNISTRING_UNIWIDTH_H) wchar.h wctype.h +CLEANFILES = configmake.h configmake.h-t colorize.c EXTRA_DIST = alignof.h alloca.c alloca.in.h \ $(top_srcdir)/build-aux/announce-gen argmatch.h assure.h \ openat-priv.h openat-proc.c btowc.c c-strcaseeq.h chdir-long.c \ chdir-long.h cloexec.h close.c close-stream.h closedir.c \ dirent-private.h closeout.h ctype.in.h cycle-check.h dev-ino.h \ - dfa.h localeinfo.h dirent.in.h dirent--.h dirent-safer.h \ - dirfd.c dirname.h \ + dfa.h localeinfo.h dirent.in.h dirfd.c dirname.h \ $(top_srcdir)/build-aux/do-release-commit-and-tag dosname.h \ dup.c dup2.c errno.in.h error.c error.h exclude.h exitfail.h \ fchdir.c fcntl.c fcntl.in.h fcntl--.h fcntl-safer.h fd-hook.h \ fdopendir.c filename.h filenamecat.h flexmember.h fnmatch.c \ - fnmatch.in.h fnmatch_loop.c fpending.c fpending.h stdio-impl.h \ + fnmatch_loop.c fnmatch.in.h fpending.c fpending.h stdio-impl.h \ fstat.c stat-w32.c stat-w32.h at-func.c fstatat.c fts-cycle.c \ fts.c fts_.h $(top_srcdir)/build-aux/gendocs.sh getcwd-lgpl.c \ getdtablesize.c getopt-cdefs.in.h getopt-core.h getopt-ext.h \ @@ -1359,28 +1588,30 @@ iconv_open-hpux.gperf iconv_open-irix.gperf \ iconv_open-osf.gperf iconv_open-solaris.gperf iconv_open.c \ ignore-value.h intprops.h inttypes.in.h isatty.c isblank.c \ - iswblank.c iswctype-impl.h iswctype.c langinfo.in.h \ - limits.in.h config.charset ref-add.sin ref-del.sin locale.in.h \ + iswblank.c iswctype-impl.h iswctype.c langinfo.in.h cdefs.h \ + libc-config.h limits.in.h localcharset.h locale.in.h \ localeconv.c lseek.c lstat.c $(top_srcdir)/maint.mk malloc.c \ - malloc.c malloca.h malloca.valgrind mbchar.h mbrlen.c \ - mbrtowc.c mbsinit.c mbsrtowcs-impl.h mbsrtowcs-state.c \ - mbsrtowcs.c str-kmp.h mbtowc-impl.h mbtowc.c memchr.c \ - memchr.valgrind memchr2.valgrind mempcpy.c memrchr.c \ - msvc-inval.c msvc-inval.h msvc-nothrow.c msvc-nothrow.h \ - nl_langinfo.c obstack.c obstack.h open.c openat.c openat.h \ - fcntl--.h fcntl-safer.h dirent-private.h opendir.c pathmax.h \ - quote.h quote.h quotearg.h read.c dirent-private.h readdir.c \ + malloc.c malloca.h mbchar.h mbrlen.c mbrtowc.c mbsinit.c \ + mbsrtowcs-impl.h mbsrtowcs-state.c mbsrtowcs.c str-kmp.h \ + mbtowc-impl.h mbtowc.c memchr.c memchr.valgrind \ + memchr2.valgrind mempcpy.c memrchr.c msvc-inval.c msvc-inval.h \ + msvc-nothrow.c msvc-nothrow.h nl_langinfo.c obstack.c \ + obstack.h open.c openat.c openat.h fcntl--.h fcntl-safer.h \ + dirent-private.h opendir.c opendirat.h pathmax.h quote.h \ + quote.h quotearg.h raise.c read.c dirent-private.h readdir.c \ realloc.c realloc.c regcomp.c regex.c regex.h regex_internal.c \ - regex_internal.h regexec.c safe-read.h same-inode.h save-cwd.h \ - _Noreturn.h arg-nonnull.h c++defs.h unused-parameter.h \ - warn-on-use.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 stpcpy.c strdup.c streq.h strerror.c \ - strerror-override.c strerror-override.h string.in.h strnlen.c \ - str-two-way.h strstr.c strtoimax.c strtol.c strtoll.c strtol.c \ - strtoul.c strtoull.c strtoimax.c strtoumax.c sys_stat.in.h \ - sys_types.in.h $(top_srcdir)/build-aux/config.rpath time.in.h \ - trim.h unistd.in.h unistd--.h unistd-safer.h unistr.in.h \ + regex_internal.h regexec.c safe-read.h sys-limits.h \ + same-inode.h save-cwd.h sig-handler.h sigaction.c signal.in.h \ + sigprocmask.c _Noreturn.h arg-nonnull.h c++defs.h \ + unused-parameter.h warn-on-use.h stat-w32.c stat-w32.h stat.c \ + stat-time.h stdalign.in.h stdarg.in.h stdbool.in.h stddef.in.h \ + stdint.in.h stdio.in.h stdlib.in.h stpcpy.c strdup.c streq.h \ + strerror.c strerror-override.c strerror-override.h string.in.h \ + strnlen.c str-two-way.h strstr.c strtoimax.c strtol.c \ + strtoll.c strtol.c strtoul.c strtoull.c strtoimax.c \ + strtoumax.c sys_stat.in.h sys_types.in.h \ + $(top_srcdir)/build-aux/config.rpath time.in.h trim.h \ + unistd.in.h unistd--.h unistd-safer.h unistr.in.h \ unitypes.in.h localcharset.h uniwidth.in.h uniwidth/cjk.h \ unlocked-io.h $(top_srcdir)/build-aux/update-copyright \ $(top_srcdir)/build-aux/useless-if-before-free \ @@ -1398,29 +1629,31 @@ iconv_open-aix.h-t iconv_open-hpux.h-t iconv_open-irix.h-t \ iconv_open-osf.h-t iconv_open-solaris.h-t inttypes.h \ inttypes.h-t langinfo.h langinfo.h-t limits.h limits.h-t \ - locale.h locale.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 sys/stat.h sys/stat.h-t sys/types.h sys/types.h-t \ - time.h time.h-t unistd.h unistd.h-t unistr.h unistr.h-t \ - unitypes.h unitypes.h-t uniwidth.h uniwidth.h-t wchar.h \ - wchar.h-t wctype.h wctype.h-t -SUFFIXES = .sed .sin + locale.h locale.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 sys/stat.h \ + sys/stat.h-t sys/types.h sys/types.h-t time.h time.h-t \ + unistd.h unistd.h-t unistr.h unistr.h-t unitypes.h \ + unitypes.h-t uniwidth.h uniwidth.h-t wchar.h wchar.h-t \ + wctype.h wctype.h-t +SUFFIXES = # No GNU Make output. noinst_LIBRARIES = libgreputils.a libgreputils_a_SOURCES = argmatch.c binary-io.h binary-io.c \ - bitrotate.h bitrotate.c c-ctype.h c-ctype.c c-strcase.h \ - c-strcasecmp.c c-strncasecmp.c cloexec.c close-stream.c \ - closeout.c cycle-check.c dfa.c localeinfo.c opendir-safer.c \ + bitrotate.h bitrotate.c c-ctype.h c-ctype.c c-stack.h \ + c-stack.c c-strcase.h c-strcasecmp.c c-strncasecmp.c cloexec.c \ + close-stream.c closeout.c cycle-check.c dfa.c localeinfo.c \ dirname-lgpl.c basename-lgpl.c stripslash.c exclude.c \ exitfail.c creat-safer.c open-safer.c fd-hook.c \ - filenamecat-lgpl.c getprogname.h getprogname.c gettext.h \ - hard-locale.c hash.c i-ring.c localcharset.h localcharset.c \ - glthread/lock.h glthread/lock.c malloca.c mbchar.c mbiter.h \ - mbiter.c mbscasecmp.c mbslen.c mbsstr.c mbuiter.h mbuiter.c \ - memchr2.h memchr2.c minmax.h openat-die.c openat-safer.c \ - propername.h propername.c quotearg.c safe-read.c save-cwd.c \ - striconv.h striconv.c strnlen1.h strnlen1.c \ + fd-safer-flag.c dup-safer-flag.c filenamecat-lgpl.c \ + getprogname.h getprogname.c gettext.h hard-locale.c hash.c \ + i-ring.c localcharset.c glthread/lock.h glthread/lock.c \ + malloca.c mbchar.c mbiter.h mbiter.c mbscasecmp.c mbslen.c \ + mbsstr.c mbuiter.h mbuiter.c memchr2.h memchr2.c minmax.h \ + openat-die.c openat-safer.c opendirat.c propername.h \ + propername.c quotearg.c safe-read.c save-cwd.c sig-handler.c \ + stat-time.c striconv.h striconv.c strnlen1.h strnlen1.c \ glthread/threadlib.c trim.c unistd.c dup-safer.c fd-safer.c \ pipe-safer.c $(am__append_1) $(am__append_2) $(am__append_3) \ version-etc.h version-etc.c version-etc-fsf.c wctype-h.c \ @@ -1440,12 +1673,12 @@ malloc.c malloc.c mbrlen.c mbrtowc.c mbsinit.c \ mbsrtowcs-state.c mbsrtowcs.c mbtowc.c memchr.c mempcpy.c \ memrchr.c msvc-inval.c msvc-nothrow.c nl_langinfo.c obstack.c \ - open.c openat.c opendir.c read.c readdir.c realloc.c realloc.c \ - regcomp.c regex.c regex_internal.c regexec.c stat-w32.c stat.c \ - stpcpy.c strdup.c strerror.c strerror-override.c strnlen.c \ - strstr.c strtoimax.c strtol.c strtoll.c strtol.c strtoul.c \ - strtoull.c strtoimax.c strtoumax.c wcrtomb.c wctob.c wctomb.c \ - wcwidth.c + open.c openat.c opendir.c raise.c read.c readdir.c realloc.c \ + realloc.c regcomp.c regex.c regex_internal.c regexec.c \ + sigaction.c sigprocmask.c stat-w32.c stat.c stpcpy.c strdup.c \ + strerror.c strerror-override.c strnlen.c strstr.c strtoimax.c \ + strtol.c strtoll.c strtol.c strtoul.c strtoull.c strtoimax.c \ + strtoumax.c wcrtomb.c wctob.c wctomb.c wcwidth.c # Use this preprocessor expression to decide whether #include_next works. # Do not rely on a 'configure'-time test for this, since the expression @@ -1455,8 +1688,6 @@ V_GPERF = $(V_GPERF_@AM_V@) V_GPERF_ = $(V_GPERF_@AM_DEFAULT_V@) V_GPERF_0 = @echo " GPERF " $@; -charset_alias = $(DESTDIR)$(libdir)/charset.alias -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 makefiles that @@ -1487,7 +1718,7 @@ $(MAKE) $(AM_MAKEFLAGS) all-am .SUFFIXES: -.SUFFIXES: .sed .sin .c .o .obj +.SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(srcdir)/gnulib.mk $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ @@ -1574,6 +1805,7 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bitrotate.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/btowc.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/c-ctype.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/c-stack.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/c-strcasecmp.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/c-strncasecmp.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/chdir-long.Po@am__quote@ # am--include-marker @@ -1588,6 +1820,7 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dfa.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dirfd.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dirname-lgpl.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dup-safer-flag.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dup-safer.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dup.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dup2.Po@am__quote@ # am--include-marker @@ -1597,6 +1830,7 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fchdir.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fcntl.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fd-hook.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fd-safer-flag.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fd-safer.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fdopendir.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/filenamecat-lgpl.Po@am__quote@ # am--include-marker @@ -1656,11 +1890,12 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/openat-proc.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/openat-safer.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/openat.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/opendir-safer.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/opendir.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/opendirat.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pipe-safer.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/propername.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/quotearg.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raise.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/read.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/readdir.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/realloc.Po@am__quote@ # am--include-marker @@ -1670,6 +1905,10 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/regexec.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/safe-read.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/save-cwd.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sig-handler.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sigaction.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sigprocmask.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stat-time.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stat-w32.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stat.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stpcpy.Po@am__quote@ # am--include-marker @@ -1718,22 +1957,20 @@ am--depfiles: $(am__depfiles_remade) .c.o: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(am__set_depbase) && \ -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $<; \ -@am__fastdepCC_TRUE@ if test $$? = 0; then $(am__mv) $$depbase.Tpo $$depbase.Po; \ -@am__fastdepCC_TRUE@ else rm -f $$depbase.Tpo; false; fi +@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ +@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(am__set_depbase) && \ -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $$($(CYGPATH_W) $<); \ -@am__fastdepCC_TRUE@ if test $$? = 0; then $(am__mv) $$depbase.Tpo $$depbase.Po; \ -@am__fastdepCC_TRUE@ else rm -f $$depbase.Tpo; false; fi +@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ +@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $$($(CYGPATH_W) $<) +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique @@ -1787,7 +2024,10 @@ distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -distdir: $(DISTFILES) +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ @@ -1820,7 +2060,7 @@ check-am: all-am check: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) check-am -all-am: Makefile $(LIBRARIES) all-local +all-am: Makefile $(LIBRARIES) installdirs: install: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) install-am @@ -1876,6 +2116,7 @@ -rm -f ./$(DEPDIR)/bitrotate.Po -rm -f ./$(DEPDIR)/btowc.Po -rm -f ./$(DEPDIR)/c-ctype.Po + -rm -f ./$(DEPDIR)/c-stack.Po -rm -f ./$(DEPDIR)/c-strcasecmp.Po -rm -f ./$(DEPDIR)/c-strncasecmp.Po -rm -f ./$(DEPDIR)/chdir-long.Po @@ -1890,6 +2131,7 @@ -rm -f ./$(DEPDIR)/dfa.Po -rm -f ./$(DEPDIR)/dirfd.Po -rm -f ./$(DEPDIR)/dirname-lgpl.Po + -rm -f ./$(DEPDIR)/dup-safer-flag.Po -rm -f ./$(DEPDIR)/dup-safer.Po -rm -f ./$(DEPDIR)/dup.Po -rm -f ./$(DEPDIR)/dup2.Po @@ -1899,6 +2141,7 @@ -rm -f ./$(DEPDIR)/fchdir.Po -rm -f ./$(DEPDIR)/fcntl.Po -rm -f ./$(DEPDIR)/fd-hook.Po + -rm -f ./$(DEPDIR)/fd-safer-flag.Po -rm -f ./$(DEPDIR)/fd-safer.Po -rm -f ./$(DEPDIR)/fdopendir.Po -rm -f ./$(DEPDIR)/filenamecat-lgpl.Po @@ -1958,11 +2201,12 @@ -rm -f ./$(DEPDIR)/openat-proc.Po -rm -f ./$(DEPDIR)/openat-safer.Po -rm -f ./$(DEPDIR)/openat.Po - -rm -f ./$(DEPDIR)/opendir-safer.Po -rm -f ./$(DEPDIR)/opendir.Po + -rm -f ./$(DEPDIR)/opendirat.Po -rm -f ./$(DEPDIR)/pipe-safer.Po -rm -f ./$(DEPDIR)/propername.Po -rm -f ./$(DEPDIR)/quotearg.Po + -rm -f ./$(DEPDIR)/raise.Po -rm -f ./$(DEPDIR)/read.Po -rm -f ./$(DEPDIR)/readdir.Po -rm -f ./$(DEPDIR)/realloc.Po @@ -1972,6 +2216,10 @@ -rm -f ./$(DEPDIR)/regexec.Po -rm -f ./$(DEPDIR)/safe-read.Po -rm -f ./$(DEPDIR)/save-cwd.Po + -rm -f ./$(DEPDIR)/sig-handler.Po + -rm -f ./$(DEPDIR)/sigaction.Po + -rm -f ./$(DEPDIR)/sigprocmask.Po + -rm -f ./$(DEPDIR)/stat-time.Po -rm -f ./$(DEPDIR)/stat-w32.Po -rm -f ./$(DEPDIR)/stat.Po -rm -f ./$(DEPDIR)/stpcpy.Po @@ -2034,7 +2282,7 @@ install-dvi-am: -install-exec-am: install-exec-local +install-exec-am: install-html: install-html-am @@ -2065,6 +2313,7 @@ -rm -f ./$(DEPDIR)/bitrotate.Po -rm -f ./$(DEPDIR)/btowc.Po -rm -f ./$(DEPDIR)/c-ctype.Po + -rm -f ./$(DEPDIR)/c-stack.Po -rm -f ./$(DEPDIR)/c-strcasecmp.Po -rm -f ./$(DEPDIR)/c-strncasecmp.Po -rm -f ./$(DEPDIR)/chdir-long.Po @@ -2079,6 +2328,7 @@ -rm -f ./$(DEPDIR)/dfa.Po -rm -f ./$(DEPDIR)/dirfd.Po -rm -f ./$(DEPDIR)/dirname-lgpl.Po + -rm -f ./$(DEPDIR)/dup-safer-flag.Po -rm -f ./$(DEPDIR)/dup-safer.Po -rm -f ./$(DEPDIR)/dup.Po -rm -f ./$(DEPDIR)/dup2.Po @@ -2088,6 +2338,7 @@ -rm -f ./$(DEPDIR)/fchdir.Po -rm -f ./$(DEPDIR)/fcntl.Po -rm -f ./$(DEPDIR)/fd-hook.Po + -rm -f ./$(DEPDIR)/fd-safer-flag.Po -rm -f ./$(DEPDIR)/fd-safer.Po -rm -f ./$(DEPDIR)/fdopendir.Po -rm -f ./$(DEPDIR)/filenamecat-lgpl.Po @@ -2147,11 +2398,12 @@ -rm -f ./$(DEPDIR)/openat-proc.Po -rm -f ./$(DEPDIR)/openat-safer.Po -rm -f ./$(DEPDIR)/openat.Po - -rm -f ./$(DEPDIR)/opendir-safer.Po -rm -f ./$(DEPDIR)/opendir.Po + -rm -f ./$(DEPDIR)/opendirat.Po -rm -f ./$(DEPDIR)/pipe-safer.Po -rm -f ./$(DEPDIR)/propername.Po -rm -f ./$(DEPDIR)/quotearg.Po + -rm -f ./$(DEPDIR)/raise.Po -rm -f ./$(DEPDIR)/read.Po -rm -f ./$(DEPDIR)/readdir.Po -rm -f ./$(DEPDIR)/realloc.Po @@ -2161,6 +2413,10 @@ -rm -f ./$(DEPDIR)/regexec.Po -rm -f ./$(DEPDIR)/safe-read.Po -rm -f ./$(DEPDIR)/save-cwd.Po + -rm -f ./$(DEPDIR)/sig-handler.Po + -rm -f ./$(DEPDIR)/sigaction.Po + -rm -f ./$(DEPDIR)/sigprocmask.Po + -rm -f ./$(DEPDIR)/stat-time.Po -rm -f ./$(DEPDIR)/stat-w32.Po -rm -f ./$(DEPDIR)/stat.Po -rm -f ./$(DEPDIR)/stpcpy.Po @@ -2217,24 +2473,23 @@ ps-am: -uninstall-am: uninstall-local +uninstall-am: .MAKE: all check install install-am install-strip -.PHONY: CTAGS GTAGS TAGS all all-am all-local am--depfiles check \ - check-am clean clean-generic clean-noinstLIBRARIES \ - cscopelist-am ctags ctags-am distclean distclean-compile \ - distclean-generic distclean-local distclean-tags distdir dvi \ - dvi-am html html-am info info-am install install-am \ - install-data install-data-am install-dvi install-dvi-am \ - install-exec install-exec-am install-exec-local install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-local pdf \ - pdf-am ps ps-am tags tags-am uninstall uninstall-am \ - uninstall-local +.PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ + clean-generic clean-noinstLIBRARIES cscopelist-am ctags \ + ctags-am distclean distclean-compile distclean-generic \ + distclean-local distclean-tags distdir dvi dvi-am html html-am \ + info info-am install install-am install-data install-data-am \ + install-dvi install-dvi-am install-exec install-exec-am \ + install-html install-html-am install-info install-info-am \ + install-man install-pdf install-pdf-am install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-local pdf pdf-am ps ps-am tags tags-am uninstall \ + uninstall-am .PRECIOUS: Makefile @@ -2393,21 +2648,31 @@ } > $@-t && \ mv $@-t $@ -# We need the following in order to create when the system -# doesn't have one that supports the required API. -@GL_GENERATE_FNMATCH_H_TRUE@fnmatch.h: fnmatch.in.h $(top_builddir)/config.status $(ARG_NONNULL_H) +# We need the following in order to create . +@GL_GENERATE_FNMATCH_H_TRUE@fnmatch.h: fnmatch.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) @GL_GENERATE_FNMATCH_H_TRUE@ $(AM_V_GEN)rm -f $@-t $@ && \ -@GL_GENERATE_FNMATCH_H_TRUE@ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ -@GL_GENERATE_FNMATCH_H_TRUE@ sed -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ +@GL_GENERATE_FNMATCH_H_TRUE@ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ +@GL_GENERATE_FNMATCH_H_TRUE@ sed -e 's|@''GUARD_PREFIX''@|GL|g' \ +@GL_GENERATE_FNMATCH_H_TRUE@ -e 's|@''HAVE_FNMATCH_H''@|$(HAVE_FNMATCH_H)|g' \ +@GL_GENERATE_FNMATCH_H_TRUE@ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ +@GL_GENERATE_FNMATCH_H_TRUE@ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ +@GL_GENERATE_FNMATCH_H_TRUE@ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ +@GL_GENERATE_FNMATCH_H_TRUE@ -e 's|@''NEXT_FNMATCH_H''@|$(NEXT_FNMATCH_H)|g' \ +@GL_GENERATE_FNMATCH_H_TRUE@ -e 's/@''GNULIB_FNMATCH''@/$(GNULIB_FNMATCH)/g' \ +@GL_GENERATE_FNMATCH_H_TRUE@ -e 's|@''HAVE_FNMATCH''@|$(HAVE_FNMATCH)|g' \ +@GL_GENERATE_FNMATCH_H_TRUE@ -e 's|@''REPLACE_FNMATCH''@|$(REPLACE_FNMATCH)|g' \ +@GL_GENERATE_FNMATCH_H_TRUE@ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ +@GL_GENERATE_FNMATCH_H_TRUE@ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ +@GL_GENERATE_FNMATCH_H_TRUE@ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ @GL_GENERATE_FNMATCH_H_TRUE@ < $(srcdir)/fnmatch.in.h; \ @GL_GENERATE_FNMATCH_H_TRUE@ } > $@-t && \ -@GL_GENERATE_FNMATCH_H_TRUE@ mv -f $@-t $@ +@GL_GENERATE_FNMATCH_H_TRUE@ mv $@-t $@ @GL_GENERATE_FNMATCH_H_FALSE@fnmatch.h: $(top_builddir)/config.status @GL_GENERATE_FNMATCH_H_FALSE@ rm -f $@ # 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 +getopt.h: getopt.in.h $(top_builddir)/config.status $(ARG_NONNULL_H) $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e 's|@''GUARD_PREFIX''@|GL|g' \ @@ -2456,19 +2721,19 @@ @GL_GENERATE_ICONV_H_FALSE@iconv.h: $(top_builddir)/config.status @GL_GENERATE_ICONV_H_FALSE@ rm -f $@ -iconv_open-aix.h: iconv_open-aix.gperf +$(srcdir)/iconv_open-aix.h: $(srcdir)/iconv_open-aix.gperf $(V_GPERF)$(GPERF) -m 10 $(srcdir)/iconv_open-aix.gperf > $(srcdir)/iconv_open-aix.h-t && \ mv $(srcdir)/iconv_open-aix.h-t $(srcdir)/iconv_open-aix.h -iconv_open-hpux.h: iconv_open-hpux.gperf +$(srcdir)/iconv_open-hpux.h: $(srcdir)/iconv_open-hpux.gperf $(V_GPERF)$(GPERF) -m 10 $(srcdir)/iconv_open-hpux.gperf > $(srcdir)/iconv_open-hpux.h-t && \ mv $(srcdir)/iconv_open-hpux.h-t $(srcdir)/iconv_open-hpux.h -iconv_open-irix.h: iconv_open-irix.gperf +$(srcdir)/iconv_open-irix.h: $(srcdir)/iconv_open-irix.gperf $(V_GPERF)$(GPERF) -m 10 $(srcdir)/iconv_open-irix.gperf > $(srcdir)/iconv_open-irix.h-t && \ mv $(srcdir)/iconv_open-irix.h-t $(srcdir)/iconv_open-irix.h -iconv_open-osf.h: iconv_open-osf.gperf +$(srcdir)/iconv_open-osf.h: $(srcdir)/iconv_open-osf.gperf $(V_GPERF)$(GPERF) -m 10 $(srcdir)/iconv_open-osf.gperf > $(srcdir)/iconv_open-osf.h-t && \ mv $(srcdir)/iconv_open-osf.h-t $(srcdir)/iconv_open-osf.h -iconv_open-solaris.h: iconv_open-solaris.gperf +$(srcdir)/iconv_open-solaris.h: $(srcdir)/iconv_open-solaris.gperf $(V_GPERF)$(GPERF) -m 10 $(srcdir)/iconv_open-solaris.gperf > $(srcdir)/iconv_open-solaris.h-t && \ mv $(srcdir)/iconv_open-solaris.h-t $(srcdir)/iconv_open-solaris.h @@ -2495,6 +2760,7 @@ -e 's/@''HAVE_DECL_IMAXDIV''@/$(HAVE_DECL_IMAXDIV)/g' \ -e 's/@''HAVE_DECL_STRTOIMAX''@/$(HAVE_DECL_STRTOIMAX)/g' \ -e 's/@''HAVE_DECL_STRTOUMAX''@/$(HAVE_DECL_STRTOUMAX)/g' \ + -e 's/@''HAVE_IMAXDIV_T''@/$(HAVE_IMAXDIV_T)/g' \ -e 's/@''REPLACE_STRTOIMAX''@/$(REPLACE_STRTOIMAX)/g' \ -e 's/@''REPLACE_STRTOUMAX''@/$(REPLACE_STRTOUMAX)/g' \ -e 's/@''INT32_MAX_LT_INTMAX_MAX''@/$(INT32_MAX_LT_INTMAX_MAX)/g' \ @@ -2522,6 +2788,7 @@ -e 's/@''GNULIB_NL_LANGINFO''@/$(GNULIB_NL_LANGINFO)/g' \ -e 's|@''HAVE_LANGINFO_CODESET''@|$(HAVE_LANGINFO_CODESET)|g' \ -e 's|@''HAVE_LANGINFO_T_FMT_AMPM''@|$(HAVE_LANGINFO_T_FMT_AMPM)|g' \ + -e 's|@''HAVE_LANGINFO_ALTMON''@|$(HAVE_LANGINFO_ALTMON)|g' \ -e 's|@''HAVE_LANGINFO_ERA''@|$(HAVE_LANGINFO_ERA)|g' \ -e 's|@''HAVE_LANGINFO_YESEXPR''@|$(HAVE_LANGINFO_YESEXPR)|g' \ -e 's|@''HAVE_NL_LANGINFO''@|$(HAVE_NL_LANGINFO)|g' \ @@ -2548,65 +2815,6 @@ @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 -# is not used by another installed package. -# On systems with glibc-2.1 or newer, the file is redundant, therefore we -# avoid installing it. - -all-local: charset.alias ref-add.sed ref-del.sed -install-exec-local: install-exec-localcharset -install-exec-localcharset: all-local - if test $(GLIBC21) = no; then \ - case '$(host_os)' in \ - darwin[56]*) \ - need_charset_alias=true ;; \ - darwin* | cygwin* | mingw* | pw32* | cegcc*) \ - need_charset_alias=false ;; \ - *) \ - need_charset_alias=true ;; \ - esac ; \ - else \ - need_charset_alias=false ; \ - fi ; \ - if $$need_charset_alias; then \ - $(mkinstalldirs) $(DESTDIR)$(libdir) ; \ - fi ; \ - if test -f $(charset_alias); then \ - sed -f ref-add.sed $(charset_alias) > $(charset_tmp) ; \ - $(INSTALL_DATA) $(charset_tmp) $(charset_alias) ; \ - rm -f $(charset_tmp) ; \ - else \ - if $$need_charset_alias; then \ - sed -f ref-add.sed charset.alias > $(charset_tmp) ; \ - $(INSTALL_DATA) $(charset_tmp) $(charset_alias) ; \ - rm -f $(charset_tmp) ; \ - fi ; \ - fi - -uninstall-local: uninstall-localcharset -uninstall-localcharset: all-local - if test -f $(charset_alias); then \ - sed -f ref-del.sed $(charset_alias) > $(charset_tmp); \ - if grep '^# Packages using this file: $$' $(charset_tmp) \ - > /dev/null; then \ - rm -f $(charset_alias); \ - else \ - $(INSTALL_DATA) $(charset_tmp) $(charset_alias); \ - fi; \ - rm -f $(charset_tmp); \ - fi - -charset.alias: config.charset - $(AM_V_GEN)rm -f t-$@ $@ && \ - $(SHELL) $(srcdir)/config.charset '$(host)' > t-$@ && \ - mv t-$@ $@ -.sin.sed: - $(AM_V_GEN)rm -f t-$@ $@ && \ - sed -e '/^#/d' -e 's/@''PACKAGE''@/$(PACKAGE)/g' $< > t-$@ && \ - mv t-$@ $@ - # We need the following in order to create when the system # doesn't have one that provides all definitions. locale.h: locale.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) @@ -2620,11 +2828,16 @@ -e 's/@''GNULIB_LOCALECONV''@/$(GNULIB_LOCALECONV)/g' \ -e 's/@''GNULIB_SETLOCALE''@/$(GNULIB_SETLOCALE)/g' \ -e 's/@''GNULIB_DUPLOCALE''@/$(GNULIB_DUPLOCALE)/g' \ + -e 's/@''GNULIB_LOCALENAME''@/$(GNULIB_LOCALENAME)/g' \ + -e 's|@''HAVE_NEWLOCALE''@|$(HAVE_NEWLOCALE)|g' \ -e 's|@''HAVE_DUPLOCALE''@|$(HAVE_DUPLOCALE)|g' \ + -e 's|@''HAVE_FREELOCALE''@|$(HAVE_FREELOCALE)|g' \ -e 's|@''HAVE_XLOCALE_H''@|$(HAVE_XLOCALE_H)|g' \ -e 's|@''REPLACE_LOCALECONV''@|$(REPLACE_LOCALECONV)|g' \ -e 's|@''REPLACE_SETLOCALE''@|$(REPLACE_SETLOCALE)|g' \ + -e 's|@''REPLACE_NEWLOCALE''@|$(REPLACE_NEWLOCALE)|g' \ -e 's|@''REPLACE_DUPLOCALE''@|$(REPLACE_DUPLOCALE)|g' \ + -e 's|@''REPLACE_FREELOCALE''@|$(REPLACE_FREELOCALE)|g' \ -e 's|@''REPLACE_STRUCT_LCONV''@|$(REPLACE_STRUCT_LCONV)|g' \ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ @@ -2633,6 +2846,39 @@ } > $@-t && \ mv $@-t $@ +# We need the following in order to create when the system +# doesn't have a complete one. +signal.h: signal.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) + $(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_SIGNAL_H''@|$(NEXT_SIGNAL_H)|g' \ + -e 's/@''GNULIB_PTHREAD_SIGMASK''@/$(GNULIB_PTHREAD_SIGMASK)/g' \ + -e 's/@''GNULIB_RAISE''@/$(GNULIB_RAISE)/g' \ + -e 's/@''GNULIB_SIGNAL_H_SIGPIPE''@/$(GNULIB_SIGNAL_H_SIGPIPE)/g' \ + -e 's/@''GNULIB_SIGPROCMASK''@/$(GNULIB_SIGPROCMASK)/g' \ + -e 's/@''GNULIB_SIGACTION''@/$(GNULIB_SIGACTION)/g' \ + -e 's|@''HAVE_POSIX_SIGNALBLOCKING''@|$(HAVE_POSIX_SIGNALBLOCKING)|g' \ + -e 's|@''HAVE_PTHREAD_SIGMASK''@|$(HAVE_PTHREAD_SIGMASK)|g' \ + -e 's|@''HAVE_RAISE''@|$(HAVE_RAISE)|g' \ + -e 's|@''HAVE_SIGSET_T''@|$(HAVE_SIGSET_T)|g' \ + -e 's|@''HAVE_SIGINFO_T''@|$(HAVE_SIGINFO_T)|g' \ + -e 's|@''HAVE_SIGACTION''@|$(HAVE_SIGACTION)|g' \ + -e 's|@''HAVE_STRUCT_SIGACTION_SA_SIGACTION''@|$(HAVE_STRUCT_SIGACTION_SA_SIGACTION)|g' \ + -e 's|@''HAVE_TYPE_VOLATILE_SIG_ATOMIC_T''@|$(HAVE_TYPE_VOLATILE_SIG_ATOMIC_T)|g' \ + -e 's|@''HAVE_SIGHANDLER_T''@|$(HAVE_SIGHANDLER_T)|g' \ + -e 's|@''REPLACE_PTHREAD_SIGMASK''@|$(REPLACE_PTHREAD_SIGMASK)|g' \ + -e 's|@''REPLACE_RAISE''@|$(REPLACE_RAISE)|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)' \ + < $(srcdir)/signal.in.h; \ + } > $@-t && \ + mv $@-t $@ + # We need the following in order to create when the system # doesn't have one that works. @GL_GENERATE_STDALIGN_H_TRUE@stdalign.h: stdalign.in.h $(top_builddir)/config.status @@ -2882,6 +3128,7 @@ -e 's/@''GNULIB_RANDOM''@/$(GNULIB_RANDOM)/g' \ -e 's/@''GNULIB_RANDOM_R''@/$(GNULIB_RANDOM_R)/g' \ -e 's/@''GNULIB_REALLOC_POSIX''@/$(GNULIB_REALLOC_POSIX)/g' \ + -e 's/@''GNULIB_REALLOCARRAY''@/$(GNULIB_REALLOCARRAY)/g' \ -e 's/@''GNULIB_REALPATH''@/$(GNULIB_REALPATH)/g' \ -e 's/@''GNULIB_RPMATCH''@/$(GNULIB_RPMATCH)/g' \ -e 's/@''GNULIB_SECURE_GETENV''@/$(GNULIB_SECURE_GETENV)/g' \ @@ -2900,6 +3147,7 @@ -e 's|@''HAVE_DECL_GETLOADAVG''@|$(HAVE_DECL_GETLOADAVG)|g' \ -e 's|@''HAVE_GETSUBOPT''@|$(HAVE_GETSUBOPT)|g' \ -e 's|@''HAVE_GRANTPT''@|$(HAVE_GRANTPT)|g' \ + -e 's|@''HAVE_DECL_INITSTATE''@|$(HAVE_DECL_INITSTATE)|g' \ -e 's|@''HAVE_MKDTEMP''@|$(HAVE_MKDTEMP)|g' \ -e 's|@''HAVE_MKOSTEMP''@|$(HAVE_MKOSTEMP)|g' \ -e 's|@''HAVE_MKOSTEMPS''@|$(HAVE_MKOSTEMPS)|g' \ @@ -2912,10 +3160,12 @@ -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' \ + -e 's|@''HAVE_REALLOCARRAY''@|$(HAVE_REALLOCARRAY)|g' \ -e 's|@''HAVE_REALPATH''@|$(HAVE_REALPATH)|g' \ -e 's|@''HAVE_RPMATCH''@|$(HAVE_RPMATCH)|g' \ -e 's|@''HAVE_SECURE_GETENV''@|$(HAVE_SECURE_GETENV)|g' \ -e 's|@''HAVE_DECL_SETENV''@|$(HAVE_DECL_SETENV)|g' \ + -e 's|@''HAVE_DECL_SETSTATE''@|$(HAVE_DECL_SETSTATE)|g' \ -e 's|@''HAVE_STRTOD''@|$(HAVE_STRTOD)|g' \ -e 's|@''HAVE_STRTOLL''@|$(HAVE_STRTOLL)|g' \ -e 's|@''HAVE_STRTOULL''@|$(HAVE_STRTOULL)|g' \ @@ -2956,6 +3206,7 @@ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_STRING_H''@|$(NEXT_STRING_H)|g' \ + -e 's/@''GNULIB_EXPLICIT_BZERO''@/$(GNULIB_EXPLICIT_BZERO)/g' \ -e 's/@''GNULIB_FFSL''@/$(GNULIB_FFSL)/g' \ -e 's/@''GNULIB_FFSLL''@/$(GNULIB_FFSLL)/g' \ -e 's/@''GNULIB_MBSLEN''@/$(GNULIB_MBSLEN)/g' \ @@ -2994,7 +3245,8 @@ -e 's/@''GNULIB_STRSIGNAL''@/$(GNULIB_STRSIGNAL)/g' \ -e 's/@''GNULIB_STRVERSCMP''@/$(GNULIB_STRVERSCMP)/g' \ < $(srcdir)/string.in.h | \ - sed -e 's|@''HAVE_FFSL''@|$(HAVE_FFSL)|g' \ + sed -e 's|@''HAVE_EXPLICIT_BZERO''@|$(HAVE_EXPLICIT_BZERO)|g' \ + -e 's|@''HAVE_FFSL''@|$(HAVE_FFSL)|g' \ -e 's|@''HAVE_FFSLL''@|$(HAVE_FFSLL)|g' \ -e 's|@''HAVE_MBSLEN''@|$(HAVE_MBSLEN)|g' \ -e 's|@''HAVE_MEMCHR''@|$(HAVE_MEMCHR)|g' \ @@ -3015,20 +3267,20 @@ -e 's|@''HAVE_DECL_STRERROR_R''@|$(HAVE_DECL_STRERROR_R)|g' \ -e 's|@''HAVE_DECL_STRSIGNAL''@|$(HAVE_DECL_STRSIGNAL)|g' \ -e 's|@''HAVE_STRVERSCMP''@|$(HAVE_STRVERSCMP)|g' \ - -e 's|@''REPLACE_STPNCPY''@|$(REPLACE_STPNCPY)|g' \ -e 's|@''REPLACE_MEMCHR''@|$(REPLACE_MEMCHR)|g' \ -e 's|@''REPLACE_MEMMEM''@|$(REPLACE_MEMMEM)|g' \ - -e 's|@''REPLACE_STRCASESTR''@|$(REPLACE_STRCASESTR)|g' \ + -e 's|@''REPLACE_STPNCPY''@|$(REPLACE_STPNCPY)|g' \ -e 's|@''REPLACE_STRCHRNUL''@|$(REPLACE_STRCHRNUL)|g' \ -e 's|@''REPLACE_STRDUP''@|$(REPLACE_STRDUP)|g' \ - -e 's|@''REPLACE_STRSTR''@|$(REPLACE_STRSTR)|g' \ - -e 's|@''REPLACE_STRERROR''@|$(REPLACE_STRERROR)|g' \ - -e 's|@''REPLACE_STRERROR_R''@|$(REPLACE_STRERROR_R)|g' \ -e 's|@''REPLACE_STRNCAT''@|$(REPLACE_STRNCAT)|g' \ -e 's|@''REPLACE_STRNDUP''@|$(REPLACE_STRNDUP)|g' \ -e 's|@''REPLACE_STRNLEN''@|$(REPLACE_STRNLEN)|g' \ - -e 's|@''REPLACE_STRSIGNAL''@|$(REPLACE_STRSIGNAL)|g' \ + -e 's|@''REPLACE_STRSTR''@|$(REPLACE_STRSTR)|g' \ + -e 's|@''REPLACE_STRCASESTR''@|$(REPLACE_STRCASESTR)|g' \ -e 's|@''REPLACE_STRTOK_R''@|$(REPLACE_STRTOK_R)|g' \ + -e 's|@''REPLACE_STRERROR''@|$(REPLACE_STRERROR)|g' \ + -e 's|@''REPLACE_STRERROR_R''@|$(REPLACE_STRERROR_R)|g' \ + -e 's|@''REPLACE_STRSIGNAL''@|$(REPLACE_STRSIGNAL)|g' \ -e 's|@''UNDEFINE_STRTOK_R''@|$(UNDEFINE_STRTOK_R)|g' \ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ @@ -3188,6 +3440,7 @@ -e 's/@''GNULIB_GETLOGIN''@/$(GNULIB_GETLOGIN)/g' \ -e 's/@''GNULIB_GETLOGIN_R''@/$(GNULIB_GETLOGIN_R)/g' \ -e 's/@''GNULIB_GETPAGESIZE''@/$(GNULIB_GETPAGESIZE)/g' \ + -e 's/@''GNULIB_GETPASS''@/$(GNULIB_GETPASS)/g' \ -e 's/@''GNULIB_GETUSERSHELL''@/$(GNULIB_GETUSERSHELL)/g' \ -e 's/@''GNULIB_GROUP_MEMBER''@/$(GNULIB_GROUP_MEMBER)/g' \ -e 's/@''GNULIB_ISATTY''@/$(GNULIB_ISATTY)/g' \ @@ -3231,6 +3484,7 @@ -e 's|@''HAVE_GETGROUPS''@|$(HAVE_GETGROUPS)|g' \ -e 's|@''HAVE_GETHOSTNAME''@|$(HAVE_GETHOSTNAME)|g' \ -e 's|@''HAVE_GETPAGESIZE''@|$(HAVE_GETPAGESIZE)|g' \ + -e 's|@''HAVE_GETPASS''@|$(HAVE_GETPASS)|g' \ -e 's|@''HAVE_GROUP_MEMBER''@|$(HAVE_GROUP_MEMBER)|g' \ -e 's|@''HAVE_LCHOWN''@|$(HAVE_LCHOWN)|g' \ -e 's|@''HAVE_LINK''@|$(HAVE_LINK)|g' \ @@ -3245,7 +3499,6 @@ -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' \ @@ -3257,6 +3510,7 @@ -e 's|@''HAVE_DECL_GETPAGESIZE''@|$(HAVE_DECL_GETPAGESIZE)|g' \ -e 's|@''HAVE_DECL_GETUSERSHELL''@|$(HAVE_DECL_GETUSERSHELL)|g' \ -e 's|@''HAVE_DECL_SETHOSTNAME''@|$(HAVE_DECL_SETHOSTNAME)|g' \ + -e 's|@''HAVE_DECL_TRUNCATE''@|$(HAVE_DECL_TRUNCATE)|g' \ -e 's|@''HAVE_DECL_TTYNAME_R''@|$(HAVE_DECL_TTYNAME_R)|g' \ -e 's|@''HAVE_OS_H''@|$(HAVE_OS_H)|g' \ -e 's|@''HAVE_SYS_PARAM_H''@|$(HAVE_SYS_PARAM_H)|g' \ @@ -3265,6 +3519,7 @@ -e 's|@''REPLACE_CLOSE''@|$(REPLACE_CLOSE)|g' \ -e 's|@''REPLACE_DUP''@|$(REPLACE_DUP)|g' \ -e 's|@''REPLACE_DUP2''@|$(REPLACE_DUP2)|g' \ + -e 's|@''REPLACE_FACCESSAT''@|$(REPLACE_FACCESSAT)|g' \ -e 's|@''REPLACE_FCHOWNAT''@|$(REPLACE_FCHOWNAT)|g' \ -e 's|@''REPLACE_FTRUNCATE''@|$(REPLACE_FTRUNCATE)|g' \ -e 's|@''REPLACE_GETCWD''@|$(REPLACE_GETCWD)|g' \ @@ -3273,6 +3528,7 @@ -e 's|@''REPLACE_GETLOGIN_R''@|$(REPLACE_GETLOGIN_R)|g' \ -e 's|@''REPLACE_GETGROUPS''@|$(REPLACE_GETGROUPS)|g' \ -e 's|@''REPLACE_GETPAGESIZE''@|$(REPLACE_GETPAGESIZE)|g' \ + -e 's|@''REPLACE_GETPASS''@|$(REPLACE_GETPASS)|g' \ -e 's|@''REPLACE_ISATTY''@|$(REPLACE_ISATTY)|g' \ -e 's|@''REPLACE_LCHOWN''@|$(REPLACE_LCHOWN)|g' \ -e 's|@''REPLACE_LINK''@|$(REPLACE_LINK)|g' \ diff -Nru grep-3.1/lib/malloca.c grep-3.3/lib/malloca.c --- grep-3.1/lib/malloca.c 2017-01-01 11:25:47.000000000 +0000 +++ grep-3.3/lib/malloca.c 2018-02-26 06:10:46.000000000 +0000 @@ -1,6 +1,6 @@ /* Safe automatic memory allocation. - Copyright (C) 2003, 2006-2007, 2009-2017 Free Software Foundation, Inc. - Written by Bruno Haible , 2003. + Copyright (C) 2003, 2006-2007, 2009-2018 Free Software Foundation, Inc. + Written by Bruno Haible , 2003, 2018. 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 @@ -13,7 +13,7 @@ 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 . */ + along with this program; if not, see . */ #define _GL_USE_STDLIB_ALLOC 1 #include @@ -21,82 +21,49 @@ /* Specification. */ #include "malloca.h" -#include - #include "verify.h" /* The speed critical point in this file is freea() applied to an alloca() result: it must be fast, to match the speed of alloca(). The speed of mmalloca() and freea() in the other case are not critical, because they - are only invoked for big memory sizes. */ - -#if HAVE_ALLOCA - -/* Store the mmalloca() results in a hash table. This is needed to reliably - distinguish a mmalloca() result and an alloca() result. - - Although it is possible that the same pointer is returned by alloca() and - by mmalloca() at different times in the same application, it does not lead - to a bug in freea(), because: - - Before a pointer returned by alloca() can point into malloc()ed memory, - the function must return, and once this has happened the programmer must - not call freea() on it anyway. - - Before a pointer returned by mmalloca() can point into the stack, it - must be freed. The only function that can free it is freea(), and - when freea() frees it, it also removes it from the hash table. */ - -#define MAGIC_NUMBER 0x1415fb4a -#define MAGIC_SIZE sizeof (int) -/* This is how the header info would look like without any alignment - considerations. */ -struct preliminary_header { void *next; int magic; }; -/* But the header's size must be a multiple of sa_alignment_max. */ -#define HEADER_SIZE \ - (((sizeof (struct preliminary_header) + sa_alignment_max - 1) / sa_alignment_max) * sa_alignment_max) -union header { - void *next; - struct { - char room[HEADER_SIZE - MAGIC_SIZE]; - int word; - } magic; -}; -verify (HEADER_SIZE == sizeof (union header)); -/* We make the hash table quite big, so that during lookups the probability - of empty hash buckets is quite high. There is no need to make the hash - table resizable, because when the hash table gets filled so much that the - lookup becomes slow, it means that the application has memory leaks. */ -#define HASH_TABLE_SIZE 257 -static void * mmalloca_results[HASH_TABLE_SIZE]; - -#endif + are only invoked for big memory sizes. + Here we use a bit in the address as an indicator, an idea by Ondřej Bílka. + malloca() can return three types of pointers: + - Pointers ≡ 0 mod 2*sa_alignment_max come from stack allocation. + - Pointers ≡ sa_alignment_max mod 2*sa_alignment_max come from heap + allocation. + - NULL comes from a failed heap allocation. */ + +/* Type for holding very small pointer differences. */ +typedef unsigned char small_t; +/* Verify that it is wide enough. */ +verify (2 * sa_alignment_max - 1 <= (small_t) -1); void * mmalloca (size_t n) { #if HAVE_ALLOCA - /* Allocate one more word, that serves as an indicator for malloc()ed - memory, so that freea() of an alloca() result is fast. */ - size_t nplus = n + HEADER_SIZE; + /* Allocate one more word, used to determine the address to pass to freea(), + and room for the alignment ≡ sa_alignment_max mod 2*sa_alignment_max. */ + size_t nplus = n + sizeof (small_t) + 2 * sa_alignment_max - 1; if (nplus >= n) { - void *p = malloc (nplus); + char *mem = (char *) malloc (nplus); - if (p != NULL) + if (mem != NULL) { - size_t slot; - union header *h = p; - - p = h + 1; - - /* Put a magic number into the indicator word. */ - h->magic.word = MAGIC_NUMBER; - - /* Enter p into the hash table. */ - slot = (uintptr_t) p % HASH_TABLE_SIZE; - h->next = mmalloca_results[slot]; - mmalloca_results[slot] = p; - + char *p = + (char *)((((uintptr_t)mem + sizeof (small_t) + sa_alignment_max - 1) + & ~(uintptr_t)(2 * sa_alignment_max - 1)) + + sa_alignment_max); + /* Here p >= mem + sizeof (small_t), + and p <= mem + sizeof (small_t) + 2 * sa_alignment_max - 1 + hence p + n <= mem + nplus. + So, the memory range [p, p+n) lies in the allocated memory range + [mem, mem + nplus). */ + ((small_t *) p)[-1] = p - mem; + /* p ≡ sa_alignment_max mod 2*sa_alignment_max. */ return p; } } @@ -115,35 +82,24 @@ void freea (void *p) { - /* mmalloca() may have returned NULL. */ - if (p != NULL) + /* Check argument. */ + if ((uintptr_t) p & (sa_alignment_max - 1)) { - /* Attempt to quickly distinguish the mmalloca() result - which has - a magic indicator word - and the alloca() result - which has an - uninitialized indicator word. It is for this test that sa_increment - additional bytes are allocated in the alloca() case. */ - if (((int *) p)[-1] == MAGIC_NUMBER) - { - /* Looks like a mmalloca() result. To see whether it really is one, - perform a lookup in the hash table. */ - size_t slot = (uintptr_t) p % HASH_TABLE_SIZE; - void **chain = &mmalloca_results[slot]; - for (; *chain != NULL;) - { - union header *h = p; - if (*chain == p) - { - /* Found it. Remove it from the hash table and free it. */ - union header *p_begin = h - 1; - *chain = p_begin->next; - free (p_begin); - return; - } - h = *chain; - chain = &h[-1].next; - } - } - /* At this point, we know it was not a mmalloca() result. */ + /* p was not the result of a malloca() call. Invalid argument. */ + abort (); + } + /* Determine whether p was a non-NULL pointer returned by mmalloca(). */ + if ((uintptr_t) p & sa_alignment_max) + { + void *mem = (char *) p - ((small_t *) p)[-1]; + free (mem); } } #endif + +/* + * Hey Emacs! + * Local Variables: + * coding: utf-8 + * End: + */ diff -Nru grep-3.1/lib/malloca.h grep-3.3/lib/malloca.h --- grep-3.1/lib/malloca.h 2017-01-01 11:25:47.000000000 +0000 +++ grep-3.3/lib/malloca.h 2018-02-26 06:10:46.000000000 +0000 @@ -1,5 +1,5 @@ /* Safe automatic memory allocation. - Copyright (C) 2003-2007, 2009-2017 Free Software Foundation, Inc. + Copyright (C) 2003-2007, 2009-2018 Free Software Foundation, Inc. Written by Bruno Haible , 2003. This program is free software; you can redistribute it and/or modify @@ -13,7 +13,7 @@ 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 . */ + along with this program; if not, see . */ #ifndef _MALLOCA_H #define _MALLOCA_H @@ -56,8 +56,10 @@ the function returns. Upon failure, it returns NULL. */ #if HAVE_ALLOCA # define malloca(N) \ - ((N) < 4032 - sa_increment \ - ? (void *) ((char *) alloca ((N) + sa_increment) + sa_increment) \ + ((N) < 4032 - (2 * sa_alignment_max - 1) \ + ? (void *) (((uintptr_t) (char *) alloca ((N) + 2 * sa_alignment_max - 1) \ + + (2 * sa_alignment_max - 1)) \ + & ~(uintptr_t)(2 * sa_alignment_max - 1)) \ : mmalloca (N)) #else # define malloca(N) \ @@ -119,10 +121,7 @@ | (sa_alignment_longlong - 1) #endif | (sa_alignment_longdouble - 1) - ) + 1, -/* The increment that guarantees room for a magic word must be >= sizeof (int) - and a multiple of sa_alignment_max. */ - sa_increment = ((sizeof (int) + sa_alignment_max - 1) / sa_alignment_max) * sa_alignment_max + ) + 1 }; #endif /* _MALLOCA_H */ diff -Nru grep-3.1/lib/malloca.valgrind grep-3.3/lib/malloca.valgrind --- grep-3.1/lib/malloca.valgrind 2014-06-27 22:32:18.000000000 +0000 +++ grep-3.3/lib/malloca.valgrind 1970-01-01 00:00:00.000000000 +0000 @@ -1,7 +0,0 @@ -# Suppress a valgrind message about use of uninitialized memory in freea(). -# This use is OK because it provides only a speedup. -{ - freea - Memcheck:Cond - fun:freea -} diff -Nru grep-3.1/lib/malloc.c grep-3.3/lib/malloc.c --- grep-3.1/lib/malloc.c 2017-01-01 11:25:47.000000000 +0000 +++ grep-3.3/lib/malloc.c 2018-01-07 00:08:02.000000000 +0000 @@ -1,6 +1,6 @@ /* malloc() function that is glibc compatible. - Copyright (C) 1997-1998, 2006-2007, 2009-2017 Free Software Foundation, Inc. + Copyright (C) 1997-1998, 2006-2007, 2009-2018 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 @@ -13,7 +13,7 @@ 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 . */ + along with this program; if not, see . */ /* written by Jim Meyering and Bruno Haible */ diff -Nru grep-3.1/lib/mbchar.c grep-3.3/lib/mbchar.c --- grep-3.1/lib/mbchar.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/lib/mbchar.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (C) 2001, 2006, 2009-2017 Free Software Foundation, Inc. +/* Copyright (C) 2001, 2006, 2009-2018 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 @@ -11,7 +11,7 @@ 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 . */ + along with this program. If not, see . */ #include diff -Nru grep-3.1/lib/mbchar.h grep-3.3/lib/mbchar.h --- grep-3.1/lib/mbchar.h 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/lib/mbchar.h 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ /* Multibyte character data type. - Copyright (C) 2001, 2005-2007, 2009-2017 Free Software Foundation, Inc. + Copyright (C) 2001, 2005-2007, 2009-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ /* Written by Bruno Haible . */ diff -Nru grep-3.1/lib/mbiter.h grep-3.3/lib/mbiter.h --- grep-3.1/lib/mbiter.h 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/lib/mbiter.h 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ /* Iterating through multibyte strings: macros for multi-byte encodings. - Copyright (C) 2001, 2005, 2007, 2009-2017 Free Software Foundation, Inc. + Copyright (C) 2001, 2005, 2007, 2009-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ /* Written by Bruno Haible . */ diff -Nru grep-3.1/lib/mbrlen.c grep-3.3/lib/mbrlen.c --- grep-3.1/lib/mbrlen.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/lib/mbrlen.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ /* Recognize multibyte character. - Copyright (C) 1999-2000, 2008-2017 Free Software Foundation, Inc. + Copyright (C) 1999-2000, 2008-2018 Free Software Foundation, Inc. Written by Bruno Haible , 2008. This program is free software: you can redistribute it and/or modify @@ -13,7 +13,7 @@ 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 . */ + along with this program. If not, see . */ #include diff -Nru grep-3.1/lib/mbrtowc.c grep-3.3/lib/mbrtowc.c --- grep-3.1/lib/mbrtowc.c 2017-05-21 00:31:28.000000000 +0000 +++ grep-3.3/lib/mbrtowc.c 2018-09-19 05:04:26.000000000 +0000 @@ -1,5 +1,5 @@ /* Convert multibyte character to wide character. - Copyright (C) 1999-2002, 2005-2017 Free Software Foundation, Inc. + Copyright (C) 1999-2002, 2005-2018 Free Software Foundation, Inc. Written by Bruno Haible , 2008. This program is free software: you can redistribute it and/or modify @@ -13,7 +13,7 @@ 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 . */ + along with this program. If not, see . */ #include @@ -35,12 +35,60 @@ # include "streq.h" # include "verify.h" -#ifndef FALLTHROUGH -# if __GNUC__ < 7 -# define FALLTHROUGH ((void) 0) -# else -# define FALLTHROUGH __attribute__ ((__fallthrough__)) +# ifndef FALLTHROUGH +# if __GNUC__ < 7 +# define FALLTHROUGH ((void) 0) +# else +# define FALLTHROUGH __attribute__ ((__fallthrough__)) +# endif # endif + +/* Returns a classification of special values of the encoding of the current + locale. */ +typedef enum { + enc_other, /* other */ + enc_utf8, /* UTF-8 */ + enc_eucjp, /* EUC-JP */ + enc_94, /* EUC-KR, GB2312, BIG5 */ + enc_euctw, /* EUC-TW */ + enc_gb18030, /* GB18030 */ + enc_sjis /* SJIS */ +} enc_t; +static inline enc_t +locale_enc (void) +{ + const char *encoding = locale_charset (); + if (STREQ_OPT (encoding, "UTF-8", 'U', 'T', 'F', '-', '8', 0, 0, 0, 0)) + return enc_utf8; + if (STREQ_OPT (encoding, "EUC-JP", 'E', 'U', 'C', '-', 'J', 'P', 0, 0, 0)) + return enc_eucjp; + if (STREQ_OPT (encoding, "EUC-KR", 'E', 'U', 'C', '-', 'K', 'R', 0, 0, 0) + || STREQ_OPT (encoding, "GB2312", 'G', 'B', '2', '3', '1', '2', 0, 0, 0) + || STREQ_OPT (encoding, "BIG5", 'B', 'I', 'G', '5', 0, 0, 0, 0, 0)) + return enc_94; + if (STREQ_OPT (encoding, "EUC-TW", 'E', 'U', 'C', '-', 'T', 'W', 0, 0, 0)) + return enc_euctw; + if (STREQ_OPT (encoding, "GB18030", 'G', 'B', '1', '8', '0', '3', '0', 0, 0)) + return enc_gb18030; + if (STREQ_OPT (encoding, "SJIS", 'S', 'J', 'I', 'S', 0, 0, 0, 0, 0)) + return enc_sjis; + return enc_other; +} + +#if GNULIB_WCHAR_SINGLE +/* When we know that the locale does not change, provide a speedup by + caching the value of locale_enc. */ +static int cached_locale_enc = -1; +static inline enc_t +locale_enc_cached (void) +{ + if (cached_locale_enc < 0) + cached_locale_enc = locale_enc (); + return cached_locale_enc; +} +#else +/* By default, don't make assumptions, hence no caching. */ +# define locale_enc_cached locale_enc #endif verify (sizeof (mbstate_t) >= 4); @@ -105,7 +153,7 @@ /* Here m > 0. */ # if __GLIBC__ || defined __UCLIBC__ - /* Work around bug */ + /* Work around bug */ mbtowc (NULL, NULL, 0); # endif { @@ -137,10 +185,9 @@ if (m >= 4 || m >= MB_CUR_MAX) goto invalid; /* Here MB_CUR_MAX > 1 and 0 < m < 4. */ - { - const char *encoding = locale_charset (); - - if (STREQ_OPT (encoding, "UTF-8", 'U', 'T', 'F', '-', '8', 0, 0, 0, 0)) + switch (locale_enc_cached ()) + { + case enc_utf8: /* UTF-8 */ { /* Cf. unistr/u8-mblen.c. */ unsigned char c = (unsigned char) p[0]; @@ -197,8 +244,7 @@ /* As a reference for this code, you can use the GNU libiconv implementation. Look for uses of the RET_TOOFEW macro. */ - if (STREQ_OPT (encoding, - "EUC-JP", 'E', 'U', 'C', '-', 'J', 'P', 0, 0, 0)) + case enc_eucjp: /* EUC-JP */ { if (m == 1) { @@ -221,12 +267,8 @@ } goto invalid; } - if (STREQ_OPT (encoding, - "EUC-KR", 'E', 'U', 'C', '-', 'K', 'R', 0, 0, 0) - || STREQ_OPT (encoding, - "GB2312", 'G', 'B', '2', '3', '1', '2', 0, 0, 0) - || STREQ_OPT (encoding, - "BIG5", 'B', 'I', 'G', '5', 0, 0, 0, 0, 0)) + + case enc_94: /* EUC-KR, GB2312, BIG5 */ { if (m == 1) { @@ -237,8 +279,8 @@ } goto invalid; } - if (STREQ_OPT (encoding, - "EUC-TW", 'E', 'U', 'C', '-', 'T', 'W', 0, 0, 0)) + + case enc_euctw: /* EUC-TW */ { if (m == 1) { @@ -256,8 +298,8 @@ } goto invalid; } - if (STREQ_OPT (encoding, - "GB18030", 'G', 'B', '1', '8', '0', '3', '0', 0, 0)) + + case enc_gb18030: /* GB18030 */ { if (m == 1) { @@ -290,7 +332,8 @@ } goto invalid; } - if (STREQ_OPT (encoding, "SJIS", 'S', 'J', 'I', 'S', 0, 0, 0, 0, 0)) + + case enc_sjis: /* SJIS */ { if (m == 1) { @@ -303,9 +346,10 @@ goto invalid; } - /* An unknown multibyte encoding. */ - goto incomplete; - } + default: + /* An unknown multibyte encoding. */ + goto incomplete; + } incomplete: { diff -Nru grep-3.1/lib/mbscasecmp.c grep-3.3/lib/mbscasecmp.c --- grep-3.1/lib/mbscasecmp.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/lib/mbscasecmp.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ /* Case-insensitive string comparison function. - Copyright (C) 1998-1999, 2005-2017 Free Software Foundation, Inc. + Copyright (C) 1998-1999, 2005-2018 Free Software Foundation, Inc. Written by Bruno Haible , 2005, based on earlier glibc code. @@ -14,7 +14,7 @@ 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 . */ + along with this program. If not, see . */ #include diff -Nru grep-3.1/lib/mbsinit.c grep-3.3/lib/mbsinit.c --- grep-3.1/lib/mbsinit.c 2017-05-14 01:09:51.000000000 +0000 +++ grep-3.3/lib/mbsinit.c 2018-06-24 23:16:49.000000000 +0000 @@ -1,5 +1,5 @@ /* Test for initial conversion state. - Copyright (C) 2008-2017 Free Software Foundation, Inc. + Copyright (C) 2008-2018 Free Software Foundation, Inc. Written by Bruno Haible , 2008. This program is free software: you can redistribute it and/or modify @@ -13,7 +13,7 @@ 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 . */ + along with this program. If not, see . */ #include @@ -54,7 +54,7 @@ int mbsinit (const mbstate_t *ps) { -# if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ +# if defined _WIN32 && !defined __CYGWIN__ /* Native Windows. */ # ifdef __MINGW32__ /* On mingw, 'mbstate_t' is defined as 'int'. */ diff -Nru grep-3.1/lib/mbslen.c grep-3.3/lib/mbslen.c --- grep-3.1/lib/mbslen.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/lib/mbslen.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ /* Counting the multibyte characters in a string. - Copyright (C) 2007-2017 Free Software Foundation, Inc. + Copyright (C) 2007-2018 Free Software Foundation, Inc. Written by Bruno Haible , 2007. This program is free software: you can redistribute it and/or modify @@ -13,7 +13,7 @@ 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 . */ + along with this program. If not, see . */ #include diff -Nru grep-3.1/lib/mbsrtowcs.c grep-3.3/lib/mbsrtowcs.c --- grep-3.1/lib/mbsrtowcs.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/lib/mbsrtowcs.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ /* Convert string to wide string. - Copyright (C) 2008-2017 Free Software Foundation, Inc. + Copyright (C) 2008-2018 Free Software Foundation, Inc. Written by Bruno Haible , 2008. This program is free software: you can redistribute it and/or modify @@ -13,7 +13,7 @@ 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 . */ + along with this program. If not, see . */ #include diff -Nru grep-3.1/lib/mbsrtowcs-impl.h grep-3.3/lib/mbsrtowcs-impl.h --- grep-3.1/lib/mbsrtowcs-impl.h 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/lib/mbsrtowcs-impl.h 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ /* Convert string to wide string. - Copyright (C) 2008-2017 Free Software Foundation, Inc. + Copyright (C) 2008-2018 Free Software Foundation, Inc. Written by Bruno Haible , 2008. This program is free software: you can redistribute it and/or modify @@ -13,7 +13,7 @@ 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 . */ + along with this program. If not, see . */ size_t mbsrtowcs (wchar_t *dest, const char **srcp, size_t len, mbstate_t *ps) diff -Nru grep-3.1/lib/mbsrtowcs-state.c grep-3.3/lib/mbsrtowcs-state.c --- grep-3.1/lib/mbsrtowcs-state.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/lib/mbsrtowcs-state.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ /* Convert string to wide string. - Copyright (C) 2008-2017 Free Software Foundation, Inc. + Copyright (C) 2008-2018 Free Software Foundation, Inc. Written by Bruno Haible , 2008. This program is free software: you can redistribute it and/or modify @@ -13,7 +13,7 @@ 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 . */ + along with this program. If not, see . */ #include @@ -23,7 +23,7 @@ mbstate_t _gl_mbsrtowcs_state /* The state must initially be in the "initial state"; so, zero-initialize it. On most systems, putting it into BSS is sufficient. Not so on Mac OS X 10.3, - see . + see . When it needs an initializer, use 0 or {0} as initializer? 0 only works when mbstate_t is a scalar type (such as when gnulib defines it, or on AIX, IRIX, mingw). {0} works as an initializer in all cases: for a struct diff -Nru grep-3.1/lib/mbsstr.c grep-3.3/lib/mbsstr.c --- grep-3.1/lib/mbsstr.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/lib/mbsstr.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ /* Searching in a string. -*- coding: utf-8 -*- - Copyright (C) 2005-2017 Free Software Foundation, Inc. + Copyright (C) 2005-2018 Free Software Foundation, Inc. Written by Bruno Haible , 2005. This program is free software: you can redistribute it and/or modify @@ -13,7 +13,7 @@ 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 . */ + along with this program. If not, see . */ #include @@ -32,7 +32,7 @@ #include "str-kmp.h" /* Knuth-Morris-Pratt algorithm. - See http://en.wikipedia.org/wiki/Knuth-Morris-Pratt_algorithm + See https://en.wikipedia.org/wiki/Knuth-Morris-Pratt_algorithm Return a boolean indicating success: Return true and set *RESULTP if the search was completed. Return false if it was aborted because not enough memory was available. */ diff -Nru grep-3.1/lib/mbtowc.c grep-3.3/lib/mbtowc.c --- grep-3.1/lib/mbtowc.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/lib/mbtowc.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ /* Convert multibyte character to wide character. - Copyright (C) 2011-2017 Free Software Foundation, Inc. + Copyright (C) 2011-2018 Free Software Foundation, Inc. Written by Bruno Haible , 2011. This program is free software: you can redistribute it and/or modify @@ -13,7 +13,7 @@ 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 . */ + along with this program. If not, see . */ #include diff -Nru grep-3.1/lib/mbtowc-impl.h grep-3.3/lib/mbtowc-impl.h --- grep-3.1/lib/mbtowc-impl.h 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/lib/mbtowc-impl.h 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ /* Convert multibyte character to wide character. - Copyright (C) 2011-2017 Free Software Foundation, Inc. + Copyright (C) 2011-2018 Free Software Foundation, Inc. Written by Bruno Haible , 2011. This program is free software: you can redistribute it and/or modify @@ -13,7 +13,7 @@ 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 . */ + along with this program. If not, see . */ /* We don't need a static internal state, because the encoding is not state dependent, and when mbrtowc returns (size_t)(-2). we throw the result diff -Nru grep-3.1/lib/mbuiter.h grep-3.3/lib/mbuiter.h --- grep-3.1/lib/mbuiter.h 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/lib/mbuiter.h 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ /* Iterating through multibyte strings: macros for multi-byte encodings. - Copyright (C) 2001, 2005, 2007, 2009-2017 Free Software Foundation, Inc. + Copyright (C) 2001, 2005, 2007, 2009-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ /* Written by Bruno Haible . */ diff -Nru grep-3.1/lib/memchr2.c grep-3.3/lib/memchr2.c --- grep-3.1/lib/memchr2.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/lib/memchr2.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1993, 1996-1997, 1999-2000, 2003-2004, 2006, 2008-2017 +/* Copyright (C) 1991, 1993, 1996-1997, 1999-2000, 2003-2004, 2006, 2008-2018 Free Software Foundation, Inc. Based on strlen implementation by Torbjorn Granlund (tege@sics.se), @@ -19,7 +19,7 @@ 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 . */ +along with this program. If not, see . */ #include diff -Nru grep-3.1/lib/memchr2.h grep-3.3/lib/memchr2.h --- grep-3.1/lib/memchr2.h 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/lib/memchr2.h 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ /* Scan memory for the first of two bytes. - Copyright (C) 2008-2017 Free Software Foundation, Inc. + Copyright (C) 2008-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ #include diff -Nru grep-3.1/lib/memchr.c grep-3.3/lib/memchr.c --- grep-3.1/lib/memchr.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/lib/memchr.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1993, 1996-1997, 1999-2000, 2003-2004, 2006, 2008-2017 +/* Copyright (C) 1991, 1993, 1996-1997, 1999-2000, 2003-2004, 2006, 2008-2018 Free Software Foundation, Inc. Based on strlen implementation by Torbjorn Granlund (tege@sics.se), @@ -21,7 +21,7 @@ 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 . */ +along with this program. If not, see . */ #ifndef _LIBC # include diff -Nru grep-3.1/lib/mempcpy.c grep-3.3/lib/mempcpy.c --- grep-3.1/lib/mempcpy.c 2017-01-01 11:25:47.000000000 +0000 +++ grep-3.3/lib/mempcpy.c 2018-01-07 00:08:02.000000000 +0000 @@ -1,5 +1,5 @@ /* Copy memory area and return pointer after last written byte. - Copyright (C) 2003, 2007, 2009-2017 Free Software Foundation, Inc. + Copyright (C) 2003, 2007, 2009-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program; if not, see . */ #include diff -Nru grep-3.1/lib/memrchr.c grep-3.3/lib/memrchr.c --- grep-3.1/lib/memrchr.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/lib/memrchr.c 2018-12-21 02:51:47.000000000 +0000 @@ -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-2017 Free Software + Copyright (C) 1991, 1993, 1996-1997, 1999-2000, 2003-2018 Free Software Foundation, Inc. Based on strlen implementation by Torbjorn Granlund (tege@sics.se), @@ -20,7 +20,7 @@ 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 . */ + along with this program. If not, see . */ #if defined _LIBC # include @@ -68,7 +68,7 @@ if (*--char_ptr == c) return (void *) char_ptr; - longword_ptr = (const longword *) char_ptr; + longword_ptr = (const void *) char_ptr; /* All these elucidatory comments refer to 4-byte longwords, but the theory applies equally well to any size longwords. */ diff -Nru grep-3.1/lib/minmax.h grep-3.3/lib/minmax.h --- grep-3.1/lib/minmax.h 2017-01-01 11:25:47.000000000 +0000 +++ grep-3.3/lib/minmax.h 2018-01-07 00:08:02.000000000 +0000 @@ -1,5 +1,5 @@ /* MIN, MAX macros. - Copyright (C) 1995, 1998, 2001, 2003, 2005, 2009-2017 Free Software + Copyright (C) 1995, 1998, 2001, 2003, 2005, 2009-2018 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify @@ -13,7 +13,7 @@ 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 . */ + along with this program; if not, see . */ #ifndef _MINMAX_H #define _MINMAX_H diff -Nru grep-3.1/lib/msvc-inval.c grep-3.3/lib/msvc-inval.c --- grep-3.1/lib/msvc-inval.c 2017-01-01 11:25:47.000000000 +0000 +++ grep-3.3/lib/msvc-inval.c 2018-01-07 00:08:02.000000000 +0000 @@ -1,5 +1,5 @@ /* Invalid parameter handler for MSVC runtime libraries. - Copyright (C) 2011-2017 Free Software Foundation, Inc. + Copyright (C) 2011-2018 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 @@ -12,7 +12,7 @@ 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 . */ + with this program; if not, see . */ #include diff -Nru grep-3.1/lib/msvc-inval.h grep-3.3/lib/msvc-inval.h --- grep-3.1/lib/msvc-inval.h 2017-01-01 11:25:47.000000000 +0000 +++ grep-3.3/lib/msvc-inval.h 2018-01-07 00:08:02.000000000 +0000 @@ -1,5 +1,5 @@ /* Invalid parameter handler for MSVC runtime libraries. - Copyright (C) 2011-2017 Free Software Foundation, Inc. + Copyright (C) 2011-2018 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 @@ -12,7 +12,7 @@ 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 . */ + with this program; if not, see . */ #ifndef _MSVC_INVAL_H #define _MSVC_INVAL_H @@ -95,7 +95,7 @@ /* Gnulib can define its own status codes, as described in the page "Raising Software Exceptions" on microsoft.com - . + . Our status codes are composed of - 0xE0000000, mandatory for all user-defined status codes, - 0x474E550, a API identifier ("GNU"), @@ -106,7 +106,7 @@ # if defined _MSC_VER /* A compiler that supports __try/__except, as described in the page "try-except statement" on microsoft.com - . + . With __try/__except, we can use the multithread-safe exception handling. */ # ifdef __cplusplus diff -Nru grep-3.1/lib/msvc-nothrow.c grep-3.3/lib/msvc-nothrow.c --- grep-3.1/lib/msvc-nothrow.c 2017-05-14 01:10:19.000000000 +0000 +++ grep-3.3/lib/msvc-nothrow.c 2018-01-07 00:08:02.000000000 +0000 @@ -1,6 +1,6 @@ /* Wrappers that don't throw invalid parameter notifications with MSVC runtime libraries. - Copyright (C) 2011-2017 Free Software Foundation, Inc. + Copyright (C) 2011-2018 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 @@ -13,7 +13,7 @@ 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 . */ + with this program; if not, see . */ #include diff -Nru grep-3.1/lib/msvc-nothrow.h grep-3.3/lib/msvc-nothrow.h --- grep-3.1/lib/msvc-nothrow.h 2017-01-01 11:25:48.000000000 +0000 +++ grep-3.3/lib/msvc-nothrow.h 2018-06-24 23:18:01.000000000 +0000 @@ -1,6 +1,6 @@ /* Wrappers that don't throw invalid parameter notifications with MSVC runtime libraries. - Copyright (C) 2011-2017 Free Software Foundation, Inc. + Copyright (C) 2011-2018 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 @@ -13,7 +13,7 @@ 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 . */ + with this program; if not, see . */ #ifndef _MSVC_NOTHROW_H #define _MSVC_NOTHROW_H @@ -25,7 +25,7 @@ This file defines wrappers that turn such an invalid parameter notification into an error code. */ -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +#if defined _WIN32 && ! defined __CYGWIN__ /* Get original declaration of _get_osfhandle. */ # include diff -Nru grep-3.1/lib/nl_langinfo.c grep-3.3/lib/nl_langinfo.c --- grep-3.1/lib/nl_langinfo.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/lib/nl_langinfo.c 2018-09-19 05:04:26.000000000 +0000 @@ -1,6 +1,6 @@ /* nl_langinfo() replacement: query locale dependent information. - Copyright (C) 2007-2017 Free Software Foundation, Inc. + Copyright (C) 2007-2018 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 @@ -13,7 +13,7 @@ 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 . */ + along with this program. If not, see . */ #include @@ -22,12 +22,13 @@ #include #include -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +#if defined _WIN32 && ! defined __CYGWIN__ # define WIN32_LEAN_AND_MEAN /* avoid including junk */ # include # include #endif +#if !REPLACE_NL_LANGINFO || GNULIB_defined_CODESET /* Return the codeset of the current locale, if this is easily deducible. Otherwise, return "". */ static char * @@ -64,7 +65,7 @@ } } -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +# if defined _WIN32 && ! defined __CYGWIN__ /* If setlocale is successful, it returns the number of the codepage, as a string. Otherwise, fall back on Windows API GetACP, which returns the locale's codepage as a number (although @@ -76,9 +77,10 @@ else sprintf (buf + 2, "%u", GetACP ()); codeset = memcpy (buf, "CP", 2); -#endif +# endif return codeset; } +#endif #if REPLACE_NL_LANGINFO @@ -100,6 +102,24 @@ case T_FMT_AMPM: return (char *) "%I:%M:%S %p"; # endif +# if GNULIB_defined_ALTMON + case ALTMON_1: + case ALTMON_2: + case ALTMON_3: + case ALTMON_4: + case ALTMON_5: + case ALTMON_6: + case ALTMON_7: + case ALTMON_8: + case ALTMON_9: + case ALTMON_10: + case ALTMON_11: + case ALTMON_12: + /* We don't ship the appropriate localizations with gnulib. Therefore, + treat ALTMON_i like MON_i. */ + item = item - ALTMON_1 + MON_1; + break; +# endif # if GNULIB_defined_ERA case ERA: /* The format is not standardized. In glibc it is a sequence of strings @@ -171,8 +191,10 @@ return localeconv () ->decimal_point; case THOUSEP: return localeconv () ->thousands_sep; +# ifdef GROUPING case GROUPING: return localeconv () ->grouping; +# endif /* nl_langinfo items of the LC_TIME category. TODO: Really use the locale. */ case D_T_FMT: @@ -228,28 +250,49 @@ return (char *) abdays[item - ABDAY_1]; return nlbuf; } - case MON_1: - case MON_2: - case MON_3: - case MON_4: - case MON_5: - case MON_6: - case MON_7: - case MON_8: - case MON_9: - case MON_10: - case MON_11: - case MON_12: - { - static char const months[][sizeof "September"] = { - "January", "February", "March", "April", "May", "June", "July", - "September", "October", "November", "December" - }; + { + static char const months[][sizeof "September"] = { + "January", "February", "March", "April", "May", "June", "July", + "September", "October", "November", "December" + }; + case MON_1: + case MON_2: + case MON_3: + case MON_4: + case MON_5: + case MON_6: + case MON_7: + case MON_8: + case MON_9: + case MON_10: + case MON_11: + case MON_12: tmm.tm_mon = item - MON_1; if (!strftime (nlbuf, sizeof nlbuf, "%B", &tmm)) return (char *) months[item - MON_1]; return nlbuf; - } + case ALTMON_1: + case ALTMON_2: + case ALTMON_3: + case ALTMON_4: + case ALTMON_5: + case ALTMON_6: + case ALTMON_7: + case ALTMON_8: + case ALTMON_9: + case ALTMON_10: + case ALTMON_11: + case ALTMON_12: + tmm.tm_mon = item - ALTMON_1; + /* The platforms without nl_langinfo() don't support strftime with %OB. + We don't even need to try. */ + #if 0 + if (!strftime (nlbuf, sizeof nlbuf, "%OB", &tmm)) + #endif + if (!strftime (nlbuf, sizeof nlbuf, "%B", &tmm)) + return (char *) months[item - ALTMON_1]; + return nlbuf; + } case ABMON_1: case ABMON_2: case ABMON_3: @@ -279,6 +322,7 @@ /* nl_langinfo items of the LC_MONETARY category. */ case CRNCYSTR: return localeconv () ->currency_symbol; +# ifdef INT_CURR_SYMBOL case INT_CURR_SYMBOL: return localeconv () ->int_curr_symbol; case MON_DECIMAL_POINT: @@ -307,6 +351,7 @@ return & localeconv () ->p_sign_posn; case N_SIGN_POSN: return & localeconv () ->n_sign_posn; +# endif /* nl_langinfo items of the LC_MESSAGES category TODO: Really use the locale. */ case YESEXPR: diff -Nru grep-3.1/lib/_Noreturn.h grep-3.3/lib/_Noreturn.h --- grep-3.1/lib/_Noreturn.h 2017-03-17 04:33:17.000000000 +0000 +++ grep-3.3/lib/_Noreturn.h 2018-12-21 02:51:47.000000000 +0000 @@ -1,8 +1,12 @@ -#if !defined _Noreturn && __STDC_VERSION__ < 201112 -# if (3 <= __GNUC__ || (__GNUC__ == 2 && 8 <= __GNUC_MINOR__) \ - || 0x5110 <= __SUNPRO_C) +#ifndef _Noreturn +# if 201103 <= (defined __cplusplus ? __cplusplus : 0) +# define _Noreturn [[noreturn]] +# elif (201112 <= (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) \ + || 4 < __GNUC__ + (7 <= __GNUC_MINOR__)) + /* _Noreturn works as-is. */ +# elif 2 < __GNUC__ + (8 <= __GNUC_MINOR__) || 0x5110 <= __SUNPRO_C # define _Noreturn __attribute__ ((__noreturn__)) -# elif 1200 <= _MSC_VER +# elif 1200 <= (defined _MSC_VER ? _MSC_VER : 0) # define _Noreturn __declspec (noreturn) # else # define _Noreturn diff -Nru grep-3.1/lib/obstack.c grep-3.3/lib/obstack.c --- grep-3.1/lib/obstack.c 2017-01-01 11:25:48.000000000 +0000 +++ grep-3.3/lib/obstack.c 2018-01-07 00:08:02.000000000 +0000 @@ -1,5 +1,5 @@ /* obstack.c - subroutines used implicitly by object stack macros - Copyright (C) 1988-2017 Free Software Foundation, Inc. + Copyright (C) 1988-2018 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 @@ -14,7 +14,7 @@ You should have received a copy of the GNU General Public License along with the GNU C Library; if not, see - . */ + . */ #ifdef _LIBC diff -Nru grep-3.1/lib/obstack.h grep-3.3/lib/obstack.h --- grep-3.1/lib/obstack.h 2017-01-01 11:25:48.000000000 +0000 +++ grep-3.3/lib/obstack.h 2018-12-21 03:32:19.000000000 +0000 @@ -1,5 +1,5 @@ /* obstack.h - object stack macros - Copyright (C) 1988-2017 Free Software Foundation, Inc. + Copyright (C) 1988-2018 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 @@ -14,7 +14,7 @@ You should have received a copy of the GNU General Public License along with the GNU C Library; if not, see - . */ + . */ /* Summary: @@ -111,7 +111,7 @@ #include /* For size_t and ptrdiff_t. */ #include /* For __GNU_LIBRARY__, and memcpy. */ -#if __STDC_VERSION__ < 199901L +#if __STDC_VERSION__ < 199901L || defined __HP_cc # define __FLEXIBLE_ARRAY_MEMBER 1 #else # define __FLEXIBLE_ARRAY_MEMBER diff -Nru grep-3.1/lib/openat.c grep-3.3/lib/openat.c --- grep-3.1/lib/openat.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/lib/openat.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ /* provide a replacement openat function - Copyright (C) 2004-2017 Free Software Foundation, Inc. + Copyright (C) 2004-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ /* written by Jim Meyering */ @@ -41,6 +41,8 @@ #include "openat.h" +#include "cloexec.h" + #include #include #include @@ -50,10 +52,18 @@ #if HAVE_OPENAT -/* Like openat, but work around Solaris 9 bugs with trailing slash. */ +/* Like openat, but support O_CLOEXEC and work around Solaris 9 bugs + with trailing slash. */ int rpl_openat (int dfd, char const *filename, int flags, ...) { + /* 0 = unknown, 1 = yes, -1 = no. */ +#if GNULIB_defined_O_CLOEXEC + int have_cloexec = -1; +#else + static int have_cloexec; +#endif + mode_t mode; int fd; @@ -103,7 +113,25 @@ } # endif - fd = orig_openat (dfd, filename, flags, mode); + fd = orig_openat (dfd, filename, + flags & ~(have_cloexec <= 0 ? O_CLOEXEC : 0), mode); + + if (flags & O_CLOEXEC) + { + if (! have_cloexec) + { + if (0 <= fd) + have_cloexec = 1; + else if (errno == EINVAL) + { + fd = orig_openat (dfd, filename, flags & ~O_CLOEXEC, mode); + have_cloexec = -1; + } + } + if (have_cloexec < 0 && 0 <= fd) + set_cloexec_flag (fd, true); + } + # if OPEN_TRAILING_SLASH_BUG /* If the filename ends in a slash and fd does not refer to a directory, @@ -146,7 +174,7 @@ # include "save-cwd.h" /* Replacement for Solaris' openat function. - + First, try to simulate it via open ("/proc/self/fd/FD/FILE"). Failing that, simulate it by doing save_cwd/fchdir/open/restore_cwd. If either the save_cwd or the restore_cwd fails (relatively unlikely), diff -Nru grep-3.1/lib/openat-die.c grep-3.3/lib/openat-die.c --- grep-3.1/lib/openat-die.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/lib/openat-die.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,6 +1,6 @@ /* Report a save- or restore-cwd failure in our openat replacement and then exit. - Copyright (C) 2005-2006, 2008-2017 Free Software Foundation, Inc. + Copyright (C) 2005-2006, 2008-2018 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 @@ -13,7 +13,7 @@ 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 . */ + along with this program. If not, see . */ #include diff -Nru grep-3.1/lib/openat.h grep-3.3/lib/openat.h --- grep-3.1/lib/openat.h 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/lib/openat.h 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ /* provide a replacement openat function - Copyright (C) 2004-2006, 2008-2017 Free Software Foundation, Inc. + Copyright (C) 2004-2006, 2008-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ /* written by Jim Meyering */ diff -Nru grep-3.1/lib/openat-priv.h grep-3.3/lib/openat-priv.h --- grep-3.1/lib/openat-priv.h 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/lib/openat-priv.h 2018-01-07 00:07:08.000000000 +0000 @@ -1,6 +1,6 @@ /* Internals for openat-like functions. - Copyright (C) 2005-2006, 2009-2017 Free Software Foundation, Inc. + Copyright (C) 2005-2006, 2009-2018 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 @@ -13,7 +13,7 @@ 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 . */ + along with this program. If not, see . */ /* written by Jim Meyering */ diff -Nru grep-3.1/lib/openat-proc.c grep-3.3/lib/openat-proc.c --- grep-3.1/lib/openat-proc.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/lib/openat-proc.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,6 +1,6 @@ /* Create /proc/self/fd-related names for subfiles of open directories. - Copyright (C) 2006, 2009-2017 Free Software Foundation, Inc. + Copyright (C) 2006, 2009-2018 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 @@ -13,7 +13,7 @@ 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 . */ + along with this program. If not, see . */ /* Written by Paul Eggert. */ diff -Nru grep-3.1/lib/openat-safer.c grep-3.3/lib/openat-safer.c --- grep-3.1/lib/openat-safer.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/lib/openat-safer.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,6 +1,6 @@ /* Invoke openat, but avoid some glitches. - Copyright (C) 2005-2006, 2008-2017 Free Software Foundation, Inc. + Copyright (C) 2005-2006, 2008-2018 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 @@ -13,7 +13,7 @@ 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 . */ + along with this program. If not, see . */ /* Written by Paul Eggert for open, ported by Eric Blake for openat. */ diff -Nru grep-3.1/lib/open.c grep-3.3/lib/open.c --- grep-3.1/lib/open.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/lib/open.c 2018-06-24 23:16:49.000000000 +0000 @@ -1,5 +1,5 @@ /* Open a descriptor to a file. - Copyright (C) 2007-2017 Free Software Foundation, Inc. + Copyright (C) 2007-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ /* Written by Bruno Haible , 2007. */ @@ -38,6 +38,8 @@ this include because of the preliminary #include above. */ #include "fcntl.h" +#include "cloexec.h" + #include #include #include @@ -52,6 +54,13 @@ int open (const char *filename, int flags, ...) { + /* 0 = unknown, 1 = yes, -1 = no. */ +#if GNULIB_defined_O_CLOEXEC + int have_cloexec = -1; +#else + static int have_cloexec; +#endif + mode_t mode; int fd; @@ -77,7 +86,7 @@ flags &= ~O_NONBLOCK; #endif -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +#if defined _WIN32 && ! defined __CYGWIN__ if (strcmp (filename, "/dev/null") == 0) filename = "NUL"; #endif @@ -115,7 +124,25 @@ } #endif - fd = orig_open (filename, flags, mode); + fd = orig_open (filename, + flags & ~(have_cloexec <= 0 ? O_CLOEXEC : 0), mode); + + if (flags & O_CLOEXEC) + { + if (! have_cloexec) + { + if (0 <= fd) + have_cloexec = 1; + else if (errno == EINVAL) + { + fd = orig_open (filename, flags & ~O_CLOEXEC, mode); + have_cloexec = -1; + } + } + if (have_cloexec < 0 && 0 <= fd) + set_cloexec_flag (fd, true); + } + #if REPLACE_FCHDIR /* Implementing fchdir and fdopendir requires the ability to open a diff -Nru grep-3.1/lib/opendirat.c grep-3.3/lib/opendirat.c --- grep-3.1/lib/opendirat.c 1970-01-01 00:00:00.000000000 +0000 +++ grep-3.3/lib/opendirat.c 2018-12-21 02:51:47.000000000 +0000 @@ -0,0 +1,54 @@ +/* Open a directory relative to another directory. + + Copyright 2006-2018 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 and Paul Eggert. */ + +#include + +#include + +#include +#include +#include + +/* Relative to DIR_FD, open the directory DIR, passing EXTRA_FLAGS to + the underlying openat call. On success, store into *PNEW_FD the + underlying file descriptor of the newly opened directory and return + the directory stream. On failure, return NULL and set errno. + + On success, *PNEW_FD is at least 3, so this is a "safer" function. */ + +DIR * +opendirat (int dir_fd, char const *dir, int extra_flags, int *pnew_fd) +{ + int open_flags = (O_RDONLY | O_CLOEXEC | O_DIRECTORY | O_NOCTTY + | O_NONBLOCK | extra_flags); + int new_fd = openat (dir_fd, dir, open_flags); + + if (new_fd < 0) + return NULL; + DIR *dirp = fdopendir (new_fd); + if (dirp) + *pnew_fd = new_fd; + else + { + int fdopendir_errno = errno; + close (new_fd); + errno = fdopendir_errno; + } + return dirp; +} diff -Nru grep-3.1/lib/opendirat.h grep-3.3/lib/opendirat.h --- grep-3.1/lib/opendirat.h 1970-01-01 00:00:00.000000000 +0000 +++ grep-3.3/lib/opendirat.h 2018-12-21 02:51:47.000000000 +0000 @@ -0,0 +1,2 @@ +#include +DIR *opendirat (int, char const *, int, int *); diff -Nru grep-3.1/lib/opendir.c grep-3.3/lib/opendir.c --- grep-3.1/lib/opendir.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/lib/opendir.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ /* Start reading the entries of a directory. - Copyright (C) 2006-2017 Free Software Foundation, Inc. + Copyright (C) 2006-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ #include diff -Nru grep-3.1/lib/opendir-safer.c grep-3.3/lib/opendir-safer.c --- grep-3.1/lib/opendir-safer.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/lib/opendir-safer.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,76 +0,0 @@ -/* Invoke opendir, but avoid some glitches. - - 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 . */ - -/* Written by Eric Blake. */ - -#include - -#include "dirent-safer.h" - -#include -#include -#include "unistd-safer.h" - -/* Like opendir, but do not clobber stdin, stdout, or stderr. */ - -DIR * -opendir_safer (char const *name) -{ - DIR *dp = opendir (name); - - if (dp) - { - int fd = dirfd (dp); - - if (0 <= fd && fd <= STDERR_FILENO) - { - /* If fdopendir is native (as on Linux), then it is safe to - assume dirfd(fdopendir(n))==n. If we are using the - gnulib module fdopendir, then this guarantee is not met, - but fdopendir recursively calls opendir_safer up to 3 - times to at least get a safe fd. If fdopendir is not - present but dirfd is accurate (as on cygwin 1.5.x), then - we recurse up to 3 times ourselves. Finally, if dirfd - always fails (as on mingw), then we are already safe. */ - DIR *newdp; - int e; -#if HAVE_FDOPENDIR || GNULIB_FDOPENDIR - int f = dup_safer (fd); - if (f < 0) - { - e = errno; - newdp = NULL; - } - else - { - newdp = fdopendir (f); - e = errno; - if (! newdp) - close (f); - } -#else /* !FDOPENDIR */ - newdp = opendir_safer (name); - e = errno; -#endif - closedir (dp); - errno = e; - dp = newdp; - } - } - - return dp; -} diff -Nru grep-3.1/lib/open-safer.c grep-3.3/lib/open-safer.c --- grep-3.1/lib/open-safer.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/lib/open-safer.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,6 +1,6 @@ /* Invoke open, but avoid some glitches. - Copyright (C) 2005-2006, 2008-2017 Free Software Foundation, Inc. + Copyright (C) 2005-2006, 2008-2018 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 @@ -13,7 +13,7 @@ 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 . */ + along with this program. If not, see . */ /* Written by Paul Eggert. */ diff -Nru grep-3.1/lib/pathmax.h grep-3.3/lib/pathmax.h --- grep-3.1/lib/pathmax.h 2017-01-01 11:25:48.000000000 +0000 +++ grep-3.3/lib/pathmax.h 2018-06-24 23:18:01.000000000 +0000 @@ -1,5 +1,5 @@ /* Define PATH_MAX somehow. Requires sys/types.h. - Copyright (C) 1992, 1999, 2001, 2003, 2005, 2009-2017 Free Software + Copyright (C) 1992, 1999, 2001, 2003, 2005, 2009-2018 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify @@ -13,7 +13,7 @@ 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 . */ + along with this program; if not, see . */ #ifndef _PATHMAX_H # define _PATHMAX_H @@ -65,10 +65,10 @@ # define PATH_MAX 1024 # endif -# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +# if defined _WIN32 && ! defined __CYGWIN__ /* The page "Naming Files, Paths, and Namespaces" on msdn.microsoft.com, section "Maximum Path Length Limitation", - + explains that the maximum size of a filename, including the terminating NUL byte, is 260 = 3 + 256 + 1. This is the same value as diff -Nru grep-3.1/lib/pipe-safer.c grep-3.3/lib/pipe-safer.c --- grep-3.1/lib/pipe-safer.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/lib/pipe-safer.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ /* Invoke pipe, but avoid some glitches. - Copyright (C) 2005-2006, 2009-2017 Free Software Foundation, Inc. + Copyright (C) 2005-2006, 2009-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ /* Written by Jim Meyering. */ diff -Nru grep-3.1/lib/propername.c grep-3.3/lib/propername.c --- grep-3.1/lib/propername.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/lib/propername.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ /* Localization of proper names. - Copyright (C) 2006-2017 Free Software Foundation, Inc. + Copyright (C) 2006-2018 Free Software Foundation, Inc. Written by Bruno Haible , 2006. This program is free software: you can redistribute it and/or modify @@ -13,7 +13,7 @@ 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 . */ + along with this program. If not, see . */ /* Without this pragma, gcc 4.7.0 20111124 mistakenly suggests that the proper_name function might be candidate for attribute 'const' */ diff -Nru grep-3.1/lib/propername.h grep-3.3/lib/propername.h --- grep-3.1/lib/propername.h 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/lib/propername.h 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ /* Localization of proper names. -*- coding: utf-8 -*- - Copyright (C) 2006, 2008-2017 Free Software Foundation, Inc. + Copyright (C) 2006, 2008-2018 Free Software Foundation, Inc. Written by Bruno Haible , 2006. This program is free software: you can redistribute it and/or modify @@ -13,7 +13,7 @@ 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 . */ + along with this program. If not, see . */ /* INTRODUCTION diff -Nru grep-3.1/lib/quotearg.c grep-3.3/lib/quotearg.c --- grep-3.1/lib/quotearg.c 2017-06-10 16:44:24.000000000 +0000 +++ grep-3.3/lib/quotearg.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,6 +1,6 @@ /* quotearg.c - quote arguments for output - Copyright (C) 1998-2002, 2004-2017 Free Software Foundation, Inc. + Copyright (C) 1998-2002, 2004-2018 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 @@ -13,7 +13,7 @@ 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 . */ + along with this program. If not, see . */ /* Written by Paul Eggert */ @@ -357,7 +357,7 @@ for your locale. If you don't know what to put here, please see - + and use glyphs suitable for your language. */ left_quote = gettext_quote (N_("`"), quoting_style); right_quote = gettext_quote (N_("'"), quoting_style); @@ -887,8 +887,9 @@ if (nslots <= n) { bool preallocated = (sv == &slotvec0); + int nmax = MIN (INT_MAX, MIN (PTRDIFF_MAX, SIZE_MAX) / sizeof *sv) - 1; - if (MIN (INT_MAX, MIN (PTRDIFF_MAX, SIZE_MAX) / sizeof *sv) <= n) + if (nmax < n) xalloc_die (); slotvec = sv = xrealloc (preallocated ? NULL : sv, (n + 1) * sizeof *sv); @@ -1079,3 +1080,10 @@ { return quote_n (0, arg); } + +/* + * Hey Emacs! + * Local Variables: + * coding: utf-8 + * End: + */ diff -Nru grep-3.1/lib/quotearg.h grep-3.3/lib/quotearg.h --- grep-3.1/lib/quotearg.h 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/lib/quotearg.h 2018-01-07 00:07:08.000000000 +0000 @@ -1,6 +1,6 @@ /* quotearg.h - quote arguments for output - Copyright (C) 1998-2002, 2004, 2006, 2008-2017 Free Software Foundation, + Copyright (C) 1998-2002, 2004, 2006, 2008-2018 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify @@ -14,7 +14,7 @@ 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 . */ + along with this program. If not, see . */ /* Written by Paul Eggert */ diff -Nru grep-3.1/lib/quote.h grep-3.3/lib/quote.h --- grep-3.1/lib/quote.h 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/lib/quote.h 2018-01-07 00:07:08.000000000 +0000 @@ -1,6 +1,6 @@ /* quote.h - prototypes for quote.c - Copyright (C) 1998-2001, 2003, 2009-2017 Free Software Foundation, Inc. + Copyright (C) 1998-2001, 2003, 2009-2018 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 @@ -13,7 +13,7 @@ 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 . */ + along with this program. If not, see . */ #ifndef QUOTE_H_ # define QUOTE_H_ 1 diff -Nru grep-3.1/lib/raise.c grep-3.3/lib/raise.c --- grep-3.1/lib/raise.c 1970-01-01 00:00:00.000000000 +0000 +++ grep-3.3/lib/raise.c 2018-12-15 18:14:26.000000000 +0000 @@ -0,0 +1,83 @@ +/* Provide a non-threads replacement for the POSIX raise function. + + Copyright (C) 2002-2003, 2005-2006, 2009-2018 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 and Bruno Haible */ + +#include + +/* Specification. */ +#include + +#if HAVE_RAISE +/* Native Windows platform. */ + +# include + +# if HAVE_MSVC_INVALID_PARAMETER_HANDLER +# include "msvc-inval.h" +# endif + +# if HAVE_MSVC_INVALID_PARAMETER_HANDLER +/* Forward declaration. */ +static int raise_nothrow (int sig); +# else +# define raise_nothrow raise +# endif + +#else +/* An old Unix platform. */ + +# include + +#endif + +int +raise (int sig) +#undef raise +{ +#if GNULIB_defined_signal_blocking && GNULIB_defined_SIGPIPE + if (sig == SIGPIPE) + return _gl_raise_SIGPIPE (); +#endif + +#if HAVE_RAISE + return raise_nothrow (sig); +#else + return kill (getpid (), sig); +#endif +} + +#if HAVE_RAISE && HAVE_MSVC_INVALID_PARAMETER_HANDLER +static int +raise_nothrow (int sig) +{ + int result; + + TRY_MSVC_INVAL + { + result = raise (sig); + } + CATCH_MSVC_INVAL + { + result = -1; + errno = EINVAL; + } + DONE_MSVC_INVAL; + + return result; +} +#endif diff -Nru grep-3.1/lib/read.c grep-3.3/lib/read.c --- grep-3.1/lib/read.c 2017-05-14 01:09:51.000000000 +0000 +++ grep-3.3/lib/read.c 2018-06-24 23:16:49.000000000 +0000 @@ -1,5 +1,5 @@ /* POSIX compatible read() function. - Copyright (C) 2008-2017 Free Software Foundation, Inc. + Copyright (C) 2008-2018 Free Software Foundation, Inc. Written by Bruno Haible , 2011. This program is free software: you can redistribute it and/or modify @@ -13,14 +13,14 @@ 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 . */ + along with this program. If not, see . */ #include /* Specification. */ #include -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +#if defined _WIN32 && ! defined __CYGWIN__ # include # include diff -Nru grep-3.1/lib/readdir.c grep-3.3/lib/readdir.c --- grep-3.1/lib/readdir.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/lib/readdir.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ /* Read the next entry of a directory. - Copyright (C) 2011-2017 Free Software Foundation, Inc. + Copyright (C) 2011-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ #include diff -Nru grep-3.1/lib/realloc.c grep-3.3/lib/realloc.c --- grep-3.1/lib/realloc.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/lib/realloc.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,6 +1,6 @@ /* realloc() function that is glibc compatible. - Copyright (C) 1997, 2003-2004, 2006-2007, 2009-2017 Free Software + Copyright (C) 1997, 2003-2004, 2006-2007, 2009-2018 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify @@ -14,7 +14,7 @@ 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 . */ + along with this program. If not, see . */ /* written by Jim Meyering and Bruno Haible */ diff -Nru grep-3.1/lib/ref-add.sin grep-3.3/lib/ref-add.sin --- grep-3.1/lib/ref-add.sin 2017-01-01 11:25:48.000000000 +0000 +++ grep-3.3/lib/ref-add.sin 1970-01-01 00:00:00.000000000 +0000 @@ -1,29 +0,0 @@ -# Add this package to a list of references stored in a text file. -# -# 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 -# 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 Bruno Haible . -# -/^# Packages using this file: / { - s/# Packages using this file:// - ta - :a - s/ @PACKAGE@ / @PACKAGE@ / - tb - s/ $/ @PACKAGE@ / - :b - s/^/# Packages using this file:/ -} diff -Nru grep-3.1/lib/ref-del.sin grep-3.3/lib/ref-del.sin --- grep-3.1/lib/ref-del.sin 2017-01-01 11:25:48.000000000 +0000 +++ grep-3.3/lib/ref-del.sin 1970-01-01 00:00:00.000000000 +0000 @@ -1,24 +0,0 @@ -# Remove this package from a list of references stored in a text file. -# -# 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 -# 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 Bruno Haible . -# -/^# Packages using this file: / { - s/# Packages using this file:// - s/ @PACKAGE@ / / - s/^/# Packages using this file:/ -} diff -Nru grep-3.1/lib/regcomp.c grep-3.3/lib/regcomp.c --- grep-3.1/lib/regcomp.c 2017-01-01 11:25:48.000000000 +0000 +++ grep-3.3/lib/regcomp.c 2018-10-16 23:22:23.000000000 +0000 @@ -1,5 +1,5 @@ /* Extended regular expression matching and search library. - Copyright (C) 2002-2017 Free Software Foundation, Inc. + Copyright (C) 2002-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Isamu Hasegawa . @@ -15,7 +15,7 @@ You should have received a copy of the GNU General Public License along with the GNU C Library; if not, see - . */ + . */ #ifdef _LIBC # include @@ -59,7 +59,7 @@ static Idx fetch_number (re_string_t *input, re_token_t *token, reg_syntax_t syntax); static int peek_token (re_token_t *token, re_string_t *input, - reg_syntax_t syntax) internal_function; + reg_syntax_t syntax); static bin_tree_t *parse (re_string_t *regexp, regex_t *preg, reg_syntax_t syntax, reg_errcode_t *err); static bin_tree_t *parse_reg_exp (re_string_t *regexp, regex_t *preg, @@ -476,7 +476,7 @@ /* Try to allocate space for the fastmap. */ preg->fastmap = re_malloc (char, SBC_MAX); - if (BE (preg->fastmap == NULL, 0)) + if (__glibc_unlikely (preg->fastmap == NULL)) return REG_ESPACE; syntax |= (cflags & REG_ICASE) ? RE_ICASE : 0; @@ -502,7 +502,7 @@ ret = REG_EPAREN; /* We have already checked preg->fastmap != NULL. */ - if (BE (ret == REG_NOERROR, 1)) + if (__glibc_likely (ret == REG_NOERROR)) /* Compute the fastmap now, since regexec cannot modify the pattern buffer. This function never fails in this implementation. */ (void) re_compile_fastmap (preg); @@ -516,6 +516,7 @@ return (int) ret; } #ifdef _LIBC +libc_hidden_def (__regcomp) weak_alias (__regcomp, regcomp) #endif @@ -528,10 +529,9 @@ { const char *msg; size_t msg_size; + int nerrcodes = sizeof __re_error_msgid_idx / sizeof __re_error_msgid_idx[0]; - if (BE (errcode < 0 - || errcode >= (int) (sizeof (__re_error_msgid_idx) - / sizeof (__re_error_msgid_idx[0])), 0)) + if (__glibc_unlikely (errcode < 0 || errcode >= nerrcodes)) /* Only error codes returned by the rest of the code should be passed to this routine. If we are given anything else, or if other regex code generates an invalid error code, then the program has a bug. @@ -542,10 +542,10 @@ msg_size = strlen (msg) + 1; /* Includes the null. */ - if (BE (errbuf_size != 0, 1)) + if (__glibc_likely (errbuf_size != 0)) { size_t cpy_size = msg_size; - if (BE (msg_size > errbuf_size, 0)) + if (__glibc_unlikely (msg_size > errbuf_size)) { cpy_size = errbuf_size - 1; errbuf[cpy_size] = '\0'; @@ -643,7 +643,7 @@ regfree (regex_t *preg) { re_dfa_t *dfa = preg->buffer; - if (BE (dfa != NULL, 1)) + if (__glibc_likely (dfa != NULL)) { lock_fini (dfa->lock); free_dfa_content (dfa); @@ -658,6 +658,7 @@ preg->translate = NULL; } #ifdef _LIBC +libc_hidden_def (__regfree) weak_alias (__regfree, regfree) #endif @@ -699,7 +700,7 @@ if (re_comp_buf.fastmap == NULL) { - re_comp_buf.fastmap = (char *) malloc (SBC_MAX); + re_comp_buf.fastmap = re_malloc (char, SBC_MAX); if (re_comp_buf.fastmap == NULL) return (char *) gettext (__re_error_msgid + __re_error_msgid_idx[(int) REG_ESPACE]); @@ -752,7 +753,7 @@ /* Initialize the dfa. */ dfa = preg->buffer; - if (BE (preg->allocated < sizeof (re_dfa_t), 0)) + if (__glibc_unlikely (preg->allocated < sizeof (re_dfa_t))) { /* If zero allocated, but buffer is non-null, try to realloc enough space. This loses if buffer's address is bogus, but @@ -767,9 +768,9 @@ preg->used = sizeof (re_dfa_t); err = init_dfa (dfa, length); - if (BE (err == REG_NOERROR && lock_init (dfa->lock) != 0, 0)) + if (__glibc_unlikely (err == REG_NOERROR && lock_init (dfa->lock) != 0)) err = REG_ESPACE; - if (BE (err != REG_NOERROR, 0)) + if (__glibc_unlikely (err != REG_NOERROR)) { free_dfa_content (dfa); preg->buffer = NULL; @@ -784,7 +785,7 @@ err = re_string_construct (®exp, pattern, length, preg->translate, (syntax & RE_ICASE) != 0, dfa); - if (BE (err != REG_NOERROR, 0)) + if (__glibc_unlikely (err != REG_NOERROR)) { re_compile_internal_free_return: free_workarea_compile (preg); @@ -799,12 +800,12 @@ /* Parse the regular expression, and build a structure tree. */ preg->re_nsub = 0; dfa->str_tree = parse (®exp, preg, syntax, &err); - if (BE (dfa->str_tree == NULL, 0)) + if (__glibc_unlikely (dfa->str_tree == NULL)) goto re_compile_internal_free_return; /* Analyze the tree and create the nfa. */ err = analyze (preg); - if (BE (err != REG_NOERROR, 0)) + if (__glibc_unlikely (err != REG_NOERROR)) goto re_compile_internal_free_return; #ifdef RE_ENABLE_I18N @@ -820,7 +821,7 @@ free_workarea_compile (preg); re_string_destruct (®exp); - if (BE (err != REG_NOERROR, 0)) + if (__glibc_unlikely (err != REG_NOERROR)) { lock_fini (dfa->lock); free_dfa_content (dfa); @@ -862,7 +863,8 @@ calculation below, and for similar doubling calculations elsewhere. And it's <= rather than <, because some of the doubling calculations add 1 afterwards. */ - if (BE (MIN (IDX_MAX, SIZE_MAX / max_object_size) / 2 <= pat_len, 0)) + if (__glibc_unlikely (MIN (IDX_MAX, SIZE_MAX / max_object_size) / 2 + <= pat_len)) return REG_ESPACE; dfa->nodes_alloc = pat_len + 1; @@ -906,7 +908,7 @@ int i, j, ch; dfa->sb_char = (re_bitset_ptr_t) calloc (sizeof (bitset_t), 1); - if (BE (dfa->sb_char == NULL, 0)) + if (__glibc_unlikely (dfa->sb_char == NULL)) return REG_ESPACE; /* Set the bits corresponding to single byte chars. */ @@ -925,7 +927,7 @@ } #endif - if (BE (dfa->nodes == NULL || dfa->state_table == NULL, 0)) + if (__glibc_unlikely (dfa->nodes == NULL || dfa->state_table == NULL)) return REG_ESPACE; return REG_NOERROR; } @@ -935,21 +937,23 @@ character used by some operators like "\<", "\>", etc. */ static void -internal_function init_word_char (re_dfa_t *dfa) { int i = 0; int j; int ch = 0; dfa->word_ops_used = 1; - if (BE (dfa->map_notascii == 0, 1)) + if (__glibc_likely (dfa->map_notascii == 0)) { + /* Avoid uint32_t and uint64_t as some non-GCC platforms lack + them, an issue when this code is used in Gnulib. */ bitset_word_t bits0 = 0x00000000; bitset_word_t bits1 = 0x03ff0000; bitset_word_t bits2 = 0x87fffffe; bitset_word_t bits3 = 0x07fffffe; if (BITSET_WORD_BITS == 64) { + /* Pacify gcc -Woverflow on 32-bit platformns. */ dfa->word_char[0] = bits1 << 31 << 1 | bits0; dfa->word_char[1] = bits3 << 31 << 1 | bits2; i = 2; @@ -966,7 +970,7 @@ goto general_case; ch = 128; - if (BE (dfa->is_utf8, 1)) + if (__glibc_likely (dfa->is_utf8)) { memset (&dfa->word_char[i], '\0', (SBC_MAX - ch) / 8); return; @@ -1013,7 +1017,7 @@ first = dfa->str_tree->first->node_idx; dfa->init_node = first; err = re_node_set_init_copy (&init_nodes, dfa->eclosures + first); - if (BE (err != REG_NOERROR, 0)) + if (__glibc_unlikely (err != REG_NOERROR)) return err; /* The back-references which are in initial states can epsilon transit, @@ -1057,7 +1061,7 @@ /* It must be the first time to invoke acquire_state. */ dfa->init_state = re_acquire_state_context (&err, dfa, &init_nodes, 0); /* We don't check ERR here, since the initial state must not be NULL. */ - if (BE (dfa->init_state == NULL, 0)) + if (__glibc_unlikely (dfa->init_state == NULL)) return err; if (dfa->init_state->has_constraint) { @@ -1069,8 +1073,9 @@ &init_nodes, CONTEXT_NEWLINE | CONTEXT_BEGBUF); - if (BE (dfa->init_state_word == NULL || dfa->init_state_nl == NULL - || dfa->init_state_begbuf == NULL, 0)) + if (__glibc_unlikely (dfa->init_state_word == NULL + || dfa->init_state_nl == NULL + || dfa->init_state_begbuf == NULL)) return err; } else @@ -1177,8 +1182,8 @@ dfa->org_indices = re_malloc (Idx, dfa->nodes_alloc); dfa->edests = re_malloc (re_node_set, dfa->nodes_alloc); dfa->eclosures = re_malloc (re_node_set, dfa->nodes_alloc); - if (BE (dfa->nexts == NULL || dfa->org_indices == NULL || dfa->edests == NULL - || dfa->eclosures == NULL, 0)) + if (__glibc_unlikely (dfa->nexts == NULL || dfa->org_indices == NULL + || dfa->edests == NULL || dfa->eclosures == NULL)) return REG_ESPACE; dfa->subexp_map = re_malloc (Idx, preg->re_nsub); @@ -1193,23 +1198,23 @@ break; if (i == preg->re_nsub) { - free (dfa->subexp_map); + re_free (dfa->subexp_map); dfa->subexp_map = NULL; } } ret = postorder (dfa->str_tree, lower_subexps, preg); - if (BE (ret != REG_NOERROR, 0)) + if (__glibc_unlikely (ret != REG_NOERROR)) return ret; ret = postorder (dfa->str_tree, calc_first, dfa); - if (BE (ret != REG_NOERROR, 0)) + if (__glibc_unlikely (ret != REG_NOERROR)) return ret; preorder (dfa->str_tree, calc_next, dfa); ret = preorder (dfa->str_tree, link_nfa_nodes, dfa); - if (BE (ret != REG_NOERROR, 0)) + if (__glibc_unlikely (ret != REG_NOERROR)) return ret; ret = calc_eclosure (dfa); - if (BE (ret != REG_NOERROR, 0)) + if (__glibc_unlikely (ret != REG_NOERROR)) return ret; /* We only need this during the prune_impossible_nodes pass in regexec.c; @@ -1218,7 +1223,7 @@ || dfa->nbackref) { dfa->inveclosures = re_malloc (re_node_set, dfa->nodes_len); - if (BE (dfa->inveclosures == NULL, 0)) + if (__glibc_unlikely (dfa->inveclosures == NULL)) return REG_ESPACE; ret = calc_inveclosure (dfa); } @@ -1248,7 +1253,7 @@ do { reg_errcode_t err = fn (extra, node); - if (BE (err != REG_NOERROR, 0)) + if (__glibc_unlikely (err != REG_NOERROR)) return err; if (node->parent == NULL) return REG_NOERROR; @@ -1270,7 +1275,7 @@ for (node = root; ; ) { reg_errcode_t err = fn (extra, node); - if (BE (err != REG_NOERROR, 0)) + if (__glibc_unlikely (err != REG_NOERROR)) return err; /* Go to the left node, or up and to the right. */ @@ -1371,7 +1376,8 @@ cls = create_tree (dfa, NULL, NULL, OP_CLOSE_SUBEXP); tree1 = body ? create_tree (dfa, body, cls, CONCAT) : cls; tree = create_tree (dfa, op, tree1, CONCAT); - if (BE (tree == NULL || tree1 == NULL || op == NULL || cls == NULL, 0)) + if (__glibc_unlikely (tree == NULL || tree1 == NULL + || op == NULL || cls == NULL)) { *err = REG_ESPACE; return NULL; @@ -1397,7 +1403,7 @@ { node->first = node; node->node_idx = re_dfa_add_node (dfa, node->token); - if (BE (node->node_idx == -1, 0)) + if (__glibc_unlikely (node->node_idx == -1)) return REG_ESPACE; if (node->token.type == ANCHOR) dfa->nodes[node->node_idx].constraint = node->token.opr.ctx_type; @@ -1490,7 +1496,6 @@ to their own constraint. */ static reg_errcode_t -internal_function duplicate_node_closure (re_dfa_t *dfa, Idx top_org_node, Idx top_clone_node, Idx root_node, unsigned int init_constraint) { @@ -1509,11 +1514,11 @@ 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 == -1, 0)) + if (__glibc_unlikely (clone_dest == -1)) return REG_ESPACE; dfa->nexts[clone_node] = dfa->nexts[org_node]; ok = re_node_set_insert (dfa->edests + clone_node, clone_dest); - if (BE (! ok, 0)) + if (__glibc_unlikely (! ok)) return REG_ESPACE; } else if (dfa->edests[org_node].nelem == 0) @@ -1535,17 +1540,17 @@ if (org_node == root_node && clone_node != org_node) { ok = re_node_set_insert (dfa->edests + clone_node, org_dest); - if (BE (! ok, 0)) + if (__glibc_unlikely (! ok)) return REG_ESPACE; break; } /* 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 == -1, 0)) + if (__glibc_unlikely (clone_dest == -1)) return REG_ESPACE; ok = re_node_set_insert (dfa->edests + clone_node, clone_dest); - if (BE (! ok, 0)) + if (__glibc_unlikely (! ok)) return REG_ESPACE; } else /* dfa->edests[org_node].nelem == 2 */ @@ -1561,14 +1566,14 @@ /* 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 == -1, 0)) + if (__glibc_unlikely (clone_dest == -1)) return REG_ESPACE; ok = re_node_set_insert (dfa->edests + clone_node, clone_dest); - if (BE (! ok, 0)) + if (__glibc_unlikely (! ok)) return REG_ESPACE; err = duplicate_node_closure (dfa, org_dest, clone_dest, root_node, constraint); - if (BE (err != REG_NOERROR, 0)) + if (__glibc_unlikely (err != REG_NOERROR)) return err; } else @@ -1576,16 +1581,16 @@ /* There is a duplicated node which satisfies the constraint, use it to avoid infinite loop. */ ok = re_node_set_insert (dfa->edests + clone_node, clone_dest); - if (BE (! ok, 0)) + if (__glibc_unlikely (! ok)) return REG_ESPACE; } org_dest = dfa->edests[org_node].elems[1]; clone_dest = duplicate_node (dfa, org_dest, constraint); - if (BE (clone_dest == -1, 0)) + if (__glibc_unlikely (clone_dest == -1)) return REG_ESPACE; ok = re_node_set_insert (dfa->edests + clone_node, clone_dest); - if (BE (! ok, 0)) + if (__glibc_unlikely (! ok)) return REG_ESPACE; } org_node = org_dest; @@ -1619,7 +1624,7 @@ 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 != -1, 1)) + if (__glibc_likely (dup_idx != -1)) { dfa->nodes[dup_idx].constraint = constraint; dfa->nodes[dup_idx].constraint |= dfa->nodes[org_idx].constraint; @@ -1645,7 +1650,7 @@ for (idx = 0; idx < dfa->eclosures[src].nelem; ++idx) { ok = re_node_set_insert_last (dfa->inveclosures + elems[idx], src); - if (BE (! ok, 0)) + if (__glibc_unlikely (! ok)) return REG_ESPACE; } } @@ -1686,7 +1691,7 @@ continue; /* Calculate epsilon closure of 'node_idx'. */ err = calc_eclosure_iter (&eclosure_elem, dfa, node_idx, true); - if (BE (err != REG_NOERROR, 0)) + if (__glibc_unlikely (err != REG_NOERROR)) return err; if (dfa->eclosures[node_idx].nelem == 0) @@ -1709,7 +1714,7 @@ bool ok; bool incomplete = false; err = re_node_set_alloc (&eclosure, dfa->edests[node].nelem + 1); - if (BE (err != REG_NOERROR, 0)) + if (__glibc_unlikely (err != REG_NOERROR)) return err; /* This indicates that we are calculating this node now. @@ -1724,7 +1729,7 @@ { err = duplicate_node_closure (dfa, node, node, node, dfa->nodes[node].constraint); - if (BE (err != REG_NOERROR, 0)) + if (__glibc_unlikely (err != REG_NOERROR)) return err; } @@ -1746,14 +1751,14 @@ if (dfa->eclosures[edest].nelem == 0) { err = calc_eclosure_iter (&eclosure_elem, dfa, edest, false); - if (BE (err != REG_NOERROR, 0)) + if (__glibc_unlikely (err != REG_NOERROR)) return err; } else eclosure_elem = dfa->eclosures[edest]; /* Merge the epsilon closure of 'edest'. */ err = re_node_set_merge (&eclosure, &eclosure_elem); - if (BE (err != REG_NOERROR, 0)) + if (__glibc_unlikely (err != REG_NOERROR)) return err; /* If the epsilon closure of 'edest' is incomplete, the epsilon closure of this node is also incomplete. */ @@ -1766,7 +1771,7 @@ /* An epsilon closure includes itself. */ ok = re_node_set_insert (&eclosure, node); - if (BE (! ok, 0)) + if (__glibc_unlikely (! ok)) return REG_ESPACE; if (incomplete && !root) dfa->eclosures[node].nelem = 0; @@ -1782,7 +1787,6 @@ We must not use this function inside bracket expressions. */ static void -internal_function fetch_token (re_token_t *result, re_string_t *input, reg_syntax_t syntax) { re_string_skip_bytes (input, peek_token (result, input, syntax)); @@ -1792,7 +1796,6 @@ We must not use this function inside bracket expressions. */ static int -internal_function peek_token (re_token_t *token, re_string_t *input, reg_syntax_t syntax) { unsigned char c; @@ -2031,7 +2034,6 @@ We must not use this function out of bracket expressions. */ static int -internal_function peek_token_bracket (re_token_t *token, re_string_t *input, reg_syntax_t syntax) { unsigned char c; @@ -2078,16 +2080,18 @@ case '.': token->type = OP_OPEN_COLL_ELEM; break; + case '=': token->type = OP_OPEN_EQUIV_CLASS; break; + case ':': if (syntax & RE_CHAR_CLASSES) { token->type = OP_OPEN_CHAR_CLASS; break; } - /* else fall through. */ + FALLTHROUGH; default: token->type = CHARACTER; token->opr.c = c; @@ -2137,14 +2141,14 @@ dfa->syntax = syntax; fetch_token (¤t_token, regexp, syntax | RE_CARET_ANCHORS_HERE); tree = parse_reg_exp (regexp, preg, ¤t_token, syntax, 0, err); - if (BE (*err != REG_NOERROR && tree == NULL, 0)) + if (__glibc_unlikely (*err != REG_NOERROR && tree == NULL)) return NULL; eor = create_tree (dfa, NULL, NULL, END_OF_RE); if (tree != NULL) root = create_tree (dfa, tree, eor, CONCAT); else root = eor; - if (BE (eor == NULL || root == NULL, 0)) + if (__glibc_unlikely (eor == NULL || root == NULL)) { *err = REG_ESPACE; return NULL; @@ -2169,7 +2173,7 @@ 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)) + if (__glibc_unlikely (*err != REG_NOERROR && tree == NULL)) return NULL; while (token->type == OP_ALT) @@ -2181,7 +2185,7 @@ 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)) + if (__glibc_unlikely (*err != REG_NOERROR && branch == NULL)) { if (tree != NULL) postorder (tree, free_tree, NULL); @@ -2192,7 +2196,7 @@ else branch = NULL; tree = create_tree (dfa, tree, branch, OP_ALT); - if (BE (tree == NULL, 0)) + if (__glibc_unlikely (tree == NULL)) { *err = REG_ESPACE; return NULL; @@ -2217,14 +2221,14 @@ bin_tree_t *tree, *expr; re_dfa_t *dfa = preg->buffer; tree = parse_expression (regexp, preg, token, syntax, nest, err); - if (BE (*err != REG_NOERROR && tree == NULL, 0)) + if (__glibc_unlikely (*err != REG_NOERROR && tree == NULL)) return NULL; while (token->type != OP_ALT && token->type != END_OF_RE && (nest == 0 || token->type != OP_CLOSE_SUBEXP)) { expr = parse_expression (regexp, preg, token, syntax, nest, err); - if (BE (*err != REG_NOERROR && expr == NULL, 0)) + if (__glibc_unlikely (*err != REG_NOERROR && expr == NULL)) { if (tree != NULL) postorder (tree, free_tree, NULL); @@ -2265,7 +2269,7 @@ { case CHARACTER: tree = create_token_tree (dfa, NULL, NULL, token); - if (BE (tree == NULL, 0)) + if (__glibc_unlikely (tree == NULL)) { *err = REG_ESPACE; return NULL; @@ -2280,7 +2284,7 @@ fetch_token (token, regexp, syntax); mbc_remain = create_token_tree (dfa, NULL, NULL, token); tree = create_tree (dfa, tree, mbc_remain, CONCAT); - if (BE (mbc_remain == NULL || tree == NULL, 0)) + if (__glibc_unlikely (mbc_remain == NULL || tree == NULL)) { *err = REG_ESPACE; return NULL; @@ -2289,25 +2293,28 @@ } #endif break; + case OP_OPEN_SUBEXP: tree = parse_sub_exp (regexp, preg, token, syntax, nest + 1, err); - if (BE (*err != REG_NOERROR && tree == NULL, 0)) + if (__glibc_unlikely (*err != REG_NOERROR && tree == NULL)) return NULL; break; + case OP_OPEN_BRACKET: tree = parse_bracket_exp (regexp, dfa, token, syntax, err); - if (BE (*err != REG_NOERROR && tree == NULL, 0)) + if (__glibc_unlikely (*err != REG_NOERROR && tree == NULL)) return NULL; break; + case OP_BACK_REF: - if (!BE (dfa->completed_bkref_map & (1 << token->opr.idx), 1)) + if (!__glibc_likely (dfa->completed_bkref_map & (1 << token->opr.idx))) { *err = REG_ESUBREG; return NULL; } dfa->used_bkref_map |= 1 << token->opr.idx; tree = create_token_tree (dfa, NULL, NULL, token); - if (BE (tree == NULL, 0)) + if (__glibc_unlikely (tree == NULL)) { *err = REG_ESPACE; return NULL; @@ -2315,13 +2322,14 @@ ++dfa->nbackref; dfa->has_mb_node = 1; break; + case OP_OPEN_DUP_NUM: if (syntax & RE_CONTEXT_INVALID_DUP) { *err = REG_BADRPT; return NULL; } - /* FALLTHROUGH */ + FALLTHROUGH; case OP_DUP_ASTERISK: case OP_DUP_PLUS: case OP_DUP_QUESTION: @@ -2335,7 +2343,7 @@ fetch_token (token, regexp, syntax); return parse_expression (regexp, preg, token, syntax, nest, err); } - /* else fall through */ + FALLTHROUGH; case OP_CLOSE_SUBEXP: if ((token->type == OP_CLOSE_SUBEXP) && !(syntax & RE_UNMATCHED_RIGHT_PAREN_ORD)) @@ -2343,7 +2351,7 @@ *err = REG_ERPAREN; return NULL; } - /* else fall through */ + FALLTHROUGH; case OP_CLOSE_DUP_NUM: /* We treat it as a normal character. */ @@ -2352,12 +2360,13 @@ /* mb_partial and word_char bits should be initialized already by peek_token. */ tree = create_token_tree (dfa, NULL, NULL, token); - if (BE (tree == NULL, 0)) + if (__glibc_unlikely (tree == NULL)) { *err = REG_ESPACE; return NULL; } break; + case ANCHOR: if ((token->opr.ctx_type & (WORD_DELIM | NOT_WORD_DELIM | WORD_FIRST | WORD_LAST)) @@ -2381,7 +2390,8 @@ } tree_last = create_token_tree (dfa, NULL, NULL, token); tree = create_tree (dfa, tree_first, tree_last, OP_ALT); - if (BE (tree_first == NULL || tree_last == NULL || tree == NULL, 0)) + if (__glibc_unlikely (tree_first == NULL || tree_last == NULL + || tree == NULL)) { *err = REG_ESPACE; return NULL; @@ -2390,7 +2400,7 @@ else { tree = create_token_tree (dfa, NULL, NULL, token); - if (BE (tree == NULL, 0)) + if (__glibc_unlikely (tree == NULL)) { *err = REG_ESPACE; return NULL; @@ -2402,9 +2412,10 @@ it must not be "". */ fetch_token (token, regexp, syntax); return tree; + case OP_PERIOD: tree = create_token_tree (dfa, NULL, NULL, token); - if (BE (tree == NULL, 0)) + if (__glibc_unlikely (tree == NULL)) { *err = REG_ESPACE; return NULL; @@ -2412,30 +2423,35 @@ if (dfa->mb_cur_max > 1) dfa->has_mb_node = 1; break; + case OP_WORD: case OP_NOTWORD: tree = build_charclass_op (dfa, regexp->trans, "alnum", "_", token->type == OP_NOTWORD, err); - if (BE (*err != REG_NOERROR && tree == NULL, 0)) + if (__glibc_unlikely (*err != REG_NOERROR && tree == NULL)) return NULL; break; + case OP_SPACE: case OP_NOTSPACE: tree = build_charclass_op (dfa, regexp->trans, "space", "", token->type == OP_NOTSPACE, err); - if (BE (*err != REG_NOERROR && tree == NULL, 0)) + if (__glibc_unlikely (*err != REG_NOERROR && tree == NULL)) return NULL; break; + case OP_ALT: case END_OF_RE: return NULL; + case BACK_SLASH: *err = REG_EESCAPE; return NULL; + default: /* Must not happen? */ #ifdef DEBUG @@ -2450,7 +2466,7 @@ { bin_tree_t *dup_tree = parse_dup_op (tree, regexp, dfa, token, syntax, err); - if (BE (*err != REG_NOERROR && dup_tree == NULL, 0)) + if (__glibc_unlikely (*err != REG_NOERROR && dup_tree == NULL)) { if (tree != NULL) postorder (tree, free_tree, NULL); @@ -2496,13 +2512,14 @@ else { tree = parse_reg_exp (regexp, preg, token, syntax, nest, err); - if (BE (*err == REG_NOERROR && token->type != OP_CLOSE_SUBEXP, 0)) + if (__glibc_unlikely (*err == REG_NOERROR + && token->type != OP_CLOSE_SUBEXP)) { if (tree != NULL) postorder (tree, free_tree, NULL); *err = REG_EPAREN; } - if (BE (*err != REG_NOERROR, 0)) + if (__glibc_unlikely (*err != REG_NOERROR)) return NULL; } @@ -2510,7 +2527,7 @@ dfa->completed_bkref_map |= 1 << cur_nsub; tree = create_tree (dfa, tree, NULL, SUBEXP); - if (BE (tree == NULL, 0)) + if (__glibc_unlikely (tree == NULL)) { *err = REG_ESPACE; return NULL; @@ -2543,17 +2560,17 @@ return NULL; } } - if (BE (start != -2, 1)) + if (__glibc_likely (start != -2)) { /* 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) : -2)); } - if (BE (start == -2 || end == -2, 0)) + if (__glibc_unlikely (start == -2 || end == -2)) { /* Invalid sequence. */ - if (BE (!(syntax & RE_INVALID_INTERVAL_ORD), 0)) + if (__glibc_unlikely (!(syntax & RE_INVALID_INTERVAL_ORD))) { if (token->type == END_OF_RE) *err = REG_EBRACE; @@ -2572,15 +2589,15 @@ return elem; } - if (BE ((end != -1 && start > end) - || token->type != OP_CLOSE_DUP_NUM, 0)) + if (__glibc_unlikely ((end != -1 && start > end) + || token->type != OP_CLOSE_DUP_NUM)) { /* First number greater than second. */ *err = REG_BADBR; return NULL; } - if (BE (RE_DUP_MAX < (end == -1 ? start : end), 0)) + if (__glibc_unlikely (RE_DUP_MAX < (end == -1 ? start : end))) { *err = REG_ESIZE; return NULL; @@ -2594,23 +2611,23 @@ fetch_token (token, regexp, syntax); - if (BE (elem == NULL, 0)) + if (__glibc_unlikely (elem == NULL)) return NULL; - if (BE (start == 0 && end == 0, 0)) + if (__glibc_unlikely (start == 0 && end == 0)) { postorder (elem, free_tree, NULL); return NULL; } /* Extract "{n,m}" to "...{0,}". */ - if (BE (start > 0, 0)) + if (__glibc_unlikely (start > 0)) { tree = elem; for (i = 2; i <= start; ++i) { elem = duplicate_tree (elem, dfa); tree = create_tree (dfa, tree, elem, CONCAT); - if (BE (elem == NULL || tree == NULL, 0)) + if (__glibc_unlikely (elem == NULL || tree == NULL)) goto parse_dup_op_espace; } @@ -2619,7 +2636,7 @@ /* Duplicate ELEM before it is marked optional. */ elem = duplicate_tree (elem, dfa); - if (BE (elem == NULL, 0)) + if (__glibc_unlikely (elem == NULL)) goto parse_dup_op_espace; old_tree = tree; } @@ -2634,13 +2651,9 @@ tree = create_tree (dfa, elem, NULL, (end == -1 ? OP_DUP_ASTERISK : OP_ALT)); - if (BE (tree == NULL, 0)) + if (__glibc_unlikely (tree == NULL)) goto parse_dup_op_espace; -/* From gnulib's "intprops.h": - True if the arithmetic type T is signed. */ -#define TYPE_SIGNED(t) (! ((t) 0 < (t) -1)) - /* This loop is actually executed only when end != -1, to rewrite {0,n} as ((...?)?)?... We have already created the start+1-th copy. */ @@ -2649,11 +2662,11 @@ { elem = duplicate_tree (elem, dfa); tree = create_tree (dfa, tree, elem, CONCAT); - if (BE (elem == NULL || tree == NULL, 0)) + if (__glibc_unlikely (elem == NULL || tree == NULL)) goto parse_dup_op_espace; tree = create_tree (dfa, tree, NULL, OP_ALT); - if (BE (tree == NULL, 0)) + if (__glibc_unlikely (tree == NULL)) goto parse_dup_op_espace; } @@ -2675,15 +2688,14 @@ # 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. */ + unibyte locale, treat B as itself. 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; + return mbcset == NULL ? b : __btowc (b); } -#endif +# 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 @@ -2693,7 +2705,6 @@ update it. */ static reg_errcode_t -internal_function # ifdef RE_ENABLE_I18N build_range_exp (const reg_syntax_t syntax, bitset_t sbcset, @@ -2710,17 +2721,18 @@ { unsigned int start_ch, end_ch; /* Equivalence Classes and Character Classes can't be a range start/end. */ - if (BE (start_elem->type == EQUIV_CLASS || start_elem->type == CHAR_CLASS - || end_elem->type == EQUIV_CLASS || end_elem->type == CHAR_CLASS, - 0)) + if (__glibc_unlikely (start_elem->type == EQUIV_CLASS + || start_elem->type == CHAR_CLASS + || end_elem->type == EQUIV_CLASS + || end_elem->type == CHAR_CLASS)) return REG_ERANGE; /* We can handle no multi character collating elements without libc support. */ - if (BE ((start_elem->type == COLL_SYM - && strlen ((char *) start_elem->opr.name) > 1) - || (end_elem->type == COLL_SYM - && strlen ((char *) end_elem->opr.name) > 1), 0)) + if (__glibc_unlikely ((start_elem->type == COLL_SYM + && strlen ((char *) start_elem->opr.name) > 1) + || (end_elem->type == COLL_SYM + && strlen ((char *) end_elem->opr.name) > 1))) return REG_ECOLLATE; # ifdef RE_ENABLE_I18N @@ -2741,7 +2753,8 @@ ? 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)) + else if (__glibc_unlikely ((syntax & RE_NO_EMPTY_RANGES) + && start_wc > end_wc)) return REG_ERANGE; /* Got valid collation sequence values, add them as a new entry. @@ -2752,7 +2765,7 @@ if (mbcset) { /* Check the space of the arrays. */ - if (BE (*range_alloc == mbcset->nranges, 0)) + if (__glibc_unlikely (*range_alloc == mbcset->nranges)) { /* There is not enough space, need realloc. */ wchar_t *new_array_start, *new_array_end; @@ -2767,7 +2780,8 @@ new_array_end = re_realloc (mbcset->range_ends, wchar_t, new_nranges); - if (BE (new_array_start == NULL || new_array_end == NULL, 0)) + if (__glibc_unlikely (new_array_start == NULL + || new_array_end == NULL)) { re_free (new_array_start); re_free (new_array_end); @@ -2819,7 +2833,6 @@ pointer argument since we may update it. */ static reg_errcode_t -internal_function # ifdef RE_ENABLE_I18N build_collating_symbol (bitset_t sbcset, re_charset_t *mbcset, Idx *coll_sym_alloc, const unsigned char *name) @@ -2828,7 +2841,7 @@ # endif /* not RE_ENABLE_I18N */ { size_t name_len = strlen ((const char *) name); - if (BE (name_len != 1, 0)) + if (__glibc_unlikely (name_len != 1)) return REG_ECOLLATE; else { @@ -2963,18 +2976,21 @@ /* Equivalence Classes and Character Classes can't be a range start/end. */ - if (BE (start_elem->type == EQUIV_CLASS || start_elem->type == CHAR_CLASS - || end_elem->type == EQUIV_CLASS || end_elem->type == CHAR_CLASS, - 0)) + if (__glibc_unlikely (start_elem->type == EQUIV_CLASS + || start_elem->type == CHAR_CLASS + || end_elem->type == EQUIV_CLASS + || end_elem->type == CHAR_CLASS)) return REG_ERANGE; /* FIXME: Implement rational ranges here, too. */ start_collseq = lookup_collation_sequence_value (start_elem); end_collseq = lookup_collation_sequence_value (end_elem); /* Check start/end collation sequence values. */ - if (BE (start_collseq == UINT_MAX || end_collseq == UINT_MAX, 0)) + if (__glibc_unlikely (start_collseq == UINT_MAX + || end_collseq == UINT_MAX)) return REG_ECOLLATE; - if (BE ((syntax & RE_NO_EMPTY_RANGES) && start_collseq > end_collseq, 0)) + if (__glibc_unlikely ((syntax & RE_NO_EMPTY_RANGES) + && start_collseq > end_collseq)) return REG_ERANGE; /* Got valid collation sequence values, add them as a new entry. @@ -2984,7 +3000,7 @@ if (nrules > 0 || dfa->mb_cur_max > 1) { /* Check the space of the arrays. */ - if (BE (*range_alloc == mbcset->nranges, 0)) + if (__glibc_unlikely (*range_alloc == mbcset->nranges)) { /* There is not enough space, need realloc. */ uint32_t *new_array_start; @@ -2998,7 +3014,8 @@ new_array_end = re_realloc (mbcset->range_ends, uint32_t, new_nranges); - if (BE (new_array_start == NULL || new_array_end == NULL, 0)) + if (__glibc_unlikely (new_array_start == NULL + || new_array_end == NULL)) return REG_ESPACE; mbcset->range_starts = new_array_start; @@ -3062,7 +3079,7 @@ /* Got valid collation sequence, add it as a new entry. */ /* Check the space of the arrays. */ - if (BE (*coll_sym_alloc == mbcset->ncoll_syms, 0)) + if (__glibc_unlikely (*coll_sym_alloc == mbcset->ncoll_syms)) { /* Not enough, realloc it. */ /* +1 in case of mbcset->ncoll_syms is 0. */ @@ -3071,7 +3088,7 @@ if *alloc == 0. */ int32_t *new_coll_syms = re_realloc (mbcset->coll_syms, int32_t, new_coll_sym_alloc); - if (BE (new_coll_syms == NULL, 0)) + if (__glibc_unlikely (new_coll_syms == NULL)) return REG_ESPACE; mbcset->coll_syms = new_coll_syms; *coll_sym_alloc = new_coll_sym_alloc; @@ -3081,7 +3098,7 @@ } else { - if (BE (name_len != 1, 0)) + if (__glibc_unlikely (name_len != 1)) return REG_ECOLLATE; else { @@ -3125,9 +3142,9 @@ 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)) + if (__glibc_unlikely (sbcset == NULL || mbcset == NULL)) #else - if (BE (sbcset == NULL, 0)) + if (__glibc_unlikely (sbcset == NULL)) #endif /* RE_ENABLE_I18N */ { re_free (sbcset); @@ -3139,7 +3156,7 @@ } token_len = peek_token_bracket (token, regexp, syntax); - if (BE (token->type == END_OF_RE, 0)) + if (__glibc_unlikely (token->type == END_OF_RE)) { *err = REG_BADPAT; goto parse_bracket_exp_free_return; @@ -3154,7 +3171,7 @@ bitset_set (sbcset, '\n'); re_string_skip_bytes (regexp, token_len); /* Skip a token. */ token_len = peek_token_bracket (token, regexp, syntax); - if (BE (token->type == END_OF_RE, 0)) + if (__glibc_unlikely (token->type == END_OF_RE)) { *err = REG_BADPAT; goto parse_bracket_exp_free_return; @@ -3179,7 +3196,7 @@ 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)) + if (__glibc_unlikely (ret != REG_NOERROR)) { *err = ret; goto parse_bracket_exp_free_return; @@ -3192,7 +3209,7 @@ /* Do not check for ranges if we know they are not allowed. */ if (start_elem.type != CHAR_CLASS && start_elem.type != EQUIV_CLASS) { - if (BE (token->type == END_OF_RE, 0)) + if (__glibc_unlikely (token->type == END_OF_RE)) { *err = REG_EBRACK; goto parse_bracket_exp_free_return; @@ -3201,7 +3218,7 @@ { re_string_skip_bytes (regexp, token_len); /* Skip '-'. */ token_len2 = peek_token_bracket (&token2, regexp, syntax); - if (BE (token2.type == END_OF_RE, 0)) + if (__glibc_unlikely (token2.type == END_OF_RE)) { *err = REG_EBRACK; goto parse_bracket_exp_free_return; @@ -3223,7 +3240,7 @@ end_elem.type = COLL_SYM; ret = parse_bracket_element (&end_elem, regexp, &token2, token_len2, dfa, syntax, true); - if (BE (ret != REG_NOERROR, 0)) + if (__glibc_unlikely (ret != REG_NOERROR)) { *err = ret; goto parse_bracket_exp_free_return; @@ -3243,7 +3260,7 @@ *err = build_range_exp (syntax, sbcset, &start_elem, &end_elem); # endif #endif /* RE_ENABLE_I18N */ - if (BE (*err != REG_NOERROR, 0)) + if (__glibc_unlikely (*err != REG_NOERROR)) goto parse_bracket_exp_free_return; } else @@ -3256,7 +3273,7 @@ #ifdef RE_ENABLE_I18N case MB_CHAR: /* Check whether the array has enough space. */ - if (BE (mbchar_alloc == mbcset->nmbchars, 0)) + if (__glibc_unlikely (mbchar_alloc == mbcset->nmbchars)) { wchar_t *new_mbchars; /* Not enough, realloc it. */ @@ -3265,7 +3282,7 @@ /* Use realloc since array is NULL if *alloc == 0. */ new_mbchars = re_realloc (mbcset->mbchars, wchar_t, mbchar_alloc); - if (BE (new_mbchars == NULL, 0)) + if (__glibc_unlikely (new_mbchars == NULL)) goto parse_bracket_exp_espace; mbcset->mbchars = new_mbchars; } @@ -3278,7 +3295,7 @@ mbcset, &equiv_class_alloc, #endif /* RE_ENABLE_I18N */ start_elem.opr.name); - if (BE (*err != REG_NOERROR, 0)) + if (__glibc_unlikely (*err != REG_NOERROR)) goto parse_bracket_exp_free_return; break; case COLL_SYM: @@ -3287,7 +3304,7 @@ mbcset, &coll_sym_alloc, #endif /* RE_ENABLE_I18N */ start_elem.opr.name); - if (BE (*err != REG_NOERROR, 0)) + if (__glibc_unlikely (*err != REG_NOERROR)) goto parse_bracket_exp_free_return; break; case CHAR_CLASS: @@ -3297,7 +3314,7 @@ #endif /* RE_ENABLE_I18N */ (const char *) start_elem.opr.name, syntax); - if (BE (*err != REG_NOERROR, 0)) + if (__glibc_unlikely (*err != REG_NOERROR)) goto parse_bracket_exp_free_return; break; default: @@ -3305,7 +3322,7 @@ break; } } - if (BE (token->type == END_OF_RE, 0)) + if (__glibc_unlikely (token->type == END_OF_RE)) { *err = REG_EBRACK; goto parse_bracket_exp_free_return; @@ -3336,7 +3353,7 @@ br_token.type = COMPLEX_BRACKET; br_token.opr.mbcset = mbcset; mbc_tree = create_token_tree (dfa, NULL, NULL, &br_token); - if (BE (mbc_tree == NULL, 0)) + if (__glibc_unlikely (mbc_tree == NULL)) goto parse_bracket_exp_espace; for (sbc_idx = 0; sbc_idx < BITSET_WORDS; ++sbc_idx) if (sbcset[sbc_idx]) @@ -3349,12 +3366,12 @@ br_token.type = SIMPLE_BRACKET; br_token.opr.sbcset = sbcset; work_tree = create_token_tree (dfa, NULL, NULL, &br_token); - if (BE (work_tree == NULL, 0)) + if (__glibc_unlikely (work_tree == NULL)) goto parse_bracket_exp_espace; /* Then join them by ALT node. */ work_tree = create_tree (dfa, work_tree, mbc_tree, OP_ALT); - if (BE (work_tree == NULL, 0)) + if (__glibc_unlikely (work_tree == NULL)) goto parse_bracket_exp_espace; } else @@ -3373,7 +3390,7 @@ br_token.type = SIMPLE_BRACKET; br_token.opr.sbcset = sbcset; work_tree = create_token_tree (dfa, NULL, NULL, &br_token); - if (BE (work_tree == NULL, 0)) + if (__glibc_unlikely (work_tree == NULL)) goto parse_bracket_exp_espace; } return work_tree; @@ -3410,7 +3427,7 @@ if (token->type == OP_OPEN_COLL_ELEM || token->type == OP_OPEN_CHAR_CLASS || token->type == OP_OPEN_EQUIV_CLASS) return parse_bracket_symbol (elem, regexp, token); - if (BE (token->type == OP_CHARSET_RANGE, 0) && !accept_hyphen) + if (__glibc_unlikely (token->type == OP_CHARSET_RANGE) && !accept_hyphen) { /* A '-' must only appear as anything but a range indicator before the closing bracket. Everything else is an error. */ @@ -3505,7 +3522,7 @@ indirect = (const int32_t *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_INDIRECTMB); idx1 = findidx (table, indirect, extra, &cp, -1); - if (BE (idx1 == 0 || *cp != '\0', 0)) + if (__glibc_unlikely (idx1 == 0 || *cp != '\0')) /* This isn't a valid character. */ return REG_ECOLLATE; @@ -3524,21 +3541,13 @@ continue; /* Compare only if the length matches and the collation rule index is the same. */ - if (len == weights[idx2 & 0xffffff] && (idx1 >> 24) == (idx2 >> 24)) - { - int cnt = 0; - - while (cnt <= len && - weights[(idx1 & 0xffffff) + 1 + cnt] - == weights[(idx2 & 0xffffff) + 1 + cnt]) - ++cnt; - - if (cnt > len) - bitset_set (sbcset, ch); - } + if (len == weights[idx2 & 0xffffff] && (idx1 >> 24) == (idx2 >> 24) + && memcmp (weights + (idx1 & 0xffffff) + 1, + weights + (idx2 & 0xffffff) + 1, len) == 0) + bitset_set (sbcset, ch); } /* Check whether the array has enough space. */ - if (BE (*equiv_class_alloc == mbcset->nequiv_classes, 0)) + if (__glibc_unlikely (*equiv_class_alloc == mbcset->nequiv_classes)) { /* Not enough, realloc it. */ /* +1 in case of mbcset->nequiv_classes is 0. */ @@ -3547,7 +3556,7 @@ int32_t *new_equiv_classes = re_realloc (mbcset->equiv_classes, int32_t, new_equiv_class_alloc); - if (BE (new_equiv_classes == NULL, 0)) + if (__glibc_unlikely (new_equiv_classes == NULL)) return REG_ESPACE; mbcset->equiv_classes = new_equiv_classes; *equiv_class_alloc = new_equiv_class_alloc; @@ -3557,7 +3566,7 @@ else #endif /* _LIBC */ { - if (BE (strlen ((const char *) name) != 1, 0)) + if (__glibc_unlikely (strlen ((const char *) name) != 1)) return REG_ECOLLATE; bitset_set (sbcset, *name); } @@ -3591,7 +3600,7 @@ #ifdef RE_ENABLE_I18N /* Check the space of the arrays. */ - if (BE (*char_class_alloc == mbcset->nchar_classes, 0)) + if (__glibc_unlikely (*char_class_alloc == mbcset->nchar_classes)) { /* Not enough, realloc it. */ /* +1 in case of mbcset->nchar_classes is 0. */ @@ -3599,7 +3608,7 @@ /* Use realloc since array is NULL if *alloc == 0. */ wctype_t *new_char_classes = re_realloc (mbcset->char_classes, wctype_t, new_char_class_alloc); - if (BE (new_char_classes == NULL, 0)) + if (__glibc_unlikely (new_char_classes == NULL)) return REG_ESPACE; mbcset->char_classes = new_char_classes; *char_class_alloc = new_char_class_alloc; @@ -3609,7 +3618,7 @@ #define BUILD_CHARCLASS_LOOP(ctype_func) \ do { \ - if (BE (trans != NULL, 0)) \ + if (__glibc_unlikely (trans != NULL)) \ { \ for (i = 0; i < SBC_MAX; ++i) \ if (ctype_func (i)) \ @@ -3669,14 +3678,14 @@ bin_tree_t *tree; sbcset = (re_bitset_ptr_t) calloc (sizeof (bitset_t), 1); - if (BE (sbcset == NULL, 0)) + if (__glibc_unlikely (sbcset == NULL)) { *err = REG_ESPACE; return NULL; } #ifdef RE_ENABLE_I18N mbcset = (re_charset_t *) calloc (sizeof (re_charset_t), 1); - if (BE (mbcset == NULL, 0)) + if (__glibc_unlikely (mbcset == NULL)) { re_free (sbcset); *err = REG_ESPACE; @@ -3692,7 +3701,7 @@ #endif /* RE_ENABLE_I18N */ class_name, 0); - if (BE (ret != REG_NOERROR, 0)) + if (__glibc_unlikely (ret != REG_NOERROR)) { re_free (sbcset); #ifdef RE_ENABLE_I18N @@ -3722,7 +3731,7 @@ br_token.type = SIMPLE_BRACKET; br_token.opr.sbcset = sbcset; tree = create_token_tree (dfa, NULL, NULL, &br_token); - if (BE (tree == NULL, 0)) + if (__glibc_unlikely (tree == NULL)) goto build_word_op_espace; #ifdef RE_ENABLE_I18N @@ -3734,11 +3743,11 @@ br_token.opr.mbcset = mbcset; dfa->has_mb_node = 1; mbc_tree = create_token_tree (dfa, NULL, NULL, &br_token); - if (BE (mbc_tree == NULL, 0)) + if (__glibc_unlikely (mbc_tree == NULL)) goto build_word_op_espace; /* Then join them by ALT node. */ tree = create_tree (dfa, tree, mbc_tree, OP_ALT); - if (BE (mbc_tree != NULL, 1)) + if (__glibc_likely (mbc_tree != NULL)) return tree; } else @@ -3774,7 +3783,7 @@ { fetch_token (token, input, syntax); c = token->opr.c; - if (BE (token->type == END_OF_RE, 0)) + if (__glibc_unlikely (token->type == END_OF_RE)) return -2; if (token->type == OP_CLOSE_DUP_NUM || c == ',') break; @@ -3795,9 +3804,9 @@ # ifdef _LIBC re_free (cset->coll_syms); re_free (cset->equiv_classes); +# endif re_free (cset->range_starts); re_free (cset->range_ends); -# endif re_free (cset->char_classes); re_free (cset); } @@ -3824,7 +3833,7 @@ const re_token_t *token) { bin_tree_t *tree; - if (BE (dfa->str_tree_storage_idx == BIN_TREE_STORAGE_SIZE, 0)) + if (__glibc_unlikely (dfa->str_tree_storage_idx == BIN_TREE_STORAGE_SIZE)) { bin_tree_storage_t *storage = re_malloc (bin_tree_storage_t, 1); diff -Nru grep-3.1/lib/regex.c grep-3.3/lib/regex.c --- grep-3.1/lib/regex.c 2017-01-01 11:25:48.000000000 +0000 +++ grep-3.3/lib/regex.c 2018-10-16 23:22:23.000000000 +0000 @@ -1,5 +1,5 @@ /* Extended regular expression matching and search library. - Copyright (C) 2002-2017 Free Software Foundation, Inc. + Copyright (C) 2002-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Isamu Hasegawa . @@ -15,10 +15,10 @@ You should have received a copy of the GNU General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _LIBC -# include +# include # if (__GNUC__ == 4 && 6 <= __GNUC_MINOR__) || 4 < __GNUC__ # pragma GCC diagnostic ignored "-Wsuggest-attribute=pure" diff -Nru grep-3.1/lib/regexec.c grep-3.3/lib/regexec.c --- grep-3.1/lib/regexec.c 2017-01-01 11:25:48.000000000 +0000 +++ grep-3.3/lib/regexec.c 2018-12-21 03:32:19.000000000 +0000 @@ -1,5 +1,5 @@ /* Extended regular expression matching and search library. - Copyright (C) 2002-2017 Free Software Foundation, Inc. + Copyright (C) 2002-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Isamu Hasegawa . @@ -15,192 +15,162 @@ You should have received a copy of the GNU General Public License along with the GNU C Library; if not, see - . */ + . */ static reg_errcode_t match_ctx_init (re_match_context_t *cache, int eflags, - Idx n) internal_function; -static void match_ctx_clean (re_match_context_t *mctx) internal_function; -static void match_ctx_free (re_match_context_t *cache) internal_function; + Idx n); +static void match_ctx_clean (re_match_context_t *mctx); +static void match_ctx_free (re_match_context_t *cache); static reg_errcode_t match_ctx_add_entry (re_match_context_t *cache, Idx node, - Idx str_idx, Idx from, Idx to) - internal_function; -static Idx search_cur_bkref_entry (const re_match_context_t *mctx, Idx str_idx) - internal_function; + Idx str_idx, Idx from, Idx to); +static Idx search_cur_bkref_entry (const re_match_context_t *mctx, Idx str_idx); static reg_errcode_t match_ctx_add_subtop (re_match_context_t *mctx, Idx node, - Idx str_idx) internal_function; + Idx str_idx); static re_sub_match_last_t * match_ctx_add_sublast (re_sub_match_top_t *subtop, - Idx node, Idx str_idx) - internal_function; + Idx node, Idx str_idx); static void sift_ctx_init (re_sift_context_t *sctx, re_dfastate_t **sifted_sts, re_dfastate_t **limited_sts, Idx last_node, - Idx last_str_idx) - internal_function; + Idx last_str_idx); static reg_errcode_t 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) internal_function; + int eflags); 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, - Idx stop, bool ret_len) internal_function; + Idx stop, bool ret_len); static regoff_t 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) internal_function; + bool ret_len); static unsigned re_copy_regs (struct re_registers *regs, regmatch_t *pmatch, - Idx nregs, int regs_allocated) internal_function; -static reg_errcode_t prune_impossible_nodes (re_match_context_t *mctx) - internal_function; + Idx nregs, int regs_allocated); +static reg_errcode_t prune_impossible_nodes (re_match_context_t *mctx); static Idx check_matching (re_match_context_t *mctx, bool fl_longest_match, - Idx *p_match_first) internal_function; + Idx *p_match_first); static Idx check_halt_state_context (const re_match_context_t *mctx, - const re_dfastate_t *state, Idx idx) - internal_function; + const re_dfastate_t *state, Idx idx); static void update_regs (const re_dfa_t *dfa, regmatch_t *pmatch, regmatch_t *prev_idx_match, Idx cur_node, - Idx cur_idx, Idx nmatch) internal_function; + Idx cur_idx, Idx nmatch); static reg_errcode_t push_fail_stack (struct re_fail_stack_t *fs, Idx str_idx, Idx dest_node, Idx nregs, regmatch_t *regs, - re_node_set *eps_via_nodes) - internal_function; + re_node_set *eps_via_nodes); static reg_errcode_t set_regs (const regex_t *preg, const re_match_context_t *mctx, size_t nmatch, regmatch_t *pmatch, - bool fl_backtrack) internal_function; -static reg_errcode_t free_fail_stack_return (struct re_fail_stack_t *fs) - internal_function; + bool fl_backtrack); +static reg_errcode_t free_fail_stack_return (struct re_fail_stack_t *fs); #ifdef RE_ENABLE_I18N static int sift_states_iter_mb (const re_match_context_t *mctx, re_sift_context_t *sctx, - Idx node_idx, Idx str_idx, Idx max_str_idx) - internal_function; + Idx node_idx, Idx str_idx, Idx max_str_idx); #endif /* RE_ENABLE_I18N */ static reg_errcode_t sift_states_backward (const re_match_context_t *mctx, - re_sift_context_t *sctx) - internal_function; + re_sift_context_t *sctx); static reg_errcode_t build_sifted_states (const re_match_context_t *mctx, re_sift_context_t *sctx, Idx str_idx, - re_node_set *cur_dest) - internal_function; + re_node_set *cur_dest); static reg_errcode_t update_cur_sifted_state (const re_match_context_t *mctx, re_sift_context_t *sctx, Idx str_idx, - re_node_set *dest_nodes) - internal_function; + re_node_set *dest_nodes); static reg_errcode_t add_epsilon_src_nodes (const re_dfa_t *dfa, re_node_set *dest_nodes, - const re_node_set *candidates) - internal_function; + const re_node_set *candidates); static bool check_dst_limits (const re_match_context_t *mctx, const re_node_set *limits, Idx dst_node, Idx dst_idx, Idx src_node, - Idx src_idx) internal_function; + Idx src_idx); static int check_dst_limits_calc_pos_1 (const re_match_context_t *mctx, int boundaries, Idx subexp_idx, - Idx from_node, Idx bkref_idx) - internal_function; + Idx from_node, Idx bkref_idx); static int check_dst_limits_calc_pos (const re_match_context_t *mctx, Idx limit, Idx subexp_idx, Idx node, Idx str_idx, - Idx bkref_idx) internal_function; + Idx bkref_idx); static reg_errcode_t check_subexp_limits (const re_dfa_t *dfa, re_node_set *dest_nodes, const re_node_set *candidates, re_node_set *limits, struct re_backref_cache_entry *bkref_ents, - Idx str_idx) internal_function; + Idx str_idx); static reg_errcode_t sift_states_bkref (const re_match_context_t *mctx, re_sift_context_t *sctx, - Idx str_idx, const re_node_set *candidates) - internal_function; + Idx str_idx, const re_node_set *candidates); static reg_errcode_t merge_state_array (const re_dfa_t *dfa, re_dfastate_t **dst, - re_dfastate_t **src, Idx num) - internal_function; + re_dfastate_t **src, Idx num); static re_dfastate_t *find_recover_state (reg_errcode_t *err, - re_match_context_t *mctx) internal_function; + re_match_context_t *mctx); static re_dfastate_t *transit_state (reg_errcode_t *err, re_match_context_t *mctx, - re_dfastate_t *state) internal_function; + re_dfastate_t *state); static re_dfastate_t *merge_state_with_log (reg_errcode_t *err, re_match_context_t *mctx, - re_dfastate_t *next_state) - internal_function; + re_dfastate_t *next_state); static reg_errcode_t check_subexp_matching_top (re_match_context_t *mctx, re_node_set *cur_nodes, - Idx str_idx) internal_function; + Idx str_idx); #if 0 static re_dfastate_t *transit_state_sb (reg_errcode_t *err, re_match_context_t *mctx, - re_dfastate_t *pstate) - internal_function; + re_dfastate_t *pstate); #endif #ifdef RE_ENABLE_I18N static reg_errcode_t transit_state_mb (re_match_context_t *mctx, - re_dfastate_t *pstate) - internal_function; + re_dfastate_t *pstate); #endif /* RE_ENABLE_I18N */ static reg_errcode_t transit_state_bkref (re_match_context_t *mctx, - const re_node_set *nodes) - internal_function; + const re_node_set *nodes); static reg_errcode_t get_subexp (re_match_context_t *mctx, - Idx bkref_node, Idx bkref_str_idx) - internal_function; + Idx bkref_node, Idx bkref_str_idx); static reg_errcode_t get_subexp_sub (re_match_context_t *mctx, const re_sub_match_top_t *sub_top, re_sub_match_last_t *sub_last, - Idx bkref_node, Idx bkref_str) - internal_function; + Idx bkref_node, Idx bkref_str); static Idx find_subexp_node (const re_dfa_t *dfa, const re_node_set *nodes, - Idx subexp_idx, int type) internal_function; + Idx subexp_idx, int type); static reg_errcode_t check_arrival (re_match_context_t *mctx, state_array_t *path, Idx top_node, Idx top_str, Idx last_node, Idx last_str, - int type) internal_function; + int type); static reg_errcode_t check_arrival_add_next_nodes (re_match_context_t *mctx, Idx str_idx, re_node_set *cur_nodes, - re_node_set *next_nodes) - internal_function; + re_node_set *next_nodes); static reg_errcode_t check_arrival_expand_ecl (const re_dfa_t *dfa, re_node_set *cur_nodes, - Idx ex_subexp, int type) - internal_function; + Idx ex_subexp, int type); static reg_errcode_t check_arrival_expand_ecl_sub (const re_dfa_t *dfa, re_node_set *dst_nodes, Idx target, Idx ex_subexp, - int type) internal_function; + int type); static reg_errcode_t expand_bkref_cache (re_match_context_t *mctx, re_node_set *cur_nodes, Idx cur_str, - Idx subexp_num, int type) - internal_function; -static bool build_trtable (const re_dfa_t *dfa, - re_dfastate_t *state) internal_function; + Idx subexp_num, int type); +static bool build_trtable (const re_dfa_t *dfa, re_dfastate_t *state); #ifdef RE_ENABLE_I18N static int check_node_accept_bytes (const re_dfa_t *dfa, Idx node_idx, - const re_string_t *input, Idx idx) - internal_function; + const re_string_t *input, Idx idx); # ifdef _LIBC static unsigned int find_collation_sequence_value (const unsigned char *mbs, - size_t name_len) - internal_function; + size_t name_len); # endif /* _LIBC */ #endif /* RE_ENABLE_I18N */ static Idx group_nodes_into_DFAstates (const re_dfa_t *dfa, const re_dfastate_t *state, re_node_set *states_node, - bitset_t *states_ch) internal_function; + bitset_t *states_ch); static bool check_node_accept (const re_match_context_t *mctx, - const re_token_t *node, Idx idx) - internal_function; -static reg_errcode_t extend_buffers (re_match_context_t *mctx, int min_len) - internal_function; + const re_token_t *node, Idx idx); +static reg_errcode_t extend_buffers (re_match_context_t *mctx, int min_len); /* Entry point for POSIX code. */ @@ -252,6 +222,8 @@ } #ifdef _LIBC +libc_hidden_def (__regexec) + # include versioned_symbol (libc, __regexec, regexec, GLIBC_2_3_4); @@ -346,7 +318,6 @@ #endif static regoff_t -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, @@ -357,9 +328,8 @@ Idx len; char *s = NULL; - if (BE ((length1 < 0 || length2 < 0 || stop < 0 - || INT_ADD_WRAPV (length1, length2, &len)), - 0)) + if (__glibc_unlikely ((length1 < 0 || length2 < 0 || stop < 0 + || INT_ADD_WRAPV (length1, length2, &len)))) return -2; /* Concatenate the strings. */ @@ -368,7 +338,7 @@ { s = re_malloc (char, len); - if (BE (s == NULL, 0)) + if (__glibc_unlikely (s == NULL)) return -2; #ifdef _LIBC memcpy (__mempcpy (s, string1, length1), string2, length2); @@ -395,7 +365,6 @@ otherwise the position of the match is returned. */ static regoff_t -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) @@ -409,11 +378,13 @@ Idx last_start = start + range; /* Check for out-of-range. */ - if (BE (start < 0 || start > length, 0)) + if (__glibc_unlikely (start < 0 || start > length)) return -1; - if (BE (length < last_start || (0 <= range && last_start < start), 0)) + if (__glibc_unlikely (length < last_start + || (0 <= range && last_start < start))) last_start = length; - else if (BE (last_start < 0 || (range < 0 && start <= last_start), 0)) + else if (__glibc_unlikely (last_start < 0 + || (range < 0 && start <= last_start))) last_start = 0; lock_lock (dfa->lock); @@ -425,17 +396,17 @@ if (start < last_start && bufp->fastmap != NULL && !bufp->fastmap_accurate) re_compile_fastmap (bufp); - if (BE (bufp->no_sub, 0)) + if (__glibc_unlikely (bufp->no_sub)) regs = NULL; /* We need at least 1 register. */ if (regs == NULL) nregs = 1; - else if (BE (bufp->regs_allocated == REGS_FIXED - && regs->num_regs <= bufp->re_nsub, 0)) + else if (__glibc_unlikely (bufp->regs_allocated == REGS_FIXED + && regs->num_regs <= bufp->re_nsub)) { nregs = regs->num_regs; - if (BE (nregs < 1, 0)) + if (__glibc_unlikely (nregs < 1)) { /* Nothing can be copied to regs. */ regs = NULL; @@ -445,7 +416,7 @@ else nregs = bufp->re_nsub + 1; pmatch = re_malloc (regmatch_t, nregs); - if (BE (pmatch == NULL, 0)) + if (__glibc_unlikely (pmatch == NULL)) { rval = -2; goto out; @@ -464,11 +435,11 @@ /* If caller wants register contents data back, copy them. */ bufp->regs_allocated = re_copy_regs (regs, pmatch, nregs, bufp->regs_allocated); - if (BE (bufp->regs_allocated == REGS_UNALLOCATED, 0)) + if (__glibc_unlikely (bufp->regs_allocated == REGS_UNALLOCATED)) rval = -2; } - if (BE (rval == 0, 1)) + if (__glibc_likely (rval == 0)) { if (ret_len) { @@ -485,7 +456,6 @@ } static unsigned -internal_function re_copy_regs (struct re_registers *regs, regmatch_t *pmatch, Idx nregs, int regs_allocated) { @@ -499,10 +469,10 @@ if (regs_allocated == REGS_UNALLOCATED) { /* No. So allocate them with malloc. */ regs->start = re_malloc (regoff_t, need_regs); - if (BE (regs->start == NULL, 0)) + if (__glibc_unlikely (regs->start == NULL)) return REGS_UNALLOCATED; regs->end = re_malloc (regoff_t, need_regs); - if (BE (regs->end == NULL, 0)) + if (__glibc_unlikely (regs->end == NULL)) { re_free (regs->start); return REGS_UNALLOCATED; @@ -513,14 +483,14 @@ { /* Yes. If we need more elements than were already allocated, reallocate them. If we need fewer, just leave it alone. */ - if (BE (need_regs > regs->num_regs, 0)) + if (__glibc_unlikely (need_regs > regs->num_regs)) { regoff_t *new_start = re_realloc (regs->start, regoff_t, need_regs); regoff_t *new_end; - if (BE (new_start == NULL, 0)) + if (__glibc_unlikely (new_start == NULL)) return REGS_UNALLOCATED; new_end = re_realloc (regs->end, regoff_t, need_regs); - if (BE (new_end == NULL, 0)) + if (__glibc_unlikely (new_end == NULL)) { re_free (new_start); return REGS_UNALLOCATED; @@ -611,7 +581,7 @@ (0 <= LAST_START && LAST_START <= LENGTH) */ static reg_errcode_t -__attribute_warn_unused_result__ internal_function +__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) @@ -646,9 +616,10 @@ nmatch -= extra_nmatch; /* Check if the DFA haven't been compiled. */ - if (BE (preg->used == 0 || dfa->init_state == NULL - || dfa->init_state_word == NULL || dfa->init_state_nl == NULL - || dfa->init_state_begbuf == NULL, 0)) + if (__glibc_unlikely (preg->used == 0 || dfa->init_state == NULL + || dfa->init_state_word == NULL + || dfa->init_state_nl == NULL + || dfa->init_state_begbuf == NULL)) return REG_NOMATCH; #ifdef DEBUG @@ -675,14 +646,14 @@ err = re_string_allocate (&mctx.input, string, length, dfa->nodes_len + 1, preg->translate, (preg->syntax & RE_ICASE) != 0, dfa); - if (BE (err != REG_NOERROR, 0)) + if (__glibc_unlikely (err != REG_NOERROR)) goto free_return; mctx.input.stop = stop; mctx.input.raw_stop = stop; mctx.input.newline_anchor = preg->newline_anchor; err = match_ctx_init (&mctx, eflags, dfa->nbackref * 2); - if (BE (err != REG_NOERROR, 0)) + if (__glibc_unlikely (err != REG_NOERROR)) goto free_return; /* We will log all the DFA states through which the dfa pass, @@ -692,15 +663,15 @@ if (nmatch > 1 || dfa->has_mb_node) { /* Avoid overflow. */ - if (BE ((MIN (IDX_MAX, SIZE_MAX / sizeof (re_dfastate_t *)) - <= mctx.input.bufs_len), 0)) + if (__glibc_unlikely ((MIN (IDX_MAX, SIZE_MAX / sizeof (re_dfastate_t *)) + <= mctx.input.bufs_len))) { err = REG_ESPACE; goto free_return; } mctx.state_log = re_malloc (re_dfastate_t *, mctx.input.bufs_len + 1); - if (BE (mctx.state_log == NULL, 0)) + if (__glibc_unlikely (mctx.state_log == NULL)) { err = REG_ESPACE; goto free_return; @@ -744,19 +715,19 @@ case 7: /* Fastmap with single-byte translation, match forward. */ - while (BE (match_first < right_lim, 1) + while (__glibc_likely (match_first < right_lim) && !fastmap[t[(unsigned char) string[match_first]]]) ++match_first; goto forward_match_found_start_or_reached_end; case 6: /* Fastmap without translation, match forward. */ - while (BE (match_first < right_lim, 1) + while (__glibc_likely (match_first < right_lim) && !fastmap[(unsigned char) string[match_first]]) ++match_first; forward_match_found_start_or_reached_end: - if (BE (match_first == right_lim, 0)) + if (__glibc_unlikely (match_first == right_lim)) { ch = match_first >= length ? 0 : (unsigned char) string[match_first]; @@ -789,11 +760,12 @@ /* If MATCH_FIRST is out of the valid range, reconstruct the buffers. */ __re_size_t offset = match_first - mctx.input.raw_mbs_idx; - if (BE (offset >= (__re_size_t) mctx.input.valid_raw_len, 0)) + if (__glibc_unlikely (offset + >= (__re_size_t) mctx.input.valid_raw_len)) { err = re_string_reconstruct (&mctx.input, match_first, eflags); - if (BE (err != REG_NOERROR, 0)) + if (__glibc_unlikely (err != REG_NOERROR)) goto free_return; offset = match_first - mctx.input.raw_mbs_idx; @@ -817,7 +789,7 @@ /* Reconstruct the buffers so that the matcher can assume that the matching starts from the beginning of the buffer. */ err = re_string_reconstruct (&mctx.input, match_first, eflags); - if (BE (err != REG_NOERROR, 0)) + if (__glibc_unlikely (err != REG_NOERROR)) goto free_return; #ifdef RE_ENABLE_I18N @@ -834,7 +806,7 @@ start <= last_start ? &match_first : NULL); if (match_last != -1) { - if (BE (match_last == -2, 0)) + if (__glibc_unlikely (match_last == -2)) { err = REG_ESPACE; goto free_return; @@ -854,7 +826,7 @@ err = prune_impossible_nodes (&mctx); if (err == REG_NOERROR) break; - if (BE (err != REG_NOMATCH, 0)) + if (__glibc_unlikely (err != REG_NOMATCH)) goto free_return; match_last = -1; } @@ -891,7 +863,7 @@ { err = set_regs (preg, &mctx, nmatch, pmatch, dfa->has_plural_match && dfa->nbackref > 0); - if (BE (err != REG_NOERROR, 0)) + if (__glibc_unlikely (err != REG_NOERROR)) goto free_return; } @@ -902,7 +874,7 @@ if (pmatch[reg_idx].rm_so != -1) { #ifdef RE_ENABLE_I18N - if (BE (mctx.input.offsets_needed != 0, 0)) + if (__glibc_unlikely (mctx.input.offsets_needed != 0)) { pmatch[reg_idx].rm_so = (pmatch[reg_idx].rm_so == mctx.input.valid_len @@ -945,7 +917,7 @@ } static reg_errcode_t -internal_function __attribute_warn_unused_result__ +__attribute_warn_unused_result__ prune_impossible_nodes (re_match_context_t *mctx) { const re_dfa_t *const dfa = mctx->dfa; @@ -961,11 +933,12 @@ halt_node = mctx->last_node; /* Avoid overflow. */ - if (BE (MIN (IDX_MAX, SIZE_MAX / sizeof (re_dfastate_t *)) <= match_last, 0)) + if (__glibc_unlikely (MIN (IDX_MAX, SIZE_MAX / sizeof (re_dfastate_t *)) + <= match_last)) return REG_ESPACE; sifted_states = re_malloc (re_dfastate_t *, match_last + 1); - if (BE (sifted_states == NULL, 0)) + if (__glibc_unlikely (sifted_states == NULL)) { ret = REG_ESPACE; goto free_return; @@ -973,7 +946,7 @@ if (dfa->nbackref) { lim_states = re_malloc (re_dfastate_t *, match_last + 1); - if (BE (lim_states == NULL, 0)) + if (__glibc_unlikely (lim_states == NULL)) { ret = REG_ESPACE; goto free_return; @@ -986,7 +959,7 @@ match_last); ret = sift_states_backward (mctx, &sctx); re_node_set_free (&sctx.limits); - if (BE (ret != REG_NOERROR, 0)) + if (__glibc_unlikely (ret != REG_NOERROR)) goto free_return; if (sifted_states[0] != NULL || lim_states[0] != NULL) break; @@ -1008,7 +981,7 @@ match_last + 1); re_free (lim_states); lim_states = NULL; - if (BE (ret != REG_NOERROR, 0)) + if (__glibc_unlikely (ret != REG_NOERROR)) goto free_return; } else @@ -1016,7 +989,7 @@ sift_ctx_init (&sctx, sifted_states, lim_states, halt_node, match_last); ret = sift_states_backward (mctx, &sctx); re_node_set_free (&sctx.limits); - if (BE (ret != REG_NOERROR, 0)) + if (__glibc_unlikely (ret != REG_NOERROR)) goto free_return; if (sifted_states[0] == NULL) { @@ -1041,7 +1014,7 @@ since initial states may have constraints like "\<", "^", etc.. */ static inline re_dfastate_t * -__attribute__ ((always_inline)) internal_function +__attribute__ ((always_inline)) acquire_init_state_context (reg_errcode_t *err, const re_match_context_t *mctx, Idx idx) { @@ -1083,7 +1056,7 @@ index of the buffer. */ static Idx -internal_function __attribute_warn_unused_result__ +__attribute_warn_unused_result__ check_matching (re_match_context_t *mctx, bool fl_longest_match, Idx *p_match_first) { @@ -1099,7 +1072,7 @@ err = REG_NOERROR; cur_state = acquire_init_state_context (&err, mctx, cur_str_idx); /* An initial state must not be NULL (invalid). */ - if (BE (cur_state == NULL, 0)) + if (__glibc_unlikely (cur_state == NULL)) { assert (err == REG_ESPACE); return -2; @@ -1111,24 +1084,24 @@ /* Check OP_OPEN_SUBEXP in the initial state in case that we use them later. E.g. Processing back references. */ - if (BE (dfa->nbackref, 0)) + if (__glibc_unlikely (dfa->nbackref)) { at_init_state = false; err = check_subexp_matching_top (mctx, &cur_state->nodes, 0); - if (BE (err != REG_NOERROR, 0)) + if (__glibc_unlikely (err != REG_NOERROR)) return err; if (cur_state->has_backref) { err = transit_state_bkref (mctx, &cur_state->nodes); - if (BE (err != REG_NOERROR, 0)) + if (__glibc_unlikely (err != REG_NOERROR)) return err; } } } /* If the RE accepts NULL string. */ - if (BE (cur_state->halt, 0)) + if (__glibc_unlikely (cur_state->halt)) { if (!cur_state->has_constraint || check_halt_state_context (mctx, cur_state, cur_str_idx)) @@ -1148,13 +1121,13 @@ re_dfastate_t *old_state = cur_state; Idx next_char_idx = re_string_cur_idx (&mctx->input) + 1; - if ((BE (next_char_idx >= mctx->input.bufs_len, 0) + if ((__glibc_unlikely (next_char_idx >= mctx->input.bufs_len) && mctx->input.bufs_len < mctx->input.len) - || (BE (next_char_idx >= mctx->input.valid_len, 0) + || (__glibc_unlikely (next_char_idx >= mctx->input.valid_len) && mctx->input.valid_len < mctx->input.len)) { err = extend_buffers (mctx, next_char_idx + 1); - if (BE (err != REG_NOERROR, 0)) + if (__glibc_unlikely (err != REG_NOERROR)) { assert (err == REG_ESPACE); return -2; @@ -1170,7 +1143,7 @@ /* Reached the invalid state or an error. Try to recover a valid 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)) + if (__glibc_unlikely (err != REG_NOERROR)) return -2; if (mctx->state_log == NULL @@ -1179,7 +1152,7 @@ break; } - if (BE (at_init_state, 0)) + if (__glibc_unlikely (at_init_state)) { if (old_state == cur_state) next_start_idx = next_char_idx; @@ -1216,7 +1189,6 @@ /* Check NODE match the current context. */ static bool -internal_function check_halt_node_context (const re_dfa_t *dfa, Idx node, unsigned int context) { re_token_type_t type = dfa->nodes[node].type; @@ -1235,7 +1207,6 @@ match the context, return the node. */ static Idx -internal_function check_halt_state_context (const re_match_context_t *mctx, const re_dfastate_t *state, Idx idx) { @@ -1257,7 +1228,6 @@ return -1 in case of errors. */ static Idx -internal_function proceed_next_node (const re_match_context_t *mctx, Idx nregs, regmatch_t *regs, Idx *pidx, Idx node, re_node_set *eps_via_nodes, struct re_fail_stack_t *fs) @@ -1271,7 +1241,7 @@ re_node_set *edests = &dfa->edests[node]; Idx dest_node; ok = re_node_set_insert (eps_via_nodes, node); - if (BE (! ok, 0)) + if (__glibc_unlikely (! ok)) return -2; /* Pick up a valid destination, or return -1 if none is found. */ @@ -1333,7 +1303,7 @@ { Idx dest_node; ok = re_node_set_insert (eps_via_nodes, node); - if (BE (! ok, 0)) + if (__glibc_unlikely (! ok)) return -2; dest_node = dfa->edests[node].elems[0]; if (re_node_set_contains (&mctx->state_log[*pidx]->nodes, @@ -1359,7 +1329,7 @@ } static reg_errcode_t -internal_function __attribute_warn_unused_result__ +__attribute_warn_unused_result__ push_fail_stack (struct re_fail_stack_t *fs, Idx str_idx, Idx dest_node, Idx nregs, regmatch_t *regs, re_node_set *eps_via_nodes) { @@ -1368,8 +1338,8 @@ if (fs->num == fs->alloc) { struct re_fail_stack_ent_t *new_array; - new_array = realloc (fs->stack, (sizeof (struct re_fail_stack_ent_t) - * fs->alloc * 2)); + new_array = re_realloc (fs->stack, struct re_fail_stack_ent_t, + fs->alloc * 2); if (new_array == NULL) return REG_ESPACE; fs->alloc *= 2; @@ -1386,7 +1356,6 @@ } static Idx -internal_function pop_fail_stack (struct re_fail_stack_t *fs, Idx *pidx, Idx nregs, regmatch_t *regs, re_node_set *eps_via_nodes) { @@ -1406,7 +1375,7 @@ pmatch[i].rm_so == pmatch[i].rm_eo == -1 for 0 < i < nmatch. */ static reg_errcode_t -internal_function __attribute_warn_unused_result__ +__attribute_warn_unused_result__ set_regs (const regex_t *preg, const re_match_context_t *mctx, size_t nmatch, regmatch_t *pmatch, bool fl_backtrack) { @@ -1484,9 +1453,9 @@ cur_node = proceed_next_node (mctx, nmatch, pmatch, &idx, cur_node, &eps_via_nodes, fs); - if (BE (cur_node < 0, 0)) + if (__glibc_unlikely (cur_node < 0)) { - if (BE (cur_node == -2, 0)) + if (__glibc_unlikely (cur_node == -2)) { re_node_set_free (&eps_via_nodes); if (prev_idx_match_malloced) @@ -1513,7 +1482,6 @@ } static reg_errcode_t -internal_function free_fail_stack_return (struct re_fail_stack_t *fs) { if (fs) @@ -1530,7 +1498,6 @@ } static void -internal_function update_regs (const re_dfa_t *dfa, regmatch_t *pmatch, regmatch_t *prev_idx_match, Idx cur_node, Idx cur_idx, Idx nmatch) { @@ -1602,7 +1569,6 @@ ((state) != NULL && re_node_set_contains (&(state)->nodes, node)) static reg_errcode_t -internal_function sift_states_backward (const re_match_context_t *mctx, re_sift_context_t *sctx) { reg_errcode_t err; @@ -1617,10 +1583,10 @@ /* Build sifted state_log[str_idx]. It has the nodes which can epsilon transit to the last_node and the last_node itself. */ err = re_node_set_init_1 (&cur_dest, sctx->last_node); - if (BE (err != REG_NOERROR, 0)) + if (__glibc_unlikely (err != REG_NOERROR)) return err; err = update_cur_sifted_state (mctx, sctx, str_idx, &cur_dest); - if (BE (err != REG_NOERROR, 0)) + if (__glibc_unlikely (err != REG_NOERROR)) goto free_return; /* Then check each states in the state_log. */ @@ -1641,7 +1607,7 @@ if (mctx->state_log[str_idx]) { err = build_sifted_states (mctx, sctx, str_idx, &cur_dest); - if (BE (err != REG_NOERROR, 0)) + if (__glibc_unlikely (err != REG_NOERROR)) goto free_return; } @@ -1650,7 +1616,7 @@ - It is in CUR_SRC. And update state_log. */ err = update_cur_sifted_state (mctx, sctx, str_idx, &cur_dest); - if (BE (err != REG_NOERROR, 0)) + if (__glibc_unlikely (err != REG_NOERROR)) goto free_return; } err = REG_NOERROR; @@ -1660,7 +1626,7 @@ } static reg_errcode_t -internal_function __attribute_warn_unused_result__ +__attribute_warn_unused_result__ build_sifted_states (const re_match_context_t *mctx, re_sift_context_t *sctx, Idx str_idx, re_node_set *cur_dest) { @@ -1712,7 +1678,7 @@ continue; } ok = re_node_set_insert (cur_dest, prev_node); - if (BE (! ok, 0)) + if (__glibc_unlikely (! ok)) return REG_ESPACE; } @@ -1722,7 +1688,6 @@ /* Helper functions. */ static reg_errcode_t -internal_function clean_state_log_if_needed (re_match_context_t *mctx, Idx next_state_log_idx) { Idx top = mctx->state_log_top; @@ -1734,7 +1699,7 @@ { reg_errcode_t err; err = extend_buffers (mctx, next_state_log_idx + 1); - if (BE (err != REG_NOERROR, 0)) + if (__glibc_unlikely (err != REG_NOERROR)) return err; } @@ -1748,7 +1713,6 @@ } static reg_errcode_t -internal_function merge_state_array (const re_dfa_t *dfa, re_dfastate_t **dst, re_dfastate_t **src, Idx num) { @@ -1763,11 +1727,11 @@ re_node_set merged_set; err = re_node_set_init_union (&merged_set, &dst[st_idx]->nodes, &src[st_idx]->nodes); - if (BE (err != REG_NOERROR, 0)) + if (__glibc_unlikely (err != REG_NOERROR)) return err; dst[st_idx] = re_acquire_state (&err, dfa, &merged_set); re_node_set_free (&merged_set); - if (BE (err != REG_NOERROR, 0)) + if (__glibc_unlikely (err != REG_NOERROR)) return err; } } @@ -1775,7 +1739,6 @@ } static reg_errcode_t -internal_function update_cur_sifted_state (const re_match_context_t *mctx, re_sift_context_t *sctx, Idx str_idx, re_node_set *dest_nodes) @@ -1795,7 +1758,7 @@ /* At first, add the nodes which can epsilon transit to a node in DEST_NODE. */ err = add_epsilon_src_nodes (dfa, dest_nodes, candidates); - if (BE (err != REG_NOERROR, 0)) + if (__glibc_unlikely (err != REG_NOERROR)) return err; /* Then, check the limitations in the current sift_context. */ @@ -1803,27 +1766,27 @@ { err = check_subexp_limits (dfa, dest_nodes, candidates, &sctx->limits, mctx->bkref_ents, str_idx); - if (BE (err != REG_NOERROR, 0)) + if (__glibc_unlikely (err != REG_NOERROR)) return err; } } sctx->sifted_states[str_idx] = re_acquire_state (&err, dfa, dest_nodes); - if (BE (err != REG_NOERROR, 0)) + if (__glibc_unlikely (err != REG_NOERROR)) return err; } if (candidates && mctx->state_log[str_idx]->has_backref) { err = sift_states_bkref (mctx, sctx, str_idx, candidates); - if (BE (err != REG_NOERROR, 0)) + if (__glibc_unlikely (err != REG_NOERROR)) return err; } return REG_NOERROR; } static reg_errcode_t -internal_function __attribute_warn_unused_result__ +__attribute_warn_unused_result__ add_epsilon_src_nodes (const re_dfa_t *dfa, re_node_set *dest_nodes, const re_node_set *candidates) { @@ -1831,19 +1794,19 @@ Idx i; re_dfastate_t *state = re_acquire_state (&err, dfa, dest_nodes); - if (BE (err != REG_NOERROR, 0)) + if (__glibc_unlikely (err != REG_NOERROR)) return err; if (!state->inveclosure.alloc) { err = re_node_set_alloc (&state->inveclosure, dest_nodes->nelem); - if (BE (err != REG_NOERROR, 0)) + if (__glibc_unlikely (err != REG_NOERROR)) return REG_ESPACE; for (i = 0; i < dest_nodes->nelem; i++) { err = re_node_set_merge (&state->inveclosure, dfa->inveclosures + dest_nodes->elems[i]); - if (BE (err != REG_NOERROR, 0)) + if (__glibc_unlikely (err != REG_NOERROR)) return REG_ESPACE; } } @@ -1852,7 +1815,6 @@ } static reg_errcode_t -internal_function sub_epsilon_src_nodes (const re_dfa_t *dfa, Idx node, re_node_set *dest_nodes, const re_node_set *candidates) { @@ -1879,7 +1841,7 @@ { err = re_node_set_add_intersect (&except_nodes, candidates, dfa->inveclosures + cur_node); - if (BE (err != REG_NOERROR, 0)) + if (__glibc_unlikely (err != REG_NOERROR)) { re_node_set_free (&except_nodes); return err; @@ -1901,7 +1863,6 @@ } static bool -internal_function check_dst_limits (const re_match_context_t *mctx, const re_node_set *limits, Idx dst_node, Idx dst_idx, Idx src_node, Idx src_idx) { @@ -1937,7 +1898,6 @@ } static int -internal_function check_dst_limits_calc_pos_1 (const re_match_context_t *mctx, int boundaries, Idx subexp_idx, Idx from_node, Idx bkref_idx) { @@ -2019,7 +1979,6 @@ } static int -internal_function check_dst_limits_calc_pos (const re_match_context_t *mctx, Idx limit, Idx subexp_idx, Idx from_node, Idx str_idx, Idx bkref_idx) @@ -2049,7 +2008,6 @@ which are against limitations from DEST_NODES. */ static reg_errcode_t -internal_function check_subexp_limits (const re_dfa_t *dfa, re_node_set *dest_nodes, const re_node_set *candidates, re_node_set *limits, struct re_backref_cache_entry *bkref_ents, Idx str_idx) @@ -2089,7 +2047,7 @@ { err = sub_epsilon_src_nodes (dfa, ops_node, dest_nodes, candidates); - if (BE (err != REG_NOERROR, 0)) + if (__glibc_unlikely (err != REG_NOERROR)) return err; } @@ -2107,7 +2065,7 @@ Remove it form the current sifted state. */ err = sub_epsilon_src_nodes (dfa, node, dest_nodes, candidates); - if (BE (err != REG_NOERROR, 0)) + if (__glibc_unlikely (err != REG_NOERROR)) return err; --node_idx; } @@ -2127,7 +2085,7 @@ Remove it form the current sifted state. */ err = sub_epsilon_src_nodes (dfa, node, dest_nodes, candidates); - if (BE (err != REG_NOERROR, 0)) + if (__glibc_unlikely (err != REG_NOERROR)) return err; } } @@ -2137,7 +2095,7 @@ } static reg_errcode_t -internal_function __attribute_warn_unused_result__ +__attribute_warn_unused_result__ sift_states_bkref (const re_match_context_t *mctx, re_sift_context_t *sctx, Idx str_idx, const re_node_set *candidates) { @@ -2193,27 +2151,27 @@ { local_sctx = *sctx; err = re_node_set_init_copy (&local_sctx.limits, &sctx->limits); - if (BE (err != REG_NOERROR, 0)) + if (__glibc_unlikely (err != REG_NOERROR)) goto free_return; } local_sctx.last_node = node; local_sctx.last_str_idx = str_idx; ok = re_node_set_insert (&local_sctx.limits, enabled_idx); - if (BE (! ok, 0)) + if (__glibc_unlikely (! ok)) { err = REG_ESPACE; goto free_return; } cur_state = local_sctx.sifted_states[str_idx]; err = sift_states_backward (mctx, &local_sctx); - if (BE (err != REG_NOERROR, 0)) + if (__glibc_unlikely (err != REG_NOERROR)) goto free_return; if (sctx->limited_states != NULL) { err = merge_state_array (dfa, sctx->limited_states, local_sctx.sifted_states, str_idx + 1); - if (BE (err != REG_NOERROR, 0)) + if (__glibc_unlikely (err != REG_NOERROR)) goto free_return; } local_sctx.sifted_states[str_idx] = cur_state; @@ -2237,7 +2195,6 @@ #ifdef RE_ENABLE_I18N static int -internal_function sift_states_iter_mb (const re_match_context_t *mctx, re_sift_context_t *sctx, Idx node_idx, Idx str_idx, Idx max_str_idx) { @@ -2267,7 +2224,7 @@ update the destination of STATE_LOG. */ static re_dfastate_t * -internal_function __attribute_warn_unused_result__ +__attribute_warn_unused_result__ transit_state (reg_errcode_t *err, re_match_context_t *mctx, re_dfastate_t *state) { @@ -2276,10 +2233,10 @@ #ifdef RE_ENABLE_I18N /* If the current state can accept multibyte. */ - if (BE (state->accept_mb, 0)) + if (__glibc_unlikely (state->accept_mb)) { *err = transit_state_mb (mctx, state); - if (BE (*err != REG_NOERROR, 0)) + if (__glibc_unlikely (*err != REG_NOERROR)) return NULL; } #endif /* RE_ENABLE_I18N */ @@ -2296,11 +2253,11 @@ for (;;) { trtable = state->trtable; - if (BE (trtable != NULL, 1)) + if (__glibc_likely (trtable != NULL)) return trtable[ch]; trtable = state->word_trtable; - if (BE (trtable != NULL, 1)) + if (__glibc_likely (trtable != NULL)) { unsigned int context; context @@ -2325,7 +2282,6 @@ /* Update the state_log if we need */ static re_dfastate_t * -internal_function merge_state_with_log (reg_errcode_t *err, re_match_context_t *mctx, re_dfastate_t *next_state) { @@ -2357,7 +2313,7 @@ table_nodes = next_state->entrance_nodes; *err = re_node_set_init_union (&next_nodes, table_nodes, log_nodes); - if (BE (*err != REG_NOERROR, 0)) + if (__glibc_unlikely (*err != REG_NOERROR)) return NULL; } else @@ -2377,21 +2333,21 @@ re_node_set_free (&next_nodes); } - if (BE (dfa->nbackref, 0) && next_state != NULL) + if (__glibc_unlikely (dfa->nbackref) && next_state != NULL) { /* Check OP_OPEN_SUBEXP in the current state in case that we use them later. We must check them here, since the back references in the next state might use them. */ *err = check_subexp_matching_top (mctx, &next_state->nodes, cur_idx); - if (BE (*err != REG_NOERROR, 0)) + if (__glibc_unlikely (*err != REG_NOERROR)) return NULL; /* If the next state has back references. */ if (next_state->has_backref) { *err = transit_state_bkref (mctx, &next_state->nodes); - if (BE (*err != REG_NOERROR, 0)) + if (__glibc_unlikely (*err != REG_NOERROR)) return NULL; next_state = mctx->state_log[cur_idx]; } @@ -2404,7 +2360,6 @@ multi-byte match, then look in the log for a state from which to restart matching. */ static re_dfastate_t * -internal_function find_recover_state (reg_errcode_t *err, re_match_context_t *mctx) { re_dfastate_t *cur_state; @@ -2435,7 +2390,6 @@ corresponding back references. */ static reg_errcode_t -internal_function check_subexp_matching_top (re_match_context_t *mctx, re_node_set *cur_nodes, Idx str_idx) { @@ -2457,7 +2411,7 @@ & ((bitset_word_t) 1 << dfa->nodes[node].opr.idx))) { err = match_ctx_add_subtop (mctx, node, str_idx); - if (BE (err != REG_NOERROR, 0)) + if (__glibc_unlikely (err != REG_NOERROR)) return err; } } @@ -2479,7 +2433,7 @@ unsigned int context; *err = re_node_set_alloc (&next_nodes, state->nodes.nelem + 1); - if (BE (*err != REG_NOERROR, 0)) + if (__glibc_unlikely (*err != REG_NOERROR)) return NULL; for (node_cnt = 0; node_cnt < state->nodes.nelem; ++node_cnt) { @@ -2488,7 +2442,7 @@ { *err = re_node_set_merge (&next_nodes, dfa->eclosures + dfa->nexts[cur_node]); - if (BE (*err != REG_NOERROR, 0)) + if (__glibc_unlikely (*err != REG_NOERROR)) { re_node_set_free (&next_nodes); return NULL; @@ -2508,7 +2462,6 @@ #ifdef RE_ENABLE_I18N static reg_errcode_t -internal_function transit_state_mb (re_match_context_t *mctx, re_dfastate_t *pstate) { const re_dfa_t *const dfa = mctx->dfa; @@ -2548,7 +2501,7 @@ mctx->max_mb_elem_len = ((mctx->max_mb_elem_len < naccepted) ? naccepted : mctx->max_mb_elem_len); err = clean_state_log_if_needed (mctx, dest_idx); - if (BE (err != REG_NOERROR, 0)) + if (__glibc_unlikely (err != REG_NOERROR)) return err; #ifdef DEBUG assert (dfa->nexts[cur_node_idx] != -1); @@ -2562,7 +2515,7 @@ { err = re_node_set_init_union (&dest_nodes, dest_state->entrance_nodes, new_nodes); - if (BE (err != REG_NOERROR, 0)) + if (__glibc_unlikely (err != REG_NOERROR)) return err; } context = re_string_context_at (&mctx->input, dest_idx - 1, @@ -2571,7 +2524,8 @@ = re_acquire_state_context (&err, dfa, &dest_nodes, context); if (dest_state != NULL) re_node_set_free (&dest_nodes); - if (BE (mctx->state_log[dest_idx] == NULL && err != REG_NOERROR, 0)) + if (__glibc_unlikely (mctx->state_log[dest_idx] == NULL + && err != REG_NOERROR)) return err; } return REG_NOERROR; @@ -2579,7 +2533,6 @@ #endif /* RE_ENABLE_I18N */ static reg_errcode_t -internal_function transit_state_bkref (re_match_context_t *mctx, const re_node_set *nodes) { const re_dfa_t *const dfa = mctx->dfa; @@ -2611,7 +2564,7 @@ Check the substring which the substring matched. */ bkc_idx = mctx->nbkref_ents; err = get_subexp (mctx, node_idx, cur_str_idx); - if (BE (err != REG_NOERROR, 0)) + if (__glibc_unlikely (err != REG_NOERROR)) goto free_return; /* And add the epsilon closures (which is 'new_dest_nodes') of @@ -2644,8 +2597,8 @@ mctx->state_log[dest_str_idx] = re_acquire_state_context (&err, dfa, new_dest_nodes, context); - if (BE (mctx->state_log[dest_str_idx] == NULL - && err != REG_NOERROR, 0)) + if (__glibc_unlikely (mctx->state_log[dest_str_idx] == NULL + && err != REG_NOERROR)) goto free_return; } else @@ -2654,7 +2607,7 @@ err = re_node_set_init_union (&dest_nodes, dest_state->entrance_nodes, new_dest_nodes); - if (BE (err != REG_NOERROR, 0)) + if (__glibc_unlikely (err != REG_NOERROR)) { re_node_set_free (&dest_nodes); goto free_return; @@ -2662,8 +2615,8 @@ mctx->state_log[dest_str_idx] = re_acquire_state_context (&err, dfa, &dest_nodes, context); re_node_set_free (&dest_nodes); - if (BE (mctx->state_log[dest_str_idx] == NULL - && err != REG_NOERROR, 0)) + if (__glibc_unlikely (mctx->state_log[dest_str_idx] == NULL + && err != REG_NOERROR)) goto free_return; } /* We need to check recursively if the backreference can epsilon @@ -2673,10 +2626,10 @@ { err = check_subexp_matching_top (mctx, new_dest_nodes, cur_str_idx); - if (BE (err != REG_NOERROR, 0)) + if (__glibc_unlikely (err != REG_NOERROR)) goto free_return; err = transit_state_bkref (mctx, new_dest_nodes); - if (BE (err != REG_NOERROR, 0)) + if (__glibc_unlikely (err != REG_NOERROR)) goto free_return; } } @@ -2693,7 +2646,7 @@ delay these checking for prune_impossible_nodes(). */ static reg_errcode_t -internal_function __attribute_warn_unused_result__ +__attribute_warn_unused_result__ get_subexp (re_match_context_t *mctx, Idx bkref_node, Idx bkref_str_idx) { const re_dfa_t *const dfa = mctx->dfa; @@ -2737,7 +2690,8 @@ at the back reference? */ if (sl_str_diff > 0) { - if (BE (bkref_str_off + sl_str_diff > mctx->input.valid_len, 0)) + if (__glibc_unlikely (bkref_str_off + sl_str_diff + > mctx->input.valid_len)) { /* Not enough chars for a successful match. */ if (bkref_str_off + sl_str_diff > mctx->input.len) @@ -2746,7 +2700,7 @@ err = clean_state_log_if_needed (mctx, bkref_str_off + sl_str_diff); - if (BE (err != REG_NOERROR, 0)) + if (__glibc_unlikely (err != REG_NOERROR)) return err; buf = (const char *) re_string_get_buffer (&mctx->input); } @@ -2765,7 +2719,7 @@ if (err == REG_NOMATCH) continue; - if (BE (err != REG_NOERROR, 0)) + if (__glibc_unlikely (err != REG_NOERROR)) return err; } @@ -2784,14 +2738,14 @@ at the back reference? */ if (sl_str_off > 0) { - if (BE (bkref_str_off >= mctx->input.valid_len, 0)) + if (__glibc_unlikely (bkref_str_off >= mctx->input.valid_len)) { /* If we are at the end of the input, we cannot match. */ if (bkref_str_off >= mctx->input.len) break; err = extend_buffers (mctx, bkref_str_off + 1); - if (BE (err != REG_NOERROR, 0)) + if (__glibc_unlikely (err != REG_NOERROR)) return err; buf = (const char *) re_string_get_buffer (&mctx->input); @@ -2822,15 +2776,18 @@ OP_CLOSE_SUBEXP); if (err == REG_NOMATCH) continue; - if (BE (err != REG_NOERROR, 0)) + if (__glibc_unlikely (err != REG_NOERROR)) return err; sub_last = match_ctx_add_sublast (sub_top, cls_node, sl_str); - if (BE (sub_last == NULL, 0)) + if (__glibc_unlikely (sub_last == NULL)) return REG_ESPACE; err = get_subexp_sub (mctx, sub_top, sub_last, bkref_node, bkref_str_idx); + buf = (const char *) re_string_get_buffer (&mctx->input); if (err == REG_NOMATCH) continue; + if (__glibc_unlikely (err != REG_NOERROR)) + return err; } } return REG_NOERROR; @@ -2843,7 +2800,6 @@ and SUB_LAST. */ static reg_errcode_t -internal_function get_subexp_sub (re_match_context_t *mctx, const re_sub_match_top_t *sub_top, re_sub_match_last_t *sub_last, Idx bkref_node, Idx bkref_str) { @@ -2857,7 +2813,7 @@ return err; err = match_ctx_add_entry (mctx, bkref_node, bkref_str, sub_top->str_idx, sub_last->str_idx); - if (BE (err != REG_NOERROR, 0)) + if (__glibc_unlikely (err != REG_NOERROR)) return err; to_idx = bkref_str + sub_last->str_idx - sub_top->str_idx; return clean_state_log_if_needed (mctx, to_idx); @@ -2872,7 +2828,6 @@ E.g. RE: (a){2} */ static Idx -internal_function find_subexp_node (const re_dfa_t *dfa, const re_node_set *nodes, Idx subexp_idx, int type) { @@ -2894,7 +2849,7 @@ Return REG_NOERROR if it can arrive, or REG_NOMATCH otherwise. */ static reg_errcode_t -internal_function __attribute_warn_unused_result__ +__attribute_warn_unused_result__ check_arrival (re_match_context_t *mctx, state_array_t *path, Idx top_node, Idx top_str, Idx last_node, Idx last_str, int type) { @@ -2908,19 +2863,19 @@ subexp_num = dfa->nodes[top_node].opr.idx; /* Extend the buffer if we need. */ - if (BE (path->alloc < last_str + mctx->max_mb_elem_len + 1, 0)) + if (__glibc_unlikely (path->alloc < last_str + mctx->max_mb_elem_len + 1)) { re_dfastate_t **new_array; Idx old_alloc = path->alloc; Idx incr_alloc = last_str + mctx->max_mb_elem_len + 1; Idx new_alloc; - if (BE (IDX_MAX - old_alloc < incr_alloc, 0)) + if (__glibc_unlikely (IDX_MAX - old_alloc < incr_alloc)) return REG_ESPACE; new_alloc = old_alloc + incr_alloc; - if (BE (SIZE_MAX / sizeof (re_dfastate_t *) < new_alloc, 0)) + if (__glibc_unlikely (SIZE_MAX / sizeof (re_dfastate_t *) < new_alloc)) return REG_ESPACE; new_array = re_realloc (path->array, re_dfastate_t *, new_alloc); - if (BE (new_array == NULL, 0)) + if (__glibc_unlikely (new_array == NULL)) return REG_ESPACE; path->array = new_array; path->alloc = new_alloc; @@ -2941,10 +2896,10 @@ if (str_idx == top_str) { err = re_node_set_init_1 (&next_nodes, top_node); - if (BE (err != REG_NOERROR, 0)) + if (__glibc_unlikely (err != REG_NOERROR)) return err; err = check_arrival_expand_ecl (dfa, &next_nodes, subexp_num, type); - if (BE (err != REG_NOERROR, 0)) + if (__glibc_unlikely (err != REG_NOERROR)) { re_node_set_free (&next_nodes); return err; @@ -2956,7 +2911,7 @@ if (cur_state && cur_state->has_backref) { err = re_node_set_init_copy (&next_nodes, &cur_state->nodes); - if (BE (err != REG_NOERROR, 0)) + if (__glibc_unlikely (err != REG_NOERROR)) return err; } else @@ -2968,14 +2923,14 @@ { err = expand_bkref_cache (mctx, &next_nodes, str_idx, subexp_num, type); - if (BE (err != REG_NOERROR, 0)) + if (__glibc_unlikely (err != REG_NOERROR)) { re_node_set_free (&next_nodes); return err; } } cur_state = re_acquire_state_context (&err, dfa, &next_nodes, context); - if (BE (cur_state == NULL && err != REG_NOERROR, 0)) + if (__glibc_unlikely (cur_state == NULL && err != REG_NOERROR)) { re_node_set_free (&next_nodes); return err; @@ -2990,7 +2945,7 @@ { err = re_node_set_merge (&next_nodes, &mctx->state_log[str_idx + 1]->nodes); - if (BE (err != REG_NOERROR, 0)) + if (__glibc_unlikely (err != REG_NOERROR)) { re_node_set_free (&next_nodes); return err; @@ -3001,7 +2956,7 @@ err = check_arrival_add_next_nodes (mctx, str_idx, &cur_state->non_eps_nodes, &next_nodes); - if (BE (err != REG_NOERROR, 0)) + if (__glibc_unlikely (err != REG_NOERROR)) { re_node_set_free (&next_nodes); return err; @@ -3011,14 +2966,14 @@ if (next_nodes.nelem) { err = check_arrival_expand_ecl (dfa, &next_nodes, subexp_num, type); - if (BE (err != REG_NOERROR, 0)) + if (__glibc_unlikely (err != REG_NOERROR)) { re_node_set_free (&next_nodes); return err; } err = expand_bkref_cache (mctx, &next_nodes, str_idx, subexp_num, type); - if (BE (err != REG_NOERROR, 0)) + if (__glibc_unlikely (err != REG_NOERROR)) { re_node_set_free (&next_nodes); return err; @@ -3026,7 +2981,7 @@ } context = re_string_context_at (&mctx->input, str_idx - 1, mctx->eflags); cur_state = re_acquire_state_context (&err, dfa, &next_nodes, context); - if (BE (cur_state == NULL && err != REG_NOERROR, 0)) + if (__glibc_unlikely (cur_state == NULL && err != REG_NOERROR)) { re_node_set_free (&next_nodes); return err; @@ -3059,7 +3014,7 @@ Can't we unify them? */ static reg_errcode_t -internal_function __attribute_warn_unused_result__ +__attribute_warn_unused_result__ check_arrival_add_next_nodes (re_match_context_t *mctx, Idx str_idx, re_node_set *cur_nodes, re_node_set *next_nodes) { @@ -3095,22 +3050,22 @@ if (dest_state) { err = re_node_set_merge (&union_set, &dest_state->nodes); - if (BE (err != REG_NOERROR, 0)) + if (__glibc_unlikely (err != REG_NOERROR)) { re_node_set_free (&union_set); return err; } } ok = re_node_set_insert (&union_set, next_node); - if (BE (! ok, 0)) + if (__glibc_unlikely (! ok)) { re_node_set_free (&union_set); return REG_ESPACE; } mctx->state_log[next_idx] = re_acquire_state (&err, dfa, &union_set); - if (BE (mctx->state_log[next_idx] == NULL - && err != REG_NOERROR, 0)) + if (__glibc_unlikely (mctx->state_log[next_idx] == NULL + && err != REG_NOERROR)) { re_node_set_free (&union_set); return err; @@ -3122,7 +3077,7 @@ || check_node_accept (mctx, dfa->nodes + cur_node, str_idx)) { ok = re_node_set_insert (next_nodes, dfa->nexts[cur_node]); - if (BE (! ok, 0)) + if (__glibc_unlikely (! ok)) { re_node_set_free (&union_set); return REG_ESPACE; @@ -3140,7 +3095,6 @@ */ static reg_errcode_t -internal_function check_arrival_expand_ecl (const re_dfa_t *dfa, re_node_set *cur_nodes, Idx ex_subexp, int type) { @@ -3151,7 +3105,7 @@ assert (cur_nodes->nelem); #endif err = re_node_set_alloc (&new_nodes, cur_nodes->nelem); - if (BE (err != REG_NOERROR, 0)) + if (__glibc_unlikely (err != REG_NOERROR)) return err; /* Create a new node set NEW_NODES with the nodes which are epsilon closures of the node in CUR_NODES. */ @@ -3165,7 +3119,7 @@ { /* There are no problematic nodes, just merge them. */ err = re_node_set_merge (&new_nodes, eclosure); - if (BE (err != REG_NOERROR, 0)) + if (__glibc_unlikely (err != REG_NOERROR)) { re_node_set_free (&new_nodes); return err; @@ -3176,7 +3130,7 @@ /* There are problematic nodes, re-calculate incrementally. */ err = check_arrival_expand_ecl_sub (dfa, &new_nodes, cur_node, ex_subexp, type); - if (BE (err != REG_NOERROR, 0)) + if (__glibc_unlikely (err != REG_NOERROR)) { re_node_set_free (&new_nodes); return err; @@ -3193,7 +3147,7 @@ problematic append it to DST_NODES. */ static reg_errcode_t -internal_function __attribute_warn_unused_result__ +__attribute_warn_unused_result__ check_arrival_expand_ecl_sub (const re_dfa_t *dfa, re_node_set *dst_nodes, Idx target, Idx ex_subexp, int type) { @@ -3208,13 +3162,13 @@ if (type == OP_CLOSE_SUBEXP) { ok = re_node_set_insert (dst_nodes, cur_node); - if (BE (! ok, 0)) + if (__glibc_unlikely (! ok)) return REG_ESPACE; } break; } ok = re_node_set_insert (dst_nodes, cur_node); - if (BE (! ok, 0)) + if (__glibc_unlikely (! ok)) return REG_ESPACE; if (dfa->edests[cur_node].nelem == 0) break; @@ -3224,7 +3178,7 @@ err = check_arrival_expand_ecl_sub (dfa, dst_nodes, dfa->edests[cur_node].elems[1], ex_subexp, type); - if (BE (err != REG_NOERROR, 0)) + if (__glibc_unlikely (err != REG_NOERROR)) return err; } cur_node = dfa->edests[cur_node].elems[0]; @@ -3238,7 +3192,7 @@ in MCTX->BKREF_ENTS. */ static reg_errcode_t -internal_function __attribute_warn_unused_result__ +__attribute_warn_unused_result__ expand_bkref_cache (re_match_context_t *mctx, re_node_set *cur_nodes, Idx cur_str, Idx subexp_num, int type) { @@ -3276,8 +3230,8 @@ err2 = check_arrival_expand_ecl (dfa, &new_dests, subexp_num, type); err3 = re_node_set_merge (cur_nodes, &new_dests); re_node_set_free (&new_dests); - if (BE (err != REG_NOERROR || err2 != REG_NOERROR - || err3 != REG_NOERROR, 0)) + if (__glibc_unlikely (err != REG_NOERROR || err2 != REG_NOERROR + || err3 != REG_NOERROR)) { err = (err != REG_NOERROR ? err : (err2 != REG_NOERROR ? err2 : err3)); @@ -3299,7 +3253,7 @@ err = re_node_set_init_copy (&union_set, &mctx->state_log[to_idx]->nodes); ok = re_node_set_insert (&union_set, next_node); - if (BE (err != REG_NOERROR || ! ok, 0)) + if (__glibc_unlikely (err != REG_NOERROR || ! ok)) { re_node_set_free (&union_set); err = err != REG_NOERROR ? err : REG_ESPACE; @@ -3309,13 +3263,13 @@ else { err = re_node_set_init_1 (&union_set, next_node); - if (BE (err != REG_NOERROR, 0)) + if (__glibc_unlikely (err != REG_NOERROR)) return err; } mctx->state_log[to_idx] = re_acquire_state (&err, dfa, &union_set); re_node_set_free (&union_set); - if (BE (mctx->state_log[to_idx] == NULL - && err != REG_NOERROR, 0)) + if (__glibc_unlikely (mctx->state_log[to_idx] == NULL + && err != REG_NOERROR)) return err; } } @@ -3327,7 +3281,6 @@ Return true if successful. */ static bool -internal_function build_trtable (const re_dfa_t *dfa, re_dfastate_t *state) { reg_errcode_t err; @@ -3359,7 +3312,7 @@ else { dests_alloc = re_malloc (struct dests_alloc, 1); - if (BE (dests_alloc == NULL, 0)) + if (__glibc_unlikely (dests_alloc == NULL)) return false; dests_node_malloced = true; } @@ -3372,16 +3325,16 @@ /* At first, group all nodes belonging to 'state' into several destinations. */ ndests = group_nodes_into_DFAstates (dfa, state, dests_node, dests_ch); - if (BE (ndests <= 0, 0)) + if (__glibc_unlikely (ndests <= 0)) { if (dests_node_malloced) - free (dests_alloc); + re_free (dests_alloc); /* Return false in case of an error, true otherwise. */ if (ndests == 0) { state->trtable = (re_dfastate_t **) calloc (sizeof (re_dfastate_t *), SBC_MAX); - if (BE (state->trtable == NULL, 0)) + if (__glibc_unlikely (state->trtable == NULL)) return false; return true; } @@ -3389,14 +3342,14 @@ } err = re_node_set_alloc (&follows, ndests + 1); - if (BE (err != REG_NOERROR, 0)) + if (__glibc_unlikely (err != REG_NOERROR)) goto out_free; /* Avoid arithmetic overflow in size calculation. */ - if (BE ((((SIZE_MAX - (sizeof (re_node_set) + sizeof (bitset_t)) * SBC_MAX) - / (3 * sizeof (re_dfastate_t *))) - < ndests), - 0)) + size_t ndests_max + = ((SIZE_MAX - (sizeof (re_node_set) + sizeof (bitset_t)) * SBC_MAX) + / (3 * sizeof (re_dfastate_t *))); + if (__glibc_unlikely (ndests_max < ndests)) goto out_free; if (__libc_use_alloca ((sizeof (re_node_set) + sizeof (bitset_t)) * SBC_MAX @@ -3405,18 +3358,17 @@ alloca (ndests * 3 * sizeof (re_dfastate_t *)); else { - dest_states = (re_dfastate_t **) - malloc (ndests * 3 * sizeof (re_dfastate_t *)); - if (BE (dest_states == NULL, 0)) + dest_states = re_malloc (re_dfastate_t *, ndests * 3); + if (__glibc_unlikely (dest_states == NULL)) { out_free: if (dest_states_malloced) - free (dest_states); + re_free (dest_states); re_node_set_free (&follows); for (i = 0; i < ndests; ++i) re_node_set_free (dests_node + i); if (dests_node_malloced) - free (dests_alloc); + re_free (dests_alloc); return false; } dest_states_malloced = true; @@ -3437,12 +3389,12 @@ if (next_node != -1) { err = re_node_set_merge (&follows, dfa->eclosures + next_node); - if (BE (err != REG_NOERROR, 0)) + if (__glibc_unlikely (err != REG_NOERROR)) goto out_free; } } dest_states[i] = re_acquire_state_context (&err, dfa, &follows, 0); - if (BE (dest_states[i] == NULL && err != REG_NOERROR, 0)) + if (__glibc_unlikely (dest_states[i] == NULL && err != REG_NOERROR)) goto out_free; /* If the new state has context constraint, build appropriate states for these contexts. */ @@ -3450,7 +3402,8 @@ { dest_states_word[i] = re_acquire_state_context (&err, dfa, &follows, CONTEXT_WORD); - if (BE (dest_states_word[i] == NULL && err != REG_NOERROR, 0)) + if (__glibc_unlikely (dest_states_word[i] == NULL + && err != REG_NOERROR)) goto out_free; if (dest_states[i] != dest_states_word[i] && dfa->mb_cur_max > 1) @@ -3458,7 +3411,7 @@ dest_states_nl[i] = re_acquire_state_context (&err, dfa, &follows, CONTEXT_NEWLINE); - if (BE (dest_states_nl[i] == NULL && err != REG_NOERROR, 0)) + if (__glibc_unlikely (dest_states_nl[i] == NULL && err != REG_NOERROR)) goto out_free; } else @@ -3469,7 +3422,7 @@ bitset_merge (acceptable, dests_ch[i]); } - if (!BE (need_word_trtable, 0)) + if (!__glibc_unlikely (need_word_trtable)) { /* We don't care about whether the following character is a word character, or we are in a single-byte character set so we can @@ -3477,7 +3430,7 @@ 256-entry transition table. */ trtable = state->trtable = (re_dfastate_t **) calloc (sizeof (re_dfastate_t *), SBC_MAX); - if (BE (trtable == NULL, 0)) + if (__glibc_unlikely (trtable == NULL)) goto out_free; /* For all characters ch...: */ @@ -3485,7 +3438,7 @@ for (ch = i * BITSET_WORD_BITS, elem = acceptable[i], mask = 1; elem; mask <<= 1, elem >>= 1, ++ch) - if (BE (elem & 1, 0)) + if (__glibc_unlikely (elem & 1)) { /* There must be exactly one destination which accepts character ch. See group_nodes_into_DFAstates. */ @@ -3508,7 +3461,7 @@ starting at trtable[SBC_MAX]. */ trtable = state->word_trtable = (re_dfastate_t **) calloc (sizeof (re_dfastate_t *), 2 * SBC_MAX); - if (BE (trtable == NULL, 0)) + if (__glibc_unlikely (trtable == NULL)) goto out_free; /* For all characters ch...: */ @@ -3516,7 +3469,7 @@ for (ch = i * BITSET_WORD_BITS, elem = acceptable[i], mask = 1; elem; mask <<= 1, elem >>= 1, ++ch) - if (BE (elem & 1, 0)) + if (__glibc_unlikely (elem & 1)) { /* There must be exactly one destination which accepts character ch. See group_nodes_into_DFAstates. */ @@ -3547,14 +3500,14 @@ } if (dest_states_malloced) - free (dest_states); + re_free (dest_states); re_node_set_free (&follows); for (i = 0; i < ndests; ++i) re_node_set_free (dests_node + i); if (dests_node_malloced) - free (dests_alloc); + re_free (dests_alloc); return true; } @@ -3565,7 +3518,6 @@ to DEST_CH[i]. This function return the number of destinations. */ static Idx -internal_function group_nodes_into_DFAstates (const re_dfa_t *dfa, const re_dfastate_t *state, re_node_set *dests_node, bitset_t *dests_ch) { @@ -3716,14 +3668,14 @@ bitset_copy (dests_ch[ndests], remains); bitset_copy (dests_ch[j], intersec); err = re_node_set_init_copy (dests_node + ndests, &dests_node[j]); - if (BE (err != REG_NOERROR, 0)) + if (__glibc_unlikely (err != REG_NOERROR)) goto error_return; ++ndests; } /* Put the position in the current group. */ ok = re_node_set_insert (&dests_node[j], cur_nodes->elems[i]); - if (BE (! ok, 0)) + if (__glibc_unlikely (! ok)) goto error_return; /* If all characters are consumed, go to next node. */ @@ -3735,7 +3687,7 @@ { bitset_copy (dests_ch[ndests], accepts); err = re_node_set_init_1 (dests_node + ndests, cur_nodes->elems[i]); - if (BE (err != REG_NOERROR, 0)) + if (__glibc_unlikely (err != REG_NOERROR)) goto error_return; ++ndests; bitset_empty (accepts); @@ -3762,7 +3714,6 @@ # endif static int -internal_function check_node_accept_bytes (const re_dfa_t *dfa, Idx node_idx, const re_string_t *input, Idx str_idx) { @@ -3770,10 +3721,10 @@ int char_len, elem_len; Idx i; - if (BE (node->type == OP_UTF8_PERIOD, 0)) + if (__glibc_unlikely (node->type == OP_UTF8_PERIOD)) { unsigned char c = re_string_byte_at (input, str_idx), d; - if (BE (c < 0xc2, 1)) + if (__glibc_likely (c < 0xc2)) return 0; if (str_idx + 2 > input->len) @@ -3937,30 +3888,27 @@ indirect = (const int32_t *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_INDIRECTMB); int32_t idx = findidx (table, indirect, extra, &cp, elem_len); + int32_t rule = idx >> 24; + idx &= 0xffffff; if (idx > 0) - for (i = 0; i < cset->nequiv_classes; ++i) - { - int32_t equiv_class_idx = cset->equiv_classes[i]; - size_t weight_len = weights[idx & 0xffffff]; - if (weight_len == weights[equiv_class_idx & 0xffffff] - && (idx >> 24) == (equiv_class_idx >> 24)) - { - Idx cnt = 0; - - idx &= 0xffffff; - equiv_class_idx &= 0xffffff; - - while (cnt <= weight_len - && (weights[equiv_class_idx + 1 + cnt] - == weights[idx + 1 + cnt])) - ++cnt; - if (cnt > weight_len) - { - match_len = elem_len; - goto check_node_accept_bytes_match; - } - } - } + { + size_t weight_len = weights[idx]; + for (i = 0; i < cset->nequiv_classes; ++i) + { + int32_t equiv_class_idx = cset->equiv_classes[i]; + int32_t equiv_class_rule = equiv_class_idx >> 24; + equiv_class_idx &= 0xffffff; + if (weights[equiv_class_idx] == weight_len + && equiv_class_rule == rule + && memcmp (weights + idx + 1, + weights + equiv_class_idx + 1, + weight_len) == 0) + { + match_len = elem_len; + goto check_node_accept_bytes_match; + } + } + } } } else @@ -3992,7 +3940,6 @@ # ifdef _LIBC static unsigned int -internal_function find_collation_sequence_value (const unsigned char *mbs, size_t mbs_len) { uint32_t nrules = _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES); @@ -4056,7 +4003,6 @@ byte of the INPUT. */ static bool -internal_function check_node_accept (const re_match_context_t *mctx, const re_token_t *node, Idx idx) { @@ -4078,7 +4024,7 @@ case OP_UTF8_PERIOD: if (ch >= ASCII_CHARS) return false; - /* FALLTHROUGH */ + FALLTHROUGH; #endif case OP_PERIOD: if ((ch == '\n' && !(mctx->dfa->syntax & RE_DOT_NEWLINE)) @@ -4106,22 +4052,22 @@ /* Extend the buffers, if the buffers have run out. */ static reg_errcode_t -internal_function __attribute_warn_unused_result__ +__attribute_warn_unused_result__ extend_buffers (re_match_context_t *mctx, int min_len) { reg_errcode_t ret; re_string_t *pstr = &mctx->input; /* Avoid overflow. */ - if (BE (MIN (IDX_MAX, SIZE_MAX / sizeof (re_dfastate_t *)) / 2 - <= pstr->bufs_len, 0)) + if (__glibc_unlikely (MIN (IDX_MAX, SIZE_MAX / sizeof (re_dfastate_t *)) / 2 + <= pstr->bufs_len)) return REG_ESPACE; /* Double the lengths of the buffers, but allocate at least MIN_LEN. */ ret = re_string_realloc_buffers (pstr, MAX (min_len, MIN (pstr->len, pstr->bufs_len * 2))); - if (BE (ret != REG_NOERROR, 0)) + if (__glibc_unlikely (ret != REG_NOERROR)) return ret; if (mctx->state_log != NULL) @@ -4132,7 +4078,7 @@ does not have the right size. */ re_dfastate_t **new_array = re_realloc (mctx->state_log, re_dfastate_t *, pstr->bufs_len + 1); - if (BE (new_array == NULL, 0)) + if (__glibc_unlikely (new_array == NULL)) return REG_ESPACE; mctx->state_log = new_array; } @@ -4144,7 +4090,7 @@ if (pstr->mb_cur_max > 1) { ret = build_wcs_upper_buffer (pstr); - if (BE (ret != REG_NOERROR, 0)) + if (__glibc_unlikely (ret != REG_NOERROR)) return ret; } else @@ -4172,7 +4118,7 @@ /* Initialize MCTX. */ static reg_errcode_t -internal_function __attribute_warn_unused_result__ +__attribute_warn_unused_result__ match_ctx_init (re_match_context_t *mctx, int eflags, Idx n) { mctx->eflags = eflags; @@ -4183,12 +4129,12 @@ size_t max_object_size = MAX (sizeof (struct re_backref_cache_entry), sizeof (re_sub_match_top_t *)); - if (BE (MIN (IDX_MAX, SIZE_MAX / max_object_size) < n, 0)) + if (__glibc_unlikely (MIN (IDX_MAX, SIZE_MAX / max_object_size) < n)) return REG_ESPACE; mctx->bkref_ents = re_malloc (struct re_backref_cache_entry, n); mctx->sub_tops = re_malloc (re_sub_match_top_t *, n); - if (BE (mctx->bkref_ents == NULL || mctx->sub_tops == NULL, 0)) + if (__glibc_unlikely (mctx->bkref_ents == NULL || mctx->sub_tops == NULL)) return REG_ESPACE; } /* Already zero-ed by the caller. @@ -4207,7 +4153,6 @@ of the input, or changes the input string. */ static void -internal_function match_ctx_clean (re_match_context_t *mctx) { Idx st_idx; @@ -4227,7 +4172,7 @@ re_free (top->path->array); re_free (top->path); } - free (top); + re_free (top); } mctx->nsub_tops = 0; @@ -4237,7 +4182,6 @@ /* Free all the memory associated with MCTX. */ static void -internal_function match_ctx_free (re_match_context_t *mctx) { /* First, free all the memory associated with MCTX->SUB_TOPS. */ @@ -4252,7 +4196,7 @@ */ static reg_errcode_t -internal_function __attribute_warn_unused_result__ +__attribute_warn_unused_result__ match_ctx_add_entry (re_match_context_t *mctx, Idx node, Idx str_idx, Idx from, Idx to) { @@ -4261,7 +4205,7 @@ struct re_backref_cache_entry* new_entry; new_entry = re_realloc (mctx->bkref_ents, struct re_backref_cache_entry, mctx->abkref_ents * 2); - if (BE (new_entry == NULL, 0)) + if (__glibc_unlikely (new_entry == NULL)) { re_free (mctx->bkref_ents); return REG_ESPACE; @@ -4301,7 +4245,6 @@ found. Note that MCTX->BKREF_ENTS is already sorted by MCTX->STR_IDX. */ static Idx -internal_function search_cur_bkref_entry (const re_match_context_t *mctx, Idx str_idx) { Idx left, right, mid, last; @@ -4324,26 +4267,26 @@ at STR_IDX. */ static reg_errcode_t -internal_function __attribute_warn_unused_result__ +__attribute_warn_unused_result__ match_ctx_add_subtop (re_match_context_t *mctx, Idx node, Idx str_idx) { #ifdef DEBUG assert (mctx->sub_tops != NULL); assert (mctx->asub_tops > 0); #endif - if (BE (mctx->nsub_tops == mctx->asub_tops, 0)) + if (__glibc_unlikely (mctx->nsub_tops == mctx->asub_tops)) { Idx new_asub_tops = mctx->asub_tops * 2; re_sub_match_top_t **new_array = re_realloc (mctx->sub_tops, re_sub_match_top_t *, new_asub_tops); - if (BE (new_array == NULL, 0)) + if (__glibc_unlikely (new_array == NULL)) return REG_ESPACE; mctx->sub_tops = new_array; mctx->asub_tops = new_asub_tops; } mctx->sub_tops[mctx->nsub_tops] = calloc (1, sizeof (re_sub_match_top_t)); - if (BE (mctx->sub_tops[mctx->nsub_tops] == NULL, 0)) + if (__glibc_unlikely (mctx->sub_tops[mctx->nsub_tops] == NULL)) return REG_ESPACE; mctx->sub_tops[mctx->nsub_tops]->node = node; mctx->sub_tops[mctx->nsub_tops++]->str_idx = str_idx; @@ -4354,23 +4297,22 @@ at STR_IDX, whose corresponding OP_OPEN_SUBEXP is SUB_TOP. */ static re_sub_match_last_t * -internal_function match_ctx_add_sublast (re_sub_match_top_t *subtop, Idx node, Idx str_idx) { re_sub_match_last_t *new_entry; - if (BE (subtop->nlasts == subtop->alasts, 0)) + if (__glibc_unlikely (subtop->nlasts == subtop->alasts)) { Idx new_alasts = 2 * subtop->alasts + 1; re_sub_match_last_t **new_array = re_realloc (subtop->lasts, re_sub_match_last_t *, new_alasts); - if (BE (new_array == NULL, 0)) + if (__glibc_unlikely (new_array == NULL)) return NULL; subtop->lasts = new_array; subtop->alasts = new_alasts; } new_entry = calloc (1, sizeof (re_sub_match_last_t)); - if (BE (new_entry != NULL, 1)) + if (__glibc_likely (new_entry != NULL)) { subtop->lasts[subtop->nlasts] = new_entry; new_entry->node = node; @@ -4381,7 +4323,6 @@ } static void -internal_function sift_ctx_init (re_sift_context_t *sctx, re_dfastate_t **sifted_sts, re_dfastate_t **limited_sts, Idx last_node, Idx last_str_idx) { diff -Nru grep-3.1/lib/regex.h grep-3.3/lib/regex.h --- grep-3.1/lib/regex.h 2017-01-01 11:25:48.000000000 +0000 +++ grep-3.3/lib/regex.h 2018-09-19 05:05:05.000000000 +0000 @@ -1,7 +1,6 @@ /* Definitions for data structures and routines for the regular expression library. - Copyright (C) 1985, 1989-1993, 1995-1998, 2000-2003, 2005-2017 Free Software - Foundation, Inc. + Copyright (C) 1985, 1989-2018 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 @@ -16,7 +15,7 @@ You should have received a copy of the GNU General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _REGEX_H #define _REGEX_H 1 @@ -608,28 +607,28 @@ # endif #endif -/* GCC 2.95 and later have "__restrict"; C99 compilers have +/* For plain 'restrict', use glibc's __restrict if defined. + Otherwise, GCC 2.95 and later have "__restrict"; C99 compilers have "restrict", and "configure" may have defined "restrict". Other compilers use __restrict, __restrict__, and _Restrict, and 'configure' might #define 'restrict' to those words, so pick a different name. */ #ifndef _Restrict_ -# if 199901L <= __STDC_VERSION__ -# define _Restrict_ restrict -# elif 2 < __GNUC__ || (2 == __GNUC__ && 95 <= __GNUC_MINOR__) +# if defined __restrict || 2 < __GNUC__ + (95 <= __GNUC_MINOR__) # define _Restrict_ __restrict +# elif 199901L <= __STDC_VERSION__ || defined restrict +# define _Restrict_ restrict # else # define _Restrict_ # endif #endif -/* gcc 3.1 and up support the [restrict] syntax. Don't trust - sys/cdefs.h's definition of __restrict_arr, though, as it - mishandles gcc -ansi -pedantic. */ +/* For [restrict], use glibc's __restrict_arr if available. + Otherwise, GCC 3.1 (not in C++ mode) and C99 support [restrict]. */ #ifndef _Restrict_arr_ -# if ((199901L <= __STDC_VERSION__ \ - || ((3 < __GNUC__ || (3 == __GNUC__ && 1 <= __GNUC_MINOR__)) \ - && !defined __STRICT_ANSI__)) \ - && !defined __GNUG__) +# ifdef __restrict_arr +# define _Restrict_arr_ __restrict_arr +# elif ((199901L <= __STDC_VERSION__ || 3 < __GNUC__ + (1 <= __GNUC_MINOR__)) \ + && !defined __GNUG__) # define _Restrict_arr_ _Restrict_ # else # define _Restrict_arr_ diff -Nru grep-3.1/lib/regex_internal.c grep-3.3/lib/regex_internal.c --- grep-3.1/lib/regex_internal.c 2017-01-01 11:25:48.000000000 +0000 +++ grep-3.3/lib/regex_internal.c 2018-10-16 23:22:23.000000000 +0000 @@ -1,5 +1,5 @@ /* Extended regular expression matching and search library. - Copyright (C) 2002-2017 Free Software Foundation, Inc. + Copyright (C) 2002-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Isamu Hasegawa . @@ -15,19 +15,29 @@ You should have received a copy of the GNU General Public License along with the GNU C Library; if not, see - . */ + . */ static void re_string_construct_common (const char *str, Idx len, re_string_t *pstr, RE_TRANSLATE_TYPE trans, bool icase, - const re_dfa_t *dfa) internal_function; + const re_dfa_t *dfa); static re_dfastate_t *create_ci_newstate (const re_dfa_t *dfa, const re_node_set *nodes, - re_hashval_t hash) internal_function; + re_hashval_t hash); static re_dfastate_t *create_cd_newstate (const re_dfa_t *dfa, const re_node_set *nodes, unsigned int context, - re_hashval_t hash) internal_function; + re_hashval_t hash); +static reg_errcode_t re_string_realloc_buffers (re_string_t *pstr, + Idx new_buf_len); +#ifdef RE_ENABLE_I18N +static void build_wcs_buffer (re_string_t *pstr); +static reg_errcode_t build_wcs_upper_buffer (re_string_t *pstr); +#endif /* RE_ENABLE_I18N */ +static void build_upper_buffer (re_string_t *pstr); +static void re_string_translate_buffer (re_string_t *pstr); +static unsigned int re_string_context_at (const re_string_t *input, Idx idx, + int eflags) __attribute__ ((pure)); /* Functions for string operation. */ @@ -35,7 +45,7 @@ re_string_reconstruct before using the object. */ static reg_errcode_t -internal_function __attribute_warn_unused_result__ +__attribute_warn_unused_result__ re_string_allocate (re_string_t *pstr, const char *str, Idx len, Idx init_len, RE_TRANSLATE_TYPE trans, bool icase, const re_dfa_t *dfa) { @@ -49,7 +59,7 @@ re_string_construct_common (str, len, pstr, trans, icase, dfa); ret = re_string_realloc_buffers (pstr, init_buf_len); - if (BE (ret != REG_NOERROR, 0)) + if (__glibc_unlikely (ret != REG_NOERROR)) return ret; pstr->word_char = dfa->word_char; @@ -63,7 +73,7 @@ /* This function allocate the buffers, and initialize them. */ static reg_errcode_t -internal_function __attribute_warn_unused_result__ +__attribute_warn_unused_result__ re_string_construct (re_string_t *pstr, const char *str, Idx len, RE_TRANSLATE_TYPE trans, bool icase, const re_dfa_t *dfa) { @@ -74,7 +84,7 @@ if (len > 0) { ret = re_string_realloc_buffers (pstr, len + 1); - if (BE (ret != REG_NOERROR, 0)) + if (__glibc_unlikely (ret != REG_NOERROR)) return ret; } pstr->mbs = pstr->mbs_allocated ? pstr->mbs : (unsigned char *) str; @@ -87,14 +97,14 @@ while (1) { ret = build_wcs_upper_buffer (pstr); - if (BE (ret != REG_NOERROR, 0)) + if (__glibc_unlikely (ret != REG_NOERROR)) return ret; if (pstr->valid_raw_len >= len) break; if (pstr->bufs_len > pstr->valid_len + dfa->mb_cur_max) break; ret = re_string_realloc_buffers (pstr, pstr->bufs_len * 2); - if (BE (ret != REG_NOERROR, 0)) + if (__glibc_unlikely (ret != REG_NOERROR)) return ret; } } @@ -126,7 +136,7 @@ /* Helper functions for re_string_allocate, and re_string_construct. */ static reg_errcode_t -internal_function __attribute_warn_unused_result__ +__attribute_warn_unused_result__ re_string_realloc_buffers (re_string_t *pstr, Idx new_buf_len) { #ifdef RE_ENABLE_I18N @@ -136,17 +146,18 @@ /* Avoid overflow in realloc. */ const size_t max_object_size = MAX (sizeof (wint_t), sizeof (Idx)); - if (BE (MIN (IDX_MAX, SIZE_MAX / max_object_size) < new_buf_len, 0)) + if (__glibc_unlikely (MIN (IDX_MAX, SIZE_MAX / max_object_size) + < new_buf_len)) return REG_ESPACE; new_wcs = re_realloc (pstr->wcs, wint_t, new_buf_len); - if (BE (new_wcs == NULL, 0)) + if (__glibc_unlikely (new_wcs == NULL)) return REG_ESPACE; pstr->wcs = new_wcs; if (pstr->offsets != NULL) { Idx *new_offsets = re_realloc (pstr->offsets, Idx, new_buf_len); - if (BE (new_offsets == NULL, 0)) + if (__glibc_unlikely (new_offsets == NULL)) return REG_ESPACE; pstr->offsets = new_offsets; } @@ -156,7 +167,7 @@ { unsigned char *new_mbs = re_realloc (pstr->mbs, unsigned char, new_buf_len); - if (BE (new_mbs == NULL, 0)) + if (__glibc_unlikely (new_mbs == NULL)) return REG_ESPACE; pstr->mbs = new_mbs; } @@ -166,7 +177,6 @@ static void -internal_function re_string_construct_common (const char *str, Idx len, re_string_t *pstr, RE_TRANSLATE_TYPE trans, bool icase, const re_dfa_t *dfa) @@ -198,7 +208,6 @@ built and starts from PSTR->VALID_LEN. */ static void -internal_function build_wcs_buffer (re_string_t *pstr) { #ifdef _LIBC @@ -222,7 +231,7 @@ remain_len = end_idx - byte_idx; prev_st = pstr->cur_state; /* Apply the translation if we need. */ - if (BE (pstr->trans != NULL, 0)) + if (__glibc_unlikely (pstr->trans != NULL)) { int i, ch; @@ -236,17 +245,18 @@ else p = (const char *) pstr->raw_mbs + pstr->raw_mbs_idx + byte_idx; mbclen = __mbrtowc (&wc, p, remain_len, &pstr->cur_state); - if (BE (mbclen == (size_t) -1 || mbclen == 0 - || (mbclen == (size_t) -2 && pstr->bufs_len >= pstr->len), 0)) + if (__glibc_unlikely (mbclen == (size_t) -1 || mbclen == 0 + || (mbclen == (size_t) -2 + && pstr->bufs_len >= pstr->len))) { /* We treat these cases as a singlebyte character. */ mbclen = 1; wc = (wchar_t) pstr->raw_mbs[pstr->raw_mbs_idx + byte_idx]; - if (BE (pstr->trans != NULL, 0)) + if (__glibc_unlikely (pstr->trans != NULL)) wc = pstr->trans[wc]; pstr->cur_state = prev_st; } - else if (BE (mbclen == (size_t) -2, 0)) + else if (__glibc_unlikely (mbclen == (size_t) -2)) { /* The buffer doesn't have enough space, finish to build. */ pstr->cur_state = prev_st; @@ -267,7 +277,7 @@ but for REG_ICASE. */ static reg_errcode_t -internal_function __attribute_warn_unused_result__ +__attribute_warn_unused_result__ build_wcs_upper_buffer (re_string_t *pstr) { mbstate_t prev_st; @@ -309,7 +319,7 @@ mbclen = __mbrtowc (&wc, ((const char *) pstr->raw_mbs + pstr->raw_mbs_idx + byte_idx), remain_len, &pstr->cur_state); - if (BE (mbclen < (size_t) -2, 1)) + if (__glibc_likely (0 < mbclen && mbclen < (size_t) -2)) { wchar_t wcu = __towupper (wc); if (wcu != wc) @@ -317,7 +327,7 @@ size_t mbcdlen; mbcdlen = __wcrtomb (buf, wcu, &prev_st); - if (BE (mbclen == mbcdlen, 1)) + if (__glibc_likely (mbclen == mbcdlen)) memcpy (pstr->mbs + byte_idx, buf, mbclen); else { @@ -342,7 +352,7 @@ pstr->mbs[byte_idx] = ch; /* And also cast it to wide char. */ pstr->wcs[byte_idx++] = (wchar_t) ch; - if (BE (mbclen == (size_t) -1, 0)) + if (__glibc_unlikely (mbclen == (size_t) -1)) pstr->cur_state = prev_st; } else @@ -364,7 +374,7 @@ offsets_needed: remain_len = end_idx - byte_idx; prev_st = pstr->cur_state; - if (BE (pstr->trans != NULL, 0)) + if (__glibc_unlikely (pstr->trans != NULL)) { int i, ch; @@ -378,15 +388,15 @@ else p = (const char *) pstr->raw_mbs + pstr->raw_mbs_idx + src_idx; mbclen = __mbrtowc (&wc, p, remain_len, &pstr->cur_state); - if (BE (mbclen < (size_t) -2, 1)) + if (__glibc_likely (0 < mbclen && mbclen < (size_t) -2)) { wchar_t wcu = __towupper (wc); if (wcu != wc) { size_t mbcdlen; - mbcdlen = wcrtomb ((char *) buf, wcu, &prev_st); - if (BE (mbclen == mbcdlen, 1)) + mbcdlen = __wcrtomb ((char *) buf, wcu, &prev_st); + if (__glibc_likely (mbclen == mbcdlen)) memcpy (pstr->mbs + byte_idx, buf, mbclen); else if (mbcdlen != (size_t) -1) { @@ -436,7 +446,7 @@ else memcpy (pstr->mbs + byte_idx, p, mbclen); - if (BE (pstr->offsets_needed != 0, 0)) + if (__glibc_unlikely (pstr->offsets_needed != 0)) { size_t i; for (i = 0; i < mbclen; ++i) @@ -455,17 +465,17 @@ /* It is an invalid character or '\0'. Just use the byte. */ int ch = pstr->raw_mbs[pstr->raw_mbs_idx + src_idx]; - if (BE (pstr->trans != NULL, 0)) + if (__glibc_unlikely (pstr->trans != NULL)) ch = pstr->trans [ch]; pstr->mbs[byte_idx] = ch; - if (BE (pstr->offsets_needed != 0, 0)) + if (__glibc_unlikely (pstr->offsets_needed != 0)) pstr->offsets[byte_idx] = src_idx; ++src_idx; /* And also cast it to wide char. */ pstr->wcs[byte_idx++] = (wchar_t) ch; - if (BE (mbclen == (size_t) -1, 0)) + if (__glibc_unlikely (mbclen == (size_t) -1)) pstr->cur_state = prev_st; } else @@ -484,7 +494,6 @@ Return the index. */ static Idx -internal_function re_string_skip_chars (re_string_t *pstr, Idx new_raw_idx, wint_t *last_wc) { mbstate_t prev_st; @@ -501,7 +510,8 @@ prev_st = pstr->cur_state; mbclen = __mbrtowc (&wc2, (const char *) pstr->raw_mbs + rawbuf_idx, remain_len, &pstr->cur_state); - if (BE (mbclen == (size_t) -2 || mbclen == (size_t) -1 || mbclen == 0, 0)) + if (__glibc_unlikely (mbclen == (size_t) -2 || mbclen == (size_t) -1 + || mbclen == 0)) { /* We treat these cases as a single byte character. */ if (mbclen == 0 || remain_len == 0) @@ -525,7 +535,6 @@ This function is used in case of REG_ICASE. */ static void -internal_function build_upper_buffer (re_string_t *pstr) { Idx char_idx, end_idx; @@ -534,7 +543,7 @@ for (char_idx = pstr->valid_len; char_idx < end_idx; ++char_idx) { int ch = pstr->raw_mbs[pstr->raw_mbs_idx + char_idx]; - if (BE (pstr->trans != NULL, 0)) + if (__glibc_unlikely (pstr->trans != NULL)) ch = pstr->trans[ch]; pstr->mbs[char_idx] = toupper (ch); } @@ -545,7 +554,6 @@ /* Apply TRANS to the buffer in PSTR. */ static void -internal_function re_string_translate_buffer (re_string_t *pstr) { Idx buf_idx, end_idx; @@ -566,12 +574,12 @@ convert to upper case in case of REG_ICASE, apply translation. */ static reg_errcode_t -internal_function __attribute_warn_unused_result__ +__attribute_warn_unused_result__ re_string_reconstruct (re_string_t *pstr, Idx idx, int eflags) { Idx offset; - if (BE (pstr->raw_mbs_idx <= idx, 0)) + if (__glibc_unlikely (pstr->raw_mbs_idx <= idx)) offset = idx - pstr->raw_mbs_idx; else { @@ -593,14 +601,14 @@ offset = idx; } - if (BE (offset != 0, 1)) + if (__glibc_likely (offset != 0)) { /* Should the already checked characters be kept? */ - if (BE (offset < pstr->valid_raw_len, 1)) + if (__glibc_likely (offset < pstr->valid_raw_len)) { /* Yes, move them to the front of the buffer. */ #ifdef RE_ENABLE_I18N - if (BE (pstr->offsets_needed, 0)) + if (__glibc_unlikely (pstr->offsets_needed)) { Idx low = 0, high = pstr->valid_len, mid; do @@ -672,7 +680,7 @@ memmove (pstr->wcs, pstr->wcs + offset, (pstr->valid_len - offset) * sizeof (wint_t)); #endif /* RE_ENABLE_I18N */ - if (BE (pstr->mbs_allocated, 0)) + if (__glibc_unlikely (pstr->mbs_allocated)) memmove (pstr->mbs, pstr->mbs + offset, pstr->valid_len - offset); pstr->valid_len -= offset; @@ -688,7 +696,7 @@ /* No, skip all characters until IDX. */ Idx prev_valid_len = pstr->valid_len; - if (BE (pstr->offsets_needed, 0)) + if (__glibc_unlikely (pstr->offsets_needed)) { pstr->len = pstr->raw_len - idx + offset; pstr->stop = pstr->raw_stop - idx + offset; @@ -716,7 +724,7 @@ #ifdef _LIBC /* We know the wchar_t encoding is UCS4, so for the simple case, ASCII characters, skip the conversion step. */ - if (isascii (*p) && BE (pstr->trans == NULL, 1)) + if (isascii (*p) && __glibc_likely (pstr->trans == NULL)) { memset (&pstr->cur_state, '\0', sizeof (mbstate_t)); /* pstr->valid_len = 0; */ @@ -734,7 +742,7 @@ size_t mbclen; const unsigned char *pp = p; - if (BE (pstr->trans != NULL, 0)) + if (__glibc_unlikely (pstr->trans != NULL)) { int i = mlen < 6 ? mlen : 6; while (--i >= 0) @@ -764,13 +772,13 @@ pstr->tip_context = re_string_context_at (pstr, prev_valid_len - 1, eflags); else - pstr->tip_context = ((BE (pstr->word_ops_used != 0, 0) + pstr->tip_context = ((__glibc_unlikely (pstr->word_ops_used != 0) && IS_WIDE_WORD_CHAR (wc)) ? CONTEXT_WORD : ((IS_WIDE_NEWLINE (wc) && pstr->newline_anchor) ? CONTEXT_NEWLINE : 0)); - if (BE (pstr->valid_len, 0)) + if (__glibc_unlikely (pstr->valid_len)) { for (wcs_idx = 0; wcs_idx < pstr->valid_len; ++wcs_idx) pstr->wcs[wcs_idx] = WEOF; @@ -792,7 +800,7 @@ ? CONTEXT_NEWLINE : 0)); } } - if (!BE (pstr->mbs_allocated, 0)) + if (!__glibc_unlikely (pstr->mbs_allocated)) pstr->mbs += offset; } pstr->raw_mbs_idx = idx; @@ -806,7 +814,7 @@ if (pstr->icase) { reg_errcode_t ret = build_wcs_upper_buffer (pstr); - if (BE (ret != REG_NOERROR, 0)) + if (__glibc_unlikely (ret != REG_NOERROR)) return ret; } else @@ -814,7 +822,7 @@ } else #endif /* RE_ENABLE_I18N */ - if (BE (pstr->mbs_allocated, 0)) + if (__glibc_unlikely (pstr->mbs_allocated)) { if (pstr->icase) build_upper_buffer (pstr); @@ -829,14 +837,14 @@ } static unsigned char -internal_function __attribute__ ((pure)) +__attribute__ ((pure)) re_string_peek_byte_case (const re_string_t *pstr, Idx idx) { int ch; Idx off; /* Handle the common (easiest) cases first. */ - if (BE (!pstr->mbs_allocated, 1)) + if (__glibc_likely (!pstr->mbs_allocated)) return re_string_peek_byte (pstr, idx); #ifdef RE_ENABLE_I18N @@ -866,10 +874,9 @@ } static unsigned char -internal_function re_string_fetch_byte_case (re_string_t *pstr) { - if (BE (!pstr->mbs_allocated, 1)) + if (__glibc_likely (!pstr->mbs_allocated)) return re_string_fetch_byte (pstr); #ifdef RE_ENABLE_I18N @@ -904,7 +911,6 @@ } static void -internal_function re_string_destruct (re_string_t *pstr) { #ifdef RE_ENABLE_I18N @@ -918,15 +924,14 @@ /* Return the context at IDX in INPUT. */ static unsigned int -internal_function re_string_context_at (const re_string_t *input, Idx idx, int eflags) { int c; - if (BE (idx < 0, 0)) + if (__glibc_unlikely (idx < 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; - if (BE (idx == input->len, 0)) + if (__glibc_unlikely (idx == input->len)) return ((eflags & REG_NOTEOL) ? CONTEXT_ENDBUF : CONTEXT_NEWLINE | CONTEXT_ENDBUF); #ifdef RE_ENABLE_I18N @@ -945,7 +950,8 @@ return input->tip_context; } wc = input->wcs[wc_idx]; - if (BE (input->word_ops_used != 0, 0) && IS_WIDE_WORD_CHAR (wc)) + if (__glibc_unlikely (input->word_ops_used != 0) + && IS_WIDE_WORD_CHAR (wc)) return CONTEXT_WORD; return (IS_WIDE_NEWLINE (wc) && input->newline_anchor ? CONTEXT_NEWLINE : 0); @@ -963,25 +969,26 @@ /* Functions for set operation. */ static reg_errcode_t -internal_function __attribute_warn_unused_result__ +__attribute_warn_unused_result__ re_node_set_alloc (re_node_set *set, Idx size) { set->alloc = size; set->nelem = 0; set->elems = re_malloc (Idx, size); - if (BE (set->elems == NULL, 0) && (MALLOC_0_IS_NONNULL || size != 0)) + if (__glibc_unlikely (set->elems == NULL) + && (MALLOC_0_IS_NONNULL || size != 0)) return REG_ESPACE; return REG_NOERROR; } static reg_errcode_t -internal_function __attribute_warn_unused_result__ +__attribute_warn_unused_result__ re_node_set_init_1 (re_node_set *set, Idx elem) { set->alloc = 1; set->nelem = 1; set->elems = re_malloc (Idx, 1); - if (BE (set->elems == NULL, 0)) + if (__glibc_unlikely (set->elems == NULL)) { set->alloc = set->nelem = 0; return REG_ESPACE; @@ -991,12 +998,12 @@ } static reg_errcode_t -internal_function __attribute_warn_unused_result__ +__attribute_warn_unused_result__ re_node_set_init_2 (re_node_set *set, Idx elem1, Idx elem2) { set->alloc = 2; set->elems = re_malloc (Idx, 2); - if (BE (set->elems == NULL, 0)) + if (__glibc_unlikely (set->elems == NULL)) return REG_ESPACE; if (elem1 == elem2) { @@ -1021,7 +1028,7 @@ } static reg_errcode_t -internal_function __attribute_warn_unused_result__ +__attribute_warn_unused_result__ re_node_set_init_copy (re_node_set *dest, const re_node_set *src) { dest->nelem = src->nelem; @@ -1029,7 +1036,7 @@ { dest->alloc = dest->nelem; dest->elems = re_malloc (Idx, dest->alloc); - if (BE (dest->elems == NULL, 0)) + if (__glibc_unlikely (dest->elems == NULL)) { dest->alloc = dest->nelem = 0; return REG_ESPACE; @@ -1046,7 +1053,7 @@ Note: We assume dest->elems is NULL, when dest->alloc is 0. */ static reg_errcode_t -internal_function __attribute_warn_unused_result__ +__attribute_warn_unused_result__ re_node_set_add_intersect (re_node_set *dest, const re_node_set *src1, const re_node_set *src2) { @@ -1060,7 +1067,7 @@ { Idx new_alloc = src1->nelem + src2->nelem + dest->alloc; Idx *new_elems = re_realloc (dest->elems, Idx, new_alloc); - if (BE (new_elems == NULL, 0)) + if (__glibc_unlikely (new_elems == NULL)) return REG_ESPACE; dest->elems = new_elems; dest->alloc = new_alloc; @@ -1137,7 +1144,7 @@ DEST. Return value indicate the error code or REG_NOERROR if succeeded. */ static reg_errcode_t -internal_function __attribute_warn_unused_result__ +__attribute_warn_unused_result__ re_node_set_init_union (re_node_set *dest, const re_node_set *src1, const re_node_set *src2) { @@ -1146,7 +1153,7 @@ { dest->alloc = src1->nelem + src2->nelem; dest->elems = re_malloc (Idx, dest->alloc); - if (BE (dest->elems == NULL, 0)) + if (__glibc_unlikely (dest->elems == NULL)) return REG_ESPACE; } else @@ -1190,7 +1197,7 @@ DEST. Return value indicate the error code or REG_NOERROR if succeeded. */ static reg_errcode_t -internal_function __attribute_warn_unused_result__ +__attribute_warn_unused_result__ re_node_set_merge (re_node_set *dest, const re_node_set *src) { Idx is, id, sbase, delta; @@ -1200,13 +1207,13 @@ { Idx new_alloc = 2 * (src->nelem + dest->alloc); Idx *new_buffer = re_realloc (dest->elems, Idx, new_alloc); - if (BE (new_buffer == NULL, 0)) + if (__glibc_unlikely (new_buffer == NULL)) return REG_ESPACE; dest->elems = new_buffer; dest->alloc = new_alloc; } - if (BE (dest->nelem == 0, 0)) + if (__glibc_unlikely (dest->nelem == 0)) { dest->nelem = src->nelem; memcpy (dest->elems, src->elems, src->nelem * sizeof (Idx)); @@ -1273,15 +1280,15 @@ Return true if successful. */ static bool -internal_function __attribute_warn_unused_result__ +__attribute_warn_unused_result__ re_node_set_insert (re_node_set *set, Idx elem) { Idx idx; /* In case the set is empty. */ if (set->alloc == 0) - return BE (re_node_set_init_1 (set, elem) == REG_NOERROR, 1); + return __glibc_likely (re_node_set_init_1 (set, elem) == REG_NOERROR); - if (BE (set->nelem, 0) == 0) + if (__glibc_unlikely (set->nelem) == 0) { /* We already guaranteed above that set->alloc != 0. */ set->elems[0] = elem; @@ -1295,7 +1302,7 @@ Idx *new_elems; set->alloc = set->alloc * 2; new_elems = re_realloc (set->elems, Idx, set->alloc); - if (BE (new_elems == NULL, 0)) + if (__glibc_unlikely (new_elems == NULL)) return false; set->elems = new_elems; } @@ -1325,7 +1332,7 @@ Return true if successful. */ static bool -internal_function __attribute_warn_unused_result__ +__attribute_warn_unused_result__ re_node_set_insert_last (re_node_set *set, Idx elem) { /* Realloc if we need. */ @@ -1334,7 +1341,7 @@ Idx *new_elems; set->alloc = (set->alloc + 1) * 2; new_elems = re_realloc (set->elems, Idx, set->alloc); - if (BE (new_elems == NULL, 0)) + if (__glibc_unlikely (new_elems == NULL)) return false; set->elems = new_elems; } @@ -1348,7 +1355,7 @@ Return true if SET1 and SET2 are equivalent. */ static bool -internal_function __attribute__ ((pure)) +__attribute__ ((pure)) re_node_set_compare (const re_node_set *set1, const re_node_set *set2) { Idx i; @@ -1363,7 +1370,7 @@ /* Return (idx + 1) if SET contains the element ELEM, return 0 otherwise. */ static Idx -internal_function __attribute__ ((pure)) +__attribute__ ((pure)) re_node_set_contains (const re_node_set *set, Idx elem) { __re_size_t idx, right, mid; @@ -1385,7 +1392,6 @@ } static void -internal_function re_node_set_remove_at (re_node_set *set, Idx idx) { if (idx < 0 || idx >= set->nelem) @@ -1400,10 +1406,9 @@ Or return -1 if an error occurred. */ static Idx -internal_function re_dfa_add_node (re_dfa_t *dfa, re_token_t token) { - if (BE (dfa->nodes_len >= dfa->nodes_alloc, 0)) + if (__glibc_unlikely (dfa->nodes_len >= dfa->nodes_alloc)) { size_t new_nodes_alloc = dfa->nodes_alloc * 2; Idx *new_nexts, *new_indices; @@ -1414,19 +1419,20 @@ const size_t max_object_size = MAX (sizeof (re_token_t), MAX (sizeof (re_node_set), sizeof (Idx))); - if (BE (MIN (IDX_MAX, SIZE_MAX / max_object_size) < new_nodes_alloc, 0)) + if (__glibc_unlikely (MIN (IDX_MAX, SIZE_MAX / max_object_size) + < new_nodes_alloc)) return -1; new_nodes = re_realloc (dfa->nodes, re_token_t, new_nodes_alloc); - if (BE (new_nodes == NULL, 0)) + if (__glibc_unlikely (new_nodes == NULL)) 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); new_edests = re_realloc (dfa->edests, re_node_set, new_nodes_alloc); 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)) + if (__glibc_unlikely (new_nexts == NULL || new_indices == NULL + || new_edests == NULL || new_eclosures == NULL)) { re_free (new_nexts); re_free (new_indices); @@ -1454,7 +1460,6 @@ } static re_hashval_t -internal_function calc_state_hash (const re_node_set *nodes, unsigned int context) { re_hashval_t hash = nodes->nelem + context; @@ -1474,7 +1479,7 @@ optimization. */ static re_dfastate_t * -internal_function __attribute_warn_unused_result__ +__attribute_warn_unused_result__ re_acquire_state (reg_errcode_t *err, const re_dfa_t *dfa, const re_node_set *nodes) { @@ -1486,7 +1491,7 @@ /* Suppress bogus uninitialized-variable warnings. */ *err = REG_NOERROR; #endif - if (BE (nodes->nelem == 0, 0)) + if (__glibc_unlikely (nodes->nelem == 0)) { *err = REG_NOERROR; return NULL; @@ -1505,7 +1510,7 @@ /* There are no appropriate state in the dfa, create the new one. */ new_state = create_ci_newstate (dfa, nodes, hash); - if (BE (new_state == NULL, 0)) + if (__glibc_unlikely (new_state == NULL)) *err = REG_ESPACE; return new_state; @@ -1522,7 +1527,7 @@ optimization. */ static re_dfastate_t * -internal_function __attribute_warn_unused_result__ +__attribute_warn_unused_result__ re_acquire_state_context (reg_errcode_t *err, const re_dfa_t *dfa, const re_node_set *nodes, unsigned int context) { @@ -1552,7 +1557,7 @@ } /* There are no appropriate state in 'dfa', create the new one. */ new_state = create_cd_newstate (dfa, nodes, context, hash); - if (BE (new_state == NULL, 0)) + if (__glibc_unlikely (new_state == NULL)) *err = REG_ESPACE; return new_state; @@ -1573,7 +1578,7 @@ newstate->hash = hash; err = re_node_set_alloc (&newstate->non_eps_nodes, newstate->nodes.nelem); - if (BE (err != REG_NOERROR, 0)) + if (__glibc_unlikely (err != REG_NOERROR)) return REG_ESPACE; for (i = 0; i < newstate->nodes.nelem; i++) { @@ -1584,12 +1589,12 @@ } spot = dfa->state_table + (hash & dfa->state_hash_mask); - if (BE (spot->alloc <= spot->num, 0)) + if (__glibc_unlikely (spot->alloc <= spot->num)) { Idx new_alloc = 2 * spot->num + 2; re_dfastate_t **new_array = re_realloc (spot->array, re_dfastate_t *, new_alloc); - if (BE (new_array == NULL, 0)) + if (__glibc_unlikely (new_array == NULL)) return REG_ESPACE; spot->array = new_array; spot->alloc = new_alloc; @@ -1618,7 +1623,7 @@ Return the new state if succeeded, otherwise return NULL. */ static re_dfastate_t * -internal_function __attribute_warn_unused_result__ +__attribute_warn_unused_result__ create_ci_newstate (const re_dfa_t *dfa, const re_node_set *nodes, re_hashval_t hash) { @@ -1627,10 +1632,10 @@ re_dfastate_t *newstate; newstate = (re_dfastate_t *) calloc (sizeof (re_dfastate_t), 1); - if (BE (newstate == NULL, 0)) + if (__glibc_unlikely (newstate == NULL)) return NULL; err = re_node_set_init_copy (&newstate->nodes, nodes); - if (BE (err != REG_NOERROR, 0)) + if (__glibc_unlikely (err != REG_NOERROR)) { re_free (newstate); return NULL; @@ -1656,7 +1661,7 @@ newstate->has_constraint = 1; } err = register_state (dfa, newstate, hash); - if (BE (err != REG_NOERROR, 0)) + if (__glibc_unlikely (err != REG_NOERROR)) { free_state (newstate); newstate = NULL; @@ -1668,7 +1673,7 @@ Return the new state if succeeded, otherwise return NULL. */ static re_dfastate_t * -internal_function __attribute_warn_unused_result__ +__attribute_warn_unused_result__ create_cd_newstate (const re_dfa_t *dfa, const re_node_set *nodes, unsigned int context, re_hashval_t hash) { @@ -1677,10 +1682,10 @@ re_dfastate_t *newstate; newstate = (re_dfastate_t *) calloc (sizeof (re_dfastate_t), 1); - if (BE (newstate == NULL, 0)) + if (__glibc_unlikely (newstate == NULL)) return NULL; err = re_node_set_init_copy (&newstate->nodes, nodes); - if (BE (err != REG_NOERROR, 0)) + if (__glibc_unlikely (err != REG_NOERROR)) { re_free (newstate); return NULL; @@ -1712,7 +1717,7 @@ if (newstate->entrance_nodes == &newstate->nodes) { newstate->entrance_nodes = re_malloc (re_node_set, 1); - if (BE (newstate->entrance_nodes == NULL, 0)) + if (__glibc_unlikely (newstate->entrance_nodes == NULL)) { free_state (newstate); return NULL; @@ -1732,7 +1737,7 @@ } } err = register_state (dfa, newstate, hash); - if (BE (err != REG_NOERROR, 0)) + if (__glibc_unlikely (err != REG_NOERROR)) { free_state (newstate); newstate = NULL; diff -Nru grep-3.1/lib/regex_internal.h grep-3.3/lib/regex_internal.h --- grep-3.1/lib/regex_internal.h 2017-05-14 01:10:19.000000000 +0000 +++ grep-3.3/lib/regex_internal.h 2018-10-16 23:22:23.000000000 +0000 @@ -1,5 +1,5 @@ /* Extended regular expression matching and search library. - Copyright (C) 2002-2017 Free Software Foundation, Inc. + Copyright (C) 2002-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Isamu Hasegawa . @@ -15,7 +15,7 @@ You should have received a copy of the GNU General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _REGEX_INTERNAL_H #define _REGEX_INTERNAL_H 1 @@ -33,13 +33,13 @@ #include #include -#include "intprops.h" +#include #ifdef _LIBC # include # define lock_define(name) __libc_lock_define (, name) # define lock_init(lock) (__libc_lock_init (lock), 0) -# define lock_fini(lock) 0 +# define lock_fini(lock) ((void) 0) # define lock_lock(lock) __libc_lock_lock (lock) # define lock_unlock(lock) __libc_lock_unlock (lock) #elif defined GNULIB_LOCK && !defined USE_UNLOCKED_IO @@ -116,8 +116,6 @@ # define RE_ENABLE_I18N #endif -#define BE(expr, val) __builtin_expect (expr, val) - /* Number of ASCII characters. */ #define ASCII_CHARS 0x80 @@ -133,7 +131,10 @@ /* Rename to standard API for using out of glibc. */ #ifndef _LIBC # undef __wctype +# undef __iswalnum # undef __iswctype +# undef __towlower +# undef __towupper # define __wctype wctype # define __iswalnum iswalnum # define __iswctype iswctype @@ -438,24 +439,9 @@ typedef struct re_dfa_t re_dfa_t; #ifndef _LIBC -# define internal_function # define IS_IN(libc) false #endif -static reg_errcode_t re_string_realloc_buffers (re_string_t *pstr, - Idx new_buf_len) - internal_function; -#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 */ -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)); - #define re_string_peek_byte(pstr, offset) \ ((pstr)->mbs[(pstr)->cur_idx + offset]) #define re_string_fetch_byte(pstr) \ @@ -761,31 +747,31 @@ /* Functions for bitset_t operation. */ -static void +static inline void bitset_set (bitset_t set, Idx i) { set[i / BITSET_WORD_BITS] |= (bitset_word_t) 1 << i % BITSET_WORD_BITS; } -static void +static inline void bitset_clear (bitset_t set, Idx i) { set[i / BITSET_WORD_BITS] &= ~ ((bitset_word_t) 1 << i % BITSET_WORD_BITS); } -static bool +static inline bool bitset_contain (const bitset_t set, Idx i) { return (set[i / BITSET_WORD_BITS] >> i % BITSET_WORD_BITS) & 1; } -static void +static inline void bitset_empty (bitset_t set) { memset (set, '\0', sizeof (bitset_t)); } -static void +static inline void bitset_set_all (bitset_t set) { memset (set, -1, sizeof (bitset_word_t) * (SBC_MAX / BITSET_WORD_BITS)); @@ -794,13 +780,13 @@ ((bitset_word_t) 1 << SBC_MAX % BITSET_WORD_BITS) - 1; } -static void +static inline void bitset_copy (bitset_t dest, const bitset_t src) { memcpy (dest, src, sizeof (bitset_t)); } -static void __attribute__ ((unused)) +static inline void bitset_not (bitset_t set) { int bitset_i; @@ -812,7 +798,7 @@ & ~set[BITSET_WORDS - 1]); } -static void __attribute__ ((unused)) +static inline void bitset_merge (bitset_t dest, const bitset_t src) { int bitset_i; @@ -820,7 +806,7 @@ dest[bitset_i] |= src[bitset_i]; } -static void __attribute__ ((unused)) +static inline void bitset_mask (bitset_t dest, const bitset_t src) { int bitset_i; @@ -831,7 +817,7 @@ #ifdef RE_ENABLE_I18N /* Functions for re_string. */ static int -internal_function __attribute__ ((pure, unused)) +__attribute__ ((pure, unused)) re_string_char_size_at (const re_string_t *pstr, Idx idx) { int byte_idx; @@ -844,7 +830,7 @@ } static wint_t -internal_function __attribute__ ((pure, unused)) +__attribute__ ((pure, unused)) re_string_wchar_at (const re_string_t *pstr, Idx idx) { if (pstr->mb_cur_max == 1) @@ -857,7 +843,7 @@ # endif static int -internal_function __attribute__ ((pure, unused)) +__attribute__ ((pure, unused)) re_string_elem_size_at (const re_string_t *pstr, Idx idx) { # ifdef _LIBC @@ -899,4 +885,12 @@ # define __attribute_warn_unused_result__ /* empty */ #endif +#ifndef FALLTHROUGH +# if __GNUC__ < 7 +# define FALLTHROUGH ((void) 0) +# else +# define FALLTHROUGH __attribute__ ((__fallthrough__)) +# endif +#endif + #endif /* _REGEX_INTERNAL_H */ diff -Nru grep-3.1/lib/safe-read.c grep-3.3/lib/safe-read.c --- grep-3.1/lib/safe-read.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/lib/safe-read.c 2018-06-24 23:16:49.000000000 +0000 @@ -1,6 +1,6 @@ /* An interface to read and write that retries after interrupts. - Copyright (C) 1993-1994, 1998, 2002-2006, 2009-2017 Free Software + Copyright (C) 1993-1994, 1998, 2002-2006, 2009-2018 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify @@ -14,7 +14,7 @@ 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 . */ + along with this program. If not, see . */ #include @@ -37,7 +37,7 @@ # define IS_EINTR(x) 0 #endif -#include +#include "sys-limits.h" #ifdef SAFE_WRITE # define safe_rw safe_write @@ -55,12 +55,6 @@ size_t safe_rw (int fd, void const *buf, size_t count) { - /* Work around a bug in Tru64 5.1. Attempting to read more than - INT_MAX bytes fails with errno == EINVAL. See - . - When decreasing COUNT, keep it block-aligned. */ - enum { BUGGY_READ_MAXIMUM = INT_MAX & ~8191 }; - for (;;) { ssize_t result = rw (fd, buf, count); @@ -69,8 +63,8 @@ return result; else if (IS_EINTR (errno)) continue; - else if (errno == EINVAL && BUGGY_READ_MAXIMUM < count) - count = BUGGY_READ_MAXIMUM; + else if (errno == EINVAL && SYS_BUFSIZE_MAX < count) + count = SYS_BUFSIZE_MAX; else return result; } diff -Nru grep-3.1/lib/safe-read.h grep-3.3/lib/safe-read.h --- grep-3.1/lib/safe-read.h 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/lib/safe-read.h 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ /* An interface to read() that retries after interrupts. - Copyright (C) 2002, 2006, 2009-2017 Free Software Foundation, Inc. + Copyright (C) 2002, 2006, 2009-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ /* Some system calls may be interrupted and fail with errno = EINTR in the following situations: diff -Nru grep-3.1/lib/same-inode.h grep-3.3/lib/same-inode.h --- grep-3.1/lib/same-inode.h 2017-06-10 16:44:24.000000000 +0000 +++ grep-3.3/lib/same-inode.h 2018-06-24 23:16:49.000000000 +0000 @@ -1,6 +1,6 @@ /* Determine whether two stat buffers are known to refer to the same file. - Copyright (C) 2006, 2009-2017 Free Software Foundation, Inc. + Copyright (C) 2006, 2009-2018 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 @@ -13,7 +13,7 @@ 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 . */ + along with this program. If not, see . */ #ifndef SAME_INODE_H # define SAME_INODE_H 1 @@ -26,7 +26,7 @@ && (a).st_ino[1] == (b).st_ino[1] \ && (a).st_ino[2] == (b).st_ino[2] \ && (a).st_dev == (b).st_dev) -# elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +# elif defined _WIN32 && ! defined __CYGWIN__ /* Native Windows. */ # if _GL_WINDOWS_STAT_INODES /* stat() and fstat() set st_dev and st_ino to 0 if information about diff -Nru grep-3.1/lib/save-cwd.c grep-3.3/lib/save-cwd.c --- grep-3.1/lib/save-cwd.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/lib/save-cwd.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,6 +1,6 @@ /* save-cwd.c -- Save and restore current working directory. - Copyright (C) 1995, 1997-1998, 2003-2006, 2009-2017 Free Software + Copyright (C) 1995, 1997-1998, 2003-2006, 2009-2018 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify @@ -14,7 +14,7 @@ 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 . */ + along with this program. If not, see . */ /* Written by Jim Meyering. */ @@ -30,7 +30,6 @@ #include "chdir-long.h" #include "unistd--.h" -#include "cloexec.h" #if GNULIB_FCNTL_SAFER # include "fcntl--.h" @@ -64,16 +63,15 @@ { cwd->name = NULL; - cwd->desc = open (".", O_SEARCH); + cwd->desc = open (".", O_SEARCH | O_CLOEXEC); if (!GNULIB_FCNTL_SAFER) - cwd->desc = fd_safer (cwd->desc); + cwd->desc = fd_safer_flag (cwd->desc, O_CLOEXEC); if (cwd->desc < 0) { cwd->name = getcwd (NULL, 0); return cwd->name ? 0 : -1; } - set_cloexec_flag (cwd->desc, true); return 0; } diff -Nru grep-3.1/lib/save-cwd.h grep-3.3/lib/save-cwd.h --- grep-3.1/lib/save-cwd.h 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/lib/save-cwd.h 2018-01-07 00:07:08.000000000 +0000 @@ -1,6 +1,6 @@ /* Save and restore current working directory. - Copyright (C) 1995, 1997-1998, 2003, 2009-2017 Free Software Foundation, + Copyright (C) 1995, 1997-1998, 2003, 2009-2018 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify @@ -14,7 +14,7 @@ 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 . */ + along with this program. If not, see . */ /* Written by Jim Meyering. */ diff -Nru grep-3.1/lib/sigaction.c grep-3.3/lib/sigaction.c --- grep-3.1/lib/sigaction.c 1970-01-01 00:00:00.000000000 +0000 +++ grep-3.3/lib/sigaction.c 2018-06-24 23:16:49.000000000 +0000 @@ -0,0 +1,204 @@ +/* POSIX compatible signal blocking. + Copyright (C) 2008-2018 Free Software Foundation, Inc. + Written by Eric Blake , 2008. + + 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 + +#include +#include +#include + +/* This implementation of sigaction is tailored to native Windows behavior: + signal() has SysV semantics (ie. the handler is uninstalled before + it is invoked). This is an inherent data race if an asynchronous + signal is sent twice in a row before we can reinstall our handler, + but there's nothing we can do about it. Meanwhile, sigprocmask() + is not present, and while we can use the gnulib replacement to + provide critical sections, it too suffers from potential data races + in the face of an ill-timed asynchronous signal. And we compound + the situation by reading static storage in a signal handler, which + POSIX warns is not generically async-signal-safe. Oh well. + + Additionally: + - We don't implement SA_NOCLDSTOP or SA_NOCLDWAIT, because SIGCHLD + is not defined. + - We don't implement SA_ONSTACK, because sigaltstack() is not present. + - We ignore SA_RESTART, because blocking native Windows API calls are + not interrupted anyway when an asynchronous signal occurs, and the + MSVCRT runtime never sets errno to EINTR. + - We don't implement SA_SIGINFO because it is impossible to do so + portably. + + POSIX states that an application should not mix signal() and + sigaction(). We support the use of signal() within the gnulib + sigprocmask() substitute, but all other application code linked + with this module should stick with only sigaction(). */ + +/* Check some of our assumptions. */ +#if defined SIGCHLD || defined HAVE_SIGALTSTACK || defined HAVE_SIGINTERRUPT +# error "Revisit the assumptions made in the sigaction module" +#endif + +/* Out-of-range substitutes make a good fallback for uncatchable + signals. */ +#ifndef SIGKILL +# define SIGKILL (-1) +#endif +#ifndef SIGSTOP +# define SIGSTOP (-1) +#endif + +/* On native Windows, as of 2008, the signal SIGABRT_COMPAT is an alias + for the signal SIGABRT. Only one signal handler is stored for both + SIGABRT and SIGABRT_COMPAT. SIGABRT_COMPAT is not a signal of its own. */ +#if defined _WIN32 && ! defined __CYGWIN__ +# undef SIGABRT_COMPAT +# define SIGABRT_COMPAT 6 +#endif + +/* A signal handler. */ +typedef void (*handler_t) (int signal); + +/* Set of current actions. If sa_handler for an entry is NULL, then + that signal is not currently handled by the sigaction handler. */ +static struct sigaction volatile action_array[NSIG] /* = 0 */; + +/* Signal handler that is installed for signals. */ +static void +sigaction_handler (int sig) +{ + handler_t handler; + sigset_t mask; + sigset_t oldmask; + int saved_errno = errno; + if (sig < 0 || NSIG <= sig || !action_array[sig].sa_handler) + { + /* Unexpected situation; be careful to avoid recursive abort. */ + if (sig == SIGABRT) + signal (SIGABRT, SIG_DFL); + abort (); + } + + /* Reinstall the signal handler when required; otherwise update the + bookkeeping so that the user's handler may call sigaction and get + accurate results. We know the signal isn't currently blocked, or + we wouldn't be in its handler, therefore we know that we are not + interrupting a sigaction() call. There is a race where any + asynchronous instance of the same signal occurring before we + reinstall the handler will trigger the default handler; oh + well. */ + handler = action_array[sig].sa_handler; + if ((action_array[sig].sa_flags & SA_RESETHAND) == 0) + signal (sig, sigaction_handler); + else + action_array[sig].sa_handler = NULL; + + /* Block appropriate signals. */ + mask = action_array[sig].sa_mask; + if ((action_array[sig].sa_flags & SA_NODEFER) == 0) + sigaddset (&mask, sig); + sigprocmask (SIG_BLOCK, &mask, &oldmask); + + /* Invoke the user's handler, then restore prior mask. */ + errno = saved_errno; + handler (sig); + saved_errno = errno; + sigprocmask (SIG_SETMASK, &oldmask, NULL); + errno = saved_errno; +} + +/* Change and/or query the action that will be taken on delivery of + signal SIG. If not NULL, ACT describes the new behavior. If not + NULL, OACT is set to the prior behavior. Return 0 on success, or + set errno and return -1 on failure. */ +int +sigaction (int sig, const struct sigaction *restrict act, + struct sigaction *restrict oact) +{ + sigset_t mask; + sigset_t oldmask; + int saved_errno; + + if (sig < 0 || NSIG <= sig || sig == SIGKILL || sig == SIGSTOP + || (act && act->sa_handler == SIG_ERR)) + { + errno = EINVAL; + return -1; + } + +#ifdef SIGABRT_COMPAT + if (sig == SIGABRT_COMPAT) + sig = SIGABRT; +#endif + + /* POSIX requires sigaction() to be async-signal-safe. In other + words, if an asynchronous signal can occur while we are anywhere + inside this function, the user's handler could then call + sigaction() recursively and expect consistent results. We meet + this rule by using sigprocmask to block all signals before + modifying any data structure that could be read from a signal + handler; this works since we know that the gnulib sigprocmask + replacement does not try to use sigaction() from its handler. */ + if (!act && !oact) + return 0; + sigfillset (&mask); + sigprocmask (SIG_BLOCK, &mask, &oldmask); + if (oact) + { + if (action_array[sig].sa_handler) + *oact = action_array[sig]; + else + { + /* Safe to change the handler at will here, since all + signals are currently blocked. */ + oact->sa_handler = signal (sig, SIG_DFL); + if (oact->sa_handler == SIG_ERR) + goto failure; + signal (sig, oact->sa_handler); + oact->sa_flags = SA_RESETHAND | SA_NODEFER; + sigemptyset (&oact->sa_mask); + } + } + + if (act) + { + /* Safe to install the handler before updating action_array, + since all signals are currently blocked. */ + if (act->sa_handler == SIG_DFL || act->sa_handler == SIG_IGN) + { + if (signal (sig, act->sa_handler) == SIG_ERR) + goto failure; + action_array[sig].sa_handler = NULL; + } + else + { + if (signal (sig, sigaction_handler) == SIG_ERR) + goto failure; + action_array[sig] = *act; + } + } + sigprocmask (SIG_SETMASK, &oldmask, NULL); + return 0; + + failure: + saved_errno = errno; + sigprocmask (SIG_SETMASK, &oldmask, NULL); + errno = saved_errno; + return -1; +} diff -Nru grep-3.1/lib/sig-handler.c grep-3.3/lib/sig-handler.c --- grep-3.1/lib/sig-handler.c 1970-01-01 00:00:00.000000000 +0000 +++ grep-3.3/lib/sig-handler.c 2014-06-27 22:32:18.000000000 +0000 @@ -0,0 +1,3 @@ +#include +#define SIG_HANDLER_INLINE _GL_EXTERN_INLINE +#include "sig-handler.h" diff -Nru grep-3.1/lib/sig-handler.h grep-3.3/lib/sig-handler.h --- grep-3.1/lib/sig-handler.h 1970-01-01 00:00:00.000000000 +0000 +++ grep-3.3/lib/sig-handler.h 2018-06-24 23:16:49.000000000 +0000 @@ -0,0 +1,51 @@ +/* Convenience declarations when working with . + + Copyright (C) 2008-2018 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_SIG_HANDLER_H +#define _GL_SIG_HANDLER_H + +#include + +#ifndef _GL_INLINE_HEADER_BEGIN + #error "Please include config.h first." +#endif +_GL_INLINE_HEADER_BEGIN +#ifndef SIG_HANDLER_INLINE +# define SIG_HANDLER_INLINE _GL_INLINE +#endif + +/* Convenience type when working with signal handlers. */ +typedef void (*sa_handler_t) (int); + +/* Return the handler of a signal, as a sa_handler_t value regardless + of its true type. The resulting function can be compared to + special values like SIG_IGN but it is not portable to call it. */ +SIG_HANDLER_INLINE sa_handler_t _GL_ATTRIBUTE_PURE +get_handler (struct sigaction const *a) +{ + /* POSIX says that special values like SIG_IGN can only occur when + action.sa_flags does not contain SA_SIGINFO. But in Linux 2.4, + for example, sa_sigaction and sa_handler are aliases and a signal + is ignored if sa_sigaction (after casting) equals SIG_IGN. In + this case, this implementation relies on the fact that the two + are aliases, and simply returns sa_handler. */ + return a->sa_handler; +} + +_GL_INLINE_HEADER_END + +#endif /* _GL_SIG_HANDLER_H */ diff -Nru grep-3.1/lib/signal.in.h grep-3.3/lib/signal.in.h --- grep-3.1/lib/signal.in.h 1970-01-01 00:00:00.000000000 +0000 +++ grep-3.3/lib/signal.in.h 2018-01-07 00:07:08.000000000 +0000 @@ -0,0 +1,463 @@ +/* A GNU-like . + + Copyright (C) 2006-2018 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 . */ + +#if __GNUC__ >= 3 +@PRAGMA_SYSTEM_HEADER@ +#endif +@PRAGMA_COLUMNS@ + +#if defined __need_sig_atomic_t || defined __need_sigset_t || defined _GL_ALREADY_INCLUDING_SIGNAL_H || (defined _SIGNAL_H && !defined __SIZEOF_PTHREAD_MUTEX_T) +/* Special invocation convention: + - Inside glibc header files. + - On glibc systems we have a sequence of nested includes + -> -> . + In this situation, the functions are not yet declared, therefore we cannot + provide the C++ aliases. + - On glibc systems with GCC 4.3 we have a sequence of nested includes + -> -> -> . + In this situation, some of the functions are not yet declared, therefore + we cannot provide the C++ aliases. */ + +# @INCLUDE_NEXT@ @NEXT_SIGNAL_H@ + +#else +/* Normal invocation convention. */ + +#ifndef _@GUARD_PREFIX@_SIGNAL_H + +#define _GL_ALREADY_INCLUDING_SIGNAL_H + +/* Define pid_t, uid_t. + Also, mingw defines sigset_t not in , but in . + On Solaris 10, includes , which eventually includes + us; so include now, before the second inclusion guard. */ +#include + +/* The include_next requires a split double-inclusion guard. */ +#@INCLUDE_NEXT@ @NEXT_SIGNAL_H@ + +#undef _GL_ALREADY_INCLUDING_SIGNAL_H + +#ifndef _@GUARD_PREFIX@_SIGNAL_H +#define _@GUARD_PREFIX@_SIGNAL_H + +/* Mac OS X 10.3, FreeBSD 6.4, OpenBSD 3.8, OSF/1 4.0, Solaris 2.6, Android + declare pthread_sigmask in , not in . + But avoid namespace pollution on glibc systems.*/ +#if (@GNULIB_PTHREAD_SIGMASK@ || defined GNULIB_POSIXCHECK) \ + && ((defined __APPLE__ && defined __MACH__) \ + || defined __FreeBSD__ || defined __OpenBSD__ || defined __osf__ \ + || defined __sun || defined __ANDROID__) \ + && ! defined __GLIBC__ +# 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. */ + +/* On AIX, sig_atomic_t already includes volatile. C99 requires that + 'volatile sig_atomic_t' ignore the extra modifier, but C89 did not. + Hence, redefine this to a non-volatile type as needed. */ +#if ! @HAVE_TYPE_VOLATILE_SIG_ATOMIC_T@ +# if !GNULIB_defined_sig_atomic_t +typedef int rpl_sig_atomic_t; +# undef sig_atomic_t +# define sig_atomic_t rpl_sig_atomic_t +# define GNULIB_defined_sig_atomic_t 1 +# endif +#endif + +/* A set or mask of signals. */ +#if !@HAVE_SIGSET_T@ +# if !GNULIB_defined_sigset_t +typedef unsigned int sigset_t; +# define GNULIB_defined_sigset_t 1 +# endif +#endif + +/* Define sighandler_t, the type of signal handlers. A GNU extension. */ +#if !@HAVE_SIGHANDLER_T@ +# ifdef __cplusplus +extern "C" { +# endif +# if !GNULIB_defined_sighandler_t +typedef void (*sighandler_t) (int); +# define GNULIB_defined_sighandler_t 1 +# endif +# ifdef __cplusplus +} +# endif +#endif + + +#if @GNULIB_SIGNAL_H_SIGPIPE@ +# ifndef SIGPIPE +/* Define SIGPIPE to a value that does not overlap with other signals. */ +# define SIGPIPE 13 +# define GNULIB_defined_SIGPIPE 1 +/* To actually use SIGPIPE, you also need the gnulib modules 'sigprocmask', + 'write', 'stdio'. */ +# endif +#endif + + +/* Maximum signal number + 1. */ +#ifndef NSIG +# if defined __TANDEM +# define NSIG 32 +# endif +#endif + + +#if @GNULIB_PTHREAD_SIGMASK@ +# if @REPLACE_PTHREAD_SIGMASK@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef pthread_sigmask +# define pthread_sigmask rpl_pthread_sigmask +# endif +_GL_FUNCDECL_RPL (pthread_sigmask, int, + (int how, const sigset_t *new_mask, sigset_t *old_mask)); +_GL_CXXALIAS_RPL (pthread_sigmask, int, + (int how, const sigset_t *new_mask, sigset_t *old_mask)); +# else +# if !(@HAVE_PTHREAD_SIGMASK@ || defined pthread_sigmask) +_GL_FUNCDECL_SYS (pthread_sigmask, int, + (int how, const sigset_t *new_mask, sigset_t *old_mask)); +# endif +_GL_CXXALIAS_SYS (pthread_sigmask, int, + (int how, const sigset_t *new_mask, sigset_t *old_mask)); +# endif +_GL_CXXALIASWARN (pthread_sigmask); +#elif defined GNULIB_POSIXCHECK +# undef pthread_sigmask +# if HAVE_RAW_DECL_PTHREAD_SIGMASK +_GL_WARN_ON_USE (pthread_sigmask, "pthread_sigmask is not portable - " + "use gnulib module pthread_sigmask for portability"); +# endif +#endif + + +#if @GNULIB_RAISE@ +# if @REPLACE_RAISE@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef raise +# define raise rpl_raise +# endif +_GL_FUNCDECL_RPL (raise, int, (int sig)); +_GL_CXXALIAS_RPL (raise, int, (int sig)); +# else +# if !@HAVE_RAISE@ +_GL_FUNCDECL_SYS (raise, int, (int sig)); +# endif +_GL_CXXALIAS_SYS (raise, int, (int sig)); +# endif +_GL_CXXALIASWARN (raise); +#elif defined GNULIB_POSIXCHECK +# undef raise +/* Assume raise is always declared. */ +_GL_WARN_ON_USE (raise, "raise can crash on native Windows - " + "use gnulib module raise for portability"); +#endif + + +#if @GNULIB_SIGPROCMASK@ +# if !@HAVE_POSIX_SIGNALBLOCKING@ + +# ifndef GNULIB_defined_signal_blocking +# define GNULIB_defined_signal_blocking 1 +# endif + +/* Maximum signal number + 1. */ +# ifndef NSIG +# define NSIG 32 +# endif + +/* This code supports only 32 signals. */ +# if !GNULIB_defined_verify_NSIG_constraint +typedef int verify_NSIG_constraint[NSIG <= 32 ? 1 : -1]; +# define GNULIB_defined_verify_NSIG_constraint 1 +# endif + +# endif + +/* When also using extern inline, suppress the use of static inline in + standard headers of problematic Apple configurations, as Libc at + least through Libc-825.26 (2013-04-09) mishandles it; see, e.g., + . + Perhaps Apple will fix this some day. */ +#if (defined _GL_EXTERN_INLINE_IN_USE && defined __APPLE__ \ + && (defined __i386__ || defined __x86_64__)) +# undef sigaddset +# undef sigdelset +# undef sigemptyset +# undef sigfillset +# undef sigismember +#endif + +/* Test whether a given signal is contained in a signal set. */ +# if @HAVE_POSIX_SIGNALBLOCKING@ +/* This function is defined as a macro on Mac OS X. */ +# if defined __cplusplus && defined GNULIB_NAMESPACE +# undef sigismember +# endif +# else +_GL_FUNCDECL_SYS (sigismember, int, (const sigset_t *set, int sig) + _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (sigismember, int, (const sigset_t *set, int sig)); +_GL_CXXALIASWARN (sigismember); + +/* Initialize a signal set to the empty set. */ +# if @HAVE_POSIX_SIGNALBLOCKING@ +/* This function is defined as a macro on Mac OS X. */ +# if defined __cplusplus && defined GNULIB_NAMESPACE +# undef sigemptyset +# endif +# else +_GL_FUNCDECL_SYS (sigemptyset, int, (sigset_t *set) _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (sigemptyset, int, (sigset_t *set)); +_GL_CXXALIASWARN (sigemptyset); + +/* Add a signal to a signal set. */ +# if @HAVE_POSIX_SIGNALBLOCKING@ +/* This function is defined as a macro on Mac OS X. */ +# if defined __cplusplus && defined GNULIB_NAMESPACE +# undef sigaddset +# endif +# else +_GL_FUNCDECL_SYS (sigaddset, int, (sigset_t *set, int sig) + _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (sigaddset, int, (sigset_t *set, int sig)); +_GL_CXXALIASWARN (sigaddset); + +/* Remove a signal from a signal set. */ +# if @HAVE_POSIX_SIGNALBLOCKING@ +/* This function is defined as a macro on Mac OS X. */ +# if defined __cplusplus && defined GNULIB_NAMESPACE +# undef sigdelset +# endif +# else +_GL_FUNCDECL_SYS (sigdelset, int, (sigset_t *set, int sig) + _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (sigdelset, int, (sigset_t *set, int sig)); +_GL_CXXALIASWARN (sigdelset); + +/* Fill a signal set with all possible signals. */ +# if @HAVE_POSIX_SIGNALBLOCKING@ +/* This function is defined as a macro on Mac OS X. */ +# if defined __cplusplus && defined GNULIB_NAMESPACE +# undef sigfillset +# endif +# else +_GL_FUNCDECL_SYS (sigfillset, int, (sigset_t *set) _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (sigfillset, int, (sigset_t *set)); +_GL_CXXALIASWARN (sigfillset); + +/* Return the set of those blocked signals that are pending. */ +# if !@HAVE_POSIX_SIGNALBLOCKING@ +_GL_FUNCDECL_SYS (sigpending, int, (sigset_t *set) _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (sigpending, int, (sigset_t *set)); +_GL_CXXALIASWARN (sigpending); + +/* If OLD_SET is not NULL, put the current set of blocked signals in *OLD_SET. + Then, if SET is not NULL, affect the current set of blocked signals by + combining it with *SET as indicated in OPERATION. + In this implementation, you are not allowed to change a signal handler + while the signal is blocked. */ +# if !@HAVE_POSIX_SIGNALBLOCKING@ +# define SIG_BLOCK 0 /* blocked_set = blocked_set | *set; */ +# define SIG_SETMASK 1 /* blocked_set = *set; */ +# define SIG_UNBLOCK 2 /* blocked_set = blocked_set & ~*set; */ +_GL_FUNCDECL_SYS (sigprocmask, int, + (int operation, const sigset_t *set, sigset_t *old_set)); +# endif +_GL_CXXALIAS_SYS (sigprocmask, int, + (int operation, const sigset_t *set, sigset_t *old_set)); +_GL_CXXALIASWARN (sigprocmask); + +/* Install the handler FUNC for signal SIG, and return the previous + handler. */ +# ifdef __cplusplus +extern "C" { +# endif +# if !GNULIB_defined_function_taking_int_returning_void_t +typedef void (*_gl_function_taking_int_returning_void_t) (int); +# define GNULIB_defined_function_taking_int_returning_void_t 1 +# endif +# ifdef __cplusplus +} +# endif +# if !@HAVE_POSIX_SIGNALBLOCKING@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define signal rpl_signal +# endif +_GL_FUNCDECL_RPL (signal, _gl_function_taking_int_returning_void_t, + (int sig, _gl_function_taking_int_returning_void_t func)); +_GL_CXXALIAS_RPL (signal, _gl_function_taking_int_returning_void_t, + (int sig, _gl_function_taking_int_returning_void_t func)); +# else +_GL_CXXALIAS_SYS (signal, _gl_function_taking_int_returning_void_t, + (int sig, _gl_function_taking_int_returning_void_t func)); +# endif +_GL_CXXALIASWARN (signal); + +# if !@HAVE_POSIX_SIGNALBLOCKING@ && GNULIB_defined_SIGPIPE +/* Raise signal SIGPIPE. */ +_GL_EXTERN_C int _gl_raise_SIGPIPE (void); +# endif + +#elif defined GNULIB_POSIXCHECK +# undef sigaddset +# if HAVE_RAW_DECL_SIGADDSET +_GL_WARN_ON_USE (sigaddset, "sigaddset is unportable - " + "use the gnulib module sigprocmask for portability"); +# endif +# undef sigdelset +# if HAVE_RAW_DECL_SIGDELSET +_GL_WARN_ON_USE (sigdelset, "sigdelset is unportable - " + "use the gnulib module sigprocmask for portability"); +# endif +# undef sigemptyset +# if HAVE_RAW_DECL_SIGEMPTYSET +_GL_WARN_ON_USE (sigemptyset, "sigemptyset is unportable - " + "use the gnulib module sigprocmask for portability"); +# endif +# undef sigfillset +# if HAVE_RAW_DECL_SIGFILLSET +_GL_WARN_ON_USE (sigfillset, "sigfillset is unportable - " + "use the gnulib module sigprocmask for portability"); +# endif +# undef sigismember +# if HAVE_RAW_DECL_SIGISMEMBER +_GL_WARN_ON_USE (sigismember, "sigismember is unportable - " + "use the gnulib module sigprocmask for portability"); +# endif +# undef sigpending +# if HAVE_RAW_DECL_SIGPENDING +_GL_WARN_ON_USE (sigpending, "sigpending is unportable - " + "use the gnulib module sigprocmask for portability"); +# endif +# undef sigprocmask +# if HAVE_RAW_DECL_SIGPROCMASK +_GL_WARN_ON_USE (sigprocmask, "sigprocmask is unportable - " + "use the gnulib module sigprocmask for portability"); +# endif +#endif /* @GNULIB_SIGPROCMASK@ */ + + +#if @GNULIB_SIGACTION@ +# if !@HAVE_SIGACTION@ + +# if !@HAVE_SIGINFO_T@ + +# if !GNULIB_defined_siginfo_types + +/* Present to allow compilation, but unsupported by gnulib. */ +union sigval +{ + int sival_int; + void *sival_ptr; +}; + +/* Present to allow compilation, but unsupported by gnulib. */ +struct siginfo_t +{ + int si_signo; + int si_code; + int si_errno; + pid_t si_pid; + uid_t si_uid; + void *si_addr; + int si_status; + long si_band; + union sigval si_value; +}; +typedef struct siginfo_t siginfo_t; + +# define GNULIB_defined_siginfo_types 1 +# endif + +# endif /* !@HAVE_SIGINFO_T@ */ + +/* We assume that platforms which lack the sigaction() function also lack + the 'struct sigaction' type, and vice versa. */ + +# if !GNULIB_defined_struct_sigaction + +struct sigaction +{ + union + { + void (*_sa_handler) (int); + /* Present to allow compilation, but unsupported by gnulib. POSIX + says that implementations may, but not must, make sa_sigaction + overlap with sa_handler, but we know of no implementation where + they do not overlap. */ + void (*_sa_sigaction) (int, siginfo_t *, void *); + } _sa_func; + sigset_t sa_mask; + /* Not all POSIX flags are supported. */ + int sa_flags; +}; +# define sa_handler _sa_func._sa_handler +# define sa_sigaction _sa_func._sa_sigaction +/* Unsupported flags are not present. */ +# define SA_RESETHAND 1 +# define SA_NODEFER 2 +# define SA_RESTART 4 + +# define GNULIB_defined_struct_sigaction 1 +# endif + +_GL_FUNCDECL_SYS (sigaction, int, (int, const struct sigaction *restrict, + struct sigaction *restrict)); + +# elif !@HAVE_STRUCT_SIGACTION_SA_SIGACTION@ + +# define sa_sigaction sa_handler + +# endif /* !@HAVE_SIGACTION@, !@HAVE_STRUCT_SIGACTION_SA_SIGACTION@ */ + +_GL_CXXALIAS_SYS (sigaction, int, (int, const struct sigaction *restrict, + struct sigaction *restrict)); +_GL_CXXALIASWARN (sigaction); + +#elif defined GNULIB_POSIXCHECK +# undef sigaction +# if HAVE_RAW_DECL_SIGACTION +_GL_WARN_ON_USE (sigaction, "sigaction is unportable - " + "use the gnulib module sigaction for portability"); +# endif +#endif + +/* Some systems don't have SA_NODEFER. */ +#ifndef SA_NODEFER +# define SA_NODEFER 0 +#endif + + +#endif /* _@GUARD_PREFIX@_SIGNAL_H */ +#endif /* _@GUARD_PREFIX@_SIGNAL_H */ +#endif diff -Nru grep-3.1/lib/sigprocmask.c grep-3.3/lib/sigprocmask.c --- grep-3.1/lib/sigprocmask.c 1970-01-01 00:00:00.000000000 +0000 +++ grep-3.3/lib/sigprocmask.c 2018-06-24 23:16:49.000000000 +0000 @@ -0,0 +1,349 @@ +/* POSIX compatible signal blocking. + Copyright (C) 2006-2018 Free Software Foundation, Inc. + Written by Bruno Haible , 2006. + + 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 + +#include +#include +#include + +#if HAVE_MSVC_INVALID_PARAMETER_HANDLER +# include "msvc-inval.h" +#endif + +/* We assume that a platform without POSIX signal blocking functions + also does not have the POSIX sigaction() function, only the + signal() function. We also assume signal() has SysV semantics, + where any handler is uninstalled prior to being invoked. This is + true for native Windows platforms. */ + +/* We use raw signal(), but also provide a wrapper rpl_signal() so + that applications can query or change a blocked signal. */ +#undef signal + +/* Provide invalid signal numbers as fallbacks if the uncatchable + signals are not defined. */ +#ifndef SIGKILL +# define SIGKILL (-1) +#endif +#ifndef SIGSTOP +# define SIGSTOP (-1) +#endif + +/* On native Windows, as of 2008, the signal SIGABRT_COMPAT is an alias + for the signal SIGABRT. Only one signal handler is stored for both + SIGABRT and SIGABRT_COMPAT. SIGABRT_COMPAT is not a signal of its own. */ +#if defined _WIN32 && ! defined __CYGWIN__ +# undef SIGABRT_COMPAT +# define SIGABRT_COMPAT 6 +#endif +#ifdef SIGABRT_COMPAT +# define SIGABRT_COMPAT_MASK (1U << SIGABRT_COMPAT) +#else +# define SIGABRT_COMPAT_MASK 0 +#endif + +typedef void (*handler_t) (int); + +#if HAVE_MSVC_INVALID_PARAMETER_HANDLER +static handler_t +signal_nothrow (int sig, handler_t handler) +{ + handler_t result; + + TRY_MSVC_INVAL + { + result = signal (sig, handler); + } + CATCH_MSVC_INVAL + { + result = SIG_ERR; + errno = EINVAL; + } + DONE_MSVC_INVAL; + + return result; +} +# define signal signal_nothrow +#endif + +/* Handling of gnulib defined signals. */ + +#if GNULIB_defined_SIGPIPE +static handler_t SIGPIPE_handler = SIG_DFL; +#endif + +#if GNULIB_defined_SIGPIPE +static handler_t +ext_signal (int sig, handler_t handler) +{ + switch (sig) + { + case SIGPIPE: + { + handler_t old_handler = SIGPIPE_handler; + SIGPIPE_handler = handler; + return old_handler; + } + default: /* System defined signal */ + return signal (sig, handler); + } +} +# undef signal +# define signal ext_signal +#endif + +int +sigismember (const sigset_t *set, int sig) +{ + if (sig >= 0 && sig < NSIG) + { + #ifdef SIGABRT_COMPAT + if (sig == SIGABRT_COMPAT) + sig = SIGABRT; + #endif + + return (*set >> sig) & 1; + } + else + return 0; +} + +int +sigemptyset (sigset_t *set) +{ + *set = 0; + return 0; +} + +int +sigaddset (sigset_t *set, int sig) +{ + if (sig >= 0 && sig < NSIG) + { + #ifdef SIGABRT_COMPAT + if (sig == SIGABRT_COMPAT) + sig = SIGABRT; + #endif + + *set |= 1U << sig; + return 0; + } + else + { + errno = EINVAL; + return -1; + } +} + +int +sigdelset (sigset_t *set, int sig) +{ + if (sig >= 0 && sig < NSIG) + { + #ifdef SIGABRT_COMPAT + if (sig == SIGABRT_COMPAT) + sig = SIGABRT; + #endif + + *set &= ~(1U << sig); + return 0; + } + else + { + errno = EINVAL; + return -1; + } +} + + +int +sigfillset (sigset_t *set) +{ + *set = ((2U << (NSIG - 1)) - 1) & ~ SIGABRT_COMPAT_MASK; + return 0; +} + +/* Set of currently blocked signals. */ +static volatile sigset_t blocked_set /* = 0 */; + +/* Set of currently blocked and pending signals. */ +static volatile sig_atomic_t pending_array[NSIG] /* = { 0 } */; + +/* Signal handler that is installed for blocked signals. */ +static void +blocked_handler (int sig) +{ + /* Reinstall the handler, in case the signal occurs multiple times + while blocked. There is an inherent race where an asynchronous + signal in between when the kernel uninstalled the handler and + when we reinstall it will trigger the default handler; oh + well. */ + signal (sig, blocked_handler); + if (sig >= 0 && sig < NSIG) + pending_array[sig] = 1; +} + +int +sigpending (sigset_t *set) +{ + sigset_t pending = 0; + int sig; + + for (sig = 0; sig < NSIG; sig++) + if (pending_array[sig]) + pending |= 1U << sig; + *set = pending; + return 0; +} + +/* The previous signal handlers. + Only the array elements corresponding to blocked signals are relevant. */ +static volatile handler_t old_handlers[NSIG]; + +int +sigprocmask (int operation, const sigset_t *set, sigset_t *old_set) +{ + if (old_set != NULL) + *old_set = blocked_set; + + if (set != NULL) + { + sigset_t new_blocked_set; + sigset_t to_unblock; + sigset_t to_block; + + switch (operation) + { + case SIG_BLOCK: + new_blocked_set = blocked_set | *set; + break; + case SIG_SETMASK: + new_blocked_set = *set; + break; + case SIG_UNBLOCK: + new_blocked_set = blocked_set & ~*set; + break; + default: + errno = EINVAL; + return -1; + } + to_unblock = blocked_set & ~new_blocked_set; + to_block = new_blocked_set & ~blocked_set; + + if (to_block != 0) + { + int sig; + + for (sig = 0; sig < NSIG; sig++) + if ((to_block >> sig) & 1) + { + pending_array[sig] = 0; + if ((old_handlers[sig] = signal (sig, blocked_handler)) != SIG_ERR) + blocked_set |= 1U << sig; + } + } + + if (to_unblock != 0) + { + sig_atomic_t received[NSIG]; + int sig; + + for (sig = 0; sig < NSIG; sig++) + if ((to_unblock >> sig) & 1) + { + if (signal (sig, old_handlers[sig]) != blocked_handler) + /* The application changed a signal handler while the signal + was blocked, bypassing our rpl_signal replacement. + We don't support this. */ + abort (); + received[sig] = pending_array[sig]; + blocked_set &= ~(1U << sig); + pending_array[sig] = 0; + } + else + received[sig] = 0; + + for (sig = 0; sig < NSIG; sig++) + if (received[sig]) + raise (sig); + } + } + return 0; +} + +/* Install the handler FUNC for signal SIG, and return the previous + handler. */ +handler_t +rpl_signal (int sig, handler_t handler) +{ + /* We must provide a wrapper, so that a user can query what handler + they installed even if that signal is currently blocked. */ + if (sig >= 0 && sig < NSIG && sig != SIGKILL && sig != SIGSTOP + && handler != SIG_ERR) + { + #ifdef SIGABRT_COMPAT + if (sig == SIGABRT_COMPAT) + sig = SIGABRT; + #endif + + if (blocked_set & (1U << sig)) + { + /* POSIX states that sigprocmask and signal are both + async-signal-safe. This is not true of our + implementation - there is a slight data race where an + asynchronous interrupt on signal A can occur after we + install blocked_handler but before we have updated + old_handlers for signal B, such that handler A can see + stale information if it calls signal(B). Oh well - + signal handlers really shouldn't try to manipulate the + installed handlers of unrelated signals. */ + handler_t result = old_handlers[sig]; + old_handlers[sig] = handler; + return result; + } + else + return signal (sig, handler); + } + else + { + errno = EINVAL; + return SIG_ERR; + } +} + +#if GNULIB_defined_SIGPIPE +/* Raise the signal SIGPIPE. */ +int +_gl_raise_SIGPIPE (void) +{ + if (blocked_set & (1U << SIGPIPE)) + pending_array[SIGPIPE] = 1; + else + { + handler_t handler = SIGPIPE_handler; + if (handler == SIG_DFL) + exit (128 + SIGPIPE); + else if (handler != SIG_IGN) + (*handler) (SIGPIPE); + } + return 0; +} +#endif diff -Nru grep-3.1/lib/stat.c grep-3.3/lib/stat.c --- grep-3.1/lib/stat.c 2017-05-21 00:31:28.000000000 +0000 +++ grep-3.3/lib/stat.c 2018-06-24 23:16:49.000000000 +0000 @@ -1,5 +1,5 @@ /* Work around platform bugs in stat. - Copyright (C) 2009-2017 Free Software Foundation, Inc. + Copyright (C) 2009-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ /* Written by Eric Blake and Bruno Haible. */ @@ -27,7 +27,7 @@ #include #undef __need_system_sys_stat_h -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +#if defined _WIN32 && ! defined __CYGWIN__ # define WINDOWS_NATIVE #endif @@ -47,6 +47,8 @@ above. */ #include "sys/stat.h" +#include "stat-time.h" + #include #include #include @@ -102,7 +104,7 @@ /* 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 ? */ @@ -405,19 +407,23 @@ } #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)) + if (result == 0) { - size_t len = strlen (name); - if (ISSLASH (name[len - 1])) +# if REPLACE_FUNC_STAT_FILE + /* Solaris 9 mistakenly succeeds when given a non-directory with a + trailing slash. */ + if (!S_ISDIR (buf->st_mode)) { - errno = ENOTDIR; - return -1; + size_t len = strlen (name); + if (ISSLASH (name[len - 1])) + { + errno = ENOTDIR; + return -1; + } } - } # endif /* REPLACE_FUNC_STAT_FILE */ + result = stat_time_normalize (result, buf); + } return result; #endif } diff -Nru grep-3.1/lib/stat-time.c grep-3.3/lib/stat-time.c --- grep-3.1/lib/stat-time.c 1970-01-01 00:00:00.000000000 +0000 +++ grep-3.3/lib/stat-time.c 2014-06-27 22:32:18.000000000 +0000 @@ -0,0 +1,3 @@ +#include +#define _GL_STAT_TIME_INLINE _GL_EXTERN_INLINE +#include "stat-time.h" diff -Nru grep-3.1/lib/stat-time.h grep-3.3/lib/stat-time.h --- grep-3.1/lib/stat-time.h 1970-01-01 00:00:00.000000000 +0000 +++ grep-3.3/lib/stat-time.h 2018-09-19 05:04:26.000000000 +0000 @@ -0,0 +1,252 @@ +/* stat-related time functions. + + Copyright (C) 2005, 2007, 2009-2018 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. */ + +#ifndef STAT_TIME_H +#define STAT_TIME_H 1 + +#include "intprops.h" + +#include +#include +#include +#include + +#ifndef _GL_INLINE_HEADER_BEGIN + #error "Please include config.h first." +#endif +_GL_INLINE_HEADER_BEGIN +#ifndef _GL_STAT_TIME_INLINE +# define _GL_STAT_TIME_INLINE _GL_INLINE +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +/* STAT_TIMESPEC (ST, ST_XTIM) is the ST_XTIM member for *ST of type + struct timespec, if available. If not, then STAT_TIMESPEC_NS (ST, + ST_XTIM) is the nanosecond component of the ST_XTIM member for *ST, + if available. ST_XTIM can be st_atim, st_ctim, st_mtim, or st_birthtim + for access, status change, data modification, or birth (creation) + time respectively. + + These macros are private to stat-time.h. */ +#if _GL_WINDOWS_STAT_TIMESPEC || defined HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC +# if _GL_WINDOWS_STAT_TIMESPEC || defined TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC +# define STAT_TIMESPEC(st, st_xtim) ((st)->st_xtim) +# else +# define STAT_TIMESPEC_NS(st, st_xtim) ((st)->st_xtim.tv_nsec) +# endif +#elif defined HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC +# define STAT_TIMESPEC(st, st_xtim) ((st)->st_xtim##espec) +#elif defined HAVE_STRUCT_STAT_ST_ATIMENSEC +# define STAT_TIMESPEC_NS(st, st_xtim) ((st)->st_xtim##ensec) +#elif defined HAVE_STRUCT_STAT_ST_ATIM_ST__TIM_TV_NSEC +# define STAT_TIMESPEC_NS(st, st_xtim) ((st)->st_xtim.st__tim.tv_nsec) +#endif + +/* Return the nanosecond component of *ST's access time. */ +_GL_STAT_TIME_INLINE long int _GL_ATTRIBUTE_PURE +get_stat_atime_ns (struct stat const *st) +{ +# if defined STAT_TIMESPEC + return STAT_TIMESPEC (st, st_atim).tv_nsec; +# elif defined STAT_TIMESPEC_NS + return STAT_TIMESPEC_NS (st, st_atim); +# else + return 0; +# endif +} + +/* Return the nanosecond component of *ST's status change time. */ +_GL_STAT_TIME_INLINE long int _GL_ATTRIBUTE_PURE +get_stat_ctime_ns (struct stat const *st) +{ +# if defined STAT_TIMESPEC + return STAT_TIMESPEC (st, st_ctim).tv_nsec; +# elif defined STAT_TIMESPEC_NS + return STAT_TIMESPEC_NS (st, st_ctim); +# else + return 0; +# endif +} + +/* Return the nanosecond component of *ST's data modification time. */ +_GL_STAT_TIME_INLINE long int _GL_ATTRIBUTE_PURE +get_stat_mtime_ns (struct stat const *st) +{ +# if defined STAT_TIMESPEC + return STAT_TIMESPEC (st, st_mtim).tv_nsec; +# elif defined STAT_TIMESPEC_NS + return STAT_TIMESPEC_NS (st, st_mtim); +# else + return 0; +# endif +} + +/* Return the nanosecond component of *ST's birth time. */ +_GL_STAT_TIME_INLINE long int _GL_ATTRIBUTE_PURE +get_stat_birthtime_ns (struct stat const *st _GL_UNUSED) +{ +# if defined HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC + return STAT_TIMESPEC (st, st_birthtim).tv_nsec; +# elif defined HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC + return STAT_TIMESPEC_NS (st, st_birthtim); +# else + return 0; +# endif +} + +/* Return *ST's access time. */ +_GL_STAT_TIME_INLINE struct timespec _GL_ATTRIBUTE_PURE +get_stat_atime (struct stat const *st) +{ +#ifdef STAT_TIMESPEC + return STAT_TIMESPEC (st, st_atim); +#else + struct timespec t; + t.tv_sec = st->st_atime; + t.tv_nsec = get_stat_atime_ns (st); + return t; +#endif +} + +/* Return *ST's status change time. */ +_GL_STAT_TIME_INLINE struct timespec _GL_ATTRIBUTE_PURE +get_stat_ctime (struct stat const *st) +{ +#ifdef STAT_TIMESPEC + return STAT_TIMESPEC (st, st_ctim); +#else + struct timespec t; + t.tv_sec = st->st_ctime; + t.tv_nsec = get_stat_ctime_ns (st); + return t; +#endif +} + +/* Return *ST's data modification time. */ +_GL_STAT_TIME_INLINE struct timespec _GL_ATTRIBUTE_PURE +get_stat_mtime (struct stat const *st) +{ +#ifdef STAT_TIMESPEC + return STAT_TIMESPEC (st, st_mtim); +#else + struct timespec t; + t.tv_sec = st->st_mtime; + t.tv_nsec = get_stat_mtime_ns (st); + return t; +#endif +} + +/* Return *ST's birth time, if available; otherwise return a value + with tv_sec and tv_nsec both equal to -1. */ +_GL_STAT_TIME_INLINE struct timespec _GL_ATTRIBUTE_PURE +get_stat_birthtime (struct stat const *st _GL_UNUSED) +{ + struct timespec t; + +#if (defined HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC \ + || defined HAVE_STRUCT_STAT_ST_BIRTHTIM_TV_NSEC) + t = STAT_TIMESPEC (st, st_birthtim); +#elif defined HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC + t.tv_sec = st->st_birthtime; + t.tv_nsec = st->st_birthtimensec; +#elif defined _WIN32 && ! defined __CYGWIN__ + /* Native Windows platforms (but not Cygwin) put the "file creation + time" in st_ctime (!). See + . */ +# if _GL_WINDOWS_STAT_TIMESPEC + t = st->st_ctim; +# else + t.tv_sec = st->st_ctime; + t.tv_nsec = 0; +# endif +#else + /* Birth time is not supported. */ + t.tv_sec = -1; + t.tv_nsec = -1; +#endif + +#if (defined HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC \ + || defined HAVE_STRUCT_STAT_ST_BIRTHTIM_TV_NSEC \ + || defined HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC) + /* FreeBSD and NetBSD sometimes signal the absence of knowledge by + using zero. Attempt to work around this problem. Alas, this can + report failure even for valid timestamps. Also, NetBSD + sometimes returns junk in the birth time fields; work around this + bug if it is detected. */ + if (! (t.tv_sec && 0 <= t.tv_nsec && t.tv_nsec < 1000000000)) + { + t.tv_sec = -1; + t.tv_nsec = -1; + } +#endif + + return t; +} + +/* If a stat-like function returned RESULT, normalize the timestamps + in *ST, in case this platform suffers from the Solaris 11 bug where + tv_nsec might be negative. Return the adjusted RESULT, setting + errno to EOVERFLOW if normalization overflowed. This function + is intended to be private to this .h file. */ +_GL_STAT_TIME_INLINE int +stat_time_normalize (int result, struct stat *st _GL_UNUSED) +{ +#if defined __sun && defined STAT_TIMESPEC + if (result == 0) + { + long int timespec_hz = 1000000000; + short int const ts_off[] = { offsetof (struct stat, st_atim), + offsetof (struct stat, st_mtim), + offsetof (struct stat, st_ctim) }; + int i; + for (i = 0; i < sizeof ts_off / sizeof *ts_off; i++) + { + struct timespec *ts = (struct timespec *) ((char *) st + ts_off[i]); + long int q = ts->tv_nsec / timespec_hz; + long int r = ts->tv_nsec % timespec_hz; + if (r < 0) + { + r += timespec_hz; + q--; + } + ts->tv_nsec = r; + /* Overflow is possible, as Solaris 11 stat can yield + tv_sec == TYPE_MINIMUM (time_t) && tv_nsec == -1000000000. + INT_ADD_WRAPV is OK, since time_t is signed on Solaris. */ + if (INT_ADD_WRAPV (q, ts->tv_sec, &ts->tv_sec)) + { + errno = EOVERFLOW; + return -1; + } + } + } +#endif + return result; +} + +#ifdef __cplusplus +} +#endif + +_GL_INLINE_HEADER_END + +#endif diff -Nru grep-3.1/lib/stat-w32.c grep-3.3/lib/stat-w32.c --- grep-3.1/lib/stat-w32.c 2017-06-25 23:19:26.000000000 +0000 +++ grep-3.3/lib/stat-w32.c 2018-09-19 05:04:26.000000000 +0000 @@ -1,5 +1,5 @@ /* Core of implementation of fstat and stat for native Windows. - Copyright (C) 2017 Free Software Foundation, Inc. + Copyright (C) 2017-2018 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 @@ -12,13 +12,13 @@ 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 . */ + along with this program. If not, see . */ /* Written by Bruno Haible. */ #include -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +#if defined _WIN32 && ! defined __CYGWIN__ /* Ensure that defines FILE_ID_INFO. */ #undef _WIN32_WINNT @@ -38,6 +38,10 @@ #include "pathmax.h" #include "verify.h" +/* Avoid warnings from gcc -Wcast-function-type. */ +#define GetProcAddress \ + (void *) GetProcAddress + #if _GL_WINDOWS_STAT_INODES == 2 /* GetFileInformationByHandleEx was introduced only in Windows Vista. */ typedef DWORD (WINAPI * GetFileInformationByHandleExFuncType) (HANDLE hFile, diff -Nru grep-3.1/lib/stat-w32.h grep-3.3/lib/stat-w32.h --- grep-3.1/lib/stat-w32.h 2017-05-14 01:09:51.000000000 +0000 +++ grep-3.3/lib/stat-w32.h 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ /* Core of implementation of fstat and stat for native Windows. - Copyright (C) 2017 Free Software Foundation, Inc. + Copyright (C) 2017-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ #ifndef _STAT_W32_H #define _STAT_W32_H 1 diff -Nru grep-3.1/lib/stdalign.in.h grep-3.3/lib/stdalign.in.h --- grep-3.1/lib/stdalign.in.h 2017-03-22 03:20:24.000000000 +0000 +++ grep-3.3/lib/stdalign.in.h 2018-01-07 00:08:02.000000000 +0000 @@ -1,6 +1,6 @@ /* A substitute for ISO C11 . - Copyright 2011-2017 Free Software Foundation, Inc. + Copyright 2011-2018 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 @@ -13,7 +13,7 @@ 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 . */ + along with this program; if not, see . */ /* Written by Paul Eggert and Bruno Haible. */ @@ -53,7 +53,7 @@ #undef _Alignof /* 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 diff -Nru grep-3.1/lib/stdarg.in.h grep-3.3/lib/stdarg.in.h --- grep-3.1/lib/stdarg.in.h 2017-01-01 11:25:48.000000000 +0000 +++ grep-3.3/lib/stdarg.in.h 2018-01-07 00:08:03.000000000 +0000 @@ -1,5 +1,5 @@ /* Substitute for and wrapper around . - Copyright (C) 2008-2017 Free Software Foundation, Inc. + Copyright (C) 2008-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program; if not, see . */ #ifndef _@GUARD_PREFIX@_STDARG_H diff -Nru grep-3.1/lib/stdbool.in.h grep-3.3/lib/stdbool.in.h --- grep-3.1/lib/stdbool.in.h 2017-01-01 11:25:48.000000000 +0000 +++ grep-3.3/lib/stdbool.in.h 2018-01-07 00:08:03.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (C) 2001-2003, 2006-2017 Free Software Foundation, Inc. +/* Copyright (C) 2001-2003, 2006-2018 Free Software Foundation, Inc. Written by Bruno Haible , 2001. This program is free software; you can redistribute it and/or modify @@ -12,7 +12,7 @@ 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 . */ + along with this program; if not, see . */ #ifndef _GL_STDBOOL_H #define _GL_STDBOOL_H @@ -82,9 +82,9 @@ /* If @HAVE__BOOL@: Some HP-UX cc and AIX IBM C compiler versions have compiler bugs when the built-in _Bool type is used. See - http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html - http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html - http://lists.gnu.org/archive/html/bug-coreutils/2005-10/msg00086.html + https://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html + https://lists.gnu.org/r/bug-coreutils/2005-11/msg00161.html + https://lists.gnu.org/r/bug-coreutils/2005-10/msg00086.html Similar bugs are likely with other compilers as well; this file wouldn't be used if was working. So we override the _Bool type. diff -Nru grep-3.1/lib/stddef.in.h grep-3.3/lib/stddef.in.h --- grep-3.1/lib/stddef.in.h 2017-01-01 11:25:48.000000000 +0000 +++ grep-3.3/lib/stddef.in.h 2018-01-07 00:08:03.000000000 +0000 @@ -1,6 +1,6 @@ /* A substitute for POSIX 2008 , for platforms that have issues. - Copyright (C) 2009-2017 Free Software Foundation, Inc. + Copyright (C) 2009-2018 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 @@ -13,7 +13,7 @@ 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 . */ + along with this program; if not, see . */ /* Written by Eric Blake. */ @@ -85,24 +85,28 @@ 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) +# if !GNULIB_defined_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 using __alignof__ (which returns 8 for double) rather than _Alignof (which returns 4), and align each union member accordingly. */ -# ifdef __GNUC__ -# define _GL_STDDEF_ALIGNAS(type) \ - __attribute__ ((__aligned__ (__alignof__ (type)))) -# else -# define _GL_STDDEF_ALIGNAS(type) /* */ -# endif +# ifdef __GNUC__ +# define _GL_STDDEF_ALIGNAS(type) \ + __attribute__ ((__aligned__ (__alignof__ (type)))) +# else +# define _GL_STDDEF_ALIGNAS(type) /* */ +# endif typedef union { char *__p _GL_STDDEF_ALIGNAS (char *); double __d _GL_STDDEF_ALIGNAS (double); long double __ld _GL_STDDEF_ALIGNAS (long double); long int __i _GL_STDDEF_ALIGNAS (long int); -} max_align_t; +} rpl_max_align_t; +# define max_align_t rpl_max_align_t +# define GNULIB_defined_max_align_t 1 +# endif #endif # endif /* _@GUARD_PREFIX@_STDDEF_H */ diff -Nru grep-3.1/lib/stdint.in.h grep-3.3/lib/stdint.in.h --- grep-3.1/lib/stdint.in.h 2017-03-17 04:34:47.000000000 +0000 +++ grep-3.3/lib/stdint.in.h 2018-01-07 00:08:03.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (C) 2001-2002, 2004-2017 Free Software Foundation, Inc. +/* Copyright (C) 2001-2002, 2004-2018 Free Software Foundation, Inc. Written by Paul Eggert, Bruno Haible, Sam Steingold, Peter Burwood. This file is part of gnulib. @@ -13,7 +13,7 @@ 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 . */ + along with this program; if not, see . */ /* * ISO C 99 for platforms that lack it. diff -Nru grep-3.1/lib/stdio-impl.h grep-3.3/lib/stdio-impl.h --- grep-3.1/lib/stdio-impl.h 2017-01-16 17:27:38.000000000 +0000 +++ grep-3.3/lib/stdio-impl.h 2018-09-19 05:04:26.000000000 +0000 @@ -1,5 +1,5 @@ /* Implementation details of FILE streams. - Copyright (C) 2007-2008, 2010-2017 Free Software Foundation, Inc. + Copyright (C) 2007-2008, 2010-2018 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 @@ -12,12 +12,18 @@ 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 . */ + along with this program. If not, see . */ /* Many stdio implementations have the same logic and therefore can share the same implementation of stdio extension API, except that some fields have different naming conventions, or their access requires some casts. */ +/* Glibc 2.28 made _IO_IN_BACKUP private. For now, work around this + problem by defining it ourselves. FIXME: Do not rely on glibc + internals. */ +#if !defined _IO_IN_BACKUP && defined _IO_EOF_SEEN +# define _IO_IN_BACKUP 0x100 +#endif /* BSD stdio derived implementations. */ @@ -32,7 +38,7 @@ /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Minix 3, Android */ # if defined __DragonFly__ /* DragonFly */ - /* See . */ + /* See . */ # define fp_ ((struct { struct __FILE_public pub; \ struct { unsigned char *_base; int _size; } _bf; \ void *cookie; \ @@ -49,30 +55,84 @@ fpos_t _offset; \ /* More fields, not relevant here. */ \ } *) fp) - /* See . */ + /* See . */ # define _p pub._p # define _flags pub._flags # define _r pub._r # define _w pub._w +# elif defined __ANDROID__ /* Android */ + /* Up to this commit from 2015-10-12 + + the innards of FILE were public, and fp_ub could be defined like for OpenBSD, + see + and . + After this commit, the innards of FILE are hidden. */ +# define fp_ ((struct { unsigned char *_p; \ + int _r; \ + int _w; \ + int _flags; \ + int _file; \ + struct { unsigned char *_base; size_t _size; } _bf; \ + int _lbfsize; \ + void *_cookie; \ + void *_close; \ + void *_read; \ + void *_seek; \ + void *_write; \ + struct { unsigned char *_base; size_t _size; } _ext; \ + unsigned char *_up; \ + int _ur; \ + unsigned char _ubuf[3]; \ + unsigned char _nbuf[1]; \ + struct { unsigned char *_base; size_t _size; } _lb; \ + int _blksize; \ + fpos_t _offset; \ + /* More fields, not relevant here. */ \ + } *) fp) # else # define fp_ fp # endif -# if (defined __NetBSD__ && __NetBSD_Version__ >= 105270000) || defined __OpenBSD__ || defined __minix || defined __ANDROID__ /* NetBSD >= 1.5ZA, OpenBSD, Minix 3, Android */ +# if (defined __NetBSD__ && __NetBSD_Version__ >= 105270000) || defined __OpenBSD__ || defined __minix /* NetBSD >= 1.5ZA, OpenBSD, Minix 3 */ /* See - and */ + and + and */ struct __sfileext { struct __sbuf _ub; /* ungetc buffer */ /* More fields, not relevant here. */ }; # define fp_ub ((struct __sfileext *) fp->_ext._base)->_ub -# else /* FreeBSD, NetBSD <= 1.5Z, DragonFly, Mac OS X, Cygwin, Android */ +# elif defined __ANDROID__ /* Android */ + struct __sfileext + { + struct { unsigned char *_base; size_t _size; } _ub; /* ungetc buffer */ + /* More fields, not relevant here. */ + }; +# define fp_ub ((struct __sfileext *) fp_->_ext._base)->_ub +# else /* FreeBSD, NetBSD <= 1.5Z, DragonFly, Mac OS X, Cygwin */ # define fp_ub fp_->_ub # endif # define HASUB(fp) (fp_ub._base != NULL) +# if defined __ANDROID__ /* Android */ + /* Needed after this commit from 2016-01-25 + */ +# ifndef __SEOF +# define __SLBF 1 +# define __SNBF 2 +# define __SRD 4 +# define __SWR 8 +# define __SRW 0x10 +# define __SEOF 0x20 +# define __SERR 0x40 +# endif +# ifndef __SOFF +# define __SOFF 0x1000 +# endif +# endif + #endif @@ -81,7 +141,7 @@ #ifdef __TANDEM /* NonStop Kernel */ # ifndef _IOERR /* These values were determined by the program 'stdioext-flags' at - . */ + . */ # define _IOERR 0x40 # define _IOREAD 0x80 # define _IOWRT 0x4 @@ -99,6 +159,8 @@ int _file; \ unsigned int _flag; \ } *) fp) +# elif defined __VMS /* OpenVMS */ +# define fp_ ((struct _iobuf *) fp) # else # define fp_ fp # endif @@ -110,7 +172,7 @@ # define _flag __flag # endif -#elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ /* newer Windows with MSVC */ +#elif defined _WIN32 && ! defined __CYGWIN__ /* newer Windows with MSVC */ /* does not define the innards of FILE any more. */ # define WINDOWS_OPAQUE_FILE @@ -130,7 +192,7 @@ # 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 diff -Nru grep-3.1/lib/stdio.in.h grep-3.3/lib/stdio.in.h --- grep-3.1/lib/stdio.in.h 2017-01-01 11:25:48.000000000 +0000 +++ grep-3.3/lib/stdio.in.h 2018-06-24 23:18:02.000000000 +0000 @@ -1,6 +1,6 @@ /* A GNU-like . - Copyright (C) 2004, 2007-2017 Free Software Foundation, Inc. + Copyright (C) 2004, 2007-2018 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 @@ -13,7 +13,7 @@ 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 . */ + along with this program; if not, see . */ #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ @@ -111,9 +111,9 @@ #define _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM(formatstring_parameter, first_argument) \ _GL_ATTRIBUTE_FORMAT ((__scanf__, formatstring_parameter, first_argument)) -/* Solaris 10 declares renameat in , not in . */ +/* Solaris 10 and NetBSD 7.0 declare renameat in , not in . */ /* But in any case avoid namespace pollution on glibc systems. */ -#if (@GNULIB_RENAMEAT@ || defined GNULIB_POSIXCHECK) && defined __sun \ +#if (@GNULIB_RENAMEAT@ || defined GNULIB_POSIXCHECK) && (defined __sun || defined __NetBSD__) \ && ! defined __GLIBC__ # include #endif @@ -122,7 +122,7 @@ 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 _WIN32 && ! defined __CYGWIN__) \ && ! defined __GLIBC__ # include #endif @@ -133,7 +133,7 @@ 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 _WIN32 && ! defined __CYGWIN__) \ && ! defined __GLIBC__ # include #endif @@ -152,7 +152,7 @@ /* When also using extern inline, suppress the use of static inline in standard headers of problematic Apple configurations, as Libc at least through Libc-825.26 (2013-04-09) mishandles it; see, e.g., - . + . Perhaps Apple will fix this some day. */ #if (defined _GL_EXTERN_INLINE_IN_USE && defined __APPLE__ \ && defined __GNUC__ && defined __STDC__) @@ -610,7 +610,7 @@ (const void *ptr, size_t s, size_t n, FILE *stream)); /* Work around bug 11959 when fortifying glibc 2.4 through 2.15 - , + , which sometimes causes an unwanted diagnostic for fwrite calls. This affects only function declaration attributes under certain versions of gcc and clang, and is not needed for C++. */ diff -Nru grep-3.1/lib/stdlib.in.h grep-3.3/lib/stdlib.in.h --- grep-3.1/lib/stdlib.in.h 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/lib/stdlib.in.h 2018-12-15 18:14:26.000000000 +0000 @@ -1,6 +1,6 @@ /* A GNU-like . - Copyright (C) 1995, 2001-2004, 2006-2017 Free Software Foundation, Inc. + Copyright (C) 1995, 2001-2004, 2006-2018 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 @@ -13,7 +13,7 @@ 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 . */ + along with this program. If not, see . */ #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ @@ -47,11 +47,14 @@ /* Solaris declares getloadavg() in . */ #if (@GNULIB_GETLOADAVG@ || defined GNULIB_POSIXCHECK) && @HAVE_SYS_LOADAVG_H@ +/* OpenIndiana has a bug: must be included before + . */ +# include # include #endif /* Native Windows platforms declare mktemp() in . */ -#if 0 && ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) +#if 0 && (defined _WIN32 && ! defined __CYGWIN__) # include #endif @@ -87,9 +90,10 @@ # endif #endif -#if (@GNULIB_MKSTEMP@ || @GNULIB_MKSTEMPS@ || @GNULIB_GETSUBOPT@ || defined GNULIB_POSIXCHECK) && ! defined __GLIBC__ && !((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) +#if (@GNULIB_MKSTEMP@ || @GNULIB_MKSTEMPS@ || @GNULIB_MKOSTEMP@ || @GNULIB_MKOSTEMPS@ || @GNULIB_GETSUBOPT@ || defined GNULIB_POSIXCHECK) && ! defined __GLIBC__ && !(defined _WIN32 && ! defined __CYGWIN__) /* On Mac OS X 10.3, only declares mkstemp. */ /* On Mac OS X 10.5, only declares mkstemps. */ +/* On Mac OS X 10.13, only declares mkostemp and mkostemps. */ /* On Cygwin 1.7.1, only declares getsubopt. */ /* But avoid namespace pollution on glibc systems and native Windows. */ # include @@ -597,7 +601,7 @@ #endif #if @GNULIB_RANDOM@ -# if !@HAVE_RANDOM@ +# if !@HAVE_RANDOM@ || !@HAVE_DECL_INITSTATE@ _GL_FUNCDECL_SYS (initstate, char *, (unsigned int seed, char *buf, size_t buf_size) _GL_ARG_NONNULL ((2))); @@ -614,7 +618,7 @@ #endif #if @GNULIB_RANDOM@ -# if !@HAVE_RANDOM@ +# if !@HAVE_RANDOM@ || !@HAVE_DECL_SETSTATE@ _GL_FUNCDECL_SYS (setstate, char *, (char *arg_state) _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (setstate, char *, (char *arg_state)); @@ -765,6 +769,23 @@ "use gnulib module realloc-posix for portability"); #endif + +#if @GNULIB_REALLOCARRAY@ +# if ! @HAVE_REALLOCARRAY@ +_GL_FUNCDECL_SYS (reallocarray, void *, + (void *ptr, size_t nmemb, size_t size)); +# endif +_GL_CXXALIAS_SYS (reallocarray, void *, + (void *ptr, size_t nmemb, size_t size)); +_GL_CXXALIASWARN (reallocarray); +#elif defined GNULIB_POSIXCHECK +# undef reallocarray +# if HAVE_RAW_DECL_REALLOCARRAY +_GL_WARN_ON_USE (reallocarray, "reallocarray is not portable - " + "use gnulib module reallocarray for portability"); +# endif +#endif + #if @GNULIB_REALPATH@ # if @REPLACE_REALPATH@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) diff -Nru grep-3.1/lib/stpcpy.c grep-3.3/lib/stpcpy.c --- grep-3.1/lib/stpcpy.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/lib/stpcpy.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ /* stpcpy.c -- copy a string and return pointer to end of new string - Copyright (C) 1992, 1995, 1997-1998, 2006, 2009-2017 Free Software + Copyright (C) 1992, 1995, 1997-1998, 2006, 2009-2018 Free Software Foundation, Inc. NOTE: The canonical source of this file is maintained with the GNU C Library. @@ -16,7 +16,7 @@ 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 . */ + along with this program. If not, see . */ #include diff -Nru grep-3.1/lib/strdup.c grep-3.3/lib/strdup.c --- grep-3.1/lib/strdup.c 2017-01-01 11:25:48.000000000 +0000 +++ grep-3.3/lib/strdup.c 2018-01-07 00:08:03.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1996-1998, 2002-2004, 2006-2007, 2009-2017 Free Software +/* Copyright (C) 1991, 1996-1998, 2002-2004, 2006-2007, 2009-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -14,7 +14,7 @@ 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 . */ + with this program; if not, see . */ #ifndef _LIBC # include diff -Nru grep-3.1/lib/streq.h grep-3.3/lib/streq.h --- grep-3.1/lib/streq.h 2017-01-01 11:25:48.000000000 +0000 +++ grep-3.3/lib/streq.h 2018-01-07 00:08:03.000000000 +0000 @@ -1,5 +1,5 @@ /* Optimized string comparison. - Copyright (C) 2001-2002, 2007, 2009-2017 Free Software Foundation, Inc. + Copyright (C) 2001-2002, 2007, 2009-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ /* Written by Bruno Haible . */ diff -Nru grep-3.1/lib/strerror.c grep-3.3/lib/strerror.c --- grep-3.1/lib/strerror.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/lib/strerror.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,6 +1,6 @@ /* strerror.c --- POSIX compatible system error routine - Copyright (C) 2007-2017 Free Software Foundation, Inc. + Copyright (C) 2007-2018 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 @@ -13,7 +13,7 @@ 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 . */ + along with this program. If not, see . */ #include diff -Nru grep-3.1/lib/strerror-override.c grep-3.3/lib/strerror-override.c --- grep-3.1/lib/strerror-override.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/lib/strerror-override.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,6 +1,6 @@ /* strerror-override.c --- POSIX compatible system error routine - Copyright (C) 2010-2017 Free Software Foundation, Inc. + Copyright (C) 2010-2018 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 @@ -13,7 +13,7 @@ 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 . */ + along with this program. If not, see . */ /* Written by Bruno Haible , 2010. */ diff -Nru grep-3.1/lib/strerror-override.h grep-3.3/lib/strerror-override.h --- grep-3.1/lib/strerror-override.h 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/lib/strerror-override.h 2018-01-07 00:07:08.000000000 +0000 @@ -1,6 +1,6 @@ /* strerror-override.h --- POSIX compatible system error routine - Copyright (C) 2010-2017 Free Software Foundation, Inc. + Copyright (C) 2010-2018 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 @@ -13,7 +13,7 @@ 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 . */ + along with this program. If not, see . */ #ifndef _GL_STRERROR_OVERRIDE_H # define _GL_STRERROR_OVERRIDE_H diff -Nru grep-3.1/lib/striconv.c grep-3.3/lib/striconv.c --- grep-3.1/lib/striconv.c 2017-01-01 11:25:48.000000000 +0000 +++ grep-3.3/lib/striconv.c 2018-01-07 00:08:03.000000000 +0000 @@ -1,5 +1,5 @@ /* Charset conversion. - Copyright (C) 2001-2007, 2010-2017 Free Software Foundation, Inc. + Copyright (C) 2001-2007, 2010-2018 Free Software Foundation, Inc. Written by Bruno Haible and Simon Josefsson. This program is free software; you can redistribute it and/or modify @@ -13,7 +13,7 @@ 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 . */ + along with this program; if not, see . */ #include diff -Nru grep-3.1/lib/striconv.h grep-3.3/lib/striconv.h --- grep-3.1/lib/striconv.h 2017-01-01 11:25:48.000000000 +0000 +++ grep-3.3/lib/striconv.h 2018-01-07 00:08:03.000000000 +0000 @@ -1,5 +1,5 @@ /* Charset conversion. - Copyright (C) 2001-2004, 2006-2007, 2009-2017 Free Software Foundation, Inc. + Copyright (C) 2001-2004, 2006-2007, 2009-2018 Free Software Foundation, Inc. Written by Bruno Haible and Simon Josefsson. This program is free software; you can redistribute it and/or modify @@ -13,7 +13,7 @@ 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 . */ + along with this program; if not, see . */ #ifndef _STRICONV_H #define _STRICONV_H diff -Nru grep-3.1/lib/string.in.h grep-3.3/lib/string.in.h --- grep-3.1/lib/string.in.h 2017-01-01 11:25:48.000000000 +0000 +++ grep-3.3/lib/string.in.h 2018-01-07 00:08:03.000000000 +0000 @@ -1,6 +1,6 @@ /* A GNU-like . - Copyright (C) 1995-1996, 2001-2017 Free Software Foundation, Inc. + Copyright (C) 1995-1996, 2001-2018 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 @@ -13,7 +13,7 @@ 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 . */ + along with this program; if not, see . */ #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ @@ -74,6 +74,23 @@ /* The definition of _GL_WARN_ON_USE is copied here. */ +/* Clear a block of memory. The compiler will not delete a call to + this function, even if the block is dead after the call. */ +#if @GNULIB_EXPLICIT_BZERO@ +# if ! @HAVE_EXPLICIT_BZERO@ +_GL_FUNCDECL_SYS (explicit_bzero, void, + (void *__dest, size_t __n) _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (explicit_bzero, void, (void *__dest, size_t __n)); +_GL_CXXALIASWARN (explicit_bzero); +#elif defined GNULIB_POSIXCHECK +# undef explicit_bzero +# if HAVE_RAW_DECL_EXPLICIT_BZERO +_GL_WARN_ON_USE (explicit_bzero, "explicit_bzero is unportable - " + "use gnulib module explicit_bzero for portability"); +# endif +#endif + /* Find the index of the least-significant set bit. */ #if @GNULIB_FFSL@ # if !@HAVE_FFSL@ diff -Nru grep-3.1/lib/stripslash.c grep-3.3/lib/stripslash.c --- grep-3.1/lib/stripslash.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/lib/stripslash.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,6 +1,6 @@ /* stripslash.c -- remove redundant trailing slashes from a file name - Copyright (C) 1990, 2001, 2003-2006, 2009-2017 Free Software Foundation, + Copyright (C) 1990, 2001, 2003-2006, 2009-2018 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify @@ -14,7 +14,7 @@ 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 . */ + along with this program. If not, see . */ #include diff -Nru grep-3.1/lib/str-kmp.h grep-3.3/lib/str-kmp.h --- grep-3.1/lib/str-kmp.h 2017-01-01 11:25:48.000000000 +0000 +++ grep-3.3/lib/str-kmp.h 2018-01-07 00:08:03.000000000 +0000 @@ -1,6 +1,6 @@ /* Substring search in a NUL terminated string of UNIT elements, using the Knuth-Morris-Pratt algorithm. - Copyright (C) 2005-2017 Free Software Foundation, Inc. + Copyright (C) 2005-2018 Free Software Foundation, Inc. Written by Bruno Haible , 2005. This program is free software; you can redistribute it and/or modify @@ -14,7 +14,7 @@ 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 . */ + along with this program; if not, see . */ /* Before including this file, you need to define: UNIT The element type of the needle and haystack. @@ -24,7 +24,7 @@ of type UNIT as well. */ /* Knuth-Morris-Pratt algorithm. - See http://en.wikipedia.org/wiki/Knuth-Morris-Pratt_algorithm + See https://en.wikipedia.org/wiki/Knuth-Morris-Pratt_algorithm HAYSTACK is the NUL terminated string in which to search for. NEEDLE is the string to search for in HAYSTACK, consisting of NEEDLE_LEN units. diff -Nru grep-3.1/lib/strnlen1.c grep-3.3/lib/strnlen1.c --- grep-3.1/lib/strnlen1.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/lib/strnlen1.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ /* Find the length of STRING + 1, but scan at most MAXLEN bytes. - Copyright (C) 2005-2006, 2009-2017 Free Software Foundation, Inc. + Copyright (C) 2005-2006, 2009-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ #include diff -Nru grep-3.1/lib/strnlen1.h grep-3.3/lib/strnlen1.h --- grep-3.1/lib/strnlen1.h 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/lib/strnlen1.h 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ /* Find the length of STRING + 1, but scan at most MAXLEN bytes. - Copyright (C) 2005, 2009-2017 Free Software Foundation, Inc. + Copyright (C) 2005, 2009-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ #ifndef _STRNLEN1_H #define _STRNLEN1_H diff -Nru grep-3.1/lib/strnlen.c grep-3.3/lib/strnlen.c --- grep-3.1/lib/strnlen.c 2017-01-01 11:25:48.000000000 +0000 +++ grep-3.3/lib/strnlen.c 2018-01-07 00:08:03.000000000 +0000 @@ -1,5 +1,5 @@ /* Find the length of STRING, but scan at most MAXLEN characters. - Copyright (C) 2005-2007, 2009-2017 Free Software Foundation, Inc. + Copyright (C) 2005-2007, 2009-2018 Free Software Foundation, Inc. Written by Simon Josefsson. This program is free software; you can redistribute it and/or modify @@ -13,7 +13,7 @@ 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 . */ + along with this program; if not, see . */ #include diff -Nru grep-3.1/lib/strstr.c grep-3.3/lib/strstr.c --- grep-3.1/lib/strstr.c 2017-01-01 11:25:48.000000000 +0000 +++ grep-3.3/lib/strstr.c 2018-01-07 00:08:03.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-1994, 1996-1998, 2000, 2004, 2007-2017 Free Software +/* Copyright (C) 1991-1994, 1996-1998, 2000, 2004, 2007-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -13,7 +13,7 @@ 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 . */ + with this program; if not, see . */ /* This particular implementation was written by Eric Blake, 2008. */ diff -Nru grep-3.1/lib/strtoimax.c grep-3.3/lib/strtoimax.c --- grep-3.1/lib/strtoimax.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/lib/strtoimax.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,6 +1,6 @@ /* Convert string representation of a number into an intmax_t value. - Copyright (C) 1999, 2001-2004, 2006, 2009-2017 Free Software Foundation, + Copyright (C) 1999, 2001-2004, 2006, 2009-2018 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify @@ -14,7 +14,7 @@ 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 . */ + along with this program. If not, see . */ /* Written by Paul Eggert. */ diff -Nru grep-3.1/lib/strtol.c grep-3.3/lib/strtol.c --- grep-3.1/lib/strtol.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/lib/strtol.c 2018-09-19 05:04:26.000000000 +0000 @@ -1,6 +1,6 @@ /* Convert string representation of a number into an integer value. - Copyright (C) 1991-1992, 1994-1999, 2003, 2005-2007, 2009-2017 Free Software + Copyright (C) 1991-1992, 1994-1999, 2003, 2005-2007, 2009-2018 Free Software Foundation, Inc. NOTE: The canonical source of this file is maintained with the GNU C @@ -17,7 +17,7 @@ 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 . */ + along with this program. If not, see . */ #ifdef _LIBC # define USE_NUMBER_GROUPING @@ -117,35 +117,6 @@ # define STRTOL_LONG_MIN LLONG_MIN # define STRTOL_LONG_MAX LLONG_MAX # define STRTOL_ULONG_MAX ULLONG_MAX - -/* The extra casts in the following macros work around compiler bugs, - e.g., in Cray C 5.0.3.0. */ - -/* True if the arithmetic type T is signed. */ -# define TYPE_SIGNED(t) (! ((t) 0 < (t) -1)) - -/* Minimum and maximum values for integer types. - These macros have undefined behavior for signed types that either - have padding bits or do not use two's complement. If this is a - problem for you, please let us know how to fix it for your host. */ - -/* The maximum and minimum values for the integer type 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))) - -# ifndef ULLONG_MAX -# define ULLONG_MAX TYPE_MAXIMUM (unsigned long long) -# endif -# ifndef LLONG_MAX -# define LLONG_MAX TYPE_MAXIMUM (long long int) -# endif -# ifndef LLONG_MIN -# define LLONG_MIN TYPE_MINIMUM (long long int) -# endif - # if __GNUC__ == 2 && __GNUC_MINOR__ < 7 /* Work around gcc bug with using this constant. */ static const unsigned long long int maxquad = ULLONG_MAX; diff -Nru grep-3.1/lib/strtoll.c grep-3.3/lib/strtoll.c --- grep-3.1/lib/strtoll.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/lib/strtoll.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ /* Function to parse a 'long long int' from text. - Copyright (C) 1995-1997, 1999, 2001, 2009-2017 Free Software Foundation, + Copyright (C) 1995-1997, 1999, 2001, 2009-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -14,7 +14,7 @@ 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 . */ + along with this program. If not, see . */ #define QUAD 1 diff -Nru grep-3.1/lib/strtoul.c grep-3.3/lib/strtoul.c --- grep-3.1/lib/strtoul.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/lib/strtoul.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1997, 2009-2017 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1997, 2009-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ #define UNSIGNED 1 diff -Nru grep-3.1/lib/strtoull.c grep-3.3/lib/strtoull.c --- grep-3.1/lib/strtoull.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/lib/strtoull.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ /* Function to parse an 'unsigned long long int' from text. - Copyright (C) 1995-1997, 1999, 2009-2017 Free Software Foundation, Inc. + Copyright (C) 1995-1997, 1999, 2009-2018 Free Software Foundation, Inc. NOTE: The canonical source of this file is maintained with the GNU C Library. Bugs can be reported to bug-glibc@gnu.org. @@ -14,7 +14,7 @@ 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 . */ + along with this program. If not, see . */ #define QUAD 1 diff -Nru grep-3.1/lib/str-two-way.h grep-3.3/lib/str-two-way.h --- grep-3.1/lib/str-two-way.h 2017-01-01 11:25:48.000000000 +0000 +++ grep-3.3/lib/str-two-way.h 2018-01-07 00:08:03.000000000 +0000 @@ -1,5 +1,5 @@ /* Byte-wise substring search, using the Two-Way algorithm. - Copyright (C) 2008-2017 Free Software Foundation, Inc. + Copyright (C) 2008-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. Written by Eric Blake , 2008. @@ -14,7 +14,7 @@ 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 . */ + with this program; if not, see . */ /* Before including this file, you need to include and , and define: @@ -50,8 +50,8 @@ achieve improved (potentially sub-linear) performance. See http://www-igm.univ-mlv.fr/~lecroq/string/node26.html#SECTION00260, - http://en.wikipedia.org/wiki/Boyer-Moore_string_search_algorithm, - http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.34.6641&rep=rep1&type=pdf + https://en.wikipedia.org/wiki/Boyer-Moore_string_search_algorithm, + https://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.34.6641&rep=rep1&type=pdf */ /* Point at which computing a bad-byte shift table is likely to be diff -Nru grep-3.1/lib/sys-limits.h grep-3.3/lib/sys-limits.h --- grep-3.1/lib/sys-limits.h 1970-01-01 00:00:00.000000000 +0000 +++ grep-3.3/lib/sys-limits.h 2018-06-24 23:17:59.000000000 +0000 @@ -0,0 +1,42 @@ +/* System call limits + + Copyright 2018 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 _SYS_LIMITS_H +#define _SYS_LIMITS_H + +#include + +/* Maximum number of bytes to read or write in a single system call. + This can be useful for system calls like sendfile on GNU/Linux, + which do not handle more than MAX_RW_COUNT bytes correctly. + The Linux kernel MAX_RW_COUNT is at least INT_MAX >> 20 << 20, + where the 20 comes from the Hexagon port with 1 MiB pages; use that + as an approximation, as the exact value may not be available to us. + + Using this also works around a serious Linux bug before 2.6.16; see + . + + Using this also works around a Tru64 5.1 bug, where attempting + to read INT_MAX bytes fails with errno == EINVAL. See + . + + Using this is likely to work around similar bugs in other operating + systems. */ + +enum { SYS_BUFSIZE_MAX = INT_MAX >> 20 << 20 }; + +#endif diff -Nru grep-3.1/lib/sys_stat.in.h grep-3.3/lib/sys_stat.in.h --- grep-3.1/lib/sys_stat.in.h 2017-05-14 01:10:19.000000000 +0000 +++ grep-3.3/lib/sys_stat.in.h 2018-06-24 23:18:02.000000000 +0000 @@ -1,5 +1,5 @@ /* Provide a more complete sys/stat.h header file. - Copyright (C) 2005-2017 Free Software Foundation, Inc. + Copyright (C) 2005-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program; if not, see . */ /* Written by Eric Blake, Paul Eggert, and Jim Meyering. */ @@ -57,13 +57,13 @@ /* Before doing "#define mkdir rpl_mkdir" below, we need to include all headers that may declare mkdir(). Native Windows platforms declare mkdir in and/or , not in . */ -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +#if defined _WIN32 && ! defined __CYGWIN__ # include /* mingw32, mingw64 */ # include /* mingw64, MSVC 9 */ #endif /* Native Windows platforms declare umask() in . */ -#if 0 && ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) +#if 0 && (defined _WIN32 && ! defined __CYGWIN__) # include #endif @@ -576,7 +576,7 @@ Additionally, it declares _mkdir (and depending on compile flags, an alias mkdir), only in the nonstandard includes and , which are included above. */ -# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +# if defined _WIN32 && ! defined __CYGWIN__ # if !GNULIB_defined_rpl_mkdir static int diff -Nru grep-3.1/lib/sys_types.in.h grep-3.3/lib/sys_types.in.h --- grep-3.1/lib/sys_types.in.h 2017-05-21 00:32:48.000000000 +0000 +++ grep-3.3/lib/sys_types.in.h 2018-09-19 05:05:05.000000000 +0000 @@ -1,6 +1,6 @@ /* Provide a more complete sys/types.h. - Copyright (C) 2011-2017 Free Software Foundation, Inc. + Copyright (C) 2011-2018 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 @@ -13,13 +13,24 @@ 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 . */ + along with this program; if not, see . */ #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ #endif @PRAGMA_COLUMNS@ +#if defined _WIN32 && !defined __CYGWIN__ \ + && (defined __need_off_t || defined __need___off64_t \ + || defined __need_ssize_t || defined __need_time_t) + +/* Special invocation convention inside mingw header files. */ + +#@INCLUDE_NEXT@ @NEXT_SYS_TYPES_H@ + +#else +/* Normal invocation convention. */ + #ifndef _@GUARD_PREFIX@_SYS_TYPES_H /* The include_next requires a split double-inclusion guard. */ @@ -86,10 +97,10 @@ /* MSVC 9 defines size_t in , not in . */ /* But avoid namespace pollution on glibc systems. */ -#if ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) \ - && ! defined __GLIBC__ +#if (defined _WIN32 && ! defined __CYGWIN__) && ! defined __GLIBC__ # include #endif #endif /* _@GUARD_PREFIX@_SYS_TYPES_H */ #endif /* _@GUARD_PREFIX@_SYS_TYPES_H */ +#endif /* __need_XXX */ diff -Nru grep-3.1/lib/time.in.h grep-3.3/lib/time.in.h --- grep-3.1/lib/time.in.h 2017-05-14 01:10:19.000000000 +0000 +++ grep-3.3/lib/time.in.h 2018-12-21 02:52:39.000000000 +0000 @@ -1,6 +1,6 @@ /* A more-standard . - Copyright (C) 2007-2017 Free Software Foundation, Inc. + Copyright (C) 2007-2018 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 @@ -13,7 +13,7 @@ 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 . */ + along with this program; if not, see . */ #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ @@ -48,7 +48,7 @@ /* The definition of _GL_WARN_ON_USE is copied here. */ -/* Some systems don't define struct timespec (e.g., AIX 4.1, Ultrix 4.3). +/* Some systems don't define struct timespec (e.g., AIX 4.1). Or they define it with the wrong member names or define it in (e.g., FreeBSD circa 1997). Stock Mingw prior to 3.0 does not define it, but the pthreads-win32 library defines it in . */ @@ -212,7 +212,7 @@ # define localtime rpl_localtime # endif _GL_FUNCDECL_RPL (localtime, struct tm *, (time_t const *__timer) - _GL_ARG_NONNULL ((1))); + _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (localtime, struct tm *, (time_t const *__timer)); # else _GL_CXXALIAS_SYS (localtime, struct tm *, (time_t const *__timer)); diff -Nru grep-3.1/lib/trim.c grep-3.3/lib/trim.c --- grep-3.1/lib/trim.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/lib/trim.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ /* Removes leading and/or trailing whitespaces - Copyright (C) 2006-2017 Free Software Foundation, Inc. + Copyright (C) 2006-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ /* Written by Davide Angelocola */ diff -Nru grep-3.1/lib/trim.h grep-3.3/lib/trim.h --- grep-3.1/lib/trim.h 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/lib/trim.h 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ /* Removes leading and/or trailing whitespaces - Copyright (C) 2006, 2009-2017 Free Software Foundation, Inc. + Copyright (C) 2006, 2009-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ /* Written by Davide Angelocola */ diff -Nru grep-3.1/lib/unistd--.h grep-3.3/lib/unistd--.h --- grep-3.1/lib/unistd--.h 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/lib/unistd--.h 2018-01-07 00:07:08.000000000 +0000 @@ -1,6 +1,6 @@ /* Like unistd.h, but redefine some names to avoid glitches. - Copyright (C) 2005, 2009-2017 Free Software Foundation, Inc. + Copyright (C) 2005, 2009-2018 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 @@ -13,7 +13,7 @@ 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 . */ + along with this program. If not, see . */ /* Written by Paul Eggert. */ diff -Nru grep-3.1/lib/unistd.in.h grep-3.3/lib/unistd.in.h --- grep-3.1/lib/unistd.in.h 2017-05-14 01:10:19.000000000 +0000 +++ grep-3.3/lib/unistd.in.h 2018-09-19 05:05:05.000000000 +0000 @@ -1,5 +1,5 @@ /* Substitute for and wrapper around . - Copyright (C) 2003-2017 Free Software Foundation, Inc. + Copyright (C) 2003-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program; if not, see . */ #ifndef _@GUARD_PREFIX@_UNISTD_H @@ -61,7 +61,7 @@ /* 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__)) \ + && (defined _WIN32 && ! defined __CYGWIN__)) \ || ((@GNULIB_SYMLINKAT@ || defined GNULIB_POSIXCHECK) \ && defined __CYGWIN__)) \ && ! defined __GLIBC__ @@ -94,13 +94,13 @@ lseek(), read(), unlink(), write() in . */ #if ((@GNULIB_CHDIR@ || @GNULIB_GETCWD@ || @GNULIB_RMDIR@ \ || defined GNULIB_POSIXCHECK) \ - && ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__)) + && (defined _WIN32 && ! defined __CYGWIN__)) # include /* mingw32, mingw64 */ # include /* mingw64, MSVC 9 */ #elif (@GNULIB_CLOSE@ || @GNULIB_DUP@ || @GNULIB_DUP2@ || @GNULIB_ISATTY@ \ || @GNULIB_LSEEK@ || @GNULIB_READ@ || @GNULIB_UNLINK@ || @GNULIB_WRITE@ \ || defined GNULIB_POSIXCHECK) \ - && ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) + && (defined _WIN32 && ! defined __CYGWIN__) # include #endif @@ -134,9 +134,8 @@ /* 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 +/* Get getopt(), optarg, optind, opterr, optopt. */ +#if @GNULIB_UNISTD_H_GETOPT@ && !defined _GL_SYSTEM_GETOPT # include # include #endif @@ -379,7 +378,7 @@ Close NEWFD first if it is open. Return newfd if successful, otherwise -1 and errno set. See the Linux man page at - . */ + . */ # if @HAVE_DUP3@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define dup3 rpl_dup3 @@ -401,6 +400,13 @@ #if @GNULIB_ENVIRON@ +# if defined __CYGWIN__ && !defined __i386__ +/* The 'environ' variable is defined in a DLL. Therefore its declaration needs + the '__declspec(dllimport)' attribute, but the system's lacks it. + This leads to a link error on 64-bit Cygwin when the option + -Wl,--disable-auto-import is in use. */ +_GL_EXTERN_C __declspec(dllimport) char **environ; +# endif # if !@HAVE_DECL_ENVIRON@ /* Set of environment variables and values. An array of strings of the form "VARIABLE=VALUE", terminated with a NULL. */ @@ -426,12 +432,12 @@ #elif defined GNULIB_POSIXCHECK # if HAVE_RAW_DECL_ENVIRON _GL_UNISTD_INLINE char *** +_GL_WARN_ON_USE_ATTRIBUTE ("environ is unportable - " + "use gnulib module environ for portability") rpl_environ (void) { return &environ; } -_GL_WARN_ON_USE (rpl_environ, "environ is unportable - " - "use gnulib module environ for portability"); # undef environ # define environ (*rpl_environ ()) # endif @@ -462,13 +468,25 @@ #if @GNULIB_FACCESSAT@ -# if !@HAVE_FACCESSAT@ +# if @REPLACE_FACCESSAT@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef faccessat +# define faccessat rpl_faccessat +# endif +_GL_FUNCDECL_RPL (faccessat, int, + (int fd, char const *name, int mode, int flag) + _GL_ARG_NONNULL ((2))); +_GL_CXXALIAS_RPL (faccessat, int, + (int fd, char const *name, int mode, int flag)); +# else +# if !@HAVE_FACCESSAT@ _GL_FUNCDECL_SYS (faccessat, int, (int fd, char const *file, int mode, int flag) _GL_ARG_NONNULL ((2))); -# endif +# endif _GL_CXXALIAS_SYS (faccessat, int, (int fd, char const *file, int mode, int flag)); +# endif _GL_CXXALIASWARN (faccessat); #elif defined GNULIB_POSIXCHECK # undef faccessat @@ -917,6 +935,36 @@ #endif +#if @GNULIB_GETPASS@ +/* Function getpass() from module 'getpass': + Read a password from /dev/tty or stdin. + Function getpass() from module 'getpass-gnu': + Read a password of arbitrary length from /dev/tty or stdin. */ +# if @REPLACE_GETPASS@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef getpass +# define getpass rpl_getpass +# endif +_GL_FUNCDECL_RPL (getpass, char *, (const char *prompt) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (getpass, char *, (const char *prompt)); +# else +# if !@HAVE_GETPASS@ +_GL_FUNCDECL_SYS (getpass, char *, (const char *prompt) + _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (getpass, char *, (const char *prompt)); +# endif +_GL_CXXALIASWARN (getpass); +#elif defined GNULIB_POSIXCHECK +# undef getpass +# if HAVE_RAW_DECL_GETPASS +_GL_WARN_ON_USE (getpass, "getpass is unportable - " + "use gnulib module getpass or getpass-gnu for portability"); +# endif +#endif + + #if @GNULIB_GETUSERSHELL@ /* Return the next valid login shell on the system, or NULL when the end of the list has been reached. */ @@ -1149,7 +1197,7 @@ Store the read-end as fd[0] and the write-end as fd[1]. Return 0 upon success, or -1 with errno set upon failure. See also the Linux man page at - . */ + . */ # if @HAVE_PIPE2@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define pipe2 rpl_pipe2 @@ -1471,7 +1519,7 @@ _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (truncate, int, (const char *filename, off_t length)); # else -# if !@HAVE_TRUNCATE@ +# if !@HAVE_DECL_TRUNCATE@ _GL_FUNCDECL_SYS (truncate, int, (const char *filename, off_t length) _GL_ARG_NONNULL ((1))); # endif diff -Nru grep-3.1/lib/unistd-safer.h grep-3.3/lib/unistd-safer.h --- grep-3.1/lib/unistd-safer.h 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/lib/unistd-safer.h 2018-01-07 00:07:08.000000000 +0000 @@ -1,6 +1,6 @@ /* Invoke unistd-like functions, but avoid some glitches. - Copyright (C) 2001, 2003, 2005, 2009-2017 Free Software Foundation, Inc. + Copyright (C) 2001, 2003, 2005, 2009-2018 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 @@ -13,7 +13,7 @@ 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 . */ + along with this program. If not, see . */ /* Written by Paul Eggert and Eric Blake. */ diff -Nru grep-3.1/lib/unistr/u8-mbtoucr.c grep-3.3/lib/unistr/u8-mbtoucr.c --- grep-3.1/lib/unistr/u8-mbtoucr.c 2017-01-01 11:25:48.000000000 +0000 +++ grep-3.3/lib/unistr/u8-mbtoucr.c 2018-01-07 00:08:03.000000000 +0000 @@ -1,5 +1,5 @@ /* Look at first character in UTF-8 string, returning an error code. - Copyright (C) 1999-2002, 2006-2007, 2009-2017 Free Software Foundation, Inc. + Copyright (C) 1999-2002, 2006-2007, 2009-2018 Free Software Foundation, Inc. Written by Bruno Haible , 2001. This program is free software: you can redistribute it and/or modify it @@ -13,7 +13,7 @@ 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 . */ + along with this program. If not, see . */ #include diff -Nru grep-3.1/lib/unistr/u8-uctomb-aux.c grep-3.3/lib/unistr/u8-uctomb-aux.c --- grep-3.1/lib/unistr/u8-uctomb-aux.c 2017-05-21 00:32:48.000000000 +0000 +++ grep-3.3/lib/unistr/u8-uctomb-aux.c 2018-01-07 00:08:03.000000000 +0000 @@ -1,5 +1,5 @@ /* Conversion UCS-4 to UTF-8. - Copyright (C) 2002, 2006-2007, 2009-2017 Free Software Foundation, Inc. + Copyright (C) 2002, 2006-2007, 2009-2018 Free Software Foundation, Inc. Written by Bruno Haible , 2002. This program is free software: you can redistribute it and/or modify it @@ -13,7 +13,7 @@ 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 . */ + along with this program. If not, see . */ #include diff -Nru grep-3.1/lib/unistr/u8-uctomb.c grep-3.3/lib/unistr/u8-uctomb.c --- grep-3.1/lib/unistr/u8-uctomb.c 2017-01-01 11:25:48.000000000 +0000 +++ grep-3.3/lib/unistr/u8-uctomb.c 2018-01-07 00:08:03.000000000 +0000 @@ -1,5 +1,5 @@ /* Store a character in UTF-8 string. - Copyright (C) 2002, 2005-2006, 2009-2017 Free Software Foundation, Inc. + Copyright (C) 2002, 2005-2006, 2009-2018 Free Software Foundation, Inc. Written by Bruno Haible , 2002. This program is free software: you can redistribute it and/or modify it @@ -13,7 +13,7 @@ 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 . */ + along with this program. If not, see . */ #include diff -Nru grep-3.1/lib/unistr.in.h grep-3.3/lib/unistr.in.h --- grep-3.1/lib/unistr.in.h 2017-01-01 11:25:48.000000000 +0000 +++ grep-3.3/lib/unistr.in.h 2018-01-07 00:08:03.000000000 +0000 @@ -1,5 +1,5 @@ /* Elementary Unicode string functions. - Copyright (C) 2001-2002, 2005-2017 Free Software Foundation, Inc. + Copyright (C) 2001-2002, 2005-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ #ifndef _UNISTR_H #define _UNISTR_H @@ -137,8 +137,8 @@ The number of available units, N, must be > 0. */ /* Similar to mbtowc(), except that puc and s must not be NULL, n must be > 0, and the NUL character is not treated specially. */ -/* The variants with _safe suffix are safe, even if the library is compiled - without --enable-safety. */ +/* The variants with _unsafe suffix are for backward compatibility with + libunistring versions < 0.9.7. */ #if GNULIB_UNISTR_U8_MBTOUC_UNSAFE || HAVE_LIBUNISTRING # if !HAVE_INLINE diff -Nru grep-3.1/lib/unitypes.in.h grep-3.3/lib/unitypes.in.h --- grep-3.1/lib/unitypes.in.h 2017-01-01 11:25:48.000000000 +0000 +++ grep-3.3/lib/unitypes.in.h 2018-01-07 00:08:03.000000000 +0000 @@ -1,5 +1,5 @@ /* Elementary types and macros for the GNU UniString library. - Copyright (C) 2002, 2005-2006, 2009-2017 Free Software Foundation, Inc. + Copyright (C) 2002, 2005-2006, 2009-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ #ifndef _UNITYPES_H #define _UNITYPES_H diff -Nru grep-3.1/lib/uniwidth/cjk.h grep-3.3/lib/uniwidth/cjk.h --- grep-3.1/lib/uniwidth/cjk.h 2017-01-01 11:25:48.000000000 +0000 +++ grep-3.3/lib/uniwidth/cjk.h 2018-01-07 00:08:03.000000000 +0000 @@ -1,5 +1,5 @@ /* Test for CJK encoding. - Copyright (C) 2001-2002, 2005-2007, 2009-2017 Free Software Foundation, Inc. + Copyright (C) 2001-2002, 2005-2007, 2009-2018 Free Software Foundation, Inc. Written by Bruno Haible , 2002. This program is free software: you can redistribute it and/or modify it @@ -13,7 +13,7 @@ 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 . */ + along with this program. If not, see . */ #include "streq.h" diff -Nru grep-3.1/lib/uniwidth/width.c grep-3.3/lib/uniwidth/width.c --- grep-3.1/lib/uniwidth/width.c 2017-01-01 11:25:48.000000000 +0000 +++ grep-3.3/lib/uniwidth/width.c 2018-01-07 00:08:03.000000000 +0000 @@ -1,5 +1,5 @@ /* Determine display width of Unicode character. - Copyright (C) 2001-2002, 2006-2017 Free Software Foundation, Inc. + Copyright (C) 2001-2002, 2006-2018 Free Software Foundation, Inc. Written by Bruno Haible , 2002. This program is free software: you can redistribute it and/or modify it @@ -13,7 +13,7 @@ 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 . */ + along with this program. If not, see . */ #include @@ -32,7 +32,7 @@ * - Zero width characters; generated from * "grep '^[^;]*;ZERO WIDTH ' UnicodeData.txt" */ -static const unsigned char nonspacing_table_data[36*64] = { +static const unsigned char nonspacing_table_data[38*64] = { /* 0x0000-0x01ff */ 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, /* 0x0000-0x003f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, /* 0x0040-0x007f */ @@ -73,7 +73,7 @@ 0x00, 0x00, 0xc0, 0xfb, 0xef, 0x3e, 0x00, 0x00, /* 0x0800-0x083f */ 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, /* 0x0840-0x087f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0880-0x08bf */ - 0x00, 0x00, 0x00, 0x00, 0xf8, 0xff, 0xff, 0xff, /* 0x08c0-0x08ff */ + 0x00, 0x00, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, /* 0x08c0-0x08ff */ 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, /* 0x0900-0x093f */ 0xfe, 0x21, 0xfe, 0x00, 0x0c, 0x00, 0x00, 0x00, /* 0x0940-0x097f */ 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, /* 0x0980-0x09bf */ @@ -135,7 +135,7 @@ /* 0x1800-0x19ff */ 0x00, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1800-0x183f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1840-0x187f */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, /* 0x1880-0x18bf */ + 0x60, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, /* 0x1880-0x18bf */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x18c0-0x18ff */ 0x00, 0x00, 0x00, 0x00, 0x87, 0x01, 0x04, 0x0e, /* 0x1900-0x193f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1940-0x197f */ @@ -158,7 +158,7 @@ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1d00-0x1d3f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1d40-0x1d7f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1d80-0x1dbf */ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0xf0, /* 0x1dc0-0x1dff */ + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0xf8, /* 0x1dc0-0x1dff */ /* 0x2000-0x21ff */ 0x00, 0xf8, 0x00, 0x00, 0x00, 0x7c, 0x00, 0x00, /* 0x2000-0x203f */ 0x00, 0x00, 0x00, 0x00, 0xdf, 0xff, 0x00, 0x00, /* 0x2040-0x207f */ @@ -199,7 +199,7 @@ 0x44, 0x08, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, /* 0xa800-0xa83f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xa840-0xa87f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xa880-0xa8bf */ - 0x10, 0x00, 0x00, 0x00, 0xff, 0xff, 0x03, 0x00, /* 0xa8c0-0xa8ff */ + 0x30, 0x00, 0x00, 0x00, 0xff, 0xff, 0x03, 0x00, /* 0xa8c0-0xa8ff */ 0x00, 0x00, 0x00, 0x00, 0xc0, 0x3f, 0x00, 0x00, /* 0xa900-0xa93f */ 0x80, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xa940-0xa97f */ 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc8, 0x13, /* 0xa980-0xa9bf */ @@ -268,7 +268,7 @@ 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x7f, /* 0x11180-0x111bf */ 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x111c0-0x111ff */ /* 0x11200-0x113ff */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xd3, 0x00, /* 0x11200-0x1123f */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xd3, 0x40, /* 0x11200-0x1123f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x11240-0x1127f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x11280-0x112bf */ 0x00, 0x00, 0x00, 0x80, 0xf8, 0x07, 0x00, 0x00, /* 0x112c0-0x112ff */ @@ -277,8 +277,8 @@ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x11380-0x113bf */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x113c0-0x113ff */ /* 0x11400-0x115ff */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x11400-0x1143f */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x11440-0x1147f */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, /* 0x11400-0x1143f */ + 0x5c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x11440-0x1147f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x85, /* 0x11480-0x114bf */ 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x114c0-0x114ff */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x11500-0x1153f */ @@ -294,6 +294,15 @@ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x11740-0x1177f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x11780-0x117bf */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x117c0-0x117ff */ + /* 0x11c00-0x11dff */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0x3f, /* 0x11c00-0x11c3f */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x11c40-0x11c7f */ + 0x00, 0x00, 0xfc, 0xff, 0xff, 0xfc, 0x6d, 0x00, /* 0x11c80-0x11cbf */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x11cc0-0x11cff */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x11d00-0x11d3f */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x11d40-0x11d7f */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x11d80-0x11dbf */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x11dc0-0x11dff */ /* 0x16a00-0x16bff */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x16a00-0x16a3f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x16a40-0x16a7f */ @@ -348,13 +357,22 @@ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1db40-0x1db7f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1db80-0x1dbbf */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1dbc0-0x1dbff */ + /* 0x1e000-0x1e1ff */ + 0x7f, 0xff, 0xff, 0xf9, 0xdb, 0x07, 0x00, 0x00, /* 0x1e000-0x1e03f */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1e040-0x1e07f */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1e080-0x1e0bf */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1e0c0-0x1e0ff */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1e100-0x1e13f */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1e140-0x1e17f */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1e180-0x1e1bf */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1e1c0-0x1e1ff */ /* 0x1e800-0x1e9ff */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1e800-0x1e83f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1e840-0x1e87f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1e880-0x1e8bf */ 0x00, 0x00, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1e8c0-0x1e8ff */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1e900-0x1e93f */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1e940-0x1e97f */ + 0xf0, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1e940-0x1e97f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1e980-0x1e9bf */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 /* 0x1e9c0-0x1e9ff */ }; @@ -376,20 +394,20 @@ -1, -1, -1, -1, -1, -1, -1, -1, /* 0xe000-0xefff */ -1, -1, -1, -1, -1, 20, -1, 21, /* 0xf000-0xffff */ 22, 23, -1, -1, -1, 24, -1, -1, /* 0x10000-0x10fff */ - 25, 26, 27, 28, -1, -1, -1, -1, /* 0x11000-0x11fff */ + 25, 26, 27, 28, -1, -1, 29, -1, /* 0x11000-0x11fff */ -1, -1, -1, -1, -1, -1, -1, -1, /* 0x12000-0x12fff */ -1, -1, -1, -1, -1, -1, -1, -1, /* 0x13000-0x13fff */ -1, -1, -1, -1, -1, -1, -1, -1, /* 0x14000-0x14fff */ -1, -1, -1, -1, -1, -1, -1, -1, /* 0x15000-0x15fff */ - -1, -1, -1, -1, -1, 29, -1, 30, /* 0x16000-0x16fff */ + -1, -1, -1, -1, -1, 30, -1, 31, /* 0x16000-0x16fff */ -1, -1, -1, -1, -1, -1, -1, -1, /* 0x17000-0x17fff */ -1, -1, -1, -1, -1, -1, -1, -1, /* 0x18000-0x18fff */ -1, -1, -1, -1, -1, -1, -1, -1, /* 0x19000-0x19fff */ -1, -1, -1, -1, -1, -1, -1, -1, /* 0x1a000-0x1afff */ - -1, -1, -1, -1, -1, -1, 31, -1, /* 0x1b000-0x1bfff */ + -1, -1, -1, -1, -1, -1, 32, -1, /* 0x1b000-0x1bfff */ -1, -1, -1, -1, -1, -1, -1, -1, /* 0x1c000-0x1cfff */ - 32, 33, -1, -1, -1, 34, -1, -1, /* 0x1d000-0x1dfff */ - -1, -1, -1, -1, 35, -1, -1, -1 /* 0x1e000-0x1efff */ + 33, 34, -1, -1, -1, 35, -1, -1, /* 0x1d000-0x1dfff */ + 36, -1, -1, -1, 37, -1, -1, -1 /* 0x1e000-0x1efff */ }; /* Determine number of column positions required for UC. */ diff -Nru grep-3.1/lib/uniwidth.in.h grep-3.3/lib/uniwidth.in.h --- grep-3.1/lib/uniwidth.in.h 2017-01-01 11:25:48.000000000 +0000 +++ grep-3.3/lib/uniwidth.in.h 2018-01-07 00:08:03.000000000 +0000 @@ -1,5 +1,5 @@ /* Display width functions. - Copyright (C) 2001-2002, 2005, 2007, 2009-2017 Free Software Foundation, + Copyright (C) 2001-2002, 2005, 2007, 2009-2018 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it @@ -13,7 +13,7 @@ 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 . */ + along with this program. If not, see . */ #ifndef _UNIWIDTH_H #define _UNIWIDTH_H diff -Nru grep-3.1/lib/unlocked-io.h grep-3.3/lib/unlocked-io.h --- grep-3.1/lib/unlocked-io.h 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/lib/unlocked-io.h 2018-01-07 00:07:08.000000000 +0000 @@ -1,6 +1,6 @@ /* Prefer faster, non-thread-safe stdio functions if available. - Copyright (C) 2001-2004, 2009-2017 Free Software Foundation, Inc. + Copyright (C) 2001-2004, 2009-2018 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 @@ -13,7 +13,7 @@ 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 . */ + along with this program. If not, see . */ /* Written by Jim Meyering. */ diff -Nru grep-3.1/lib/unused-parameter.h grep-3.3/lib/unused-parameter.h --- grep-3.1/lib/unused-parameter.h 2017-03-17 04:34:41.000000000 +0000 +++ grep-3.3/lib/unused-parameter.h 2018-01-07 00:08:03.000000000 +0000 @@ -1,5 +1,5 @@ /* A C macro for declaring that specific function parameters are not used. - Copyright (C) 2008-2017 Free Software Foundation, Inc. + Copyright (C) 2008-2018 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 @@ -12,7 +12,7 @@ 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 . */ + 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 diff -Nru grep-3.1/lib/verify.h grep-3.3/lib/verify.h --- grep-3.1/lib/verify.h 2017-02-02 19:19:19.000000000 +0000 +++ grep-3.3/lib/verify.h 2018-09-19 05:04:26.000000000 +0000 @@ -1,6 +1,6 @@ /* Compile-time assert-like macros. - Copyright (C) 2005-2006, 2009-2017 Free Software Foundation, Inc. + Copyright (C) 2005-2006, 2009-2018 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 @@ -13,7 +13,7 @@ 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 . */ + along with this program. If not, see . */ /* Written by Paul Eggert, Bruno Haible, and Jim Meyering. */ @@ -276,7 +276,8 @@ when 'assume' silences warnings even with older GCCs. */ # define assume(R) ((R) ? (void) 0 : __builtin_trap ()) #else -# define assume(R) ((void) (0 && (R))) + /* Some tools grok NOTREACHED, e.g., Oracle Studio 12.6. */ +# define assume(R) ((R) ? (void) 0 : /*NOTREACHED*/ (void) 0) #endif /* @assert.h omit end@ */ diff -Nru grep-3.1/lib/version-etc.c grep-3.3/lib/version-etc.c --- grep-3.1/lib/version-etc.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/lib/version-etc.c 2018-12-21 03:57:18.000000000 +0000 @@ -1,5 +1,5 @@ /* Print --version and bug-reporting information in a consistent format. - Copyright (C) 1999-2017 Free Software Foundation, Inc. + Copyright (C) 1999-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ /* Written by Jim Meyering. */ @@ -23,7 +23,6 @@ #include #include -#include #if USE_UNLOCKED_IO # include "unlocked-io.h" @@ -38,7 +37,7 @@ # define PACKAGE PACKAGE_TARNAME #endif -enum { COPYRIGHT_YEAR = 2017 }; +enum { COPYRIGHT_YEAR = 2018 }; /* The three functions below display the --version information the standard way. @@ -85,7 +84,7 @@ fputs (_("\ \n\ -License GPLv3+: GNU GPL version 3 or later .\n\ +License GPLv3+: GNU GPL version 3 or later .\n\ This is free software: you are free to change and redistribute it.\n\ There is NO WARRANTY, to the extent permitted by law.\n\ \n\ @@ -95,8 +94,9 @@ switch (n_authors) { case 0: - /* The caller must provide at least one author name. */ - abort (); + /* No authors are given. The caller should output authorship + info after calling this function. */ + break; case 1: /* TRANSLATORS: %s denotes an author name. */ fprintf (stream, _("Written by %s.\n"), authors[0]); @@ -250,9 +250,9 @@ #ifdef PACKAGE_URL printf (_("%s home page: <%s>\n"), PACKAGE_NAME, PACKAGE_URL); #else - printf (_("%s home page: \n"), + printf (_("%s home page: \n"), PACKAGE_NAME, PACKAGE); #endif - fputs (_("General help using GNU software: \n"), + fputs (_("General help using GNU software: \n"), stdout); } diff -Nru grep-3.1/lib/version-etc-fsf.c grep-3.3/lib/version-etc-fsf.c --- grep-3.1/lib/version-etc-fsf.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/lib/version-etc-fsf.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ /* Variable with FSF copyright information, for version-etc. - Copyright (C) 1999-2006, 2009-2017 Free Software Foundation, Inc. + Copyright (C) 1999-2006, 2009-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ /* Written by Jim Meyering. */ diff -Nru grep-3.1/lib/version-etc.h grep-3.3/lib/version-etc.h --- grep-3.1/lib/version-etc.h 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/lib/version-etc.h 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ /* Print --version and bug-reporting information in a consistent format. - Copyright (C) 1999, 2003, 2005, 2009-2017 Free Software Foundation, Inc. + Copyright (C) 1999, 2003, 2005, 2009-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ /* Written by Jim Meyering. */ diff -Nru grep-3.1/lib/warn-on-use.h grep-3.3/lib/warn-on-use.h --- grep-3.1/lib/warn-on-use.h 2017-03-17 04:34:42.000000000 +0000 +++ grep-3.3/lib/warn-on-use.h 2018-09-19 05:05:05.000000000 +0000 @@ -1,5 +1,5 @@ /* A C macro for emitting warnings if a function is used. - Copyright (C) 2010-2017 Free Software Foundation, Inc. + Copyright (C) 2010-2018 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 @@ -12,7 +12,7 @@ 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 . */ + 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 @@ -20,23 +20,32 @@ 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 + _GL_WARN_ON_USE_ATTRIBUTE ("literal string") expands to the + attribute used in _GL_WARN_ON_USE. If the compiler does not support + this feature, it expands to empty. + + These macros are 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. + instead. + _GL_WARN_ON_USE is for functions with 'extern' linkage. + _GL_WARN_ON_USE_ATTRIBUTE is for functions with 'static' or 'inline' + linkage. + + 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 ]], @@ -54,12 +63,21 @@ (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 + #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 + or better (avoiding contradictory use of 'static' and 'extern'): + #if HAVE_RAW_DECL_ENVIRON + static char *** + _GL_WARN_ON_USE_ATTRIBUTE ("environ is not always properly declared") + rpl_environ (void) { return &environ; } + # undef environ + # define environ (*rpl_environ ()) + #endif */ #ifndef _GL_WARN_ON_USE @@ -67,13 +85,17 @@ /* 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))) +# define _GL_WARN_ON_USE_ATTRIBUTE(message) \ + __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 +# define _GL_WARN_ON_USE_ATTRIBUTE(message) # else /* Unsupported. */ # define _GL_WARN_ON_USE(function, message) \ _GL_WARN_EXTERN_C int _gl_warn_on_use +# define _GL_WARN_ON_USE_ATTRIBUTE(message) # endif #endif diff -Nru grep-3.1/lib/wchar.in.h grep-3.3/lib/wchar.in.h --- grep-3.1/lib/wchar.in.h 2017-05-14 01:10:19.000000000 +0000 +++ grep-3.3/lib/wchar.in.h 2018-01-07 00:08:03.000000000 +0000 @@ -1,6 +1,6 @@ /* A substitute for ISO C99 , for platforms that have issues. - Copyright (C) 2007-2017 Free Software Foundation, Inc. + Copyright (C) 2007-2018 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 @@ -13,7 +13,7 @@ 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 . */ + along with this program; if not, see . */ /* Written by Eric Blake. */ @@ -31,7 +31,7 @@ @PRAGMA_COLUMNS@ #if (((defined __need_mbstate_t || defined __need_wint_t) \ - && !defined __MINGW32__ && !defined __KLIBC__) \ + && !defined __MINGW32__) \ || (defined __hpux \ && ((defined _INTTYPES_INCLUDED && !defined strtoimax) \ || defined _GL_JUST_INCLUDE_SYSTEM_WCHAR_H)) \ @@ -452,11 +452,6 @@ # 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 diff -Nru grep-3.1/lib/wcrtomb.c grep-3.3/lib/wcrtomb.c --- grep-3.1/lib/wcrtomb.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/lib/wcrtomb.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ /* Convert wide character to multibyte character. - Copyright (C) 2008-2017 Free Software Foundation, Inc. + Copyright (C) 2008-2018 Free Software Foundation, Inc. Written by Bruno Haible , 2008. This program is free software: you can redistribute it and/or modify @@ -13,7 +13,7 @@ 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 . */ + along with this program. If not, see . */ #include diff -Nru grep-3.1/lib/wctob.c grep-3.3/lib/wctob.c --- grep-3.1/lib/wctob.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/lib/wctob.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ /* Convert wide character to unibyte character. - Copyright (C) 2008, 2010-2017 Free Software Foundation, Inc. + Copyright (C) 2008, 2010-2018 Free Software Foundation, Inc. Written by Bruno Haible , 2008. This program is free software: you can redistribute it and/or modify @@ -13,7 +13,7 @@ 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 . */ + along with this program. If not, see . */ #include diff -Nru grep-3.1/lib/wctomb.c grep-3.3/lib/wctomb.c --- grep-3.1/lib/wctomb.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/lib/wctomb.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ /* Convert wide character to multibyte character. - Copyright (C) 2011-2017 Free Software Foundation, Inc. + Copyright (C) 2011-2018 Free Software Foundation, Inc. Written by Bruno Haible , 2011. This program is free software: you can redistribute it and/or modify @@ -13,7 +13,7 @@ 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 . */ + along with this program. If not, see . */ #include diff -Nru grep-3.1/lib/wctomb-impl.h grep-3.3/lib/wctomb-impl.h --- grep-3.1/lib/wctomb-impl.h 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/lib/wctomb-impl.h 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ /* Convert wide character to multibyte character. - Copyright (C) 2011-2017 Free Software Foundation, Inc. + Copyright (C) 2011-2018 Free Software Foundation, Inc. Written by Bruno Haible , 2011. This program is free software: you can redistribute it and/or modify @@ -13,7 +13,7 @@ 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 . */ + along with this program. If not, see . */ int wctomb (char *s, wchar_t wc) diff -Nru grep-3.1/lib/wctype.in.h grep-3.3/lib/wctype.in.h --- grep-3.1/lib/wctype.in.h 2017-05-14 01:10:19.000000000 +0000 +++ grep-3.3/lib/wctype.in.h 2018-06-24 23:18:02.000000000 +0000 @@ -1,6 +1,6 @@ /* A substitute for ISO C99 , for platforms that lack it. - Copyright (C) 2006-2017 Free Software Foundation, Inc. + Copyright (C) 2006-2018 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 @@ -13,7 +13,7 @@ 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 . */ + along with this program; if not, see . */ /* Written by Bruno Haible and Paul Eggert. */ @@ -60,7 +60,7 @@ 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__ +#if defined _WIN32 && ! defined __CYGWIN__ # include # include #endif diff -Nru grep-3.1/lib/wcwidth.c grep-3.3/lib/wcwidth.c --- grep-3.1/lib/wcwidth.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/lib/wcwidth.c 2018-09-19 05:04:26.000000000 +0000 @@ -1,5 +1,5 @@ /* Determine the number of screen columns needed for a character. - Copyright (C) 2006-2007, 2010-2017 Free Software Foundation, Inc. + Copyright (C) 2006-2007, 2010-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ #include @@ -26,17 +26,40 @@ #include "streq.h" #include "uniwidth.h" +/* Returns 1 if the current locale is an UTF-8 locale, 0 otherwise. */ +static inline int +is_locale_utf8 (void) +{ + const char *encoding = locale_charset (); + return STREQ_OPT (encoding, "UTF-8", 'U', 'T', 'F', '-', '8', 0, 0, 0, 0); +} + +#if GNULIB_WCHAR_SINGLE +/* When we know that the locale does not change, provide a speedup by + caching the value of is_locale_utf8. */ +static int cached_is_locale_utf8 = -1; +static inline int +is_locale_utf8_cached (void) +{ + if (cached_is_locale_utf8 < 0) + cached_is_locale_utf8 = is_locale_utf8 (); + return cached_is_locale_utf8; +} +#else +/* By default, don't make assumptions, hence no caching. */ +# define is_locale_utf8_cached is_locale_utf8 +#endif + int wcwidth (wchar_t wc) #undef wcwidth { /* In UTF-8 locales, use a Unicode aware width function. */ - const char *encoding = locale_charset (); - if (STREQ_OPT (encoding, "UTF-8", 'U', 'T', 'F', '-', '8', 0, 0, 0 ,0)) + if (is_locale_utf8_cached ()) { /* We assume that in a UTF-8 locale, a wide character is the same as a Unicode character. */ - return uc_width (wc, encoding); + return uc_width (wc, "UTF-8"); } else { diff -Nru grep-3.1/lib/xalloc-die.c grep-3.3/lib/xalloc-die.c --- grep-3.1/lib/xalloc-die.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/lib/xalloc-die.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,6 +1,6 @@ /* Report a memory allocation failure and exit. - Copyright (C) 1997-2000, 2002-2004, 2006, 2009-2017 Free Software + Copyright (C) 1997-2000, 2002-2004, 2006, 2009-2018 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify @@ -14,7 +14,7 @@ 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 . */ + along with this program. If not, see . */ #include diff -Nru grep-3.1/lib/xalloc.h grep-3.3/lib/xalloc.h --- grep-3.1/lib/xalloc.h 2017-05-14 01:09:51.000000000 +0000 +++ grep-3.3/lib/xalloc.h 2018-06-24 23:16:49.000000000 +0000 @@ -1,6 +1,6 @@ /* xalloc.h -- malloc with out-of-memory checking - Copyright (C) 1990-2000, 2003-2004, 2006-2017 Free Software Foundation, Inc. + Copyright (C) 1990-2000, 2003-2004, 2006-2018 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 @@ -13,7 +13,7 @@ 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 . */ + along with this program. If not, see . */ #ifndef XALLOC_H_ #define XALLOC_H_ @@ -36,12 +36,6 @@ #endif -#if __GNUC__ >= 3 -# define _GL_ATTRIBUTE_MALLOC __attribute__ ((__malloc__)) -#else -# define _GL_ATTRIBUTE_MALLOC -#endif - #if ! defined __clang__ && \ (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)) # define _GL_ATTRIBUTE_ALLOC_SIZE(args) __attribute__ ((__alloc_size__ args)) diff -Nru grep-3.1/lib/xalloc-oversized.h grep-3.3/lib/xalloc-oversized.h --- grep-3.1/lib/xalloc-oversized.h 2017-06-25 23:19:26.000000000 +0000 +++ grep-3.3/lib/xalloc-oversized.h 2018-01-07 00:07:08.000000000 +0000 @@ -1,6 +1,6 @@ /* xalloc-oversized.h -- memory allocation size checking - Copyright (C) 1990-2000, 2003-2004, 2006-2017 Free Software Foundation, Inc. + Copyright (C) 1990-2000, 2003-2004, 2006-2018 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 @@ -13,7 +13,7 @@ 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 . */ + along with this program. If not, see . */ #ifndef XALLOC_OVERSIZED_H_ #define XALLOC_OVERSIZED_H_ diff -Nru grep-3.1/lib/xbinary-io.c grep-3.3/lib/xbinary-io.c --- grep-3.1/lib/xbinary-io.c 2017-05-14 01:09:51.000000000 +0000 +++ grep-3.3/lib/xbinary-io.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ /* Binary mode I/O with checking - Copyright 2017 Free Software Foundation, Inc. + Copyright 2017-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ #include diff -Nru grep-3.1/lib/xbinary-io.h grep-3.3/lib/xbinary-io.h --- grep-3.1/lib/xbinary-io.h 2017-02-16 17:20:58.000000000 +0000 +++ grep-3.3/lib/xbinary-io.h 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ /* Binary mode I/O with checking - Copyright 2017 Free Software Foundation, Inc. + Copyright 2017-2018 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ #ifndef _XBINARY_IO_H #define _XBINARY_IO_H diff -Nru grep-3.1/lib/xmalloc.c grep-3.3/lib/xmalloc.c --- grep-3.1/lib/xmalloc.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/lib/xmalloc.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,6 +1,6 @@ /* xmalloc.c -- malloc with out of memory checking - Copyright (C) 1990-2000, 2002-2006, 2008-2017 Free Software Foundation, Inc. + Copyright (C) 1990-2000, 2002-2006, 2008-2018 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 @@ -13,7 +13,7 @@ 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 . */ + along with this program. If not, see . */ #include diff -Nru grep-3.1/lib/xstriconv.c grep-3.3/lib/xstriconv.c --- grep-3.1/lib/xstriconv.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/lib/xstriconv.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ /* Charset conversion with out-of-memory checking. - Copyright (C) 2001-2004, 2006, 2009-2017 Free Software Foundation, Inc. + Copyright (C) 2001-2004, 2006, 2009-2018 Free Software Foundation, Inc. Written by Bruno Haible. This program is free software: you can redistribute it and/or modify @@ -13,7 +13,7 @@ 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 . */ + along with this program. If not, see . */ #include diff -Nru grep-3.1/lib/xstriconv.h grep-3.3/lib/xstriconv.h --- grep-3.1/lib/xstriconv.h 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/lib/xstriconv.h 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ /* Charset conversion with out-of-memory checking. - Copyright (C) 2001-2004, 2006-2007, 2009-2017 Free Software Foundation, Inc. + Copyright (C) 2001-2004, 2006-2007, 2009-2018 Free Software Foundation, Inc. Written by Bruno Haible and Simon Josefsson. This program is free software: you can redistribute it and/or modify @@ -13,7 +13,7 @@ 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 . */ + along with this program. If not, see . */ #ifndef _XSTRICONV_H #define _XSTRICONV_H diff -Nru grep-3.1/lib/xstrtol.c grep-3.3/lib/xstrtol.c --- grep-3.1/lib/xstrtol.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/lib/xstrtol.c 2018-09-19 05:04:26.000000000 +0000 @@ -1,6 +1,6 @@ /* A more useful interface to strtol. - Copyright (C) 1995-1996, 1998-2001, 2003-2007, 2009-2017 Free Software + Copyright (C) 1995-1996, 1998-2001, 2003-2007, 2009-2018 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify @@ -14,7 +14,7 @@ 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 . */ + along with this program. If not, see . */ /* Written by Jim Meyering. */ @@ -41,20 +41,8 @@ #include #include "assure.h" -#include "intprops.h" -/* xstrtoll.c and xstrtoull.c, which include this file, require that - ULLONG_MAX, LLONG_MAX, LLONG_MIN are defined, but does not - define them on all platforms. */ -#ifndef ULLONG_MAX -# define ULLONG_MAX TYPE_MAXIMUM (unsigned long long) -#endif -#ifndef LLONG_MAX -# define LLONG_MAX TYPE_MAXIMUM (long long int) -#endif -#ifndef LLONG_MIN -# define LLONG_MIN TYPE_MINIMUM (long long int) -#endif +#define TYPE_SIGNED(t) (! ((t) 0 < (t) -1)) static strtol_error bkm_scale (__strtol_t *x, int scale_factor) diff -Nru grep-3.1/lib/xstrtol-error.c grep-3.3/lib/xstrtol-error.c --- grep-3.1/lib/xstrtol-error.c 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/lib/xstrtol-error.c 2018-01-07 00:07:08.000000000 +0000 @@ -1,6 +1,6 @@ /* A more useful interface to strtol. - Copyright (C) 1995-1996, 1998-1999, 2001-2004, 2006-2017 Free Software + Copyright (C) 1995-1996, 1998-1999, 2001-2004, 2006-2018 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify @@ -14,7 +14,7 @@ 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 . */ + along with this program. If not, see . */ #include #include "xstrtol.h" diff -Nru grep-3.1/lib/xstrtol.h grep-3.3/lib/xstrtol.h --- grep-3.1/lib/xstrtol.h 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/lib/xstrtol.h 2018-01-07 00:07:08.000000000 +0000 @@ -1,6 +1,6 @@ /* A more useful interface to strtol. - Copyright (C) 1995-1996, 1998-1999, 2001-2004, 2006-2017 Free Software + Copyright (C) 1995-1996, 1998-1999, 2001-2004, 2006-2018 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify @@ -14,7 +14,7 @@ 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 . */ + along with this program. If not, see . */ #ifndef XSTRTOL_H_ # define XSTRTOL_H_ 1 diff -Nru grep-3.1/m4/00gnulib.m4 grep-3.3/m4/00gnulib.m4 --- grep-3.1/m4/00gnulib.m4 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/m4/00gnulib.m4 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ # 00gnulib.m4 serial 3 -dnl Copyright (C) 2009-2017 Free Software Foundation, Inc. +dnl Copyright (C) 2009-2018 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 -Nru grep-3.1/m4/absolute-header.m4 grep-3.3/m4/absolute-header.m4 --- grep-3.1/m4/absolute-header.m4 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/m4/absolute-header.m4 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ # absolute-header.m4 serial 16 -dnl Copyright (C) 2006-2017 Free Software Foundation, Inc. +dnl Copyright (C) 2006-2018 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 -Nru grep-3.1/m4/alloca.m4 grep-3.3/m4/alloca.m4 --- grep-3.1/m4/alloca.m4 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/m4/alloca.m4 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ # alloca.m4 serial 14 -dnl Copyright (C) 2002-2004, 2006-2007, 2009-2017 Free Software Foundation, +dnl Copyright (C) 2002-2004, 2006-2007, 2009-2018 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, @@ -44,12 +44,12 @@ AC_DEFUN([gl_PREREQ_ALLOCA], [:]) # This works around a bug in autoconf <= 2.68. -# See . +# See . m4_version_prereq([2.69], [] ,[ # This is taken from the following Autoconf patch: -# http://git.savannah.gnu.org/cgit/autoconf.git/commit/?id=6cd9f12520b0d6f76d3230d7565feba1ecf29497 +# https://git.savannah.gnu.org/gitweb/?p=autoconf.git;a=commitdiff;h=6cd9f12520b0d6f76d3230d7565feba1ecf29497 # _AC_LIBOBJ_ALLOCA # ----------------- diff -Nru grep-3.1/m4/arpa_inet_h.m4 grep-3.3/m4/arpa_inet_h.m4 --- grep-3.1/m4/arpa_inet_h.m4 1970-01-01 00:00:00.000000000 +0000 +++ grep-3.3/m4/arpa_inet_h.m4 2018-01-07 00:07:08.000000000 +0000 @@ -0,0 +1,57 @@ +# arpa_inet_h.m4 serial 13 +dnl Copyright (C) 2006, 2008-2018 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 Simon Josefsson and Bruno Haible + +AC_DEFUN([gl_HEADER_ARPA_INET], +[ + dnl Use AC_REQUIRE here, so that the default behavior below is expanded + dnl once only, before all statements that occur in other macros. + AC_REQUIRE([gl_ARPA_INET_H_DEFAULTS]) + + AC_CHECK_HEADERS_ONCE([arpa/inet.h]) + if test $ac_cv_header_arpa_inet_h = yes; then + HAVE_ARPA_INET_H=1 + else + HAVE_ARPA_INET_H=0 + fi + AC_SUBST([HAVE_ARPA_INET_H]) + dnl is always overridden, because of GNULIB_POSIXCHECK. + gl_CHECK_NEXT_HEADERS([arpa/inet.h]) + + AC_REQUIRE([gl_FEATURES_H]) + + 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([[ +/* On some systems, this header is not self-consistent. */ +#if !(defined __GLIBC__ || defined __UCLIBC__) +# include +#endif +#ifdef __TANDEM +# include +#endif +#include + ]], [inet_ntop inet_pton]) +]) + +AC_DEFUN([gl_ARPA_INET_MODULE_INDICATOR], +[ + dnl Use AC_REQUIRE here, so that the default settings are expanded once only. + AC_REQUIRE([gl_ARPA_INET_H_DEFAULTS]) + gl_MODULE_INDICATOR_SET_VARIABLE([$1]) +]) + +AC_DEFUN([gl_ARPA_INET_H_DEFAULTS], +[ + GNULIB_INET_NTOP=0; AC_SUBST([GNULIB_INET_NTOP]) + GNULIB_INET_PTON=0; AC_SUBST([GNULIB_INET_PTON]) + dnl Assume proper GNU behavior unless another module says otherwise. + HAVE_DECL_INET_NTOP=1; AC_SUBST([HAVE_DECL_INET_NTOP]) + HAVE_DECL_INET_PTON=1; AC_SUBST([HAVE_DECL_INET_PTON]) + REPLACE_INET_NTOP=0; AC_SUBST([REPLACE_INET_NTOP]) + REPLACE_INET_PTON=0; AC_SUBST([REPLACE_INET_PTON]) +]) diff -Nru grep-3.1/m4/assert.m4 grep-3.3/m4/assert.m4 --- grep-3.1/m4/assert.m4 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/m4/assert.m4 2018-01-07 00:07:08.000000000 +0000 @@ -1,6 +1,6 @@ #serial 7 -# Copyright (C) 1998-1999, 2001, 2004, 2008-2017 Free Software Foundation, Inc. +# Copyright (C) 1998-1999, 2001, 2004, 2008-2018 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 -Nru grep-3.1/m4/btowc.m4 grep-3.3/m4/btowc.m4 --- grep-3.1/m4/btowc.m4 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/m4/btowc.m4 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ -# btowc.m4 serial 10 -dnl Copyright (C) 2008-2017 Free Software Foundation, Inc. +# btowc.m4 serial 11 +dnl Copyright (C) 2008-2018 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. @@ -10,7 +10,7 @@ dnl Check whether is usable at all, first. Otherwise the test dnl program below may lead to an endless loop. See - dnl . + dnl . AC_REQUIRE([gl_WCHAR_H_INLINE_OK]) AC_CHECK_FUNCS_ONCE([btowc]) @@ -50,6 +50,8 @@ case "$host_os" in # Guess no on Cygwin. cygwin*) gl_cv_func_btowc_nul="guessing no" ;; + # Guess yes on native Windows. + mingw*) gl_cv_func_btowc_nul="guessing yes" ;; # Guess yes otherwise. *) gl_cv_func_btowc_nul="guessing yes" ;; esac @@ -65,10 +67,12 @@ dnl is present. changequote(,)dnl case "$host_os" in - # Guess no on IRIX. - irix*) gl_cv_func_btowc_eof="guessing no" ;; - # Guess yes otherwise. - *) gl_cv_func_btowc_eof="guessing yes" ;; + # Guess no on IRIX. + irix*) gl_cv_func_btowc_eof="guessing no" ;; + # Guess yes on native Windows. + mingw*) gl_cv_func_btowc_eof="guessing yes" ;; + # Guess yes otherwise. + *) gl_cv_func_btowc_eof="guessing yes" ;; esac changequote([,])dnl if test $LOCALE_FR != none; then diff -Nru grep-3.1/m4/builtin-expect.m4 grep-3.3/m4/builtin-expect.m4 --- grep-3.1/m4/builtin-expect.m4 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/m4/builtin-expect.m4 2018-01-07 00:07:08.000000000 +0000 @@ -1,6 +1,6 @@ dnl Check for __builtin_expect. -dnl Copyright 2016-2017 Free Software Foundation, Inc. +dnl Copyright 2016-2018 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 -Nru grep-3.1/m4/chdir-long.m4 grep-3.3/m4/chdir-long.m4 --- grep-3.1/m4/chdir-long.m4 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/m4/chdir-long.m4 2018-01-07 00:07:08.000000000 +0000 @@ -1,4 +1,4 @@ -#serial 15 +#serial 16 # Use Gnulib's robust chdir function. # It can handle arbitrarily long directory names, which means @@ -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-2017 Free Software Foundation, Inc. +dnl Copyright (C) 2004-2007, 2009-2018 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,14 +17,14 @@ [ AC_REQUIRE([gl_PATHMAX_SNIPPET_PREREQ]) AC_CACHE_CHECK([whether this system has an arbitrary file name length limit], - gl_cv_have_arbitrary_file_name_length_limit, + [gl_cv_have_arbitrary_file_name_length_limit], [AC_EGREP_CPP([have_arbitrary_file_name_length_limit], gl_PATHMAX_SNIPPET[ #ifdef PATH_MAX have_arbitrary_file_name_length_limit #endif], - gl_cv_have_arbitrary_file_name_length_limit=yes, - gl_cv_have_arbitrary_file_name_length_limit=no)]) + [gl_cv_have_arbitrary_file_name_length_limit=yes], + [gl_cv_have_arbitrary_file_name_length_limit=no])]) ]) AC_DEFUN([gl_PREREQ_CHDIR_LONG], [:]) diff -Nru grep-3.1/m4/closedir.m4 grep-3.3/m4/closedir.m4 --- grep-3.1/m4/closedir.m4 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/m4/closedir.m4 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ -# closedir.m4 serial 5 -dnl Copyright (C) 2011-2017 Free Software Foundation, Inc. +# closedir.m4 serial 6 +dnl Copyright (C) 2011-2018 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_CLOSEDIR], [ AC_REQUIRE([gl_DIRENT_H_DEFAULTS]) + AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_CHECK_FUNCS([closedir]) if test $ac_cv_func_closedir = no; then diff -Nru grep-3.1/m4/close.m4 grep-3.3/m4/close.m4 --- grep-3.1/m4/close.m4 2017-05-14 01:09:51.000000000 +0000 +++ grep-3.3/m4/close.m4 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ # close.m4 serial 9 -dnl Copyright (C) 2008-2017 Free Software Foundation, Inc. +dnl Copyright (C) 2008-2018 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 -Nru grep-3.1/m4/closeout.m4 grep-3.3/m4/closeout.m4 --- grep-3.1/m4/closeout.m4 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/m4/closeout.m4 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ # closeout.m4 serial 6 -dnl Copyright (C) 2002-2003, 2005-2006, 2009-2017 Free Software Foundation, +dnl Copyright (C) 2002-2003, 2005-2006, 2009-2018 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 -Nru grep-3.1/m4/close-stream.m4 grep-3.3/m4/close-stream.m4 --- grep-3.1/m4/close-stream.m4 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/m4/close-stream.m4 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ #serial 4 -dnl Copyright (C) 2006-2007, 2009-2017 Free Software Foundation, Inc. +dnl Copyright (C) 2006-2007, 2009-2018 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 -Nru grep-3.1/m4/configmake.m4 grep-3.3/m4/configmake.m4 --- grep-3.1/m4/configmake.m4 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/m4/configmake.m4 2018-12-21 02:51:47.000000000 +0000 @@ -1,55 +1,27 @@ -# configmake.m4 serial 2 -dnl Copyright (C) 2010-2017 Free Software Foundation, Inc. +# configmake.m4 serial 3 +dnl Copyright (C) 2010-2018 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_PREREQ([2.60]) + # gl_CONFIGMAKE_PREP # ------------------ # Guarantee all of the standard directory variables, even when used with -# autoconf 2.59 (datarootdir wasn't supported until 2.59c, and runstatedir -# in 2.70) or automake 1.9.6 (pkglibexecdir wasn't supported until 1.10b, -# and runstatedir in 1.14.1). +# autoconf 2.63 (runstatedir wasn't supported before 2.70) or +# automake 1.11 (runstatedir isn't supported even in 1.16.1). AC_DEFUN([gl_CONFIGMAKE_PREP], [ - dnl Technically, datadir should default to datarootdir. But if - dnl autoconf is too old to provide datarootdir, then reversing the - dnl definition is a reasonable compromise. Only AC_SUBST a variable - dnl if it was not already defined earlier by autoconf. - if test "x$datarootdir" = x; then - AC_SUBST([datarootdir], ['${datadir}']) - fi - dnl Copy the approach used in autoconf 2.60. - if test "x$docdir" = x; then - AC_SUBST([docdir], [m4_ifset([AC_PACKAGE_TARNAME], - ['${datarootdir}/doc/${PACKAGE_TARNAME}'], - ['${datarootdir}/doc/${PACKAGE}'])]) - fi - dnl The remaining variables missing from autoconf 2.59 are easier. - if test "x$htmldir" = x; then - AC_SUBST([htmldir], ['${docdir}']) - fi - if test "x$dvidir" = x; then - AC_SUBST([dvidir], ['${docdir}']) - fi - if test "x$pdfdir" = x; then - AC_SUBST([pdfdir], ['${docdir}']) - fi - if test "x$psdir" = x; then - AC_SUBST([psdir], ['${docdir}']) - fi if test "x$lispdir" = x; then AC_SUBST([lispdir], ['${datarootdir}/emacs/site-lisp']) fi - if test "x$localedir" = x; then - AC_SUBST([localedir], ['${datarootdir}/locale']) - fi - dnl Added in autoconf 2.70 + dnl Added in autoconf 2.70. if test "x$runstatedir" = x; then AC_SUBST([runstatedir], ['${localstatedir}/run']) fi - dnl Automake 1.9.6 only lacks pkglibexecdir; and since 1.11 merely - dnl provides it without AC_SUBST, this blind use of AC_SUBST is safe. + dnl Automake 1.11 provides pkglibexecdir merely without AC_SUBST. + dnl This blind use of AC_SUBST is safe. AC_SUBST([pkglibexecdir], ['${libexecdir}/${PACKAGE}']) ]) diff -Nru grep-3.1/m4/c-stack.m4 grep-3.3/m4/c-stack.m4 --- grep-3.1/m4/c-stack.m4 1970-01-01 00:00:00.000000000 +0000 +++ grep-3.3/m4/c-stack.m4 2018-12-21 03:31:37.000000000 +0000 @@ -0,0 +1,378 @@ +# Check prerequisites for compiling lib/c-stack.c. + +# Copyright (C) 2002-2004, 2008-2018 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 17 + +AC_DEFUN([AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC], + [ + AC_REQUIRE([AC_CANONICAL_HOST]) + AC_CHECK_FUNCS_ONCE([setrlimit]) + AC_CHECK_HEADERS_ONCE([ucontext.h]) + + dnl List of signals that are sent when an invalid virtual memory address + dnl is accessed, or when the stack overflows. + dnl Either { SIGSEGV } or { SIGSEGV, SIGBUS }. + case "$host_os" in + sunos4* | freebsd* | dragonfly* | openbsd* | mirbsd* | netbsd* | kfreebsd* | knetbsd*) # BSD systems + FAULT_YIELDS_SIGBUS=1 ;; + hpux*) # HP-UX + FAULT_YIELDS_SIGBUS=1 ;; + macos* | darwin*) # Mac OS X + FAULT_YIELDS_SIGBUS=1 ;; + gnu*) # Hurd + FAULT_YIELDS_SIGBUS=1 ;; + *) + FAULT_YIELDS_SIGBUS=0 ;; + esac + AC_DEFINE_UNQUOTED([FAULT_YIELDS_SIGBUS], [$FAULT_YIELDS_SIGBUS], + [Define to 1 if an invalid memory address access may yield a SIGBUS.]) + + AC_CACHE_CHECK([for working C stack overflow detection], + [ac_cv_sys_stack_overflow_works], + [AC_RUN_IFELSE([AC_LANG_SOURCE( + [[ + #include + #include + #if HAVE_SETRLIMIT + # include + # include + # include + #endif + #ifndef SIGSTKSZ + # define SIGSTKSZ 16384 + #endif + + static union + { + char buffer[2 * SIGSTKSZ]; + long double ld; + long u; + void *p; + } alternate_signal_stack; + + static void + segv_handler (int signo) + { + _exit (0); + } + + static int + c_stack_action () + { + stack_t st; + struct sigaction act; + int r; + + st.ss_flags = 0; + /* Use the midpoint to avoid Irix sigaltstack bug. */ + st.ss_sp = alternate_signal_stack.buffer + SIGSTKSZ; + st.ss_size = SIGSTKSZ; + r = sigaltstack (&st, 0); + if (r != 0) + return 1; + + sigemptyset (&act.sa_mask); + act.sa_flags = SA_NODEFER | SA_ONSTACK | SA_RESETHAND; + act.sa_handler = segv_handler; + #if FAULT_YIELDS_SIGBUS + if (sigaction (SIGBUS, &act, 0) < 0) + return 2; + #endif + if (sigaction (SIGSEGV, &act, 0) < 0) + return 3; + return 0; + } + static volatile int * + recurse_1 (volatile int n, volatile int *p) + { + if (n >= 0) + *recurse_1 (n + 1, p) += n; + return p; + } + static int + recurse (volatile int n) + { + int sum = 0; + return *recurse_1 (n, &sum); + } + int + main () + { + int result; + #if HAVE_SETRLIMIT && defined RLIMIT_STACK + /* Before starting the endless recursion, try to be friendly + to the user's machine. On some Linux 2.2.x systems, there + is no stack limit for user processes at all. We don't want + to kill such systems. */ + struct rlimit rl; + rl.rlim_cur = rl.rlim_max = 0x100000; /* 1 MB */ + setrlimit (RLIMIT_STACK, &rl); + #endif + + result = c_stack_action (); + if (result != 0) + return result; + return recurse (0); + } + ]])], + [ac_cv_sys_stack_overflow_works=yes], + [ac_cv_sys_stack_overflow_works=no], + [case "$host_os" in + # Guess no on native Windows. + mingw*) ac_cv_sys_stack_overflow_works="guessing no" ;; + *) ac_cv_sys_stack_overflow_works=cross-compiling ;; + esac + ]) + ]) + + if test "$ac_cv_sys_stack_overflow_works" = yes; then + AC_DEFINE([HAVE_STACK_OVERFLOW_HANDLING], [1], + [Define to 1 if extending the stack slightly past the limit causes + a SIGSEGV which can be handled on an alternate stack established + with sigaltstack.]) + + dnl The ss_sp field of a stack_t is, according to POSIX, the lowest address + dnl of the memory block designated as an alternate stack. But IRIX 5.3 + dnl interprets it as the highest address! + AC_CACHE_CHECK([for correct stack_t interpretation], + [gl_cv_sigaltstack_low_base], [ + AC_RUN_IFELSE([ + AC_LANG_SOURCE([[ +#include +#include +#if HAVE_SYS_SIGNAL_H +# include +#endif +#ifndef SIGSTKSZ +# define SIGSTKSZ 16384 +#endif +volatile char *stack_lower_bound; +volatile char *stack_upper_bound; +static void check_stack_location (volatile char *addr) +{ + if (addr >= stack_lower_bound && addr <= stack_upper_bound) + exit (0); + else + exit (1); +} +static void stackoverflow_handler (int sig) +{ + char dummy; + check_stack_location (&dummy); +} +int main () +{ + char mystack[2 * SIGSTKSZ]; + stack_t altstack; + struct sigaction action; + /* Install the alternate stack. */ + altstack.ss_sp = mystack + SIGSTKSZ; + altstack.ss_size = SIGSTKSZ; + stack_lower_bound = (char *) altstack.ss_sp; + stack_upper_bound = (char *) altstack.ss_sp + altstack.ss_size - 1; + altstack.ss_flags = 0; /* no SS_DISABLE */ + if (sigaltstack (&altstack, NULL) < 0) + exit (2); + /* Install the SIGSEGV handler. */ + sigemptyset (&action.sa_mask); + action.sa_handler = &stackoverflow_handler; + action.sa_flags = SA_ONSTACK; + if (sigaction (SIGSEGV, &action, (struct sigaction *) NULL) < 0) + exit(3); + /* Provoke a SIGSEGV. */ + raise (SIGSEGV); + exit (4); +}]])], + [gl_cv_sigaltstack_low_base=yes], + [gl_cv_sigaltstack_low_base=no], + [gl_cv_sigaltstack_low_base=cross-compiling])]) + if test "$gl_cv_sigaltstack_low_base" = no; then + AC_DEFINE([SIGALTSTACK_SS_REVERSED], [1], + [Define if sigaltstack() interprets the stack_t.ss_sp field + incorrectly, as the highest address of the alternate stack range + rather than as the lowest address.]) + fi + + AC_CACHE_CHECK([for precise C stack overflow detection], + [ac_cv_sys_xsi_stack_overflow_heuristic], + [dnl On Linux/sparc64 (both in 32-bit and 64-bit mode), it would be wrong + dnl to set HAVE_XSI_STACK_OVERFLOW_HEURISTIC to 1, because the third + dnl argument passed to the segv_handler is a 'struct sigcontext *', not + dnl an 'ucontext_t *'. It would lead to a failure of test-c-stack2.sh. + case "${host_os}--${host_cpu}" in + linux*--sparc*) + ac_cv_sys_xsi_stack_overflow_heuristic=no + ;; + *) + AC_RUN_IFELSE( + [AC_LANG_SOURCE( + [[ + #include + #include + #if HAVE_UCONTEXT_H + # include + #endif + #if HAVE_SETRLIMIT + # include + # include + # include + #endif + #ifndef SIGSTKSZ + # define SIGSTKSZ 16384 + #endif + + static union + { + char buffer[2 * SIGSTKSZ]; + long double ld; + long u; + void *p; + } alternate_signal_stack; + + #if STACK_DIRECTION + # define find_stack_direction(ptr) STACK_DIRECTION + #else + static int + find_stack_direction (char const *addr) + { + char dummy; + return (! addr ? find_stack_direction (&dummy) + : addr < &dummy ? 1 : -1); + } + #endif + + static void + segv_handler (int signo, siginfo_t *info, void *context) + { + if (0 < info->si_code) + { + /* For XSI heuristics to work, we need uc_stack to + describe the interrupted stack (as on Solaris), and + not the currently executing stack (as on Linux). */ + ucontext_t const *user_context = context; + char const *stack_min = user_context->uc_stack.ss_sp; + size_t stack_size = user_context->uc_stack.ss_size; + char const *faulting_address = info->si_addr; + size_t s = faulting_address - stack_min; + size_t page_size = sysconf (_SC_PAGESIZE); + if (find_stack_direction (0) < 0) + s += page_size; + if (s < stack_size + page_size) + _exit (0); + _exit (4); + } + _exit (5); + } + + static int + c_stack_action () + { + stack_t st; + struct sigaction act; + int r; + + st.ss_flags = 0; + /* Use the midpoint to avoid Irix sigaltstack bug. */ + st.ss_sp = alternate_signal_stack.buffer + SIGSTKSZ; + st.ss_size = SIGSTKSZ; + r = sigaltstack (&st, 0); + if (r != 0) + return 1; + + sigemptyset (&act.sa_mask); + act.sa_flags = SA_NODEFER | SA_ONSTACK | SA_RESETHAND | SA_SIGINFO; + act.sa_sigaction = segv_handler; + #if FAULT_YIELDS_SIGBUS + if (sigaction (SIGBUS, &act, 0) < 0) + return 2; + #endif + if (sigaction (SIGSEGV, &act, 0) < 0) + return 3; + return 0; + } + static volatile int * + recurse_1 (volatile int n, volatile int *p) + { + if (n >= 0) + *recurse_1 (n + 1, p) += n; + return p; + } + static int + recurse (volatile int n) + { + int sum = 0; + return *recurse_1 (n, &sum); + } + int + main () + { + int result; + #if HAVE_SETRLIMIT && defined RLIMIT_STACK + /* Before starting the endless recursion, try to be friendly + to the user's machine. On some Linux 2.2.x systems, there + is no stack limit for user processes at all. We don't want + to kill such systems. */ + struct rlimit rl; + rl.rlim_cur = rl.rlim_max = 0x100000; /* 1 MB */ + setrlimit (RLIMIT_STACK, &rl); + #endif + + result = c_stack_action (); + if (result != 0) + return result; + return recurse (0); + } + ]])], + [ac_cv_sys_xsi_stack_overflow_heuristic=yes], + [ac_cv_sys_xsi_stack_overflow_heuristic=no], + [ac_cv_sys_xsi_stack_overflow_heuristic=cross-compiling]) + ;; + esac + ]) + + if test $ac_cv_sys_xsi_stack_overflow_heuristic = yes; then + AC_DEFINE([HAVE_XSI_STACK_OVERFLOW_HEURISTIC], [1], + [Define to 1 if extending the stack slightly past the limit causes + a SIGSEGV, and an alternate stack can be established with sigaltstack, + and the signal handler is passed a context that specifies the + run time stack. This behavior is defined by POSIX 1003.1-2001 + with the X/Open System Interface (XSI) option + and is a standardized way to implement a SEGV-based stack + overflow detection heuristic.]) + fi + fi]) + + +AC_DEFUN([gl_PREREQ_C_STACK], + [AC_REQUIRE([AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC]) + AC_REQUIRE([gl_LIBSIGSEGV]) + + # for STACK_DIRECTION + AC_REQUIRE([AC_FUNC_ALLOCA]) + + AC_CHECK_FUNCS_ONCE([sigaltstack]) + AC_CHECK_DECLS([sigaltstack], , , [[#include ]]) + + AC_CHECK_HEADERS_ONCE([unistd.h ucontext.h]) + + AC_CHECK_TYPES([stack_t], , , [#include ]) + + dnl c-stack does not need -lsigsegv if the system has XSI heuristics. + if test "$gl_cv_lib_sigsegv" = yes \ + && test $"ac_cv_sys_xsi_stack_overflow_heuristic" != yes ; then + AC_SUBST([LIBCSTACK], [$LIBSIGSEGV]) + AC_SUBST([LTLIBCSTACK], [$LTLIBSIGSEGV]) + fi +]) + +AC_DEFUN([gl_C_STACK], +[ + dnl Prerequisites of lib/c-stack.c. + gl_PREREQ_C_STACK +]) diff -Nru grep-3.1/m4/ctype.m4 grep-3.3/m4/ctype.m4 --- grep-3.1/m4/ctype.m4 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/m4/ctype.m4 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ # ctype_h.m4 serial 6 -dnl Copyright (C) 2009-2017 Free Software Foundation, Inc. +dnl Copyright (C) 2009-2018 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 -Nru grep-3.1/m4/cycle-check.m4 grep-3.3/m4/cycle-check.m4 --- grep-3.1/m4/cycle-check.m4 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/m4/cycle-check.m4 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ #serial 7 -dnl Copyright (C) 2005-2007, 2009-2017 Free Software Foundation, Inc. +dnl Copyright (C) 2005-2007, 2009-2018 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 -Nru grep-3.1/m4/d-ino.m4 grep-3.3/m4/d-ino.m4 --- grep-3.1/m4/d-ino.m4 2017-05-21 00:31:28.000000000 +0000 +++ grep-3.3/m4/d-ino.m4 2018-01-07 00:07:08.000000000 +0000 @@ -1,11 +1,11 @@ -# serial 16 +# serial 18 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-2017 Free Software +# Copyright (C) 1997, 1999-2001, 2003-2004, 2006-2007, 2009-2018 Free Software # Foundation, Inc. # This file is free software; the Free Software Foundation @@ -15,7 +15,7 @@ AC_DEFUN([gl_CHECK_TYPE_STRUCT_DIRENT_D_INO], [AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_CACHE_CHECK([for d_ino member in directory struct], - gl_cv_struct_dirent_d_ino, + [gl_cv_struct_dirent_d_ino], [AC_RUN_IFELSE( [AC_LANG_PROGRAM( [[#include @@ -42,6 +42,8 @@ [case "$host_os" in # Guess yes on glibc systems with Linux kernel. linux*-gnu*) gl_cv_struct_dirent_d_ino="guessing yes" ;; + # Guess no on native Windows. + mingw*) gl_cv_struct_dirent_d_ino="guessing no" ;; # If we don't know, assume the worst. *) gl_cv_struct_dirent_d_ino="guessing no" ;; esac diff -Nru grep-3.1/m4/dirent_h.m4 grep-3.3/m4/dirent_h.m4 --- grep-3.1/m4/dirent_h.m4 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/m4/dirent_h.m4 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ # dirent_h.m4 serial 16 -dnl Copyright (C) 2008-2017 Free Software Foundation, Inc. +dnl Copyright (C) 2008-2018 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 -Nru grep-3.1/m4/dirent-safer.m4 grep-3.3/m4/dirent-safer.m4 --- grep-3.1/m4/dirent-safer.m4 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/m4/dirent-safer.m4 1970-01-01 00:00:00.000000000 +0000 @@ -1,10 +0,0 @@ -#serial 2 -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. - -AC_DEFUN([gl_DIRENT_SAFER], -[ - AC_CHECK_FUNCS_ONCE([fdopendir]) -]) diff -Nru grep-3.1/m4/dirfd.m4 grep-3.3/m4/dirfd.m4 --- grep-3.1/m4/dirfd.m4 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/m4/dirfd.m4 2018-01-07 00:07:08.000000000 +0000 @@ -1,8 +1,8 @@ -# serial 24 -*- Autoconf -*- +# serial 26 -*- Autoconf -*- dnl Find out how to get the file descriptor associated with an open DIR*. -# Copyright (C) 2001-2006, 2008-2017 Free Software Foundation, Inc. +# Copyright (C) 2001-2006, 2008-2018 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. @@ -12,6 +12,7 @@ AC_DEFUN([gl_FUNC_DIRFD], [ AC_REQUIRE([gl_DIRENT_H_DEFAULTS]) + AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles dnl Persuade glibc to declare dirfd(). AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) @@ -25,15 +26,15 @@ fi AC_CACHE_CHECK([whether dirfd is a macro], - gl_cv_func_dirfd_macro, + [gl_cv_func_dirfd_macro], [AC_EGREP_CPP([dirent_header_defines_dirfd], [ #include #include #ifdef dirfd dirent_header_defines_dirfd #endif], - gl_cv_func_dirfd_macro=yes, - gl_cv_func_dirfd_macro=no)]) + [gl_cv_func_dirfd_macro=yes], + [gl_cv_func_dirfd_macro=no])]) # Use the replacement if we have no function or macro with that name, # or if OS/2 kLIBC whose dirfd() does not work. diff -Nru grep-3.1/m4/dirname.m4 grep-3.3/m4/dirname.m4 --- grep-3.1/m4/dirname.m4 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/m4/dirname.m4 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ #serial 10 -*- autoconf -*- -dnl Copyright (C) 2002-2006, 2009-2017 Free Software Foundation, Inc. +dnl Copyright (C) 2002-2006, 2009-2018 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 -Nru grep-3.1/m4/double-slash-root.m4 grep-3.3/m4/double-slash-root.m4 --- grep-3.1/m4/double-slash-root.m4 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/m4/double-slash-root.m4 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ # double-slash-root.m4 serial 4 -*- Autoconf -*- -dnl Copyright (C) 2006, 2008-2017 Free Software Foundation, Inc. +dnl Copyright (C) 2006, 2008-2018 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 -Nru grep-3.1/m4/d-type.m4 grep-3.3/m4/d-type.m4 --- grep-3.1/m4/d-type.m4 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/m4/d-type.m4 2018-01-07 00:07:08.000000000 +0000 @@ -1,11 +1,11 @@ -# serial 11 +# serial 12 dnl From Jim Meyering. dnl dnl Check whether struct dirent has a member named d_type. dnl -# Copyright (C) 1997, 1999-2004, 2006, 2009-2017 Free Software Foundation, Inc. +# Copyright (C) 1997, 1999-2004, 2006, 2009-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -13,7 +13,7 @@ AC_DEFUN([gl_CHECK_TYPE_STRUCT_DIRENT_D_TYPE], [AC_CACHE_CHECK([for d_type member in directory struct], - gl_cv_struct_dirent_d_type, + [gl_cv_struct_dirent_d_type], [AC_LINK_IFELSE([AC_LANG_PROGRAM([[ #include #include diff -Nru grep-3.1/m4/dup2.m4 grep-3.3/m4/dup2.m4 --- grep-3.1/m4/dup2.m4 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/m4/dup2.m4 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ #serial 25 -dnl Copyright (C) 2002, 2005, 2007, 2009-2017 Free Software Foundation, Inc. +dnl Copyright (C) 2002, 2005, 2007, 2009-2018 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 -Nru grep-3.1/m4/dup.m4 grep-3.3/m4/dup.m4 --- grep-3.1/m4/dup.m4 2017-05-14 01:09:51.000000000 +0000 +++ grep-3.3/m4/dup.m4 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ -# dup.m4 serial 5 -dnl Copyright (C) 2011-2017 Free Software Foundation, Inc. +# dup.m4 serial 6 +dnl Copyright (C) 2011-2018 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_DUP], [ AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) + AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles m4_ifdef([gl_MSVC_INVAL], [ AC_REQUIRE([gl_MSVC_INVAL]) if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then @@ -33,7 +34,12 @@ ], [gl_cv_func_dup_works=yes], [gl_cv_func_dup_works=no], - [gl_cv_func_dup_works='guessing yes']) + [case "$host_os" in + # Guess no on native Windows. + mingw*) gl_cv_func_dup_works="guessing no" ;; + *) gl_cv_func_dup_works="guessing yes" ;; + esac + ]) ]) case "$gl_cv_func_dup_works" in *yes) ;; diff -Nru grep-3.1/m4/eealloc.m4 grep-3.3/m4/eealloc.m4 --- grep-3.1/m4/eealloc.m4 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/m4/eealloc.m4 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ # eealloc.m4 serial 3 -dnl Copyright (C) 2003, 2009-2017 Free Software Foundation, Inc. +dnl Copyright (C) 2003, 2009-2018 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 -Nru grep-3.1/m4/environ.m4 grep-3.3/m4/environ.m4 --- grep-3.1/m4/environ.m4 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/m4/environ.m4 2018-12-15 18:14:26.000000000 +0000 @@ -1,5 +1,5 @@ -# environ.m4 serial 6 -dnl Copyright (C) 2001-2004, 2006-2017 Free Software Foundation, Inc. +# environ.m4 serial 7 +dnl Copyright (C) 2001-2004, 2006-2018 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. @@ -29,16 +29,14 @@ AC_DEFUN([gt_CHECK_VAR_DECL], [ define([gt_cv_var], [gt_cv_var_]$2[_declaration]) - AC_MSG_CHECKING([if $2 is properly declared]) - AC_CACHE_VAL([gt_cv_var], [ - AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM( - [[$1 - extern struct { int foo; } $2;]], - [[$2.foo = 1;]])], - [gt_cv_var=no], - [gt_cv_var=yes])]) - AC_MSG_RESULT([$gt_cv_var]) + AC_CACHE_CHECK([if $2 is properly declared], [gt_cv_var], + [AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [[$1 + extern struct { int foo; } $2;]], + [[$2.foo = 1;]])], + [gt_cv_var=no], + [gt_cv_var=yes])]) if test $gt_cv_var = yes; then AC_DEFINE([HAVE_]m4_translit($2, [a-z], [A-Z])[_DECL], 1, [Define if you have the declaration of $2.]) diff -Nru grep-3.1/m4/errno_h.m4 grep-3.3/m4/errno_h.m4 --- grep-3.1/m4/errno_h.m4 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/m4/errno_h.m4 2018-12-21 02:51:47.000000000 +0000 @@ -1,9 +1,11 @@ -# errno_h.m4 serial 12 -dnl Copyright (C) 2004, 2006, 2008-2017 Free Software Foundation, Inc. +# errno_h.m4 serial 13 +dnl Copyright (C) 2004, 2006, 2008-2018 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_PREREQ([2.61]) + AC_DEFUN_ONCE([gl_HEADER_ERRNO_H], [ AC_REQUIRE([AC_PROG_CC]) @@ -129,9 +131,3 @@ AC_SUBST($1[_VALUE]) fi ]) - -dnl Autoconf >= 2.61 has AC_COMPUTE_INT built-in. -dnl Remove this when we can assume autoconf >= 2.61. -m4_ifdef([AC_COMPUTE_INT], [], [ - AC_DEFUN([AC_COMPUTE_INT], [_AC_COMPUTE_INT([$2],[$1],[$3],[$4])]) -]) diff -Nru grep-3.1/m4/error.m4 grep-3.3/m4/error.m4 --- grep-3.1/m4/error.m4 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/m4/error.m4 2018-01-07 00:07:08.000000000 +0000 @@ -1,6 +1,6 @@ #serial 14 -# Copyright (C) 1996-1998, 2001-2004, 2009-2017 Free Software Foundation, Inc. +# Copyright (C) 1996-1998, 2001-2004, 2009-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, diff -Nru grep-3.1/m4/exponentd.m4 grep-3.3/m4/exponentd.m4 --- grep-3.1/m4/exponentd.m4 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/m4/exponentd.m4 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ # exponentd.m4 serial 3 -dnl Copyright (C) 2007-2008, 2010-2017 Free Software Foundation, Inc. +dnl Copyright (C) 2007-2008, 2010-2018 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 -Nru grep-3.1/m4/extensions.m4 grep-3.3/m4/extensions.m4 --- grep-3.1/m4/extensions.m4 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/m4/extensions.m4 2018-02-26 06:09:46.000000000 +0000 @@ -1,7 +1,7 @@ -# serial 15 -*- Autoconf -*- +# serial 18 -*- Autoconf -*- # Enable extensions on systems that normally disable them. -# Copyright (C) 2003, 2006-2017 Free Software Foundation, Inc. +# Copyright (C) 2003, 2006-2018 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. @@ -68,6 +68,14 @@ #ifndef _GNU_SOURCE # undef _GNU_SOURCE #endif +/* Enable NetBSD extensions on NetBSD. */ +#ifndef _NETBSD_SOURCE +# undef _NETBSD_SOURCE +#endif +/* Enable OpenBSD extensions on NetBSD. */ +#ifndef _OPENBSD_SOURCE +# undef _OPENBSD_SOURCE +#endif /* Enable threading extensions on Solaris. */ #ifndef _POSIX_PTHREAD_SEMANTICS # undef _POSIX_PTHREAD_SEMANTICS @@ -110,6 +118,11 @@ #ifndef _XOPEN_SOURCE # undef _XOPEN_SOURCE #endif +/* Enable X/Open compliant socket functions that do not require linking + with -lxnet on HP-UX 11.11. */ +#ifndef _HPUX_ALT_XOPEN_SOCKET_API +# undef _HPUX_ALT_XOPEN_SOCKET_API +#endif /* Enable general extensions on Solaris. */ #ifndef __EXTENSIONS__ # undef __EXTENSIONS__ @@ -128,6 +141,8 @@ AC_DEFINE([_ALL_SOURCE]) AC_DEFINE([_DARWIN_C_SOURCE]) AC_DEFINE([_GNU_SOURCE]) + AC_DEFINE([_NETBSD_SOURCE]) + AC_DEFINE([_OPENBSD_SOURCE]) AC_DEFINE([_POSIX_PTHREAD_SEMANTICS]) AC_DEFINE([__STDC_WANT_IEC_60559_ATTRIBS_EXT__]) AC_DEFINE([__STDC_WANT_IEC_60559_BFP_EXT__]) @@ -153,6 +168,7 @@ [ac_cv_should_define__xopen_source=yes])])]) test $ac_cv_should_define__xopen_source = yes && AC_DEFINE([_XOPEN_SOURCE], [500]) + AC_DEFINE([_HPUX_ALT_XOPEN_SOCKET_API]) ])# AC_USE_SYSTEM_EXTENSIONS # gl_USE_SYSTEM_EXTENSIONS diff -Nru grep-3.1/m4/extern-inline.m4 grep-3.3/m4/extern-inline.m4 --- grep-3.1/m4/extern-inline.m4 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/m4/extern-inline.m4 2018-09-19 05:04:26.000000000 +0000 @@ -1,6 +1,6 @@ dnl 'extern inline' a la ISO C99. -dnl Copyright 2012-2017 Free Software Foundation, Inc. +dnl Copyright 2012-2018 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,7 +11,7 @@ [/* Please see the Gnulib manual for how to use these macros. Suppress extern inline with HP-UX cc, as it appears to be broken; see - . + . Suppress extern inline with Sun C in standards-conformance mode, as it mishandles inline functions that call each other. E.g., for 'inline void f @@ -25,20 +25,32 @@ if isdigit is mistakenly implemented via a static inline function, a program containing an extern inline function that calls isdigit may not work since the C standard prohibits extern inline functions - from calling static functions. This bug is known to occur on: + from calling static functions (ISO C 99 section 6.7.4.(3). + This bug is known to occur on: OS X 10.8 and earlier; see: - http://lists.gnu.org/archive/html/bug-gnulib/2012-12/msg00023.html + https://lists.gnu.org/r/bug-gnulib/2012-12/msg00023.html DragonFly; see http://muscles.dragonflybsd.org/bulk/bleeding-edge-potential/latest-per-pkg/ah-tty-0.3.12.log FreeBSD; see: - http://lists.gnu.org/archive/html/bug-gnulib/2014-07/msg00104.html + https://lists.gnu.org/r/bug-gnulib/2014-07/msg00104.html OS X 10.9 has a macro __header_inline indicating the bug is fixed for C and - for clang but remains for g++; see . - Assume DragonFly and FreeBSD will be similar. */ + for clang but remains for g++; see . + Assume DragonFly and FreeBSD will be similar. + + 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 __APPLE__ && defined __MACH__) \ || defined __DragonFly__ || defined __FreeBSD__) \ && (defined __header_inline \ diff -Nru grep-3.1/m4/fchdir.m4 grep-3.3/m4/fchdir.m4 --- grep-3.1/m4/fchdir.m4 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/m4/fchdir.m4 2018-09-19 05:04:26.000000000 +0000 @@ -1,5 +1,5 @@ -# fchdir.m4 serial 21 -dnl Copyright (C) 2006-2017 Free Software Foundation, Inc. +# fchdir.m4 serial 24 +dnl Copyright (C) 2006-2018 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,10 +31,14 @@ [gl_cv_func_open_directory_works=yes], [gl_cv_func_open_directory_works=no], [case "$host_os" in - # Guess yes on glibc systems. - *-gnu*) gl_cv_func_open_directory_works="guessing yes" ;; - # If we don't know, assume the worst. - *) gl_cv_func_open_directory_works="guessing no" ;; + # Guess yes on Linux systems. + linux-* | linux) gl_cv_func_open_directory_works="guessing yes" ;; + # Guess yes on glibc systems. + *-gnu* | gnu*) gl_cv_func_open_directory_works="guessing yes" ;; + # Guess no on native Windows. + mingw*) gl_cv_func_open_directory_works="guessing no" ;; + # If we don't know, assume the worst. + *) gl_cv_func_open_directory_works="guessing no" ;; esac ])]) case "$gl_cv_func_open_directory_works" in diff -Nru grep-3.1/m4/fcntl_h.m4 grep-3.3/m4/fcntl_h.m4 --- grep-3.1/m4/fcntl_h.m4 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/m4/fcntl_h.m4 2018-01-07 00:07:08.000000000 +0000 @@ -1,6 +1,6 @@ # serial 15 # Configure fcntl.h. -dnl Copyright (C) 2006-2007, 2009-2017 Free Software Foundation, Inc. +dnl Copyright (C) 2006-2007, 2009-2018 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 -Nru grep-3.1/m4/fcntl.m4 grep-3.3/m4/fcntl.m4 --- grep-3.1/m4/fcntl.m4 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/m4/fcntl.m4 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ # fcntl.m4 serial 9 -dnl Copyright (C) 2009-2017 Free Software Foundation, Inc. +dnl Copyright (C) 2009-2018 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 -Nru grep-3.1/m4/fcntl-o.m4 grep-3.3/m4/fcntl-o.m4 --- grep-3.1/m4/fcntl-o.m4 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/m4/fcntl-o.m4 2018-12-21 02:51:47.000000000 +0000 @@ -1,23 +1,22 @@ -# fcntl-o.m4 serial 4 -dnl Copyright (C) 2006, 2009-2017 Free Software Foundation, Inc. +# fcntl-o.m4 serial 6 +dnl Copyright (C) 2006, 2009-2018 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_PREREQ([2.60]) + # Test whether the flags O_NOATIME and O_NOFOLLOW actually work. # Define HAVE_WORKING_O_NOATIME to 1 if O_NOATIME works, or to 0 otherwise. # Define HAVE_WORKING_O_NOFOLLOW to 1 if O_NOFOLLOW works, or to 0 otherwise. AC_DEFUN([gl_FCNTL_O_FLAGS], [ dnl Persuade glibc to define O_NOATIME and O_NOFOLLOW. - dnl AC_USE_SYSTEM_EXTENSIONS was introduced in autoconf 2.60 and obsoletes - dnl AC_GNU_SOURCE. - m4_ifdef([AC_USE_SYSTEM_EXTENSIONS], - [AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])], - [AC_REQUIRE([AC_GNU_SOURCE])]) + AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) + AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_CHECK_HEADERS_ONCE([unistd.h]) AC_CHECK_FUNCS_ONCE([symlink]) AC_CACHE_CHECK([for working fcntl.h], [gl_cv_header_working_fcntl_h], @@ -116,7 +115,13 @@ 68) gl_cv_header_working_fcntl_h='no (bad O_NOATIME, O_NOFOLLOW)';; #( *) gl_cv_header_working_fcntl_h='no';; esac], - [gl_cv_header_working_fcntl_h=cross-compiling])]) + [case "$host_os" in + # Guess 'no' on native Windows. + mingw*) gl_cv_header_working_fcntl_h='no' ;; + *) gl_cv_header_working_fcntl_h=cross-compiling ;; + esac + ]) + ]) case $gl_cv_header_working_fcntl_h in #( *O_NOATIME* | no | cross-compiling) ac_val=0;; #( diff -Nru grep-3.1/m4/fcntl-safer.m4 grep-3.3/m4/fcntl-safer.m4 --- grep-3.1/m4/fcntl-safer.m4 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/m4/fcntl-safer.m4 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ #serial 9 -dnl Copyright (C) 2005-2007, 2009-2017 Free Software Foundation, Inc. +dnl Copyright (C) 2005-2007, 2009-2018 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 -Nru grep-3.1/m4/fdopendir.m4 grep-3.3/m4/fdopendir.m4 --- grep-3.1/m4/fdopendir.m4 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/m4/fdopendir.m4 2018-01-07 00:07:08.000000000 +0000 @@ -1,7 +1,7 @@ # serial 10 # See if we need to provide fdopendir. -dnl Copyright (C) 2009-2017 Free Software Foundation, Inc. +dnl Copyright (C) 2009-2018 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 -Nru grep-3.1/m4/fdopen.m4 grep-3.3/m4/fdopen.m4 --- grep-3.1/m4/fdopen.m4 2017-05-14 01:09:51.000000000 +0000 +++ grep-3.3/m4/fdopen.m4 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ # fdopen.m4 serial 4 -dnl Copyright (C) 2011-2017 Free Software Foundation, Inc. +dnl Copyright (C) 2011-2018 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 -Nru grep-3.1/m4/filenamecat.m4 grep-3.3/m4/filenamecat.m4 --- grep-3.1/m4/filenamecat.m4 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/m4/filenamecat.m4 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ # filenamecat.m4 serial 11 -dnl Copyright (C) 2002-2006, 2009-2017 Free Software Foundation, Inc. +dnl Copyright (C) 2002-2006, 2009-2018 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 -Nru grep-3.1/m4/flexmember.m4 grep-3.3/m4/flexmember.m4 --- grep-3.1/m4/flexmember.m4 2017-03-22 03:19:46.000000000 +0000 +++ grep-3.3/m4/flexmember.m4 2018-01-07 00:07:08.000000000 +0000 @@ -1,7 +1,7 @@ # serial 5 # Check for flexible array member support. -# Copyright (C) 2006, 2009-2017 Free Software Foundation, Inc. +# Copyright (C) 2006, 2009-2018 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 -Nru grep-3.1/m4/float_h.m4 grep-3.3/m4/float_h.m4 --- grep-3.1/m4/float_h.m4 2017-06-21 16:10:44.000000000 +0000 +++ grep-3.3/m4/float_h.m4 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ -# float_h.m4 serial 10 -dnl Copyright (C) 2007, 2009-2017 Free Software Foundation, Inc. +# float_h.m4 serial 12 +dnl Copyright (C) 2007, 2009-2018 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. @@ -24,10 +24,14 @@ x86_64 ) # On x86_64 systems, the C compiler may still be generating # 32-bit code. - AC_EGREP_CPP([yes], - [#if defined __LP64__ || defined __x86_64__ || defined __amd64__ - yes - #endif], + AC_COMPILE_IFELSE( + [AC_LANG_SOURCE( + [[#if defined __LP64__ || defined __x86_64__ || defined __amd64__ + int ok; + #else + error fail + #endif + ]])], [], [FLOAT_H=float.h]) ;; @@ -69,14 +73,20 @@ [gl_cv_func_itold_works=no], [case "$host" in sparc*-*-linux*) - AC_EGREP_CPP([yes], - [#if defined __LP64__ || defined __arch64__ - yes - #endif], + AC_COMPILE_IFELSE( + [AC_LANG_SOURCE( + [[#if defined __LP64__ || defined __arch64__ + int ok; + #else + error fail + #endif + ]])], [gl_cv_func_itold_works="guessing no"], [gl_cv_func_itold_works="guessing yes"]) ;; - *) gl_cv_func_itold_works="guessing yes" ;; + # Guess yes on native Windows. + mingw*) gl_cv_func_itold_works="guessing yes" ;; + *) gl_cv_func_itold_works="guessing yes" ;; esac ]) ]) diff -Nru grep-3.1/m4/fnmatch_h.m4 grep-3.3/m4/fnmatch_h.m4 --- grep-3.1/m4/fnmatch_h.m4 1970-01-01 00:00:00.000000000 +0000 +++ grep-3.3/m4/fnmatch_h.m4 2018-09-19 05:04:26.000000000 +0000 @@ -0,0 +1,75 @@ +# fnmatch_h.m4 serial 4 +dnl Copyright (C) 2009-2018 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_ONCE([gl_FNMATCH_H], +[ + AC_REQUIRE([gl_FNMATCH_H_DEFAULTS]) + m4_ifdef([gl_ANSI_CXX], [AC_REQUIRE([gl_ANSI_CXX])]) + AC_CHECK_HEADERS_ONCE([fnmatch.h]) + gl_CHECK_NEXT_HEADERS([fnmatch.h]) + + dnl Persuade glibc to declare FNM_CASEFOLD etc. + dnl This is only needed if gl_fnmatch_required = GNU. It would be possible + dnl to avoid this dependency for gl_FUNC_FNMATCH_POSIX by putting + dnl gl_FUNC_FNMATCH_GNU into a separate .m4 file. + AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) + + if test $ac_cv_header_fnmatch_h = yes; then + HAVE_FNMATCH_H=1 + else + HAVE_FNMATCH_H=0 + fi + AC_SUBST([HAVE_FNMATCH_H]) + + m4_ifdef([gl_POSIXCHECK], + [FNMATCH_H=fnmatch.h], + [FNMATCH_H='' + if m4_ifdef([gl_ANSI_CXX], [test "$CXX" != no], [false]); then + dnl Override always, to support the C++ GNULIB_NAMESPACE. + FNMATCH_H=fnmatch.h + else + if test $ac_cv_header_fnmatch_h != yes; then + dnl Provide a substitute file. + FNMATCH_H=fnmatch.h + fi + fi + ]) + AC_SUBST([FNMATCH_H]) + AM_CONDITIONAL([GL_GENERATE_FNMATCH_H], [test -n "$FNMATCH_H"]) + + 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 + ]], + [fnmatch]) +]) + +dnl Unconditionally enables the replacement of . +AC_DEFUN([gl_REPLACE_FNMATCH_H], +[ + AC_REQUIRE([gl_FNMATCH_H_DEFAULTS]) + FNMATCH_H='fnmatch.h' + AM_CONDITIONAL([GL_GENERATE_FNMATCH_H], [test -n "$FNMATCH_H"]) +]) + +AC_DEFUN([gl_FNMATCH_MODULE_INDICATOR], +[ + dnl Use AC_REQUIRE here, so that the default settings are expanded once only. + AC_REQUIRE([gl_FNMATCH_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_FNMATCH_H_DEFAULTS], +[ + GNULIB_FNMATCH=0; AC_SUBST([GNULIB_FNMATCH]) + dnl Assume POSIX behavior unless another module says otherwise. + HAVE_FNMATCH=1; AC_SUBST([HAVE_FNMATCH]) + REPLACE_FNMATCH=0; AC_SUBST([REPLACE_FNMATCH]) +]) diff -Nru grep-3.1/m4/fnmatch.m4 grep-3.3/m4/fnmatch.m4 --- grep-3.1/m4/fnmatch.m4 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/m4/fnmatch.m4 2018-09-19 05:04:26.000000000 +0000 @@ -1,6 +1,6 @@ -# Check for fnmatch - serial 9. -*- coding: utf-8 -*- +# Check for fnmatch - serial 13. -*- coding: utf-8 -*- -# Copyright (C) 2000-2007, 2009-2017 Free Software Foundation, Inc. +# Copyright (C) 2000-2007, 2009-2018 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. @@ -13,124 +13,120 @@ [ m4_divert_text([DEFAULTS], [gl_fnmatch_required=POSIX]) - dnl Persuade glibc to declare FNM_CASEFOLD etc. - dnl This is only needed if gl_fnmatch_required = GNU. It would be possible - dnl to avoid this dependency for gl_FUNC_FNMATCH_POSIX by putting - dnl gl_FUNC_FNMATCH_GNU into a separate .m4 file. - AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) - - FNMATCH_H= + AC_REQUIRE([gl_FNMATCH_H]) gl_fnmatch_required_lowercase=` echo $gl_fnmatch_required | LC_ALL=C tr '[[A-Z]]' '[[a-z]]' ` - gl_fnmatch_cache_var="gl_cv_func_fnmatch_${gl_fnmatch_required_lowercase}" - AC_CACHE_CHECK([for working $gl_fnmatch_required fnmatch], - [$gl_fnmatch_cache_var], - [dnl Some versions of Solaris, SCO, and the GNU C Library - dnl have a broken or incompatible fnmatch. - dnl So we run a test program. If we are cross-compiling, take no chance. - dnl Thanks to John Oleynick, François Pinard, and Paul Eggert for this - dnl test. - if test $gl_fnmatch_required = GNU; then - gl_fnmatch_gnu_start= - gl_fnmatch_gnu_end= - else - gl_fnmatch_gnu_start='#if 0' - gl_fnmatch_gnu_end='#endif' - fi - AC_RUN_IFELSE( - [AC_LANG_PROGRAM( - [[#include - static int - y (char const *pattern, char const *string, int flags) - { - return fnmatch (pattern, string, flags) == 0; - } - static int - n (char const *pattern, char const *string, int flags) - { - return fnmatch (pattern, string, flags) == FNM_NOMATCH; - } - ]], - [[char const *Apat = 'A' < '\\\\' ? "[A-\\\\\\\\]" : "[\\\\\\\\-A]"; - char const *apat = 'a' < '\\\\' ? "[a-\\\\\\\\]" : "[\\\\\\\\-a]"; - static char const A_1[] = { 'A' - 1, 0 }; - static char const A01[] = { 'A' + 1, 0 }; - static char const a_1[] = { 'a' - 1, 0 }; - static char const a01[] = { 'a' + 1, 0 }; - static char const bs_1[] = { '\\\\' - 1, 0 }; - static char const bs01[] = { '\\\\' + 1, 0 }; - int result = 0; - if (!n ("a*", "", 0)) - return 1; - if (!y ("a*", "abc", 0)) - return 1; - if (!y ("[/b", "[/b", 0)) /*"]]"*/ /* glibc Bugzilla bug 12378 */ - return 1; - if (!n ("d*/*1", "d/s/1", FNM_PATHNAME)) - return 2; - if (!y ("a\\\\bc", "abc", 0)) - return 3; - if (!n ("a\\\\bc", "abc", FNM_NOESCAPE)) - return 3; - if (!y ("*x", ".x", 0)) - return 4; - if (!n ("*x", ".x", FNM_PERIOD)) - return 4; - if (!y (Apat, "\\\\", 0)) - return 5; - if (!y (Apat, "A", 0)) - return 5; - if (!y (apat, "\\\\", 0)) - return 5; - if (!y (apat, "a", 0)) - return 5; - if (!(n (Apat, A_1, 0) == ('A' < '\\\\'))) - return 5; - if (!(n (apat, a_1, 0) == ('a' < '\\\\'))) - return 5; - if (!(y (Apat, A01, 0) == ('A' < '\\\\'))) - return 5; - if (!(y (apat, a01, 0) == ('a' < '\\\\'))) - return 5; - if (!(y (Apat, bs_1, 0) == ('A' < '\\\\'))) - return 5; - if (!(y (apat, bs_1, 0) == ('a' < '\\\\'))) - return 5; - if (!(n (Apat, bs01, 0) == ('A' < '\\\\'))) - return 5; - if (!(n (apat, bs01, 0) == ('a' < '\\\\'))) - return 5; - $gl_fnmatch_gnu_start - if (!y ("xxXX", "xXxX", FNM_CASEFOLD)) - result |= 8; - if (!y ("a++(x|yy)b", "a+xyyyyxb", FNM_EXTMATCH)) - result |= 16; - if (!n ("d*/*1", "d/s/1", FNM_FILE_NAME)) - result |= 32; - if (!y ("*", "x", FNM_FILE_NAME | FNM_LEADING_DIR)) - result |= 64; - if (!y ("x*", "x/y/z", FNM_FILE_NAME | FNM_LEADING_DIR)) - result |= 64; - if (!y ("*c*", "c/x", FNM_FILE_NAME | FNM_LEADING_DIR)) - result |= 64; - $gl_fnmatch_gnu_end - return result; - ]])], - [eval "$gl_fnmatch_cache_var=yes"], - [eval "$gl_fnmatch_cache_var=no"], - [eval "$gl_fnmatch_cache_var=\"guessing no\""]) - ]) - eval "gl_fnmatch_result=\"\$$gl_fnmatch_cache_var\"" - if test "$gl_fnmatch_result" = yes; then - dnl Not strictly necessary. Only to avoid spurious leftover files if people - dnl don't do "make distclean". - rm -f "$gl_source_base/fnmatch.h" + AC_CHECK_FUNCS_ONCE([fnmatch]) + if test $ac_cv_func_fnmatch = no; then + HAVE_FNMATCH=0 else - FNMATCH_H=fnmatch.h + gl_fnmatch_cache_var="gl_cv_func_fnmatch_${gl_fnmatch_required_lowercase}" + AC_CACHE_CHECK([for working $gl_fnmatch_required fnmatch], + [$gl_fnmatch_cache_var], + [dnl Some versions of Solaris, SCO, and the GNU C Library + dnl have a broken or incompatible fnmatch. + dnl So we run a test program. If we are cross-compiling, take no chance. + dnl Thanks to John Oleynick, François Pinard, and Paul Eggert for this + dnl test. + if test $gl_fnmatch_required = GNU; then + gl_fnmatch_gnu_start= + gl_fnmatch_gnu_end= + else + gl_fnmatch_gnu_start='#if 0' + gl_fnmatch_gnu_end='#endif' + fi + AC_RUN_IFELSE( + [AC_LANG_PROGRAM( + [[#include + static int + y (char const *pattern, char const *string, int flags) + { + return fnmatch (pattern, string, flags) == 0; + } + static int + n (char const *pattern, char const *string, int flags) + { + return fnmatch (pattern, string, flags) == FNM_NOMATCH; + } + ]], + [[char const *Apat = 'A' < '\\\\' ? "[A-\\\\\\\\]" : "[\\\\\\\\-A]"; + char const *apat = 'a' < '\\\\' ? "[a-\\\\\\\\]" : "[\\\\\\\\-a]"; + static char const A_1[] = { 'A' - 1, 0 }; + static char const A01[] = { 'A' + 1, 0 }; + static char const a_1[] = { 'a' - 1, 0 }; + static char const a01[] = { 'a' + 1, 0 }; + static char const bs_1[] = { '\\\\' - 1, 0 }; + static char const bs01[] = { '\\\\' + 1, 0 }; + int result = 0; + if (!n ("a*", "", 0)) + return 1; + if (!y ("a*", "abc", 0)) + return 1; + if (!y ("[/b", "[/b", 0)) /*"]]"*/ /* glibc Bugzilla bug 12378 */ + return 1; + if (!n ("d*/*1", "d/s/1", FNM_PATHNAME)) + return 2; + if (!y ("a\\\\bc", "abc", 0)) + return 3; + if (!n ("a\\\\bc", "abc", FNM_NOESCAPE)) + return 3; + if (!y ("*x", ".x", 0)) + return 4; + if (!n ("*x", ".x", FNM_PERIOD)) + return 4; + if (!y (Apat, "\\\\", 0)) + return 5; + if (!y (Apat, "A", 0)) + return 5; + if (!y (apat, "\\\\", 0)) + return 5; + if (!y (apat, "a", 0)) + return 5; + if (!(n (Apat, A_1, 0) == ('A' < '\\\\'))) + return 5; + if (!(n (apat, a_1, 0) == ('a' < '\\\\'))) + return 5; + if (!(y (Apat, A01, 0) == ('A' < '\\\\'))) + return 5; + if (!(y (apat, a01, 0) == ('a' < '\\\\'))) + return 5; + if (!(y (Apat, bs_1, 0) == ('A' < '\\\\'))) + return 5; + if (!(y (apat, bs_1, 0) == ('a' < '\\\\'))) + return 5; + if (!(n (Apat, bs01, 0) == ('A' < '\\\\'))) + return 5; + if (!(n (apat, bs01, 0) == ('a' < '\\\\'))) + return 5; + $gl_fnmatch_gnu_start + if (!y ("xxXX", "xXxX", FNM_CASEFOLD)) + result |= 8; + if (!y ("a++(x|yy)b", "a+xyyyyxb", FNM_EXTMATCH)) + result |= 16; + if (!n ("d*/*1", "d/s/1", FNM_FILE_NAME)) + result |= 32; + if (!y ("*", "x", FNM_FILE_NAME | FNM_LEADING_DIR)) + result |= 64; + if (!y ("x*", "x/y/z", FNM_FILE_NAME | FNM_LEADING_DIR)) + result |= 64; + if (!y ("*c*", "c/x", FNM_FILE_NAME | FNM_LEADING_DIR)) + result |= 64; + $gl_fnmatch_gnu_end + return result; + ]])], + [eval "$gl_fnmatch_cache_var=yes"], + [eval "$gl_fnmatch_cache_var=no"], + [eval "$gl_fnmatch_cache_var=\"guessing no\""]) + ]) + eval "gl_fnmatch_result=\"\$$gl_fnmatch_cache_var\"" + if test "$gl_fnmatch_result" != yes; then + REPLACE_FNMATCH=1 + fi + fi + if test $HAVE_FNMATCH = 0 || test $REPLACE_FNMATCH = 1; then + gl_REPLACE_FNMATCH_H fi - AC_SUBST([FNMATCH_H]) - AM_CONDITIONAL([GL_GENERATE_FNMATCH_H], [test -n "$FNMATCH_H"]) ]) # Request a POSIX compliant fnmatch function with GNU extensions. @@ -143,11 +139,6 @@ AC_DEFUN([gl_PREREQ_FNMATCH], [ - dnl We must choose a different name for our function, since on ELF systems - dnl a broken fnmatch() in libc.so would override our fnmatch() if it is - dnl compiled into a shared library. - AC_DEFINE_UNQUOTED([fnmatch], [${gl_fnmatch_required_lowercase}_fnmatch], - [Define to a replacement function name for fnmatch().]) dnl Prerequisites of lib/fnmatch.c. AC_REQUIRE([AC_TYPE_MBSTATE_T]) AC_CHECK_DECLS([isblank], [], [], [[#include ]]) diff -Nru grep-3.1/m4/fpending.m4 grep-3.3/m4/fpending.m4 --- grep-3.1/m4/fpending.m4 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/m4/fpending.m4 2018-01-07 00:07:08.000000000 +0000 @@ -1,6 +1,6 @@ # serial 22 -# Copyright (C) 2000-2001, 2004-2017 Free Software Foundation, Inc. +# Copyright (C) 2000-2001, 2004-2018 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 -Nru grep-3.1/m4/fpieee.m4 grep-3.3/m4/fpieee.m4 --- grep-3.1/m4/fpieee.m4 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/m4/fpieee.m4 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ # fpieee.m4 serial 2 -*- coding: utf-8 -*- -dnl Copyright (C) 2007, 2009-2017 Free Software Foundation, Inc. +dnl Copyright (C) 2007, 2009-2018 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. @@ -33,7 +33,7 @@ alpha*) # On Alpha systems, a compiler option provides the behaviour. # See the ieee(3) manual page, also available at - # + # if test -n "$GCC"; then # GCC has the option -mieee. # For full IEEE compliance (rarely needed), use option -mieee-with-inexact. diff -Nru grep-3.1/m4/fstatat.m4 grep-3.3/m4/fstatat.m4 --- grep-3.1/m4/fstatat.m4 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/m4/fstatat.m4 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ -# fstatat.m4 serial 3 -dnl Copyright (C) 2004-2017 Free Software Foundation, Inc. +# fstatat.m4 serial 4 +dnl Copyright (C) 2004-2018 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. @@ -13,14 +13,14 @@ AC_REQUIRE([gl_SYS_STAT_H_DEFAULTS]) AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) AC_REQUIRE([gl_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK]) - AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles + AC_REQUIRE([AC_CANONICAL_HOST]) AC_CHECK_FUNCS_ONCE([fstatat]) if test $ac_cv_func_fstatat = no; then HAVE_FSTATAT=0 else dnl Test for an AIX 7.1 bug; see - dnl . + dnl . AC_CACHE_CHECK([whether fstatat (..., 0) works], [gl_cv_func_fstatat_zero_flag], [AC_RUN_IFELSE( @@ -46,15 +46,20 @@ case $gl_cv_func_fstatat_zero_flag+$gl_cv_func_lstat_dereferences_slashed_symlink in *yes+*yes) ;; - *) REPLACE_FSTATAT=1 - case $gl_cv_func_fstatat_zero_flag in - *yes) + *) REPLACE_FSTATAT=1 ;; + esac + + case $host_os in + solaris*) + REPLACE_FSTATAT=1 ;; + esac + + case $REPLACE_FSTATAT,$gl_cv_func_fstatat_zero_flag in + 1,*yes) AC_DEFINE([HAVE_WORKING_FSTATAT_ZERO_FLAG], [1], [Define to 1 if fstatat (..., 0) works. For example, it does not work in AIX 7.1.]) ;; - esac - ;; esac fi ]) diff -Nru grep-3.1/m4/fstat.m4 grep-3.3/m4/fstat.m4 --- grep-3.1/m4/fstat.m4 2017-05-14 01:09:51.000000000 +0000 +++ grep-3.3/m4/fstat.m4 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ -# fstat.m4 serial 5 -dnl Copyright (C) 2011-2017 Free Software Foundation, Inc. +# fstat.m4 serial 6 +dnl Copyright (C) 2011-2018 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. @@ -10,9 +10,10 @@ AC_REQUIRE([gl_SYS_STAT_H_DEFAULTS]) case "$host_os" in - mingw*) - dnl On this platform, the original stat() returns st_atime, st_mtime, + mingw* | solaris*) + dnl On MinGW, the original stat() returns st_atime, st_mtime, dnl st_ctime values that are affected by the time zone. + dnl Solaris stat can return a negative tv_nsec. REPLACE_FSTAT=1 ;; esac diff -Nru grep-3.1/m4/ftruncate.m4 grep-3.3/m4/ftruncate.m4 --- grep-3.1/m4/ftruncate.m4 1970-01-01 00:00:00.000000000 +0000 +++ grep-3.3/m4/ftruncate.m4 2018-01-07 00:07:08.000000000 +0000 @@ -0,0 +1,40 @@ +# serial 20 + +# See if we need to emulate a missing ftruncate function using chsize. + +# Copyright (C) 2000-2001, 2003-2007, 2009-2018 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. + +AC_DEFUN([gl_FUNC_FTRUNCATE], +[ + AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) + AC_CHECK_FUNCS_ONCE([ftruncate]) + if test $ac_cv_func_ftruncate = yes; then + m4_ifdef([gl_LARGEFILE], [ + AC_REQUIRE([AC_CANONICAL_HOST]) + case "$host_os" in + mingw*) + dnl Native Windows, and Large File Support is requested. + dnl The MSVCRT _chsize() function only accepts a 32-bit file size, + dnl and the mingw64 ftruncate64() function is unreliable (it may + dnl delete the file, see + dnl ). + dnl Use gnulib's ftruncate() implementation instead. + REPLACE_FTRUNCATE=1 + ;; + esac + ], [ + : + ]) + else + HAVE_FTRUNCATE=0 + fi +]) + +# Prerequisites of lib/ftruncate.c. +AC_DEFUN([gl_PREREQ_FTRUNCATE], +[ + AC_CHECK_FUNCS([chsize]) +]) diff -Nru grep-3.1/m4/fts.m4 grep-3.3/m4/fts.m4 --- grep-3.1/m4/fts.m4 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/m4/fts.m4 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ -#serial 20 -dnl Copyright (C) 2005-2017 Free Software Foundation, Inc. +#serial 21 +dnl Copyright (C) 2005-2018 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. @@ -16,7 +16,16 @@ AC_CHECK_FUNCS_ONCE([fstatfs]) AC_CHECK_HEADERS_ONCE([sys/param.h sys/vfs.h])dnl - AC_CHECK_MEMBERS([struct statfs.f_type],,, - [$ac_includes_default - #include ]) + if test "$ac_cv_func_fstatfs,$ac_cv_header_sys_vfs_h" = yes,yes; then + AC_CHECK_MEMBERS([struct statfs.f_type], [], [], + [[$ac_includes_default + #include + ]]) + if test "$ac_cv_member_struct_statfs_f_type" = yes; then + AC_CHECK_TYPES([__fsword_t], [], [], + [[$ac_includes_default + #include + ]]) + fi + fi ]) diff -Nru grep-3.1/m4/getcwd.m4 grep-3.3/m4/getcwd.m4 --- grep-3.1/m4/getcwd.m4 2017-05-21 00:31:28.000000000 +0000 +++ grep-3.3/m4/getcwd.m4 2018-06-24 23:16:49.000000000 +0000 @@ -1,12 +1,12 @@ # getcwd.m4 - check for working getcwd that is compatible with glibc -# Copyright (C) 2001, 2003-2007, 2009-2017 Free Software Foundation, Inc. +# Copyright (C) 2001, 2003-2007, 2009-2018 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 14 +# serial 16 AC_DEFUN([gl_FUNC_GETCWD_NULL], [ @@ -25,7 +25,7 @@ char *getcwd (); # endif ]], [[ -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +#if defined _WIN32 && ! defined __CYGWIN__ /* mingw cwd does not start with '/', but getcwd does allocate. However, mingw fails to honor non-zero size. */ #else @@ -48,12 +48,12 @@ [gl_cv_func_getcwd_null=yes], [gl_cv_func_getcwd_null=no], [[case "$host_os" in - # Guess yes on glibc systems. - *-gnu*) gl_cv_func_getcwd_null="guessing yes";; - # Guess yes on Cygwin. - cygwin*) gl_cv_func_getcwd_null="guessing yes";; - # If we don't know, assume the worst. - *) gl_cv_func_getcwd_null="guessing no";; + # Guess yes on glibc systems. + *-gnu* | gnu*) gl_cv_func_getcwd_null="guessing yes";; + # Guess yes on Cygwin. + cygwin*) gl_cv_func_getcwd_null="guessing yes";; + # If we don't know, assume the worst. + *) gl_cv_func_getcwd_null="guessing no";; esac ]])]) ]) diff -Nru grep-3.1/m4/getdtablesize.m4 grep-3.3/m4/getdtablesize.m4 --- grep-3.1/m4/getdtablesize.m4 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/m4/getdtablesize.m4 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ -# getdtablesize.m4 serial 6 -dnl Copyright (C) 2008-2017 Free Software Foundation, Inc. +# getdtablesize.m4 serial 7 +dnl Copyright (C) 2008-2018 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,29 +12,43 @@ AC_CHECK_DECLS_ONCE([getdtablesize]) if test $ac_cv_func_getdtablesize = yes && test $ac_cv_have_decl_getdtablesize = yes; then - # Cygwin 1.7.25 automatically increases the RLIMIT_NOFILE soft limit - # up to an unchangeable hard limit; all other platforms correctly - # require setrlimit before getdtablesize() can report a larger value. AC_CACHE_CHECK([whether getdtablesize works], [gl_cv_func_getdtablesize_works], - [AC_RUN_IFELSE([ - AC_LANG_PROGRAM([[#include ]], - [int size = getdtablesize(); - if (dup2 (0, getdtablesize()) != -1) - return 1; - if (size != getdtablesize()) - return 2; - ])], - [gl_cv_func_getdtablesize_works=yes], - [gl_cv_func_getdtablesize_works=no], - [case "$host_os" in - cygwin*) # on cygwin 1.5.25, getdtablesize() automatically grows - gl_cv_func_getdtablesize_works="guessing no" ;; - *) gl_cv_func_getdtablesize_works="guessing yes" ;; - esac]) + [dnl There are two concepts: the "maximum possible file descriptor value + 1" + dnl and the "maximum number of open file descriptors in a process". + dnl Per SUSv2 and POSIX, getdtablesize() should return the first one. + dnl On most platforms, the first and the second concept are the same. + dnl On OpenVMS, however, they are different and getdtablesize() returns + dnl the second one; thus the test below fails. But we don't care + dnl because there's no good way to write a replacement getdtablesize(). + case "$host_os" in + vms*) gl_cv_func_getdtablesize_works="no (limitation)" ;; + *) + dnl Cygwin 1.7.25 automatically increases the RLIMIT_NOFILE soft + dnl limit up to an unchangeable hard limit; all other platforms + dnl correctly require setrlimit before getdtablesize() can report + dnl a larger value. + AC_RUN_IFELSE([ + AC_LANG_PROGRAM([[#include ]], + [int size = getdtablesize(); + if (dup2 (0, getdtablesize()) != -1) + return 1; + if (size != getdtablesize()) + return 2; + ])], + [gl_cv_func_getdtablesize_works=yes], + [gl_cv_func_getdtablesize_works=no], + [case "$host_os" in + cygwin*) # on cygwin 1.5.25, getdtablesize() automatically grows + gl_cv_func_getdtablesize_works="guessing no" ;; + *) gl_cv_func_getdtablesize_works="guessing yes" ;; + esac + ]) + ;; + esac ]) case "$gl_cv_func_getdtablesize_works" in - *yes) ;; + *yes | "no (limitation)") ;; *) REPLACE_GETDTABLESIZE=1 ;; esac else diff -Nru grep-3.1/m4/getopt.m4 grep-3.3/m4/getopt.m4 --- grep-3.1/m4/getopt.m4 2017-05-14 01:09:51.000000000 +0000 +++ grep-3.3/m4/getopt.m4 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ # getopt.m4 serial 46 -dnl Copyright (C) 2002-2006, 2008-2017 Free Software Foundation, Inc. +dnl Copyright (C) 2002-2006, 2008-2018 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 -Nru grep-3.1/m4/getpagesize.m4 grep-3.3/m4/getpagesize.m4 --- grep-3.1/m4/getpagesize.m4 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/m4/getpagesize.m4 2018-09-19 05:04:26.000000000 +0000 @@ -1,5 +1,5 @@ -# getpagesize.m4 serial 9 -dnl Copyright (C) 2002, 2004-2005, 2007, 2009-2017 Free Software Foundation, +# getpagesize.m4 serial 10 +dnl Copyright (C) 2002, 2004-2005, 2007, 2009-2018 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, @@ -9,8 +9,8 @@ [ AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) AC_REQUIRE([AC_CANONICAL_HOST]) - AC_CHECK_FUNCS([getpagesize]) - if test $ac_cv_func_getpagesize = no; then + gl_CHECK_FUNC_GETPAGESIZE + if test $gl_cv_func_getpagesize = no; then HAVE_GETPAGESIZE=0 AC_CHECK_HEADERS([OS.h]) if test $ac_cv_header_OS_h = yes; then @@ -30,3 +30,20 @@ dnl mingw has getpagesize() in libgcc.a but doesn't declare it. AC_CHECK_DECL([getpagesize], , [HAVE_DECL_GETPAGESIZE=0]) ]) + +dnl Tests whether the function getpagesize() exists. +dnl Sets gl_cv_func_getpagesize. +AC_DEFUN([gl_CHECK_FUNC_GETPAGESIZE], +[ + dnl We can't use AC_CHECK_FUNC here, because getpagesize() is defined as a + dnl static inline function when compiling for Android 4.4 or older. + AC_CACHE_CHECK([for getpagesize], [gl_cv_func_getpagesize], + [AC_LINK_IFELSE( + [AC_LANG_PROGRAM( + [[#include ]], + [[return getpagesize();]]) + ], + [gl_cv_func_getpagesize=yes], + [gl_cv_func_getpagesize=no]) + ]) +]) diff -Nru grep-3.1/m4/getprogname.m4 grep-3.3/m4/getprogname.m4 --- grep-3.1/m4/getprogname.m4 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/m4/getprogname.m4 2018-01-07 00:07:08.000000000 +0000 @@ -1,6 +1,6 @@ # getprogname.m4 - check for getprogname or replacements for it -# Copyright (C) 2016-2017 Free Software Foundation, Inc. +# Copyright (C) 2016-2018 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 -Nru grep-3.1/m4/gettimeofday.m4 grep-3.3/m4/gettimeofday.m4 --- grep-3.1/m4/gettimeofday.m4 1970-01-01 00:00:00.000000000 +0000 +++ grep-3.3/m4/gettimeofday.m4 2018-01-07 00:07:08.000000000 +0000 @@ -0,0 +1,126 @@ +# serial 25 + +# Copyright (C) 2001-2003, 2005, 2007, 2009-2018 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. + +dnl From Jim Meyering. + +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_CHECK_FUNCS_ONCE([gettimeofday]) + + gl_gettimeofday_timezone=void + if test $ac_cv_func_gettimeofday != yes; then + HAVE_GETTIMEOFDAY=0 + else + gl_FUNC_GETTIMEOFDAY_CLOBBER + AC_CACHE_CHECK([for gettimeofday with POSIX signature], + [gl_cv_func_gettimeofday_posix_signature], + [AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [[#include + struct timeval c; + int gettimeofday (struct timeval *restrict, void *restrict); + ]], + [[/* glibc uses struct timezone * rather than the POSIX void * + if _GNU_SOURCE is defined. However, since the only portable + use of gettimeofday uses NULL as the second parameter, and + since the glibc definition is actually more typesafe, it is + not worth wrapping this to get a compliant signature. */ + int (*f) (struct timeval *restrict, void *restrict) + = gettimeofday; + int x = f (&c, 0); + return !(x | c.tv_sec | c.tv_usec); + ]])], + [gl_cv_func_gettimeofday_posix_signature=yes], + [AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [[#include +int gettimeofday (struct timeval *restrict, struct timezone *restrict); + ]])], + [gl_cv_func_gettimeofday_posix_signature=almost], + [gl_cv_func_gettimeofday_posix_signature=no])])]) + if test $gl_cv_func_gettimeofday_posix_signature = almost; then + gl_gettimeofday_timezone='struct timezone' + elif test $gl_cv_func_gettimeofday_posix_signature != yes; then + REPLACE_GETTIMEOFDAY=1 + fi + dnl If we override 'struct timeval', we also have to override gettimeofday. + if test $REPLACE_STRUCT_TIMEVAL = 1; then + REPLACE_GETTIMEOFDAY=1 + fi + 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 + declaration of the second argument to gettimeofday.]) +]) + + +dnl See if gettimeofday clobbers the static buffer that localtime uses +dnl for its return value. The gettimeofday function from Mac OS X 10.0.4 +dnl (i.e., Darwin 1.3.7) has this problem. +dnl +dnl If it does, then arrange to use gettimeofday and localtime only via +dnl the wrapper functions that work around the problem. + +AC_DEFUN([gl_FUNC_GETTIMEOFDAY_CLOBBER], +[ + 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], + [AC_RUN_IFELSE( + [AC_LANG_PROGRAM( + [[#include + #include + #include + #include + ]], + [[ + time_t t = 0; + struct tm *lt; + struct tm saved_lt; + struct timeval tv; + lt = localtime (&t); + saved_lt = *lt; + gettimeofday (&tv, NULL); + return memcmp (lt, &saved_lt, sizeof (struct tm)) != 0; + ]])], + [gl_cv_func_gettimeofday_clobber=no], + [gl_cv_func_gettimeofday_clobber=yes], + [# When cross-compiling: + case "$host_os" in + # Guess all is fine on glibc systems. + *-gnu* | gnu*) gl_cv_func_gettimeofday_clobber="guessing no" ;; + # Guess no on native Windows. + mingw*) gl_cv_func_gettimeofday_clobber="guessing no" ;; + # If we don't know, assume the worst. + *) gl_cv_func_gettimeofday_clobber="guessing yes" ;; + esac + ])]) + + case "$gl_cv_func_gettimeofday_clobber" in + *yes) + REPLACE_GETTIMEOFDAY=1 + AC_DEFINE([GETTIMEOFDAY_CLOBBERS_LOCALTIME], [1], + [Define if gettimeofday clobbers the localtime buffer.]) + gl_LOCALTIME_BUFFER_NEEDED + ;; + esac +]) + +# Prerequisites of lib/gettimeofday.c. +AC_DEFUN([gl_PREREQ_GETTIMEOFDAY], [:]) diff -Nru grep-3.1/m4/glibc21.m4 grep-3.3/m4/glibc21.m4 --- grep-3.1/m4/glibc21.m4 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/m4/glibc21.m4 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ # glibc21.m4 serial 5 -dnl Copyright (C) 2000-2002, 2004, 2008, 2010-2017 Free Software Foundation, +dnl Copyright (C) 2000-2002, 2004, 2008, 2010-2018 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 -Nru grep-3.1/m4/gnulib-common.m4 grep-3.3/m4/gnulib-common.m4 --- grep-3.1/m4/gnulib-common.m4 2017-03-17 04:33:17.000000000 +0000 +++ grep-3.3/m4/gnulib-common.m4 2018-12-21 02:51:47.000000000 +0000 @@ -1,9 +1,11 @@ -# gnulib-common.m4 serial 38 -dnl Copyright (C) 2007-2017 Free Software Foundation, Inc. +# gnulib-common.m4 serial 41 +dnl Copyright (C) 2007-2018 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_PREREQ([2.62]) + # gl_COMMON # is expanded unconditionally through gnulib-tool magic. AC_DEFUN([gl_COMMON], [ @@ -14,12 +16,15 @@ AC_DEFUN([gl_COMMON_BODY], [ AH_VERBATIM([_Noreturn], [/* The _Noreturn keyword of C11. */ -#if ! (defined _Noreturn \ - || (defined __STDC_VERSION__ && 201112 <= __STDC_VERSION__)) -# if (3 <= __GNUC__ || (__GNUC__ == 2 && 8 <= __GNUC_MINOR__) \ - || 0x5110 <= __SUNPRO_C) +#ifndef _Noreturn +# if 201103 <= (defined __cplusplus ? __cplusplus : 0) +# define _Noreturn [[noreturn]] +# elif (201112 <= (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) \ + || 4 < __GNUC__ + (7 <= __GNUC_MINOR__)) + /* _Noreturn works as-is. */ +# elif 2 < __GNUC__ + (8 <= __GNUC_MINOR__) || 0x5110 <= __SUNPRO_C # define _Noreturn __attribute__ ((__noreturn__)) -# elif defined _MSC_VER && 1200 <= _MSC_VER +# elif 1200 <= (defined _MSC_VER ? _MSC_VER : 0) # define _Noreturn __declspec (noreturn) # else # define _Noreturn @@ -72,6 +77,13 @@ #else # define _GL_ATTRIBUTE_CONST /* empty */ #endif + +/* The __malloc__ attribute was added in gcc 3. */ +#if 3 <= __GNUC__ +# define _GL_ATTRIBUTE_MALLOC __attribute__ ((__malloc__)) +#else +# define _GL_ATTRIBUTE_MALLOC /* empty */ +#endif ]) dnl Preparation for running test programs: dnl Tell glibc to write diagnostics from -D_FORTIFY_SOURCE=2 to stderr, not @@ -207,13 +219,6 @@ AC_SUBST([HAVE_FEATURES_H]) ]) -# m4_foreach_w -# is a backport of autoconf-2.59c's m4_foreach_w. -# Remove this macro when we can assume autoconf >= 2.60. -m4_ifndef([m4_foreach_w], - [m4_define([m4_foreach_w], - [m4_foreach([$1], m4_split(m4_normalize([$2]), [ ]), [$3])])]) - # AS_VAR_IF(VAR, VALUE, [IF-MATCH], [IF-NOT-MATCH]) # ---------------------------------------------------- # Backport of autoconf-2.63b's macro. @@ -226,15 +231,14 @@ # Modifies the value of the shell variable CC in an attempt to make $CC # understand ISO C99 source code. # This is like AC_PROG_CC_C99, except that -# - AC_PROG_CC_C99 did not exist in Autoconf versions < 2.60, # - AC_PROG_CC_C99 does not mix well with AC_PROG_CC_STDC -# , +# , # but many more packages use AC_PROG_CC_STDC than AC_PROG_CC_C99 -# . +# . # Remaining problems: # - When AC_PROG_CC_STDC is invoked twice, it adds the C99 enabling options # to CC twice -# . +# . # - AC_PROG_CC_STDC is likely to change now that C11 is an ISO standard. AC_DEFUN([gl_PROG_CC_C99], [ @@ -315,25 +319,6 @@ AC_SUBST([RANLIB]) ]) -# AC_PROG_MKDIR_P -# is a backport of autoconf-2.60's AC_PROG_MKDIR_P, with a fix -# for interoperability with automake-1.9.6 from autoconf-2.62. -# Remove this macro when we can assume autoconf >= 2.62 or -# autoconf >= 2.60 && automake >= 1.10. -# AC_AUTOCONF_VERSION was introduced in 2.62, so use that as the witness. -m4_ifndef([AC_AUTOCONF_VERSION],[ -m4_ifdef([AC_PROG_MKDIR_P], [ - dnl For automake-1.9.6 && autoconf < 2.62: Ensure MKDIR_P is AC_SUBSTed. - m4_define([AC_PROG_MKDIR_P], - m4_defn([AC_PROG_MKDIR_P])[ - AC_SUBST([MKDIR_P])])], [ - dnl For autoconf < 2.60: Backport of AC_PROG_MKDIR_P. - AC_DEFUN_ONCE([AC_PROG_MKDIR_P], - [AC_REQUIRE([AM_PROG_MKDIR_P])dnl defined by automake - MKDIR_P='$(mkdir_p)' - AC_SUBST([MKDIR_P])])]) -]) - # AC_C_RESTRICT # This definition is copied from post-2.69 Autoconf and overrides the # AC_C_RESTRICT macro from autoconf 2.60..2.69. It can be removed @@ -347,16 +332,16 @@ for ac_kw in __restrict __restrict__ _Restrict restrict; do AC_COMPILE_IFELSE( [AC_LANG_PROGRAM( - [[typedef int *int_ptr; - int foo (int_ptr $ac_kw ip) { return ip[0]; } - int bar (int [$ac_kw]); /* Catch GCC bug 14050. */ - int bar (int ip[$ac_kw]) { return ip[0]; } - ]], - [[int s[1]; - int *$ac_kw t = s; - t[0] = 0; - return foo (t) + bar (t); - ]])], + [[typedef int *int_ptr; + int foo (int_ptr $ac_kw ip) { return ip[0]; } + int bar (int [$ac_kw]); /* Catch GCC bug 14050. */ + int bar (int ip[$ac_kw]) { return ip[0]; } + ]], + [[int s[1]; + int *$ac_kw t = s; + t[0] = 0; + return foo (t) + bar (t); + ]])], [ac_cv_c_restrict=$ac_kw]) test "$ac_cv_c_restrict" != no && break done @@ -407,61 +392,3 @@ # AS_VAR_COPY was added in autoconf 2.63b m4_define_default([AS_VAR_COPY], [AS_LITERAL_IF([$1[]$2], [$1=$$2], [eval $1=\$$2])]) - -# AC_PROG_SED was added in autoconf 2.59b -m4_ifndef([AC_PROG_SED], -[AC_DEFUN([AC_PROG_SED], -[AC_CACHE_CHECK([for a sed that does not truncate output], ac_cv_path_SED, - [dnl ac_script should not contain more than 99 commands (for HP-UX sed), - dnl but more than about 7000 bytes, to catch a limit in Solaris 8 /usr/ucb/sed. - ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ - for ac_i in 1 2 3 4 5 6 7; do - ac_script="$ac_script$as_nl$ac_script" - done - echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed - AS_UNSET([ac_script]) - if test -z "$SED"; then - ac_path_SED_found=false - _AS_PATH_WALK([], [ - for ac_prog in sed gsed; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" - AS_EXECUTABLE_P(["$ac_path_SED"]) || continue - case `"$ac_path_SED" --version 2>&1` in - *GNU*) ac_cv_path_SED=$ac_path_SED ac_path_SED_found=:;; - *) - ac_count=0 - _AS_ECHO_N([0123456789]) >conftest.in - while : - do - cat conftest.in conftest.in >conftest.tmp - mv conftest.tmp conftest.in - cp conftest.in conftest.nl - echo >> conftest.nl - "$ac_path_SED" -f conftest.sed conftest.out 2>/dev/null || break - diff conftest.out conftest.nl >/dev/null 2>&1 || break - ac_count=`expr $ac_count + 1` - if test $ac_count -gt ${ac_path_SED_max-0}; then - # Best so far, but keep looking for better - ac_cv_path_SED=$ac_path_SED - ac_path_SED_max=$ac_count - fi - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; - esac - $ac_path_SED_found && break 3 - done - done]) - if test -z "$ac_cv_path_SED"; then - AC_ERROR([no acceptable sed could be found in \$PATH]) - fi - else - ac_cv_path_SED=$SED - fi - ]) - SED="$ac_cv_path_SED" - AC_SUBST([SED])dnl - rm -f conftest.sed -]) -]) diff -Nru grep-3.1/m4/gnulib-comp.m4 grep-3.3/m4/gnulib-comp.m4 --- grep-3.1/m4/gnulib-comp.m4 2017-05-14 01:10:29.000000000 +0000 +++ grep-3.3/m4/gnulib-comp.m4 2018-12-21 02:52:55.000000000 +0000 @@ -1,5 +1,5 @@ # DO NOT EDIT! GENERATED AUTOMATICALLY! -# Copyright (C) 2002-2017 Free Software Foundation, Inc. +# Copyright (C) 2002-2018 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 @@ -12,7 +12,7 @@ # 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 . +# 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 @@ -44,6 +44,8 @@ AC_REQUIRE([AM_PROG_CC_C_O]) # Code from module absolute-header: + # Code from module accept: + # Code from module accept-tests: # Code from module alignof: # Code from module alignof-tests: # Code from module alloca: @@ -52,11 +54,15 @@ # Code from module announce-gen: # Code from module argmatch: # Code from module argmatch-tests: + # Code from module arpa_inet: + # Code from module arpa_inet-tests: # Code from module assert: # Code from module assure: # Code from module at-internal: # Code from module binary-io: # Code from module binary-io-tests: + # Code from module bind: + # Code from module bind-tests: # Code from module bitrotate: # Code from module bitrotate-tests: # Code from module btowc: @@ -64,6 +70,8 @@ # Code from module builtin-expect: # Code from module c-ctype: # Code from module c-ctype-tests: + # Code from module c-stack: + # Code from module c-stack-tests: # Code from module c-strcase: # Code from module c-strcase-tests: # Code from module c-strcaseeq: @@ -79,6 +87,8 @@ # Code from module closedir: # Code from module closeout: # Code from module configmake: + # Code from module connect: + # Code from module connect-tests: # Code from module ctype: # Code from module ctype-tests: # Code from module cycle-check: @@ -88,8 +98,6 @@ # Code from module dfa: # Code from module dfa-tests: # Code from module dirent: - # Code from module dirent-safer: - # Code from module dirent-safer-tests: # Code from module dirent-tests: # Code from module dirfd: # Code from module dirname-lgpl: @@ -132,6 +140,8 @@ # Code from module float: # Code from module float-tests: # Code from module fnmatch: + # Code from module fnmatch-h: + # Code from module fnmatch-h-tests: # Code from module fnmatch-tests: # Code from module fpending: # Code from module fpending-tests: @@ -144,6 +154,8 @@ # Code from module fstat-tests: # Code from module fstatat: # Code from module fstatat-tests: + # Code from module ftruncate: + # Code from module ftruncate-tests: # Code from module fts: # Code from module fwrite-tests: # Code from module gendocs: @@ -159,6 +171,8 @@ # Code from module getprogname: # Code from module getprogname-tests: # Code from module gettext-h: + # Code from module gettimeofday: + # Code from module gettimeofday-tests: # Code from module git-version-gen: # Code from module gitlog-to-changelog: # Code from module gnu-web-doc-update: @@ -180,6 +194,8 @@ # Code from module ignore-value: # Code from module ignore-value-tests: # Code from module include_next: + # Code from module inet_pton: + # Code from module inet_pton-tests: # Code from module inline: # Code from module intprops: # Code from module intprops-tests: @@ -188,6 +204,8 @@ # Code from module inttypes: # Code from module inttypes-incomplete: # Code from module inttypes-tests: + # Code from module ioctl: + # Code from module ioctl-tests: # Code from module isatty: # Code from module isatty-tests: # Code from module isblank: @@ -199,15 +217,21 @@ # Code from module langinfo-tests: # Code from module largefile: AC_REQUIRE([AC_SYS_LARGEFILE]) + # Code from module libc-config: + # Code from module libsigsegv: # Code from module limits-h: # Code from module limits-h-tests: + # Code from module listen: + # Code from module listen-tests: # Code from module localcharset: + # Code from module localcharset-tests: # Code from module locale: # Code from module locale-tests: # Code from module localeconv: # Code from module localeconv-tests: # Code from module localename: # Code from module localename-tests: + # Code from module localtime-buffer: # Code from module lock: # Code from module lseek: # Code from module lseek-tests: @@ -246,6 +270,10 @@ # Code from module msvc-inval: # Code from module msvc-nothrow: # Code from module multiarch: + # Code from module nanosleep: + # Code from module nanosleep-tests: + # Code from module netinet_in: + # Code from module netinet_in-tests: # Code from module nl_langinfo: # Code from module nl_langinfo-tests: # Code from module nocrash: @@ -259,9 +287,12 @@ # Code from module openat-safer-tests: # Code from module openat-tests: # Code from module opendir: + # Code from module opendirat: # Code from module pathmax: # Code from module pathmax-tests: # Code from module perl: + # Code from module perror: + # Code from module perror-tests: # Code from module pipe-posix: # Code from module pipe-posix-tests: # Code from module propername: @@ -270,6 +301,8 @@ # Code from module quotearg: # Code from module quotearg-simple: # Code from module quotearg-simple-tests: + # Code from module raise: + # Code from module raise-tests: # Code from module read: # Code from module read-tests: # Code from module readdir: @@ -282,11 +315,23 @@ # Code from module safe-read: # Code from module same-inode: # Code from module save-cwd: + # Code from module select: + # Code from module select-tests: # Code from module setenv: # Code from module setenv-tests: # Code from module setlocale: # Code from module setlocale-tests: + # Code from module setsockopt: + # Code from module setsockopt-tests: + # Code from module sigaction: + # Code from module sigaction-tests: + # Code from module signal-h: + # Code from module signal-h-tests: + # Code from module sigprocmask: + # Code from module sigprocmask-tests: # Code from module size_max: + # Code from module sleep: + # Code from module sleep-tests: # Code from module snippet/_Noreturn: # Code from module snippet/arg-nonnull: # Code from module snippet/c++defs: @@ -294,9 +339,16 @@ # Code from module snippet/warn-on-use: # Code from module snprintf: # Code from module snprintf-tests: + # Code from module socket: + # Code from module socketlib: + # Code from module sockets: + # Code from module sockets-tests: + # Code from module socklen: # Code from module ssize_t: # Code from module stat: # Code from module stat-tests: + # Code from module stat-time: + # Code from module stat-time-tests: # Code from module std-gnu11: # Code from module stdalign: # Code from module stdalign-tests: @@ -322,6 +374,8 @@ # Code from module strerror: # Code from module strerror-override: # Code from module strerror-tests: + # Code from module strerror_r-posix: + # Code from module strerror_r-posix-tests: # Code from module striconv: # Code from module striconv-tests: # Code from module string: @@ -342,10 +396,20 @@ # Code from module strtoumax-tests: # Code from module symlink: # Code from module symlink-tests: + # Code from module sys_ioctl: + # Code from module sys_ioctl-tests: + # Code from module sys_select: + # Code from module sys_select-tests: + # Code from module sys_socket: + # Code from module sys_socket-tests: # Code from module sys_stat: # Code from module sys_stat-tests: + # Code from module sys_time: + # Code from module sys_time-tests: # Code from module sys_types: # Code from module sys_types-tests: + # Code from module sys_uio: + # Code from module sys_uio-tests: # Code from module test-framework-sh: # Code from module test-framework-sh-tests: # Code from module threadlib: @@ -391,6 +455,8 @@ # Code from module wctype-h-tests: # Code from module wcwidth: # Code from module wcwidth-tests: + # Code from module windows-stat-inodes: + # Code from module windows-stat-override: # Code from module xalloc: # Code from module xalloc-die: # Code from module xalloc-die-tests: @@ -430,6 +496,7 @@ fi gl_WCHAR_MODULE_INDICATOR([btowc]) gl___BUILTIN_EXPECT + gl_C_STACK gl_UNISTD_MODULE_INDICATOR([chdir]) gl_FUNC_CHDIR_LONG if test $gl_cv_have_arbitrary_file_name_length_limit = yes; then @@ -456,8 +523,6 @@ gl_CHECK_TYPE_STRUCT_DIRENT_D_INO gl_CHECK_TYPE_STRUCT_DIRENT_D_TYPE gl_DIRENT_H - gl_DIRENT_SAFER - gl_MODULE_INDICATOR([dirent-safer]) gl_FUNC_DIRFD if test $ac_cv_func_dirfd = no && test $gl_cv_func_dirfd_macro = no \ || test $REPLACE_DIRFD = 1; then @@ -499,6 +564,7 @@ gl_FCNTL_H gl_FCNTL_SAFER gl_MODULE_INDICATOR([fcntl-safer]) + gl_MODULE_INDICATOR([fd-safer-flag]) gl_FUNC_FDOPENDIR if test $HAVE_FDOPENDIR = 0 || test $REPLACE_FDOPENDIR = 1; then AC_LIBOBJ([fdopendir]) @@ -508,10 +574,12 @@ gl_FILE_NAME_CONCAT_LGPL AC_C_FLEXIBLE_ARRAY_MEMBER gl_FUNC_FNMATCH_POSIX - if test -n "$FNMATCH_H"; then + if test $HAVE_FNMATCH = 0 || test $REPLACE_FNMATCH = 1; then AC_LIBOBJ([fnmatch]) gl_PREREQ_FNMATCH fi + gl_FNMATCH_MODULE_INDICATOR([fnmatch]) + gl_FNMATCH_H gl_FUNC_FPENDING if test $gl_cv_func___fpending = no; then AC_LIBOBJ([fpending]) @@ -519,7 +587,11 @@ gl_FUNC_FSTAT if test $REPLACE_FSTAT = 1; then AC_LIBOBJ([fstat]) - AC_LIBOBJ([stat-w32]) + case "$host_os" in + mingw*) + AC_LIBOBJ([stat-w32]) + ;; + esac gl_PREREQ_FSTAT fi gl_SYS_STAT_MODULE_INDICATOR([fstat]) @@ -573,7 +645,6 @@ m4_defn([m4_PACKAGE_VERSION])), [1], [], [AC_CONFIG_LINKS([$GNUmakefile:$GNUmakefile], [], [GNUmakefile=$GNUmakefile])]) - gl_HARD_LOCALE gl_I_RING AM_ICONV m4_ifdef([gl_ICONV_MODULE_INDICATOR], @@ -617,9 +688,12 @@ gl_WCTYPE_MODULE_INDICATOR([iswctype]) gl_LANGINFO_H AC_REQUIRE([gl_LARGEFILE]) + gl___INLINE + gl_LIBSIGSEGV gl_LIMITS_H gl_LOCALCHARSET - LOCALCHARSET_TESTS_ENVIRONMENT="CHARSETALIASDIR=\"\$(abs_top_builddir)/$gl_source_base\"" + dnl For backward compatibility. Some packages still use this. + LOCALCHARSET_TESTS_ENVIRONMENT= AC_SUBST([LOCALCHARSET_TESTS_ENVIRONMENT]) gl_LOCALE_H gl_FUNC_LOCALECONV @@ -756,6 +830,12 @@ AM_][XGETTEXT_OPTION([--keyword='proper_name_utf8:1,\"This is a proper name. See the gettext manual, section Names.\"'])]) gl_QUOTE gl_QUOTEARG + gl_FUNC_RAISE + if test $HAVE_RAISE = 0 || test $REPLACE_RAISE = 1; then + AC_LIBOBJ([raise]) + gl_PREREQ_RAISE + fi + gl_SIGNAL_MODULE_INDICATOR([raise]) gl_FUNC_READ if test $REPLACE_READ = 1; then AC_LIBOBJ([read]) @@ -784,14 +864,33 @@ fi gl_PREREQ_SAFE_READ gl_SAVE_CWD + gl_SIGACTION + if test $HAVE_SIGACTION = 0; then + AC_LIBOBJ([sigaction]) + gl_PREREQ_SIGACTION + fi + gl_SIGNAL_MODULE_INDICATOR([sigaction]) + gl_SIGNAL_H + gl_SIGNALBLOCKING + if test $HAVE_POSIX_SIGNALBLOCKING = 0; then + AC_LIBOBJ([sigprocmask]) + gl_PREREQ_SIGPROCMASK + fi + gl_SIGNAL_MODULE_INDICATOR([sigprocmask]) gt_TYPE_SSIZE_T gl_FUNC_STAT if test $REPLACE_STAT = 1; then AC_LIBOBJ([stat]) - AC_LIBOBJ([stat-w32]) + case "$host_os" in + mingw*) + AC_LIBOBJ([stat-w32]) + ;; + esac gl_PREREQ_STAT fi gl_SYS_STAT_MODULE_INDICATOR([stat]) + gl_STAT_TIME + gl_STAT_BIRTHTIME gl_STDALIGN_H gl_STDARG_H AM_STDBOOL_H @@ -882,7 +981,7 @@ gl_LIBUNISTRING_MODULE([0.9], [unistr/u8-uctomb]) gl_LIBUNISTRING_LIBHEADER([0.9.4], [unitypes.h]) gl_LIBUNISTRING_LIBHEADER([0.9.4], [uniwidth.h]) - gl_LIBUNISTRING_MODULE([0.9.6], [uniwidth/width]) + gl_LIBUNISTRING_MODULE([0.9.8], [uniwidth/width]) gl_FUNC_GLIBC_UNLOCKED_IO gl_VERSION_ETC gl_WCHAR_H @@ -908,8 +1007,15 @@ gl_FUNC_WCWIDTH if test $HAVE_WCWIDTH = 0 || test $REPLACE_WCWIDTH = 1; then AC_LIBOBJ([wcwidth]) + gl_PREREQ_WCWIDTH fi gl_WCHAR_MODULE_INDICATOR([wcwidth]) + AC_REQUIRE([gl_WINDOWS_STAT_INODES]) + AC_REQUIRE([gl_SYS_STAT_H_DEFAULTS]) + AC_REQUIRE([AC_CANONICAL_HOST]) + case "$host_os" in + mingw*) GNULIB_OVERRIDES_STRUCT_STAT=1 ;; + esac gl_XALLOC gl_XSTRTOL # End of code from modules @@ -958,13 +1064,29 @@ AC_SUBST([gltests_WITNESS]) gl_module_indicator_condition=$gltests_WITNESS m4_pushdef([gl_MODULE_INDICATOR_CONDITION], [$gl_module_indicator_condition]) + AC_REQUIRE([gl_HEADER_SYS_SOCKET]) + if test "$ac_cv_header_winsock2_h" = yes; then + AC_LIBOBJ([accept]) + fi + gl_SYS_SOCKET_MODULE_INDICATOR([accept]) + gl_HEADER_ARPA_INET + AC_PROG_MKDIR_P + AC_REQUIRE([gl_HEADER_SYS_SOCKET]) + if test "$ac_cv_header_winsock2_h" = yes; then + AC_LIBOBJ([bind]) + fi + gl_SYS_SOCKET_MODULE_INDICATOR([bind]) gt_LOCALE_FR gt_LOCALE_FR_UTF8 gt_LOCALE_FR gt_LOCALE_TR_UTF8 + AC_REQUIRE([gl_HEADER_SYS_SOCKET]) + if test "$ac_cv_header_winsock2_h" = yes; then + AC_LIBOBJ([connect]) + fi + gl_SYS_SOCKET_MODULE_INDICATOR([connect]) gl_ENVIRON gl_UNISTD_MODULE_INDICATOR([environ]) - gl_MODULE_INDICATOR([fd-safer-flag]) gl_FUNC_FDOPEN if test $REPLACE_FDOPEN = 1; then AC_LIBOBJ([fdopen]) @@ -978,10 +1100,42 @@ if test $REPLACE_ITOLD = 1; then AC_LIBOBJ([itold]) fi + gl_FUNC_FTRUNCATE + if test $HAVE_FTRUNCATE = 0 || test $REPLACE_FTRUNCATE = 1; then + AC_LIBOBJ([ftruncate]) + gl_PREREQ_FTRUNCATE + fi + gl_UNISTD_MODULE_INDICATOR([ftruncate]) + gl_FUNC_GETTIMEOFDAY + if test $HAVE_GETTIMEOFDAY = 0 || test $REPLACE_GETTIMEOFDAY = 1; then + AC_LIBOBJ([gettimeofday]) + gl_PREREQ_GETTIMEOFDAY + fi + gl_SYS_TIME_MODULE_INDICATOR([gettimeofday]) + gl_FUNC_INET_PTON + if test $HAVE_INET_PTON = 0 || test $REPLACE_INET_NTOP = 1; then + AC_LIBOBJ([inet_pton]) + gl_PREREQ_INET_PTON + fi + gl_ARPA_INET_MODULE_INDICATOR([inet_pton]) + AC_C_BIGENDIAN gl_INTTOSTR + gl_FUNC_IOCTL + if test $HAVE_IOCTL = 0 || test $REPLACE_IOCTL = 1; then + AC_LIBOBJ([ioctl]) + fi + gl_SYS_IOCTL_MODULE_INDICATOR([ioctl]) + AC_REQUIRE([gl_HEADER_SYS_SOCKET]) + if test "$ac_cv_header_winsock2_h" = yes; then + AC_LIBOBJ([listen]) + fi + gl_SYS_SOCKET_MODULE_INDICATOR([listen]) AC_CHECK_FUNCS_ONCE([newlocale]) gl_LOCALENAME + gl_LOCALE_MODULE_INDICATOR([localename]) AC_CHECK_FUNCS_ONCE([newlocale]) + AC_REQUIRE([gl_LOCALTIME_BUFFER_DEFAULTS]) + AC_LIBOBJ([localtime-buffer]) gt_LOCALE_TR_UTF8 gt_LOCALE_FR_UTF8 gt_LOCALE_FR @@ -1000,8 +1154,22 @@ gl_FUNC_MMAP_ANON AC_CHECK_HEADERS_ONCE([sys/mman.h]) AC_CHECK_FUNCS_ONCE([mprotect]) + gl_FUNC_NANOSLEEP + if test $HAVE_NANOSLEEP = 0 || test $REPLACE_NANOSLEEP = 1; then + AC_LIBOBJ([nanosleep]) + gl_PREREQ_NANOSLEEP + fi + gl_TIME_MODULE_INDICATOR([nanosleep]) + AC_CHECK_DECLS_ONCE([alarm]) + gl_HEADER_NETINET_IN + AC_PROG_MKDIR_P gt_LOCALE_FR gt_LOCALE_FR_UTF8 + gl_FUNC_PERROR + if test $REPLACE_PERROR = 1; then + AC_LIBOBJ([perror]) + fi + gl_STRING_MODULE_INDICATOR([perror]) gl_FUNC_PIPE if test $HAVE_PIPE = 0; then AC_LIBOBJ([pipe]) @@ -1018,6 +1186,12 @@ gl_FUNC_MMAP_ANON AC_CHECK_HEADERS_ONCE([sys/mman.h]) AC_CHECK_FUNCS_ONCE([mprotect]) + gl_FUNC_SELECT + if test $REPLACE_SELECT = 1; then + AC_LIBOBJ([select]) + fi + gl_SYS_SELECT_MODULE_INDICATOR([select]) + AC_CHECK_HEADERS_ONCE([sys/wait.h]) gl_FUNC_SETENV if test $HAVE_SETENV = 0 || test $REPLACE_SETENV = 1; then AC_LIBOBJ([setenv]) @@ -1033,12 +1207,48 @@ gt_LOCALE_FR_UTF8 gt_LOCALE_JA gt_LOCALE_ZH_CN + AC_REQUIRE([gl_HEADER_SYS_SOCKET]) + if test "$ac_cv_header_winsock2_h" = yes; then + AC_LIBOBJ([setsockopt]) + fi + gl_SYS_SOCKET_MODULE_INDICATOR([setsockopt]) gl_SIZE_MAX + gl_FUNC_SLEEP + if test $HAVE_SLEEP = 0 || test $REPLACE_SLEEP = 1; then + AC_LIBOBJ([sleep]) + fi + gl_UNISTD_MODULE_INDICATOR([sleep]) + AC_CHECK_DECLS_ONCE([alarm]) gl_FUNC_SNPRINTF gl_STDIO_MODULE_INDICATOR([snprintf]) gl_MODULE_INDICATOR([snprintf]) + AC_REQUIRE([gl_HEADER_SYS_SOCKET]) + if test "$ac_cv_header_winsock2_h" = yes; then + AC_LIBOBJ([socket]) + fi + # When this module is used, sockets may actually occur as file descriptors, + # hence it is worth warning if the modules 'close' and 'ioctl' are not used. + m4_ifdef([gl_UNISTD_H_DEFAULTS], [AC_REQUIRE([gl_UNISTD_H_DEFAULTS])]) + m4_ifdef([gl_SYS_IOCTL_H_DEFAULTS], [AC_REQUIRE([gl_SYS_IOCTL_H_DEFAULTS])]) + AC_REQUIRE([gl_PREREQ_SYS_H_WINSOCK2]) + if test "$ac_cv_header_winsock2_h" = yes; then + UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=1 + SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=1 + fi + gl_SYS_SOCKET_MODULE_INDICATOR([socket]) + AC_REQUIRE([gl_SOCKETLIB]) + AC_REQUIRE([gl_SOCKETS]) + gl_TYPE_SOCKLEN_T AC_REQUIRE([gt_TYPE_WCHAR_T]) AC_REQUIRE([gt_TYPE_WINT_T]) + gl_FUNC_STRERROR_R + if test $HAVE_DECL_STRERROR_R = 0 || test $REPLACE_STRERROR_R = 1; then + AC_LIBOBJ([strerror_r]) + gl_PREREQ_STRERROR_R + fi + gl_STRING_MODULE_INDICATOR([strerror_r]) + dnl For the modules argp, error. + gl_MODULE_INDICATOR([strerror_r-posix]) dnl Check for prerequisites for memory fence checks. gl_FUNC_MMAP_ANON AC_CHECK_HEADERS_ONCE([sys/mman.h]) @@ -1052,6 +1262,17 @@ AC_LIBOBJ([symlink]) fi gl_UNISTD_MODULE_INDICATOR([symlink]) + gl_SYS_IOCTL_H + AC_PROG_MKDIR_P + AC_REQUIRE([gl_HEADER_SYS_SELECT]) + AC_PROG_MKDIR_P + AC_REQUIRE([gl_HEADER_SYS_SOCKET]) + AC_PROG_MKDIR_P + AC_CHECK_FUNCS_ONCE([shutdown]) + gl_HEADER_SYS_TIME_H + AC_PROG_MKDIR_P + gl_HEADER_SYS_UIO + AC_PROG_MKDIR_P gl_FUNC_UNSETENV if test $HAVE_UNSETENV = 0 || test $REPLACE_UNSETENV = 1; then AC_LIBOBJ([unsetenv]) @@ -1194,10 +1415,13 @@ lib/c++defs.h lib/c-ctype.c lib/c-ctype.h + lib/c-stack.c + lib/c-stack.h lib/c-strcase.h lib/c-strcasecmp.c lib/c-strcaseeq.h lib/c-strncasecmp.c + lib/cdefs.h lib/chdir-long.c lib/chdir-long.h lib/cloexec.c @@ -1208,7 +1432,6 @@ lib/closedir.c lib/closeout.c lib/closeout.h - lib/config.charset lib/creat-safer.c lib/ctype.in.h lib/cycle-check.c @@ -1216,14 +1439,13 @@ lib/dev-ino.h lib/dfa.c lib/dfa.h - lib/dirent--.h lib/dirent-private.h - lib/dirent-safer.h lib/dirent.in.h lib/dirfd.c lib/dirname-lgpl.c lib/dirname.h lib/dosname.h + lib/dup-safer-flag.c lib/dup-safer.c lib/dup.c lib/dup2.c @@ -1241,6 +1463,7 @@ lib/fcntl.in.h lib/fd-hook.c lib/fd-hook.h + lib/fd-safer-flag.c lib/fd-safer.c lib/fdopendir.c lib/filename.h @@ -1299,6 +1522,7 @@ lib/iswctype-impl.h lib/iswctype.c lib/langinfo.in.h + lib/libc-config.h lib/limits.in.h lib/localcharset.c lib/localcharset.h @@ -1311,7 +1535,6 @@ lib/malloc.c lib/malloca.c lib/malloca.h - lib/malloca.valgrind lib/mbchar.c lib/mbchar.h lib/mbiter.c @@ -1352,8 +1575,9 @@ lib/openat-safer.c lib/openat.c lib/openat.h - lib/opendir-safer.c lib/opendir.c + lib/opendirat.c + lib/opendirat.h lib/pathmax.h lib/pipe-safer.c lib/propername.c @@ -1361,11 +1585,10 @@ lib/quote.h lib/quotearg.c lib/quotearg.h + lib/raise.c lib/read.c lib/readdir.c lib/realloc.c - lib/ref-add.sin - lib/ref-del.sin lib/regcomp.c lib/regex.c lib/regex.h @@ -1377,6 +1600,13 @@ lib/same-inode.h lib/save-cwd.c lib/save-cwd.h + lib/sig-handler.c + lib/sig-handler.h + lib/sigaction.c + lib/signal.in.h + lib/sigprocmask.c + lib/stat-time.c + lib/stat-time.h lib/stat-w32.c lib/stat-w32.h lib/stat.c @@ -1410,6 +1640,7 @@ lib/strtoul.c lib/strtoull.c lib/strtoumax.c + lib/sys-limits.h lib/sys_stat.in.h lib/sys_types.in.h lib/time.in.h @@ -1456,11 +1687,14 @@ lib/xstrtol.h lib/xstrtoul.c m4/00gnulib.m4 + m4/__inline.m4 m4/absolute-header.m4 m4/alloca.m4 + m4/arpa_inet_h.m4 m4/assert.m4 m4/btowc.m4 m4/builtin-expect.m4 + m4/c-stack.m4 m4/chdir-long.m4 m4/close-stream.m4 m4/close.m4 @@ -1472,7 +1706,6 @@ m4/cycle-check.m4 m4/d-ino.m4 m4/d-type.m4 - m4/dirent-safer.m4 m4/dirent_h.m4 m4/dirfd.m4 m4/dirname.m4 @@ -1497,31 +1730,37 @@ m4/flexmember.m4 m4/float_h.m4 m4/fnmatch.m4 + m4/fnmatch_h.m4 m4/fpending.m4 m4/fpieee.m4 m4/fstat.m4 m4/fstatat.m4 + m4/ftruncate.m4 m4/fts.m4 m4/getcwd.m4 m4/getdtablesize.m4 m4/getopt.m4 m4/getpagesize.m4 m4/getprogname.m4 + m4/gettimeofday.m4 m4/glibc21.m4 m4/gnulib-common.m4 - m4/hard-locale.m4 + m4/host-cpu-c-abi.m4 m4/i-ring.m4 m4/iconv.m4 m4/iconv_h.m4 m4/iconv_open.m4 m4/include_next.m4 + m4/inet_pton.m4 m4/inline.m4 + m4/intl-thread-locale.m4 m4/intlmacosx.m4 m4/intmax_t.m4 m4/inttostr.m4 m4/inttypes-pri.m4 m4/inttypes.m4 m4/inttypes_h.m4 + m4/ioctl.m4 m4/isatty.m4 m4/isblank.m4 m4/iswblank.m4 @@ -1532,6 +1771,7 @@ m4/lib-ld.m4 m4/lib-link.m4 m4/lib-prefix.m4 + m4/libsigsegv.m4 m4/libunistring-base.m4 m4/limits-h.m4 m4/localcharset.m4 @@ -1542,12 +1782,14 @@ m4/locale_h.m4 m4/localeconv.m4 m4/localename.m4 + m4/localtime-buffer.m4 m4/lock.m4 m4/longlong.m4 m4/lseek.m4 m4/lstat.m4 m4/malloc.m4 m4/malloca.m4 + m4/manywarnings-c++.m4 m4/manywarnings.m4 m4/math_h.m4 m4/mbchar.m4 @@ -1568,33 +1810,47 @@ m4/msvc-inval.m4 m4/msvc-nothrow.m4 m4/multiarch.m4 + m4/nanosleep.m4 + m4/netinet_in_h.m4 m4/nl_langinfo.m4 m4/nocrash.m4 m4/obstack.m4 m4/off_t.m4 - m4/onceonly.m4 + m4/open-cloexec.m4 m4/open.m4 m4/openat.m4 m4/opendir.m4 m4/pathmax.m4 m4/perl.m4 + m4/perror.m4 m4/pipe.m4 m4/printf.m4 m4/pthread_rwlock_rdlock.m4 m4/putenv.m4 m4/quote.m4 m4/quotearg.m4 + m4/raise.m4 m4/read.m4 m4/readdir.m4 m4/realloc.m4 m4/regex.m4 m4/safe-read.m4 m4/save-cwd.m4 + m4/select.m4 m4/setenv.m4 m4/setlocale.m4 + m4/sigaction.m4 + m4/signal_h.m4 + m4/signalblocking.m4 m4/size_max.m4 + m4/sleep.m4 m4/snprintf.m4 + m4/socketlib.m4 + m4/sockets.m4 + m4/socklen.m4 + m4/sockpfaf.m4 m4/ssize_t.m4 + m4/stat-time.m4 m4/stat.m4 m4/std-gnu11.m4 m4/stdalign.m4 @@ -1608,6 +1864,7 @@ m4/stpcpy.m4 m4/strdup.m4 m4/strerror.m4 + m4/strerror_r.m4 m4/string_h.m4 m4/strnlen.m4 m4/strstr.m4 @@ -1616,9 +1873,13 @@ m4/strtoull.m4 m4/strtoumax.m4 m4/symlink.m4 + m4/sys_ioctl_h.m4 + m4/sys_select_h.m4 m4/sys_socket_h.m4 m4/sys_stat_h.m4 + m4/sys_time_h.m4 m4/sys_types_h.m4 + m4/sys_uio_h.m4 m4/threadlib.m4 m4/time_h.m4 m4/unistd-safer.m4 @@ -1635,6 +1896,7 @@ m4/wctomb.m4 m4/wctype_h.m4 m4/wcwidth.m4 + m4/windows-stat-inodes.m4 m4/wint_t.m4 m4/xalloc.m4 m4/xsize.m4 @@ -1644,25 +1906,32 @@ tests/dfa-match.sh tests/init.sh tests/macros.h + tests/nap.h tests/signature.h + tests/test-accept.c tests/test-alignof.c tests/test-alloca-opt.c tests/test-argmatch.c + tests/test-arpa_inet.c tests/test-binary-io.c tests/test-binary-io.sh + tests/test-bind.c tests/test-bitrotate.c tests/test-btowc.c tests/test-btowc1.sh tests/test-btowc2.sh tests/test-c-ctype.c + tests/test-c-stack.c + tests/test-c-stack.sh + tests/test-c-stack2.sh tests/test-c-strcase.sh tests/test-c-strcasecmp.c tests/test-c-strncasecmp.c tests/test-chdir.c tests/test-cloexec.c tests/test-close.c + tests/test-connect.c tests/test-ctype.c - tests/test-dirent-safer.c tests/test-dirent.c tests/test-dup-safer.c tests/test-dup.c @@ -1686,6 +1955,7 @@ tests/test-fdopendir.c tests/test-fgetc.c tests/test-float.c + tests/test-fnmatch-h.c tests/test-fnmatch.c tests/test-fpending.c tests/test-fpending.sh @@ -1693,6 +1963,8 @@ tests/test-fread.c tests/test-fstat.c tests/test-fstatat.c + tests/test-ftruncate.c + tests/test-ftruncate.sh tests/test-fwrite.c tests/test-getcwd-lgpl.c tests/test-getdtablesize.c @@ -1702,20 +1974,25 @@ tests/test-getopt.h tests/test-getopt_long.h tests/test-getprogname.c + tests/test-gettimeofday.c tests/test-hash.c tests/test-i-ring.c tests/test-iconv-h.c tests/test-iconv.c tests/test-ignore-value.c + tests/test-inet_pton.c tests/test-init.sh tests/test-intprops.c tests/test-inttostr.c tests/test-inttypes.c + tests/test-ioctl.c tests/test-isatty.c tests/test-isblank.c tests/test-iswblank.c tests/test-langinfo.c tests/test-limits-h.c + tests/test-listen.c + tests/test-localcharset.c tests/test-locale.c tests/test-localeconv.c tests/test-localename.c @@ -1742,6 +2019,8 @@ tests/test-memchr.c tests/test-memchr2.c tests/test-memrchr.c + tests/test-nanosleep.c + tests/test-netinet_in.c tests/test-nl_langinfo.c tests/test-nl_langinfo.sh tests/test-open.c @@ -1749,18 +2028,35 @@ tests/test-openat-safer.c tests/test-openat.c tests/test-pathmax.c + tests/test-perror.c + tests/test-perror.sh + tests/test-perror2.c tests/test-pipe.c tests/test-quotearg-simple.c tests/test-quotearg.h + tests/test-raise.c tests/test-read.c tests/test-realloc-gnu.c tests/test-regex.c + tests/test-select-fd.c + tests/test-select-in.sh + tests/test-select-out.sh + tests/test-select-stdin.c + tests/test-select.c + tests/test-select.h tests/test-setenv.c tests/test-setlocale1.c tests/test-setlocale1.sh tests/test-setlocale2.c tests/test-setlocale2.sh + tests/test-setsockopt.c + tests/test-sigaction.c + tests/test-signal-h.c + tests/test-sigprocmask.c + tests/test-sleep.c tests/test-snprintf.c + tests/test-sockets.c + tests/test-stat-time.c tests/test-stat.c tests/test-stat.h tests/test-stdalign.c @@ -1770,6 +2066,7 @@ tests/test-stdio.c tests/test-stdlib.c tests/test-strerror.c + tests/test-strerror_r.c tests/test-striconv.c tests/test-string.c tests/test-strnlen.c @@ -1780,8 +2077,13 @@ tests/test-strtoumax.c tests/test-symlink.c tests/test-symlink.h + tests/test-sys_ioctl.c + tests/test-sys_select.c + tests/test-sys_socket.c tests/test-sys_stat.c + tests/test-sys_time.c tests/test-sys_types.c + tests/test-sys_uio.c tests/test-sys_wait.h tests/test-time.c tests/test-unistd.c @@ -1819,43 +2121,71 @@ tests/uniwidth/test-uc_width2.sh tests/zerosize-ptr.h tests=lib/_Noreturn.h + tests=lib/accept.c tests=lib/anytostr.c tests=lib/arg-nonnull.h + tests=lib/arpa_inet.in.h tests=lib/asnprintf.c + tests=lib/bind.c tests=lib/c++defs.h - tests=lib/dup-safer-flag.c - tests=lib/fd-safer-flag.c + tests=lib/connect.c tests=lib/fdopen.c tests=lib/float+.h tests=lib/float.c tests=lib/float.in.h tests=lib/fpucw.h + tests=lib/ftruncate.c + tests=lib/gettimeofday.c tests=lib/hash-pjw.c tests=lib/hash-pjw.h tests=lib/imaxtostr.c + tests=lib/inet_pton.c tests=lib/inttostr.c tests=lib/inttostr.h + tests=lib/ioctl.c tests=lib/itold.c + tests=lib/listen.c + tests=lib/localename-table.c + tests=lib/localename-table.h tests=lib/localename.c tests=lib/localename.h + tests=lib/localtime-buffer.c + tests=lib/localtime-buffer.h + tests=lib/nanosleep.c + tests=lib/netinet_in.in.h tests=lib/offtostr.c + tests=lib/perror.c tests=lib/pipe.c tests=lib/printf-args.c tests=lib/printf-args.h tests=lib/printf-parse.c tests=lib/printf-parse.h tests=lib/putenv.c + tests=lib/select.c tests=lib/setenv.c tests=lib/setlocale.c + tests=lib/setsockopt.c tests=lib/size_max.h + tests=lib/sleep.c tests=lib/snprintf.c + tests=lib/socket.c + tests=lib/sockets.c + tests=lib/sockets.h + tests=lib/strerror_r.c tests=lib/symlink.c + tests=lib/sys_ioctl.in.h + tests=lib/sys_select.in.h + tests=lib/sys_socket.c + tests=lib/sys_socket.in.h + tests=lib/sys_time.in.h + tests=lib/sys_uio.in.h tests=lib/uinttostr.c tests=lib/umaxtostr.c tests=lib/unsetenv.c tests=lib/unused-parameter.h tests=lib/vasnprintf.c tests=lib/vasnprintf.h + tests=lib/w32sock.h tests=lib/warn-on-use.h tests=lib/xsize.c tests=lib/xsize.h diff -Nru grep-3.1/m4/hard-locale.m4 grep-3.3/m4/hard-locale.m4 --- grep-3.1/m4/hard-locale.m4 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/m4/hard-locale.m4 1970-01-01 00:00:00.000000000 +0000 @@ -1,11 +0,0 @@ -# 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 -Nru grep-3.1/m4/host-cpu-c-abi.m4 grep-3.3/m4/host-cpu-c-abi.m4 --- grep-3.1/m4/host-cpu-c-abi.m4 1970-01-01 00:00:00.000000000 +0000 +++ grep-3.3/m4/host-cpu-c-abi.m4 2018-12-21 02:51:47.000000000 +0000 @@ -0,0 +1,644 @@ +# host-cpu-c-abi.m4 serial 11 +dnl Copyright (C) 2002-2018 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 and Sam Steingold. + +dnl Sets the HOST_CPU variable to the canonical name of the CPU. +dnl Sets the HOST_CPU_C_ABI variable to the canonical name of the CPU with its +dnl C language ABI (application binary interface). +dnl Also defines __${HOST_CPU}__ and __${HOST_CPU_C_ABI}__ as C macros in +dnl config.h. +dnl +dnl This canonical name can be used to select a particular assembly language +dnl source file that will interoperate with C code on the given host. +dnl +dnl For example: +dnl * 'i386' and 'sparc' are different canonical names, because code for i386 +dnl will not run on SPARC CPUs and vice versa. They have different +dnl instruction sets. +dnl * 'sparc' and 'sparc64' are different canonical names, because code for +dnl 'sparc' and code for 'sparc64' cannot be linked together: 'sparc' code +dnl contains 32-bit instructions, whereas 'sparc64' code contains 64-bit +dnl instructions. A process on a SPARC CPU can be in 32-bit mode or in 64-bit +dnl mode, but not both. +dnl * 'mips' and 'mipsn32' are different canonical names, because they use +dnl different argument passing and return conventions for C functions, and +dnl although the instruction set of 'mips' is a large subset of the +dnl instruction set of 'mipsn32'. +dnl * 'mipsn32' and 'mips64' are different canonical names, because they use +dnl different sizes for the C types like 'int' and 'void *', and although +dnl the instruction sets of 'mipsn32' and 'mips64' are the same. +dnl * The same canonical name is used for different endiannesses. You can +dnl determine the endianness through preprocessor symbols: +dnl - 'arm': test __ARMEL__. +dnl - 'mips', 'mipsn32', 'mips64': test _MIPSEB vs. _MIPSEL. +dnl - 'powerpc64': test _BIG_ENDIAN vs. _LITTLE_ENDIAN. +dnl * The same name 'i386' is used for CPUs of type i386, i486, i586 +dnl (Pentium), AMD K7, Pentium II, Pentium IV, etc., because +dnl - Instructions that do not exist on all of these CPUs (cmpxchg, +dnl MMX, SSE, SSE2, 3DNow! etc.) are not frequently used. If your +dnl assembly language source files use such instructions, you will +dnl need to make the distinction. +dnl - Speed of execution of the common instruction set is reasonable across +dnl the entire family of CPUs. If you have assembly language source files +dnl that are optimized for particular CPU types (like GNU gmp has), you +dnl will need to make the distinction. +dnl See . +AC_DEFUN([gl_HOST_CPU_C_ABI], +[ + AC_REQUIRE([AC_CANONICAL_HOST]) + AC_REQUIRE([gl_C_ASM]) + AC_CACHE_CHECK([host CPU and C ABI], [gl_cv_host_cpu_c_abi], + [case "$host_cpu" in + +changequote(,)dnl + i[4567]86 ) +changequote([,])dnl + gl_cv_host_cpu_c_abi=i386 + ;; + + x86_64 ) + # On x86_64 systems, the C compiler may be generating code in one of + # these ABIs: + # - 64-bit instruction set, 64-bit pointers, 64-bit 'long': x86_64. + # - 64-bit instruction set, 64-bit pointers, 32-bit 'long': x86_64 + # with native Windows (mingw, MSVC). + # - 64-bit instruction set, 32-bit pointers, 32-bit 'long': x86_64-x32. + # - 32-bit instruction set, 32-bit pointers, 32-bit 'long': i386. + AC_COMPILE_IFELSE( + [AC_LANG_SOURCE( + [[#if (defined __x86_64__ || defined __amd64__ \ + || defined _M_X64 || defined _M_AMD64) + int ok; + #else + error fail + #endif + ]])], + [AC_COMPILE_IFELSE( + [AC_LANG_SOURCE( + [[#if defined __ILP32__ || defined _ILP32 + int ok; + #else + error fail + #endif + ]])], + [gl_cv_host_cpu_c_abi=x86_64-x32], + [gl_cv_host_cpu_c_abi=x86_64])], + [gl_cv_host_cpu_c_abi=i386]) + ;; + +changequote(,)dnl + alphaev[4-8] | alphaev56 | alphapca5[67] | alphaev6[78] ) +changequote([,])dnl + gl_cv_host_cpu_c_abi=alpha + ;; + + arm* | aarch64 ) + # Assume arm with EABI. + # On arm64 systems, the C compiler may be generating code in one of + # these ABIs: + # - aarch64 instruction set, 64-bit pointers, 64-bit 'long': arm64. + # - aarch64 instruction set, 32-bit pointers, 32-bit 'long': arm64-ilp32. + # - 32-bit instruction set, 32-bit pointers, 32-bit 'long': arm or armhf. + AC_COMPILE_IFELSE( + [AC_LANG_SOURCE( + [[#ifdef __aarch64__ + int ok; + #else + error fail + #endif + ]])], + [AC_COMPILE_IFELSE( + [AC_LANG_SOURCE( + [[#if defined __ILP32__ || defined _ILP32 + int ok; + #else + error fail + #endif + ]])], + [gl_cv_host_cpu_c_abi=arm64-ilp32], + [gl_cv_host_cpu_c_abi=arm64])], + [# Don't distinguish little-endian and big-endian arm, since they + # don't require different machine code for simple operations and + # since the user can distinguish them through the preprocessor + # defines __ARMEL__ vs. __ARMEB__. + # But distinguish arm which passes floating-point arguments and + # return values in integer registers (r0, r1, ...) - this is + # gcc -mfloat-abi=soft or gcc -mfloat-abi=softfp - from arm which + # passes them in float registers (s0, s1, ...) and double registers + # (d0, d1, ...) - this is gcc -mfloat-abi=hard. GCC 4.6 or newer + # sets the preprocessor defines __ARM_PCS (for the first case) and + # __ARM_PCS_VFP (for the second case), but older GCC does not. + echo 'double ddd; void func (double dd) { ddd = dd; }' > conftest.c + # Look for a reference to the register d0 in the .s file. + AC_TRY_COMMAND(${CC-cc} $CFLAGS $CPPFLAGS $gl_c_asm_opt conftest.c) >/dev/null 2>&1 + if LC_ALL=C grep 'd0,' conftest.$gl_asmext >/dev/null; then + gl_cv_host_cpu_c_abi=armhf + else + gl_cv_host_cpu_c_abi=arm + fi + rm -f conftest* + ]) + ;; + + hppa1.0 | hppa1.1 | hppa2.0* | hppa64 ) + # On hppa, the C compiler may be generating 32-bit code or 64-bit + # code. In the latter case, it defines _LP64 and __LP64__. + AC_COMPILE_IFELSE( + [AC_LANG_SOURCE( + [[#ifdef __LP64__ + int ok; + #else + error fail + #endif + ]])], + [gl_cv_host_cpu_c_abi=hppa64], + [gl_cv_host_cpu_c_abi=hppa]) + ;; + + ia64* ) + # On ia64 on HP-UX, the C compiler may be generating 64-bit code or + # 32-bit code. In the latter case, it defines _ILP32. + AC_COMPILE_IFELSE( + [AC_LANG_SOURCE( + [[#ifdef _ILP32 + int ok; + #else + error fail + #endif + ]])], + [gl_cv_host_cpu_c_abi=ia64-ilp32], + [gl_cv_host_cpu_c_abi=ia64]) + ;; + + mips* ) + # We should also check for (_MIPS_SZPTR == 64), but gcc keeps this + # at 32. + AC_COMPILE_IFELSE( + [AC_LANG_SOURCE( + [[#if defined _MIPS_SZLONG && (_MIPS_SZLONG == 64) + int ok; + #else + error fail + #endif + ]])], + [gl_cv_host_cpu_c_abi=mips64], + [# In the n32 ABI, _ABIN32 is defined, _ABIO32 is not defined (but + # may later get defined by ), and _MIPS_SIM == _ABIN32. + # In the 32 ABI, _ABIO32 is defined, _ABIN32 is not defined (but + # may later get defined by ), and _MIPS_SIM == _ABIO32. + AC_COMPILE_IFELSE( + [AC_LANG_SOURCE( + [[#if (_MIPS_SIM == _ABIN32) + int ok; + #else + error fail + #endif + ]])], + [gl_cv_host_cpu_c_abi=mipsn32], + [gl_cv_host_cpu_c_abi=mips])]) + ;; + + powerpc* ) + # Different ABIs are in use on AIX vs. Mac OS X vs. Linux,*BSD. + # No need to distinguish them here; the caller may distinguish + # them based on the OS. + # On powerpc64 systems, the C compiler may still be generating + # 32-bit code. And on powerpc-ibm-aix systems, the C compiler may + # be generating 64-bit code. + AC_COMPILE_IFELSE( + [AC_LANG_SOURCE( + [[#if defined __powerpc64__ || defined _ARCH_PPC64 + int ok; + #else + error fail + #endif + ]])], + [# On powerpc64, there are two ABIs on Linux: The AIX compatible + # one and the ELFv2 one. The latter defines _CALL_ELF=2. + AC_COMPILE_IFELSE( + [AC_LANG_SOURCE( + [[#if defined _CALL_ELF && _CALL_ELF == 2 + int ok; + #else + error fail + #endif + ]])], + [gl_cv_host_cpu_c_abi=powerpc64-elfv2], + [gl_cv_host_cpu_c_abi=powerpc64]) + ], + [gl_cv_host_cpu_c_abi=powerpc]) + ;; + + rs6000 ) + gl_cv_host_cpu_c_abi=powerpc + ;; + + riscv32 | riscv64 ) + # There are 2 architectures (with variants): rv32* and rv64*. + AC_COMPILE_IFELSE( + [AC_LANG_SOURCE( + [[#if __riscv_xlen == 64 + int ok; + #else + error fail + #endif + ]])], + [cpu=riscv64], + [cpu=riscv32]) + # There are 6 ABIs: ilp32, ilp32f, ilp32d, lp64, lp64f, lp64d. + # Size of 'long' and 'void *': + AC_COMPILE_IFELSE( + [AC_LANG_SOURCE( + [[#if defined __LP64__ + int ok; + #else + error fail + #endif + ]])], + [main_abi=lp64], + [main_abi=ilp32]) + # Float ABIs: + # __riscv_float_abi_double: + # 'float' and 'double' are passed in floating-point registers. + # __riscv_float_abi_single: + # 'float' are passed in floating-point registers. + # __riscv_float_abi_soft: + # No values are passed in floating-point registers. + AC_COMPILE_IFELSE( + [AC_LANG_SOURCE( + [[#if defined __riscv_float_abi_double + int ok; + #else + error fail + #endif + ]])], + [float_abi=d], + [AC_COMPILE_IFELSE( + [AC_LANG_SOURCE( + [[#if defined __riscv_float_abi_single + int ok; + #else + error fail + #endif + ]])], + [float_abi=f], + [float_abi='']) + ]) + gl_cv_host_cpu_c_abi="${cpu}-${main_abi}${float_abi}" + ;; + + s390* ) + # On s390x, the C compiler may be generating 64-bit (= s390x) code + # or 31-bit (= s390) code. + AC_COMPILE_IFELSE( + [AC_LANG_SOURCE( + [[#if defined __LP64__ || defined __s390x__ + int ok; + #else + error fail + #endif + ]])], + [gl_cv_host_cpu_c_abi=s390x], + [gl_cv_host_cpu_c_abi=s390]) + ;; + + sparc | sparc64 ) + # UltraSPARCs running Linux have `uname -m` = "sparc64", but the + # C compiler still generates 32-bit code. + AC_COMPILE_IFELSE( + [AC_LANG_SOURCE( + [[#if defined __sparcv9 || defined __arch64__ + int ok; + #else + error fail + #endif + ]])], + [gl_cv_host_cpu_c_abi=sparc64], + [gl_cv_host_cpu_c_abi=sparc]) + ;; + + *) + gl_cv_host_cpu_c_abi="$host_cpu" + ;; + esac + ]) + + dnl In most cases, $HOST_CPU and $HOST_CPU_C_ABI are the same. + HOST_CPU=`echo "$gl_cv_host_cpu_c_abi" | sed -e 's/-.*//'` + HOST_CPU_C_ABI="$gl_cv_host_cpu_c_abi" + AC_SUBST([HOST_CPU]) + AC_SUBST([HOST_CPU_C_ABI]) + + # This was + # AC_DEFINE_UNQUOTED([__${HOST_CPU}__]) + # AC_DEFINE_UNQUOTED([__${HOST_CPU_C_ABI}__]) + # earlier, but KAI C++ 3.2d doesn't like this. + sed -e 's/-/_/g' >> confdefs.h < + ]], [iconv iconv_open]) ]) dnl Unconditionally enables the replacement of . @@ -30,6 +36,7 @@ AC_DEFUN([gl_ICONV_H_DEFAULTS], [ + m4_ifdef([gl_ANSI_CXX], [AC_REQUIRE([gl_ANSI_CXX])]) GNULIB_ICONV=0; AC_SUBST([GNULIB_ICONV]) dnl Assume proper GNU behavior unless another module says otherwise. ICONV_CONST=; AC_SUBST([ICONV_CONST]) @@ -37,5 +44,12 @@ REPLACE_ICONV_OPEN=0; AC_SUBST([REPLACE_ICONV_OPEN]) REPLACE_ICONV_UTF=0; AC_SUBST([REPLACE_ICONV_UTF]) ICONV_H=''; AC_SUBST([ICONV_H]) + m4_ifdef([gl_POSIXCHECK], + [ICONV_H='iconv.h'], + [if m4_ifdef([gl_ANSI_CXX], [test "$CXX" != no], [false]); then + dnl Override always, to support the C++ GNULIB_NAMESPACE. + ICONV_H='iconv.h' + fi + ]) AM_CONDITIONAL([GL_GENERATE_ICONV_H], [test -n "$ICONV_H"]) ]) diff -Nru grep-3.1/m4/iconv.m4 grep-3.3/m4/iconv.m4 --- grep-3.1/m4/iconv.m4 2017-06-10 16:44:24.000000000 +0000 +++ grep-3.3/m4/iconv.m4 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,6 @@ # iconv.m4 serial 21 -dnl Copyright (C) 2000-2002, 2007-2014, 2016-2017 Free Software Foundation, Inc. +dnl Copyright (C) 2000-2002, 2007-2014, 2016-2018 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 -Nru grep-3.1/m4/iconv_open.m4 grep-3.3/m4/iconv_open.m4 --- grep-3.1/m4/iconv_open.m4 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/m4/iconv_open.m4 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ # iconv_open.m4 serial 14 -dnl Copyright (C) 2007-2017 Free Software Foundation, Inc. +dnl Copyright (C) 2007-2018 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 -Nru grep-3.1/m4/include_next.m4 grep-3.3/m4/include_next.m4 --- grep-3.1/m4/include_next.m4 2017-05-14 01:09:51.000000000 +0000 +++ grep-3.3/m4/include_next.m4 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ # include_next.m4 serial 24 -dnl Copyright (C) 2006-2017 Free Software Foundation, Inc. +dnl Copyright (C) 2006-2018 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 -Nru grep-3.1/m4/inet_pton.m4 grep-3.3/m4/inet_pton.m4 --- grep-3.1/m4/inet_pton.m4 1970-01-01 00:00:00.000000000 +0000 +++ grep-3.3/m4/inet_pton.m4 2018-01-07 00:07:08.000000000 +0000 @@ -0,0 +1,69 @@ +# inet_pton.m4 serial 18 +dnl Copyright (C) 2006, 2008-2018 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_INET_PTON], +[ + AC_REQUIRE([gl_ARPA_INET_H_DEFAULTS]) + + dnl Persuade Solaris to declare inet_pton. + AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) + + AC_REQUIRE([AC_C_RESTRICT]) + + dnl Most platforms that provide inet_pton define it in libc. + dnl Solaris 8..10 provide inet_pton in libnsl instead. + dnl Solaris 2.6..7 provide inet_pton in libresolv instead. + dnl Haiku provides it in -lnetwork. + dnl Native Windows provides it in -lws2_32 instead, with a declaration in + dnl , and it uses stdcall calling convention, not cdecl + dnl (hence we cannot use AC_CHECK_FUNCS, AC_SEARCH_LIBS to find it). + HAVE_INET_PTON=1 + INET_PTON_LIB= + gl_PREREQ_SYS_H_WINSOCK2 + if test $HAVE_WINSOCK2_H = 1; then + AC_CHECK_DECLS([inet_pton],,, [[#include ]]) + if test $ac_cv_have_decl_inet_pton = yes; then + dnl It needs to be overridden, because the stdcall calling convention + dnl is not compliant with POSIX. + REPLACE_INET_PTON=1 + INET_PTON_LIB="-lws2_32" + else + HAVE_DECL_INET_PTON=0 + HAVE_INET_PTON=0 + fi + else + gl_save_LIBS=$LIBS + AC_SEARCH_LIBS([inet_pton], [nsl resolv network], [], + [AC_CHECK_FUNCS([inet_pton]) + if test $ac_cv_func_inet_pton = no; then + HAVE_INET_PTON=0 + fi + ]) + LIBS=$gl_save_LIBS + + if test "$ac_cv_search_inet_pton" != "no" \ + && test "$ac_cv_search_inet_pton" != "none required"; then + INET_PTON_LIB="$ac_cv_search_inet_pton" + fi + + AC_CHECK_HEADERS_ONCE([netdb.h]) + AC_CHECK_DECLS([inet_pton],,, + [[#include + #if HAVE_NETDB_H + # include + #endif + ]]) + if test $ac_cv_have_decl_inet_pton = no; then + HAVE_DECL_INET_PTON=0 + fi + fi + AC_SUBST([INET_PTON_LIB]) +]) + +# Prerequisites of lib/inet_pton.c. +AC_DEFUN([gl_PREREQ_INET_PTON], [ + AC_REQUIRE([gl_SOCKET_FAMILIES]) +]) diff -Nru grep-3.1/m4/__inline.m4 grep-3.3/m4/__inline.m4 --- grep-3.1/m4/__inline.m4 1970-01-01 00:00:00.000000000 +0000 +++ grep-3.3/m4/__inline.m4 2018-01-07 00:07:08.000000000 +0000 @@ -0,0 +1,22 @@ +# Test for __inline keyword +dnl Copyright 2017-2018 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___INLINE], +[ + AC_CACHE_CHECK([whether the compiler supports the __inline keyword], + [gl_cv_c___inline], + [AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [[typedef int foo_t; + static __inline foo_t foo (void) { return 0; }]], + [[return foo ();]])], + [gl_cv_c___inline=yes], + [gl_cv_c___inline=no])]) + if test $gl_cv_c___inline = yes; then + AC_DEFINE([HAVE___INLINE], [1], + [Define to 1 if the compiler supports the keyword '__inline'.]) + fi +]) diff -Nru grep-3.1/m4/inline.m4 grep-3.3/m4/inline.m4 --- grep-3.1/m4/inline.m4 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/m4/inline.m4 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ # inline.m4 serial 4 -dnl Copyright (C) 2006, 2009-2017 Free Software Foundation, Inc. +dnl Copyright (C) 2006, 2009-2018 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 -Nru grep-3.1/m4/intlmacosx.m4 grep-3.3/m4/intlmacosx.m4 --- grep-3.1/m4/intlmacosx.m4 2017-01-07 10:34:02.000000000 +0000 +++ grep-3.3/m4/intlmacosx.m4 2018-09-19 05:04:26.000000000 +0000 @@ -1,4 +1,4 @@ -# intlmacosx.m4 serial 5 (gettext-0.18.2) +# intlmacosx.m4 serial 6 (gettext-0.19.9) 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, @@ -17,7 +17,7 @@ dnl Defines INTL_MACOSX_LIBS. AC_DEFUN([gt_INTL_MACOSX], [ - dnl Check for API introduced in Mac OS X 10.2. + dnl Check for API introduced in Mac OS X 10.4. AC_CACHE_CHECK([for CFPreferencesCopyAppValue], [gt_cv_func_CFPreferencesCopyAppValue], [gt_save_LIBS="$LIBS" @@ -33,7 +33,7 @@ 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. + dnl Check for API introduced in Mac OS X 10.5. AC_CACHE_CHECK([for CFLocaleCopyCurrent], [gt_cv_func_CFLocaleCopyCurrent], [gt_save_LIBS="$LIBS" LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" @@ -48,8 +48,24 @@ AC_DEFINE([HAVE_CFLOCALECOPYCURRENT], [1], [Define to 1 if you have the Mac OS X function CFLocaleCopyCurrent in the CoreFoundation framework.]) fi + AC_CACHE_CHECK([for CFLocaleCopyPreferredLanguages], [gt_cv_func_CFLocaleCopyPreferredLanguages], + [gt_save_LIBS="$LIBS" + LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" + AC_LINK_IFELSE( + [AC_LANG_PROGRAM( + [[#include ]], + [[CFLocaleCopyPreferredLanguages();]])], + [gt_cv_func_CFLocaleCopyPreferredLanguages=yes], + [gt_cv_func_CFLocaleCopyPreferredLanguages=no]) + LIBS="$gt_save_LIBS"]) + if test $gt_cv_func_CFLocaleCopyPreferredLanguages = yes; then + AC_DEFINE([HAVE_CFLOCALECOPYPREFERREDLANGUAGES], [1], + [Define to 1 if you have the Mac OS X function CFLocaleCopyPreferredLanguages in the CoreFoundation framework.]) + fi INTL_MACOSX_LIBS= - if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then + if test $gt_cv_func_CFPreferencesCopyAppValue = yes \ + || test $gt_cv_func_CFLocaleCopyCurrent = yes \ + || test $gt_cv_func_CFLocaleCopyPreferredLanguages = yes; then INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation" fi AC_SUBST([INTL_MACOSX_LIBS]) diff -Nru grep-3.1/m4/intl-thread-locale.m4 grep-3.3/m4/intl-thread-locale.m4 --- grep-3.1/m4/intl-thread-locale.m4 1970-01-01 00:00:00.000000000 +0000 +++ grep-3.3/m4/intl-thread-locale.m4 2018-12-21 03:31:37.000000000 +0000 @@ -0,0 +1,183 @@ +# intl-thread-locale.m4 serial 4 +dnl Copyright (C) 2015-2018 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 Check how to retrieve the name of a per-thread locale (POSIX locale_t). +dnl Sets gt_nameless_locales. +AC_DEFUN([gt_INTL_THREAD_LOCALE_NAME], +[ + AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles + + dnl Persuade Solaris to define 'locale_t'. + AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) + + dnl Test whether uselocale() exists and works at all. + gt_FUNC_USELOCALE + + dnl On OpenBSD >= 6.2, the locale_t type and the uselocale(), newlocale(), + dnl duplocale(), freelocale() functions exist but are effectively useless, + dnl because the locale_t value depends only on the LC_CTYPE category of the + dnl locale and furthermore contains only one bit of information (it + dnl distinguishes the "C" locale from the *.UTF-8 locales). See + dnl . + dnl In the setlocale() implementation they have thought about the programs + dnl that use the API ("Even though only LC_CTYPE has any effect in the + dnl OpenBSD base system, store complete information about the global locale, + dnl such that third-party software can access it"), but for uselocale() + dnl they did not think about the programs. + dnl In this situation, even the HAVE_NAMELESS_LOCALES support does not work. + dnl So, define HAVE_FAKE_LOCALES and disable all locale_t support. + case "$gt_cv_func_uselocale_works" in + *yes) + AC_CHECK_HEADERS_ONCE([xlocale.h]) + AC_CACHE_CHECK([for fake locale system (OpenBSD)], + [gt_cv_locale_fake], + [AC_RUN_IFELSE( + [AC_LANG_SOURCE([[ +#include +#if HAVE_XLOCALE_H +# include +#endif +int main () +{ + locale_t loc1, loc2; + if (setlocale (LC_ALL, "de_DE.UTF-8") == NULL) return 1; + if (setlocale (LC_ALL, "fr_FR.UTF-8") == NULL) return 1; + loc1 = newlocale (LC_ALL_MASK, "de_DE.UTF-8", (locale_t)0); + loc2 = newlocale (LC_ALL_MASK, "fr_FR.UTF-8", (locale_t)0); + return !(loc1 == loc2); +}]])], + [gt_cv_locale_fake=yes], + [gt_cv_locale_fake=no], + [dnl Guess the locale system is fake only on OpenBSD. + case "$host_os" in + openbsd*) gt_cv_locale_fake="guessing yes" ;; + *) gt_cv_locale_fake="guessing no" ;; + esac + ]) + ]) + ;; + *) gt_cv_locale_fake=no ;; + esac + case "$gt_cv_locale_fake" in + *yes) + AC_DEFINE([HAVE_FAKE_LOCALES], [1], + [Define if the locale_t type contains insufficient information, as on OpenBSD.]) + ;; + esac + + case "$gt_cv_func_uselocale_works" in + *yes) + AC_CACHE_CHECK([for Solaris 11.4 locale system], + [gt_cv_locale_solaris114], + [case "$host_os" in + solaris*) + dnl Test whether defines locale_t as a typedef of + dnl 'struct _LC_locale_t **' (whereas Illumos defines it as a + dnl typedef of 'struct _locale *'). + dnl Another possible test would be to include + dnl and test whether it defines the _LC_core_data_locale_t type. + dnl This type was added in Solaris 11.4. + AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM([[ + #include + struct _LC_locale_t *x; + locale_t y; + ]], + [[*y = x;]])], + [gt_cv_locale_solaris114=yes], + [gt_cv_locale_solaris114=no]) + ;; + *) gt_cv_locale_solaris114=no ;; + esac + ]) + ;; + *) gt_cv_locale_solaris114=no ;; + esac + if test $gt_cv_locale_solaris114 = yes; then + AC_DEFINE([HAVE_SOLARIS114_LOCALES], [1], + [Define if the locale_t type is as on Solaris 11.4.]) + fi + + dnl Solaris 12 will maybe provide getlocalename_l. If it does, it will + dnl improve the implementation of gl_locale_name_thread(), by removing + dnl the use of undocumented structures. + case "$gt_cv_func_uselocale_works" in + *yes) + AC_CHECK_FUNCS([getlocalename_l]) + ;; + esac + + dnl This code is for future use, in case we some day have to port to a + dnl platform where the locale_t type does not provide access to the name of + dnl each locale category. This code has the drawback that it requires the + dnl gnulib overrides of 'newlocale', 'duplocale', 'freelocale', which is a + dnl problem for GNU libunistring. Therefore try hard to avoid enabling this + dnl code! + gt_nameless_locales=no + if false; then + gt_nameless_locales=yes + AC_DEFINE([HAVE_NAMELESS_LOCALES], [1], + [Define if the locale_t type does not contain the name of each locale category.]) + fi +]) + +dnl Tests whether uselocale() exists and is usable. +dnl Sets gt_cv_func_uselocale_works. Defines HAVE_WORKING_USELOCALE. +AC_DEFUN([gt_FUNC_USELOCALE], +[ + AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles + + dnl Persuade Solaris to define 'locale_t'. + AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) + + AC_CHECK_FUNCS_ONCE([uselocale]) + + dnl On AIX 7.2, the uselocale() function is not documented and leads to + dnl crashes in subsequent setlocale() invocations. + if test $ac_cv_func_uselocale = yes; then + AC_CHECK_HEADERS_ONCE([xlocale.h]) + AC_CACHE_CHECK([whether uselocale works], + [gt_cv_func_uselocale_works], + [AC_RUN_IFELSE( + [AC_LANG_SOURCE([[ +#include +#if HAVE_XLOCALE_H +# include +#endif +int main () +{ + uselocale (NULL); + setlocale (LC_ALL, "en_US.UTF-8"); + return 0; +}]])], + [gt_cv_func_uselocale_works=yes], + [gt_cv_func_uselocale_works=no], + [# Guess no on AIX, yes otherwise. + case "$host_os" in + aix*) gt_cv_func_uselocale_works="guessing no" ;; + *) gt_cv_func_uselocale_works="guessing yes" ;; + esac + ]) + ]) + else + gt_cv_func_uselocale_works=no + fi + case "$gt_cv_func_uselocale_works" in + *yes) + AC_DEFINE([HAVE_WORKING_USELOCALE], [1], + [Define if the uselocale function exists any may safely be called.]) + ;; + esac +]) diff -Nru grep-3.1/m4/intmax_t.m4 grep-3.3/m4/intmax_t.m4 --- grep-3.1/m4/intmax_t.m4 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/m4/intmax_t.m4 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ # intmax_t.m4 serial 8 -dnl Copyright (C) 1997-2004, 2006-2007, 2009-2017 Free Software Foundation, +dnl Copyright (C) 1997-2004, 2006-2007, 2009-2018 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 -Nru grep-3.1/m4/inttostr.m4 grep-3.3/m4/inttostr.m4 --- grep-3.1/m4/inttostr.m4 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/m4/inttostr.m4 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ #serial 8 -dnl Copyright (C) 2004-2006, 2009-2017 Free Software Foundation, Inc. +dnl Copyright (C) 2004-2006, 2009-2018 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 -Nru grep-3.1/m4/inttypes_h.m4 grep-3.3/m4/inttypes_h.m4 --- grep-3.1/m4/inttypes_h.m4 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/m4/inttypes_h.m4 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ # inttypes_h.m4 serial 10 -dnl Copyright (C) 1997-2004, 2006, 2008-2017 Free Software Foundation, Inc. +dnl Copyright (C) 1997-2004, 2006, 2008-2018 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 -Nru grep-3.1/m4/inttypes.m4 grep-3.3/m4/inttypes.m4 --- grep-3.1/m4/inttypes.m4 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/m4/inttypes.m4 2018-09-19 05:04:26.000000000 +0000 @@ -1,5 +1,5 @@ -# inttypes.m4 serial 26 -dnl Copyright (C) 2006-2017 Free Software Foundation, Inc. +# inttypes.m4 serial 27 +dnl Copyright (C) 2006-2018 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. @@ -147,6 +147,7 @@ HAVE_DECL_IMAXDIV=1; AC_SUBST([HAVE_DECL_IMAXDIV]) HAVE_DECL_STRTOIMAX=1; AC_SUBST([HAVE_DECL_STRTOIMAX]) HAVE_DECL_STRTOUMAX=1; AC_SUBST([HAVE_DECL_STRTOUMAX]) + HAVE_IMAXDIV_T=1; AC_SUBST([HAVE_IMAXDIV_T]) REPLACE_STRTOIMAX=0; AC_SUBST([REPLACE_STRTOIMAX]) REPLACE_STRTOUMAX=0; AC_SUBST([REPLACE_STRTOUMAX]) INT32_MAX_LT_INTMAX_MAX=1; AC_SUBST([INT32_MAX_LT_INTMAX_MAX]) diff -Nru grep-3.1/m4/inttypes-pri.m4 grep-3.3/m4/inttypes-pri.m4 --- grep-3.1/m4/inttypes-pri.m4 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/m4/inttypes-pri.m4 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ # inttypes-pri.m4 serial 7 (gettext-0.18.2) -dnl Copyright (C) 1997-2002, 2006, 2008-2017 Free Software Foundation, Inc. +dnl Copyright (C) 1997-2002, 2006, 2008-2018 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 -Nru grep-3.1/m4/ioctl.m4 grep-3.3/m4/ioctl.m4 --- grep-3.1/m4/ioctl.m4 1970-01-01 00:00:00.000000000 +0000 +++ grep-3.3/m4/ioctl.m4 2018-01-07 00:07:08.000000000 +0000 @@ -0,0 +1,44 @@ +# ioctl.m4 serial 5 +dnl Copyright (C) 2008-2018 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_IOCTL], +[ + AC_REQUIRE([gl_SYS_IOCTL_H_DEFAULTS]) + AC_REQUIRE([gl_HEADER_SYS_SOCKET]) + HAVE_IOCTL=1 + if test "$ac_cv_header_winsock2_h" = yes; then + dnl Even if the 'socket' module is not used here, another part of the + dnl application may use it and pass file descriptors that refer to + dnl sockets to the ioctl() function. So enable the support for sockets. + HAVE_IOCTL=0 + else + AC_CHECK_FUNCS([ioctl]) + dnl On glibc systems, the second parameter is 'unsigned long int request', + dnl not 'int request'. We cannot simply cast the function pointer, but + dnl instead need a wrapper. + AC_CACHE_CHECK([for ioctl with POSIX signature], + [gl_cv_func_ioctl_posix_signature], + [AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [[#include + /* On some platforms, ioctl() is declared in . */ + #include + ]], + [[extern + #ifdef __cplusplus + "C" + #endif + int ioctl (int, int, ...); + ]]) + ], + [gl_cv_func_ioctl_posix_signature=yes], + [gl_cv_func_ioctl_posix_signature=no]) + ]) + if test $gl_cv_func_ioctl_posix_signature != yes; then + REPLACE_IOCTL=1 + fi + fi +]) diff -Nru grep-3.1/m4/i-ring.m4 grep-3.3/m4/i-ring.m4 --- grep-3.1/m4/i-ring.m4 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/m4/i-ring.m4 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ # serial 2 -dnl Copyright (C) 2006, 2009-2017 Free Software Foundation, Inc. +dnl Copyright (C) 2006, 2009-2018 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 -Nru grep-3.1/m4/isatty.m4 grep-3.3/m4/isatty.m4 --- grep-3.1/m4/isatty.m4 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/m4/isatty.m4 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ # isatty.m4 serial 3 -dnl Copyright (C) 2012-2017 Free Software Foundation, Inc. +dnl Copyright (C) 2012-2018 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 -Nru grep-3.1/m4/isblank.m4 grep-3.3/m4/isblank.m4 --- grep-3.1/m4/isblank.m4 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/m4/isblank.m4 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ # isblank.m4 serial 3 -dnl Copyright (C) 2009-2017 Free Software Foundation, Inc. +dnl Copyright (C) 2009-2018 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 -Nru grep-3.1/m4/iswblank.m4 grep-3.3/m4/iswblank.m4 --- grep-3.1/m4/iswblank.m4 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/m4/iswblank.m4 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ # iswblank.m4 serial 4 -dnl Copyright (C) 2011-2017 Free Software Foundation, Inc. +dnl Copyright (C) 2011-2018 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 -Nru grep-3.1/m4/iswctype.m4 grep-3.3/m4/iswctype.m4 --- grep-3.1/m4/iswctype.m4 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/m4/iswctype.m4 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ # iswctype.m4 serial 2 -dnl Copyright (C) 2011-2017 Free Software Foundation, Inc. +dnl Copyright (C) 2011-2018 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 -Nru grep-3.1/m4/langinfo_h.m4 grep-3.3/m4/langinfo_h.m4 --- grep-3.1/m4/langinfo_h.m4 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/m4/langinfo_h.m4 2018-02-26 06:09:46.000000000 +0000 @@ -1,5 +1,5 @@ -# langinfo_h.m4 serial 7 -dnl Copyright (C) 2009-2017 Free Software Foundation, Inc. +# langinfo_h.m4 serial 8 +dnl Copyright (C) 2009-2018 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,6 +17,7 @@ dnl Determine whether exists. It is missing on mingw and BeOS. HAVE_LANGINFO_CODESET=0 HAVE_LANGINFO_T_FMT_AMPM=0 + HAVE_LANGINFO_ALTMON=0 HAVE_LANGINFO_ERA=0 HAVE_LANGINFO_YESEXPR=0 AC_CHECK_HEADERS_ONCE([langinfo.h]) @@ -24,6 +25,7 @@ HAVE_LANGINFO_H=1 dnl Determine what defines. CODESET and ERA etc. are missing dnl on OpenBSD 3.8. T_FMT_AMPM and YESEXPR, NOEXPR are missing on IRIX 5.3. + dnl ALTMON_* are missing on glibc 2.26 and many other systems. AC_CACHE_CHECK([whether langinfo.h defines CODESET], [gl_cv_header_langinfo_codeset], [AC_COMPILE_IFELSE( @@ -48,6 +50,18 @@ if test $gl_cv_header_langinfo_t_fmt_ampm = yes; then HAVE_LANGINFO_T_FMT_AMPM=1 fi + AC_CACHE_CHECK([whether langinfo.h defines ALTMON_1], + [gl_cv_header_langinfo_altmon], + [AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM([[#include +int a = ALTMON_1; +]])], + [gl_cv_header_langinfo_altmon=yes], + [gl_cv_header_langinfo_altmon=no]) + ]) + if test $gl_cv_header_langinfo_altmon = yes; then + HAVE_LANGINFO_ALTMON=1 + fi AC_CACHE_CHECK([whether langinfo.h defines ERA], [gl_cv_header_langinfo_era], [AC_COMPILE_IFELSE( @@ -78,6 +92,7 @@ AC_SUBST([HAVE_LANGINFO_H]) AC_SUBST([HAVE_LANGINFO_CODESET]) AC_SUBST([HAVE_LANGINFO_T_FMT_AMPM]) + AC_SUBST([HAVE_LANGINFO_ALTMON]) AC_SUBST([HAVE_LANGINFO_ERA]) AC_SUBST([HAVE_LANGINFO_YESEXPR]) diff -Nru grep-3.1/m4/largefile.m4 grep-3.3/m4/largefile.m4 --- grep-3.1/m4/largefile.m4 2017-05-14 01:09:51.000000000 +0000 +++ grep-3.3/m4/largefile.m4 2018-01-07 00:07:08.000000000 +0000 @@ -1,6 +1,6 @@ # Enable large files on systems where this is not the default. -# Copyright 1992-1996, 1998-2017 Free Software Foundation, Inc. +# Copyright 1992-1996, 1998-2018 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 -Nru grep-3.1/m4/lib-ld.m4 grep-3.3/m4/lib-ld.m4 --- grep-3.1/m4/lib-ld.m4 2017-03-17 04:33:17.000000000 +0000 +++ grep-3.3/m4/lib-ld.m4 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ -# lib-ld.m4 serial 7 -dnl Copyright (C) 1996-2003, 2009-2017 Free Software Foundation, Inc. +# lib-ld.m4 serial 9 +dnl Copyright (C) 1996-2003, 2009-2018 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. @@ -120,11 +120,14 @@ fi case $host in *-*-aix*) - AC_EGREP_CPP([yes], - [#if defined __powerpc64__ || defined _ARCH_PPC64 - yes - #endif - ], + AC_COMPILE_IFELSE( + [AC_LANG_SOURCE( + [[#if defined __powerpc64__ || defined _ARCH_PPC64 + int ok; + #else + error fail + #endif + ]])], [# The compiler produces 64-bit code. Add option '-b64' so that the # linker groks 64-bit object files. case "$acl_cv_path_LD " in @@ -133,6 +136,24 @@ esac ], []) ;; + sparc64-*-netbsd*) + AC_COMPILE_IFELSE( + [AC_LANG_SOURCE( + [[#if defined __sparcv9 || defined __arch64__ + int ok; + #else + error fail + #endif + ]])], + [], + [# The compiler produces 32-bit code. Add option '-m elf32_sparc' + # so that the linker groks 32-bit object files. + case "$acl_cv_path_LD " in + *" -m elf32_sparc "*) ;; + *) acl_cv_path_LD="$acl_cv_path_LD -m elf32_sparc" ;; + esac + ]) + ;; esac ]) LD="$acl_cv_path_LD" diff -Nru grep-3.1/m4/lib-link.m4 grep-3.3/m4/lib-link.m4 --- grep-3.1/m4/lib-link.m4 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/m4/lib-link.m4 2018-12-21 02:51:47.000000000 +0000 @@ -1,12 +1,12 @@ -# lib-link.m4 serial 26 (gettext-0.18.2) -dnl Copyright (C) 2001-2017 Free Software Foundation, Inc. +# lib-link.m4 serial 28 +dnl Copyright (C) 2001-2018 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.54]) +AC_PREREQ([2.61]) dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and dnl the libraries corresponding to explicit and implicit dependencies. @@ -124,8 +124,8 @@ dnl acl_hardcode_minus_L. AC_DEFUN([AC_LIB_RPATH], [ - dnl Tell automake >= 1.10 to complain if config.rpath is missing. - m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([config.rpath])]) + dnl Complain if config.rpath is missing. + AC_REQUIRE_AUX_FILE([config.rpath]) AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host @@ -187,17 +187,15 @@ pushdef([PACKUP],[m4_translit(PACK,[abcdefghijklmnopqrstuvwxyz./+-], [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])]) pushdef([PACKLIBS],[m4_ifdef([acl_frompackage_]NAME, [acl_libsinpackage_]PACKUP, lib[$1])]) - dnl Autoconf >= 2.61 supports dots in --with options. - pushdef([P_A_C_K],[m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.61]),[-1],[m4_translit(PACK,[.],[_])],PACK)]) dnl By default, look in $includedir and $libdir. use_additional=yes AC_LIB_WITH_FINAL_PREFIX([ eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" ]) - AC_ARG_WITH(P_A_C_K[-prefix], -[[ --with-]]P_A_C_K[[-prefix[=DIR] search for ]PACKLIBS[ in DIR/include and DIR/lib - --without-]]P_A_C_K[[-prefix don't search for ]PACKLIBS[ in includedir and libdir]], + AC_ARG_WITH(PACK[-prefix], +[[ --with-]]PACK[[-prefix[=DIR] search for ]PACKLIBS[ in DIR/include and DIR/lib + --without-]]PACK[[-prefix don't search for ]PACKLIBS[ in includedir and libdir]], [ if test "X$withval" = "Xno"; then use_additional=no @@ -211,7 +209,7 @@ additional_includedir="$withval/include" additional_libdir="$withval/$acl_libdirstem" if test "$acl_libdirstem2" != "$acl_libdirstem" \ - && ! test -d "$withval/$acl_libdirstem"; then + && test ! -d "$withval/$acl_libdirstem"; then additional_libdir="$withval/$acl_libdirstem2" fi fi @@ -670,7 +668,6 @@ LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir" done fi - popdef([P_A_C_K]) popdef([PACKLIBS]) popdef([PACKUP]) popdef([PACK]) diff -Nru grep-3.1/m4/lib-prefix.m4 grep-3.3/m4/lib-prefix.m4 --- grep-3.1/m4/lib-prefix.m4 2017-03-17 04:33:17.000000000 +0000 +++ grep-3.3/m4/lib-prefix.m4 2018-12-21 02:51:47.000000000 +0000 @@ -1,18 +1,11 @@ -# lib-prefix.m4 serial 8 -dnl Copyright (C) 2001-2005, 2008-2017 Free Software Foundation, Inc. +# lib-prefix.m4 serial 14 +dnl Copyright (C) 2001-2005, 2008-2018 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 AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and -dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't -dnl require excessive bracketing. -ifdef([AC_HELP_STRING], -[AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])], -[AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])]) - dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed dnl to access previously installed libraries. The basic assumption is that dnl a user will want packages to use other packages he previously installed @@ -32,9 +25,9 @@ eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" ]) - AC_LIB_ARG_WITH([lib-prefix], -[ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib - --without-lib-prefix don't search for libraries in includedir and libdir], + AC_ARG_WITH([lib-prefix], +[[ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib + --without-lib-prefix don't search for libraries in includedir and libdir]], [ if test "X$withval" = "Xno"; then use_additional=no @@ -174,6 +167,24 @@ dnl $prefix/lib/64 (which is a symlink to either $prefix/lib/sparcv9 or dnl $prefix/lib/amd64) and 32-bit libraries go under $prefix/lib. AC_REQUIRE([AC_CANONICAL_HOST]) + AC_REQUIRE([gl_HOST_CPU_C_ABI_32BIT]) + + case "$host_os" in + solaris*) + AC_CACHE_CHECK([for 64-bit host], [gl_cv_solaris_64bit], + [AC_COMPILE_IFELSE( + [AC_LANG_SOURCE( + [[#ifdef _LP64 + int ok; + #else + error fail + #endif + ]])], + [gl_cv_solaris_64bit=yes], + [gl_cv_solaris_64bit=no]) + ]);; + esac + 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], @@ -182,17 +193,10 @@ case "$host_os" in solaris*) dnl See Solaris 10 Software Developer Collection > Solaris 64-bit Developer's Guide > The Development Environment - dnl . + 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 @@ -202,33 +206,37 @@ 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" + dnl If $CC generates code for a 32-bit ABI, the libraries are + dnl surely under $prefix/lib, not $prefix/lib64. + if test "$HOST_CPU_C_ABI_32BIT" != yes; then + 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 fi ;; esac diff -Nru grep-3.1/m4/libsigsegv.m4 grep-3.3/m4/libsigsegv.m4 --- grep-3.1/m4/libsigsegv.m4 1970-01-01 00:00:00.000000000 +0000 +++ grep-3.3/m4/libsigsegv.m4 2018-01-07 00:07:08.000000000 +0000 @@ -0,0 +1,16 @@ +# libsigsegv.m4 serial 4 +dnl Copyright (C) 2002-2003, 2008-2018 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, Sam Steingold. + +AC_DEFUN([gl_LIBSIGSEGV], +[ + AC_LIB_HAVE_LINKFLAGS([sigsegv], [], + [#include ], [sigsegv_deinstall_handler();], + [no, consider installing GNU libsigsegv]) + dnl Some other autoconf macros and clisp's configure use this variable. + gl_cv_lib_sigsegv="$ac_cv_libsigsegv" +]) diff -Nru grep-3.1/m4/libunistring-base.m4 grep-3.3/m4/libunistring-base.m4 --- grep-3.1/m4/libunistring-base.m4 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/m4/libunistring-base.m4 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ # libunistring-base.m4 serial 5 -dnl Copyright (C) 2010-2017 Free Software Foundation, Inc. +dnl Copyright (C) 2010-2018 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 -Nru grep-3.1/m4/limits-h.m4 grep-3.3/m4/limits-h.m4 --- grep-3.1/m4/limits-h.m4 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/m4/limits-h.m4 2018-09-19 05:04:26.000000000 +0000 @@ -1,6 +1,6 @@ dnl Check whether limits.h has needed features. -dnl Copyright 2016-2017 Free Software Foundation, Inc. +dnl Copyright 2016-2018 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,14 +11,18 @@ [ gl_CHECK_NEXT_HEADERS([limits.h]) - AC_CACHE_CHECK([whether limits.h has ULLONG_WIDTH etc.], + AC_CACHE_CHECK([whether limits.h has LLONG_MAX, WORD_BIT, 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;]])], + [AC_LANG_PROGRAM( + [[#ifndef __STDC_WANT_IEC_60559_BFP_EXT__ + #define __STDC_WANT_IEC_60559_BFP_EXT__ 1 + #endif + #include + long long llm = LLONG_MAX; + int wb = WORD_BIT; + 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 @@ -29,3 +33,11 @@ AC_SUBST([LIMITS_H]) AM_CONDITIONAL([GL_GENERATE_LIMITS_H], [test -n "$LIMITS_H"]) ]) + +dnl Unconditionally enables the replacement of . +AC_DEFUN([gl_REPLACE_LIMITS_H], +[ + AC_REQUIRE([gl_LIMITS_H]) + LIMITS_H='limits.h' + AM_CONDITIONAL([GL_GENERATE_LIMITS_H], [test -n "$LIMITS_H"]) +]) diff -Nru grep-3.1/m4/localcharset.m4 grep-3.3/m4/localcharset.m4 --- grep-3.1/m4/localcharset.m4 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/m4/localcharset.m4 2018-09-19 05:04:26.000000000 +0000 @@ -1,5 +1,5 @@ -# localcharset.m4 serial 7 -dnl Copyright (C) 2002, 2004, 2006, 2009-2017 Free Software Foundation, Inc. +# localcharset.m4 serial 8 +dnl Copyright (C) 2002, 2004, 2006, 2009-2018 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,10 +8,4 @@ [ dnl Prerequisites of lib/localcharset.c. AC_REQUIRE([AM_LANGINFO_CODESET]) - AC_REQUIRE([gl_FCNTL_O_FLAGS]) - AC_CHECK_DECLS_ONCE([getc_unlocked]) - - dnl Prerequisites of the lib/Makefile.am snippet. - AC_REQUIRE([AC_CANONICAL_HOST]) - AC_REQUIRE([gl_GLIBC21]) ]) diff -Nru grep-3.1/m4/localeconv.m4 grep-3.3/m4/localeconv.m4 --- grep-3.1/m4/localeconv.m4 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/m4/localeconv.m4 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ # localeconv.m4 serial 1 -dnl Copyright (C) 2012-2017 Free Software Foundation, Inc. +dnl Copyright (C) 2012-2018 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 -Nru grep-3.1/m4/locale-fr.m4 grep-3.3/m4/locale-fr.m4 --- grep-3.1/m4/locale-fr.m4 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/m4/locale-fr.m4 2018-06-24 23:16:49.000000000 +0000 @@ -1,5 +1,5 @@ -# locale-fr.m4 serial 17 -dnl Copyright (C) 2003, 2005-2017 Free Software Foundation, Inc. +# locale-fr.m4 serial 19 +dnl Copyright (C) 2003, 2005-2018 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. @@ -24,8 +24,14 @@ struct tm t; char buf[16]; int main () { + /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl + imitates locale dependent behaviour by looking at the environment + variables, and all locales use the UTF-8 encoding. */ +#if defined __BEOS__ || defined __HAIKU__ + return 1; +#else /* Check whether the given locale name is recognized by the system. */ -#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ +# if defined _WIN32 && !defined __CYGWIN__ /* On native Windows, setlocale(category, "") looks at the system settings, not at the environment variables. Also, when an encoding suffix such as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE @@ -33,9 +39,9 @@ if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0) return 1; -#else +# else if (setlocale (LC_ALL, "") == NULL) return 1; -#endif +# endif /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) is empty, and the behaviour of Tcl 8.4 in this locale is not useful. @@ -44,32 +50,33 @@ some unit tests fail. On MirBSD 10, when an unsupported locale is specified, setlocale() succeeds but then nl_langinfo(CODESET) is "UTF-8". */ -#if HAVE_LANGINFO_CODESET +# if HAVE_LANGINFO_CODESET { const char *cs = nl_langinfo (CODESET); if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0 || strcmp (cs, "UTF-8") == 0) return 1; } -#endif -#ifdef __CYGWIN__ +# endif +# ifdef __CYGWIN__ /* On Cygwin, avoid locale names without encoding suffix, because the locale_charset() function relies on the encoding suffix. Note that LC_ALL is set on the command line. */ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1; -#endif +# endif /* Check whether in the abbreviation of the second month, the second character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only one byte long. This excludes the UTF-8 encoding. */ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4; if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1; -#if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */ +# if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */ /* Check whether the decimal separator is a comma. On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point are nl_langinfo(RADIXCHAR) are both ".". */ if (localeconv () ->decimal_point[0] != ',') return 1; -#endif +# endif return 0; +#endif } changequote([,])dnl ])]) @@ -153,7 +160,7 @@ variables, and all locales use the UTF-8 encoding. */ #if !(defined __BEOS__ || defined __HAIKU__) /* Check whether the given locale name is recognized by the system. */ -# if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ +# if defined _WIN32 && !defined __CYGWIN__ /* On native Windows, setlocale(category, "") looks at the system settings, not at the environment variables. Also, when an encoding suffix such as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE diff -Nru grep-3.1/m4/locale_h.m4 grep-3.3/m4/locale_h.m4 --- grep-3.1/m4/locale_h.m4 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/m4/locale_h.m4 2018-12-15 18:14:26.000000000 +0000 @@ -1,5 +1,5 @@ -# locale_h.m4 serial 19 -dnl Copyright (C) 2007, 2009-2017 Free Software Foundation, Inc. +# locale_h.m4 serial 21 +dnl Copyright (C) 2007, 2009-2018 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,7 +17,7 @@ dnl If is replaced, then must also be replaced. AC_REQUIRE([gl_STDDEF_H]) - dnl Solaris 11 2011-11 defines the int_p_*, int_n_* members of 'struct lconv' + dnl Solaris 11.0 defines the int_p_*, int_n_* members of 'struct lconv' dnl only if _LCONV_C99 is defined. AC_REQUIRE([AC_CANONICAL_HOST]) case "$host_os" in @@ -96,7 +96,7 @@ # include #endif ]], - [setlocale duplocale]) + [setlocale newlocale duplocale freelocale]) ]) AC_DEFUN([gl_LOCALE_MODULE_INDICATOR], @@ -113,10 +113,15 @@ GNULIB_LOCALECONV=0; AC_SUBST([GNULIB_LOCALECONV]) GNULIB_SETLOCALE=0; AC_SUBST([GNULIB_SETLOCALE]) GNULIB_DUPLOCALE=0; AC_SUBST([GNULIB_DUPLOCALE]) + GNULIB_LOCALENAME=0; AC_SUBST([GNULIB_LOCALENAME]) dnl Assume proper GNU behavior unless another module says otherwise. + HAVE_NEWLOCALE=1; AC_SUBST([HAVE_NEWLOCALE]) HAVE_DUPLOCALE=1; AC_SUBST([HAVE_DUPLOCALE]) + HAVE_FREELOCALE=1; AC_SUBST([HAVE_FREELOCALE]) REPLACE_LOCALECONV=0; AC_SUBST([REPLACE_LOCALECONV]) REPLACE_SETLOCALE=0; AC_SUBST([REPLACE_SETLOCALE]) + REPLACE_NEWLOCALE=0; AC_SUBST([REPLACE_NEWLOCALE]) REPLACE_DUPLOCALE=0; AC_SUBST([REPLACE_DUPLOCALE]) + REPLACE_FREELOCALE=0; AC_SUBST([REPLACE_FREELOCALE]) REPLACE_STRUCT_LCONV=0; AC_SUBST([REPLACE_STRUCT_LCONV]) ]) diff -Nru grep-3.1/m4/locale-ja.m4 grep-3.3/m4/locale-ja.m4 --- grep-3.1/m4/locale-ja.m4 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/m4/locale-ja.m4 2018-06-24 23:16:49.000000000 +0000 @@ -1,5 +1,5 @@ -# locale-ja.m4 serial 12 -dnl Copyright (C) 2003, 2005-2017 Free Software Foundation, Inc. +# locale-ja.m4 serial 14 +dnl Copyright (C) 2003, 2005-2018 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. @@ -25,9 +25,14 @@ char buf[16]; int main () { - const char *p; + /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl + imitates locale dependent behaviour by looking at the environment + variables, and all locales use the UTF-8 encoding. */ +#if defined __BEOS__ || defined __HAIKU__ + return 1; +#else /* Check whether the given locale name is recognized by the system. */ -#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ +# if defined _WIN32 && !defined __CYGWIN__ /* On native Windows, setlocale(category, "") looks at the system settings, not at the environment variables. Also, when an encoding suffix such as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE @@ -35,9 +40,9 @@ if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0) return 1; -#else +# else if (setlocale (LC_ALL, "") == NULL) return 1; -#endif +# endif /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) is empty, and the behaviour of Tcl 8.4 in this locale is not useful. @@ -46,32 +51,36 @@ some unit tests fail. On MirBSD 10, when an unsupported locale is specified, setlocale() succeeds but then nl_langinfo(CODESET) is "UTF-8". */ -#if HAVE_LANGINFO_CODESET +# if HAVE_LANGINFO_CODESET { const char *cs = nl_langinfo (CODESET); if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0 || strcmp (cs, "UTF-8") == 0) return 1; } -#endif -#ifdef __CYGWIN__ +# endif +# ifdef __CYGWIN__ /* On Cygwin, avoid locale names without encoding suffix, because the locale_charset() function relies on the encoding suffix. Note that LC_ALL is set on the command line. */ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1; -#endif +# endif /* Check whether MB_CUR_MAX is > 1. This excludes the dysfunctional locales on Cygwin 1.5.x. */ if (MB_CUR_MAX == 1) return 1; /* Check whether in a month name, no byte in the range 0x80..0x9F occurs. This excludes the UTF-8 encoding (except on MirBSD). */ - t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4; - if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1; - for (p = buf; *p != '\0'; p++) - if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0) - return 1; + { + const char *p; + t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4; + if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1; + for (p = buf; *p != '\0'; p++) + if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0) + return 1; + } return 0; +#endif } changequote([,])dnl ])]) diff -Nru grep-3.1/m4/localename.m4 grep-3.3/m4/localename.m4 --- grep-3.1/m4/localename.m4 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/m4/localename.m4 2018-12-21 02:51:47.000000000 +0000 @@ -1,17 +1,30 @@ -# localename.m4 serial 2 -dnl Copyright (C) 2007, 2009-2017 Free Software Foundation, Inc. +# localename.m4 serial 5 +dnl Copyright (C) 2007, 2009-2018 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_LOCALENAME], [ + AC_REQUIRE([gl_LOCALE_H_DEFAULTS]) AC_REQUIRE([gt_LC_MESSAGES]) + AC_REQUIRE([gt_INTL_THREAD_LOCALE_NAME]) AC_REQUIRE([gt_INTL_MACOSX]) - AC_CHECK_FUNCS([setlocale uselocale]) - 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]) + AC_CHECK_HEADERS_ONCE([langinfo.h]) + AC_CHECK_FUNCS([setlocale]) + AC_CHECK_FUNCS_ONCE([newlocale duplocale freelocale]) + if test $ac_cv_func_newlocale != yes; then + HAVE_NEWLOCALE=0 + fi + if test $ac_cv_func_duplocale != yes; then + HAVE_DUPLOCALE=0 + fi + if test $ac_cv_func_freelocale != yes; then + HAVE_FREELOCALE=0 + fi + if test $gt_nameless_locales = yes; then + REPLACE_NEWLOCALE=1 + REPLACE_DUPLOCALE=1 + REPLACE_FREELOCALE=1 fi ]) diff -Nru grep-3.1/m4/locale-tr.m4 grep-3.3/m4/locale-tr.m4 --- grep-3.1/m4/locale-tr.m4 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/m4/locale-tr.m4 2018-06-24 23:16:49.000000000 +0000 @@ -1,5 +1,5 @@ -# locale-tr.m4 serial 10 -dnl Copyright (C) 2003, 2005-2017 Free Software Foundation, Inc. +# locale-tr.m4 serial 11 +dnl Copyright (C) 2003, 2005-2018 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,7 +30,7 @@ implement the Turkish upper-/lowercase mappings. Therefore, let this program return 1 on BeOS. */ /* Check whether the given locale name is recognized by the system. */ -#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ +#if defined _WIN32 && !defined __CYGWIN__ /* On native Windows, setlocale(category, "") looks at the system settings, not at the environment variables. Also, when an encoding suffix such as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE diff -Nru grep-3.1/m4/locale-zh.m4 grep-3.3/m4/locale-zh.m4 --- grep-3.1/m4/locale-zh.m4 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/m4/locale-zh.m4 2018-06-24 23:16:49.000000000 +0000 @@ -1,5 +1,5 @@ -# locale-zh.m4 serial 12 -dnl Copyright (C) 2003, 2005-2017 Free Software Foundation, Inc. +# locale-zh.m4 serial 14 +dnl Copyright (C) 2003, 2005-2018 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. @@ -26,9 +26,14 @@ char buf[16]; int main () { - const char *p; + /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl + imitates locale dependent behaviour by looking at the environment + variables, and all locales use the UTF-8 encoding. */ +#if defined __BEOS__ || defined __HAIKU__ + return 1; +#else /* Check whether the given locale name is recognized by the system. */ -#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ +# if defined _WIN32 && !defined __CYGWIN__ /* On native Windows, setlocale(category, "") looks at the system settings, not at the environment variables. Also, when an encoding suffix such as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE @@ -36,9 +41,9 @@ if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0) return 1; -#else +# else if (setlocale (LC_ALL, "") == NULL) return 1; -#endif +# endif /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) is empty, and the behaviour of Tcl 8.4 in this locale is not useful. @@ -47,32 +52,36 @@ some unit tests fail. On MirBSD 10, when an unsupported locale is specified, setlocale() succeeds but then nl_langinfo(CODESET) is "UTF-8". */ -#if HAVE_LANGINFO_CODESET +# if HAVE_LANGINFO_CODESET { const char *cs = nl_langinfo (CODESET); if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0 || strcmp (cs, "UTF-8") == 0) return 1; } -#endif -#ifdef __CYGWIN__ +# endif +# ifdef __CYGWIN__ /* On Cygwin, avoid locale names without encoding suffix, because the locale_charset() function relies on the encoding suffix. Note that LC_ALL is set on the command line. */ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1; -#endif +# endif /* Check whether in a month name, no byte in the range 0x80..0x9F occurs. This excludes the UTF-8 encoding (except on MirBSD). */ - t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4; - if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1; - for (p = buf; *p != '\0'; p++) - if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0) - return 1; + { + const char *p; + t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4; + if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1; + for (p = buf; *p != '\0'; p++) + if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0) + return 1; + } /* Check whether a typical GB18030 multibyte sequence is recognized as a single wide character. This excludes the GB2312 and GBK encodings. */ if (mblen ("\203\062\332\066", 5) != 4) return 1; return 0; +#endif } changequote([,])dnl ])]) diff -Nru grep-3.1/m4/localtime-buffer.m4 grep-3.3/m4/localtime-buffer.m4 --- grep-3.1/m4/localtime-buffer.m4 1970-01-01 00:00:00.000000000 +0000 +++ grep-3.3/m4/localtime-buffer.m4 2018-01-07 00:07:08.000000000 +0000 @@ -0,0 +1,21 @@ +# localtime-buffer.m4 serial 1 +dnl Copyright (C) 2017-2018 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 -Nru grep-3.1/m4/lock.m4 grep-3.3/m4/lock.m4 --- grep-3.1/m4/lock.m4 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/m4/lock.m4 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ # lock.m4 serial 14 -dnl Copyright (C) 2005-2017 Free Software Foundation, Inc. +dnl Copyright (C) 2005-2018 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 -Nru grep-3.1/m4/longlong.m4 grep-3.3/m4/longlong.m4 --- grep-3.1/m4/longlong.m4 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/m4/longlong.m4 2018-12-21 02:51:47.000000000 +0000 @@ -1,14 +1,15 @@ -# longlong.m4 serial 17 -dnl Copyright (C) 1999-2007, 2009-2017 Free Software Foundation, Inc. +# longlong.m4 serial 18 +dnl Copyright (C) 1999-2007, 2009-2018 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.62]) + # Define HAVE_LONG_LONG_INT if 'long long int' works. -# This fixes a bug in Autoconf 2.61, and can be faster -# than what's in Autoconf 2.62 through 2.68. +# This can be faster than what's in Autoconf 2.62 through 2.68. # Note: If the type 'long long int' exists but is only 32 bits large # (as on some very old compilers), HAVE_LONG_LONG_INT will not be @@ -56,8 +57,7 @@ ]) # Define HAVE_UNSIGNED_LONG_LONG_INT if 'unsigned long long int' works. -# This fixes a bug in Autoconf 2.61, and can be faster -# than what's in Autoconf 2.62 through 2.68. +# This can be faster than what's in Autoconf 2.62 through 2.68. # Note: If the type 'unsigned long long int' exists but is only 32 bits # large (as on some very old compilers), AC_TYPE_UNSIGNED_LONG_LONG_INT diff -Nru grep-3.1/m4/lseek.m4 grep-3.3/m4/lseek.m4 --- grep-3.1/m4/lseek.m4 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/m4/lseek.m4 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ # lseek.m4 serial 10 -dnl Copyright (C) 2007, 2009-2017 Free Software Foundation, Inc. +dnl Copyright (C) 2007, 2009-2018 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 -Nru grep-3.1/m4/lstat.m4 grep-3.3/m4/lstat.m4 --- grep-3.1/m4/lstat.m4 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/m4/lstat.m4 2018-09-19 05:04:26.000000000 +0000 @@ -1,6 +1,6 @@ -# serial 27 +# serial 32 -# Copyright (C) 1997-2001, 2003-2017 Free Software Foundation, Inc. +# Copyright (C) 1997-2001, 2003-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -10,14 +10,15 @@ AC_DEFUN([gl_FUNC_LSTAT], [ + AC_REQUIRE([AC_CANONICAL_HOST]) AC_REQUIRE([gl_SYS_STAT_H_DEFAULTS]) dnl If lstat does not exist, the replacement does dnl "#define lstat stat", and lstat.c is a no-op. AC_CHECK_FUNCS_ONCE([lstat]) if test $ac_cv_func_lstat = yes; then AC_REQUIRE([gl_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK]) - case "$gl_cv_func_lstat_dereferences_slashed_symlink" in - *no) + case $host_os,$gl_cv_func_lstat_dereferences_slashed_symlink in + solaris* | *no) REPLACE_LSTAT=1 ;; esac @@ -33,6 +34,7 @@ [ dnl We don't use AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK any more, because it dnl is no longer maintained in Autoconf and because it invokes AC_LIBOBJ. + AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_CACHE_CHECK([whether lstat correctly handles trailing slash], [gl_cv_func_lstat_dereferences_slashed_symlink], [rm -f conftest.sym conftest.file @@ -51,9 +53,15 @@ [gl_cv_func_lstat_dereferences_slashed_symlink=yes], [gl_cv_func_lstat_dereferences_slashed_symlink=no], [case "$host_os" in - *-gnu*) + linux-* | linux) + # Guess yes on Linux systems. + gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;; + *-gnu* | gnu*) # Guess yes on glibc systems. gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;; + mingw*) + # Guess no on native Windows. + gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;; *) # If we don't know, assume the worst. gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;; diff -Nru grep-3.1/m4/malloca.m4 grep-3.3/m4/malloca.m4 --- grep-3.1/m4/malloca.m4 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/m4/malloca.m4 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ # malloca.m4 serial 1 -dnl Copyright (C) 2003-2004, 2006-2007, 2009-2017 Free Software Foundation, +dnl Copyright (C) 2003-2004, 2006-2007, 2009-2018 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 -Nru grep-3.1/m4/malloc.m4 grep-3.3/m4/malloc.m4 --- grep-3.1/m4/malloc.m4 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/m4/malloc.m4 2018-06-24 23:16:49.000000000 +0000 @@ -1,5 +1,5 @@ -# malloc.m4 serial 15 -dnl Copyright (C) 2007, 2009-2017 Free Software Foundation, Inc. +# malloc.m4 serial 17 +dnl Copyright (C) 2007, 2009-2018 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,7 +7,7 @@ m4_version_prereq([2.70], [] ,[ # This is adapted with modifications from upstream Autoconf here: -# http://git.savannah.gnu.org/cgit/autoconf.git/commit/?id=04be2b7a29d65d9a08e64e8e56e594c91749598c +# https://git.savannah.gnu.org/cgit/autoconf.git/commit/?id=04be2b7a29d65d9a08e64e8e56e594c91749598c AC_DEFUN([_AC_FUNC_MALLOC_IF], [ AC_REQUIRE([AC_HEADER_STDC])dnl @@ -32,7 +32,7 @@ [ac_cv_func_malloc_0_nonnull=no], [case "$host_os" in # Guess yes on platforms where we know the result. - *-gnu* | freebsd* | netbsd* | openbsd* \ + *-gnu* | gnu* | freebsd* | netbsd* | openbsd* \ | hpux* | solaris* | cygwin* | mingw*) ac_cv_func_malloc_0_nonnull=yes ;; # If we don't know, assume the worst. @@ -91,7 +91,7 @@ AC_COMPILE_IFELSE( [AC_LANG_PROGRAM( [[]], - [[#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ + [[#if defined _WIN32 && ! defined __CYGWIN__ choke me #endif ]])], diff -Nru grep-3.1/m4/manywarnings.m4 grep-3.3/m4/manywarnings.m4 --- grep-3.1/m4/manywarnings.m4 2017-05-21 00:31:28.000000000 +0000 +++ grep-3.3/m4/manywarnings.m4 2018-12-15 18:14:26.000000000 +0000 @@ -1,5 +1,5 @@ -# manywarnings.m4 serial 8 -dnl Copyright (C) 2008-2017 Free Software Foundation, Inc. +# manywarnings.m4 serial 17 +dnl Copyright (C) 2008-2018 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. @@ -33,8 +33,17 @@ # Add all documented GCC warning parameters to variable VARIABLE. # Note that you need to test them using gl_WARN_ADD if you want to # make sure your gcc understands it. +# +# The effects of this macro depend on the current language (_AC_LANG). AC_DEFUN([gl_MANYWARN_ALL_GCC], +[_AC_LANG_DISPATCH([$0], _AC_LANG, $@)]) + +# Specialization for _AC_LANG = C. +# Use of m4_defun rather than AC_DEFUN works around a bug in autoconf < 2.63b. +m4_defun([gl_MANYWARN_ALL_GCC(C)], [ + AC_LANG_PUSH([C]) + dnl First, check for some issues that only occur when combining multiple dnl gcc warning categories. AC_REQUIRE([AC_PROG_CC]) @@ -42,54 +51,53 @@ dnl Check if -W -Werror -Wno-missing-field-initializers is supported dnl with the current $CC $CFLAGS $CPPFLAGS. - AC_MSG_CHECKING([whether -Wno-missing-field-initializers is supported]) - AC_CACHE_VAL([gl_cv_cc_nomfi_supported], [ - gl_save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -W -Werror -Wno-missing-field-initializers" - AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM([[]], [[]])], - [gl_cv_cc_nomfi_supported=yes], - [gl_cv_cc_nomfi_supported=no]) - CFLAGS="$gl_save_CFLAGS"]) - AC_MSG_RESULT([$gl_cv_cc_nomfi_supported]) + AC_CACHE_CHECK([whether -Wno-missing-field-initializers is supported], + [gl_cv_cc_nomfi_supported], + [gl_save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -W -Werror -Wno-missing-field-initializers" + AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM([[]], [[]])], + [gl_cv_cc_nomfi_supported=yes], + [gl_cv_cc_nomfi_supported=no]) + CFLAGS="$gl_save_CFLAGS" + ]) if test "$gl_cv_cc_nomfi_supported" = yes; then dnl Now check whether -Wno-missing-field-initializers is needed dnl for the { 0, } construct. - AC_MSG_CHECKING([whether -Wno-missing-field-initializers is needed]) - AC_CACHE_VAL([gl_cv_cc_nomfi_needed], [ - gl_save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -W -Werror" - AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM( - [[int f (void) - { - typedef struct { int a; int b; } s_t; - s_t s1 = { 0, }; - return s1.b; - } - ]], - [[]])], - [gl_cv_cc_nomfi_needed=no], - [gl_cv_cc_nomfi_needed=yes]) - CFLAGS="$gl_save_CFLAGS" - ]) - AC_MSG_RESULT([$gl_cv_cc_nomfi_needed]) + AC_CACHE_CHECK([whether -Wno-missing-field-initializers is needed], + [gl_cv_cc_nomfi_needed], + [gl_save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -W -Werror" + AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [[int f (void) + { + typedef struct { int a; int b; } s_t; + s_t s1 = { 0, }; + return s1.b; + } + ]], + [[]])], + [gl_cv_cc_nomfi_needed=no], + [gl_cv_cc_nomfi_needed=yes]) + CFLAGS="$gl_save_CFLAGS" + ]) fi dnl Next, check if -Werror -Wuninitialized is useful with the dnl user's choice of $CFLAGS; some versions of gcc warn that it dnl has no effect if -O is not also used - AC_MSG_CHECKING([whether -Wuninitialized is supported]) - AC_CACHE_VAL([gl_cv_cc_uninitialized_supported], [ - gl_save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -Werror -Wuninitialized" - AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM([[]], [[]])], - [gl_cv_cc_uninitialized_supported=yes], - [gl_cv_cc_uninitialized_supported=no]) - CFLAGS="$gl_save_CFLAGS"]) - AC_MSG_RESULT([$gl_cv_cc_uninitialized_supported]) + AC_CACHE_CHECK([whether -Wuninitialized is supported], + [gl_cv_cc_uninitialized_supported], + [gl_save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -Werror -Wuninitialized" + AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM([[]], [[]])], + [gl_cv_cc_uninitialized_supported=yes], + [gl_cv_cc_uninitialized_supported=no]) + CFLAGS="$gl_save_CFLAGS" + ]) fi @@ -97,18 +105,17 @@ # To compare this list to your installed GCC's, run this Bash command: # # comm -3 \ - # <(sed -n 's/^ *\(-[^ ]*\) .*/\1/p' manywarnings.m4 | sort) \ - # <(gcc --help=warnings | sed -n 's/^ \(-[^ ]*\) .*/\1/p' | sort | - # grep -v -x -F -f <( - # awk '/^[^#]/ {print $1}' ../build-aux/gcc-warning.spec)) + # <((sed -n 's/^ *\(-[^ 0-9][^ ]*\) .*/\1/p' manywarnings.m4; \ + # awk '/^[^#]/ {print $1}' ../build-aux/gcc-warning.spec) | sort) \ + # <(LC_ALL=C gcc --help=warnings | sed -n 's/^ \(-[^ ]*\) .*/\1/p' | sort) gl_manywarn_set= for gl_manywarn_item in -fno-common \ -W \ - -Wabi \ -Waddress \ -Waggressive-loop-optimizations \ -Wall \ + -Wattribute-alias \ -Wattributes \ -Wbad-function-cast \ -Wbool-compare \ @@ -116,8 +123,9 @@ -Wbuiltin-declaration-mismatch \ -Wbuiltin-macro-redefined \ -Wcast-align \ + -Wcast-align=strict \ + -Wcast-function-type \ -Wchar-subscripts \ - -Wchkp \ -Wclobbered \ -Wcomment \ -Wcomments \ @@ -151,6 +159,7 @@ -Wframe-address \ -Wfree-nonheap-object \ -Whsa \ + -Wif-not-aligned \ -Wignored-attributes \ -Wignored-qualifiers \ -Wimplicit \ @@ -164,7 +173,6 @@ -Wint-to-pointer-cast \ -Winvalid-memory-model \ -Winvalid-pch \ - -Wjump-misses-init \ -Wlogical-not-parentheses \ -Wlogical-op \ -Wmain \ @@ -172,6 +180,7 @@ -Wmemset-elt-size \ -Wmemset-transposed-args \ -Wmisleading-indentation \ + -Wmissing-attributes \ -Wmissing-braces \ -Wmissing-declarations \ -Wmissing-field-initializers \ @@ -179,6 +188,7 @@ -Wmissing-parameter-type \ -Wmissing-prototypes \ -Wmultichar \ + -Wmultistatement-macros \ -Wnarrowing \ -Wnested-externs \ -Wnonnull \ @@ -193,6 +203,7 @@ -Woverride-init \ -Wpacked \ -Wpacked-bitfield-compat \ + -Wpacked-not-aligned \ -Wparentheses \ -Wpointer-arith \ -Wpointer-compare \ @@ -210,20 +221,23 @@ -Wshift-count-overflow \ -Wshift-negative-value \ -Wsizeof-array-argument \ + -Wsizeof-pointer-div \ -Wsizeof-pointer-memaccess \ -Wstack-protector \ -Wstrict-aliasing \ -Wstrict-overflow \ -Wstrict-prototypes \ + -Wstringop-truncation \ + -Wsuggest-attribute=cold \ -Wsuggest-attribute=const \ -Wsuggest-attribute=format \ + -Wsuggest-attribute=malloc \ -Wsuggest-attribute=noreturn \ -Wsuggest-attribute=pure \ -Wsuggest-final-methods \ -Wsuggest-final-types \ -Wswitch \ -Wswitch-bool \ - -Wswitch-default \ -Wswitch-unreachable \ -Wsync-nand \ -Wsystem-headers \ @@ -258,9 +272,25 @@ # gcc --help=warnings outputs an unusual form for these options; list # them here so that the above 'comm' command doesn't report a false match. - # Would prefer "min (PTRDIFF_MAX, SIZE_MAX)", but it must be a literal: - ptrdiff_max_max=9223372036854775807 - gl_manywarn_set="$gl_manywarn_set -Walloc-size-larger-than=$ptrdiff_max_max" + # Would prefer "min (PTRDIFF_MAX, SIZE_MAX)", but it must be a literal. + # Also, AC_COMPUTE_INT requires it to fit in a long; it is 2**63 on + # the only platforms where it does not fit in a long, so make that + # a special case. + AC_MSG_CHECKING([max safe object size]) + AC_COMPUTE_INT([gl_alloc_max], + [LONG_MAX < (PTRDIFF_MAX < (size_t) -1 ? PTRDIFF_MAX : (size_t) -1) + ? -1 + : PTRDIFF_MAX < (size_t) -1 ? (long) PTRDIFF_MAX : (long) (size_t) -1], + [[#include + #include + #include + ]], + [gl_alloc_max=2147483647]) + case $gl_alloc_max in + -1) gl_alloc_max=9223372036854775807;; + esac + AC_MSG_RESULT([$gl_alloc_max]) + gl_manywarn_set="$gl_manywarn_set -Walloc-size-larger-than=$gl_alloc_max" gl_manywarn_set="$gl_manywarn_set -Warray-bounds=2" gl_manywarn_set="$gl_manywarn_set -Wformat-overflow=2" gl_manywarn_set="$gl_manywarn_set -Wformat-truncation=2" @@ -292,4 +322,13 @@ fi $1=$gl_manywarn_set + + AC_LANG_POP([C]) +]) + +# Specialization for _AC_LANG = C++. +# Use of m4_defun rather than AC_DEFUN works around a bug in autoconf < 2.63b. +m4_defun([gl_MANYWARN_ALL_GCC(C++)], +[ + gl_MANYWARN_ALL_GCC_CXX_IMPL([$1]) ]) diff -Nru grep-3.1/m4/mbchar.m4 grep-3.3/m4/mbchar.m4 --- grep-3.1/m4/mbchar.m4 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/m4/mbchar.m4 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ # mbchar.m4 serial 9 -dnl Copyright (C) 2005-2007, 2009-2017 Free Software Foundation, Inc. +dnl Copyright (C) 2005-2007, 2009-2018 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 -Nru grep-3.1/m4/mbiter.m4 grep-3.3/m4/mbiter.m4 --- grep-3.1/m4/mbiter.m4 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/m4/mbiter.m4 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ # mbiter.m4 serial 7 -dnl Copyright (C) 2005, 2008-2017 Free Software Foundation, Inc. +dnl Copyright (C) 2005, 2008-2018 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 -Nru grep-3.1/m4/mbrlen.m4 grep-3.3/m4/mbrlen.m4 --- grep-3.1/m4/mbrlen.m4 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/m4/mbrlen.m4 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ -# mbrlen.m4 serial 9 -*- coding: utf-8 -*- -dnl Copyright (C) 2008, 2010-2017 Free Software Foundation, Inc. +# mbrlen.m4 serial 10 -*- coding: utf-8 -*- +dnl Copyright (C) 2008, 2010-2018 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. @@ -240,10 +240,9 @@ dnl is present. changequote(,)dnl case "$host_os" in - # Guess no on AIX and glibc systems. - aix* | *-gnu*) - gl_cv_func_mbrlen_empty_input="guessing no" ;; - *) gl_cv_func_mbrlen_empty_input="guessing yes" ;; + # Guess no on AIX and glibc systems. + aix* | *-gnu* | gnu*) gl_cv_func_mbrlen_empty_input="guessing no" ;; + *) gl_cv_func_mbrlen_empty_input="guessing yes" ;; esac changequote([,])dnl AC_RUN_IFELSE( diff -Nru grep-3.1/m4/mbrtowc.m4 grep-3.3/m4/mbrtowc.m4 --- grep-3.1/m4/mbrtowc.m4 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/m4/mbrtowc.m4 2018-09-19 05:04:26.000000000 +0000 @@ -1,5 +1,5 @@ -# mbrtowc.m4 serial 27 -*- coding: utf-8 -*- -dnl Copyright (C) 2001-2002, 2004-2005, 2008-2017 Free Software Foundation, +# mbrtowc.m4 serial 31 -*- coding: utf-8 -*- +dnl Copyright (C) 2001-2002, 2004-2005, 2008-2018 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, @@ -563,10 +563,11 @@ dnl is present. changequote(,)dnl case "$host_os" in - # Guess no on AIX and glibc systems. - aix* | *-gnu*) - gl_cv_func_mbrtowc_empty_input="guessing no" ;; - *) gl_cv_func_mbrtowc_empty_input="guessing yes" ;; + # Guess no on AIX and glibc systems. + aix* | *-gnu* | gnu*) gl_cv_func_mbrtowc_empty_input="guessing no" ;; + # Guess yes on native Windows. + mingw*) gl_cv_func_mbrtowc_empty_input="guessing yes" ;; + *) gl_cv_func_mbrtowc_empty_input="guessing yes" ;; esac changequote([,])dnl AC_RUN_IFELSE( @@ -592,6 +593,7 @@ AC_DEFUN([gl_MBRTOWC_C_LOCALE], [ + AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_CACHE_CHECK([whether the C locale is free of encoding errors], [gl_cv_C_locale_sans_EILSEQ], [ @@ -622,11 +624,17 @@ ]])], [gl_cv_C_locale_sans_EILSEQ=yes], [gl_cv_C_locale_sans_EILSEQ=no], - [:])]) + [case "$host_os" in + # Guess yes on native Windows. + mingw*) gl_cv_C_locale_sans_EILSEQ="guessing yes" ;; + esac + ]) + ]) ]) # Prerequisites of lib/mbrtowc.c. AC_DEFUN([gl_PREREQ_MBRTOWC], [ + AC_REQUIRE([AC_C_INLINE]) : ]) @@ -639,7 +647,7 @@ [ dnl Same as AC_FUNC_MBRTOWC in autoconf-2.60. AC_CACHE_CHECK([whether mbrtowc and mbstate_t are properly declared], - gl_cv_func_mbrtowc, + [gl_cv_func_mbrtowc], [AC_LINK_IFELSE( [AC_LANG_PROGRAM( [[/* Tru64 with Desktop Toolkit C has a bug: must be @@ -655,8 +663,8 @@ size_t n = 1; mbstate_t state; return ! (sizeof state && (mbrtowc) (&wc, s, n, &state));]])], - gl_cv_func_mbrtowc=yes, - gl_cv_func_mbrtowc=no)]) + [gl_cv_func_mbrtowc=yes], + [gl_cv_func_mbrtowc=no])]) if test $gl_cv_func_mbrtowc = yes; then AC_DEFINE([HAVE_MBRTOWC], [1], [Define to 1 if mbrtowc and mbstate_t are properly declared.]) diff -Nru grep-3.1/m4/mbsinit.m4 grep-3.3/m4/mbsinit.m4 --- grep-3.1/m4/mbsinit.m4 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/m4/mbsinit.m4 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ # mbsinit.m4 serial 8 -dnl Copyright (C) 2008, 2010-2017 Free Software Foundation, Inc. +dnl Copyright (C) 2008, 2010-2018 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 -Nru grep-3.1/m4/mbslen.m4 grep-3.3/m4/mbslen.m4 --- grep-3.1/m4/mbslen.m4 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/m4/mbslen.m4 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ # mbslen.m4 serial 2 -dnl Copyright (C) 2010-2017 Free Software Foundation, Inc. +dnl Copyright (C) 2010-2018 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 -Nru grep-3.1/m4/mbsrtowcs.m4 grep-3.3/m4/mbsrtowcs.m4 --- grep-3.1/m4/mbsrtowcs.m4 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/m4/mbsrtowcs.m4 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ # mbsrtowcs.m4 serial 13 -dnl Copyright (C) 2008-2017 Free Software Foundation, Inc. +dnl Copyright (C) 2008-2018 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 -Nru grep-3.1/m4/mbstate_t.m4 grep-3.3/m4/mbstate_t.m4 --- grep-3.1/m4/mbstate_t.m4 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/m4/mbstate_t.m4 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ # mbstate_t.m4 serial 13 -dnl Copyright (C) 2000-2002, 2008-2017 Free Software Foundation, Inc. +dnl Copyright (C) 2000-2002, 2008-2018 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 -Nru grep-3.1/m4/mbtowc.m4 grep-3.3/m4/mbtowc.m4 --- grep-3.1/m4/mbtowc.m4 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/m4/mbtowc.m4 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ # mbtowc.m4 serial 2 -dnl Copyright (C) 2011-2017 Free Software Foundation, Inc. +dnl Copyright (C) 2011-2018 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 -Nru grep-3.1/m4/memchr.m4 grep-3.3/m4/memchr.m4 --- grep-3.1/m4/memchr.m4 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/m4/memchr.m4 2018-01-07 00:07:08.000000000 +0000 @@ -1,11 +1,13 @@ -# memchr.m4 serial 12 -dnl Copyright (C) 2002-2004, 2009-2017 Free Software Foundation, Inc. +# memchr.m4 serial 13 +dnl Copyright (C) 2002-2004, 2009-2018 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_ONCE([gl_FUNC_MEMCHR], [ + AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles + dnl Check for prerequisites for memory fence checks. gl_FUNC_MMAP_ANON AC_CHECK_HEADERS_ONCE([sys/mman.h]) @@ -23,10 +25,10 @@ if test $HAVE_MEMCHR = 1; then # Detect platform-specific bugs in some versions of glibc: # memchr should not dereference anything with length 0 - # http://bugzilla.redhat.com/499689 + # https://bugzilla.redhat.com/show_bug.cgi?id=499689 # memchr should not dereference overestimated length after a match - # http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=521737 - # http://sourceware.org/bugzilla/show_bug.cgi?id=10162 + # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=521737 + # https://sourceware.org/bugzilla/show_bug.cgi?id=10162 # Assume that memchr works on platforms that lack mprotect. AC_CACHE_CHECK([whether memchr works], [gl_cv_func_memchr_works], [AC_RUN_IFELSE([AC_LANG_PROGRAM([[ @@ -73,12 +75,21 @@ result |= 4; } return result; -]])], [gl_cv_func_memchr_works=yes], [gl_cv_func_memchr_works=no], - [dnl Be pessimistic for now. - gl_cv_func_memchr_works="guessing no"])]) - if test "$gl_cv_func_memchr_works" != yes; then - REPLACE_MEMCHR=1 - fi +]])], + [gl_cv_func_memchr_works=yes], + [gl_cv_func_memchr_works=no], + [case "$host_os" in + # Guess yes on native Windows. + mingw*) gl_cv_func_memchr_works="guessing yes" ;; + # Be pessimistic for now. + *) gl_cv_func_memchr_works="guessing no" ;; + esac + ]) + ]) + case "$gl_cv_func_memchr_works" in + *yes) ;; + *) REPLACE_MEMCHR=1 ;; + esac fi ]) diff -Nru grep-3.1/m4/mempcpy.m4 grep-3.3/m4/mempcpy.m4 --- grep-3.1/m4/mempcpy.m4 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/m4/mempcpy.m4 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ # mempcpy.m4 serial 11 -dnl Copyright (C) 2003-2004, 2006-2007, 2009-2017 Free Software Foundation, +dnl Copyright (C) 2003-2004, 2006-2007, 2009-2018 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 -Nru grep-3.1/m4/memrchr.m4 grep-3.3/m4/memrchr.m4 --- grep-3.1/m4/memrchr.m4 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/m4/memrchr.m4 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ # memrchr.m4 serial 10 -dnl Copyright (C) 2002-2003, 2005-2007, 2009-2017 Free Software Foundation, +dnl Copyright (C) 2002-2003, 2005-2007, 2009-2018 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 -Nru grep-3.1/m4/minmax.m4 grep-3.3/m4/minmax.m4 --- grep-3.1/m4/minmax.m4 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/m4/minmax.m4 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ # minmax.m4 serial 4 -dnl Copyright (C) 2005, 2009-2017 Free Software Foundation, Inc. +dnl Copyright (C) 2005, 2009-2018 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 -Nru grep-3.1/m4/mmap-anon.m4 grep-3.3/m4/mmap-anon.m4 --- grep-3.1/m4/mmap-anon.m4 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/m4/mmap-anon.m4 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ # mmap-anon.m4 serial 10 -dnl Copyright (C) 2005, 2007, 2009-2017 Free Software Foundation, Inc. +dnl Copyright (C) 2005, 2007, 2009-2018 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 -Nru grep-3.1/m4/mode_t.m4 grep-3.3/m4/mode_t.m4 --- grep-3.1/m4/mode_t.m4 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/m4/mode_t.m4 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ # mode_t.m4 serial 2 -dnl Copyright (C) 2009-2017 Free Software Foundation, Inc. +dnl Copyright (C) 2009-2018 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 -Nru grep-3.1/m4/msvc-inval.m4 grep-3.3/m4/msvc-inval.m4 --- grep-3.1/m4/msvc-inval.m4 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/m4/msvc-inval.m4 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ # msvc-inval.m4 serial 1 -dnl Copyright (C) 2011-2017 Free Software Foundation, Inc. +dnl Copyright (C) 2011-2018 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 -Nru grep-3.1/m4/msvc-nothrow.m4 grep-3.3/m4/msvc-nothrow.m4 --- grep-3.1/m4/msvc-nothrow.m4 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/m4/msvc-nothrow.m4 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ # msvc-nothrow.m4 serial 1 -dnl Copyright (C) 2011-2017 Free Software Foundation, Inc. +dnl Copyright (C) 2011-2018 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 -Nru grep-3.1/m4/multiarch.m4 grep-3.3/m4/multiarch.m4 --- grep-3.1/m4/multiarch.m4 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/m4/multiarch.m4 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ # multiarch.m4 serial 7 -dnl Copyright (C) 2008-2017 Free Software Foundation, Inc. +dnl Copyright (C) 2008-2018 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 -Nru grep-3.1/m4/nanosleep.m4 grep-3.3/m4/nanosleep.m4 --- grep-3.1/m4/nanosleep.m4 1970-01-01 00:00:00.000000000 +0000 +++ grep-3.3/m4/nanosleep.m4 2018-09-19 05:04:26.000000000 +0000 @@ -0,0 +1,161 @@ +# serial 38 + +dnl From Jim Meyering. +dnl Check for the nanosleep function. +dnl If not found, use the supplied replacement. +dnl + +# Copyright (C) 1999-2001, 2003-2018 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. + +AC_DEFUN([gl_FUNC_NANOSLEEP], +[ + AC_REQUIRE([gl_HEADER_TIME_H_DEFAULTS]) + AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles + + dnl Persuade glibc and Solaris to declare nanosleep. + AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) + + AC_CHECK_HEADERS_ONCE([sys/time.h]) + AC_REQUIRE([gl_FUNC_SELECT]) + + AC_CHECK_DECLS_ONCE([alarm]) + + nanosleep_save_libs=$LIBS + + # Solaris 2.5.1 needs -lposix4 to get the nanosleep function. + # Solaris 7 prefers the library name -lrt to the obsolescent name -lposix4. + LIB_NANOSLEEP= + AC_SUBST([LIB_NANOSLEEP]) + AC_SEARCH_LIBS([nanosleep], [rt posix4], + [test "$ac_cv_search_nanosleep" = "none required" || + LIB_NANOSLEEP=$ac_cv_search_nanosleep]) + if test "x$ac_cv_search_nanosleep" != xno; then + dnl The system has a nanosleep function. + + AC_REQUIRE([gl_MULTIARCH]) + if test $APPLE_UNIVERSAL_BUILD = 1; then + # A universal build on Apple Mac OS X platforms. + # The test result would be 'no (mishandles large arguments)' in 64-bit + # mode but 'yes' in 32-bit mode. But we need a configuration result that + # is valid in both modes. + gl_cv_func_nanosleep='no (mishandles large arguments)' + fi + + AC_CACHE_CHECK([for working nanosleep], + [gl_cv_func_nanosleep], + [ + AC_RUN_IFELSE( + [AC_LANG_SOURCE([[ + #include + #include + #include + #if HAVE_SYS_TIME_H + #include + #endif + #include + #include + #define TYPE_SIGNED(t) (! ((t) 0 < (t) -1)) + #define TYPE_MAXIMUM(t) \ + ((t) (! TYPE_SIGNED (t) \ + ? (t) -1 \ + : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1))) + + #if HAVE_DECL_ALARM + static void + check_for_SIGALRM (int sig) + { + if (sig != SIGALRM) + _exit (1); + } + #endif + + int + main () + { + static struct timespec ts_sleep; + static struct timespec ts_remaining; + /* Test for major problems first. */ + if (! nanosleep) + return 2; + ts_sleep.tv_sec = 0; + ts_sleep.tv_nsec = 1; + #if HAVE_DECL_ALARM + { + static struct sigaction act; + act.sa_handler = check_for_SIGALRM; + sigemptyset (&act.sa_mask); + sigaction (SIGALRM, &act, NULL); + alarm (1); + if (nanosleep (&ts_sleep, NULL) != 0) + return 3; + /* Test for a minor problem: the handling of large arguments. */ + ts_sleep.tv_sec = TYPE_MAXIMUM (time_t); + ts_sleep.tv_nsec = 999999999; + alarm (1); + if (nanosleep (&ts_sleep, &ts_remaining) != -1) + return 4; + if (errno != EINTR) + return 5; + if (ts_remaining.tv_sec <= TYPE_MAXIMUM (time_t) - 10) + return 6; + } + #else /* A simpler test for native Windows. */ + if (nanosleep (&ts_sleep, &ts_remaining) < 0) + return 3; + #endif + return 0; + }]])], + [gl_cv_func_nanosleep=yes], + [case $? in dnl ( + 4|5|6) gl_cv_func_nanosleep='no (mishandles large arguments)';; dnl ( + *) gl_cv_func_nanosleep=no;; + esac], + [case "$host_os" in dnl (( + linux*) # Guess it halfway works when the kernel is Linux. + gl_cv_func_nanosleep='guessing no (mishandles large arguments)' ;; + mingw*) # Guess no on native Windows. + gl_cv_func_nanosleep='guessing no' ;; + *) # If we don't know, assume the worst. + gl_cv_func_nanosleep='guessing no' ;; + esac + ]) + ]) + case "$gl_cv_func_nanosleep" in + *yes) + REPLACE_NANOSLEEP=0 + ;; + *) + REPLACE_NANOSLEEP=1 + case "$gl_cv_func_nanosleep" in + *"mishandles large arguments"*) + AC_DEFINE([HAVE_BUG_BIG_NANOSLEEP], [1], + [Define to 1 if nanosleep mishandles large arguments.]) + ;; + *) + # The replacement uses select(). Add $LIBSOCKET to $LIB_NANOSLEEP. + for ac_lib in $LIBSOCKET; do + case " $LIB_NANOSLEEP " in + *" $ac_lib "*) ;; + *) LIB_NANOSLEEP="$LIB_NANOSLEEP $ac_lib";; + esac + done + ;; + esac + ;; + esac + else + HAVE_NANOSLEEP=0 + fi + LIBS=$nanosleep_save_libs +]) + +# Prerequisites of lib/nanosleep.c. +AC_DEFUN([gl_PREREQ_NANOSLEEP], +[ + AC_CHECK_HEADERS_ONCE([sys/select.h]) + gl_PREREQ_SIG_HANDLER_H +]) diff -Nru grep-3.1/m4/netinet_in_h.m4 grep-3.3/m4/netinet_in_h.m4 --- grep-3.1/m4/netinet_in_h.m4 1970-01-01 00:00:00.000000000 +0000 +++ grep-3.3/m4/netinet_in_h.m4 2018-01-07 00:07:08.000000000 +0000 @@ -0,0 +1,31 @@ +# netinet_in_h.m4 serial 5 +dnl Copyright (C) 2006-2018 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_HEADER_NETINET_IN], +[ + AC_CACHE_CHECK([whether is self-contained], + [gl_cv_header_netinet_in_h_selfcontained], + [ + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], [[]])], + [gl_cv_header_netinet_in_h_selfcontained=yes], + [gl_cv_header_netinet_in_h_selfcontained=no]) + ]) + if test $gl_cv_header_netinet_in_h_selfcontained = yes; then + NETINET_IN_H='' + else + NETINET_IN_H='netinet/in.h' + AC_CHECK_HEADERS([netinet/in.h]) + gl_CHECK_NEXT_HEADERS([netinet/in.h]) + if test $ac_cv_header_netinet_in_h = yes; then + HAVE_NETINET_IN_H=1 + else + HAVE_NETINET_IN_H=0 + fi + AC_SUBST([HAVE_NETINET_IN_H]) + fi + AC_SUBST([NETINET_IN_H]) + AM_CONDITIONAL([GL_GENERATE_NETINET_IN_H], [test -n "$NETINET_IN_H"]) +]) diff -Nru grep-3.1/m4/nl_langinfo.m4 grep-3.3/m4/nl_langinfo.m4 --- grep-3.1/m4/nl_langinfo.m4 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/m4/nl_langinfo.m4 2018-02-26 06:09:46.000000000 +0000 @@ -1,5 +1,5 @@ -# nl_langinfo.m4 serial 5 -dnl Copyright (C) 2009-2017 Free Software Foundation, Inc. +# nl_langinfo.m4 serial 6 +dnl Copyright (C) 2009-2018 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. @@ -36,8 +36,11 @@ AC_DEFINE_UNQUOTED([FUNC_NL_LANGINFO_YESEXPR_WORKS], [$FUNC_NL_LANGINFO_YESEXPR_WORKS], [Define to 1 if nl_langinfo (YESEXPR) returns a non-empty string.]) - if test $HAVE_LANGINFO_CODESET = 1 && test $HAVE_LANGINFO_ERA = 1 \ - && test $FUNC_NL_LANGINFO_YESEXPR_WORKS = 1; then + if test $HAVE_LANGINFO_CODESET = 1 \ + && test $HAVE_LANGINFO_T_FMT_AMPM = 1 \ + && test $HAVE_LANGINFO_ALTMON = 1 \ + && test $HAVE_LANGINFO_ERA = 1 \ + && test $FUNC_NL_LANGINFO_YESEXPR_WORKS = 1; then : else REPLACE_NL_LANGINFO=1 diff -Nru grep-3.1/m4/nocrash.m4 grep-3.3/m4/nocrash.m4 --- grep-3.1/m4/nocrash.m4 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/m4/nocrash.m4 2018-06-24 23:16:49.000000000 +0000 @@ -1,5 +1,5 @@ -# nocrash.m4 serial 4 -dnl Copyright (C) 2005, 2009-2017 Free Software Foundation, Inc. +# nocrash.m4 serial 5 +dnl Copyright (C) 2005, 2009-2018 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. @@ -79,7 +79,7 @@ } } } -#elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +#elif defined _WIN32 && ! defined __CYGWIN__ /* Avoid a crash on native Windows. */ #define WIN32_LEAN_AND_MEAN #include diff -Nru grep-3.1/m4/obstack.m4 grep-3.3/m4/obstack.m4 --- grep-3.1/m4/obstack.m4 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/m4/obstack.m4 2018-01-07 00:07:08.000000000 +0000 @@ -1,6 +1,6 @@ # See if we need to provide obstacks. -dnl Copyright 1996-2017 Free Software Foundation, Inc. +dnl Copyright 1996-2018 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 -Nru grep-3.1/m4/off_t.m4 grep-3.3/m4/off_t.m4 --- grep-3.1/m4/off_t.m4 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/m4/off_t.m4 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ # off_t.m4 serial 1 -dnl Copyright (C) 2012-2017 Free Software Foundation, Inc. +dnl Copyright (C) 2012-2018 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 -Nru grep-3.1/m4/onceonly.m4 grep-3.3/m4/onceonly.m4 --- grep-3.1/m4/onceonly.m4 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/m4/onceonly.m4 1970-01-01 00:00:00.000000000 +0000 @@ -1,104 +0,0 @@ -# onceonly.m4 serial 9 -dnl Copyright (C) 2002-2003, 2005-2006, 2008-2017 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 -Nru grep-3.1/m4/openat.m4 grep-3.3/m4/openat.m4 --- grep-3.1/m4/openat.m4 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/m4/openat.m4 2018-01-07 00:07:08.000000000 +0000 @@ -1,7 +1,7 @@ -# serial 45 +# serial 46 # See if we need to use our replacement for Solaris' openat et al functions. -dnl Copyright (C) 2004-2017 Free Software Foundation, Inc. +dnl Copyright (C) 2004-2018 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. @@ -14,10 +14,12 @@ AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) AC_CHECK_FUNCS_ONCE([openat]) AC_REQUIRE([gl_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK]) - case $ac_cv_func_openat+$gl_cv_func_lstat_dereferences_slashed_symlink in - yes+*yes) + AC_REQUIRE([gl_PREPROC_O_CLOEXEC]) + case $ac_cv_func_openat+$gl_cv_func_lstat_dereferences_slashed_symlink+$gl_cv_macro_O_CLOEXEC in + yes+*yes+yes) ;; yes+*) + # Solaris 10 lacks O_CLOEXEC. # Solaris 9 has *at functions, but uniformly mishandles trailing # slash in all of them. REPLACE_OPENAT=1 diff -Nru grep-3.1/m4/open-cloexec.m4 grep-3.3/m4/open-cloexec.m4 --- grep-3.1/m4/open-cloexec.m4 1970-01-01 00:00:00.000000000 +0000 +++ grep-3.3/m4/open-cloexec.m4 2018-01-07 00:07:08.000000000 +0000 @@ -0,0 +1,21 @@ +# Test whether O_CLOEXEC is defined. + +dnl Copyright 2017-2018 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_PREPROC_O_CLOEXEC], +[ + AC_CACHE_CHECK([for O_CLOEXEC], + [gl_cv_macro_O_CLOEXEC], + [AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM([[#include + #ifndef O_CLOEXEC + choke me; + #endif + ]], + [[return O_CLOEXEC;]])], + [gl_cv_macro_O_CLOEXEC=yes], + [gl_cv_macro_O_CLOEXEC=no])]) +]) diff -Nru grep-3.1/m4/opendir.m4 grep-3.3/m4/opendir.m4 --- grep-3.1/m4/opendir.m4 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/m4/opendir.m4 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ -# opendir.m4 serial 4 -dnl Copyright (C) 2011-2017 Free Software Foundation, Inc. +# opendir.m4 serial 5 +dnl Copyright (C) 2011-2018 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_OPENDIR], [ AC_REQUIRE([gl_DIRENT_H_DEFAULTS]) + AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_CHECK_FUNCS([opendir]) if test $ac_cv_func_opendir = no; then diff -Nru grep-3.1/m4/open.m4 grep-3.3/m4/open.m4 --- grep-3.1/m4/open.m4 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/m4/open.m4 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ -# open.m4 serial 14 -dnl Copyright (C) 2007-2017 Free Software Foundation, Inc. +# open.m4 serial 15 +dnl Copyright (C) 2007-2018 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_OPEN], [ AC_REQUIRE([AC_CANONICAL_HOST]) + AC_REQUIRE([gl_PREPROC_O_CLOEXEC]) case "$host_os" in mingw* | pw*) REPLACE_OPEN=1 @@ -15,6 +16,9 @@ dnl open("foo/") should not create a file when the file name has a dnl trailing slash. FreeBSD only has the problem on symlinks. AC_CHECK_FUNCS_ONCE([lstat]) + if test "$gl_cv_macro_O_CLOEXEC" != yes; then + REPLACE_OPEN=1 + fi AC_CACHE_CHECK([whether open recognizes a trailing slash], [gl_cv_func_open_slash], [# Assume that if we have lstat, we can also check symlinks. diff -Nru grep-3.1/m4/pathmax.m4 grep-3.3/m4/pathmax.m4 --- grep-3.1/m4/pathmax.m4 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/m4/pathmax.m4 2018-06-24 23:16:49.000000000 +0000 @@ -1,5 +1,5 @@ -# pathmax.m4 serial 10 -dnl Copyright (C) 2002-2003, 2005-2006, 2009-2017 Free Software Foundation, +# pathmax.m4 serial 11 +dnl Copyright (C) 2002-2003, 2005-2006, 2009-2018 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, @@ -29,7 +29,7 @@ # undef PATH_MAX # define PATH_MAX 1024 #endif -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +#if defined _WIN32 && ! defined __CYGWIN__ # undef PATH_MAX # define PATH_MAX 260 #endif diff -Nru grep-3.1/m4/pcre.m4 grep-3.3/m4/pcre.m4 --- grep-3.1/m4/pcre.m4 2017-01-01 11:34:33.000000000 +0000 +++ grep-3.3/m4/pcre.m4 2018-01-07 00:09:11.000000000 +0000 @@ -1,6 +1,6 @@ # pcre.m4 - check for libpcre support -# Copyright (C) 2010-2017 Free Software Foundation, Inc. +# Copyright (C) 2010-2018 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 -Nru grep-3.1/m4/perl.m4 grep-3.3/m4/perl.m4 --- grep-3.1/m4/perl.m4 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/m4/perl.m4 2018-01-07 00:07:08.000000000 +0000 @@ -3,7 +3,7 @@ dnl From Jim Meyering. dnl Find a new-enough version of Perl. -# Copyright (C) 1998-2001, 2003-2004, 2007, 2009-2017 Free Software Foundation, +# Copyright (C) 1998-2001, 2003-2004, 2007, 2009-2018 Free Software Foundation, # Inc. # # This file is free software; the Free Software Foundation diff -Nru grep-3.1/m4/perror.m4 grep-3.3/m4/perror.m4 --- grep-3.1/m4/perror.m4 1970-01-01 00:00:00.000000000 +0000 +++ grep-3.3/m4/perror.m4 2018-01-07 00:07:08.000000000 +0000 @@ -0,0 +1,69 @@ +# perror.m4 serial 7 +dnl Copyright (C) 2008-2018 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_PERROR], +[ + AC_REQUIRE([gl_STDIO_H_DEFAULTS]) + AC_REQUIRE([gl_HEADER_ERRNO_H]) + AC_REQUIRE([gl_FUNC_STRERROR_R]) + AC_REQUIRE([gl_FUNC_STRERROR_0]) + AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles + dnl We intentionally do not check for the broader REPLACE_STRERROR_R, + dnl since on glibc systems, strerror_r is replaced only for signature + dnl issues, and perror is just fine. Rather, we only want to + dnl replace perror if strerror_r was replaced for a content fix. + if test "$ERRNO_H:$REPLACE_STRERROR_0" != :0; then + dnl The system's perror() cannot know about the new errno values we add + dnl to , or any fix for strerror(0). Replace it. + REPLACE_PERROR=1 + fi + case ${gl_cv_func_strerror_r_works-unset} in + unset|*yes) + AC_CACHE_CHECK([whether perror matches strerror], + [gl_cv_func_perror_works], + [AC_RUN_IFELSE( + [AC_LANG_PROGRAM( + [[#include + #include + #include + #include + ]], + [[char *str = strerror (-1); + if (!getenv("CONFTEST_OUTPUT")) return 0; + if (!str) str = ""; + puts (str); + errno = -1; + perror (""); + return 0; + ]])], + [if CONFTEST_OUTPUT=1 ./conftest$EXEEXT >conftest.txt1 2>conftest.txt2 \ + && cmp conftest.txt1 conftest.txt2 >/dev/null; then + gl_cv_func_perror_works=yes + else + gl_cv_func_perror_works=no + fi + rm -rf conftest.txt1 conftest.txt2], + [gl_cv_func_perror_works=no], + [case "$host_os" in + # Guess yes on native Windows. + mingw*) gl_cv_func_perror_works="guessing yes" ;; + # Otherwise guess no. + *) gl_cv_func_perror_works="guessing no" ;; + esac + ]) + ]) + case "$gl_cv_func_perror_works" in + *yes) ;; + *) REPLACE_PERROR=1 ;; + esac + ;; + *) + dnl The system's perror() probably inherits the bugs in the + dnl system's strerror_r(). Replace it. + REPLACE_PERROR=1 + ;; + esac +]) diff -Nru grep-3.1/m4/pipe.m4 grep-3.3/m4/pipe.m4 --- grep-3.1/m4/pipe.m4 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/m4/pipe.m4 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ # pipe.m4 serial 2 -dnl Copyright (C) 2010-2017 Free Software Foundation, Inc. +dnl Copyright (C) 2010-2018 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 -Nru grep-3.1/m4/printf.m4 grep-3.3/m4/printf.m4 --- grep-3.1/m4/printf.m4 2017-05-14 01:09:51.000000000 +0000 +++ grep-3.3/m4/printf.m4 2018-12-15 18:14:26.000000000 +0000 @@ -1,5 +1,5 @@ -# printf.m4 serial 53 -dnl Copyright (C) 2003, 2007-2017 Free Software Foundation, Inc. +# printf.m4 serial 59 +dnl Copyright (C) 2003, 2007-2018 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. @@ -58,10 +58,10 @@ [gl_cv_func_printf_sizes_c99=yes], [gl_cv_func_printf_sizes_c99=no], [ -changequote(,)dnl case "$host_os" in +changequote(,)dnl # Guess yes on glibc systems. - *-gnu*) gl_cv_func_printf_sizes_c99="guessing yes";; + *-gnu* | gnu*) gl_cv_func_printf_sizes_c99="guessing yes";; # Guess yes on FreeBSD >= 5. freebsd[1-4].*) gl_cv_func_printf_sizes_c99="guessing no";; freebsd* | kfreebsd*) gl_cv_func_printf_sizes_c99="guessing yes";; @@ -79,10 +79,19 @@ netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*) gl_cv_func_printf_sizes_c99="guessing no";; netbsd*) gl_cv_func_printf_sizes_c99="guessing yes";; +changequote([,])dnl + # Guess yes on MSVC, no on mingw. + mingw*) AC_EGREP_CPP([Known], [ +#ifdef _MSC_VER + Known +#endif + ], + [gl_cv_func_printf_sizes_c99="guessing yes"], + [gl_cv_func_printf_sizes_c99="guessing no"]) + ;; # If we don't know, assume the worst. *) gl_cv_func_printf_sizes_c99="guessing no";; esac -changequote([,])dnl ]) ]) ]) @@ -122,14 +131,19 @@ }]])], [gl_cv_func_printf_long_double=yes], [gl_cv_func_printf_long_double=no], - [ -changequote(,)dnl - case "$host_os" in - beos*) gl_cv_func_printf_long_double="guessing no";; - mingw* | pw*) gl_cv_func_printf_long_double="guessing no";; - *) gl_cv_func_printf_long_double="guessing yes";; + [case "$host_os" in + beos*) gl_cv_func_printf_long_double="guessing no";; + # Guess yes on MSVC, no on mingw. + mingw*) AC_EGREP_CPP([Known], [ +#ifdef _MSC_VER + Known +#endif + ], + [gl_cv_func_printf_long_double="guessing yes"], + [gl_cv_func_printf_long_double="guessing no"]) + ;; + *) gl_cv_func_printf_long_double="guessing yes";; esac -changequote([,])dnl ]) ]) ]) @@ -217,10 +231,10 @@ [gl_cv_func_printf_infinite=yes], [gl_cv_func_printf_infinite=no], [ -changequote(,)dnl case "$host_os" in +changequote(,)dnl # Guess yes on glibc systems. - *-gnu*) gl_cv_func_printf_infinite="guessing yes";; + *-gnu* | gnu*) gl_cv_func_printf_infinite="guessing yes";; # Guess yes on FreeBSD >= 6. freebsd[1-5].*) gl_cv_func_printf_infinite="guessing no";; freebsd* | kfreebsd*) gl_cv_func_printf_infinite="guessing yes";; @@ -236,10 +250,19 @@ netbsd*) gl_cv_func_printf_infinite="guessing yes";; # Guess yes on BeOS. beos*) gl_cv_func_printf_infinite="guessing yes";; +changequote([,])dnl + # Guess yes on MSVC, no on mingw. + mingw*) AC_EGREP_CPP([Known], [ +#ifdef _MSC_VER + Known +#endif + ], + [gl_cv_func_printf_infinite="guessing yes"], + [gl_cv_func_printf_infinite="guessing no"]) + ;; # If we don't know, assume the worst. *) gl_cv_func_printf_infinite="guessing no";; esac -changequote([,])dnl ]) ]) ]) @@ -419,27 +442,35 @@ }]])], [gl_cv_func_printf_infinite_long_double=yes], [gl_cv_func_printf_infinite_long_double=no], - [ -changequote(,)dnl - case "$host_cpu" in + [case "$host_cpu" in # Guess no on ia64, x86_64, i386. ia64 | x86_64 | i*86) gl_cv_func_printf_infinite_long_double="guessing no";; *) case "$host_os" in +changequote(,)dnl # Guess yes on glibc systems. - *-gnu*) gl_cv_func_printf_infinite_long_double="guessing yes";; + *-gnu* | gnu*) gl_cv_func_printf_infinite_long_double="guessing yes";; # Guess yes on FreeBSD >= 6. freebsd[1-5].*) gl_cv_func_printf_infinite_long_double="guessing no";; freebsd* | kfreebsd*) gl_cv_func_printf_infinite_long_double="guessing yes";; # Guess yes on HP-UX >= 11. hpux[7-9]* | hpux10*) gl_cv_func_printf_infinite_long_double="guessing no";; hpux*) gl_cv_func_printf_infinite_long_double="guessing yes";; +changequote([,])dnl + # Guess yes on MSVC, no on mingw. + mingw*) AC_EGREP_CPP([Known], [ +#ifdef _MSC_VER + Known +#endif + ], + [gl_cv_func_printf_infinite_long_double="guessing yes"], + [gl_cv_func_printf_infinite_long_double="guessing no"]) + ;; # If we don't know, assume the worst. *) gl_cv_func_printf_infinite_long_double="guessing no";; esac ;; esac -changequote([,])dnl ]) ]) ;; @@ -497,7 +528,7 @@ && 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 || buf[0] == '0') result |= 8; @@ -509,7 +540,7 @@ && strcmp (buf, "0x8.0p-2") != 0)) result |= 16; /* This catches the same Mac OS X 10.3.9 (Darwin 7.9) bug and also a - glibc 2.4 bug . */ + glibc 2.4 bug . */ if (sprintf (buf, "%.1La", 1.999L) < 0 || (strcmp (buf, "0x1.0p+1") != 0 && strcmp (buf, "0x2.0p+0") != 0 @@ -523,7 +554,7 @@ [ case "$host_os" in # Guess yes on glibc >= 2.5 systems. - *-gnu*) + *-gnu* | gnu*) AC_EGREP_CPP([BZ2908], [ #include #ifdef __GNU_LIBRARY__ @@ -535,6 +566,8 @@ [gl_cv_func_printf_directive_a="guessing yes"], [gl_cv_func_printf_directive_a="guessing no"]) ;; + # Guess no on native Windows. + mingw*) gl_cv_func_printf_directive_a="guessing no";; # If we don't know, assume the worst. *) gl_cv_func_printf_directive_a="guessing no";; esac @@ -577,10 +610,10 @@ [gl_cv_func_printf_directive_f=yes], [gl_cv_func_printf_directive_f=no], [ -changequote(,)dnl case "$host_os" in +changequote(,)dnl # Guess yes on glibc systems. - *-gnu*) gl_cv_func_printf_directive_f="guessing yes";; + *-gnu* | gnu*) gl_cv_func_printf_directive_f="guessing yes";; # Guess yes on FreeBSD >= 6. freebsd[1-5].*) gl_cv_func_printf_directive_f="guessing no";; freebsd* | kfreebsd*) gl_cv_func_printf_directive_f="guessing yes";; @@ -588,12 +621,21 @@ darwin[1-6].*) gl_cv_func_printf_directive_f="guessing no";; darwin*) gl_cv_func_printf_directive_f="guessing yes";; # Guess yes on Solaris >= 2.10. - solaris2.[1-9][0-9]*) gl_cv_func_printf_sizes_c99="guessing yes";; - solaris*) gl_cv_func_printf_sizes_c99="guessing no";; + solaris2.[1-9][0-9]*) gl_cv_func_printf_directive_f="guessing yes";; + solaris*) gl_cv_func_printf_directive_f="guessing no";; +changequote([,])dnl + # Guess yes on MSVC, no on mingw. + mingw*) AC_EGREP_CPP([Known], [ +#ifdef _MSC_VER + Known +#endif + ], + [gl_cv_func_printf_directive_f="guessing yes"], + [gl_cv_func_printf_directive_f="guessing no"]) + ;; # If we don't know, assume the worst. *) gl_cv_func_printf_directive_f="guessing no";; esac -changequote([,])dnl ]) ]) ]) @@ -645,13 +687,11 @@ }]])], [gl_cv_func_printf_directive_n=yes], [gl_cv_func_printf_directive_n=no], - [ -changequote(,)dnl - case "$host_os" in + [case "$host_os" in + # Guess no on native Windows. mingw*) gl_cv_func_printf_directive_n="guessing no";; *) gl_cv_func_printf_directive_n="guessing yes";; esac -changequote([,])dnl ]) ]) ]) @@ -726,12 +766,14 @@ [ changequote(,)dnl case "$host_os" in - openbsd*) gl_cv_func_printf_directive_ls="guessing no";; - irix*) gl_cv_func_printf_directive_ls="guessing no";; - solaris*) gl_cv_func_printf_directive_ls="guessing no";; - cygwin*) gl_cv_func_printf_directive_ls="guessing no";; - beos* | haiku*) gl_cv_func_printf_directive_ls="guessing no";; - *) gl_cv_func_printf_directive_ls="guessing yes";; + openbsd*) gl_cv_func_printf_directive_ls="guessing no";; + irix*) gl_cv_func_printf_directive_ls="guessing no";; + solaris*) gl_cv_func_printf_directive_ls="guessing no";; + cygwin*) gl_cv_func_printf_directive_ls="guessing no";; + beos* | haiku*) gl_cv_func_printf_directive_ls="guessing no";; + # Guess yes on native Windows. + mingw*) gl_cv_func_printf_directive_ls="guessing yes";; + *) gl_cv_func_printf_directive_ls="guessing yes";; esac changequote([,])dnl ]) @@ -770,6 +812,7 @@ netbsd[1-3]* | netbsdelf[1-3]* | netbsdaout[1-3]* | netbsdcoff[1-3]*) gl_cv_func_printf_positions="guessing no";; beos*) gl_cv_func_printf_positions="guessing no";; + # Guess no on native Windows. mingw* | pw*) gl_cv_func_printf_positions="guessing no";; *) gl_cv_func_printf_positions="guessing yes";; esac @@ -808,6 +851,7 @@ case "$host_os" in cygwin*) gl_cv_func_printf_flag_grouping="guessing no";; netbsd*) gl_cv_func_printf_flag_grouping="guessing no";; + # Guess no on native Windows. mingw* | pw*) gl_cv_func_printf_flag_grouping="guessing no";; *) gl_cv_func_printf_flag_grouping="guessing yes";; esac @@ -818,7 +862,7 @@ dnl Test whether the *printf family of functions supports the - flag correctly. dnl (ISO C99.) See -dnl +dnl dnl Result is gl_cv_func_printf_flag_leftadjust. AC_DEFUN([gl_PRINTF_FLAG_LEFTADJUST], @@ -850,6 +894,8 @@ hpux11*) gl_cv_func_printf_flag_leftadjust="guessing yes";; # Guess no on HP-UX 10 and older. hpux*) gl_cv_func_printf_flag_leftadjust="guessing no";; + # Guess yes on native Windows. + mingw*) gl_cv_func_printf_flag_leftadjust="guessing yes";; # Guess yes otherwise. *) gl_cv_func_printf_flag_leftadjust="guessing yes";; esac @@ -860,7 +906,7 @@ dnl Test whether the *printf family of functions supports padding of non-finite dnl values with the 0 flag correctly. (ISO C99 + TC1 + TC2.) See -dnl +dnl dnl Result is gl_cv_func_printf_flag_zero. AC_DEFUN([gl_PRINTF_FLAG_ZERO], @@ -889,12 +935,14 @@ [ changequote(,)dnl case "$host_os" in - # Guess yes on glibc systems. - *-gnu*) gl_cv_func_printf_flag_zero="guessing yes";; - # Guess yes on BeOS. - beos*) gl_cv_func_printf_flag_zero="guessing yes";; - # If we don't know, assume the worst. - *) gl_cv_func_printf_flag_zero="guessing no";; + # Guess yes on glibc systems. + *-gnu* | gnu*) gl_cv_func_printf_flag_zero="guessing yes";; + # Guess yes on BeOS. + beos*) gl_cv_func_printf_flag_zero="guessing yes";; + # Guess no on native Windows. + mingw*) gl_cv_func_printf_flag_zero="guessing no";; + # If we don't know, assume the worst. + *) gl_cv_func_printf_flag_zero="guessing no";; esac changequote([,])dnl ]) @@ -1047,28 +1095,28 @@ if test "$gl_cv_func_printf_enomem" = "guessing no"; then changequote(,)dnl case "$host_os" in - # Guess yes on glibc systems. - *-gnu*) gl_cv_func_printf_enomem="guessing yes";; - # Guess yes on Solaris. - solaris*) gl_cv_func_printf_enomem="guessing yes";; - # Guess yes on AIX. - aix*) gl_cv_func_printf_enomem="guessing yes";; - # Guess yes on HP-UX/hppa. - hpux*) case "$host_cpu" in - hppa*) gl_cv_func_printf_enomem="guessing yes";; - *) gl_cv_func_printf_enomem="guessing no";; - esac - ;; - # Guess yes on IRIX. - irix*) gl_cv_func_printf_enomem="guessing yes";; - # Guess yes on OSF/1. - osf*) gl_cv_func_printf_enomem="guessing yes";; - # Guess yes on BeOS. - beos*) gl_cv_func_printf_enomem="guessing yes";; - # Guess yes on Haiku. - haiku*) gl_cv_func_printf_enomem="guessing yes";; - # If we don't know, assume the worst. - *) gl_cv_func_printf_enomem="guessing no";; + # Guess yes on glibc systems. + *-gnu* | gnu*) gl_cv_func_printf_enomem="guessing yes";; + # Guess yes on Solaris. + solaris*) gl_cv_func_printf_enomem="guessing yes";; + # Guess yes on AIX. + aix*) gl_cv_func_printf_enomem="guessing yes";; + # Guess yes on HP-UX/hppa. + hpux*) case "$host_cpu" in + hppa*) gl_cv_func_printf_enomem="guessing yes";; + *) gl_cv_func_printf_enomem="guessing no";; + esac + ;; + # Guess yes on IRIX. + irix*) gl_cv_func_printf_enomem="guessing yes";; + # Guess yes on OSF/1. + osf*) gl_cv_func_printf_enomem="guessing yes";; + # Guess yes on BeOS. + beos*) gl_cv_func_printf_enomem="guessing yes";; + # Guess yes on Haiku. + haiku*) gl_cv_func_printf_enomem="guessing yes";; + # If we don't know, assume the worst. + *) gl_cv_func_printf_enomem="guessing no";; esac changequote([,])dnl fi @@ -1128,7 +1176,7 @@ changequote(,)dnl case "$host_os" in # Guess yes on glibc systems. - *-gnu*) gl_cv_func_snprintf_truncation_c99="guessing yes";; + *-gnu* | gnu*) gl_cv_func_snprintf_truncation_c99="guessing yes";; # Guess yes on FreeBSD >= 5. freebsd[1-4].*) gl_cv_func_snprintf_truncation_c99="guessing no";; freebsd* | kfreebsd*) gl_cv_func_snprintf_truncation_c99="guessing yes";; @@ -1160,6 +1208,8 @@ netbsd*) gl_cv_func_snprintf_truncation_c99="guessing yes";; # Guess yes on BeOS. beos*) gl_cv_func_snprintf_truncation_c99="guessing yes";; + # Guess no on native Windows. + mingw*) gl_cv_func_snprintf_truncation_c99="guessing no";; # If we don't know, assume the worst. *) gl_cv_func_snprintf_truncation_c99="guessing no";; esac @@ -1223,11 +1273,10 @@ }]])], [gl_cv_func_snprintf_retval_c99=yes], [gl_cv_func_snprintf_retval_c99=no], - [ + [case "$host_os" in changequote(,)dnl - case "$host_os" in # Guess yes on glibc systems. - *-gnu*) gl_cv_func_snprintf_retval_c99="guessing yes";; + *-gnu* | gnu*) gl_cv_func_snprintf_retval_c99="guessing yes";; # Guess yes on FreeBSD >= 5. freebsd[1-4].*) gl_cv_func_snprintf_retval_c99="guessing no";; freebsd* | kfreebsd*) gl_cv_func_snprintf_retval_c99="guessing yes";; @@ -1250,10 +1299,19 @@ netbsd*) gl_cv_func_snprintf_retval_c99="guessing yes";; # Guess yes on BeOS. beos*) gl_cv_func_snprintf_retval_c99="guessing yes";; +changequote([,])dnl + # Guess yes on MSVC, no on mingw. + mingw*) AC_EGREP_CPP([Known], [ +#ifdef _MSC_VER + Known +#endif + ], + [gl_cv_func_snprintf_retval_c99="guessing yes"], + [gl_cv_func_snprintf_retval_c99="guessing no"]) + ;; # If we don't know, assume the worst. *) gl_cv_func_snprintf_retval_c99="guessing no";; esac -changequote([,])dnl ]) ]) ]) @@ -1308,7 +1366,7 @@ changequote(,)dnl case "$host_os" in # Guess yes on glibc systems. - *-gnu*) gl_cv_func_snprintf_directive_n="guessing yes";; + *-gnu* | gnu*) gl_cv_func_snprintf_directive_n="guessing yes";; # Guess yes on FreeBSD >= 5. freebsd[1-4].*) gl_cv_func_snprintf_directive_n="guessing no";; freebsd* | kfreebsd*) gl_cv_func_snprintf_directive_n="guessing yes";; @@ -1333,6 +1391,8 @@ netbsd*) gl_cv_func_snprintf_directive_n="guessing yes";; # Guess yes on BeOS. beos*) gl_cv_func_snprintf_directive_n="guessing yes";; + # Guess no on native Windows. + mingw*) gl_cv_func_snprintf_directive_n="guessing no";; # If we don't know, assume the worst. *) gl_cv_func_snprintf_directive_n="guessing no";; esac @@ -1349,6 +1409,7 @@ AC_DEFUN([gl_SNPRINTF_SIZE1], [ AC_REQUIRE([AC_PROG_CC]) + AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_REQUIRE([gl_SNPRINTF_PRESENCE]) AC_CACHE_CHECK([whether snprintf respects a size of 1], [gl_cv_func_snprintf_size1], @@ -1378,7 +1439,12 @@ }]])], [gl_cv_func_snprintf_size1=yes], [gl_cv_func_snprintf_size1=no], - [gl_cv_func_snprintf_size1="guessing yes"]) + [case "$host_os" in + # Guess yes on native Windows. + mingw*) gl_cv_func_snprintf_size1="guessing yes" ;; + *) gl_cv_func_snprintf_size1="guessing yes" ;; + esac + ]) ]) ]) @@ -1450,7 +1516,7 @@ changequote(,)dnl case "$host_os" in # Guess yes on glibc systems. - *-gnu*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";; + *-gnu* | gnu*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";; # Guess yes on FreeBSD >= 5. freebsd[1-4].*) gl_cv_func_vsnprintf_zerosize_c99="guessing no";; freebsd* | kfreebsd*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";; @@ -1474,7 +1540,7 @@ netbsd*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";; # Guess yes on BeOS. beos*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";; - # Guess yes on mingw. + # Guess yes on native Windows. mingw* | pw*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";; # If we don't know, assume the worst. *) gl_cv_func_vsnprintf_zerosize_c99="guessing no";; @@ -1540,7 +1606,9 @@ dnl Cygwin 1.7.0 (2009) . . . # . . . ? . . . . . ? . . . . . . dnl Cygwin 1.5.25 (2008) . . . # # . . # . . . . . # . . . . . . dnl Cygwin 1.5.19 (2006) # . . # # # . # . # . # # # . . . . . . -dnl Solaris 11 2011-11 . . # # # . . # . . . # . . . . . . . . +dnl Solaris 11.4 . . # # # . . # . . . # . . . . . . . . +dnl Solaris 11.3 . . . . # . . # . . . . . . . . . . . . +dnl Solaris 11.0 . . # # # . . # . . . # . . . . . . . . dnl Solaris 10 . . # # # . . # . . . # # . . . . . . . dnl Solaris 2.6 ... 9 # . # # # # . # . . . # # . . . # . . . dnl Solaris 2.5.1 # . # # # # . # . . . # . . # # # # # # diff -Nru grep-3.1/m4/pthread_rwlock_rdlock.m4 grep-3.3/m4/pthread_rwlock_rdlock.m4 --- grep-3.1/m4/pthread_rwlock_rdlock.m4 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/m4/pthread_rwlock_rdlock.m4 2018-09-19 05:04:26.000000000 +0000 @@ -1,5 +1,5 @@ -# pthread_rwlock_rdlock.m4 serial 1 -dnl Copyright (C) 2017 Free Software Foundation, Inc. +# pthread_rwlock_rdlock.m4 serial 2 +dnl Copyright (C) 2017-2018 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. @@ -23,12 +23,14 @@ 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 POSIX:2017 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 but this test verifies the guarantee regardless of TPS and regardless of dnl scheduling policy. +dnl Glibc currently does not provide this guarantee, see +dnl https://sourceware.org/bugzilla/show_bug.cgi?id=13701 AC_DEFUN([gl_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER], [ AC_REQUIRE([gl_THREADLIB_EARLY]) diff -Nru grep-3.1/m4/putenv.m4 grep-3.3/m4/putenv.m4 --- grep-3.1/m4/putenv.m4 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/m4/putenv.m4 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ -# putenv.m4 serial 20 -dnl Copyright (C) 2002-2017 Free Software Foundation, Inc. +# putenv.m4 serial 22 +dnl Copyright (C) 2002-2018 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. @@ -34,10 +34,12 @@ gl_cv_func_svid_putenv=no, dnl When crosscompiling, assume putenv is broken. [case "$host_os" in - # Guess yes on glibc systems. - *-gnu*) gl_cv_func_svid_putenv="guessing yes" ;; - # If we don't know, assume the worst. - *) gl_cv_func_svid_putenv="guessing no" ;; + # Guess yes on glibc systems. + *-gnu* | gnu*) gl_cv_func_svid_putenv="guessing yes" ;; + # Guess no on native Windows. + mingw*) gl_cv_func_svid_putenv="guessing no" ;; + # If we don't know, assume the worst. + *) gl_cv_func_svid_putenv="guessing no" ;; esac ]) ]) diff -Nru grep-3.1/m4/quotearg.m4 grep-3.3/m4/quotearg.m4 --- grep-3.1/m4/quotearg.m4 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/m4/quotearg.m4 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ # quotearg.m4 serial 9 -dnl Copyright (C) 2002, 2004-2017 Free Software Foundation, Inc. +dnl Copyright (C) 2002, 2004-2018 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 -Nru grep-3.1/m4/quote.m4 grep-3.3/m4/quote.m4 --- grep-3.1/m4/quote.m4 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/m4/quote.m4 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ # quote.m4 serial 6 -dnl Copyright (C) 2002-2003, 2005-2006, 2009-2017 Free Software Foundation, +dnl Copyright (C) 2002-2003, 2005-2006, 2009-2018 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 -Nru grep-3.1/m4/raise.m4 grep-3.3/m4/raise.m4 --- grep-3.1/m4/raise.m4 1970-01-01 00:00:00.000000000 +0000 +++ grep-3.3/m4/raise.m4 2018-01-07 00:07:08.000000000 +0000 @@ -0,0 +1,36 @@ +# raise.m4 serial 4 +dnl Copyright (C) 2011-2018 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_RAISE], +[ + AC_REQUIRE([gl_SIGNAL_H_DEFAULTS]) + AC_REQUIRE([AC_CANONICAL_HOST]) + AC_CHECK_FUNCS([raise]) + if test $ac_cv_func_raise = no; then + HAVE_RAISE=0 + else + m4_ifdef([gl_MSVC_INVAL], [ + AC_REQUIRE([gl_MSVC_INVAL]) + if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then + REPLACE_RAISE=1 + fi + ]) + m4_ifdef([gl_SIGNALBLOCKING], [ + gl_SIGNALBLOCKING + if test $HAVE_POSIX_SIGNALBLOCKING = 0; then + m4_ifdef([gl_SIGNAL_SIGPIPE], [ + gl_SIGNAL_SIGPIPE + if test $gl_cv_header_signal_h_SIGPIPE != yes; then + REPLACE_RAISE=1 + fi + ], [:]) + fi + ]) + fi +]) + +# Prerequisites of lib/raise.c. +AC_DEFUN([gl_PREREQ_RAISE], [:]) diff -Nru grep-3.1/m4/readdir.m4 grep-3.3/m4/readdir.m4 --- grep-3.1/m4/readdir.m4 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/m4/readdir.m4 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ # readdir.m4 serial 1 -dnl Copyright (C) 2011-2017 Free Software Foundation, Inc. +dnl Copyright (C) 2011-2018 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 -Nru grep-3.1/m4/read.m4 grep-3.3/m4/read.m4 --- grep-3.1/m4/read.m4 2017-05-14 01:09:51.000000000 +0000 +++ grep-3.3/m4/read.m4 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ # read.m4 serial 5 -dnl Copyright (C) 2011-2017 Free Software Foundation, Inc. +dnl Copyright (C) 2011-2018 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 -Nru grep-3.1/m4/realloc.m4 grep-3.3/m4/realloc.m4 --- grep-3.1/m4/realloc.m4 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/m4/realloc.m4 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ -# realloc.m4 serial 14 -dnl Copyright (C) 2007, 2009-2017 Free Software Foundation, Inc. +# realloc.m4 serial 15 +dnl Copyright (C) 2007, 2009-2018 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,7 +7,7 @@ m4_version_prereq([2.70], [] ,[ # This is adapted with modifications from upstream Autoconf here: -# http://git.savannah.gnu.org/cgit/autoconf.git/commit/?id=04be2b7a29d65d9a08e64e8e56e594c91749598c +# https://git.savannah.gnu.org/cgit/autoconf.git/commit/?id=04be2b7a29d65d9a08e64e8e56e594c91749598c AC_DEFUN([_AC_FUNC_REALLOC_IF], [ AC_REQUIRE([AC_HEADER_STDC])dnl @@ -32,7 +32,7 @@ [ac_cv_func_realloc_0_nonnull=no], [case "$host_os" in # Guess yes on platforms where we know the result. - *-gnu* | freebsd* | netbsd* | openbsd* \ + *-gnu* | gnu* | freebsd* | netbsd* | openbsd* \ | hpux* | solaris* | cygwin* | mingw*) ac_cv_func_realloc_0_nonnull=yes ;; # If we don't know, assume the worst. diff -Nru grep-3.1/m4/regex.m4 grep-3.3/m4/regex.m4 --- grep-3.1/m4/regex.m4 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/m4/regex.m4 2018-12-21 02:51:47.000000000 +0000 @@ -1,6 +1,6 @@ -# serial 66 +# serial 68 -# Copyright (C) 1996-2001, 2003-2017 Free Software Foundation, Inc. +# Copyright (C) 1996-2001, 2003-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -13,6 +13,7 @@ AC_DEFUN([gl_REGEX], [ + AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_ARG_WITH([included-regex], [AS_HELP_STRING([--without-included-regex], [don't compile regex; this is the default on systems @@ -75,7 +76,7 @@ if (setlocale (LC_ALL, "en_US.UTF-8")) { { - /* http://sourceware.org/ml/libc-hacker/2006-09/msg00008.html + /* https://sourceware.org/ml/libc-hacker/2006-09/msg00008.html This test needs valgrind to catch the bug on Debian GNU/Linux 3.1 x86, but it might catch the bug better on other platforms and it shouldn't hurt to try the @@ -99,7 +100,7 @@ { /* This test is from glibc bug 15078. The test case is from Andreas Schwab in - . + . */ static char const pat[] = "[^x]x"; static char const data[] = @@ -197,7 +198,7 @@ result |= 16; /* Catch a bug reported by Vin Shelton in - http://lists.gnu.org/archive/html/bug-coreutils/2007-06/msg00089.html + https://lists.gnu.org/r/bug-coreutils/2007-06/msg00089.html */ re_set_syntax (RE_SYNTAX_POSIX_BASIC & ~RE_CONTEXT_INVALID_DUP @@ -212,6 +213,17 @@ if (! REG_STARTEND) result |= 64; + /* Matching with the compiled form of this regexp would provoke + an assertion failure prior to glibc-2.28: + regexec.c:1375: pop_fail_stack: Assertion 'num >= 0' failed + With glibc-2.28, compilation fails and reports the invalid + back reference. */ + re_set_syntax (RE_SYNTAX_POSIX_EGREP); + memset (®ex, 0, sizeof regex); + s = re_compile_pattern ("0|()0|\\1|0", 10, ®ex); + if (!s || strcmp (s, "Invalid back reference")) + result |= 64; + #if 0 /* It would be nice to reject hosts whose regoff_t values are too narrow (including glibc on hosts with 64-bit ptrdiff_t and @@ -226,13 +238,19 @@ return result; ]])], - [gl_cv_func_re_compile_pattern_working=yes], - [gl_cv_func_re_compile_pattern_working=no], - dnl When crosscompiling, assume it is not working. - [gl_cv_func_re_compile_pattern_working=no])]) - case $gl_cv_func_re_compile_pattern_working in #( - yes) ac_use_included_regex=no;; #( - no) ac_use_included_regex=yes;; + [gl_cv_func_re_compile_pattern_working=yes], + [gl_cv_func_re_compile_pattern_working=no], + [case "$host_os" in + # Guess no on native Windows. + mingw*) gl_cv_func_re_compile_pattern_working="guessing no" ;; + # Otherwise, assume it is not working. + *) gl_cv_func_re_compile_pattern_working="guessing no" ;; + esac + ]) + ]) + case "$gl_cv_func_re_compile_pattern_working" in #( + *yes) ac_use_included_regex=no;; #( + *no) ac_use_included_regex=yes;; esac ;; *) AC_MSG_ERROR([Invalid value for --with-included-regex: $with_included_regex]) diff -Nru grep-3.1/m4/safe-read.m4 grep-3.3/m4/safe-read.m4 --- grep-3.1/m4/safe-read.m4 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/m4/safe-read.m4 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ # safe-read.m4 serial 6 -dnl Copyright (C) 2002-2003, 2005-2006, 2009-2017 Free Software Foundation, +dnl Copyright (C) 2002-2003, 2005-2006, 2009-2018 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 -Nru grep-3.1/m4/save-cwd.m4 grep-3.3/m4/save-cwd.m4 --- grep-3.1/m4/save-cwd.m4 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/m4/save-cwd.m4 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ # serial 10 -dnl Copyright (C) 2002-2006, 2009-2017 Free Software Foundation, Inc. +dnl Copyright (C) 2002-2006, 2009-2018 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 -Nru grep-3.1/m4/select.m4 grep-3.3/m4/select.m4 --- grep-3.1/m4/select.m4 1970-01-01 00:00:00.000000000 +0000 +++ grep-3.3/m4/select.m4 2018-09-19 05:04:26.000000000 +0000 @@ -0,0 +1,116 @@ +# select.m4 serial 10 +dnl Copyright (C) 2009-2018 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_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 + REPLACE_SELECT=1 + else + dnl On Interix 3.5, select(0, NULL, NULL, NULL, timeout) fails with error + dnl EFAULT. + AC_CHECK_HEADERS_ONCE([sys/select.h]) + AC_CACHE_CHECK([whether select supports a 0 argument], + [gl_cv_func_select_supports0], + [ + AC_RUN_IFELSE([AC_LANG_SOURCE([[ +#include +#include +#if HAVE_SYS_SELECT_H +#include +#endif +int main () +{ + struct timeval timeout; + timeout.tv_sec = 0; + timeout.tv_usec = 5; + return select (0, (fd_set *)0, (fd_set *)0, (fd_set *)0, &timeout) < 0; +}]])], [gl_cv_func_select_supports0=yes], [gl_cv_func_select_supports0=no], + [ +changequote(,)dnl + case "$host_os" in + # Guess no on Interix. + interix*) gl_cv_func_select_supports0="guessing no";; + # Guess yes otherwise. + *) gl_cv_func_select_supports0="guessing yes";; + esac +changequote([,])dnl + ]) + ]) + case "$gl_cv_func_select_supports0" in + *yes) ;; + *) REPLACE_SELECT=1 ;; + esac + + dnl On FreeBSD 8.2, select() doesn't always reject bad fds. + AC_CACHE_CHECK([whether select detects invalid fds], + [gl_cv_func_select_detects_ebadf], + [ + AC_RUN_IFELSE([AC_LANG_PROGRAM([[ +#include +#include +#if HAVE_SYS_SELECT_H +# include +#endif +#include +#include +]],[[ + fd_set set; + dup2(0, 16); + FD_ZERO(&set); + FD_SET(16, &set); + close(16); + struct timeval timeout; + timeout.tv_sec = 0; + timeout.tv_usec = 5; + return select (17, &set, NULL, NULL, &timeout) != -1 || errno != EBADF; +]])], [gl_cv_func_select_detects_ebadf=yes], + [gl_cv_func_select_detects_ebadf=no], + [ + case "$host_os" in + # Guess yes on Linux systems. + linux-* | linux) gl_cv_func_select_detects_ebadf="guessing yes" ;; + # Guess yes on glibc systems. + *-gnu* | gnu*) gl_cv_func_select_detects_ebadf="guessing yes" ;; + # If we don't know, assume the worst. + *) gl_cv_func_select_detects_ebadf="guessing no" ;; + esac + ]) + ]) + case $gl_cv_func_select_detects_ebadf in + *yes) ;; + *) REPLACE_SELECT=1 ;; + esac + fi + + dnl Determine the needed libraries. + LIB_SELECT="$LIBSOCKET" + if test $REPLACE_SELECT = 1; then + case "$host_os" in + mingw*) + dnl On the MSVC platform, the function MsgWaitForMultipleObjects + dnl (used in lib/select.c) requires linking with -luser32. On mingw, + dnl it is implicit. + AC_LINK_IFELSE( + [AC_LANG_SOURCE([[ +#define WIN32_LEAN_AND_MEAN +#include +int +main () +{ + MsgWaitForMultipleObjects (0, NULL, 0, 0, 0); + return 0; +}]])], + [], + [LIB_SELECT="$LIB_SELECT -luser32"]) + ;; + esac + fi + AC_SUBST([LIB_SELECT]) +]) diff -Nru grep-3.1/m4/setenv.m4 grep-3.3/m4/setenv.m4 --- grep-3.1/m4/setenv.m4 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/m4/setenv.m4 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ -# setenv.m4 serial 26 -dnl Copyright (C) 2001-2004, 2006-2017 Free Software Foundation, Inc. +# setenv.m4 serial 27 +dnl Copyright (C) 2001-2004, 2006-2018 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,10 +35,10 @@ ]])], [gl_cv_func_setenv_works=yes], [gl_cv_func_setenv_works=no], [case "$host_os" in - # Guess yes on glibc systems. - *-gnu*) gl_cv_func_setenv_works="guessing yes" ;; - # If we don't know, assume the worst. - *) gl_cv_func_setenv_works="guessing no" ;; + # Guess yes on glibc systems. + *-gnu* | gnu*) gl_cv_func_setenv_works="guessing yes" ;; + # If we don't know, assume the worst. + *) gl_cv_func_setenv_works="guessing no" ;; esac ])]) case "$gl_cv_func_setenv_works" in diff -Nru grep-3.1/m4/setlocale.m4 grep-3.3/m4/setlocale.m4 --- grep-3.1/m4/setlocale.m4 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/m4/setlocale.m4 2018-09-19 05:04:26.000000000 +0000 @@ -1,5 +1,5 @@ -# setlocale.m4 serial 4 -dnl Copyright (C) 2011-2017 Free Software Foundation, Inc. +# setlocale.m4 serial 5 +dnl Copyright (C) 2011-2018 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. @@ -25,5 +25,8 @@ # Prerequisites of lib/setlocale.c. AC_DEFUN([gl_PREREQ_SETLOCALE], [ + dnl No need to check for CFLocaleCopyPreferredLanguages and + dnl CFPreferencesCopyAppValue because lib/setlocale.c is not used on Mac OS X. + dnl (The Mac OS X specific code is only used in libintl.) : ]) diff -Nru grep-3.1/m4/sigaction.m4 grep-3.3/m4/sigaction.m4 --- grep-3.1/m4/sigaction.m4 1970-01-01 00:00:00.000000000 +0000 +++ grep-3.3/m4/sigaction.m4 2018-01-07 00:07:08.000000000 +0000 @@ -0,0 +1,40 @@ +# sigaction.m4 serial 7 +dnl Copyright (C) 2008-2018 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. + +# Determine if sigaction interface is present. +AC_DEFUN([gl_SIGACTION], +[ + AC_REQUIRE([gl_SIGNAL_H_DEFAULTS]) + AC_CHECK_FUNCS_ONCE([sigaction]) + if test $ac_cv_func_sigaction = yes; then + AC_CHECK_MEMBERS([struct sigaction.sa_sigaction], , , + [[#include ]]) + if test $ac_cv_member_struct_sigaction_sa_sigaction = no; then + HAVE_STRUCT_SIGACTION_SA_SIGACTION=0 + fi + else + HAVE_SIGACTION=0 + fi +]) + +# Prerequisites of the part of lib/signal.in.h and of lib/sigaction.c. +AC_DEFUN([gl_PREREQ_SIGACTION], +[ + AC_REQUIRE([gl_SIGNAL_H_DEFAULTS]) + AC_REQUIRE([AC_C_RESTRICT]) + AC_REQUIRE([AC_TYPE_UID_T]) + AC_REQUIRE([gl_PREREQ_SIG_HANDLER_H]) + AC_CHECK_FUNCS_ONCE([sigaltstack siginterrupt]) + AC_CHECK_TYPES([siginfo_t], [], [], [[ +#include + ]]) + if test $ac_cv_type_siginfo_t = no; then + HAVE_SIGINFO_T=0 + fi +]) + +# Prerequisites of lib/sig-handler.h. +AC_DEFUN([gl_PREREQ_SIG_HANDLER_H], [:]) diff -Nru grep-3.1/m4/signalblocking.m4 grep-3.3/m4/signalblocking.m4 --- grep-3.1/m4/signalblocking.m4 1970-01-01 00:00:00.000000000 +0000 +++ grep-3.3/m4/signalblocking.m4 2018-01-07 00:07:08.000000000 +0000 @@ -0,0 +1,25 @@ +# signalblocking.m4 serial 14 +dnl Copyright (C) 2001-2002, 2006-2018 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. + +# Determine available signal blocking primitives. Three different APIs exist: +# 1) POSIX: sigemptyset, sigaddset, sigprocmask +# 2) SYSV: sighold, sigrelse +# 3) BSD: sigblock, sigsetmask +# For simplicity, here we check only for the POSIX signal blocking. +AC_DEFUN([gl_SIGNALBLOCKING], +[ + AC_REQUIRE([gl_SIGNAL_H_DEFAULTS]) + AC_REQUIRE([gl_CHECK_TYPE_SIGSET_T]) + if test $gl_cv_type_sigset_t = yes; then + AC_CHECK_FUNC([sigprocmask], [gl_cv_func_sigprocmask=1]) + fi + if test -z "$gl_cv_func_sigprocmask"; then + HAVE_POSIX_SIGNALBLOCKING=0 + fi +]) + +# Prerequisites of lib/sigprocmask.c. +AC_DEFUN([gl_PREREQ_SIGPROCMASK], [:]) diff -Nru grep-3.1/m4/signal_h.m4 grep-3.3/m4/signal_h.m4 --- grep-3.1/m4/signal_h.m4 1970-01-01 00:00:00.000000000 +0000 +++ grep-3.3/m4/signal_h.m4 2018-01-07 00:07:08.000000000 +0000 @@ -0,0 +1,83 @@ +# signal_h.m4 serial 18 +dnl Copyright (C) 2007-2018 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_SIGNAL_H], +[ + AC_REQUIRE([gl_SIGNAL_H_DEFAULTS]) + AC_REQUIRE([gl_CHECK_TYPE_SIGSET_T]) + gl_NEXT_HEADERS([signal.h]) + +# AIX declares sig_atomic_t to already include volatile, and C89 compilers +# then choke on 'volatile sig_atomic_t'. C99 requires that it compile. + AC_CHECK_TYPE([volatile sig_atomic_t], [], + [HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=0], [[ +#include + ]]) + + dnl Ensure the type pid_t gets defined. + AC_REQUIRE([AC_TYPE_PID_T]) + + AC_REQUIRE([AC_TYPE_UID_T]) + + dnl Persuade glibc to define sighandler_t. + AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) + AC_CHECK_TYPE([sighandler_t], [], [HAVE_SIGHANDLER_T=0], [[ +#include + ]]) + + 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 + ]], [pthread_sigmask sigaction + sigaddset sigdelset sigemptyset sigfillset sigismember + sigpending sigprocmask]) +]) + +AC_DEFUN([gl_CHECK_TYPE_SIGSET_T], +[ + AC_CHECK_TYPES([sigset_t], + [gl_cv_type_sigset_t=yes], [gl_cv_type_sigset_t=no], + [[ + #include + /* Mingw defines sigset_t not in , but in . */ + #include + ]]) + if test $gl_cv_type_sigset_t != yes; then + HAVE_SIGSET_T=0 + fi +]) + +AC_DEFUN([gl_SIGNAL_MODULE_INDICATOR], +[ + dnl Use AC_REQUIRE here, so that the default settings are expanded once only. + AC_REQUIRE([gl_SIGNAL_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_SIGNAL_H_DEFAULTS], +[ + GNULIB_PTHREAD_SIGMASK=0; AC_SUBST([GNULIB_PTHREAD_SIGMASK]) + GNULIB_RAISE=0; AC_SUBST([GNULIB_RAISE]) + GNULIB_SIGNAL_H_SIGPIPE=0; AC_SUBST([GNULIB_SIGNAL_H_SIGPIPE]) + GNULIB_SIGPROCMASK=0; AC_SUBST([GNULIB_SIGPROCMASK]) + GNULIB_SIGACTION=0; AC_SUBST([GNULIB_SIGACTION]) + dnl Assume proper GNU behavior unless another module says otherwise. + HAVE_POSIX_SIGNALBLOCKING=1; AC_SUBST([HAVE_POSIX_SIGNALBLOCKING]) + HAVE_PTHREAD_SIGMASK=1; AC_SUBST([HAVE_PTHREAD_SIGMASK]) + HAVE_RAISE=1; AC_SUBST([HAVE_RAISE]) + HAVE_SIGSET_T=1; AC_SUBST([HAVE_SIGSET_T]) + HAVE_SIGINFO_T=1; AC_SUBST([HAVE_SIGINFO_T]) + HAVE_SIGACTION=1; AC_SUBST([HAVE_SIGACTION]) + HAVE_STRUCT_SIGACTION_SA_SIGACTION=1; + AC_SUBST([HAVE_STRUCT_SIGACTION_SA_SIGACTION]) + HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=1; + AC_SUBST([HAVE_TYPE_VOLATILE_SIG_ATOMIC_T]) + HAVE_SIGHANDLER_T=1; AC_SUBST([HAVE_SIGHANDLER_T]) + REPLACE_PTHREAD_SIGMASK=0; AC_SUBST([REPLACE_PTHREAD_SIGMASK]) + REPLACE_RAISE=0; AC_SUBST([REPLACE_RAISE]) +]) diff -Nru grep-3.1/m4/size_max.m4 grep-3.3/m4/size_max.m4 --- grep-3.1/m4/size_max.m4 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/m4/size_max.m4 2018-12-21 02:51:47.000000000 +0000 @@ -1,11 +1,13 @@ -# size_max.m4 serial 10 -dnl Copyright (C) 2003, 2005-2006, 2008-2017 Free Software Foundation, Inc. +# size_max.m4 serial 11 +dnl Copyright (C) 2003, 2005-2006, 2008-2018 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.61]) + AC_DEFUN([gl_SIZE_MAX], [ AC_CHECK_HEADERS([stdint.h]) @@ -71,9 +73,3 @@ # undef SIZE_MAX #endif]) ]) - -dnl Autoconf >= 2.61 has AC_COMPUTE_INT built-in. -dnl Remove this when we can assume autoconf >= 2.61. -m4_ifdef([AC_COMPUTE_INT], [], [ - AC_DEFUN([AC_COMPUTE_INT], [_AC_COMPUTE_INT([$2],[$1],[$3],[$4])]) -]) diff -Nru grep-3.1/m4/sleep.m4 grep-3.3/m4/sleep.m4 --- grep-3.1/m4/sleep.m4 1970-01-01 00:00:00.000000000 +0000 +++ grep-3.3/m4/sleep.m4 2018-01-07 00:07:08.000000000 +0000 @@ -0,0 +1,64 @@ +# sleep.m4 serial 9 +dnl Copyright (C) 2007-2018 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_SLEEP], +[ + AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) + AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles + dnl We expect to see the declaration of sleep() in a header file. + dnl Older versions of mingw have a sleep() function that is an alias to + dnl _sleep() in MSVCRT. It has a different signature than POSIX sleep(): + dnl it takes the number of milliseconds as argument and returns void. + dnl mingw does not declare this function. + AC_CHECK_DECLS([sleep], , , [[#include ]]) + AC_CHECK_FUNCS_ONCE([sleep]) + if test $ac_cv_have_decl_sleep != yes; then + HAVE_SLEEP=0 + else + dnl Cygwin 1.5.x has a bug where sleep can't exceed 49.7 days. + AC_CACHE_CHECK([for working sleep], [gl_cv_func_sleep_works], + [AC_RUN_IFELSE([AC_LANG_PROGRAM([[ +#include +#include +#include +static void +handle_alarm (int sig) +{ + if (sig != SIGALRM) + _exit (2); +} +]], [[ + /* Failure to compile this test due to missing alarm is okay, + since all such platforms (mingw) also lack sleep. */ + unsigned int pentecost = 50 * 24 * 60 * 60; /* 50 days. */ + unsigned int remaining; + signal (SIGALRM, handle_alarm); + alarm (1); + remaining = sleep (pentecost); + if (remaining > pentecost) + return 3; + if (remaining <= pentecost - 10) + return 4; + return 0; + ]])], + [gl_cv_func_sleep_works=yes], [gl_cv_func_sleep_works=no], + [case "$host_os" in + # Guess yes on glibc systems. + *-gnu* | gnu*) gl_cv_func_sleep_works="guessing yes" ;; + # Guess no on native Windows. + mingw*) gl_cv_func_sleep_works="guessing no" ;; + # If we don't know, assume the worst. + *) gl_cv_func_sleep_works="guessing no" ;; + esac + ])]) + case "$gl_cv_func_sleep_works" in + *yes) ;; + *) + REPLACE_SLEEP=1 + ;; + esac + fi +]) diff -Nru grep-3.1/m4/snprintf.m4 grep-3.3/m4/snprintf.m4 --- grep-3.1/m4/snprintf.m4 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/m4/snprintf.m4 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ # snprintf.m4 serial 7 -dnl Copyright (C) 2002-2004, 2007-2017 Free Software Foundation, Inc. +dnl Copyright (C) 2002-2004, 2007-2018 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 -Nru grep-3.1/m4/socketlib.m4 grep-3.3/m4/socketlib.m4 --- grep-3.1/m4/socketlib.m4 1970-01-01 00:00:00.000000000 +0000 +++ grep-3.3/m4/socketlib.m4 2018-02-26 06:09:46.000000000 +0000 @@ -0,0 +1,90 @@ +# socketlib.m4 serial 2 +dnl Copyright (C) 2008-2018 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 gl_SOCKETLIB +dnl Determines the library to use for socket functions. +dnl Sets and AC_SUBSTs LIBSOCKET. + +AC_DEFUN([gl_SOCKETLIB], +[ + gl_PREREQ_SYS_H_WINSOCK2 dnl for HAVE_WINSOCK2_H + LIBSOCKET= + if test $HAVE_WINSOCK2_H = 1; then + dnl Native Windows API (not Cygwin). + AC_CACHE_CHECK([if we need to call WSAStartup in winsock2.h and -lws2_32], + [gl_cv_func_wsastartup], [ + gl_save_LIBS="$LIBS" + LIBS="$LIBS -lws2_32" + AC_LINK_IFELSE([AC_LANG_PROGRAM([[ +#ifdef HAVE_WINSOCK2_H +# include +#endif]], [[ + WORD wVersionRequested = MAKEWORD(1, 1); + WSADATA wsaData; + int err = WSAStartup(wVersionRequested, &wsaData); + WSACleanup ();]])], + gl_cv_func_wsastartup=yes, gl_cv_func_wsastartup=no) + LIBS="$gl_save_LIBS" + ]) + if test "$gl_cv_func_wsastartup" = "yes"; then + AC_DEFINE([WINDOWS_SOCKETS], [1], [Define if WSAStartup is needed.]) + LIBSOCKET='-lws2_32' + fi + else + dnl Unix API. + dnl Solaris has most socket functions in libsocket. + dnl Haiku has most socket functions in libnetwork. + dnl BeOS has most socket functions in libnet. + dnl On HP-UX, do NOT link with libxnet, because in 64-bit mode this would + dnl break code (e.g. in libraries) that invokes accept(), getpeername(), + dnl getsockname(), getsockopt(), or recvfrom() with a 32-bit addrlen. See + dnl "man xopen_networking" for details. + AC_CACHE_CHECK([for library containing setsockopt], [gl_cv_lib_socket], [ + gl_cv_lib_socket= + AC_LINK_IFELSE([AC_LANG_PROGRAM([[extern +#ifdef __cplusplus +"C" +#endif +char setsockopt();]], [[setsockopt();]])], + [], + [gl_save_LIBS="$LIBS" + LIBS="$gl_save_LIBS -lsocket" + AC_LINK_IFELSE([AC_LANG_PROGRAM([[extern +#ifdef __cplusplus +"C" +#endif +char setsockopt();]], [[setsockopt();]])], + [gl_cv_lib_socket="-lsocket"]) + if test -z "$gl_cv_lib_socket"; then + LIBS="$gl_save_LIBS -lnetwork" + AC_LINK_IFELSE([AC_LANG_PROGRAM([[extern +#ifdef __cplusplus +"C" +#endif +char setsockopt();]], [[setsockopt();]])], + [gl_cv_lib_socket="-lnetwork"]) + if test -z "$gl_cv_lib_socket"; then + LIBS="$gl_save_LIBS -lnet" + AC_LINK_IFELSE([AC_LANG_PROGRAM([[extern +#ifdef __cplusplus +"C" +#endif +char setsockopt();]], [[setsockopt();]])], + [gl_cv_lib_socket="-lnet"]) + fi + fi + LIBS="$gl_save_LIBS" + ]) + if test -z "$gl_cv_lib_socket"; then + gl_cv_lib_socket="none needed" + fi + ]) + if test "$gl_cv_lib_socket" != "none needed"; then + LIBSOCKET="$gl_cv_lib_socket" + fi + fi + AC_SUBST([LIBSOCKET]) +]) diff -Nru grep-3.1/m4/sockets.m4 grep-3.3/m4/sockets.m4 --- grep-3.1/m4/sockets.m4 1970-01-01 00:00:00.000000000 +0000 +++ grep-3.3/m4/sockets.m4 2018-01-07 00:07:08.000000000 +0000 @@ -0,0 +1,17 @@ +# sockets.m4 serial 7 +dnl Copyright (C) 2008-2018 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_SOCKETS], +[ + AC_REQUIRE([AC_C_INLINE]) + AC_REQUIRE([gl_SOCKETLIB]) + gl_PREREQ_SOCKETS +]) + +# Prerequisites of lib/sockets.c. +AC_DEFUN([gl_PREREQ_SOCKETS], [ + : +]) diff -Nru grep-3.1/m4/socklen.m4 grep-3.3/m4/socklen.m4 --- grep-3.1/m4/socklen.m4 1970-01-01 00:00:00.000000000 +0000 +++ grep-3.3/m4/socklen.m4 2018-12-15 18:14:26.000000000 +0000 @@ -0,0 +1,76 @@ +# socklen.m4 serial 11 +dnl Copyright (C) 2005-2007, 2009-2018 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 Albert Chin, Windows fixes from Simon Josefsson. + +dnl Check for socklen_t: historically on BSD it is an int, and in +dnl POSIX 1g it is a type of its own, but some platforms use different +dnl types for the argument to getsockopt, getpeername, etc.: +dnl HP-UX 10.20, IRIX 6.5, OSF/1 4.0, Interix 3.5, BeOS. +dnl So we have to test to find something that will work. + +AC_DEFUN([gl_TYPE_SOCKLEN_T], + [AC_REQUIRE([gl_CHECK_SOCKET_HEADERS])dnl + AC_CHECK_TYPE([socklen_t], , + [AC_CACHE_CHECK([for socklen_t equivalent], + [gl_cv_socklen_t_equiv], + [# Systems have either "struct sockaddr *" or + # "void *" as the second argument to getpeername + gl_cv_socklen_t_equiv= + for arg2 in "struct sockaddr" void; do + for t in int size_t "unsigned int" "long int" "unsigned long int"; do + AC_COMPILE_IFELSE([AC_LANG_PROGRAM( + [[#include + #include + + int getpeername (int, $arg2 *, $t *);]], + [[$t len; + getpeername (0, 0, &len);]])], + [gl_cv_socklen_t_equiv="$t"]) + test "$gl_cv_socklen_t_equiv" != "" && break + done + test "$gl_cv_socklen_t_equiv" != "" && break + done + if test "$gl_cv_socklen_t_equiv" = ""; then + AC_MSG_ERROR([Cannot find a type to use in place of socklen_t]) + fi + ]) + AC_DEFINE_UNQUOTED([socklen_t], [$gl_cv_socklen_t_equiv], + [type to use in place of socklen_t if not defined])], + [gl_SOCKET_HEADERS])]) + +dnl On mingw32, socklen_t is in ws2tcpip.h ('int'), so we try to find +dnl it there too. But on Cygwin, wc2tcpip.h must not be included. Users +dnl of this module should use the same include pattern as gl_SOCKET_HEADERS. +dnl When you change this macro, keep also in sync: +dnl - gl_CHECK_SOCKET_HEADERS, +dnl - the Include section of modules/socklen. +AC_DEFUN([gl_SOCKET_HEADERS], +[ +/* is not needed according to POSIX, but the + in i386-unknown-freebsd4.10 and + powerpc-apple-darwin5.5 required it. */ +#include +#if HAVE_SYS_SOCKET_H +# include +#elif HAVE_WS2TCPIP_H +# include +#endif +]) + +dnl Tests for the existence of the header for socket facilities. +dnl Defines the C macros HAVE_SYS_SOCKET_H, HAVE_WS2TCPIP_H. +dnl This macro must match gl_SOCKET_HEADERS. +AC_DEFUN([gl_CHECK_SOCKET_HEADERS], + [AC_CHECK_HEADERS_ONCE([sys/socket.h]) + if test $ac_cv_header_sys_socket_h = no; then + dnl We cannot use AC_CHECK_HEADERS_ONCE here, because that would make + dnl the check for those headers unconditional; yet cygwin reports + dnl that the headers are present but cannot be compiled (since on + dnl cygwin, all socket information should come from sys/socket.h). + AC_CHECK_HEADERS([ws2tcpip.h]) + fi + ]) diff -Nru grep-3.1/m4/sockpfaf.m4 grep-3.3/m4/sockpfaf.m4 --- grep-3.1/m4/sockpfaf.m4 1970-01-01 00:00:00.000000000 +0000 +++ grep-3.3/m4/sockpfaf.m4 2018-12-15 18:14:26.000000000 +0000 @@ -0,0 +1,84 @@ +# sockpfaf.m4 serial 9 +dnl Copyright (C) 2004, 2006, 2009-2018 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 Test for some common socket protocol families (PF_INET, PF_INET6, ...) +dnl and some common address families (AF_INET, AF_INET6, ...). +dnl This test assumes that a system supports an address family if and only if +dnl it supports the corresponding protocol family. + +dnl From Bruno Haible. + +AC_DEFUN([gl_SOCKET_FAMILIES], +[ + AC_REQUIRE([gl_HEADER_SYS_SOCKET]) + AC_CHECK_HEADERS_ONCE([netinet/in.h]) + + AC_CACHE_CHECK([for IPv4 sockets], + [gl_cv_socket_ipv4], + [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include +#ifdef HAVE_SYS_SOCKET_H +#include +#endif +#ifdef HAVE_NETINET_IN_H +#include +#endif +#ifdef HAVE_WINSOCK2_H +#include +#endif]], +[[int x = AF_INET; struct in_addr y; struct sockaddr_in z; + if (&x && &y && &z) return 0;]])], + gl_cv_socket_ipv4=yes, gl_cv_socket_ipv4=no)]) + if test $gl_cv_socket_ipv4 = yes; then + AC_DEFINE([HAVE_IPV4], [1], [Define to 1 if defines AF_INET.]) + fi + + AC_CACHE_CHECK([for IPv6 sockets], + [gl_cv_socket_ipv6], + [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include +#ifdef HAVE_SYS_SOCKET_H +#include +#endif +#ifdef HAVE_NETINET_IN_H +#include +#endif +#ifdef HAVE_WINSOCK2_H +#include +#endif +#ifdef HAVE_WS2TCPIP_H +#include +#endif]], +[[int x = AF_INET6; struct in6_addr y; struct sockaddr_in6 z; + if (&x && &y && &z) return 0;]])], + gl_cv_socket_ipv6=yes, gl_cv_socket_ipv6=no)]) + if test $gl_cv_socket_ipv6 = yes; then + AC_DEFINE([HAVE_IPV6], [1], [Define to 1 if defines AF_INET6.]) + fi +]) + +AC_DEFUN([gl_SOCKET_FAMILY_UNIX], +[ + AC_REQUIRE([gl_HEADER_SYS_SOCKET]) + AC_CHECK_HEADERS_ONCE([sys/un.h]) + + AC_CACHE_CHECK([for UNIX domain sockets], + [gl_cv_socket_unix], + [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include +#ifdef HAVE_SYS_SOCKET_H +#include +#endif +#ifdef HAVE_SYS_UN_H +#include +#endif +#ifdef HAVE_WINSOCK2_H +#include +#endif]], +[[int x = AF_UNIX; struct sockaddr_un y; + if (&x && &y) return 0;]])], + gl_cv_socket_unix=yes, gl_cv_socket_unix=no)]) + if test $gl_cv_socket_unix = yes; then + AC_DEFINE([HAVE_UNIXSOCKET], [1], [Define to 1 if defines AF_UNIX.]) + fi +]) diff -Nru grep-3.1/m4/ssize_t.m4 grep-3.3/m4/ssize_t.m4 --- grep-3.1/m4/ssize_t.m4 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/m4/ssize_t.m4 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ # ssize_t.m4 serial 5 (gettext-0.18.2) -dnl Copyright (C) 2001-2003, 2006, 2010-2017 Free Software Foundation, Inc. +dnl Copyright (C) 2001-2003, 2006, 2010-2018 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 -Nru grep-3.1/m4/stat.m4 grep-3.3/m4/stat.m4 --- grep-3.1/m4/stat.m4 2017-05-14 01:09:51.000000000 +0000 +++ grep-3.3/m4/stat.m4 2018-09-19 05:04:26.000000000 +0000 @@ -1,6 +1,6 @@ -# serial 12 +# serial 15 -# Copyright (C) 2009-2017 Free Software Foundation, Inc. +# Copyright (C) 2009-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -43,10 +43,12 @@ ]])], [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" ;; + # Guess yes on Linux systems. + linux-* | linux) gl_cv_func_stat_file_slash="guessing yes" ;; + # Guess yes on glibc systems. + *-gnu* | 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]) @@ -56,6 +58,11 @@ AC_DEFINE([REPLACE_FUNC_STAT_FILE], [1], [Define to 1 if stat needs help when passed a file name with a trailing slash]);; esac + case $host_os in + dnl Solaris stat can return a negative tv_nsec. + solaris*) + REPLACE_FSTAT=1 ;; + esac ;; esac ]) diff -Nru grep-3.1/m4/stat-time.m4 grep-3.3/m4/stat-time.m4 --- grep-3.1/m4/stat-time.m4 1970-01-01 00:00:00.000000000 +0000 +++ grep-3.3/m4/stat-time.m4 2018-01-07 00:07:08.000000000 +0000 @@ -0,0 +1,83 @@ +# Checks for stat-related time functions. + +# Copyright (C) 1998-1999, 2001, 2003, 2005-2007, 2009-2018 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. + +dnl From Paul Eggert. + +# st_atim.tv_nsec - Linux, Solaris, Cygwin +# st_atimespec.tv_nsec - FreeBSD, NetBSD, if ! defined _POSIX_SOURCE +# st_atimensec - FreeBSD, NetBSD, if defined _POSIX_SOURCE +# st_atim.st__tim.tv_nsec - UnixWare (at least 2.1.2 through 7.1) + +# st_birthtimespec - FreeBSD, NetBSD (hidden on OpenBSD 3.9, anyway) +# st_birthtim - Cygwin 1.7.0+ + +AC_DEFUN([gl_STAT_TIME], +[ + AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) + AC_CHECK_HEADERS_ONCE([sys/time.h]) + + AC_CHECK_MEMBERS([struct stat.st_atim.tv_nsec], + [AC_CACHE_CHECK([whether struct stat.st_atim is of type struct timespec], + [ac_cv_typeof_struct_stat_st_atim_is_struct_timespec], + [AC_COMPILE_IFELSE([AC_LANG_PROGRAM( + [[ + #include + #include + #if HAVE_SYS_TIME_H + # include + #endif + #include + struct timespec ts; + struct stat st; + ]], + [[ + st.st_atim = ts; + ]])], + [ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=yes], + [ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=no])]) + if test $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec = yes; then + AC_DEFINE([TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC], [1], + [Define to 1 if the type of the st_atim member of a struct stat is + struct timespec.]) + fi], + [AC_CHECK_MEMBERS([struct stat.st_atimespec.tv_nsec], [], + [AC_CHECK_MEMBERS([struct stat.st_atimensec], [], + [AC_CHECK_MEMBERS([struct stat.st_atim.st__tim.tv_nsec], [], [], + [#include + #include ])], + [#include + #include ])], + [#include + #include ])], + [#include + #include ]) +]) + +# Check for st_birthtime, a feature from UFS2 (FreeBSD, NetBSD, OpenBSD, etc.) +# and NTFS (Cygwin). +# There was a time when this field was named st_createtime (21 June +# 2002 to 16 July 2002) But that window is very small and applied only +# to development code, so systems still using that configuration are +# not supported. See revisions 1.10 and 1.11 of FreeBSD's +# src/sys/ufs/ufs/dinode.h. +# +AC_DEFUN([gl_STAT_BIRTHTIME], +[ + AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) + AC_CHECK_HEADERS_ONCE([sys/time.h]) + AC_CHECK_MEMBERS([struct stat.st_birthtimespec.tv_nsec], [], + [AC_CHECK_MEMBERS([struct stat.st_birthtimensec], [], + [AC_CHECK_MEMBERS([struct stat.st_birthtim.tv_nsec], [], [], + [#include + #include ])], + [#include + #include ])], + [#include + #include ]) +]) diff -Nru grep-3.1/m4/stdalign.m4 grep-3.3/m4/stdalign.m4 --- grep-3.1/m4/stdalign.m4 2017-03-22 03:19:46.000000000 +0000 +++ grep-3.3/m4/stdalign.m4 2018-01-07 00:07:08.000000000 +0000 @@ -1,6 +1,6 @@ # Check for stdalign.h that conforms to C11. -dnl Copyright 2011-2017 Free Software Foundation, Inc. +dnl Copyright 2011-2018 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. @@ -18,7 +18,7 @@ /* Test that alignof yields a result consistent with offsetof. This catches GCC bug 52023 - . */ + . */ #ifdef __cplusplus template struct alignof_helper { char a; t b; }; # define ao(type) offsetof (alignof_helper, b) diff -Nru grep-3.1/m4/stdarg.m4 grep-3.3/m4/stdarg.m4 --- grep-3.1/m4/stdarg.m4 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/m4/stdarg.m4 2018-12-15 18:14:26.000000000 +0000 @@ -1,5 +1,5 @@ -# stdarg.m4 serial 6 -dnl Copyright (C) 2006, 2008-2017 Free Software Foundation, Inc. +# stdarg.m4 serial 7 +dnl Copyright (C) 2006, 2008-2018 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,19 +11,19 @@ [ STDARG_H='' NEXT_STDARG_H='' - AC_MSG_CHECKING([for va_copy]) - AC_CACHE_VAL([gl_cv_func_va_copy], [ - AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM( - [[#include ]], - [[ + AC_CACHE_CHECK([for va_copy], + [gl_cv_func_va_copy], + [AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [[#include ]], + [[ #ifndef va_copy void (*func) (va_list, va_list) = va_copy; #endif - ]])], - [gl_cv_func_va_copy=yes], - [gl_cv_func_va_copy=no])]) - AC_MSG_RESULT([$gl_cv_func_va_copy]) + ]])], + [gl_cv_func_va_copy=yes], + [gl_cv_func_va_copy=no]) + ]) if test $gl_cv_func_va_copy = no; then dnl Provide a substitute. dnl Usually a simple definition in is enough. Not so on AIX 5 diff -Nru grep-3.1/m4/stdbool.m4 grep-3.3/m4/stdbool.m4 --- grep-3.1/m4/stdbool.m4 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/m4/stdbool.m4 2018-01-07 00:07:08.000000000 +0000 @@ -1,6 +1,6 @@ # Check for stdbool.h that conforms to C99. -dnl Copyright (C) 2002-2006, 2009-2017 Free Software Foundation, Inc. +dnl Copyright (C) 2002-2006, 2009-2018 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. @@ -87,8 +87,8 @@ char o[sizeof n == m * sizeof n[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 + https://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html + https://lists.gnu.org/r/bug-coreutils/2005-11/msg00161.html */ Bool q = true; Bool *pq = &q; diff -Nru grep-3.1/m4/stddef_h.m4 grep-3.3/m4/stddef_h.m4 --- grep-3.1/m4/stddef_h.m4 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/m4/stddef_h.m4 2018-09-19 05:04:26.000000000 +0000 @@ -1,6 +1,6 @@ dnl A placeholder for , for platforms that have issues. -# stddef_h.m4 serial 5 -dnl Copyright (C) 2009-2017 Free Software Foundation, Inc. +# stddef_h.m4 serial 6 +dnl Copyright (C) 2009-2018 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. @@ -10,13 +10,33 @@ AC_REQUIRE([gl_STDDEF_H_DEFAULTS]) AC_REQUIRE([gt_TYPE_WCHAR_T]) STDDEF_H= - AC_CHECK_TYPE([max_align_t], [], [HAVE_MAX_ALIGN_T=0; STDDEF_H=stddef.h], - [[#include - ]]) + + dnl Test whether the type max_align_t exists and whether its alignment + dnl "is as great as is supported by the implementation in all contexts". + AC_CACHE_CHECK([for good max_align_t], + [gl_cv_type_max_align_t], + [AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [[#include + unsigned int s = sizeof (max_align_t); + #if defined __GNUC__ || defined __IBM__ALIGNOF__ + int check1[2 * (__alignof__ (double) <= __alignof__ (max_align_t)) - 1]; + int check2[2 * (__alignof__ (long double) <= __alignof__ (max_align_t)) - 1]; + #endif + ]])], + [gl_cv_type_max_align_t=yes], + [gl_cv_type_max_align_t=no]) + ]) + if test $gl_cv_type_max_align_t = no; then + HAVE_MAX_ALIGN_T=0 + STDDEF_H=stddef.h + fi + if test $gt_cv_c_wchar_t = no; then HAVE_WCHAR_T=0 STDDEF_H=stddef.h fi + AC_CACHE_CHECK([whether NULL can be used in arbitrary expressions], [gl_cv_decl_null_works], [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include @@ -28,6 +48,7 @@ REPLACE_NULL=1 STDDEF_H=stddef.h fi + AC_SUBST([STDDEF_H]) AM_CONDITIONAL([GL_GENERATE_STDDEF_H], [test -n "$STDDEF_H"]) if test -n "$STDDEF_H"; then diff -Nru grep-3.1/m4/std-gnu11.m4 grep-3.3/m4/std-gnu11.m4 --- grep-3.1/m4/std-gnu11.m4 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/m4/std-gnu11.m4 2018-12-21 02:51:47.000000000 +0000 @@ -7,7 +7,7 @@ # or later is installed everywhere a Gnulib program might be developed. -# Copyright (C) 2001-2017 Free Software Foundation, Inc. +# Copyright (C) 2001-2018 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 @@ -20,7 +20,7 @@ # 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 . +# along with this program. If not, see . # Written by David MacKenzie, with help from # Akim Demaille, Paul Eggert, @@ -70,7 +70,7 @@ set X $ac_compile ac_compiler=$[2] for ac_option in --version -v -V -qversion -version; do - _AC_DO_LIMIT([$ac_compiler $ac_option >&AS_MESSAGE_LOG_FD]) + m4_ifdef([_AC_DO_LIMIT],[_AC_DO_LIMIT],[_AC_DO])([$ac_compiler $ac_option >&AS_MESSAGE_LOG_FD]) done m4_expand_once([_AC_COMPILER_EXEEXT])[]dnl @@ -135,7 +135,7 @@ set X $ac_compile ac_compiler=$[2] for ac_option in --version -v -V -qversion; do - _AC_DO_LIMIT([$ac_compiler $ac_option >&AS_MESSAGE_LOG_FD]) + m4_ifdef([_AC_DO_LIMIT],[_AC_DO_LIMIT],[_AC_DO])([$ac_compiler $ac_option >&AS_MESSAGE_LOG_FD]) done m4_expand_once([_AC_COMPILER_EXEEXT])[]dnl @@ -369,7 +369,7 @@ dnl _STDC_C99, which suppresses a bogus failure in . dnl The resulting compiler passes the test case here, and that's dnl good enough. For more, please see the thread starting at: -dnl http://lists.gnu.org/archive/html/autoconf/2010-12/msg00059.html +dnl https://lists.gnu.org/r/autoconf/2010-12/msg00059.html dnl Tru64 -c99 dnl with extended modes being tried first. [[-std=gnu99 -std=c99 -c99 -AC99 -D_STDC_C99= -qlanglvl=extc1x -qlanglvl=extc99]], [$1], [$2])[]dnl @@ -458,7 +458,7 @@ # -------------- # Do not use AU_ALIAS here and in AC_PROG_CC_C99 and AC_PROG_CC_STDC, # as that'd be incompatible with how Automake redefines AC_PROG_CC. See -# . +# . AU_DEFUN([AC_PROG_CC_C89], [AC_REQUIRE([AC_PROG_CC])], [$0 is obsolete; use AC_PROG_CC] diff -Nru grep-3.1/m4/stdint_h.m4 grep-3.3/m4/stdint_h.m4 --- grep-3.1/m4/stdint_h.m4 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/m4/stdint_h.m4 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ # stdint_h.m4 serial 9 -dnl Copyright (C) 1997-2004, 2006, 2008-2017 Free Software Foundation, Inc. +dnl Copyright (C) 1997-2004, 2006, 2008-2018 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 -Nru grep-3.1/m4/stdint.m4 grep-3.3/m4/stdint.m4 --- grep-3.1/m4/stdint.m4 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/m4/stdint.m4 2018-12-21 02:51:47.000000000 +0000 @@ -1,5 +1,5 @@ -# stdint.m4 serial 50 -dnl Copyright (C) 2001-2017 Free Software Foundation, Inc. +# stdint.m4 serial 53 +dnl Copyright (C) 2001-2018 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,9 +7,12 @@ dnl From Paul Eggert and Bruno Haible. dnl Test whether is supported or must be substituted. +AC_PREREQ([2.61]) + AC_DEFUN_ONCE([gl_STDINT_H], [ AC_PREREQ([2.59])dnl + AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_REQUIRE([gl_LIMITS_H]) AC_REQUIRE([gt_TYPE_WINT_T]) @@ -288,8 +291,12 @@ ]])], [gl_cv_header_working_stdint_h=yes], [], - [dnl When cross-compiling, assume it works. - gl_cv_header_working_stdint_h=yes + [case "$host_os" in + # Guess yes on native Windows. + mingw*) gl_cv_header_working_stdint_h="guessing yes" ;; + # In general, assume it works. + *) gl_cv_header_working_stdint_h="guessing yes" ;; + esac ]) ]) ]) @@ -299,15 +306,16 @@ HAVE_SYS_BITYPES_H=0 HAVE_SYS_INTTYPES_H=0 STDINT_H=stdint.h - if test "$gl_cv_header_working_stdint_h" = yes; then - 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([[ + case "$gl_cv_header_working_stdint_h" in + *yes) + 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 ] @@ -315,49 +323,50 @@ [ intmax_t im = INTMAX_MAX; int32_t i32 = INT32_C (0x7fffffff); - ]])], - [gl_cv_header_stdint_predates_cxx11_h=no])]) + ]])], + [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 - fi - if test $ac_cv_header_sys_bitypes_h = yes; then - HAVE_SYS_BITYPES_H=1 - fi - gl_STDINT_TYPE_PROPERTIES - fi + 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 + ;; + *) + 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 + fi + if test $ac_cv_header_sys_bitypes_h = yes; then + HAVE_SYS_BITYPES_H=1 + fi + gl_STDINT_TYPE_PROPERTIES + ;; + esac 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"]) + gl_REPLACE_LIMITS_H AC_SUBST([HAVE_C99_STDINT_H]) AC_SUBST([HAVE_SYS_BITYPES_H]) @@ -533,9 +542,3 @@ BITSIZEOF_WINT_T=32 fi ]) - -dnl Autoconf >= 2.61 has AC_COMPUTE_INT built-in. -dnl Remove this when we can assume autoconf >= 2.61. -m4_ifdef([AC_COMPUTE_INT], [], [ - AC_DEFUN([AC_COMPUTE_INT], [_AC_COMPUTE_INT([$2],[$1],[$3],[$4])]) -]) diff -Nru grep-3.1/m4/stdio_h.m4 grep-3.3/m4/stdio_h.m4 --- grep-3.1/m4/stdio_h.m4 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/m4/stdio_h.m4 2018-06-24 23:16:49.000000000 +0000 @@ -1,5 +1,5 @@ -# stdio_h.m4 serial 48 -dnl Copyright (C) 2007-2017 Free Software Foundation, Inc. +# stdio_h.m4 serial 49 +dnl Copyright (C) 2007-2018 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. @@ -28,7 +28,7 @@ /* 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__) && \ + #if (defined _WIN32 && ! defined __CYGWIN__) && \ (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) extern char PRIdMAX_probe[sizeof PRIdMAX == sizeof "I64d" ? 1 : -1]; #endif diff -Nru grep-3.1/m4/stdlib_h.m4 grep-3.3/m4/stdlib_h.m4 --- grep-3.1/m4/stdlib_h.m4 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/m4/stdlib_h.m4 2018-02-26 06:09:46.000000000 +0000 @@ -1,5 +1,5 @@ -# stdlib_h.m4 serial 43 -dnl Copyright (C) 2007-2017 Free Software Foundation, Inc. +# stdlib_h.m4 serial 45 +dnl Copyright (C) 2007-2018 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. @@ -14,6 +14,9 @@ dnl guaranteed by C89. gl_WARN_ON_USE_PREPARE([[#include #if HAVE_SYS_LOADAVG_H +/* OpenIndiana has a bug: must be included before + . */ +# include # include #endif #if HAVE_RANDOM_H @@ -21,9 +24,9 @@ #endif ]], [_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]) + posix_openpt ptsname ptsname_r qsort_r random random_r reallocarray + realpath rpmatch secure_getenv setenv setstate setstate_r srandom + srandom_r strtod strtoll strtoull unlockpt unsetenv]) ]) AC_DEFUN([gl_STDLIB_MODULE_INDICATOR], @@ -58,6 +61,7 @@ GNULIB_QSORT_R=0; AC_SUBST([GNULIB_QSORT_R]) GNULIB_RANDOM=0; AC_SUBST([GNULIB_RANDOM]) GNULIB_RANDOM_R=0; AC_SUBST([GNULIB_RANDOM_R]) + GNULIB_REALLOCARRAY=0; AC_SUBST([GNULIB_REALLOCARRAY]) GNULIB_REALLOC_POSIX=0; AC_SUBST([GNULIB_REALLOC_POSIX]) GNULIB_REALPATH=0; AC_SUBST([GNULIB_REALPATH]) GNULIB_RPMATCH=0; AC_SUBST([GNULIB_RPMATCH]) @@ -77,6 +81,7 @@ HAVE_DECL_GETLOADAVG=1; AC_SUBST([HAVE_DECL_GETLOADAVG]) HAVE_GETSUBOPT=1; AC_SUBST([HAVE_GETSUBOPT]) HAVE_GRANTPT=1; AC_SUBST([HAVE_GRANTPT]) + HAVE_DECL_INITSTATE=1; AC_SUBST([HAVE_DECL_INITSTATE]) HAVE_MKDTEMP=1; AC_SUBST([HAVE_MKDTEMP]) HAVE_MKOSTEMP=1; AC_SUBST([HAVE_MKOSTEMP]) HAVE_MKOSTEMPS=1; AC_SUBST([HAVE_MKOSTEMPS]) @@ -89,11 +94,13 @@ 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]) + HAVE_REALLOCARRAY=1; AC_SUBST([HAVE_REALLOCARRAY]) HAVE_REALPATH=1; AC_SUBST([HAVE_REALPATH]) HAVE_RPMATCH=1; AC_SUBST([HAVE_RPMATCH]) HAVE_SECURE_GETENV=1; AC_SUBST([HAVE_SECURE_GETENV]) HAVE_SETENV=1; AC_SUBST([HAVE_SETENV]) HAVE_DECL_SETENV=1; AC_SUBST([HAVE_DECL_SETENV]) + HAVE_DECL_SETSTATE=1; AC_SUBST([HAVE_DECL_SETSTATE]) HAVE_STRTOD=1; AC_SUBST([HAVE_STRTOD]) HAVE_STRTOLL=1; AC_SUBST([HAVE_STRTOLL]) HAVE_STRTOULL=1; AC_SUBST([HAVE_STRTOULL]) diff -Nru grep-3.1/m4/stpcpy.m4 grep-3.3/m4/stpcpy.m4 --- grep-3.1/m4/stpcpy.m4 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/m4/stpcpy.m4 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ # stpcpy.m4 serial 8 -dnl Copyright (C) 2002, 2007, 2009-2017 Free Software Foundation, Inc. +dnl Copyright (C) 2002, 2007, 2009-2018 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 -Nru grep-3.1/m4/strdup.m4 grep-3.3/m4/strdup.m4 --- grep-3.1/m4/strdup.m4 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/m4/strdup.m4 2018-01-07 00:07:08.000000000 +0000 @@ -1,6 +1,6 @@ # strdup.m4 serial 13 -dnl Copyright (C) 2002-2017 Free Software Foundation, Inc. +dnl Copyright (C) 2002-2018 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 -Nru grep-3.1/m4/strerror.m4 grep-3.3/m4/strerror.m4 --- grep-3.1/m4/strerror.m4 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/m4/strerror.m4 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ -# strerror.m4 serial 17 -dnl Copyright (C) 2002, 2007-2017 Free Software Foundation, Inc. +# strerror.m4 serial 19 +dnl Copyright (C) 2002, 2007-2018 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. @@ -24,10 +24,10 @@ [gl_cv_func_working_strerror=yes], [gl_cv_func_working_strerror=no], [case "$host_os" in - # Guess yes on glibc systems. - *-gnu*) gl_cv_func_working_strerror="guessing yes" ;; - # If we don't know, assume the worst. - *) gl_cv_func_working_strerror="guessing no" ;; + # Guess yes on glibc systems. + *-gnu* | gnu*) gl_cv_func_working_strerror="guessing yes" ;; + # If we don't know, assume the worst. + *) gl_cv_func_working_strerror="guessing no" ;; esac ]) ]) @@ -78,10 +78,12 @@ [gl_cv_func_strerror_0_works=yes], [gl_cv_func_strerror_0_works=no], [case "$host_os" in - # Guess yes on glibc systems. - *-gnu*) gl_cv_func_strerror_0_works="guessing yes" ;; - # If we don't know, assume the worst. - *) gl_cv_func_strerror_0_works="guessing no" ;; + # Guess yes on glibc systems. + *-gnu* | gnu*) gl_cv_func_strerror_0_works="guessing yes" ;; + # Guess yes on native Windows. + mingw*) gl_cv_func_strerror_0_works="guessing yes" ;; + # If we don't know, assume the worst. + *) gl_cv_func_strerror_0_works="guessing no" ;; esac ]) ]) diff -Nru grep-3.1/m4/strerror_r.m4 grep-3.3/m4/strerror_r.m4 --- grep-3.1/m4/strerror_r.m4 1970-01-01 00:00:00.000000000 +0000 +++ grep-3.3/m4/strerror_r.m4 2018-01-07 00:07:08.000000000 +0000 @@ -0,0 +1,173 @@ +# strerror_r.m4 serial 19 +dnl Copyright (C) 2002, 2007-2018 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_STRERROR_R], +[ + AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS]) + AC_REQUIRE([gl_FUNC_STRERROR_R_WORKS]) + + dnl Persuade Solaris to declare strerror_r(). + AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) + + dnl Some systems don't declare strerror_r() if _THREAD_SAFE and _REENTRANT + dnl are not defined. + AC_CHECK_DECLS_ONCE([strerror_r]) + if test $ac_cv_have_decl_strerror_r = no; then + HAVE_DECL_STRERROR_R=0 + fi + + if test $ac_cv_func_strerror_r = yes; then + if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then + if test $gl_cv_func_strerror_r_posix_signature = yes; then + case "$gl_cv_func_strerror_r_works" in + dnl The system's strerror_r has bugs. Replace it. + *no) REPLACE_STRERROR_R=1 ;; + esac + else + dnl The system's strerror_r() has a wrong signature. Replace it. + REPLACE_STRERROR_R=1 + fi + else + dnl The system's strerror_r() cannot know about the new errno values we + dnl add to , or any fix for strerror(0). Replace it. + REPLACE_STRERROR_R=1 + fi + fi +]) + +# Prerequisites of lib/strerror_r.c. +AC_DEFUN([gl_PREREQ_STRERROR_R], [ + dnl glibc >= 2.3.4 and cygwin 1.7.9 have a function __xpg_strerror_r. + AC_CHECK_FUNCS_ONCE([__xpg_strerror_r]) + AC_CHECK_FUNCS_ONCE([catgets]) + AC_CHECK_FUNCS_ONCE([snprintf]) +]) + +# Detect if strerror_r works, but without affecting whether a replacement +# strerror_r will be used. +AC_DEFUN([gl_FUNC_STRERROR_R_WORKS], +[ + AC_REQUIRE([gl_HEADER_ERRNO_H]) + AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles + AC_REQUIRE([gl_FUNC_STRERROR_0]) + + AC_CHECK_FUNCS_ONCE([strerror_r]) + if test $ac_cv_func_strerror_r = yes; then + if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then + dnl The POSIX prototype is: int strerror_r (int, char *, size_t); + dnl glibc, Cygwin: char *strerror_r (int, char *, size_t); + dnl AIX 5.1, OSF/1 5.1: int strerror_r (int, char *, int); + AC_CACHE_CHECK([for strerror_r with POSIX signature], + [gl_cv_func_strerror_r_posix_signature], + [AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [[#include + int strerror_r (int, char *, size_t); + ]], + [])], + [gl_cv_func_strerror_r_posix_signature=yes], + [gl_cv_func_strerror_r_posix_signature=no]) + ]) + if test $gl_cv_func_strerror_r_posix_signature = yes; then + dnl AIX 6.1 strerror_r fails by returning -1, not an error number. + dnl HP-UX 11.31 strerror_r always fails when the buffer length argument + dnl is less than 80. + dnl FreeBSD 8.s strerror_r claims failure on 0 + dnl Mac OS X 10.5 strerror_r treats 0 like -1 + dnl Solaris 10 strerror_r corrupts errno on failure + AC_CACHE_CHECK([whether strerror_r works], + [gl_cv_func_strerror_r_works], + [AC_RUN_IFELSE( + [AC_LANG_PROGRAM( + [[#include + #include + ]], + [[int result = 0; + char buf[79]; + if (strerror_r (EACCES, buf, 0) < 0) + result |= 1; + errno = 0; + if (strerror_r (EACCES, buf, sizeof buf) != 0) + result |= 2; + strcpy (buf, "Unknown"); + if (strerror_r (0, buf, sizeof buf) != 0) + result |= 4; + if (errno) + result |= 8; + if (strstr (buf, "nknown") || strstr (buf, "ndefined")) + result |= 0x10; + errno = 0; + *buf = 0; + if (strerror_r (-3, buf, sizeof buf) < 0) + result |= 0x20; + if (errno) + result |= 0x40; + if (!*buf) + result |= 0x80; + return result; + ]])], + [gl_cv_func_strerror_r_works=yes], + [gl_cv_func_strerror_r_works=no], + [ +changequote(,)dnl + case "$host_os" in + # Guess no on AIX. + aix*) gl_cv_func_strerror_r_works="guessing no";; + # Guess no on HP-UX. + hpux*) gl_cv_func_strerror_r_works="guessing no";; + # Guess no on BSD variants. + *bsd*) gl_cv_func_strerror_r_works="guessing no";; + # Guess yes otherwise. + *) gl_cv_func_strerror_r_works="guessing yes";; + esac +changequote([,])dnl + ]) + ]) + else + dnl The system's strerror() has a wrong signature. + dnl glibc >= 2.3.4 and cygwin 1.7.9 have a function __xpg_strerror_r. + AC_CHECK_FUNCS_ONCE([__xpg_strerror_r]) + dnl In glibc < 2.14, __xpg_strerror_r does not populate buf on failure. + dnl In cygwin < 1.7.10, __xpg_strerror_r clobbers strerror's buffer. + if test $ac_cv_func___xpg_strerror_r = yes; then + AC_CACHE_CHECK([whether __xpg_strerror_r works], + [gl_cv_func_strerror_r_works], + [AC_RUN_IFELSE( + [AC_LANG_PROGRAM( + [[#include + #include + extern + #ifdef __cplusplus + "C" + #endif + int __xpg_strerror_r(int, char *, size_t); + ]], + [[int result = 0; + char buf[256] = "^"; + char copy[256]; + char *str = strerror (-1); + strcpy (copy, str); + if (__xpg_strerror_r (-2, buf, 1) == 0) + result |= 1; + if (*buf) + result |= 2; + __xpg_strerror_r (-2, buf, 256); + if (strcmp (str, copy)) + result |= 4; + return result; + ]])], + [gl_cv_func_strerror_r_works=yes], + [gl_cv_func_strerror_r_works=no], + [dnl Guess no on all platforms that have __xpg_strerror_r, + dnl at least until fixed glibc and cygwin are more common. + gl_cv_func_strerror_r_works="guessing no" + ]) + ]) + fi + fi + fi + fi +]) diff -Nru grep-3.1/m4/string_h.m4 grep-3.3/m4/string_h.m4 --- grep-3.1/m4/string_h.m4 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/m4/string_h.m4 2018-01-07 00:07:08.000000000 +0000 @@ -1,11 +1,11 @@ # Configure a GNU-like replacement for . -# Copyright (C) 2007-2017 Free Software Foundation, Inc. +# Copyright (C) 2007-2018 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 21 +# serial 22 # Written by Paul Eggert. @@ -43,6 +43,7 @@ AC_DEFUN([gl_HEADER_STRING_H_DEFAULTS], [ + GNULIB_EXPLICIT_BZERO=0; AC_SUBST([GNULIB_EXPLICIT_BZERO]) GNULIB_FFSL=0; AC_SUBST([GNULIB_FFSL]) GNULIB_FFSLL=0; AC_SUBST([GNULIB_FFSLL]) GNULIB_MEMCHR=0; AC_SUBST([GNULIB_MEMCHR]) @@ -82,6 +83,7 @@ GNULIB_STRVERSCMP=0; AC_SUBST([GNULIB_STRVERSCMP]) HAVE_MBSLEN=0; AC_SUBST([HAVE_MBSLEN]) dnl Assume proper GNU behavior unless another module says otherwise. + HAVE_EXPLICIT_BZERO=1; AC_SUBST([HAVE_EXPLICIT_BZERO]) HAVE_FFSL=1; AC_SUBST([HAVE_FFSL]) HAVE_FFSLL=1; AC_SUBST([HAVE_FFSLL]) HAVE_MEMCHR=1; AC_SUBST([HAVE_MEMCHR]) @@ -105,16 +107,16 @@ REPLACE_MEMCHR=0; AC_SUBST([REPLACE_MEMCHR]) REPLACE_MEMMEM=0; AC_SUBST([REPLACE_MEMMEM]) REPLACE_STPNCPY=0; AC_SUBST([REPLACE_STPNCPY]) + REPLACE_STRCHRNUL=0; AC_SUBST([REPLACE_STRCHRNUL]) REPLACE_STRDUP=0; AC_SUBST([REPLACE_STRDUP]) + REPLACE_STRNCAT=0; AC_SUBST([REPLACE_STRNCAT]) + REPLACE_STRNDUP=0; AC_SUBST([REPLACE_STRNDUP]) + REPLACE_STRNLEN=0; AC_SUBST([REPLACE_STRNLEN]) REPLACE_STRSTR=0; AC_SUBST([REPLACE_STRSTR]) REPLACE_STRCASESTR=0; AC_SUBST([REPLACE_STRCASESTR]) - REPLACE_STRCHRNUL=0; AC_SUBST([REPLACE_STRCHRNUL]) + REPLACE_STRTOK_R=0; AC_SUBST([REPLACE_STRTOK_R]) REPLACE_STRERROR=0; AC_SUBST([REPLACE_STRERROR]) REPLACE_STRERROR_R=0; AC_SUBST([REPLACE_STRERROR_R]) - REPLACE_STRNCAT=0; AC_SUBST([REPLACE_STRNCAT]) - REPLACE_STRNDUP=0; AC_SUBST([REPLACE_STRNDUP]) - REPLACE_STRNLEN=0; AC_SUBST([REPLACE_STRNLEN]) REPLACE_STRSIGNAL=0; AC_SUBST([REPLACE_STRSIGNAL]) - REPLACE_STRTOK_R=0; AC_SUBST([REPLACE_STRTOK_R]) UNDEFINE_STRTOK_R=0; AC_SUBST([UNDEFINE_STRTOK_R]) ]) diff -Nru grep-3.1/m4/strnlen.m4 grep-3.3/m4/strnlen.m4 --- grep-3.1/m4/strnlen.m4 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/m4/strnlen.m4 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ # strnlen.m4 serial 13 -dnl Copyright (C) 2002-2003, 2005-2007, 2009-2017 Free Software Foundation, +dnl Copyright (C) 2002-2003, 2005-2007, 2009-2018 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 -Nru grep-3.1/m4/strstr.m4 grep-3.3/m4/strstr.m4 --- grep-3.1/m4/strstr.m4 2017-05-21 00:31:28.000000000 +0000 +++ grep-3.3/m4/strstr.m4 2018-09-19 05:04:26.000000000 +0000 @@ -1,5 +1,5 @@ -# strstr.m4 serial 18 -dnl Copyright (C) 2008-2017 Free Software Foundation, Inc. +# strstr.m4 serial 20 +dnl Copyright (C) 2008-2018 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. @@ -9,28 +9,37 @@ [ AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS]) AC_REQUIRE([gl_FUNC_MEMCHR]) - if test "$gl_cv_func_memchr_works" != yes; then + if test $HAVE_MEMCHR = 0 || test $REPLACE_MEMCHR = 1; then REPLACE_STRSTR=1 else - dnl Detect http://sourceware.org/bugzilla/show_bug.cgi?id=12092. + dnl Detect https://sourceware.org/bugzilla/show_bug.cgi?id=12092 + dnl and https://sourceware.org/bugzilla/show_bug.cgi?id=23637. AC_CACHE_CHECK([whether strstr works], [gl_cv_func_strstr_works_always], - [AC_RUN_IFELSE([AC_LANG_PROGRAM([[ + [AC_RUN_IFELSE( + [AC_LANG_PROGRAM([[ #include /* for strstr */ +#ifdef __GNU_LIBRARY__ + #include + #if __GLIBC__ == 2 && __GLIBC_MINOR__ == 28 + Unlucky user + #endif +#endif #define P "_EF_BF_BD" #define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P #define NEEDLE P P P P P -]], [[return !!strstr (HAYSTACK, NEEDLE); - ]])], - [gl_cv_func_strstr_works_always=yes], - [gl_cv_func_strstr_works_always=no], - [dnl glibc 2.12 and cygwin 1.7.7 have a known bug. uClibc is not - dnl affected, since it uses different source code for strstr than - dnl glibc. - dnl Assume that it works on all other platforms, even if it is not - dnl linear. - AC_EGREP_CPP([Lucky user], - [ +]], + [[return !!strstr (HAYSTACK, NEEDLE); + ]])], + [gl_cv_func_strstr_works_always=yes], + [gl_cv_func_strstr_works_always=no], + [dnl glibc 2.12 and cygwin 1.7.7 have a known bug. uClibc is not + dnl affected, since it uses different source code for strstr than + dnl glibc. + dnl Assume that it works on all other platforms, even if it is not + dnl linear. + AC_EGREP_CPP([Lucky user], + [ #ifdef __GNU_LIBRARY__ #include #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \ @@ -45,10 +54,10 @@ #else Lucky user #endif - ], - [gl_cv_func_strstr_works_always="guessing yes"], - [gl_cv_func_strstr_works_always="guessing no"]) - ]) + ], + [gl_cv_func_strstr_works_always="guessing yes"], + [gl_cv_func_strstr_works_always="guessing no"]) + ]) ]) case "$gl_cv_func_strstr_works_always" in *yes) ;; diff -Nru grep-3.1/m4/strtoimax.m4 grep-3.3/m4/strtoimax.m4 --- grep-3.1/m4/strtoimax.m4 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/m4/strtoimax.m4 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ -# strtoimax.m4 serial 14 -dnl Copyright (C) 2002-2004, 2006, 2009-2017 Free Software Foundation, Inc. +# strtoimax.m4 serial 15 +dnl Copyright (C) 2002-2004, 2006, 2009-2018 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. @@ -61,10 +61,12 @@ [gl_cv_func_strtoimax=yes], [gl_cv_func_strtoimax=no], [case "$host_os" in - # Guess no on AIX 5. - aix5*) gl_cv_func_strtoimax="guessing no" ;; - # Guess yes otherwise. - *) gl_cv_func_strtoimax="guessing yes" ;; + # Guess no on AIX 5. + aix5*) gl_cv_func_strtoimax="guessing no" ;; + # Guess yes on native Windows. + mingw*) gl_cv_func_strtoimax="guessing yes" ;; + # Guess yes otherwise. + *) gl_cv_func_strtoimax="guessing yes" ;; esac ]) ]) diff -Nru grep-3.1/m4/strtoll.m4 grep-3.3/m4/strtoll.m4 --- grep-3.1/m4/strtoll.m4 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/m4/strtoll.m4 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ # strtoll.m4 serial 7 -dnl Copyright (C) 2002, 2004, 2006, 2008-2017 Free Software Foundation, Inc. +dnl Copyright (C) 2002, 2004, 2006, 2008-2018 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 -Nru grep-3.1/m4/strtoull.m4 grep-3.3/m4/strtoull.m4 --- grep-3.1/m4/strtoull.m4 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/m4/strtoull.m4 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ # strtoull.m4 serial 7 -dnl Copyright (C) 2002, 2004, 2006, 2008-2017 Free Software Foundation, Inc. +dnl Copyright (C) 2002, 2004, 2006, 2008-2018 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 -Nru grep-3.1/m4/strtoumax.m4 grep-3.3/m4/strtoumax.m4 --- grep-3.1/m4/strtoumax.m4 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/m4/strtoumax.m4 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ # strtoumax.m4 serial 12 -dnl Copyright (C) 2002-2004, 2006, 2009-2017 Free Software Foundation, Inc. +dnl Copyright (C) 2002-2004, 2006, 2009-2018 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 -Nru grep-3.1/m4/symlink.m4 grep-3.3/m4/symlink.m4 --- grep-3.1/m4/symlink.m4 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/m4/symlink.m4 2018-09-19 05:04:26.000000000 +0000 @@ -1,7 +1,7 @@ -# serial 6 +# serial 8 # See if we need to provide symlink replacement. -dnl Copyright (C) 2009-2017 Free Software Foundation, Inc. +dnl Copyright (C) 2009-2018 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. @@ -36,10 +36,12 @@ ]])], [gl_cv_func_symlink_works=yes], [gl_cv_func_symlink_works=no], [case "$host_os" in - # Guess yes on glibc systems. - *-gnu*) gl_cv_func_symlink_works="guessing yes" ;; - # If we don't know, assume the worst. - *) gl_cv_func_symlink_works="guessing no" ;; + # Guess yes on Linux systems. + linux-* | linux) gl_cv_func_symlink_works="guessing yes" ;; + # Guess yes on glibc systems. + *-gnu* | gnu*) gl_cv_func_symlink_works="guessing yes" ;; + # If we don't know, assume the worst. + *) gl_cv_func_symlink_works="guessing no" ;; esac ]) rm -f conftest.f conftest.link conftest.lnk2]) diff -Nru grep-3.1/m4/sys_ioctl_h.m4 grep-3.3/m4/sys_ioctl_h.m4 --- grep-3.1/m4/sys_ioctl_h.m4 1970-01-01 00:00:00.000000000 +0000 +++ grep-3.3/m4/sys_ioctl_h.m4 2018-01-07 00:07:08.000000000 +0000 @@ -0,0 +1,64 @@ +# sys_ioctl_h.m4 serial 10 +dnl Copyright (C) 2008-2018 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 Bruno Haible. + +AC_DEFUN([gl_SYS_IOCTL_H], +[ + dnl Use AC_REQUIRE here, so that the default behavior below is expanded + dnl once only, before all statements that occur in other macros. + AC_REQUIRE([gl_SYS_IOCTL_H_DEFAULTS]) + + AC_CHECK_HEADERS_ONCE([sys/ioctl.h]) + if test $ac_cv_header_sys_ioctl_h = yes; then + HAVE_SYS_IOCTL_H=1 + dnl Test whether declares ioctl(), or whether some other + dnl header file, such as or , is needed for that. + AC_CACHE_CHECK([whether declares ioctl], + [gl_cv_decl_ioctl_in_sys_ioctl_h], + [dnl We cannot use AC_CHECK_DECL because it produces its own messages. + AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [AC_INCLUDES_DEFAULT([#include ])], + [(void) ioctl;])], + [gl_cv_decl_ioctl_in_sys_ioctl_h=yes], + [gl_cv_decl_ioctl_in_sys_ioctl_h=no]) + ]) + else + HAVE_SYS_IOCTL_H=0 + fi + AC_SUBST([HAVE_SYS_IOCTL_H]) + dnl is always overridden, because of GNULIB_POSIXCHECK. + gl_CHECK_NEXT_HEADERS([sys/ioctl.h]) + + 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 +/* Some platforms declare ioctl in the wrong header. */ +#if !(defined __GLIBC__ && !defined __UCLIBC__) +# include +#endif + ]], [ioctl]) +]) + +AC_DEFUN([gl_SYS_IOCTL_MODULE_INDICATOR], +[ + dnl Use AC_REQUIRE here, so that the default settings are expanded once only. + AC_REQUIRE([gl_SYS_IOCTL_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_SYS_IOCTL_H_DEFAULTS], +[ + GNULIB_IOCTL=0; AC_SUBST([GNULIB_IOCTL]) + dnl Assume proper GNU behavior unless another module says otherwise. + SYS_IOCTL_H_HAVE_WINSOCK2_H=0; AC_SUBST([SYS_IOCTL_H_HAVE_WINSOCK2_H]) + SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0; + AC_SUBST([SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS]) + REPLACE_IOCTL=0; AC_SUBST([REPLACE_IOCTL]) +]) diff -Nru grep-3.1/m4/sys_select_h.m4 grep-3.3/m4/sys_select_h.m4 --- grep-3.1/m4/sys_select_h.m4 1970-01-01 00:00:00.000000000 +0000 +++ grep-3.3/m4/sys_select_h.m4 2018-01-07 00:07:08.000000000 +0000 @@ -0,0 +1,95 @@ +# sys_select_h.m4 serial 20 +dnl Copyright (C) 2006-2018 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_HEADER_SYS_SELECT], +[ + AC_REQUIRE([AC_C_RESTRICT]) + AC_REQUIRE([gl_SYS_SELECT_H_DEFAULTS]) + AC_CACHE_CHECK([whether is self-contained], + [gl_cv_header_sys_select_h_selfcontained], + [ + dnl Test against two bugs: + dnl 1. On many platforms, assumes prior inclusion of + dnl . + dnl 2. On OSF/1 4.0, provides only a forward declaration + dnl of 'struct timeval', and no definition of this type. + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], + [[struct timeval b;]])], + [gl_cv_header_sys_select_h_selfcontained=yes], + [gl_cv_header_sys_select_h_selfcontained=no]) + dnl Test against another bug: + dnl 3. On Solaris 10, provides an FD_ZERO implementation + dnl that relies on memset(), but without including . + if test $gl_cv_header_sys_select_h_selfcontained = yes; then + AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM([[#include ]], + [[int memset; int bzero;]]) + ], + [AC_LINK_IFELSE( + [AC_LANG_PROGRAM([[#include ]], [[ + #undef memset + #define memset nonexistent_memset + extern + #ifdef __cplusplus + "C" + #endif + void *memset (void *, int, unsigned long); + #undef bzero + #define bzero nonexistent_bzero + extern + #ifdef __cplusplus + "C" + #endif + void bzero (void *, unsigned long); + fd_set fds; + FD_ZERO (&fds); + ]]) + ], + [], + [gl_cv_header_sys_select_h_selfcontained=no]) + ]) + fi + ]) + dnl is always overridden, because of GNULIB_POSIXCHECK. + gl_CHECK_NEXT_HEADERS([sys/select.h]) + if test $ac_cv_header_sys_select_h = yes; then + HAVE_SYS_SELECT_H=1 + else + HAVE_SYS_SELECT_H=0 + fi + AC_SUBST([HAVE_SYS_SELECT_H]) + gl_PREREQ_SYS_H_WINSOCK2 + + 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([[ +/* Some systems require prerequisite headers. */ +#include +#if !(defined __GLIBC__ && !defined __UCLIBC__) && HAVE_SYS_TIME_H +# include +#endif +#include + ]], [pselect select]) +]) + +AC_DEFUN([gl_SYS_SELECT_MODULE_INDICATOR], +[ + dnl Use AC_REQUIRE here, so that the default settings are expanded once only. + AC_REQUIRE([gl_SYS_SELECT_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_SYS_SELECT_H_DEFAULTS], +[ + GNULIB_PSELECT=0; AC_SUBST([GNULIB_PSELECT]) + GNULIB_SELECT=0; AC_SUBST([GNULIB_SELECT]) + dnl Assume proper GNU behavior unless another module says otherwise. + HAVE_PSELECT=1; AC_SUBST([HAVE_PSELECT]) + REPLACE_PSELECT=0; AC_SUBST([REPLACE_PSELECT]) + REPLACE_SELECT=0; AC_SUBST([REPLACE_SELECT]) +]) diff -Nru grep-3.1/m4/sys_socket_h.m4 grep-3.3/m4/sys_socket_h.m4 --- grep-3.1/m4/sys_socket_h.m4 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/m4/sys_socket_h.m4 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ # sys_socket_h.m4 serial 23 -dnl Copyright (C) 2005-2017 Free Software Foundation, Inc. +dnl Copyright (C) 2005-2018 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 -Nru grep-3.1/m4/sys_stat_h.m4 grep-3.3/m4/sys_stat_h.m4 --- grep-3.1/m4/sys_stat_h.m4 2017-05-14 01:09:51.000000000 +0000 +++ grep-3.3/m4/sys_stat_h.m4 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ # sys_stat_h.m4 serial 31 -*- Autoconf -*- -dnl Copyright (C) 2006-2017 Free Software Foundation, Inc. +dnl Copyright (C) 2006-2018 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 -Nru grep-3.1/m4/sys_time_h.m4 grep-3.3/m4/sys_time_h.m4 --- grep-3.1/m4/sys_time_h.m4 1970-01-01 00:00:00.000000000 +0000 +++ grep-3.3/m4/sys_time_h.m4 2018-01-07 00:07:08.000000000 +0000 @@ -0,0 +1,110 @@ +# Configure a replacement for . +# serial 9 + +# Copyright (C) 2007, 2009-2018 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 and Martin Lambers. + +AC_DEFUN([gl_HEADER_SYS_TIME_H], +[ + dnl Use AC_REQUIRE here, so that the REPLACE_GETTIMEOFDAY=0 statement + dnl below is expanded once only, before all REPLACE_GETTIMEOFDAY=1 + dnl statements that occur in other macros. + AC_REQUIRE([gl_HEADER_SYS_TIME_H_BODY]) +]) + +AC_DEFUN([gl_HEADER_SYS_TIME_H_BODY], +[ + AC_REQUIRE([AC_C_RESTRICT]) + AC_REQUIRE([gl_HEADER_SYS_TIME_H_DEFAULTS]) + AC_CHECK_HEADERS_ONCE([sys/time.h]) + gl_CHECK_NEXT_HEADERS([sys/time.h]) + + if test $ac_cv_header_sys_time_h != yes; then + HAVE_SYS_TIME_H=0 + fi + + dnl On native Windows with MSVC, 'struct timeval' is defined in + dnl only. So include that header in the list. + gl_PREREQ_SYS_H_WINSOCK2 + AC_CACHE_CHECK([for struct timeval], [gl_cv_sys_struct_timeval], + [AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [[#if HAVE_SYS_TIME_H + #include + #endif + #include + #if HAVE_WINSOCK2_H + # include + #endif + ]], + [[static struct timeval x; x.tv_sec = x.tv_usec;]])], + [gl_cv_sys_struct_timeval=yes], + [gl_cv_sys_struct_timeval=no]) + ]) + if test $gl_cv_sys_struct_timeval != yes; then + HAVE_STRUCT_TIMEVAL=0 + else + dnl On native Windows with a 64-bit 'time_t', 'struct timeval' is defined + dnl (in and for mingw64, in only + dnl for MSVC) with a tv_sec field of type 'long' (32-bit!), which is + dnl smaller than the 'time_t' type mandated by POSIX. + dnl On OpenBSD 5.1 amd64, tv_sec is 64 bits and time_t 32 bits, but + dnl that is good enough. + AC_CACHE_CHECK([for wide-enough struct timeval.tv_sec member], + [gl_cv_sys_struct_timeval_tv_sec], + [AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [[#if HAVE_SYS_TIME_H + #include + #endif + #include + #if HAVE_WINSOCK2_H + # include + #endif + ]], + [[static struct timeval x; + typedef int verify_tv_sec_type[ + sizeof (time_t) <= sizeof x.tv_sec ? 1 : -1 + ]; + ]])], + [gl_cv_sys_struct_timeval_tv_sec=yes], + [gl_cv_sys_struct_timeval_tv_sec=no]) + ]) + if test $gl_cv_sys_struct_timeval_tv_sec != yes; then + REPLACE_STRUCT_TIMEVAL=1 + fi + 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([[ +#if HAVE_SYS_TIME_H +# include +#endif +#include + ]], [gettimeofday]) +]) + +AC_DEFUN([gl_SYS_TIME_MODULE_INDICATOR], +[ + dnl Use AC_REQUIRE here, so that the default settings are expanded once only. + AC_REQUIRE([gl_HEADER_SYS_TIME_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_HEADER_SYS_TIME_H_DEFAULTS], +[ + GNULIB_GETTIMEOFDAY=0; AC_SUBST([GNULIB_GETTIMEOFDAY]) + dnl Assume POSIX behavior unless another module says otherwise. + HAVE_GETTIMEOFDAY=1; AC_SUBST([HAVE_GETTIMEOFDAY]) + HAVE_STRUCT_TIMEVAL=1; AC_SUBST([HAVE_STRUCT_TIMEVAL]) + HAVE_SYS_TIME_H=1; AC_SUBST([HAVE_SYS_TIME_H]) + REPLACE_GETTIMEOFDAY=0; AC_SUBST([REPLACE_GETTIMEOFDAY]) + REPLACE_STRUCT_TIMEVAL=0; AC_SUBST([REPLACE_STRUCT_TIMEVAL]) +]) diff -Nru grep-3.1/m4/sys_types_h.m4 grep-3.3/m4/sys_types_h.m4 --- grep-3.1/m4/sys_types_h.m4 2017-06-10 16:44:24.000000000 +0000 +++ grep-3.3/m4/sys_types_h.m4 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ -# sys_types_h.m4 serial 8 -dnl Copyright (C) 2011-2017 Free Software Foundation, Inc. +# sys_types_h.m4 serial 9 +dnl Copyright (C) 2011-2018 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,12 +35,12 @@ ]) # This works around a buggy version in autoconf <= 2.69. -# See +# 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 +# https://git.savannah.gnu.org/cgit/autoconf.git/commit/?id=e17a30e987d7ee695fb4294a82d987ec3dc9b974 m4_undefine([AC_HEADER_MAJOR]) AC_DEFUN([AC_HEADER_MAJOR], diff -Nru grep-3.1/m4/sys_uio_h.m4 grep-3.3/m4/sys_uio_h.m4 --- grep-3.1/m4/sys_uio_h.m4 1970-01-01 00:00:00.000000000 +0000 +++ grep-3.3/m4/sys_uio_h.m4 2018-01-07 00:07:08.000000000 +0000 @@ -0,0 +1,31 @@ +# sys_uio_h.m4 serial 1 +dnl Copyright (C) 2011-2018 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_HEADER_SYS_UIO], +[ + AC_REQUIRE([gl_SYS_UIO_H_DEFAULTS]) + dnl is always overridden, because of GNULIB_POSIXCHECK. + gl_CHECK_NEXT_HEADERS([sys/uio.h]) + if test $ac_cv_header_sys_uio_h = yes; then + HAVE_SYS_UIO_H=1 + else + HAVE_SYS_UIO_H=0 + fi + AC_SUBST([HAVE_SYS_UIO_H]) +]) + +AC_DEFUN([gl_SYS_UIO_MODULE_INDICATOR], +[ + dnl Use AC_REQUIRE here, so that the default settings are expanded once only. + AC_REQUIRE([gl_SYS_UIO_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_SYS_UIO_H_DEFAULTS], +[ +]) diff -Nru grep-3.1/m4/threadlib.m4 grep-3.3/m4/threadlib.m4 --- grep-3.1/m4/threadlib.m4 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/m4/threadlib.m4 2018-12-21 02:51:47.000000000 +0000 @@ -1,11 +1,13 @@ -# threadlib.m4 serial 12 -dnl Copyright (C) 2005-2017 Free Software Foundation, Inc. +# threadlib.m4 serial 15 +dnl Copyright (C) 2005-2018 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.60]) + dnl gl_THREADLIB dnl ------------ dnl Tests for a multithreading library to be used. @@ -43,11 +45,7 @@ AC_REQUIRE([AC_CANONICAL_HOST]) dnl _GNU_SOURCE is needed for pthread_rwlock_t on glibc systems. - dnl AC_USE_SYSTEM_EXTENSIONS was introduced in autoconf 2.60 and obsoletes - dnl AC_GNU_SOURCE. - m4_ifdef([AC_USE_SYSTEM_EXTENSIONS], - [AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])], - [AC_REQUIRE([AC_GNU_SOURCE])]) + AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) dnl Check for multithreading. m4_ifdef([gl_THREADLIB_DEFAULT_NO], [m4_divert_text([DEFAULTS], [gl_use_threads_default=no])], @@ -66,7 +64,7 @@ dnl child process gets an endless segmentation fault inside execvp(). dnl Disable multithreading by default on Cygwin 1.5.x, because it has dnl bugs that lead to endless loops or crashes. See - dnl . + dnl . osf*) gl_use_threads=no ;; cygwin*) case `uname -r` in @@ -148,6 +146,40 @@ [gl_cv_have_weak="guessing no"]) ]) fi + dnl But when linking statically, weak symbols don't work. + case " $LDFLAGS " in + *" -static "*) gl_cv_have_weak=no ;; + esac + ]) + dnl Check whether the linker supports the --as-needed/--no-as-needed options. + dnl Assume GCC, so that we can use the -Wl option. + AC_CACHE_CHECK([whether the linker supports --as-needed], + [gl_cv_linker_have_as_needed], + [if test -n "$GCC"; then + gl_saved_ldflags="$LDFLAGS" + LDFLAGS="$gl_saved_ldflags -Wl,--as-needed -Wl,--no-as-needed" + AC_LINK_IFELSE([AC_LANG_PROGRAM()], + [gl_cv_linker_have_as_needed=yes], + [gl_cv_linker_have_as_needed=no]) + LDFLAGS="$gl_saved_ldflags" + else + gl_cv_linker_have_as_needed=no + fi + ]) + dnl Check whether the linker supports the --push-state/--pop-state options. + dnl Assume GCC, so that we can use the -Wl option. + AC_CACHE_CHECK([whether the linker supports --push-state], + [gl_cv_linker_have_push_state], + [if test -n "$GCC"; then + gl_saved_ldflags="$LDFLAGS" + LDFLAGS="$gl_saved_ldflags -Wl,--push-state -Wl,--pop-state" + AC_LINK_IFELSE([AC_LANG_PROGRAM()], + [gl_cv_linker_have_push_state=yes], + [gl_cv_linker_have_push_state=no]) + LDFLAGS="$gl_saved_ldflags" + else + gl_cv_linker_have_push_state=no + fi ]) if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then # On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that @@ -165,7 +197,7 @@ # # If -pthread works, prefer it to -lpthread, since Ubuntu 14.04 # needs -pthread for some reason. See: - # http://lists.gnu.org/archive/html/bug-gnulib/2014-09/msg00023.html + # https://lists.gnu.org/r/bug-gnulib/2014-09/msg00023.html save_LIBS=$LIBS for gl_pthread in '' '-pthread'; do LIBS="$LIBS $gl_pthread" @@ -227,6 +259,32 @@ [Define if references to the POSIX multithreading library should be made weak.]) LIBTHREAD= LTLIBTHREAD= + dnl On platforms where GCC enables --as-needed by default, attempt + dnl to make sure that LIBMULTITHREAD really links with -lpthread. + dnl Otherwise linking with LIBMULTITHREAD has no effect; then + dnl the weak symbols are not defined and thus evaluate to NULL. + case "$LIBMULTITHREAD" in + "") ;; + -pthread) + if test $gl_cv_linker_have_as_needed = yes; then + if test $gl_cv_linker_have_push_state = yes; then + LIBMULTITHREAD="$LIBMULTITHREAD -Wl,--push-state -Wl,--no-as-needed -lpthread -Wl,--pop-state" + else + LIBMULTITHREAD="$LIBMULTITHREAD -Wl,--no-as-needed -lpthread" + fi + fi + ;; + *) + if test $gl_cv_linker_have_as_needed = yes; then + if test $gl_cv_linker_have_push_state = yes; then + LIBMULTITHREAD="-Wl,--push-state -Wl,--no-as-needed $LIBMULTITHREAD -Wl,--pop-state" + else + LIBMULTITHREAD="-Wl,--no-as-needed $LIBMULTITHREAD" + fi + fi + ;; + esac + # TODO: May need to modify LTLIBMULTITHREAD similarly. fi fi fi @@ -259,6 +317,18 @@ [Define if references to the old Solaris multithreading library should be made weak.]) LIBTHREAD= LTLIBTHREAD= + dnl On platforms where GCC enables --as-needed by default, attempt + dnl to make sure that LIBMULTITHREAD really links with -lthread. + dnl Otherwise linking with LIBMULTITHREAD has no effect; then + dnl the weak symbols are not defined and thus evaluate to NULL. + if test $gl_cv_linker_have_as_needed = yes; then + if test $gl_cv_linker_have_push_state = yes; then + LIBMULTITHREAD="-Wl,--push-state -Wl,--no-as-needed $LIBMULTITHREAD -Wl,--pop-state" + else + LIBMULTITHREAD="-Wl,--no-as-needed $LIBMULTITHREAD" + fi + fi + # TODO: May need to modify LTLIBMULTITHREAD similarly. fi fi fi @@ -287,6 +357,18 @@ [Define if references to the GNU Pth multithreading library should be made weak.]) LIBTHREAD= LTLIBTHREAD= + dnl On platforms where GCC enables --as-needed by default, attempt + dnl to make sure that LIBMULTITHREAD really links with -lpth. + dnl Otherwise linking with LIBMULTITHREAD has no effect; then + dnl the weak symbols are not defined and thus evaluate to NULL. + if test $gl_cv_linker_have_as_needed = yes; then + if test $gl_cv_linker_have_push_state = yes; then + LIBMULTITHREAD="-Wl,--push-state -Wl,--no-as-needed $LIBMULTITHREAD -Wl,--pop-state" + else + LIBMULTITHREAD="-Wl,--no-as-needed $LIBMULTITHREAD" + fi + fi + # TODO: May need to modify LTLIBMULTITHREAD similarly. fi fi else diff -Nru grep-3.1/m4/time_h.m4 grep-3.3/m4/time_h.m4 --- grep-3.1/m4/time_h.m4 2017-05-14 01:09:51.000000000 +0000 +++ grep-3.3/m4/time_h.m4 2018-01-07 00:07:08.000000000 +0000 @@ -1,6 +1,6 @@ # Configure a more-standard replacement for . -# Copyright (C) 2000-2001, 2003-2007, 2009-2017 Free Software Foundation, Inc. +# Copyright (C) 2000-2001, 2003-2007, 2009-2018 Free Software Foundation, Inc. # serial 11 diff -Nru grep-3.1/m4/unistd_h.m4 grep-3.3/m4/unistd_h.m4 --- grep-3.1/m4/unistd_h.m4 2017-05-14 01:09:51.000000000 +0000 +++ grep-3.3/m4/unistd_h.m4 2018-09-19 05:04:26.000000000 +0000 @@ -1,5 +1,5 @@ -# unistd_h.m4 serial 70 -dnl Copyright (C) 2006-2017 Free Software Foundation, Inc. +# unistd_h.m4 serial 74 +dnl Copyright (C) 2006-2018 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. @@ -37,13 +37,13 @@ # include # include # include -# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +# if defined _WIN32 && ! defined __CYGWIN__ # include # endif #endif ]], [chdir chown dup dup2 dup3 environ euidaccess faccessat fchdir fchownat fdatasync fsync ftruncate getcwd getdomainname getdtablesize getgroups - gethostname getlogin getlogin_r getpagesize + gethostname getlogin getlogin_r getpagesize getpass getusershell setusershell endusershell group_member isatty lchown link linkat lseek pipe pipe2 pread pwrite readlink readlinkat rmdir sethostname sleep symlink symlinkat @@ -83,6 +83,7 @@ GNULIB_GETLOGIN=0; AC_SUBST([GNULIB_GETLOGIN]) GNULIB_GETLOGIN_R=0; AC_SUBST([GNULIB_GETLOGIN_R]) GNULIB_GETPAGESIZE=0; AC_SUBST([GNULIB_GETPAGESIZE]) + GNULIB_GETPASS=0; AC_SUBST([GNULIB_GETPASS]) GNULIB_GETUSERSHELL=0; AC_SUBST([GNULIB_GETUSERSHELL]) GNULIB_GROUP_MEMBER=0; AC_SUBST([GNULIB_GROUP_MEMBER]) GNULIB_ISATTY=0; AC_SUBST([GNULIB_ISATTY]) @@ -126,6 +127,7 @@ HAVE_GETHOSTNAME=1; AC_SUBST([HAVE_GETHOSTNAME]) HAVE_GETLOGIN=1; AC_SUBST([HAVE_GETLOGIN]) HAVE_GETPAGESIZE=1; AC_SUBST([HAVE_GETPAGESIZE]) + HAVE_GETPASS=1; AC_SUBST([HAVE_GETPASS]) HAVE_GROUP_MEMBER=1; AC_SUBST([HAVE_GROUP_MEMBER]) HAVE_LCHOWN=1; AC_SUBST([HAVE_LCHOWN]) HAVE_LINK=1; AC_SUBST([HAVE_LINK]) @@ -140,7 +142,6 @@ 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]) @@ -152,6 +153,7 @@ HAVE_DECL_GETPAGESIZE=1; AC_SUBST([HAVE_DECL_GETPAGESIZE]) HAVE_DECL_GETUSERSHELL=1; AC_SUBST([HAVE_DECL_GETUSERSHELL]) HAVE_DECL_SETHOSTNAME=1; AC_SUBST([HAVE_DECL_SETHOSTNAME]) + HAVE_DECL_TRUNCATE=1; AC_SUBST([HAVE_DECL_TRUNCATE]) HAVE_DECL_TTYNAME_R=1; AC_SUBST([HAVE_DECL_TTYNAME_R]) HAVE_OS_H=0; AC_SUBST([HAVE_OS_H]) HAVE_SYS_PARAM_H=0; AC_SUBST([HAVE_SYS_PARAM_H]) @@ -159,6 +161,7 @@ REPLACE_CLOSE=0; AC_SUBST([REPLACE_CLOSE]) REPLACE_DUP=0; AC_SUBST([REPLACE_DUP]) REPLACE_DUP2=0; AC_SUBST([REPLACE_DUP2]) + REPLACE_FACCESSAT=0; AC_SUBST([REPLACE_FACCESSAT]) REPLACE_FCHOWNAT=0; AC_SUBST([REPLACE_FCHOWNAT]) REPLACE_FTRUNCATE=0; AC_SUBST([REPLACE_FTRUNCATE]) REPLACE_GETCWD=0; AC_SUBST([REPLACE_GETCWD]) @@ -167,6 +170,7 @@ REPLACE_GETLOGIN_R=0; AC_SUBST([REPLACE_GETLOGIN_R]) REPLACE_GETGROUPS=0; AC_SUBST([REPLACE_GETGROUPS]) REPLACE_GETPAGESIZE=0; AC_SUBST([REPLACE_GETPAGESIZE]) + REPLACE_GETPASS=0; AC_SUBST([REPLACE_GETPASS]) REPLACE_ISATTY=0; AC_SUBST([REPLACE_ISATTY]) REPLACE_LCHOWN=0; AC_SUBST([REPLACE_LCHOWN]) REPLACE_LINK=0; AC_SUBST([REPLACE_LINK]) diff -Nru grep-3.1/m4/unistd-safer.m4 grep-3.3/m4/unistd-safer.m4 --- grep-3.1/m4/unistd-safer.m4 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/m4/unistd-safer.m4 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ #serial 9 -dnl Copyright (C) 2002, 2005-2006, 2009-2017 Free Software Foundation, Inc. +dnl Copyright (C) 2002, 2005-2006, 2009-2018 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 -Nru grep-3.1/m4/unlocked-io.m4 grep-3.3/m4/unlocked-io.m4 --- grep-3.1/m4/unlocked-io.m4 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/m4/unlocked-io.m4 2018-01-07 00:07:08.000000000 +0000 @@ -1,6 +1,6 @@ # unlocked-io.m4 serial 15 -# Copyright (C) 1998-2006, 2009-2017 Free Software Foundation, Inc. +# Copyright (C) 1998-2006, 2009-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, diff -Nru grep-3.1/m4/vasnprintf.m4 grep-3.3/m4/vasnprintf.m4 --- grep-3.1/m4/vasnprintf.m4 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/m4/vasnprintf.m4 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ # vasnprintf.m4 serial 36 -dnl Copyright (C) 2002-2004, 2006-2017 Free Software Foundation, Inc. +dnl Copyright (C) 2002-2004, 2006-2018 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 -Nru grep-3.1/m4/version-etc.m4 grep-3.3/m4/version-etc.m4 --- grep-3.1/m4/version-etc.m4 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/m4/version-etc.m4 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ # version-etc.m4 serial 1 -# Copyright (C) 2009-2017 Free Software Foundation, Inc. +# Copyright (C) 2009-2018 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 -Nru grep-3.1/m4/warnings.m4 grep-3.3/m4/warnings.m4 --- grep-3.1/m4/warnings.m4 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/m4/warnings.m4 2018-02-26 06:09:46.000000000 +0000 @@ -1,5 +1,5 @@ -# warnings.m4 serial 11 -dnl Copyright (C) 2008-2017 Free Software Foundation, Inc. +# warnings.m4 serial 14 +dnl Copyright (C) 2008-2018 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. @@ -20,10 +20,12 @@ # ----------------------------------------------------------------- # Check if the compiler supports OPTION when compiling PROGRAM. # -# FIXME: gl_Warn must be used unquoted until we can assume Autoconf -# 2.64 or newer. +# The effects of this macro depend on the current language (_AC_LANG). AC_DEFUN([gl_COMPILER_OPTION_IF], -[AS_VAR_PUSHDEF([gl_Warn], [gl_cv_warn_[]_AC_LANG_ABBREV[]_$1])dnl +[ +dnl FIXME: gl_Warn must be used unquoted until we can assume Autoconf +dnl 2.64 or newer. +AS_VAR_PUSHDEF([gl_Warn], [gl_cv_warn_[]_AC_LANG_ABBREV[]_$1])dnl AS_VAR_PUSHDEF([gl_Flags], [_AC_LANG_PREFIX[]FLAGS])dnl AS_LITERAL_IF([$1], [m4_pushdef([gl_Positive], m4_bpatsubst([$1], [^-Wno-], [-W]))], @@ -51,27 +53,61 @@ # ------------------------------ # Clang doesn't complain about unknown warning options unless one also # specifies -Wunknown-warning-option -Werror. Detect this. +# +# The effects of this macro depend on the current language (_AC_LANG). AC_DEFUN([gl_UNKNOWN_WARNINGS_ARE_ERRORS], +[_AC_LANG_DISPATCH([$0], _AC_LANG, $@)]) + +# Specialization for _AC_LANG = C. This macro can be AC_REQUIREd. +# Use of m4_defun rather than AC_DEFUN works around a bug in autoconf < 2.63b. +m4_defun([gl_UNKNOWN_WARNINGS_ARE_ERRORS(C)], +[ + AC_LANG_PUSH([C]) + gl_UNKNOWN_WARNINGS_ARE_ERRORS_IMPL + AC_LANG_POP([C]) +]) + +# Specialization for _AC_LANG = C++. This macro can be AC_REQUIREd. +# Use of m4_defun rather than AC_DEFUN works around a bug in autoconf < 2.63b. +m4_defun([gl_UNKNOWN_WARNINGS_ARE_ERRORS(C++)], +[ + AC_LANG_PUSH([C++]) + gl_UNKNOWN_WARNINGS_ARE_ERRORS_IMPL + AC_LANG_POP([C++]) +]) + +# Specialization for _AC_LANG = Objective C. This macro can be AC_REQUIREd. +# Use of m4_defun rather than AC_DEFUN works around a bug in autoconf < 2.63b. +m4_defun([gl_UNKNOWN_WARNINGS_ARE_ERRORS(Objective C)], +[ + AC_LANG_PUSH([Objective C]) + gl_UNKNOWN_WARNINGS_ARE_ERRORS_IMPL + AC_LANG_POP([Objective C]) +]) + +AC_DEFUN([gl_UNKNOWN_WARNINGS_ARE_ERRORS_IMPL], [gl_COMPILER_OPTION_IF([-Werror -Wunknown-warning-option], [gl_unknown_warnings_are_errors='-Wunknown-warning-option -Werror'], [gl_unknown_warnings_are_errors=])]) -# gl_WARN_ADD(OPTION, [VARIABLE = WARN_CFLAGS], +# gl_WARN_ADD(OPTION, [VARIABLE = WARN_CFLAGS/WARN_CXXFLAGS], # [PROGRAM = AC_LANG_PROGRAM()]) -# --------------------------------------------- -# Adds parameter to WARN_CFLAGS if the compiler supports it when -# compiling PROGRAM. For example, gl_WARN_ADD([-Wparentheses]). +# ----------------------------------------------------------- +# Adds parameter to WARN_CFLAGS/WARN_CXXFLAGS if the compiler supports it +# when compiling PROGRAM. For example, gl_WARN_ADD([-Wparentheses]). # # If VARIABLE is a variable name, AC_SUBST it. +# +# The effects of this macro depend on the current language (_AC_LANG). AC_DEFUN([gl_WARN_ADD], -[AC_REQUIRE([gl_UNKNOWN_WARNINGS_ARE_ERRORS]) +[AC_REQUIRE([gl_UNKNOWN_WARNINGS_ARE_ERRORS(]_AC_LANG[)]) gl_COMPILER_OPTION_IF([$1], - [gl_AS_VAR_APPEND(m4_if([$2], [], [[WARN_CFLAGS]], [[$2]]), [" $1"])], + [gl_AS_VAR_APPEND(m4_if([$2], [], [[WARN_]_AC_LANG_PREFIX[FLAGS]], [[$2]]), [" $1"])], [], [$3]) m4_ifval([$2], [AS_LITERAL_IF([$2], [AC_SUBST([$2])])], - [AC_SUBST([WARN_CFLAGS])])dnl + [AC_SUBST([WARN_]_AC_LANG_PREFIX[FLAGS])])dnl ]) # Local Variables: diff -Nru grep-3.1/m4/warn-on-use.m4 grep-3.3/m4/warn-on-use.m4 --- grep-3.1/m4/warn-on-use.m4 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/m4/warn-on-use.m4 2018-09-19 05:04:26.000000000 +0000 @@ -1,11 +1,13 @@ -# warn-on-use.m4 serial 5 -dnl Copyright (C) 2010-2017 Free Software Foundation, Inc. +# warn-on-use.m4 serial 6 +dnl Copyright (C) 2010-2018 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. # gl_WARN_ON_USE_PREPARE(INCLUDES, NAMES) # --------------------------------------- +# If the module 'posixcheck' is in use: +# # For each whitespace-separated element in the list of NAMES, define # HAVE_RAW_DECL_name if the function has a declaration among INCLUDES # even after being undefined as a macro. @@ -23,25 +25,27 @@ # needing gl_WARN_ON_USE_PREPARE. AC_DEFUN([gl_WARN_ON_USE_PREPARE], [ - m4_foreach_w([gl_decl], [$2], - [AH_TEMPLATE([HAVE_RAW_DECL_]AS_TR_CPP(m4_defn([gl_decl])), - [Define to 1 if ]m4_defn([gl_decl])[ is declared even after - undefining macros.])])dnl + m4_ifdef([gl_POSIXCHECK], + [m4_foreach_w([gl_decl], [$2], + [AH_TEMPLATE([HAVE_RAW_DECL_]AS_TR_CPP(m4_defn([gl_decl])), + [Define to 1 if ]m4_defn([gl_decl])[ is declared even after + undefining macros.])])dnl dnl FIXME: gl_Symbol must be used unquoted until we can assume dnl autoconf 2.64 or newer. - for gl_func in m4_flatten([$2]); do - AS_VAR_PUSHDEF([gl_Symbol], [gl_cv_have_raw_decl_$gl_func])dnl - AC_CACHE_CHECK([whether $gl_func is declared without a macro], - gl_Symbol, - [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([$1], + for gl_func in m4_flatten([$2]); do + AS_VAR_PUSHDEF([gl_Symbol], [gl_cv_have_raw_decl_$gl_func])dnl + AC_CACHE_CHECK([whether $gl_func is declared without a macro], + gl_Symbol, + [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([$1], [@%:@undef $gl_func (void) $gl_func;])], - [AS_VAR_SET(gl_Symbol, [yes])], [AS_VAR_SET(gl_Symbol, [no])])]) - AS_VAR_IF(gl_Symbol, [yes], - [AC_DEFINE_UNQUOTED(AS_TR_CPP([HAVE_RAW_DECL_$gl_func]), [1]) - dnl shortcut - if the raw declaration exists, then set a cache - dnl variable to allow skipping any later AC_CHECK_DECL efforts - eval ac_cv_have_decl_$gl_func=yes]) - AS_VAR_POPDEF([gl_Symbol])dnl - done + [AS_VAR_SET(gl_Symbol, [yes])], [AS_VAR_SET(gl_Symbol, [no])])]) + AS_VAR_IF(gl_Symbol, [yes], + [AC_DEFINE_UNQUOTED(AS_TR_CPP([HAVE_RAW_DECL_$gl_func]), [1]) + dnl shortcut - if the raw declaration exists, then set a cache + dnl variable to allow skipping any later AC_CHECK_DECL efforts + eval ac_cv_have_decl_$gl_func=yes]) + AS_VAR_POPDEF([gl_Symbol])dnl + done + ]) ]) diff -Nru grep-3.1/m4/wchar_h.m4 grep-3.3/m4/wchar_h.m4 --- grep-3.1/m4/wchar_h.m4 2017-05-14 01:09:51.000000000 +0000 +++ grep-3.3/m4/wchar_h.m4 2018-09-19 05:04:26.000000000 +0000 @@ -1,13 +1,13 @@ dnl A placeholder for ISO C99 , for platforms that have issues. -dnl Copyright (C) 2007-2017 Free Software Foundation, Inc. +dnl Copyright (C) 2007-2018 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 42 +# wchar_h.m4 serial 43 AC_DEFUN([gl_WCHAR_H], [ @@ -63,8 +63,8 @@ AC_DEFUN([gl_WCHAR_H_INLINE_OK], [ dnl Test whether suffers due to the transition from '__inline' to - dnl 'gnu_inline'. See - dnl and . In summary, + dnl 'gnu_inline'. See + dnl and . In summary, dnl glibc version 2.5 or older, together with gcc version 4.3 or newer and dnl the option -std=c99 or -std=gnu99, leads to a broken . AC_CACHE_CHECK([whether uses 'inline' correctly], @@ -90,7 +90,8 @@ 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 + if echo '#include "conftest.c"' >conftest1.c && + AC_TRY_EVAL([ac_compile]); then AC_LANG_CONFTEST([ AC_LANG_SOURCE([[#define wcstod renamed_wcstod /* Tru64 with Desktop Toolkit C has a bug: must be included before @@ -105,7 +106,8 @@ ]])]) 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 + if echo '#include "conftest.c"' >conftest2.c && + AC_TRY_EVAL([ac_compile]); then if $CC -o conftest$ac_exeext $CFLAGS $LDFLAGS conftest1.$ac_objext conftest2.$ac_objext $LIBS >&AS_MESSAGE_LOG_FD 2>&1; then : else @@ -114,7 +116,7 @@ fi fi ac_compile="$save_ac_compile" - rm -f conftest1.$ac_objext conftest2.$ac_objext conftest$ac_exeext + rm -f conftest[12].c conftest[12].$ac_objext conftest$ac_exeext ]) if test $gl_cv_header_wchar_h_correct_inline = no; then AC_MSG_ERROR([ cannot be used with this compiler ($CC $CFLAGS $CPPFLAGS). @@ -122,7 +124,7 @@ C99 mode. You have four options: - Add the flag -fgnu89-inline to CC and reconfigure, or - Fix your include files, using parts of - , or + , or - Use a gcc version older than 4.3, or - Don't use the flags -std=c99 or -std=gnu99. Configuration aborted.]) diff -Nru grep-3.1/m4/wchar_t.m4 grep-3.3/m4/wchar_t.m4 --- grep-3.1/m4/wchar_t.m4 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/m4/wchar_t.m4 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ # wchar_t.m4 serial 4 (gettext-0.18.2) -dnl Copyright (C) 2002-2003, 2008-2017 Free Software Foundation, Inc. +dnl Copyright (C) 2002-2003, 2008-2018 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 -Nru grep-3.1/m4/wcrtomb.m4 grep-3.3/m4/wcrtomb.m4 --- grep-3.1/m4/wcrtomb.m4 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/m4/wcrtomb.m4 2018-12-15 18:14:26.000000000 +0000 @@ -1,5 +1,5 @@ -# wcrtomb.m4 serial 11 -dnl Copyright (C) 2008-2017 Free Software Foundation, Inc. +# wcrtomb.m4 serial 13 +dnl Copyright (C) 2008-2018 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. @@ -34,8 +34,8 @@ if test $REPLACE_MBSTATE_T = 1; then REPLACE_WCRTOMB=1 else - dnl On AIX 4.3, OSF/1 5.1 and Solaris 10, wcrtomb (NULL, 0, NULL) sometimes - dnl returns 0 instead of 1. + dnl On AIX 4.3, OSF/1 5.1 and Solaris <= 11.3, wcrtomb (NULL, 0, NULL) + dnl sometimes returns 0 instead of 1. AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([gt_LOCALE_FR]) AC_REQUIRE([gt_LOCALE_FR_UTF8]) @@ -51,6 +51,8 @@ case "$host_os" in # Guess no on AIX 4, OSF/1 and Solaris. aix4* | osf* | solaris*) gl_cv_func_wcrtomb_retval="guessing no" ;; + # Guess yes on native Windows. + mingw*) gl_cv_func_wcrtomb_retval="guessing yes" ;; # Guess yes otherwise. *) gl_cv_func_wcrtomb_retval="guessing yes" ;; esac diff -Nru grep-3.1/m4/wctob.m4 grep-3.3/m4/wctob.m4 --- grep-3.1/m4/wctob.m4 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/m4/wctob.m4 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ -# wctob.m4 serial 10 -dnl Copyright (C) 2008-2017 Free Software Foundation, Inc. +# wctob.m4 serial 11 +dnl Copyright (C) 2008-2018 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,7 +17,7 @@ dnl Solaris 9 has the wctob() function but it does not work. dnl Cygwin 1.7.2 has the wctob() function but it clobbers caller-owned - dnl registers, see . + dnl registers, see . AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([gt_LOCALE_FR]) AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles @@ -31,6 +31,9 @@ # Guess no on Solaris <= 9 and Cygwin. solaris2.[1-9] | solaris2.[1-9].* | cygwin*) gl_cv_func_wctob_works="guessing no" ;; + # Guess no on native Windows. + mingw*) + gl_cv_func_wctob_works="guessing no" ;; # Guess yes otherwise. *) gl_cv_func_wctob_works="guessing yes" ;; esac diff -Nru grep-3.1/m4/wctomb.m4 grep-3.3/m4/wctomb.m4 --- grep-3.1/m4/wctomb.m4 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/m4/wctomb.m4 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ # wctomb.m4 serial 2 -dnl Copyright (C) 2011-2017 Free Software Foundation, Inc. +dnl Copyright (C) 2011-2018 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 -Nru grep-3.1/m4/wctype_h.m4 grep-3.3/m4/wctype_h.m4 --- grep-3.1/m4/wctype_h.m4 2017-05-14 01:09:51.000000000 +0000 +++ grep-3.3/m4/wctype_h.m4 2018-01-07 00:07:08.000000000 +0000 @@ -1,8 +1,8 @@ -# wctype_h.m4 serial 20 +# wctype_h.m4 serial 21 dnl A placeholder for ISO C99 , for platforms that lack it. -dnl Copyright (C) 2006-2017 Free Software Foundation, Inc. +dnl Copyright (C) 2006-2018 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. @@ -53,7 +53,8 @@ int main () { return iswprint ('x') == 0; } ]])], [gl_cv_func_iswcntrl_works=yes], [gl_cv_func_iswcntrl_works=no], - [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include + [dnl Guess no on Linux libc5, yes otherwise. + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include #if __GNU_LIBRARY__ == 1 Linux libc5 i18n is broken. #endif]], [])], diff -Nru grep-3.1/m4/wcwidth.m4 grep-3.3/m4/wcwidth.m4 --- grep-3.1/m4/wcwidth.m4 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/m4/wcwidth.m4 2018-09-19 05:04:26.000000000 +0000 @@ -1,5 +1,5 @@ -# wcwidth.m4 serial 23 -dnl Copyright (C) 2006-2017 Free Software Foundation, Inc. +# wcwidth.m4 serial 27 +dnl Copyright (C) 2006-2018 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. @@ -34,7 +34,20 @@ HAVE_DECL_WCWIDTH=0 fi - if test $ac_cv_func_wcwidth = yes; then + if test $ac_cv_func_wcwidth != yes; then + AC_CACHE_CHECK([whether wcwidth is a macro], + [gl_cv_func_wcwidth_macro], + [AC_EGREP_CPP([wchar_header_defines_wcwidth], [ +#include +#ifdef wcwidth + wchar_header_defines_wcwidth +#endif], + [gl_cv_func_wcwidth_macro=yes], + [gl_cv_func_wcwidth_macro=no]) + ]) + fi + + if test $ac_cv_func_wcwidth = yes || test $gl_cv_func_wcwidth_macro = yes; then HAVE_WCWIDTH=1 dnl On Mac OS X 10.3, wcwidth(0x0301) (COMBINING ACUTE ACCENT) returns 1. dnl On OpenBSD 5.0, wcwidth(0x05B0) (HEBREW POINT SHEVA) returns 1. @@ -85,9 +98,9 @@ [ changequote(,)dnl case "$host_os" in - # Guess yes on glibc and AIX 7 systems. - *-gnu* | aix[7-9]*) gl_cv_func_wcwidth_works="guessing yes";; - *) gl_cv_func_wcwidth_works="guessing no";; + # Guess yes on glibc and AIX 7 systems. + *-gnu* | gnu* | aix[7-9]*) gl_cv_func_wcwidth_works="guessing yes";; + *) gl_cv_func_wcwidth_works="guessing no";; esac changequote([,])dnl ]) @@ -102,3 +115,9 @@ dnl We don't substitute HAVE_WCWIDTH. We assume that if the system does not dnl have the wcwidth function, then it does not declare it. ]) + +# Prerequisites of lib/wcwidth.c. +AC_DEFUN([gl_PREREQ_WCWIDTH], [ + AC_REQUIRE([AC_C_INLINE]) + : +]) diff -Nru grep-3.1/m4/windows-stat-inodes.m4 grep-3.3/m4/windows-stat-inodes.m4 --- grep-3.1/m4/windows-stat-inodes.m4 1970-01-01 00:00:00.000000000 +0000 +++ grep-3.3/m4/windows-stat-inodes.m4 2018-01-07 00:07:08.000000000 +0000 @@ -0,0 +1,19 @@ +# windows-stat-inodes.m4 serial 1 +dnl Copyright (C) 2017-2018 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 Enable inode identification in 'struct stat' on native Windows platforms. +dnl Set WINDOWS_STAT_INODES to +dnl - 0 -> keep the default (dev_t = 32-bit, ino_t = 16-bit), +dnl - 1 -> override types normally (dev_t = 32-bit, ino_t = 64-bit), +dnl - 2 -> override types in an extended way (dev_t = 64-bit, ino_t = 128-bit). +AC_DEFUN([gl_WINDOWS_STAT_INODES], +[ + AC_REQUIRE([AC_CANONICAL_HOST]) + case "$host_os" in + mingw*) WINDOWS_STAT_INODES=1 ;; + *) WINDOWS_STAT_INODES=0 ;; + esac +]) diff -Nru grep-3.1/m4/wint_t.m4 grep-3.3/m4/wint_t.m4 --- grep-3.1/m4/wint_t.m4 2017-05-14 01:09:51.000000000 +0000 +++ grep-3.3/m4/wint_t.m4 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ # wint_t.m4 serial 7 -dnl Copyright (C) 2003, 2007-2017 Free Software Foundation, Inc. +dnl Copyright (C) 2003, 2007-2018 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 -Nru grep-3.1/m4/xalloc.m4 grep-3.3/m4/xalloc.m4 --- grep-3.1/m4/xalloc.m4 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/m4/xalloc.m4 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ # xalloc.m4 serial 18 -dnl Copyright (C) 2002-2006, 2009-2017 Free Software Foundation, Inc. +dnl Copyright (C) 2002-2006, 2009-2018 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 -Nru grep-3.1/m4/xsize.m4 grep-3.3/m4/xsize.m4 --- grep-3.1/m4/xsize.m4 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/m4/xsize.m4 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ # xsize.m4 serial 5 -dnl Copyright (C) 2003-2004, 2008-2017 Free Software Foundation, Inc. +dnl Copyright (C) 2003-2004, 2008-2018 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 -Nru grep-3.1/m4/xstrtol.m4 grep-3.3/m4/xstrtol.m4 --- grep-3.1/m4/xstrtol.m4 2017-01-07 10:34:17.000000000 +0000 +++ grep-3.3/m4/xstrtol.m4 2018-01-07 00:07:08.000000000 +0000 @@ -1,5 +1,5 @@ #serial 11 -dnl Copyright (C) 2002-2007, 2009-2017 Free Software Foundation, Inc. +dnl Copyright (C) 2002-2007, 2009-2018 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 -Nru grep-3.1/maint.mk grep-3.3/maint.mk --- grep-3.1/maint.mk 2017-05-14 01:31:03.000000000 +0000 +++ grep-3.3/maint.mk 2018-12-21 02:51:47.000000000 +0000 @@ -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-2017 Free Software Foundation, Inc. +## Copyright (C) 2001-2018 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,7 +15,7 @@ ## 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 . +## along with this program. If not, see . # This is reported not to work with make-3.79.1 # ME := $(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST)) @@ -130,8 +130,8 @@ gnu_rel_host ?= $(gnu_ftp_host-$(release-type)) url_dir_list ?= $(if $(call _equal,$(gnu_rel_host),ftp.gnu.org), \ - http://ftpmirror.gnu.org/$(PACKAGE), \ - ftp://$(gnu_rel_host)/gnu/$(PACKAGE)) + https://ftpmirror.gnu.org/$(PACKAGE), \ + https://$(gnu_rel_host)/gnu/$(PACKAGE)) # Override this in cfg.mk if you are using a different format in your # NEWS file. @@ -421,6 +421,7 @@ sc_file_system: @prohibit=file''system \ + exclude='/proc/filesystems' \ ignore_case=1 \ halt='found use of "file''system"; spell it "file system"' \ $(_sc_search_regexp) @@ -571,7 +572,7 @@ @h='posixver.h' re='\. +# along with this program. If not, see . # AUTOMAKE_OPTIONS = gnu 1.12 diff -Nru grep-3.1/Makefile.in grep-3.3/Makefile.in --- grep-3.1/Makefile.in 2017-07-02 20:12:56.000000000 +0000 +++ grep-3.3/Makefile.in 2018-12-21 03:59:31.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.99a from Makefile.am. +# Makefile.in generated by automake 1.16a from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2015 Free Software Foundation, Inc. +# Copyright (C) 1994-2018 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -89,17 +89,18 @@ subdir = . ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \ + $(top_srcdir)/m4/__inline.m4 \ $(top_srcdir)/m4/absolute-header.m4 $(top_srcdir)/m4/alloca.m4 \ - $(top_srcdir)/m4/assert.m4 $(top_srcdir)/m4/btowc.m4 \ - $(top_srcdir)/m4/builtin-expect.m4 \ - $(top_srcdir)/m4/chdir-long.m4 \ + $(top_srcdir)/m4/arpa_inet_h.m4 $(top_srcdir)/m4/assert.m4 \ + $(top_srcdir)/m4/btowc.m4 $(top_srcdir)/m4/builtin-expect.m4 \ + $(top_srcdir)/m4/c-stack.m4 $(top_srcdir)/m4/chdir-long.m4 \ $(top_srcdir)/m4/close-stream.m4 $(top_srcdir)/m4/close.m4 \ $(top_srcdir)/m4/closedir.m4 $(top_srcdir)/m4/closeout.m4 \ $(top_srcdir)/m4/codeset.m4 $(top_srcdir)/m4/configmake.m4 \ $(top_srcdir)/m4/ctype.m4 $(top_srcdir)/m4/cycle-check.m4 \ $(top_srcdir)/m4/d-ino.m4 $(top_srcdir)/m4/d-type.m4 \ - $(top_srcdir)/m4/dirent-safer.m4 $(top_srcdir)/m4/dirent_h.m4 \ - $(top_srcdir)/m4/dirfd.m4 $(top_srcdir)/m4/dirname.m4 \ + $(top_srcdir)/m4/dirent_h.m4 $(top_srcdir)/m4/dirfd.m4 \ + $(top_srcdir)/m4/dirname.m4 \ $(top_srcdir)/m4/double-slash-root.m4 $(top_srcdir)/m4/dup.m4 \ $(top_srcdir)/m4/dup2.m4 $(top_srcdir)/m4/eealloc.m4 \ $(top_srcdir)/m4/environ.m4 $(top_srcdir)/m4/errno_h.m4 \ @@ -111,32 +112,38 @@ $(top_srcdir)/m4/fdopen.m4 $(top_srcdir)/m4/fdopendir.m4 \ $(top_srcdir)/m4/filenamecat.m4 $(top_srcdir)/m4/flexmember.m4 \ $(top_srcdir)/m4/float_h.m4 $(top_srcdir)/m4/fnmatch.m4 \ - $(top_srcdir)/m4/fpending.m4 $(top_srcdir)/m4/fpieee.m4 \ - $(top_srcdir)/m4/fstat.m4 $(top_srcdir)/m4/fstatat.m4 \ + $(top_srcdir)/m4/fnmatch_h.m4 $(top_srcdir)/m4/fpending.m4 \ + $(top_srcdir)/m4/fpieee.m4 $(top_srcdir)/m4/fstat.m4 \ + $(top_srcdir)/m4/fstatat.m4 $(top_srcdir)/m4/ftruncate.m4 \ $(top_srcdir)/m4/fts.m4 $(top_srcdir)/m4/getcwd.m4 \ $(top_srcdir)/m4/getdtablesize.m4 $(top_srcdir)/m4/getopt.m4 \ $(top_srcdir)/m4/getpagesize.m4 \ $(top_srcdir)/m4/getprogname.m4 $(top_srcdir)/m4/gettext.m4 \ - $(top_srcdir)/m4/glibc21.m4 $(top_srcdir)/m4/gnulib-common.m4 \ + $(top_srcdir)/m4/gettimeofday.m4 $(top_srcdir)/m4/glibc21.m4 \ + $(top_srcdir)/m4/gnulib-common.m4 \ $(top_srcdir)/m4/gnulib-comp.m4 \ - $(top_srcdir)/m4/hard-locale.m4 $(top_srcdir)/m4/i-ring.m4 \ + $(top_srcdir)/m4/host-cpu-c-abi.m4 $(top_srcdir)/m4/i-ring.m4 \ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/iconv_h.m4 \ $(top_srcdir)/m4/iconv_open.m4 \ - $(top_srcdir)/m4/include_next.m4 $(top_srcdir)/m4/inline.m4 \ + $(top_srcdir)/m4/include_next.m4 $(top_srcdir)/m4/inet_pton.m4 \ + $(top_srcdir)/m4/inline.m4 \ + $(top_srcdir)/m4/intl-thread-locale.m4 \ $(top_srcdir)/m4/intlmacosx.m4 $(top_srcdir)/m4/intmax_t.m4 \ $(top_srcdir)/m4/inttostr.m4 $(top_srcdir)/m4/inttypes-pri.m4 \ $(top_srcdir)/m4/inttypes.m4 $(top_srcdir)/m4/inttypes_h.m4 \ - $(top_srcdir)/m4/isatty.m4 $(top_srcdir)/m4/isblank.m4 \ - $(top_srcdir)/m4/iswblank.m4 $(top_srcdir)/m4/iswctype.m4 \ - $(top_srcdir)/m4/langinfo_h.m4 $(top_srcdir)/m4/largefile.m4 \ - $(top_srcdir)/m4/lcmessage.m4 $(top_srcdir)/m4/lib-ld.m4 \ - $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ + $(top_srcdir)/m4/ioctl.m4 $(top_srcdir)/m4/isatty.m4 \ + $(top_srcdir)/m4/isblank.m4 $(top_srcdir)/m4/iswblank.m4 \ + $(top_srcdir)/m4/iswctype.m4 $(top_srcdir)/m4/langinfo_h.m4 \ + $(top_srcdir)/m4/largefile.m4 $(top_srcdir)/m4/lcmessage.m4 \ + $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ + $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libsigsegv.m4 \ $(top_srcdir)/m4/libunistring-base.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-tr.m4 $(top_srcdir)/m4/locale-zh.m4 \ $(top_srcdir)/m4/locale_h.m4 $(top_srcdir)/m4/localeconv.m4 \ - $(top_srcdir)/m4/localename.m4 $(top_srcdir)/m4/lock.m4 \ + $(top_srcdir)/m4/localename.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/manywarnings.m4 \ @@ -149,35 +156,46 @@ $(top_srcdir)/m4/minmax.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/nanosleep.m4 $(top_srcdir)/m4/netinet_in_h.m4 \ $(top_srcdir)/m4/nl_langinfo.m4 $(top_srcdir)/m4/nls.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/off_t.m4 $(top_srcdir)/m4/open-cloexec.m4 \ $(top_srcdir)/m4/open.m4 $(top_srcdir)/m4/openat.m4 \ $(top_srcdir)/m4/opendir.m4 $(top_srcdir)/m4/pathmax.m4 \ $(top_srcdir)/m4/pcre.m4 $(top_srcdir)/m4/perl.m4 \ - $(top_srcdir)/m4/pipe.m4 $(top_srcdir)/m4/pkg.m4 \ - $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/printf.m4 \ - $(top_srcdir)/m4/progtest.m4 \ + $(top_srcdir)/m4/perror.m4 $(top_srcdir)/m4/pipe.m4 \ + $(top_srcdir)/m4/pkg.m4 $(top_srcdir)/m4/po.m4 \ + $(top_srcdir)/m4/printf.m4 $(top_srcdir)/m4/progtest.m4 \ $(top_srcdir)/m4/pthread_rwlock_rdlock.m4 \ $(top_srcdir)/m4/putenv.m4 $(top_srcdir)/m4/quote.m4 \ - $(top_srcdir)/m4/quotearg.m4 $(top_srcdir)/m4/read.m4 \ - $(top_srcdir)/m4/readdir.m4 $(top_srcdir)/m4/realloc.m4 \ - $(top_srcdir)/m4/regex.m4 $(top_srcdir)/m4/safe-read.m4 \ - $(top_srcdir)/m4/save-cwd.m4 $(top_srcdir)/m4/setenv.m4 \ - $(top_srcdir)/m4/setlocale.m4 $(top_srcdir)/m4/size_max.m4 \ - $(top_srcdir)/m4/snprintf.m4 $(top_srcdir)/m4/ssize_t.m4 \ - $(top_srcdir)/m4/stat.m4 $(top_srcdir)/m4/std-gnu11.m4 \ - $(top_srcdir)/m4/stdalign.m4 $(top_srcdir)/m4/stdarg.m4 \ - $(top_srcdir)/m4/stdbool.m4 $(top_srcdir)/m4/stddef_h.m4 \ - $(top_srcdir)/m4/stdint.m4 $(top_srcdir)/m4/stdint_h.m4 \ - $(top_srcdir)/m4/stdio_h.m4 $(top_srcdir)/m4/stdlib_h.m4 \ - $(top_srcdir)/m4/stpcpy.m4 $(top_srcdir)/m4/strdup.m4 \ - $(top_srcdir)/m4/strerror.m4 $(top_srcdir)/m4/string_h.m4 \ + $(top_srcdir)/m4/quotearg.m4 $(top_srcdir)/m4/raise.m4 \ + $(top_srcdir)/m4/read.m4 $(top_srcdir)/m4/readdir.m4 \ + $(top_srcdir)/m4/realloc.m4 $(top_srcdir)/m4/regex.m4 \ + $(top_srcdir)/m4/safe-read.m4 $(top_srcdir)/m4/save-cwd.m4 \ + $(top_srcdir)/m4/select.m4 $(top_srcdir)/m4/setenv.m4 \ + $(top_srcdir)/m4/setlocale.m4 $(top_srcdir)/m4/sigaction.m4 \ + $(top_srcdir)/m4/signal_h.m4 \ + $(top_srcdir)/m4/signalblocking.m4 \ + $(top_srcdir)/m4/size_max.m4 $(top_srcdir)/m4/sleep.m4 \ + $(top_srcdir)/m4/snprintf.m4 $(top_srcdir)/m4/socketlib.m4 \ + $(top_srcdir)/m4/sockets.m4 $(top_srcdir)/m4/socklen.m4 \ + $(top_srcdir)/m4/sockpfaf.m4 $(top_srcdir)/m4/ssize_t.m4 \ + $(top_srcdir)/m4/stat-time.m4 $(top_srcdir)/m4/stat.m4 \ + $(top_srcdir)/m4/std-gnu11.m4 $(top_srcdir)/m4/stdalign.m4 \ + $(top_srcdir)/m4/stdarg.m4 $(top_srcdir)/m4/stdbool.m4 \ + $(top_srcdir)/m4/stddef_h.m4 $(top_srcdir)/m4/stdint.m4 \ + $(top_srcdir)/m4/stdint_h.m4 $(top_srcdir)/m4/stdio_h.m4 \ + $(top_srcdir)/m4/stdlib_h.m4 $(top_srcdir)/m4/stpcpy.m4 \ + $(top_srcdir)/m4/strdup.m4 $(top_srcdir)/m4/strerror.m4 \ + $(top_srcdir)/m4/strerror_r.m4 $(top_srcdir)/m4/string_h.m4 \ $(top_srcdir)/m4/strnlen.m4 $(top_srcdir)/m4/strstr.m4 \ $(top_srcdir)/m4/strtoimax.m4 $(top_srcdir)/m4/strtoll.m4 \ $(top_srcdir)/m4/strtoull.m4 $(top_srcdir)/m4/strtoumax.m4 \ - $(top_srcdir)/m4/symlink.m4 $(top_srcdir)/m4/sys_socket_h.m4 \ - $(top_srcdir)/m4/sys_stat_h.m4 $(top_srcdir)/m4/sys_types_h.m4 \ + $(top_srcdir)/m4/symlink.m4 $(top_srcdir)/m4/sys_ioctl_h.m4 \ + $(top_srcdir)/m4/sys_select_h.m4 \ + $(top_srcdir)/m4/sys_socket_h.m4 \ + $(top_srcdir)/m4/sys_stat_h.m4 $(top_srcdir)/m4/sys_time_h.m4 \ + $(top_srcdir)/m4/sys_types_h.m4 $(top_srcdir)/m4/sys_uio_h.m4 \ $(top_srcdir)/m4/threadlib.m4 $(top_srcdir)/m4/time_h.m4 \ $(top_srcdir)/m4/unistd-safer.m4 $(top_srcdir)/m4/unistd_h.m4 \ $(top_srcdir)/m4/unlocked-io.m4 $(top_srcdir)/m4/vasnprintf.m4 \ @@ -186,9 +204,11 @@ $(top_srcdir)/m4/wchar_h.m4 $(top_srcdir)/m4/wchar_t.m4 \ $(top_srcdir)/m4/wcrtomb.m4 $(top_srcdir)/m4/wctob.m4 \ $(top_srcdir)/m4/wctomb.m4 $(top_srcdir)/m4/wctype_h.m4 \ - $(top_srcdir)/m4/wcwidth.m4 $(top_srcdir)/m4/wint_t.m4 \ - $(top_srcdir)/m4/xalloc.m4 $(top_srcdir)/m4/xsize.m4 \ - $(top_srcdir)/m4/xstrtol.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/m4/wcwidth.m4 \ + $(top_srcdir)/m4/windows-stat-inodes.m4 \ + $(top_srcdir)/m4/wint_t.m4 $(top_srcdir)/m4/xalloc.m4 \ + $(top_srcdir)/m4/xsize.m4 $(top_srcdir)/m4/xstrtol.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \ @@ -233,7 +253,7 @@ $(RECURSIVE_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ - cscope distdir dist dist-all distcheck + cscope distdir distdir-am dist dist-all distcheck am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \ $(LISP)config.hin # Read a list of newline-separated strings from the standard input, @@ -357,8 +377,11 @@ GLIBC21 = @GLIBC21@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ +GNULIB_ACCEPT = @GNULIB_ACCEPT@ +GNULIB_ACCEPT4 = @GNULIB_ACCEPT4@ GNULIB_ALPHASORT = @GNULIB_ALPHASORT@ GNULIB_ATOLL = @GNULIB_ATOLL@ +GNULIB_BIND = @GNULIB_BIND@ GNULIB_BTOWC = @GNULIB_BTOWC@ GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@ GNULIB_CANONICALIZE_FILE_NAME = @GNULIB_CANONICALIZE_FILE_NAME@ @@ -366,6 +389,7 @@ GNULIB_CHOWN = @GNULIB_CHOWN@ GNULIB_CLOSE = @GNULIB_CLOSE@ GNULIB_CLOSEDIR = @GNULIB_CLOSEDIR@ +GNULIB_CONNECT = @GNULIB_CONNECT@ GNULIB_CTIME = @GNULIB_CTIME@ GNULIB_DIRFD = @GNULIB_DIRFD@ GNULIB_DPRINTF = @GNULIB_DPRINTF@ @@ -375,6 +399,7 @@ GNULIB_DUPLOCALE = @GNULIB_DUPLOCALE@ GNULIB_ENVIRON = @GNULIB_ENVIRON@ GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@ +GNULIB_EXPLICIT_BZERO = @GNULIB_EXPLICIT_BZERO@ GNULIB_FACCESSAT = @GNULIB_FACCESSAT@ GNULIB_FCHDIR = @GNULIB_FCHDIR@ GNULIB_FCHMODAT = @GNULIB_FCHMODAT@ @@ -389,6 +414,7 @@ GNULIB_FFSLL = @GNULIB_FFSLL@ GNULIB_FGETC = @GNULIB_FGETC@ GNULIB_FGETS = @GNULIB_FGETS@ +GNULIB_FNMATCH = @GNULIB_FNMATCH@ GNULIB_FOPEN = @GNULIB_FOPEN@ GNULIB_FPRINTF = @GNULIB_FPRINTF@ GNULIB_FPRINTF_POSIX = @GNULIB_FPRINTF_POSIX@ @@ -421,6 +447,10 @@ GNULIB_GETLOGIN = @GNULIB_GETLOGIN@ GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@ GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@ +GNULIB_GETPASS = @GNULIB_GETPASS@ +GNULIB_GETPEERNAME = @GNULIB_GETPEERNAME@ +GNULIB_GETSOCKNAME = @GNULIB_GETSOCKNAME@ +GNULIB_GETSOCKOPT = @GNULIB_GETSOCKOPT@ GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@ GNULIB_GETTIMEOFDAY = @GNULIB_GETTIMEOFDAY@ GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@ @@ -430,6 +460,9 @@ GNULIB_ICONV = @GNULIB_ICONV@ GNULIB_IMAXABS = @GNULIB_IMAXABS@ GNULIB_IMAXDIV = @GNULIB_IMAXDIV@ +GNULIB_INET_NTOP = @GNULIB_INET_NTOP@ +GNULIB_INET_PTON = @GNULIB_INET_PTON@ +GNULIB_IOCTL = @GNULIB_IOCTL@ GNULIB_ISATTY = @GNULIB_ISATTY@ GNULIB_ISBLANK = @GNULIB_ISBLANK@ GNULIB_ISWBLANK = @GNULIB_ISWBLANK@ @@ -438,7 +471,9 @@ GNULIB_LCHOWN = @GNULIB_LCHOWN@ GNULIB_LINK = @GNULIB_LINK@ GNULIB_LINKAT = @GNULIB_LINKAT@ +GNULIB_LISTEN = @GNULIB_LISTEN@ GNULIB_LOCALECONV = @GNULIB_LOCALECONV@ +GNULIB_LOCALENAME = @GNULIB_LOCALENAME@ GNULIB_LOCALTIME = @GNULIB_LOCALTIME@ GNULIB_LSEEK = @GNULIB_LSEEK@ GNULIB_LSTAT = @GNULIB_LSTAT@ @@ -497,6 +532,8 @@ GNULIB_PREAD = @GNULIB_PREAD@ GNULIB_PRINTF = @GNULIB_PRINTF@ GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@ +GNULIB_PSELECT = @GNULIB_PSELECT@ +GNULIB_PTHREAD_SIGMASK = @GNULIB_PTHREAD_SIGMASK@ GNULIB_PTSNAME = @GNULIB_PTSNAME@ GNULIB_PTSNAME_R = @GNULIB_PTSNAME_R@ GNULIB_PUTC = @GNULIB_PUTC@ @@ -505,6 +542,7 @@ GNULIB_PUTS = @GNULIB_PUTS@ GNULIB_PWRITE = @GNULIB_PWRITE@ GNULIB_QSORT_R = @GNULIB_QSORT_R@ +GNULIB_RAISE = @GNULIB_RAISE@ GNULIB_RANDOM = @GNULIB_RANDOM@ GNULIB_RANDOM_R = @GNULIB_RANDOM_R@ GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@ @@ -512,8 +550,11 @@ GNULIB_READDIR = @GNULIB_READDIR@ GNULIB_READLINK = @GNULIB_READLINK@ GNULIB_READLINKAT = @GNULIB_READLINKAT@ +GNULIB_REALLOCARRAY = @GNULIB_REALLOCARRAY@ GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@ GNULIB_REALPATH = @GNULIB_REALPATH@ +GNULIB_RECV = @GNULIB_RECV@ +GNULIB_RECVFROM = @GNULIB_RECVFROM@ GNULIB_REMOVE = @GNULIB_REMOVE@ GNULIB_RENAME = @GNULIB_RENAME@ GNULIB_RENAMEAT = @GNULIB_RENAMEAT@ @@ -523,11 +564,20 @@ GNULIB_SCANDIR = @GNULIB_SCANDIR@ GNULIB_SCANF = @GNULIB_SCANF@ GNULIB_SECURE_GETENV = @GNULIB_SECURE_GETENV@ +GNULIB_SELECT = @GNULIB_SELECT@ +GNULIB_SEND = @GNULIB_SEND@ +GNULIB_SENDTO = @GNULIB_SENDTO@ GNULIB_SETENV = @GNULIB_SETENV@ GNULIB_SETHOSTNAME = @GNULIB_SETHOSTNAME@ GNULIB_SETLOCALE = @GNULIB_SETLOCALE@ +GNULIB_SETSOCKOPT = @GNULIB_SETSOCKOPT@ +GNULIB_SHUTDOWN = @GNULIB_SHUTDOWN@ +GNULIB_SIGACTION = @GNULIB_SIGACTION@ +GNULIB_SIGNAL_H_SIGPIPE = @GNULIB_SIGNAL_H_SIGPIPE@ +GNULIB_SIGPROCMASK = @GNULIB_SIGPROCMASK@ GNULIB_SLEEP = @GNULIB_SLEEP@ GNULIB_SNPRINTF = @GNULIB_SNPRINTF@ +GNULIB_SOCKET = @GNULIB_SOCKET@ GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@ GNULIB_STAT = @GNULIB_STAT@ GNULIB_STDIO_H_NONBLOCKING = @GNULIB_STDIO_H_NONBLOCKING@ @@ -625,7 +675,9 @@ GNULIB_WRITE = @GNULIB_WRITE@ GNULIB__EXIT = @GNULIB__EXIT@ GREP = @GREP@ +HAVE_ACCEPT4 = @HAVE_ACCEPT4@ HAVE_ALPHASORT = @HAVE_ALPHASORT@ +HAVE_ARPA_INET_H = @HAVE_ARPA_INET_H@ HAVE_ATOLL = @HAVE_ATOLL@ HAVE_BTOWC = @HAVE_BTOWC@ HAVE_C99_STDINT_H = @HAVE_C99_STDINT_H@ @@ -651,12 +703,16 @@ HAVE_DECL_GETUSERSHELL = @HAVE_DECL_GETUSERSHELL@ HAVE_DECL_IMAXABS = @HAVE_DECL_IMAXABS@ HAVE_DECL_IMAXDIV = @HAVE_DECL_IMAXDIV@ +HAVE_DECL_INET_NTOP = @HAVE_DECL_INET_NTOP@ +HAVE_DECL_INET_PTON = @HAVE_DECL_INET_PTON@ +HAVE_DECL_INITSTATE = @HAVE_DECL_INITSTATE@ HAVE_DECL_LOCALTIME_R = @HAVE_DECL_LOCALTIME_R@ HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@ HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@ HAVE_DECL_OBSTACK_PRINTF = @HAVE_DECL_OBSTACK_PRINTF@ HAVE_DECL_SETENV = @HAVE_DECL_SETENV@ HAVE_DECL_SETHOSTNAME = @HAVE_DECL_SETHOSTNAME@ +HAVE_DECL_SETSTATE = @HAVE_DECL_SETSTATE@ HAVE_DECL_SNPRINTF = @HAVE_DECL_SNPRINTF@ HAVE_DECL_STRDUP = @HAVE_DECL_STRDUP@ HAVE_DECL_STRERROR_R = @HAVE_DECL_STRERROR_R@ @@ -666,6 +722,7 @@ HAVE_DECL_STRTOIMAX = @HAVE_DECL_STRTOIMAX@ HAVE_DECL_STRTOK_R = @HAVE_DECL_STRTOK_R@ HAVE_DECL_STRTOUMAX = @HAVE_DECL_STRTOUMAX@ +HAVE_DECL_TRUNCATE = @HAVE_DECL_TRUNCATE@ HAVE_DECL_TTYNAME_R = @HAVE_DECL_TTYNAME_R@ HAVE_DECL_UNSETENV = @HAVE_DECL_UNSETENV@ HAVE_DECL_VSNPRINTF = @HAVE_DECL_VSNPRINTF@ @@ -677,6 +734,7 @@ HAVE_DUP3 = @HAVE_DUP3@ HAVE_DUPLOCALE = @HAVE_DUPLOCALE@ HAVE_EUIDACCESS = @HAVE_EUIDACCESS@ +HAVE_EXPLICIT_BZERO = @HAVE_EXPLICIT_BZERO@ HAVE_FACCESSAT = @HAVE_FACCESSAT@ HAVE_FCHDIR = @HAVE_FCHDIR@ HAVE_FCHMODAT = @HAVE_FCHMODAT@ @@ -687,6 +745,9 @@ HAVE_FEATURES_H = @HAVE_FEATURES_H@ HAVE_FFSL = @HAVE_FFSL@ HAVE_FFSLL = @HAVE_FFSLL@ +HAVE_FNMATCH = @HAVE_FNMATCH@ +HAVE_FNMATCH_H = @HAVE_FNMATCH_H@ +HAVE_FREELOCALE = @HAVE_FREELOCALE@ HAVE_FSEEKO = @HAVE_FSEEKO@ HAVE_FSTATAT = @HAVE_FSTATAT@ HAVE_FSYNC = @HAVE_FSYNC@ @@ -699,13 +760,17 @@ HAVE_GETLOGIN = @HAVE_GETLOGIN@ HAVE_GETOPT_H = @HAVE_GETOPT_H@ HAVE_GETPAGESIZE = @HAVE_GETPAGESIZE@ +HAVE_GETPASS = @HAVE_GETPASS@ HAVE_GETSUBOPT = @HAVE_GETSUBOPT@ +HAVE_GETTIMEOFDAY = @HAVE_GETTIMEOFDAY@ HAVE_GRANTPT = @HAVE_GRANTPT@ HAVE_GROUP_MEMBER = @HAVE_GROUP_MEMBER@ +HAVE_IMAXDIV_T = @HAVE_IMAXDIV_T@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_ISBLANK = @HAVE_ISBLANK@ HAVE_ISWBLANK = @HAVE_ISWBLANK@ HAVE_ISWCNTRL = @HAVE_ISWCNTRL@ +HAVE_LANGINFO_ALTMON = @HAVE_LANGINFO_ALTMON@ HAVE_LANGINFO_CODESET = @HAVE_LANGINFO_CODESET@ HAVE_LANGINFO_ERA = @HAVE_LANGINFO_ERA@ HAVE_LANGINFO_H = @HAVE_LANGINFO_H@ @@ -713,6 +778,7 @@ HAVE_LANGINFO_YESEXPR = @HAVE_LANGINFO_YESEXPR@ HAVE_LCHMOD = @HAVE_LCHMOD@ HAVE_LCHOWN = @HAVE_LCHOWN@ +HAVE_LIBSIGSEGV = @HAVE_LIBSIGSEGV@ HAVE_LINK = @HAVE_LINK@ HAVE_LINKAT = @HAVE_LINKAT@ HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@ @@ -738,6 +804,8 @@ HAVE_MKSTEMPS = @HAVE_MKSTEMPS@ HAVE_MSVC_INVALID_PARAMETER_HANDLER = @HAVE_MSVC_INVALID_PARAMETER_HANDLER@ HAVE_NANOSLEEP = @HAVE_NANOSLEEP@ +HAVE_NETINET_IN_H = @HAVE_NETINET_IN_H@ +HAVE_NEWLOCALE = @HAVE_NEWLOCALE@ HAVE_NL_LANGINFO = @HAVE_NL_LANGINFO@ HAVE_OPENAT = @HAVE_OPENAT@ HAVE_OPENDIR = @HAVE_OPENDIR@ @@ -747,11 +815,15 @@ HAVE_PIPE2 = @HAVE_PIPE2@ HAVE_POPEN = @HAVE_POPEN@ HAVE_POSIX_OPENPT = @HAVE_POSIX_OPENPT@ +HAVE_POSIX_SIGNALBLOCKING = @HAVE_POSIX_SIGNALBLOCKING@ HAVE_PREAD = @HAVE_PREAD@ +HAVE_PSELECT = @HAVE_PSELECT@ +HAVE_PTHREAD_SIGMASK = @HAVE_PTHREAD_SIGMASK@ HAVE_PTSNAME = @HAVE_PTSNAME@ HAVE_PTSNAME_R = @HAVE_PTSNAME_R@ HAVE_PWRITE = @HAVE_PWRITE@ HAVE_QSORT_R = @HAVE_QSORT_R@ +HAVE_RAISE = @HAVE_RAISE@ HAVE_RANDOM = @HAVE_RANDOM@ HAVE_RANDOM_H = @HAVE_RANDOM_H@ HAVE_RANDOM_R = @HAVE_RANDOM_R@ @@ -759,17 +831,23 @@ HAVE_READDIR = @HAVE_READDIR@ HAVE_READLINK = @HAVE_READLINK@ HAVE_READLINKAT = @HAVE_READLINKAT@ +HAVE_REALLOCARRAY = @HAVE_REALLOCARRAY@ HAVE_REALPATH = @HAVE_REALPATH@ HAVE_RENAMEAT = @HAVE_RENAMEAT@ HAVE_REWINDDIR = @HAVE_REWINDDIR@ HAVE_RPMATCH = @HAVE_RPMATCH@ +HAVE_SA_FAMILY_T = @HAVE_SA_FAMILY_T@ HAVE_SCANDIR = @HAVE_SCANDIR@ HAVE_SECURE_GETENV = @HAVE_SECURE_GETENV@ HAVE_SETENV = @HAVE_SETENV@ HAVE_SETHOSTNAME = @HAVE_SETHOSTNAME@ +HAVE_SIGACTION = @HAVE_SIGACTION@ +HAVE_SIGHANDLER_T = @HAVE_SIGHANDLER_T@ +HAVE_SIGINFO_T = @HAVE_SIGINFO_T@ HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@ HAVE_SIGNED_WCHAR_T = @HAVE_SIGNED_WCHAR_T@ HAVE_SIGNED_WINT_T = @HAVE_SIGNED_WINT_T@ +HAVE_SIGSET_T = @HAVE_SIGSET_T@ HAVE_SLEEP = @HAVE_SLEEP@ HAVE_STDINT_H = @HAVE_STDINT_H@ HAVE_STPCPY = @HAVE_STPCPY@ @@ -783,18 +861,27 @@ HAVE_STRTOLL = @HAVE_STRTOLL@ HAVE_STRTOULL = @HAVE_STRTOULL@ HAVE_STRUCT_RANDOM_DATA = @HAVE_STRUCT_RANDOM_DATA@ +HAVE_STRUCT_SIGACTION_SA_SIGACTION = @HAVE_STRUCT_SIGACTION_SA_SIGACTION@ +HAVE_STRUCT_SOCKADDR_STORAGE = @HAVE_STRUCT_SOCKADDR_STORAGE@ +HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY = @HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY@ +HAVE_STRUCT_TIMEVAL = @HAVE_STRUCT_TIMEVAL@ HAVE_STRVERSCMP = @HAVE_STRVERSCMP@ HAVE_SYMLINK = @HAVE_SYMLINK@ HAVE_SYMLINKAT = @HAVE_SYMLINKAT@ HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@ HAVE_SYS_CDEFS_H = @HAVE_SYS_CDEFS_H@ HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@ +HAVE_SYS_IOCTL_H = @HAVE_SYS_IOCTL_H@ HAVE_SYS_LOADAVG_H = @HAVE_SYS_LOADAVG_H@ HAVE_SYS_PARAM_H = @HAVE_SYS_PARAM_H@ +HAVE_SYS_SELECT_H = @HAVE_SYS_SELECT_H@ +HAVE_SYS_SOCKET_H = @HAVE_SYS_SOCKET_H@ +HAVE_SYS_TIME_H = @HAVE_SYS_TIME_H@ HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ +HAVE_SYS_UIO_H = @HAVE_SYS_UIO_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@ @@ -843,6 +930,7 @@ HAVE_WMEMCPY = @HAVE_WMEMCPY@ HAVE_WMEMMOVE = @HAVE_WMEMMOVE@ HAVE_WMEMSET = @HAVE_WMEMSET@ +HAVE_WS2TCPIP_H = @HAVE_WS2TCPIP_H@ HAVE_XLOCALE_H = @HAVE_XLOCALE_H@ HAVE__BOOL = @HAVE__BOOL@ HAVE__EXIT = @HAVE__EXIT@ @@ -850,6 +938,7 @@ ICONV_H = @ICONV_H@ INCLUDE_NEXT = @INCLUDE_NEXT@ INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@ +INET_PTON_LIB = @INET_PTON_LIB@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -860,6 +949,7 @@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ LDFLAGS = @LDFLAGS@ +LIBCSTACK = @LIBCSTACK@ LIBGREPUTILS_LIBDEPS = @LIBGREPUTILS_LIBDEPS@ LIBGREPUTILS_LTLIBDEPS = @LIBGREPUTILS_LTLIBDEPS@ LIBICONV = @LIBICONV@ @@ -869,11 +959,16 @@ LIBPTH = @LIBPTH@ LIBPTH_PREFIX = @LIBPTH_PREFIX@ LIBS = @LIBS@ +LIBSIGSEGV = @LIBSIGSEGV@ +LIBSIGSEGV_PREFIX = @LIBSIGSEGV_PREFIX@ +LIBSOCKET = @LIBSOCKET@ LIBTESTS_LIBDEPS = @LIBTESTS_LIBDEPS@ LIBTHREAD = @LIBTHREAD@ LIBUNISTRING_UNISTR_H = @LIBUNISTRING_UNISTR_H@ LIBUNISTRING_UNITYPES_H = @LIBUNISTRING_UNITYPES_H@ LIBUNISTRING_UNIWIDTH_H = @LIBUNISTRING_UNIWIDTH_H@ +LIB_NANOSLEEP = @LIB_NANOSLEEP@ +LIB_SELECT = @LIB_SELECT@ LIMITS_H = @LIMITS_H@ LOCALCHARSET_TESTS_ENVIRONMENT = @LOCALCHARSET_TESTS_ENVIRONMENT@ LOCALE_FR = @LOCALE_FR@ @@ -881,36 +976,49 @@ LOCALE_JA = @LOCALE_JA@ LOCALE_TR_UTF8 = @LOCALE_TR_UTF8@ LOCALE_ZH_CN = @LOCALE_ZH_CN@ +LTLIBCSTACK = @LTLIBCSTACK@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBMULTITHREAD = @LTLIBMULTITHREAD@ LTLIBOBJS = @LTLIBOBJS@ LTLIBPTH = @LTLIBPTH@ +LTLIBSIGSEGV = @LTLIBSIGSEGV@ LTLIBTHREAD = @LTLIBTHREAD@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ +NETINET_IN_H = @NETINET_IN_H@ +NEXT_ARPA_INET_H = @NEXT_ARPA_INET_H@ +NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H = @NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H@ NEXT_AS_FIRST_DIRECTIVE_CTYPE_H = @NEXT_AS_FIRST_DIRECTIVE_CTYPE_H@ NEXT_AS_FIRST_DIRECTIVE_DIRENT_H = @NEXT_AS_FIRST_DIRECTIVE_DIRENT_H@ NEXT_AS_FIRST_DIRECTIVE_ERRNO_H = @NEXT_AS_FIRST_DIRECTIVE_ERRNO_H@ NEXT_AS_FIRST_DIRECTIVE_FCNTL_H = @NEXT_AS_FIRST_DIRECTIVE_FCNTL_H@ NEXT_AS_FIRST_DIRECTIVE_FLOAT_H = @NEXT_AS_FIRST_DIRECTIVE_FLOAT_H@ +NEXT_AS_FIRST_DIRECTIVE_FNMATCH_H = @NEXT_AS_FIRST_DIRECTIVE_FNMATCH_H@ NEXT_AS_FIRST_DIRECTIVE_GETOPT_H = @NEXT_AS_FIRST_DIRECTIVE_GETOPT_H@ NEXT_AS_FIRST_DIRECTIVE_ICONV_H = @NEXT_AS_FIRST_DIRECTIVE_ICONV_H@ NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H = @NEXT_AS_FIRST_DIRECTIVE_INTTYPES_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_NETINET_IN_H = @NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H@ +NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H = @NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H@ NEXT_AS_FIRST_DIRECTIVE_STDARG_H = @NEXT_AS_FIRST_DIRECTIVE_STDARG_H@ NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@ NEXT_AS_FIRST_DIRECTIVE_STDINT_H = @NEXT_AS_FIRST_DIRECTIVE_STDINT_H@ NEXT_AS_FIRST_DIRECTIVE_STDIO_H = @NEXT_AS_FIRST_DIRECTIVE_STDIO_H@ NEXT_AS_FIRST_DIRECTIVE_STDLIB_H = @NEXT_AS_FIRST_DIRECTIVE_STDLIB_H@ NEXT_AS_FIRST_DIRECTIVE_STRING_H = @NEXT_AS_FIRST_DIRECTIVE_STRING_H@ +NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H@ +NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H@ +NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H@ +NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H@ +NEXT_AS_FIRST_DIRECTIVE_SYS_UIO_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_UIO_H@ NEXT_AS_FIRST_DIRECTIVE_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_TIME_H@ NEXT_AS_FIRST_DIRECTIVE_UNISTD_H = @NEXT_AS_FIRST_DIRECTIVE_UNISTD_H@ NEXT_AS_FIRST_DIRECTIVE_WCHAR_H = @NEXT_AS_FIRST_DIRECTIVE_WCHAR_H@ @@ -920,20 +1028,28 @@ NEXT_ERRNO_H = @NEXT_ERRNO_H@ NEXT_FCNTL_H = @NEXT_FCNTL_H@ NEXT_FLOAT_H = @NEXT_FLOAT_H@ +NEXT_FNMATCH_H = @NEXT_FNMATCH_H@ NEXT_GETOPT_H = @NEXT_GETOPT_H@ NEXT_ICONV_H = @NEXT_ICONV_H@ NEXT_INTTYPES_H = @NEXT_INTTYPES_H@ NEXT_LANGINFO_H = @NEXT_LANGINFO_H@ NEXT_LIMITS_H = @NEXT_LIMITS_H@ NEXT_LOCALE_H = @NEXT_LOCALE_H@ +NEXT_NETINET_IN_H = @NEXT_NETINET_IN_H@ +NEXT_SIGNAL_H = @NEXT_SIGNAL_H@ NEXT_STDARG_H = @NEXT_STDARG_H@ NEXT_STDDEF_H = @NEXT_STDDEF_H@ NEXT_STDINT_H = @NEXT_STDINT_H@ NEXT_STDIO_H = @NEXT_STDIO_H@ NEXT_STDLIB_H = @NEXT_STDLIB_H@ NEXT_STRING_H = @NEXT_STRING_H@ +NEXT_SYS_IOCTL_H = @NEXT_SYS_IOCTL_H@ +NEXT_SYS_SELECT_H = @NEXT_SYS_SELECT_H@ +NEXT_SYS_SOCKET_H = @NEXT_SYS_SOCKET_H@ NEXT_SYS_STAT_H = @NEXT_SYS_STAT_H@ +NEXT_SYS_TIME_H = @NEXT_SYS_TIME_H@ NEXT_SYS_TYPES_H = @NEXT_SYS_TYPES_H@ +NEXT_SYS_UIO_H = @NEXT_SYS_UIO_H@ NEXT_TIME_H = @NEXT_TIME_H@ NEXT_UNISTD_H = @NEXT_UNISTD_H@ NEXT_WCHAR_H = @NEXT_WCHAR_H@ @@ -973,15 +1089,18 @@ REPLACE_DUP = @REPLACE_DUP@ REPLACE_DUP2 = @REPLACE_DUP2@ REPLACE_DUPLOCALE = @REPLACE_DUPLOCALE@ +REPLACE_FACCESSAT = @REPLACE_FACCESSAT@ REPLACE_FCHOWNAT = @REPLACE_FCHOWNAT@ REPLACE_FCLOSE = @REPLACE_FCLOSE@ REPLACE_FCNTL = @REPLACE_FCNTL@ REPLACE_FDOPEN = @REPLACE_FDOPEN@ REPLACE_FDOPENDIR = @REPLACE_FDOPENDIR@ REPLACE_FFLUSH = @REPLACE_FFLUSH@ +REPLACE_FNMATCH = @REPLACE_FNMATCH@ REPLACE_FOPEN = @REPLACE_FOPEN@ REPLACE_FPRINTF = @REPLACE_FPRINTF@ REPLACE_FPURGE = @REPLACE_FPURGE@ +REPLACE_FREELOCALE = @REPLACE_FREELOCALE@ REPLACE_FREOPEN = @REPLACE_FREOPEN@ REPLACE_FSEEK = @REPLACE_FSEEK@ REPLACE_FSEEKO = @REPLACE_FSEEKO@ @@ -999,10 +1118,15 @@ REPLACE_GETLINE = @REPLACE_GETLINE@ REPLACE_GETLOGIN_R = @REPLACE_GETLOGIN_R@ REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@ +REPLACE_GETPASS = @REPLACE_GETPASS@ +REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@ REPLACE_GMTIME = @REPLACE_GMTIME@ REPLACE_ICONV = @REPLACE_ICONV@ REPLACE_ICONV_OPEN = @REPLACE_ICONV_OPEN@ REPLACE_ICONV_UTF = @REPLACE_ICONV_UTF@ +REPLACE_INET_NTOP = @REPLACE_INET_NTOP@ +REPLACE_INET_PTON = @REPLACE_INET_PTON@ +REPLACE_IOCTL = @REPLACE_IOCTL@ REPLACE_ISATTY = @REPLACE_ISATTY@ REPLACE_ISWBLANK = @REPLACE_ISWBLANK@ REPLACE_ISWCNTRL = @REPLACE_ISWCNTRL@ @@ -1031,6 +1155,7 @@ REPLACE_MKSTEMP = @REPLACE_MKSTEMP@ REPLACE_MKTIME = @REPLACE_MKTIME@ REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@ +REPLACE_NEWLOCALE = @REPLACE_NEWLOCALE@ REPLACE_NL_LANGINFO = @REPLACE_NL_LANGINFO@ REPLACE_NULL = @REPLACE_NULL@ REPLACE_OBSTACK_PRINTF = @REPLACE_OBSTACK_PRINTF@ @@ -1041,11 +1166,14 @@ REPLACE_POPEN = @REPLACE_POPEN@ REPLACE_PREAD = @REPLACE_PREAD@ REPLACE_PRINTF = @REPLACE_PRINTF@ +REPLACE_PSELECT = @REPLACE_PSELECT@ +REPLACE_PTHREAD_SIGMASK = @REPLACE_PTHREAD_SIGMASK@ REPLACE_PTSNAME = @REPLACE_PTSNAME@ REPLACE_PTSNAME_R = @REPLACE_PTSNAME_R@ REPLACE_PUTENV = @REPLACE_PUTENV@ REPLACE_PWRITE = @REPLACE_PWRITE@ REPLACE_QSORT_R = @REPLACE_QSORT_R@ +REPLACE_RAISE = @REPLACE_RAISE@ REPLACE_RANDOM_R = @REPLACE_RANDOM_R@ REPLACE_READ = @REPLACE_READ@ REPLACE_READLINK = @REPLACE_READLINK@ @@ -1056,6 +1184,7 @@ REPLACE_RENAME = @REPLACE_RENAME@ REPLACE_RENAMEAT = @REPLACE_RENAMEAT@ REPLACE_RMDIR = @REPLACE_RMDIR@ +REPLACE_SELECT = @REPLACE_SELECT@ REPLACE_SETENV = @REPLACE_SETENV@ REPLACE_SETLOCALE = @REPLACE_SETLOCALE@ REPLACE_SLEEP = @REPLACE_SLEEP@ @@ -1081,6 +1210,7 @@ REPLACE_STRTOK_R = @REPLACE_STRTOK_R@ REPLACE_STRTOUMAX = @REPLACE_STRTOUMAX@ REPLACE_STRUCT_LCONV = @REPLACE_STRUCT_LCONV@ +REPLACE_STRUCT_TIMEVAL = @REPLACE_STRUCT_TIMEVAL@ REPLACE_SYMLINK = @REPLACE_SYMLINK@ REPLACE_SYMLINKAT = @REPLACE_SYMLINKAT@ REPLACE_TIMEGM = @REPLACE_TIMEGM@ @@ -1120,6 +1250,8 @@ STDDEF_H = @STDDEF_H@ STDINT_H = @STDINT_H@ STRIP = @STRIP@ +SYS_IOCTL_H_HAVE_WINSOCK2_H = @SYS_IOCTL_H_HAVE_WINSOCK2_H@ +SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@ SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@ TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@ UINT32_MAX_LT_UINTMAX_MAX = @UINT32_MAX_LT_UINTMAX_MAX@ @@ -1148,6 +1280,7 @@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ +am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ @@ -1201,7 +1334,7 @@ # Process this file with automake to create Makefile.in # -# Copyright 1997-1998, 2005-2017 Free Software Foundation, Inc. +# Copyright 1997-1998, 2005-2018 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 @@ -1214,7 +1347,7 @@ # 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 . +# along with this program. If not, see . # AUTOMAKE_OPTIONS = gnu 1.12 SUBDIRS = po lib doc src tests gnulib-tests @@ -1397,7 +1530,10 @@ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -rm -f cscope.out cscope.in.out cscope.po.out cscope.files -distdir: $(DISTFILES) +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) $(am__remove_distdir) test -d "$(distdir)" || mkdir "$(distdir)" @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ @@ -1479,6 +1615,20 @@ tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz $(am__post_remove_distdir) +dist-tarZ: distdir + @echo WARNING: "Support for distribution archives compressed with" \ + "legacy program 'compress' is deprecated." >&2 + @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 + tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z + $(am__post_remove_distdir) + +dist-shar: distdir + @echo WARNING: "Support for shar distribution archives is" \ + "deprecated." >&2 + @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 + shar $(distdir) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).shar.gz + $(am__post_remove_distdir) + dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) @@ -1682,17 +1832,18 @@ .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \ am--refresh check check-am clean clean-cscope clean-generic \ cscope cscopelist-am ctags ctags-am dist dist-all dist-bzip2 \ - dist-gzip dist-hook dist-lzip dist-xz dist-zip distcheck \ - distclean distclean-generic distclean-hdr distclean-tags \ - distcleancheck distdir distuninstallcheck dvi dvi-am html \ - html-am info info-am install install-am install-data \ - install-data-am install-dvi install-dvi-am install-exec \ - install-exec-am install-html install-html-am install-info \ - install-info-am install-man install-pdf install-pdf-am \ - install-ps install-ps-am install-strip installcheck \ - installcheck-am installdirs installdirs-am maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ - pdf-am ps ps-am tags tags-am uninstall uninstall-am + dist-gzip dist-hook dist-lzip dist-shar dist-tarZ dist-xz \ + dist-zip distcheck distclean distclean-generic distclean-hdr \ + distclean-tags distcleancheck distdir distuninstallcheck dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs installdirs-am \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-generic pdf pdf-am ps ps-am tags tags-am uninstall \ + uninstall-am .PRECIOUS: Makefile diff -Nru grep-3.1/NEWS grep-3.3/NEWS --- grep-3.1/NEWS 2017-07-02 20:20:32.000000000 +0000 +++ grep-3.3/NEWS 2018-12-21 04:38:41.000000000 +0000 @@ -1,5 +1,46 @@ GNU grep NEWS -*- outline -*- +* Noteworthy changes in release 3.3 (2018-12-20) [stable] + +** Bug fixes + + Some uses of \b in the C locale and with the DFA matcher would fail, e.g., + the following would print nothing (it should print the input line): + echo 123-x|LC_ALL=C grep '.\bx' + Using a multibyte locale, using certain regexp constructs (some ranges, + backreferences), or forcing use of the PCRE matcher via --perl-regexp (-P) + would avoid the bug. + [bug introduced in grep 2.3] + + +* Noteworthy changes in release 3.2 (2018-12-20) [stable] + +** Changes in behavior + + The --files-without-match (-L) option now causes grep to succeed + when a file is listed, instead of when a line is selected. This + resembles what git-grep does. + +** Bug fixes + + The --recursive (-r) option no longer fails on MS-Windows. + [bug introduced in grep 2.11] + +** Improvements + + An over-30x performance improvement when many 'or'd expressions + share a common prefix, thanks to improvements in gnulib's dfa.c, + by Norihiro Tanaka. See gnulib commits v0.1-2110-ge648401be, + v0.1-2111-g4299106ce, v0.1-2117-g617a60974 + + An additional 3-23% speed-up when searching large files, via + increased initial buffer size. + + grep now diagnoses stack overflow. Before grep-2.6, the included + regexp code would detect it. Since 2.6, grep defaulted to using + glibc's regexp, which lost that capability. + + * Noteworthy changes in release 3.1 (2017-07-02) [stable] ** Improvements @@ -963,7 +1004,7 @@ - The --revert-match option has been renamed to --invert-match. - - The --fixed-regexp option has been renamed to --fixed-string. + - The --fixed-regexp option has been renamed to --fixed-strings. - New option -H or --with-filename. @@ -1101,7 +1142,7 @@ I was changing it anyway I decided to do a general cleanup. ======================================================================== -Copyright (C) 1992, 1997-2002, 2004-2017 Free Software Foundation, Inc. +Copyright (C) 1992, 1997-2002, 2004-2018 Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright Binary files /tmp/tmppJ6Y2n/6jFha9hbxv/grep-3.1/po/af.gmo and /tmp/tmppJ6Y2n/tYMwNxGD36/grep-3.3/po/af.gmo differ diff -Nru grep-3.1/po/af.po grep-3.3/po/af.po --- grep-3.1/po/af.po 2017-07-02 20:21:16.000000000 +0000 +++ grep-3.3/po/af.po 2018-12-21 04:39:02.000000000 +0000 @@ -6,7 +6,7 @@ msgstr "" "Project-Id-Version: grep 2.5g\n" "Report-Msgid-Bugs-To: bug-grep@gnu.org\n" -"POT-Creation-Date: 2017-07-02 13:21-0700\n" +"POT-Creation-Date: 2018-12-20 20:39-0800\n" "PO-Revision-Date: 2004-03-03 13:33+0200\n" "Last-Translator: Petri Jooste \n" "Language-Team: Afrikaans \n" @@ -30,48 +30,56 @@ msgid "Valid arguments are:" msgstr "" -#: lib/closeout.c:122 src/grep.c:1274 +#: lib/c-stack.c:208 lib/c-stack.c:301 +msgid "program error" +msgstr "" + +#: lib/c-stack.c:209 lib/c-stack.c:302 +msgid "stack overflow" +msgstr "" + +#: lib/closeout.c:122 src/grep.c:1273 msgid "write error" msgstr "" -#: lib/dfa.c:958 +#: lib/dfa.c:970 #, fuzzy msgid "unbalanced [" msgstr "Ongebalanseerde [" -#: lib/dfa.c:1079 +#: lib/dfa.c:1091 msgid "invalid character class" msgstr "" -#: lib/dfa.c:1205 +#: lib/dfa.c:1217 msgid "character class syntax is [[:space:]], not [:space:]" msgstr "" -#: lib/dfa.c:1272 +#: lib/dfa.c:1284 #, fuzzy msgid "unfinished \\ escape" msgstr "Onbeindigde \\-ontsnapstring" -#: lib/dfa.c:1433 +#: lib/dfa.c:1445 #, fuzzy msgid "invalid content of \\{\\}" msgstr "ongeldige maks-telling" -#: lib/dfa.c:1436 +#: lib/dfa.c:1448 msgid "regular expression too big" msgstr "" -#: lib/dfa.c:1850 +#: lib/dfa.c:1863 #, fuzzy msgid "unbalanced (" msgstr "Ongebalanseerde (" -#: lib/dfa.c:1968 +#: lib/dfa.c:1981 #, fuzzy msgid "no syntax specified" msgstr "Geen sintaks gespesifiseer" -#: lib/dfa.c:1976 +#: lib/dfa.c:1992 #, fuzzy msgid "unbalanced )" msgstr "Ongebalanseerde )" @@ -117,7 +125,7 @@ msgid "%s: option requires an argument -- '%c'\n" msgstr "%s: opsie benodig 'n parameter -- %c\n" -#: lib/obstack.c:338 lib/obstack.c:340 lib/xalloc-die.c:34 src/pcresearch.c:291 +#: lib/obstack.c:338 lib/obstack.c:340 lib/xalloc-die.c:34 src/pcresearch.c:313 msgid "memory exhausted" msgstr "geheue uitgeput" @@ -167,7 +175,7 @@ #. for your locale. #. #. If you don't know what to put here, please see -#. +#. #. and use glyphs suitable for your language. #: lib/quotearg.c:362 msgid "`" @@ -245,16 +253,16 @@ msgid "Unmatched ) or \\)" msgstr "" -#: lib/regcomp.c:687 +#: lib/regcomp.c:688 msgid "No previous regular expression" msgstr "" -#: lib/version-etc.c:74 +#: lib/version-etc.c:73 #, c-format msgid "Packaged by %s (%s)\n" msgstr "" -#: lib/version-etc.c:77 +#: lib/version-etc.c:76 #, c-format msgid "Packaged by %s\n" msgstr "" @@ -262,14 +270,14 @@ #. TRANSLATORS: Translate "(C)" to the copyright symbol #. (C-in-a-circle), if this symbol is available in the user's #. locale. Otherwise, do not translate "(C)"; leave it as-is. -#: lib/version-etc.c:84 +#: lib/version-etc.c:83 msgid "(C)" msgstr "" -#: lib/version-etc.c:86 +#: lib/version-etc.c:85 msgid "" "\n" -"License GPLv3+: GNU GPL version 3 or later .\n" "This is free software: you are free to change and redistribute it.\n" "There is NO WARRANTY, to the extent permitted by law.\n" @@ -390,11 +398,11 @@ #: lib/version-etc.c:253 #, c-format -msgid "%s home page: \n" +msgid "%s home page: \n" msgstr "" #: lib/version-etc.c:256 -msgid "General help using GNU software: \n" +msgid "General help using GNU software: \n" msgstr "" #: lib/xstrtol-error.c:63 @@ -412,65 +420,57 @@ msgid "%s%s argument '%s' too large" msgstr "" -#. This is a proper name. See the gettext manual, section Names. -#: src/grep.c:59 -msgid "Mike Haertel" -msgstr "" - -#: src/grep.c:60 -msgid "others, see " -msgstr "" - -#: src/grep.c:585 +#: src/grep.c:582 msgid "(standard input)" msgstr "(standaardtoevoer)" -#: src/grep.c:765 +#: src/grep.c:762 msgid "invalid context length argument" msgstr "ongeldige konteks-lengte-parameter" -#: src/grep.c:828 +#: src/grep.c:827 msgid "input is too large to count" msgstr "toevoer is te veel om te tel" -#: src/grep.c:1579 +#: src/grep.c:1578 #, c-format msgid "Binary file %s matches\n" msgstr "Binre ler %s pas\n" -#: src/grep.c:1627 +#: src/grep.c:1626 #, fuzzy, c-format msgid "warning: %s: %s" msgstr "waarskuwing: %s: %s\n" -#: src/grep.c:1628 +#: src/grep.c:1627 msgid "recursive directory loop" msgstr "rekursiewe lus van gidsinskrywings" -#: src/grep.c:1844 +#: src/grep.c:1843 #, c-format msgid "input file %s is also the output" msgstr "" -#: src/grep.c:1907 src/grep.c:1914 -#, c-format -msgid "Usage: %s [OPTION]... PATTERN [FILE]...\n" +#: src/grep.c:1906 src/grep.c:1913 +#, fuzzy, c-format +msgid "Usage: %s [OPTION]... PATTERNS [FILE]...\n" msgstr "Gebruik so: %s [OPSIE]... PATROON [LER]...\n" -#: src/grep.c:1909 +#: src/grep.c:1908 #, fuzzy, c-format msgid "Try '%s --help' for more information.\n" msgstr "Probeer `%s --help' vir meer inligting.\n" -#: src/grep.c:1915 +#: src/grep.c:1914 #, c-format -msgid "Search for PATTERN in each FILE.\n" +msgid "Search for PATTERNS in each FILE.\n" msgstr "" -#: src/grep.c:1916 +#: src/grep.c:1915 #, fuzzy, c-format msgid "" "Example: %s -i 'hello world' menu.h main.c\n" +"PATTERNS can contain multiple patterns separated by newlines.\n" "\n" "Pattern selection and interpretation:\n" msgstr "" @@ -482,10 +482,10 @@ #: src/grep.c:1920 #, fuzzy, c-format msgid "" -" -E, --extended-regexp PATTERN is an extended regular expression\n" -" -F, --fixed-strings PATTERN is a set of newline-separated strings\n" -" -G, --basic-regexp PATTERN is a basic regular expression (default)\n" -" -P, --perl-regexp PATTERN is a Perl regular expression\n" +" -E, --extended-regexp PATTERNS are extended regular expressions\n" +" -F, --fixed-strings PATTERNS are strings\n" +" -G, --basic-regexp PATTERNS are basic regular expressions\n" +" -P, --perl-regexp PATTERNS are Perl regular expressions\n" msgstr "" " -E, --extended-regexp PATROON is 'n uitgebreide relmatige " "uitdrukking\n" @@ -497,11 +497,11 @@ #: src/grep.c:1926 #, fuzzy, c-format msgid "" -" -e, --regexp=PATTERN use PATTERN for matching\n" -" -f, --file=FILE obtain PATTERN from FILE\n" +" -e, --regexp=PATTERNS use PATTERNS for matching\n" +" -f, --file=FILE take PATTERNS from FILE\n" " -i, --ignore-case ignore case distinctions\n" -" -w, --word-regexp force PATTERN to match only whole words\n" -" -x, --line-regexp force PATTERN to match only whole lines\n" +" -w, --word-regexp match only whole words\n" +" -x, --line-regexp match only whole lines\n" " -z, --null-data a data line ends in 0 byte, not newline\n" msgstr "" " -e, --regexp=PATROON gebruik PATROON as 'n relmatige uitdrukking\n" @@ -548,7 +548,7 @@ #: src/grep.c:1951 #, c-format msgid "" -" -o, --only-matching show only the part of a line matching PATTERN\n" +" -o, --only-matching show only nonempty parts of lines that match\n" " -q, --quiet, --silent suppress all normal output\n" " --binary-files=TYPE assume that binary files are TYPE;\n" " TYPE is 'binary', 'text', or 'without-match'\n" @@ -570,12 +570,11 @@ #: src/grep.c:1967 #, c-format msgid "" -" --include=FILE_PATTERN search only files that match FILE_PATTERN\n" -" --exclude=FILE_PATTERN skip files and directories matching " -"FILE_PATTERN\n" +" --include=GLOB search only files that match GLOB (a file " +"pattern)\n" +" --exclude=GLOB skip files and directories matching GLOB\n" " --exclude-from=FILE skip files matching any file pattern from FILE\n" -" --exclude-dir=PATTERN directories that match PATTERN will be " -"skipped.\n" +" --exclude-dir=GLOB skip directories that match GLOB\n" msgstr "" #: src/grep.c:1974 @@ -635,7 +634,7 @@ msgid "" "When FILE is '-', read standard input. With no FILE, read '.' if\n" "recursive, '-' otherwise. With fewer than two FILEs, assume -h.\n" -"Exit status is 0 if any line is selected, 1 otherwise;\n" +"Exit status is 0 if any line (or file if -L) is selected, 1 otherwise;\n" "if any error occurs and -q is not given, the exit status is 2.\n" msgstr "" @@ -648,63 +647,69 @@ msgid "invalid matcher %s" msgstr "ongeldige maks-telling" -#: src/grep.c:2458 +#: src/grep.c:2459 #, c-format msgid "warning: GREP_OPTIONS is deprecated; please use an alias or script" msgstr "" -#: src/grep.c:2485 +#: src/grep.c:2486 msgid "unknown devices method" msgstr "onbekende metode vir toestelle" -#: src/grep.c:2629 +#: src/grep.c:2630 msgid "invalid max count" msgstr "ongeldige maks-telling" -#: src/grep.c:2687 +#: src/grep.c:2688 msgid "unknown binary-files type" msgstr "onbekende binre-lertipe" -#: src/pcresearch.c:80 +#: src/grep.c:2770 +msgid "" +"Written by Mike Haertel and others; see\n" +"." +msgstr "" + +#: src/pcresearch.c:86 msgid "failed to allocate memory for the PCRE JIT stack" msgstr "" -#: src/pcresearch.c:97 +#: src/pcresearch.c:118 msgid "" "support for the -P option is not compiled into this --disable-perl-regexp " "binary" msgstr "" -#: src/pcresearch.c:119 +#: src/pcresearch.c:140 msgid "-P supports only unibyte and UTF-8 locales" msgstr "" -#: src/pcresearch.c:125 +#: src/pcresearch.c:146 #, fuzzy msgid "the -P option only supports a single pattern" msgstr "Die -P opsie word nie ondersteun nie" -#: src/pcresearch.c:167 +#: src/pcresearch.c:189 msgid "internal error (should never happen)" msgstr "" -#: src/pcresearch.c:192 +#: src/pcresearch.c:214 msgid "internal error" msgstr "" -#: src/pcresearch.c:215 +#: src/pcresearch.c:237 msgid "exceeded PCRE's line length limit" msgstr "" -#: src/pcresearch.c:295 +#: src/pcresearch.c:317 msgid "exhausted PCRE JIT stack" msgstr "" -#: src/pcresearch.c:299 +#: src/pcresearch.c:321 msgid "exceeded PCRE's backtracking limit" msgstr "" -#: src/pcresearch.c:306 +#: src/pcresearch.c:328 #, c-format msgid "internal PCRE error: %d" msgstr "" Binary files /tmp/tmppJ6Y2n/6jFha9hbxv/grep-3.1/po/be.gmo and /tmp/tmppJ6Y2n/tYMwNxGD36/grep-3.3/po/be.gmo differ diff -Nru grep-3.1/po/be.po grep-3.3/po/be.po --- grep-3.1/po/be.po 2017-07-02 20:21:16.000000000 +0000 +++ grep-3.3/po/be.po 2018-12-21 04:39:02.000000000 +0000 @@ -5,7 +5,7 @@ msgstr "" "Project-Id-Version: grep 2.5g\n" "Report-Msgid-Bugs-To: bug-grep@gnu.org\n" -"POT-Creation-Date: 2017-07-02 13:21-0700\n" +"POT-Creation-Date: 2018-12-20 20:39-0800\n" "PO-Revision-Date: 2003-07-22 17:18+0300\n" "Last-Translator: Ales Nyakhaychyk \n" "Language-Team: Belarusian \n" @@ -30,48 +30,56 @@ msgid "Valid arguments are:" msgstr "" -#: lib/closeout.c:122 src/grep.c:1274 +#: lib/c-stack.c:208 lib/c-stack.c:301 +msgid "program error" +msgstr "" + +#: lib/c-stack.c:209 lib/c-stack.c:302 +msgid "stack overflow" +msgstr "" + +#: lib/closeout.c:122 src/grep.c:1273 msgid "write error" msgstr "" -#: lib/dfa.c:958 +#: lib/dfa.c:970 #, fuzzy msgid "unbalanced [" msgstr "Неўраўнаважаная [" -#: lib/dfa.c:1079 +#: lib/dfa.c:1091 msgid "invalid character class" msgstr "" -#: lib/dfa.c:1205 +#: lib/dfa.c:1217 msgid "character class syntax is [[:space:]], not [:space:]" msgstr "" -#: lib/dfa.c:1272 +#: lib/dfa.c:1284 #, fuzzy msgid "unfinished \\ escape" msgstr "Незавершаная \\ кіруючая пасьлядоўнасьць" -#: lib/dfa.c:1433 +#: lib/dfa.c:1445 #, fuzzy msgid "invalid content of \\{\\}" msgstr "недапушчальны найбольшы лічыльнік" -#: lib/dfa.c:1436 +#: lib/dfa.c:1448 msgid "regular expression too big" msgstr "" -#: lib/dfa.c:1850 +#: lib/dfa.c:1863 #, fuzzy msgid "unbalanced (" msgstr "Неўраважаная (" -#: lib/dfa.c:1968 +#: lib/dfa.c:1981 #, fuzzy msgid "no syntax specified" msgstr "Сынтаксіс нявызначаны" -#: lib/dfa.c:1976 +#: lib/dfa.c:1992 #, fuzzy msgid "unbalanced )" msgstr "Неўраўнаважаная )" @@ -115,7 +123,7 @@ msgid "%s: option requires an argument -- '%c'\n" msgstr "%s: выбар патрабуе довад -- %c\n" -#: lib/obstack.c:338 lib/obstack.c:340 lib/xalloc-die.c:34 src/pcresearch.c:291 +#: lib/obstack.c:338 lib/obstack.c:340 lib/xalloc-die.c:34 src/pcresearch.c:313 msgid "memory exhausted" msgstr "памяць вычарпана" @@ -153,7 +161,7 @@ #. for your locale. #. #. If you don't know what to put here, please see -#. +#. #. and use glyphs suitable for your language. #: lib/quotearg.c:362 msgid "`" @@ -231,16 +239,16 @@ msgid "Unmatched ) or \\)" msgstr "" -#: lib/regcomp.c:687 +#: lib/regcomp.c:688 msgid "No previous regular expression" msgstr "" -#: lib/version-etc.c:74 +#: lib/version-etc.c:73 #, c-format msgid "Packaged by %s (%s)\n" msgstr "" -#: lib/version-etc.c:77 +#: lib/version-etc.c:76 #, c-format msgid "Packaged by %s\n" msgstr "" @@ -248,14 +256,14 @@ #. TRANSLATORS: Translate "(C)" to the copyright symbol #. (C-in-a-circle), if this symbol is available in the user's #. locale. Otherwise, do not translate "(C)"; leave it as-is. -#: lib/version-etc.c:84 +#: lib/version-etc.c:83 msgid "(C)" msgstr "" -#: lib/version-etc.c:86 +#: lib/version-etc.c:85 msgid "" "\n" -"License GPLv3+: GNU GPL version 3 or later .\n" "This is free software: you are free to change and redistribute it.\n" "There is NO WARRANTY, to the extent permitted by law.\n" @@ -376,11 +384,11 @@ #: lib/version-etc.c:253 #, c-format -msgid "%s home page: \n" +msgid "%s home page: \n" msgstr "" #: lib/version-etc.c:256 -msgid "General help using GNU software: \n" +msgid "General help using GNU software: \n" msgstr "" #: lib/xstrtol-error.c:63 @@ -398,65 +406,57 @@ msgid "%s%s argument '%s' too large" msgstr "" -#. This is a proper name. See the gettext manual, section Names. -#: src/grep.c:59 -msgid "Mike Haertel" -msgstr "" - -#: src/grep.c:60 -msgid "others, see " -msgstr "" - -#: src/grep.c:585 +#: src/grep.c:582 msgid "(standard input)" msgstr "(стандартны ўвод)" -#: src/grep.c:765 +#: src/grep.c:762 msgid "invalid context length argument" msgstr "недапушчальны довад даўжыні кантэксту" -#: src/grep.c:828 +#: src/grep.c:827 msgid "input is too large to count" msgstr "увод занадта вялікі для падліку" -#: src/grep.c:1579 +#: src/grep.c:1578 #, c-format msgid "Binary file %s matches\n" msgstr "Супадзеньні двайковага файла %s\n" -#: src/grep.c:1627 +#: src/grep.c:1626 #, fuzzy, c-format msgid "warning: %s: %s" msgstr "Увага! %s: %s\n" -#: src/grep.c:1628 +#: src/grep.c:1627 msgid "recursive directory loop" msgstr "тэчкі зацыклены" -#: src/grep.c:1844 +#: src/grep.c:1843 #, c-format msgid "input file %s is also the output" msgstr "" -#: src/grep.c:1907 src/grep.c:1914 -#, c-format -msgid "Usage: %s [OPTION]... PATTERN [FILE]...\n" +#: src/grep.c:1906 src/grep.c:1913 +#, fuzzy, c-format +msgid "Usage: %s [OPTION]... PATTERNS [FILE]...\n" msgstr "Выкарыстаньне: %s [ВЫБАР]... УЗОР [ФАЙЛ]...\n" -#: src/grep.c:1909 +#: src/grep.c:1908 #, fuzzy, c-format msgid "Try '%s --help' for more information.\n" msgstr "Паспрабуйце \"%s --help\" для больш падрабязных зьвестак.\n" -#: src/grep.c:1915 +#: src/grep.c:1914 #, c-format -msgid "Search for PATTERN in each FILE.\n" +msgid "Search for PATTERNS in each FILE.\n" msgstr "" -#: src/grep.c:1916 +#: src/grep.c:1915 #, fuzzy, c-format msgid "" "Example: %s -i 'hello world' menu.h main.c\n" +"PATTERNS can contain multiple patterns separated by newlines.\n" "\n" "Pattern selection and interpretation:\n" msgstr "" @@ -468,10 +468,10 @@ #: src/grep.c:1920 #, fuzzy, c-format msgid "" -" -E, --extended-regexp PATTERN is an extended regular expression\n" -" -F, --fixed-strings PATTERN is a set of newline-separated strings\n" -" -G, --basic-regexp PATTERN is a basic regular expression (default)\n" -" -P, --perl-regexp PATTERN is a Perl regular expression\n" +" -E, --extended-regexp PATTERNS are extended regular expressions\n" +" -F, --fixed-strings PATTERNS are strings\n" +" -G, --basic-regexp PATTERNS are basic regular expressions\n" +" -P, --perl-regexp PATTERNS are Perl regular expressions\n" msgstr "" " -E, --extended-regexp УЗОР - гэта пашыраны сталы выраз.\n" " -F, --fixed-strings УЗОР - гэта набор радкоў, падзеленых між сабой\n" @@ -482,11 +482,11 @@ #: src/grep.c:1926 #, fuzzy, c-format msgid "" -" -e, --regexp=PATTERN use PATTERN for matching\n" -" -f, --file=FILE obtain PATTERN from FILE\n" +" -e, --regexp=PATTERNS use PATTERNS for matching\n" +" -f, --file=FILE take PATTERNS from FILE\n" " -i, --ignore-case ignore case distinctions\n" -" -w, --word-regexp force PATTERN to match only whole words\n" -" -x, --line-regexp force PATTERN to match only whole lines\n" +" -w, --word-regexp match only whole words\n" +" -x, --line-regexp match only whole lines\n" " -z, --null-data a data line ends in 0 byte, not newline\n" msgstr "" " -e, --regexp=УЗОР Выкарыстоваць УЗОР як сталы выраз.\n" @@ -535,7 +535,7 @@ #: src/grep.c:1951 #, c-format msgid "" -" -o, --only-matching show only the part of a line matching PATTERN\n" +" -o, --only-matching show only nonempty parts of lines that match\n" " -q, --quiet, --silent suppress all normal output\n" " --binary-files=TYPE assume that binary files are TYPE;\n" " TYPE is 'binary', 'text', or 'without-match'\n" @@ -557,12 +557,11 @@ #: src/grep.c:1967 #, c-format msgid "" -" --include=FILE_PATTERN search only files that match FILE_PATTERN\n" -" --exclude=FILE_PATTERN skip files and directories matching " -"FILE_PATTERN\n" +" --include=GLOB search only files that match GLOB (a file " +"pattern)\n" +" --exclude=GLOB skip files and directories matching GLOB\n" " --exclude-from=FILE skip files matching any file pattern from FILE\n" -" --exclude-dir=PATTERN directories that match PATTERN will be " -"skipped.\n" +" --exclude-dir=GLOB skip directories that match GLOB\n" msgstr "" #: src/grep.c:1974 @@ -622,7 +621,7 @@ msgid "" "When FILE is '-', read standard input. With no FILE, read '.' if\n" "recursive, '-' otherwise. With fewer than two FILEs, assume -h.\n" -"Exit status is 0 if any line is selected, 1 otherwise;\n" +"Exit status is 0 if any line (or file if -L) is selected, 1 otherwise;\n" "if any error occurs and -q is not given, the exit status is 2.\n" msgstr "" @@ -635,63 +634,69 @@ msgid "invalid matcher %s" msgstr "недапушчальны найбольшы лічыльнік" -#: src/grep.c:2458 +#: src/grep.c:2459 #, c-format msgid "warning: GREP_OPTIONS is deprecated; please use an alias or script" msgstr "" -#: src/grep.c:2485 +#: src/grep.c:2486 msgid "unknown devices method" msgstr "невядомы мэтад пралад" -#: src/grep.c:2629 +#: src/grep.c:2630 msgid "invalid max count" msgstr "недапушчальны найбольшы лічыльнік" -#: src/grep.c:2687 +#: src/grep.c:2688 msgid "unknown binary-files type" msgstr "невядомы від дваічнага файла" -#: src/pcresearch.c:80 +#: src/grep.c:2770 +msgid "" +"Written by Mike Haertel and others; see\n" +"." +msgstr "" + +#: src/pcresearch.c:86 msgid "failed to allocate memory for the PCRE JIT stack" msgstr "" -#: src/pcresearch.c:97 +#: src/pcresearch.c:118 msgid "" "support for the -P option is not compiled into this --disable-perl-regexp " "binary" msgstr "" -#: src/pcresearch.c:119 +#: src/pcresearch.c:140 msgid "-P supports only unibyte and UTF-8 locales" msgstr "" -#: src/pcresearch.c:125 +#: src/pcresearch.c:146 #, fuzzy msgid "the -P option only supports a single pattern" msgstr "Выбар -P непадтрымліваецца" -#: src/pcresearch.c:167 +#: src/pcresearch.c:189 msgid "internal error (should never happen)" msgstr "" -#: src/pcresearch.c:192 +#: src/pcresearch.c:214 msgid "internal error" msgstr "" -#: src/pcresearch.c:215 +#: src/pcresearch.c:237 msgid "exceeded PCRE's line length limit" msgstr "" -#: src/pcresearch.c:295 +#: src/pcresearch.c:317 msgid "exhausted PCRE JIT stack" msgstr "" -#: src/pcresearch.c:299 +#: src/pcresearch.c:321 msgid "exceeded PCRE's backtracking limit" msgstr "" -#: src/pcresearch.c:306 +#: src/pcresearch.c:328 #, c-format msgid "internal PCRE error: %d" msgstr "" Binary files /tmp/tmppJ6Y2n/6jFha9hbxv/grep-3.1/po/bg.gmo and /tmp/tmppJ6Y2n/tYMwNxGD36/grep-3.3/po/bg.gmo differ diff -Nru grep-3.1/po/bg.po grep-3.3/po/bg.po --- grep-3.1/po/bg.po 2017-07-02 20:21:16.000000000 +0000 +++ grep-3.3/po/bg.po 2018-12-21 04:39:02.000000000 +0000 @@ -1,14 +1,14 @@ # Bulgarian translation of GNU grep po-file. -# Copyright (C) 2002, 2015, 2016, 2017 Free Software Foundation, Inc. +# Copyright (C) 2002, 2015, 2016, 2017, 2018 Free Software Foundation, Inc. # This file is distributed under the same license as the grep package. # Pavel Mihaylov , 2002. -# Alexander Shopov , 2015, 2016, 2017. +# Alexander Shopov , 2015, 2016, 2017, 2018. msgid "" msgstr "" -"Project-Id-Version: grep-3.0.23-b00\n" +"Project-Id-Version: grep 3.1.48\n" "Report-Msgid-Bugs-To: bug-grep@gnu.org\n" -"POT-Creation-Date: 2017-07-02 13:21-0700\n" -"PO-Revision-Date: 2017-06-26 13:30+0300\n" +"POT-Creation-Date: 2018-12-20 20:39-0800\n" +"PO-Revision-Date: 2018-12-17 06:43+0100\n" "Last-Translator: Alexander Shopov \n" "Language-Team: Bulgarian \n" "Language: bg\n" @@ -32,43 +32,51 @@ msgid "Valid arguments are:" msgstr "Възможните аргументи са:" -#: lib/closeout.c:122 src/grep.c:1274 +#: lib/c-stack.c:208 lib/c-stack.c:301 +msgid "program error" +msgstr "програмна грешка" + +#: lib/c-stack.c:209 lib/c-stack.c:302 +msgid "stack overflow" +msgstr "препълване на стека" + +#: lib/closeout.c:122 src/grep.c:1273 msgid "write error" msgstr "грешка при запис" -#: lib/dfa.c:958 +#: lib/dfa.c:970 msgid "unbalanced [" msgstr "„[“ без еш" -#: lib/dfa.c:1079 +#: lib/dfa.c:1091 msgid "invalid character class" msgstr "неправилен клас знаци" -#: lib/dfa.c:1205 +#: lib/dfa.c:1217 msgid "character class syntax is [[:space:]], not [:space:]" msgstr "клас знаци се указва чрез „[[:ИМЕ:]]“, а не „[:ИМЕ:]“" -#: lib/dfa.c:1272 +#: lib/dfa.c:1284 msgid "unfinished \\ escape" msgstr "незавършена екранираща последователност чрез „\\“" -#: lib/dfa.c:1433 +#: lib/dfa.c:1445 msgid "invalid content of \\{\\}" msgstr "неправилно съдържание в „\\{\\}“" -#: lib/dfa.c:1436 +#: lib/dfa.c:1448 msgid "regular expression too big" msgstr "прекалено голям регулярен израз" -#: lib/dfa.c:1850 +#: lib/dfa.c:1863 msgid "unbalanced (" msgstr "„(“ без еш" -#: lib/dfa.c:1968 +#: lib/dfa.c:1981 msgid "no syntax specified" msgstr "не е зададен синтаксис" -#: lib/dfa.c:1976 +#: lib/dfa.c:1992 msgid "unbalanced )" msgstr "„)“ без еш" @@ -111,7 +119,7 @@ msgid "%s: option requires an argument -- '%c'\n" msgstr "%s: опцията изисква аргумент — „%c“\n" -#: lib/obstack.c:338 lib/obstack.c:340 lib/xalloc-die.c:34 src/pcresearch.c:291 +#: lib/obstack.c:338 lib/obstack.c:340 lib/xalloc-die.c:34 src/pcresearch.c:313 msgid "memory exhausted" msgstr "паметта е изчерпана" @@ -149,7 +157,7 @@ #. for your locale. #. #. If you don't know what to put here, please see -#. +#. #. and use glyphs suitable for your language. #: lib/quotearg.c:362 msgid "`" @@ -227,16 +235,16 @@ msgid "Unmatched ) or \\)" msgstr "„)“ или „\\)“ без еш" -#: lib/regcomp.c:687 +#: lib/regcomp.c:688 msgid "No previous regular expression" msgstr "Няма предхождащ регулярен израз" -#: lib/version-etc.c:74 +#: lib/version-etc.c:73 #, c-format msgid "Packaged by %s (%s)\n" msgstr "Пакетирано от %s (%s)\n" -#: lib/version-etc.c:77 +#: lib/version-etc.c:76 #, c-format msgid "Packaged by %s\n" msgstr "Пакетирано от %s\n" @@ -244,14 +252,14 @@ #. TRANSLATORS: Translate "(C)" to the copyright symbol #. (C-in-a-circle), if this symbol is available in the user's #. locale. Otherwise, do not translate "(C)"; leave it as-is. -#: lib/version-etc.c:84 +#: lib/version-etc.c:83 msgid "(C)" msgstr "©" -#: lib/version-etc.c:86 +#: lib/version-etc.c:85 msgid "" "\n" -"License GPLv3+: GNU GPL version 3 or later .\n" "This is free software: you are free to change and redistribute it.\n" "There is NO WARRANTY, to the extent permitted by law.\n" @@ -262,7 +270,7 @@ "Фондацията\n" "за свободен софтуер — версия 3 на лиценза или (по ваше решение) по-късна " "версия.\n" -"\n" +"\n" "Тази програма е свободен софтуер. Можете да я разпространявате и/или " "променяте.\n" "Тя се разпространява БЕЗ НИКАКВИ ГАРАНЦИИ доколкото е позволено от закона.\n" @@ -401,12 +409,12 @@ #: lib/version-etc.c:253 #, c-format -msgid "%s home page: \n" -msgstr "Уеб страница на „%s“: \n" +msgid "%s home page: \n" +msgstr "Уеб страница на „%s“: \n" #: lib/version-etc.c:256 -msgid "General help using GNU software: \n" -msgstr "Обща помощ за програмите на GNU: \n" +msgid "General help using GNU software: \n" +msgstr "Обща помощ за програмите на GNU: \n" #: lib/xstrtol-error.c:63 #, c-format @@ -423,101 +431,94 @@ msgid "%s%s argument '%s' too large" msgstr "прекалено дълъг аргумент „%3$s“ за опцията „%1$s%2$s“" -#. This is a proper name. See the gettext manual, section Names. -#: src/grep.c:59 -msgid "Mike Haertel" -msgstr "Mike Haertel" - -#: src/grep.c:60 -msgid "others, see " -msgstr "и др., вижте " - -#: src/grep.c:585 +#: src/grep.c:582 msgid "(standard input)" msgstr "(стандартен вход)" -#: src/grep.c:765 +#: src/grep.c:762 msgid "invalid context length argument" msgstr "неправилен размер на контекста" -#: src/grep.c:828 +#: src/grep.c:827 msgid "input is too large to count" msgstr "входните данни са прекалено големи, за да бъдат преброени" -#: src/grep.c:1579 +#: src/grep.c:1578 #, c-format msgid "Binary file %s matches\n" msgstr "Двоичният файл „%s“ напасва\n" -#: src/grep.c:1627 +#: src/grep.c:1626 #, c-format msgid "warning: %s: %s" msgstr "предупреждение: %s: %s" -#: src/grep.c:1628 +#: src/grep.c:1627 msgid "recursive directory loop" msgstr "зацикляне при рекурсивна обработка на директориите" -#: src/grep.c:1844 +#: src/grep.c:1843 #, c-format msgid "input file %s is also the output" msgstr "входният файл „%s“ е и изходен" -#: src/grep.c:1907 src/grep.c:1914 +#: src/grep.c:1906 src/grep.c:1913 #, c-format -msgid "Usage: %s [OPTION]... PATTERN [FILE]...\n" -msgstr "Употреба: %s [ОПЦИЯ]… ШАБЛОН [ФАЙЛ]…\n" +msgid "Usage: %s [OPTION]... PATTERNS [FILE]...\n" +msgstr "Употреба: %s [ОПЦИЯ]… ШАБЛОН… [ФАЙЛ]…\n" -#: src/grep.c:1909 +#: src/grep.c:1908 #, c-format msgid "Try '%s --help' for more information.\n" -msgstr "Вижте „%s --help“ за повече информация.\n" +msgstr "За повече информация изпълнете „%s --help“.\n" -#: src/grep.c:1915 +#: src/grep.c:1914 #, c-format -msgid "Search for PATTERN in each FILE.\n" -msgstr "Търсене на текст, напасващ с ШАБЛОНа във всеки зададен ФАЙЛ.\n" +msgid "Search for PATTERNS in each FILE.\n" +msgstr "Търсене на текст, напасващ с ШАБЛОНите във всеки зададен ФАЙЛ.\n" -#: src/grep.c:1916 +#: src/grep.c:1915 #, c-format msgid "" "Example: %s -i 'hello world' menu.h main.c\n" +"PATTERNS can contain multiple patterns separated by newlines.\n" "\n" "Pattern selection and interpretation:\n" msgstr "" "Пример: %s -i 'hello world' menu.h main.c\n" +"Може да използвате по един ШАБЛОН на ред.\n" "\n" "Избор на шаблона и интерпретация:\n" #: src/grep.c:1920 #, c-format msgid "" -" -E, --extended-regexp PATTERN is an extended regular expression\n" -" -F, --fixed-strings PATTERN is a set of newline-separated strings\n" -" -G, --basic-regexp PATTERN is a basic regular expression (default)\n" -" -P, --perl-regexp PATTERN is a Perl regular expression\n" -msgstr "" -" -E, --extended-regexp ШАБЛОНът е разширен регулярен израз\n" -" -F, --fixed-regexp ШАБЛОНът е от дословни низове, разделени с\n" -" нови редове\n" -" -G, --basic-regexp ШАБЛОНът е основен регулярен израз (стандартно)\n" -" -P, --perl-regexp ШАБЛОНът е регулярен израз на Perl\n" +" -E, --extended-regexp PATTERNS are extended regular expressions\n" +" -F, --fixed-strings PATTERNS are strings\n" +" -G, --basic-regexp PATTERNS are basic regular expressions\n" +" -P, --perl-regexp PATTERNS are Perl regular expressions\n" +msgstr "" +" -E, --extended-regexp ШАБЛОНите са разширени регулярни изрази\n" +" -F, --fixed-regexp ШАБЛОНите са дословни низове\n" +" -G, --basic-regexp ШАБЛОНите са основни регулярни изрази " +"(стандартно)\n" +" -P, --perl-regexp ШАБЛОНите са регулярни изрази на Perl\n" #: src/grep.c:1926 #, c-format msgid "" -" -e, --regexp=PATTERN use PATTERN for matching\n" -" -f, --file=FILE obtain PATTERN from FILE\n" +" -e, --regexp=PATTERNS use PATTERNS for matching\n" +" -f, --file=FILE take PATTERNS from FILE\n" " -i, --ignore-case ignore case distinctions\n" -" -w, --word-regexp force PATTERN to match only whole words\n" -" -x, --line-regexp force PATTERN to match only whole lines\n" +" -w, --word-regexp match only whole words\n" +" -x, --line-regexp match only whole lines\n" " -z, --null-data a data line ends in 0 byte, not newline\n" msgstr "" " -e, --regexp=ШАБЛОН ШАБЛОН за регулярен израз\n" -" -f, --file=ФАЙЛ изчитане на ШАБЛОНа от ФАЙЛ\n" +" -f, --file=ФАЙЛ изчитане на ШАБЛОНите от ФАЙЛ\n" " -i, --ignore-case без разлика между главни и малки букви\n" -" -w, --word-regexp ШАБЛОНът да съвпада само с цели думи\n" -" -x, --line-regexp ШАБЛОНът да съвпада само с цели редове\n" +" -w, --word-regexp съвпадане само с цели думи\n" +" -x, --line-regexp съвпадане само с цели редове\n" " -z, --null-data редовете завършват с NULL, а не със знак за нов " "ред\n" @@ -569,7 +570,7 @@ #: src/grep.c:1951 #, c-format msgid "" -" -o, --only-matching show only the part of a line matching PATTERN\n" +" -o, --only-matching show only nonempty parts of lines that match\n" " -q, --quiet, --silent suppress all normal output\n" " --binary-files=TYPE assume that binary files are TYPE;\n" " TYPE is 'binary', 'text', or 'without-match'\n" @@ -609,12 +610,11 @@ #: src/grep.c:1967 #, c-format msgid "" -" --include=FILE_PATTERN search only files that match FILE_PATTERN\n" -" --exclude=FILE_PATTERN skip files and directories matching " -"FILE_PATTERN\n" +" --include=GLOB search only files that match GLOB (a file " +"pattern)\n" +" --exclude=GLOB skip files and directories matching GLOB\n" " --exclude-from=FILE skip files matching any file pattern from FILE\n" -" --exclude-dir=PATTERN directories that match PATTERN will be " -"skipped.\n" +" --exclude-dir=GLOB skip directories that match GLOB\n" msgstr "" " --include=ШАБЛОН_ЗА_ИМЕ\n" " търсене само във файлове с имена, напасващи\n" @@ -688,14 +688,15 @@ msgid "" "When FILE is '-', read standard input. With no FILE, read '.' if\n" "recursive, '-' otherwise. With fewer than two FILEs, assume -h.\n" -"Exit status is 0 if any line is selected, 1 otherwise;\n" +"Exit status is 0 if any line (or file if -L) is selected, 1 otherwise;\n" "if any error occurs and -q is not given, the exit status is 2.\n" msgstr "" "Когато ФАЙЛът е „-“ се чете стандартният вход. Без ФАЙЛ се чете текущата\n" "директория „.“. Ако са зададени по-малко от два ФАЙЛа, се предполага „-h“.\n" -"Изходният код на grep е 0 при поне един избран ред и 1 във всички останали\n" -"случаи. Ако не е зададена опцията „-q“ и възникне грешка, изходният код е " -"2.\n" +"Изходният код на grep е 0 при поне един напаснат ред (или файл, при " +"ползването\n" +"на опцията „-L“) и 1 във всички останали случаи. Ако не е зададена опцията\n" +"„-q“ и възникне грешка, изходният код е 2.\n" #: src/grep.c:2034 msgid "conflicting matchers specified" @@ -706,7 +707,7 @@ msgid "invalid matcher %s" msgstr "неправилен израз „%s“" -#: src/grep.c:2458 +#: src/grep.c:2459 #, c-format msgid "warning: GREP_OPTIONS is deprecated; please use an alias or script" msgstr "" @@ -714,24 +715,31 @@ "на\n" "обвивката или скрипт" -#: src/grep.c:2485 +#: src/grep.c:2486 msgid "unknown devices method" msgstr "неизвестен метод за обработка на специалните файлове" -#: src/grep.c:2629 +#: src/grep.c:2630 msgid "invalid max count" msgstr "неправилен максимален брой" -#: src/grep.c:2687 +#: src/grep.c:2688 msgid "unknown binary-files type" msgstr "непознат вид двоичен файл" -#: src/pcresearch.c:80 +#: src/grep.c:2770 +#, fuzzy +msgid "" +"Written by Mike Haertel and others; see\n" +"." +msgstr "и др., вижте " + +#: src/pcresearch.c:86 msgid "failed to allocate memory for the PCRE JIT stack" msgstr "" "неуспешно заделяне на памет за стека за изпълнение на шаблоните за „PCRE“" -#: src/pcresearch.c:97 +#: src/pcresearch.c:118 msgid "" "support for the -P option is not compiled into this --disable-perl-regexp " "binary" @@ -740,35 +748,38 @@ "с\n" "опцията „--disable-perl-regexp“." -#: src/pcresearch.c:119 +#: src/pcresearch.c:140 msgid "-P supports only unibyte and UTF-8 locales" msgstr "опцията „-P“ изисква локалът да е с еднобайтово кодиране или UTF-8" -#: src/pcresearch.c:125 +#: src/pcresearch.c:146 msgid "the -P option only supports a single pattern" msgstr "опцията „-P“ поддържа само един шаблон" -#: src/pcresearch.c:167 +#: src/pcresearch.c:189 msgid "internal error (should never happen)" msgstr "вътрешна грешка, която не трябва да възниква — молим да я докладвате" -#: src/pcresearch.c:192 +#: src/pcresearch.c:214 msgid "internal error" msgstr "вътрешна грешка, която не трябва да възниква — молим да я докладвате" -#: src/pcresearch.c:215 +#: src/pcresearch.c:237 msgid "exceeded PCRE's line length limit" msgstr "максималният размер на реда за „PCRE“ е превишен" -#: src/pcresearch.c:295 +#: src/pcresearch.c:317 msgid "exhausted PCRE JIT stack" msgstr "паметта за стека за изпълнение на шаблоните за „PCRE“ свърши" -#: src/pcresearch.c:299 +#: src/pcresearch.c:321 msgid "exceeded PCRE's backtracking limit" msgstr "максималният брой връщания при рекурсия на „PCRE“ е превишен" -#: src/pcresearch.c:306 +#: src/pcresearch.c:328 #, c-format msgid "internal PCRE error: %d" msgstr "вътрешна грешка на „PCRE“: %d" + +#~ msgid "Mike Haertel" +#~ msgstr "Mike Haertel" Binary files /tmp/tmppJ6Y2n/6jFha9hbxv/grep-3.1/po/ca.gmo and /tmp/tmppJ6Y2n/tYMwNxGD36/grep-3.3/po/ca.gmo differ diff -Nru grep-3.1/po/ca.po grep-3.3/po/ca.po --- grep-3.1/po/ca.po 2017-07-02 20:21:16.000000000 +0000 +++ grep-3.3/po/ca.po 2018-12-21 04:39:02.000000000 +0000 @@ -2,15 +2,15 @@ # Copyright (C) 2002 Free Software Foundation, Inc. # This file is distributed under the same license as the grep package. # Enric Alberola Rosell , 2002, 2010. -# Àngel Mompó , 2010, 2011, 2012, 2014. +# Àngel Mompó , 2010, 2011, 2012, 2014, 2017. # msgid "" msgstr "" -"Project-Id-Version: GNU grep-2.25.92\n" +"Project-Id-Version: GNU grep-3.0.23-b00\n" "Report-Msgid-Bugs-To: bug-grep@gnu.org\n" -"POT-Creation-Date: 2017-07-02 13:21-0700\n" -"PO-Revision-Date: 2016-10-23 18:01+0200\n" -"Last-Translator: Angel Mompo \n" +"POT-Creation-Date: 2018-12-20 20:39-0800\n" +"PO-Revision-Date: 2017-12-21 19:24+0100\n" +"Last-Translator: Àngel Mompó \n" "Language-Team: Catalan \n" "Language: ca\n" "MIME-Version: 1.0\n" @@ -18,7 +18,7 @@ "Content-Transfer-Encoding: 8bit\n" "X-Bugs: Report translation errors to the Language-Team address.\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -"X-Generator: Poedit 1.8.4\n" +"X-Generator: Gtranslator 2.91.7\n" #: lib/argmatch.c:134 #, c-format @@ -34,43 +34,51 @@ msgid "Valid arguments are:" msgstr "Els arguments vàlids són:" -#: lib/closeout.c:122 src/grep.c:1274 +#: lib/c-stack.c:208 lib/c-stack.c:301 +msgid "program error" +msgstr "" + +#: lib/c-stack.c:209 lib/c-stack.c:302 +msgid "stack overflow" +msgstr "" + +#: lib/closeout.c:122 src/grep.c:1273 msgid "write error" msgstr "error d'escriptura" -#: lib/dfa.c:958 +#: lib/dfa.c:970 msgid "unbalanced [" msgstr "[ desaparellat" -#: lib/dfa.c:1079 +#: lib/dfa.c:1091 msgid "invalid character class" msgstr "La classe de caràcter no és vàlida" -#: lib/dfa.c:1205 +#: lib/dfa.c:1217 msgid "character class syntax is [[:space:]], not [:space:]" msgstr "La sintaxi de la classe de caràcter és [[:espai]], no [:espai:]" -#: lib/dfa.c:1272 +#: lib/dfa.c:1284 msgid "unfinished \\ escape" msgstr "Codi d'escapada \\ inacabat" -#: lib/dfa.c:1433 +#: lib/dfa.c:1445 msgid "invalid content of \\{\\}" msgstr "el context de \\{\\} no és vàlid" -#: lib/dfa.c:1436 +#: lib/dfa.c:1448 msgid "regular expression too big" msgstr "l'expressió regular és massa gran" -#: lib/dfa.c:1850 +#: lib/dfa.c:1863 msgid "unbalanced (" msgstr "( desaparellat" -#: lib/dfa.c:1968 +#: lib/dfa.c:1981 msgid "no syntax specified" msgstr "no s'ha especificat cap sintaxi" -#: lib/dfa.c:1976 +#: lib/dfa.c:1992 msgid "unbalanced )" msgstr ") desaparellat" @@ -79,29 +87,29 @@ msgstr "Error desconegut del sistema" #: lib/getopt.c:278 -#, fuzzy, c-format +#, c-format msgid "%s: option '%s%s' is ambiguous\n" -msgstr "%s: l'opció «%s» és ambigua\n" +msgstr "%s: l'opció «%s%s» és ambigua\n" #: lib/getopt.c:284 -#, fuzzy, c-format +#, c-format msgid "%s: option '%s%s' is ambiguous; possibilities:" -msgstr "%s: l'opció «%s» és ambigua; possibilitats:" +msgstr "%s: l'opció «%s%s» és ambigua; possibilitats:" #: lib/getopt.c:319 -#, fuzzy, c-format +#, c-format msgid "%s: unrecognized option '%s%s'\n" -msgstr "%s: no es reconeix l'opció «%c%s»\n" +msgstr "%s: no es reconeix l'opció «%s%s»\n" #: lib/getopt.c:345 -#, fuzzy, c-format +#, c-format msgid "%s: option '%s%s' doesn't allow an argument\n" -msgstr "%s: l'opció «%c%s» no permet un argument\n" +msgstr "%s: l'opció «%s%s» no permet un argument\n" #: lib/getopt.c:360 -#, fuzzy, c-format +#, c-format msgid "%s: option '%s%s' requires an argument\n" -msgstr "%s: l'opció «--%s» necessita un argument\n" +msgstr "%s: l'opció «%s%s» necessita un argument\n" #: lib/getopt.c:621 #, c-format @@ -113,7 +121,7 @@ msgid "%s: option requires an argument -- '%c'\n" msgstr "%s: l'opció necessita un argument -- «%c»\n" -#: lib/obstack.c:338 lib/obstack.c:340 lib/xalloc-die.c:34 src/pcresearch.c:291 +#: lib/obstack.c:338 lib/obstack.c:340 lib/xalloc-die.c:34 src/pcresearch.c:313 msgid "memory exhausted" msgstr "memòria exhaurida" @@ -130,7 +138,7 @@ #: lib/xbinary-io.c:37 #, c-format msgid "failed to set file descriptor text/binary mode" -msgstr "" +msgstr "No s'ha pogut establir el mode del descriptor de fitxers text/binari" #. TRANSLATORS: #. Get translations for open and closing quotation marks. @@ -151,7 +159,7 @@ #. for your locale. #. #. If you don't know what to put here, please see -#. +#. #. and use glyphs suitable for your language. #: lib/quotearg.c:362 msgid "`" @@ -229,16 +237,16 @@ msgid "Unmatched ) or \\)" msgstr "Falten o sobren ) o \\)" -#: lib/regcomp.c:687 +#: lib/regcomp.c:688 msgid "No previous regular expression" msgstr "No hi ha una expressió regular prèvia" -#: lib/version-etc.c:74 +#: lib/version-etc.c:73 #, c-format msgid "Packaged by %s (%s)\n" msgstr "Empaquetat per %s (%s)\n" -#: lib/version-etc.c:77 +#: lib/version-etc.c:76 #, c-format msgid "Packaged by %s\n" msgstr "Empaquetat per %s\n" @@ -246,14 +254,15 @@ #. TRANSLATORS: Translate "(C)" to the copyright symbol #. (C-in-a-circle), if this symbol is available in the user's #. locale. Otherwise, do not translate "(C)"; leave it as-is. -#: lib/version-etc.c:84 +#: lib/version-etc.c:83 msgid "(C)" msgstr "(C)" -#: lib/version-etc.c:86 +#: lib/version-etc.c:85 +#, fuzzy msgid "" "\n" -"License GPLv3+: GNU GPL version 3 or later .\n" "This is free software: you are free to change and redistribute it.\n" "There is NO WARRANTY, to the extent permitted by law.\n" @@ -399,12 +408,13 @@ msgstr "Pàgina inicial de %s: <%s>\n" #: lib/version-etc.c:253 -#, c-format -msgid "%s home page: \n" +#, fuzzy, c-format +msgid "%s home page: \n" msgstr "Pàgina inicial de %s: \n" #: lib/version-etc.c:256 -msgid "General help using GNU software: \n" +#, fuzzy +msgid "General help using GNU software: \n" msgstr "" "Ajuda general d'utilització del programari de GNU: \n" @@ -424,105 +434,98 @@ msgid "%s%s argument '%s' too large" msgstr "l'argument «%s» de %s%s és massa gran" -#. This is a proper name. See the gettext manual, section Names. -#: src/grep.c:59 -msgid "Mike Haertel" -msgstr "Mike Haertel" - -#: src/grep.c:60 -msgid "others, see " -msgstr "la resta, vegeu " - -#: src/grep.c:585 +#: src/grep.c:582 msgid "(standard input)" msgstr "(entrada estàndard)" -#: src/grep.c:765 +#: src/grep.c:762 msgid "invalid context length argument" msgstr "la longitud de l'argument no és vàlida" -#: src/grep.c:828 +#: src/grep.c:827 msgid "input is too large to count" msgstr "l'entrada és massa llarga per a comptar" -#: src/grep.c:1579 +#: src/grep.c:1578 #, c-format msgid "Binary file %s matches\n" msgstr "Hi ha coincidències en el fitxer binari %s\n" -#: src/grep.c:1627 +#: src/grep.c:1626 #, c-format msgid "warning: %s: %s" msgstr "aví­s: %s: %s" -#: src/grep.c:1628 +#: src/grep.c:1627 msgid "recursive directory loop" msgstr "bucle de directori recursiu" -#: src/grep.c:1844 +#: src/grep.c:1843 #, c-format msgid "input file %s is also the output" msgstr "el fitxer d'entrada %s és també la sortida" -#: src/grep.c:1907 src/grep.c:1914 -#, c-format -msgid "Usage: %s [OPTION]... PATTERN [FILE]...\n" +#: src/grep.c:1906 src/grep.c:1913 +#, fuzzy, c-format +msgid "Usage: %s [OPTION]... PATTERNS [FILE]...\n" msgstr "Forma d'ús: %s [OPCIÓ]... PATRÓ [FITXER] ...\n" -#: src/grep.c:1909 +#: src/grep.c:1908 #, c-format msgid "Try '%s --help' for more information.\n" msgstr "Feu servir «%s --help» per a obtenir més informació.\n" -#: src/grep.c:1915 +#: src/grep.c:1914 #, fuzzy, c-format -msgid "Search for PATTERN in each FILE.\n" -msgstr "Busca el PATRÓ a cada FITXER o a l'entrada estàndard.\n" +msgid "Search for PATTERNS in each FILE.\n" +msgstr "Busca el PATRÓ a cada FITXER.\n" -#: src/grep.c:1916 +#: src/grep.c:1915 #, fuzzy, c-format msgid "" "Example: %s -i 'hello world' menu.h main.c\n" +"PATTERNS can contain multiple patterns separated by newlines.\n" "\n" "Pattern selection and interpretation:\n" msgstr "" -"Exemple: %s -i \"hola món\" menu.h main.c\n" +"Exemple: %s -i «hola món» menu.h main.c\n" "\n" -"Selecció i interpretació de l'expressió regular:\n" +"Selecció i interpretació del patró:\n" #: src/grep.c:1920 #, fuzzy, c-format msgid "" -" -E, --extended-regexp PATTERN is an extended regular expression\n" -" -F, --fixed-strings PATTERN is a set of newline-separated strings\n" -" -G, --basic-regexp PATTERN is a basic regular expression (default)\n" -" -P, --perl-regexp PATTERN is a Perl regular expression\n" +" -E, --extended-regexp PATTERNS are extended regular expressions\n" +" -F, --fixed-strings PATTERNS are strings\n" +" -G, --basic-regexp PATTERNS are basic regular expressions\n" +" -P, --perl-regexp PATTERNS are Perl regular expressions\n" msgstr "" -" -E, --extended-regexp PATRÓ és una expressió regular ampliada (ERA)\n" +" -E, --extended-regexp PATRÓ és una expressió regular ampliada\n" " -F, --fixed-strings PATRÓ és un conjunt de cadenes separades per " -"salts de lí­nia\n" -" -G, --basic-regexp PATRÓ és un expressió regular bàsica (ERB)\n" +"salts de línia\n" +" -G, --basic-regexp PATRÓ és un expressió regular bàsica (per " +"defecte)\n" " -P, --perl-regexp PATRÓ és un expressió regular de Perl\n" #: src/grep.c:1926 -#, c-format +#, fuzzy, c-format msgid "" -" -e, --regexp=PATTERN use PATTERN for matching\n" -" -f, --file=FILE obtain PATTERN from FILE\n" +" -e, --regexp=PATTERNS use PATTERNS for matching\n" +" -f, --file=FILE take PATTERNS from FILE\n" " -i, --ignore-case ignore case distinctions\n" -" -w, --word-regexp force PATTERN to match only whole words\n" -" -x, --line-regexp force PATTERN to match only whole lines\n" +" -w, --word-regexp match only whole words\n" +" -x, --line-regexp match only whole lines\n" " -z, --null-data a data line ends in 0 byte, not newline\n" msgstr "" -" -e, --regexp=PATRÓ utilitza el PATRÓ com a expressió regular\n" +" -e, --regexp=PATRÓ utilitza el PATRÓ per la comparació\n" " -f, --file=FITXER obté el PATRÓ del FITXER\n" " -i, --ignore-case no diferencia entre majúscules i minúscules\n" " -w, --word-regexp força la concordança del PATRÓ amb paraules " "completes\n" " -x, --line-regexp força la concordança del PATRÓ amb línies " "completes\n" -" -z, --null-data considera que una lí­nia de dades acaba amb byte " -"0 i no amb un salt de línia\n" +" -z, --null-data una línia de dades acaba amb byte 0 i no amb un " +"salt de línia\n" #: src/grep.c:1933 #, c-format @@ -542,7 +545,7 @@ " --help mostra aquesta ajuda i surt\n" #: src/grep.c:1940 -#, fuzzy, c-format +#, c-format msgid "" "\n" "Output control:\n" @@ -563,15 +566,16 @@ " -n, --line-number mostra el número de lí­nia amb les línies de " "sortida\n" " --line-buffered bolca la sortida a cada línia\n" -" -H, --with-filename mostra el nom del fitxer a cada coincidència\n" +" -H, --with-filename mostra el nom del fitxer amb les línies de " +"sortida\n" " -h, --no-filename elimina els noms dels fitxers de la sortida\n" -" --label=ETIQUETA fes servir ETIQUETA com a prefix del nom del " +" --label=ETIQUETA fes servir ETIQUETA com a prefix del nom del " "fitxer per l'entrada estàndard\n" #: src/grep.c:1951 -#, c-format +#, fuzzy, c-format msgid "" -" -o, --only-matching show only the part of a line matching PATTERN\n" +" -o, --only-matching show only nonempty parts of lines that match\n" " -q, --quiet, --silent suppress all normal output\n" " --binary-files=TYPE assume that binary files are TYPE;\n" " TYPE is 'binary', 'text', or 'without-match'\n" @@ -607,14 +611,13 @@ "enllaços simbòlics\n" #: src/grep.c:1967 -#, c-format +#, fuzzy, c-format msgid "" -" --include=FILE_PATTERN search only files that match FILE_PATTERN\n" -" --exclude=FILE_PATTERN skip files and directories matching " -"FILE_PATTERN\n" +" --include=GLOB search only files that match GLOB (a file " +"pattern)\n" +" --exclude=GLOB skip files and directories matching GLOB\n" " --exclude-from=FILE skip files matching any file pattern from FILE\n" -" --exclude-dir=PATTERN directories that match PATTERN will be " -"skipped.\n" +" --exclude-dir=GLOB skip directories that match GLOB\n" msgstr "" " --include=FITXER_PATRÓ busca els fitxers que coincideixin amb el " "FITXER_PATRÓ\n" @@ -626,7 +629,7 @@ "PATRÓ.\n" #: src/grep.c:1974 -#, fuzzy, c-format +#, c-format msgid "" " -L, --files-without-match print only names of FILEs with no selected " "lines\n" @@ -636,13 +639,13 @@ " -Z, --null print 0 byte after FILE name\n" msgstr "" " -L, --files-without-match mostra només els noms dels FITXERs que no " -"tinguin cap coincidència\n" +"tinguin cap línia seleccionada\n" " -l, --files-with-matches mostra només els noms dels FITXERs que " -"continguin alguna coincidència\n" -" -c, --count mostra només el nombre de línies coincidents per " -"FITXER\n" +"continguin alguna línia seleccionada\n" +" -c, --count mostra només el nombre de línies selecionades " +"per FITXER\n" " -T, --initial-tab alinea les tabulacions (si cal)\n" -" -Z, --null mostra 0 byte després del nom de FITXER\n" +" -Z, --null mostra byte 0 després del nom de FITXER\n" #: src/grep.c:1980 #, c-format @@ -663,7 +666,7 @@ "sortida\n" #: src/grep.c:1987 -#, fuzzy, c-format +#, c-format msgid "" " -NUM same as --context=NUM\n" " --color[=WHEN],\n" @@ -680,9 +683,6 @@ " QUAN pot ser: «always», «never» o «auto»\n" " -U, --binary no elimina els caràcters CR als EOL (MSDOS/" "Windows)\n" -" -u, --unix-byte-offsets considera els desplaçaments com si no hi " -"haguessin CR\n" -" (MSDOS/Windows)\n" "\n" #: src/grep.c:1994 @@ -690,12 +690,12 @@ msgid "" "When FILE is '-', read standard input. With no FILE, read '.' if\n" "recursive, '-' otherwise. With fewer than two FILEs, assume -h.\n" -"Exit status is 0 if any line is selected, 1 otherwise;\n" +"Exit status is 0 if any line (or file if -L) is selected, 1 otherwise;\n" "if any error occurs and -q is not given, the exit status is 2.\n" msgstr "" -"Quan el FITXER és -, llegeix l'entrada estàndard. Si no s'indica el FITXER, " -"llegeix . si s'indica\n" -"una línia de comandes -r, si no -. Si s'indiquen menys de dos FITXERs, " +"Quan el FITXER és «-», llegeix l'entrada estàndard. Si no s'indica el " +"FITXER, llegeix «.» \n" +"si és recursiu i «-» si no ho és. Si s'indiquen menys de dos FITXERs, " "assumeix -h.\n" "L'estat de sortida és 0 si s'havia seleccionat alguna línia, si no 1.\n" "Si hi ha algun error i no s'ha indicat -q, l'estat de sortida és 2.\n" @@ -709,28 +709,35 @@ msgid "invalid matcher %s" msgstr "l'expressió %s no és vàlida" -#: src/grep.c:2458 +#: src/grep.c:2459 #, c-format msgid "warning: GREP_OPTIONS is deprecated; please use an alias or script" msgstr "avís: GREP_OPTIONS està desfasat; feu servir un alies o un script" -#: src/grep.c:2485 +#: src/grep.c:2486 msgid "unknown devices method" msgstr "el mètode de dispositius és desconegut" -#: src/grep.c:2629 +#: src/grep.c:2630 msgid "invalid max count" msgstr "el comptador de màxims no és vàlid" -#: src/grep.c:2687 +#: src/grep.c:2688 msgid "unknown binary-files type" msgstr "el tipus de fitxer binari és desconegut" -#: src/pcresearch.c:80 +#: src/grep.c:2770 +#, fuzzy +msgid "" +"Written by Mike Haertel and others; see\n" +"." +msgstr "la resta, vegeu " + +#: src/pcresearch.c:86 msgid "failed to allocate memory for the PCRE JIT stack" msgstr "no s'ha pogut assignar memòria per la pila JIT del PCRE" -#: src/pcresearch.c:97 +#: src/pcresearch.c:118 msgid "" "support for the -P option is not compiled into this --disable-perl-regexp " "binary" @@ -738,41 +745,44 @@ "el suport per l'opció -P no està  compilat a aquest binari --disable-perl-" "regexp" -#: src/pcresearch.c:119 +#: src/pcresearch.c:140 msgid "-P supports only unibyte and UTF-8 locales" msgstr "-P només permet la configuració local en unibyte i en UTF-8" -#: src/pcresearch.c:125 +#: src/pcresearch.c:146 msgid "the -P option only supports a single pattern" msgstr "l'opció -P només suporta un sol patró" -#: src/pcresearch.c:167 +#: src/pcresearch.c:189 msgid "internal error (should never happen)" msgstr "error intern (no hauria de passar mai)" -#: src/pcresearch.c:192 +#: src/pcresearch.c:214 msgid "internal error" msgstr "error intern" # PCRE is 'Perl Compatible Regular Expression' -#: src/pcresearch.c:215 +#: src/pcresearch.c:237 msgid "exceeded PCRE's line length limit" msgstr "s'ha superat el límit de longitud de línia del PCRE" -#: src/pcresearch.c:295 +#: src/pcresearch.c:317 msgid "exhausted PCRE JIT stack" msgstr "S'ha acabat la pila del PCRE JIT" # PCRE is 'Perl Compatible Regular Expression' -#: src/pcresearch.c:299 +#: src/pcresearch.c:321 msgid "exceeded PCRE's backtracking limit" msgstr "s'ha superat el límit de l'estratègia «tornada enrere» del PCRE" -#: src/pcresearch.c:306 +#: src/pcresearch.c:328 #, c-format msgid "internal PCRE error: %d" msgstr "error intern del PCRE: %d" +#~ msgid "Mike Haertel" +#~ msgstr "Mike Haertel" + #~ msgid "%s: option '--%s' doesn't allow an argument\n" #~ msgstr "%s: l'opció «--%s» no permet un argument\n" @@ -788,6 +798,9 @@ #~ msgid "%s: option '-W %s' requires an argument\n" #~ msgstr "%s: l'opció «-W %s» necessita un argument\n" +#~ msgid "lseek failed" +#~ msgstr "l'lseek ha fallat" + #~ msgid "PATTERN is, by default, a basic regular expression (BRE).\n" #~ msgstr "El PATRÓ és, per defecte, una expressió regular bàsica (ERB).\n" @@ -798,9 +811,6 @@ #~ "«egrep» ara és «grep -E». «fgrep» ara és «grep -F».\n" #~ "La crida directa tant de «egrep» com de «fgrep» és obsoleta.\n" -#~ msgid "lseek failed" -#~ msgstr "l'lseek ha fallat" - #~ msgid "unescaped ^ or $ not supported with -Pz" #~ msgstr "falta el caràcter d'escapada de ^ o no es permet $ amb -Pz" Binary files /tmp/tmppJ6Y2n/6jFha9hbxv/grep-3.1/po/cs.gmo and /tmp/tmppJ6Y2n/tYMwNxGD36/grep-3.3/po/cs.gmo differ diff -Nru grep-3.1/po/cs.po grep-3.3/po/cs.po --- grep-3.1/po/cs.po 2017-07-02 20:21:16.000000000 +0000 +++ grep-3.3/po/cs.po 2018-12-21 04:39:02.000000000 +0000 @@ -3,15 +3,15 @@ # This file is distributed under the same license as the grep package. # Vladimir Michl , 1998. # Petr Pisar , 2008, 2009, 2010, 2011, 2012, 201, 2013. -# Petr Pisar , 2014, 2015, 2016. +# Petr Pisar , 2014, 2015, 2016, 2018. # # Thanks to: Stanislav Brabec msgid "" msgstr "" -"Project-Id-Version: grep 2.23.7\n" +"Project-Id-Version: grep 3.1.48\n" "Report-Msgid-Bugs-To: bug-grep@gnu.org\n" -"POT-Creation-Date: 2017-07-02 13:21-0700\n" -"PO-Revision-Date: 2016-03-04 17:26+01:00\n" +"POT-Creation-Date: 2018-12-20 20:39-0800\n" +"PO-Revision-Date: 2018-12-16 15:14+01:00\n" "Last-Translator: Petr Pisar \n" "Language-Team: Czech \n" "Language: cs\n" @@ -34,44 +34,52 @@ msgid "Valid arguments are:" msgstr "Platné argumenty jsou:" -#: lib/closeout.c:122 src/grep.c:1274 +#: lib/c-stack.c:208 lib/c-stack.c:301 +msgid "program error" +msgstr "chyba programu" + +#: lib/c-stack.c:209 lib/c-stack.c:302 +msgid "stack overflow" +msgstr "přetečení zásobníku" + +#: lib/closeout.c:122 src/grep.c:1273 msgid "write error" msgstr "chyba při zápisu" -#: lib/dfa.c:958 +#: lib/dfa.c:970 msgid "unbalanced [" msgstr "nevyvážená [" -#: lib/dfa.c:1079 +#: lib/dfa.c:1091 msgid "invalid character class" msgstr "neplatný třída znaků" -#: lib/dfa.c:1205 +#: lib/dfa.c:1217 msgid "character class syntax is [[:space:]], not [:space:]" msgstr "zápis třídy znaků je [[:space:]], ne [:space:]" -#: lib/dfa.c:1272 +#: lib/dfa.c:1284 msgid "unfinished \\ escape" msgstr "neukončená escape sekvence \\" -#: lib/dfa.c:1433 +#: lib/dfa.c:1445 msgid "invalid content of \\{\\}" msgstr "neplatný obsah \\{\\}" -#: lib/dfa.c:1436 +#: lib/dfa.c:1448 msgid "regular expression too big" msgstr "regulární výraz je příliš velký" -#: lib/dfa.c:1850 +#: lib/dfa.c:1863 msgid "unbalanced (" msgstr "nevyvážená (" # ? Není zadaná syntaxe -#: lib/dfa.c:1968 +#: lib/dfa.c:1981 msgid "no syntax specified" msgstr "syntaxe není určena" -#: lib/dfa.c:1976 +#: lib/dfa.c:1992 msgid "unbalanced )" msgstr "nevyvážená )" @@ -80,29 +88,29 @@ msgstr "Neznámá systémová chyba" #: lib/getopt.c:278 -#, fuzzy, c-format +#, c-format msgid "%s: option '%s%s' is ambiguous\n" -msgstr "%s: přepínač „%s“ není jednoznačný\n" +msgstr "%s: přepínač „%s%s“ není jednoznačný\n" #: lib/getopt.c:284 -#, fuzzy, c-format +#, c-format msgid "%s: option '%s%s' is ambiguous; possibilities:" -msgstr "%s: přepínač „%s“ není jednoznačný: možnosti:" +msgstr "%s: přepínač „%s%s“ není jednoznačný: možnosti:" #: lib/getopt.c:319 -#, fuzzy, c-format +#, c-format msgid "%s: unrecognized option '%s%s'\n" -msgstr "%s: neznámý přepínač „%c%s“\n" +msgstr "%s: nerozpoznaný přepínač „%s%s“\n" #: lib/getopt.c:345 -#, fuzzy, c-format +#, c-format msgid "%s: option '%s%s' doesn't allow an argument\n" -msgstr "%s: přepínač „%c%s“ musí být zadán bez argumentu\n" +msgstr "%s: přepínač „%s%s“ musí být zadán bez argumentu\n" #: lib/getopt.c:360 -#, fuzzy, c-format +#, c-format msgid "%s: option '%s%s' requires an argument\n" -msgstr "%s: přepínač „--%s“ vyžaduje argument\n" +msgstr "%s: přepínač „%s%s“ vyžaduje argument\n" #: lib/getopt.c:621 #, c-format @@ -114,7 +122,7 @@ msgid "%s: option requires an argument -- '%c'\n" msgstr "%s: přepínač vyžaduje argument – „%c“\n" -#: lib/obstack.c:338 lib/obstack.c:340 lib/xalloc-die.c:34 src/pcresearch.c:291 +#: lib/obstack.c:338 lib/obstack.c:340 lib/xalloc-die.c:34 src/pcresearch.c:313 msgid "memory exhausted" msgstr "paměť vyčerpána" @@ -131,7 +139,7 @@ #: lib/xbinary-io.c:37 #, c-format msgid "failed to set file descriptor text/binary mode" -msgstr "" +msgstr "nastavení textového/binárního režimu deskriptoru souboru selhalo" #. TRANSLATORS: #. Get translations for open and closing quotation marks. @@ -152,7 +160,7 @@ #. for your locale. #. #. If you don't know what to put here, please see -#. +#. #. and use glyphs suitable for your language. #: lib/quotearg.c:362 msgid "`" @@ -230,16 +238,16 @@ msgid "Unmatched ) or \\)" msgstr "Nepárový ) nebo \\)" -#: lib/regcomp.c:687 +#: lib/regcomp.c:688 msgid "No previous regular expression" msgstr "Žádný předchozí regulární výraz" -#: lib/version-etc.c:74 +#: lib/version-etc.c:73 #, c-format msgid "Packaged by %s (%s)\n" msgstr "Zabaleno kým: %s (%s)\n" -#: lib/version-etc.c:77 +#: lib/version-etc.c:76 #, c-format msgid "Packaged by %s\n" msgstr "Zabaleno kým: %s\n" @@ -247,22 +255,22 @@ #. TRANSLATORS: Translate "(C)" to the copyright symbol #. (C-in-a-circle), if this symbol is available in the user's #. locale. Otherwise, do not translate "(C)"; leave it as-is. -#: lib/version-etc.c:84 +#: lib/version-etc.c:83 msgid "(C)" msgstr "©" -#: lib/version-etc.c:86 +#: lib/version-etc.c:85 msgid "" "\n" -"License GPLv3+: GNU GPL version 3 or later .\n" "This is free software: you are free to change and redistribute it.\n" "There is NO WARRANTY, to the extent permitted by law.\n" "\n" msgstr "" "\n" -"Licence GPLv3+: GNU GPL verze 3 nebo novější .\n" +"Licence GPLv3+: GNU GPL verze 3 nebo novější\n" +".\n" "Toto je volné programové vybavení: máte právo jej měnit a dále šířit.\n" "Není zde ŽÁDNÁ ZÁRUKA, jak jen zákon dovoluje.\n" "\n" @@ -402,13 +410,13 @@ #: lib/version-etc.c:253 #, c-format -msgid "%s home page: \n" -msgstr "Domovská stránka programu %s: \n" +msgid "%s home page: \n" +msgstr "Domovská stránka programu %s: \n" #: lib/version-etc.c:256 -msgid "General help using GNU software: \n" +msgid "General help using GNU software: \n" msgstr "" -"Obecná pomoc s používáním GNU softwaru: \n" +"Obecná pomoc s používáním GNU softwaru: \n" #: lib/xstrtol-error.c:63 #, c-format @@ -425,104 +433,93 @@ msgid "%s%s argument '%s' too large" msgstr "argument „%3$s“ u %1$s%2$s je příliš dlouhý" -#. This is a proper name. See the gettext manual, section Names. -#: src/grep.c:59 -msgid "Mike Haertel" -msgstr "Mike Haertel" - -#: src/grep.c:60 -msgid "others, see " -msgstr "další, vizte " - -#: src/grep.c:585 +#: src/grep.c:582 msgid "(standard input)" msgstr "(standardní vstup)" -#: src/grep.c:765 +#: src/grep.c:762 msgid "invalid context length argument" msgstr "neplatný argument délky kontextu" -#: src/grep.c:828 +#: src/grep.c:827 msgid "input is too large to count" msgstr "počet vstupních řádků nelze spočítat (je jich hodně)" -#: src/grep.c:1579 +#: src/grep.c:1578 #, c-format msgid "Binary file %s matches\n" msgstr "Binární soubor %s odpovídá\n" -#: src/grep.c:1627 +#: src/grep.c:1626 #, c-format msgid "warning: %s: %s" msgstr "varování: %s: %s" -#: src/grep.c:1628 +#: src/grep.c:1627 msgid "recursive directory loop" msgstr "smyčka pro rekurzivní průchod" -#: src/grep.c:1844 +#: src/grep.c:1843 #, c-format msgid "input file %s is also the output" msgstr "vstupní soubor %s je rovněž výstupem" -#: src/grep.c:1907 src/grep.c:1914 +#: src/grep.c:1906 src/grep.c:1913 #, c-format -msgid "Usage: %s [OPTION]... PATTERN [FILE]...\n" -msgstr "Použití: %s [PŘEPÍNAČ]… VZOREK [SOUBOR]…\n" +msgid "Usage: %s [OPTION]... PATTERNS [FILE]...\n" +msgstr "Použití: %s [PŘEPÍNAČ]… VZORKY [SOUBOR]…\n" -#: src/grep.c:1909 +#: src/grep.c:1908 #, c-format msgid "Try '%s --help' for more information.\n" msgstr "Více informací získáte příkazem „%s --help“.\n" -#: src/grep.c:1915 -#, fuzzy, c-format -msgid "Search for PATTERN in each FILE.\n" -msgstr "" -"Hledá řádky, jejichž některé části vyhovují VZORKU. Řádky jsou čteny " -"postupně\n" -"ze všech zadaných SOUBORů nebo ze standardního vstupu.\n" +#: src/grep.c:1914 +#, c-format +msgid "Search for PATTERNS in each FILE.\n" +msgstr "Každý SOUBOR prohledá na VZORKY.\n" -#: src/grep.c:1916 -#, fuzzy, c-format +#: src/grep.c:1915 +#, c-format msgid "" "Example: %s -i 'hello world' menu.h main.c\n" +"PATTERNS can contain multiple patterns separated by newlines.\n" "\n" "Pattern selection and interpretation:\n" msgstr "" "Příklad: %s -i 'hello world' menu.h main.c\n" +"VZORKY smí obsahovat více vzorků oddělených novým řádkem.\n" "\n" -"Výběr a interpretace regulárního výrazu:\n" +"Výběr a interpretace vzorku:\n" #: src/grep.c:1920 -#, fuzzy, c-format +#, c-format msgid "" -" -E, --extended-regexp PATTERN is an extended regular expression\n" -" -F, --fixed-strings PATTERN is a set of newline-separated strings\n" -" -G, --basic-regexp PATTERN is a basic regular expression (default)\n" -" -P, --perl-regexp PATTERN is a Perl regular expression\n" -msgstr "" -" -E, --extended-regexp VZOREK je rozšířený regulární výraz (ERE)\n" -" -F, --fixed-strings VZOREK je množina řetězců, každý na jednom " -"řádku\n" -" -G, --basic-regexp VZOREK je základní regulární výraz (BRE)\n" -" -P, --perl-regexp VZOREK je regulární výraz z jazyka Perl\n" +" -E, --extended-regexp PATTERNS are extended regular expressions\n" +" -F, --fixed-strings PATTERNS are strings\n" +" -G, --basic-regexp PATTERNS are basic regular expressions\n" +" -P, --perl-regexp PATTERNS are Perl regular expressions\n" +msgstr "" +" -E, --extended-regexp VZORKY jsou rozšíření regulární výrazy\n" +" -F, --fixed-strings VZORKY jsou řetězce\n" +" -G, --basic-regexp VZORKY jsou základní regulární výrazy\n" +" -P, --perl-regexp VZORKY jsou regulární výrazy jazyka Perl\n" #: src/grep.c:1926 #, c-format msgid "" -" -e, --regexp=PATTERN use PATTERN for matching\n" -" -f, --file=FILE obtain PATTERN from FILE\n" +" -e, --regexp=PATTERNS use PATTERNS for matching\n" +" -f, --file=FILE take PATTERNS from FILE\n" " -i, --ignore-case ignore case distinctions\n" -" -w, --word-regexp force PATTERN to match only whole words\n" -" -x, --line-regexp force PATTERN to match only whole lines\n" +" -w, --word-regexp match only whole words\n" +" -x, --line-regexp match only whole lines\n" " -z, --null-data a data line ends in 0 byte, not newline\n" msgstr "" -" -e, --regexp=VZOREK použije VZOREK jako regulární výraz\n" -" -f, --file=SOUBOR načte VZOREK ze SOUBORu\n" +" -e, --regexp=VZORKY použije VZORKY jako regulární výraz\n" +" -f, --file=SOUBOR načte VZORKY ze SOUBORU\n" " -i, --ignore-case ignoruje rozdíl mezi velikostí písmen\n" -" -w, --word-regexp VZOREK bude aplikován pouze na celá slova\n" -" -x, --line-regexp VZOREK bude aplikován pouze na celé řádky\n" +" -w, --word-regexp hledá pouze na celá slova\n" +" -x, --line-regexp hledá pouze celé řádky\n" " -z, --null-data řádek končí nulovým bajtem místo znaku nového " "řádku\n" @@ -544,7 +541,7 @@ " --help vypíše tuto nápovědu a skončí\n" #: src/grep.c:1940 -#, fuzzy, c-format +#, c-format msgid "" "\n" "Output control:\n" @@ -559,13 +556,13 @@ msgstr "" "\n" "Řízení výstupu:\n" -" -m, --max-count=POČET skončí, pokud najde POČET výrazů\n" +" -m, --max-count=POČET skončí po vybrání POČTU řádků\n" " -b, --byte-offset s každým výstupním řádkem vypíše jeho pozici\n" " v souboru\n" " -n, --line-number s každým výstupním řádkem vypíše jeho číslo " "řádku\n" " --line-buffered vyprázdní výstup po každém řádku\n" -" -H, --with-filename u každé shody vypíše jméno souboru\n" +" -H, --with-filename u výstupních řádků vypisuje název souboru\n" " -h, --no-filename potlačí předřazování jména souboru na výstupu\n" " --label=NÁZEV použije NÁZEV jako označení standardního\n" " vstupu na výstupu\n" @@ -573,13 +570,14 @@ #: src/grep.c:1951 #, c-format msgid "" -" -o, --only-matching show only the part of a line matching PATTERN\n" +" -o, --only-matching show only nonempty parts of lines that match\n" " -q, --quiet, --silent suppress all normal output\n" " --binary-files=TYPE assume that binary files are TYPE;\n" " TYPE is 'binary', 'text', or 'without-match'\n" " -a, --text equivalent to --binary-files=text\n" msgstr "" -" -o, --only-matching zobrazí pouze tu část řádku odpovídající VZORKU\n" +" -o, --only-matching zobrazí pouze neprázdné části odpovídajících " +"řádků\n" " -q, --quiet, --silent potlačí obvyklý výstup\n" " --binary-files=TYP definuje typ binárních souborů\n" " TYP může být: „binary“ (binární), " @@ -614,25 +612,22 @@ #: src/grep.c:1967 #, c-format msgid "" -" --include=FILE_PATTERN search only files that match FILE_PATTERN\n" -" --exclude=FILE_PATTERN skip files and directories matching " -"FILE_PATTERN\n" +" --include=GLOB search only files that match GLOB (a file " +"pattern)\n" +" --exclude=GLOB skip files and directories matching GLOB\n" " --exclude-from=FILE skip files matching any file pattern from FILE\n" -" --exclude-dir=PATTERN directories that match PATTERN will be " -"skipped.\n" +" --exclude-dir=GLOB skip directories that match GLOB\n" msgstr "" -" --include=VZOREK soubory, které vyhovují vzorku, budou " -"zpracovány\n" -" --exclude=VZOREK soubory, které vyhovují vzorku, budou " -"přeskočeny\n" -" --exclude-from=SOUBOR soubory, které vyhovují vzorkům ze SOUBORU, " -"budou\n" -" přeskočeny\n" -" --exclude-dir=VZOREK adresáře, které vyhovují vzorku, budou " -"přeskočeny\n" +" --include=GLOB zpracuje pouze soubory, které vyhovují GLOBU\n" +" --exclude=GLOB přeskočí soubory a adresáře, které vyhovují " +"GLOBU\n" +" --exclude-from=SOUBOR přeskočí soubory, které vyhovují jakémukoliv " +"vzorku\n" +" ze SOUBORU\n" +" --exclude-dir=GLOB přeskočí adresáře, které vyhovují GLOBU\n" #: src/grep.c:1974 -#, fuzzy, c-format +#, c-format msgid "" " -L, --files-without-match print only names of FILEs with no selected " "lines\n" @@ -641,14 +636,13 @@ " -T, --initial-tab make tabs line up (if needed)\n" " -Z, --null print 0 byte after FILE name\n" msgstr "" -" -L, --files-without-match vypíše pouze jména souborů, ve kterých nebyl\n" -" VZOREK nalezen\n" -" -l, --files-with-matches vypíše pouze jména souborů, ve kterých byl " -"VZOREK\n" -" nalezen\n" +" -L, --files-without-match vypíše pouze názvy souborů, ze kterých nebyly\n" +" vybrány žádné řádky\n" +" -l, --files-with-matches vypíše pouze názvy souborů, ze kterých byly " +"vybrány\n" +" řádky\n" " -c, --count vypíše pouze počet vyhovujících řádků na SOUBOR\n" -" -T, --initial-tab zarovnání začátků řádků tabulátory (je-li " -"třeba)\n" +" -T, --initial-tab zarovná začátky řádků tabulátory (je-li třeba)\n" " -Z, --null vypíše nulový bajt za jménem SOUBORU\n" #: src/grep.c:1980 @@ -667,7 +661,7 @@ " -C, --context=POČET vypíše POČET řádků kontextu (před i za shodou)\n" #: src/grep.c:1987 -#, fuzzy, c-format +#, c-format msgid "" " -NUM same as --context=NUM\n" " --color[=WHEN],\n" @@ -685,22 +679,21 @@ " nebo „auto“ (automaticky)\n" " -U, --binary neodstraňuje znak CR na konci řádku (MSDOS/" "Windows)\n" -" -u, --unix-byte-offsets vypisuje pozici, jako by CR nebyly v souboru\n" -" (MSDOS/Windows)\n" #: src/grep.c:1994 -#, fuzzy, c-format +#, c-format msgid "" "When FILE is '-', read standard input. With no FILE, read '.' if\n" "recursive, '-' otherwise. With fewer than two FILEs, assume -h.\n" -"Exit status is 0 if any line is selected, 1 otherwise;\n" +"Exit status is 0 if any line (or file if -L) is selected, 1 otherwise;\n" "if any error occurs and -q is not given, the exit status is 2.\n" msgstr "" -"Je-li SOUBOR -, je čten standardní vstup. Ne-li SOUBOR zadán, je čten „.“,\n" -"je-li přítomen přepínač -r, jinak je čten standardní vstup. Jestliže jsou\n" -"zadány méně než dva SOUBORy, pak je implicitní parametr -h.\n" -"Návratový kód je 0 při nalezení vyhovujícího řádku, 1 nevyhovoval-li žádný\n" -"řádek. Vyskytne-li se chyba a není-li zadán argument -q, bude vrácen kód 2.\n" +"Je-li SOUBOR -, čte standardní vstup. Ne-li SOUBOR zadán, čte „.“,\n" +"je-li přítomen přepínač -r, jinak čte standardní vstup. Jestliže jsou\n" +"zadány méně než dva SOUBORY, pak je výchozí přepínač -h.\n" +"Návratový kód je 0 při nalezení vyhovujícího řádku (nebo souboru s -L), " +"jinak 1.\n" +"Vyskytne-li se chyba a není-li zadán přepínač -q, bude vrácen kód 2.\n" #: src/grep.c:2034 msgid "conflicting matchers specified" @@ -711,29 +704,36 @@ msgid "invalid matcher %s" msgstr "neplatný syntaxe vzorku %s" -#: src/grep.c:2458 +#: src/grep.c:2459 #, c-format msgid "warning: GREP_OPTIONS is deprecated; please use an alias or script" msgstr "" "pozor: proměnná GREP_OPTIONS je zastaralá, prosím, použijte alias nebo skript" -#: src/grep.c:2485 +#: src/grep.c:2486 msgid "unknown devices method" msgstr "neznámá metoda obsluhy zařízení" -#: src/grep.c:2629 +#: src/grep.c:2630 msgid "invalid max count" msgstr "neplatný maximální počet" -#: src/grep.c:2687 +#: src/grep.c:2688 msgid "unknown binary-files type" msgstr "neznámý typ binárního souboru" -#: src/pcresearch.c:80 +#: src/grep.c:2770 +#, fuzzy +msgid "" +"Written by Mike Haertel and others; see\n" +"." +msgstr "další, vizte " + +#: src/pcresearch.c:86 msgid "failed to allocate memory for the PCRE JIT stack" msgstr "alokace paměti pro JIT zásobník PCRE selhala" -#: src/pcresearch.c:97 +#: src/pcresearch.c:118 msgid "" "support for the -P option is not compiled into this --disable-perl-regexp " "binary" @@ -741,39 +741,42 @@ "Volba -P není podporována. Tento program byl přeložen s --disable-perl-" "regexp." -#: src/pcresearch.c:119 +#: src/pcresearch.c:140 msgid "-P supports only unibyte and UTF-8 locales" msgstr "-P podporuje pouze jednobajtová a UTF-8 národní prostředí" -#: src/pcresearch.c:125 +#: src/pcresearch.c:146 msgid "the -P option only supports a single pattern" msgstr "přepínač -P lze být použít pouze s jedním vzorkem" -#: src/pcresearch.c:167 +#: src/pcresearch.c:189 msgid "internal error (should never happen)" msgstr "vnitřní chyba (to by se nikdy nemělo stát)" -#: src/pcresearch.c:192 +#: src/pcresearch.c:214 msgid "internal error" msgstr "vnitřní chyba" -#: src/pcresearch.c:215 +#: src/pcresearch.c:237 msgid "exceeded PCRE's line length limit" msgstr "překročeno omezení PCRE na délku řádku" -#: src/pcresearch.c:295 +#: src/pcresearch.c:317 msgid "exhausted PCRE JIT stack" msgstr "JIT zásobník knihovny PCRE vyčerpán" -#: src/pcresearch.c:299 +#: src/pcresearch.c:321 msgid "exceeded PCRE's backtracking limit" msgstr "překročeno omezení PCRE na hloubku zanoření" -#: src/pcresearch.c:306 +#: src/pcresearch.c:328 #, c-format msgid "internal PCRE error: %d" msgstr "vnitřní chyba PCRE: %d" +#~ msgid "Mike Haertel" +#~ msgstr "Mike Haertel" + #~ msgid "%s: option '--%s' doesn't allow an argument\n" #~ msgstr "%s: přepínač „--%s“ musí být zadán bez argumentu\n" @@ -789,6 +792,9 @@ #~ msgid "%s: option '-W %s' requires an argument\n" #~ msgstr "%s: přepínač „-W %s“ vyžaduje argument\n" +#~ msgid "lseek failed" +#~ msgstr "posun v souboru (lseek) se nezdařil" + #~ msgid "PATTERN is, by default, a basic regular expression (BRE).\n" #~ msgstr "" #~ "VZOREK představuje základní regulární výraz (BRE), pokud není řečeno " @@ -801,9 +807,6 @@ #~ "„egrep“ znamená „grep -E“. „fgrep“ znamená „grep -F“.\n" #~ "Přímé spouštění příkazem „egrep“ nebo „fgrep“ je zastaralé.\n" -#~ msgid "lseek failed" -#~ msgstr "posun v souboru (lseek) se nezdařil" - #~ msgid "unescaped ^ or $ not supported with -Pz" #~ msgstr "s přepínači -Pz nejsou podporovány neescapované znaky ^ a $" Binary files /tmp/tmppJ6Y2n/6jFha9hbxv/grep-3.1/po/da.gmo and /tmp/tmppJ6Y2n/tYMwNxGD36/grep-3.3/po/da.gmo differ diff -Nru grep-3.1/po/da.po grep-3.3/po/da.po --- grep-3.1/po/da.po 2017-07-02 20:21:16.000000000 +0000 +++ grep-3.3/po/da.po 2018-12-21 04:39:02.000000000 +0000 @@ -1,19 +1,17 @@ # Danish messages for GNU Grep -# Copyright (C) 1996, 1997, 1998, 2009, 2012, 2015 Free Software Foundation, Inc. +# Copyright (C) 1996, 1997, 1998, 2009, 2012, 2015, 2017 Free Software Foundation, Inc. # This file is distributed under the same license as the grep package. # # Kenneth Christiansen , 1999. # Keld Simonsen , 2000 -# Ask Hjorth Larsen , 2009, 2010, 2012, 2015. +# Ask Hjorth Larsen , 2009, 2010, 2012, 2015, 2017. # # Konventioner # ------------ # -# anførselstegn er '' i dette modul -# # escape -> undvigesekvens # standard input -> standard-inddata (etc.) -# (basic/extended) regular expression -> (almindeligt/udvidet) regulært udtryk +# (basic/extended) regular expression -> (elementært/udvidet) regulært udtryk # match (n) -> træffer # match (v) -> matche (findes i RO) # @@ -27,10 +25,10 @@ # msgid "" msgstr "" -"Project-Id-Version: grep-2.21.78\n" +"Project-Id-Version: grep-3.0.23-b00\n" "Report-Msgid-Bugs-To: bug-grep@gnu.org\n" -"POT-Creation-Date: 2017-07-02 13:21-0700\n" -"PO-Revision-Date: 2015-12-03 14:47+0100\n" +"POT-Creation-Date: 2018-12-20 20:39-0800\n" +"PO-Revision-Date: 2017-07-10 15:05+0200\n" "Last-Translator: Ask Hjorth Larsen \n" "Language-Team: Danish \n" "Language: da\n" @@ -53,43 +51,51 @@ msgid "Valid arguments are:" msgstr "Gyldige argumenter er:" -#: lib/closeout.c:122 src/grep.c:1274 +#: lib/c-stack.c:208 lib/c-stack.c:301 +msgid "program error" +msgstr "" + +#: lib/c-stack.c:209 lib/c-stack.c:302 +msgid "stack overflow" +msgstr "" + +#: lib/closeout.c:122 src/grep.c:1273 msgid "write error" msgstr "skrivefejl" -#: lib/dfa.c:958 +#: lib/dfa.c:970 msgid "unbalanced [" msgstr "ubalanceret [" -#: lib/dfa.c:1079 +#: lib/dfa.c:1091 msgid "invalid character class" msgstr "ugyldig tegnklasse" -#: lib/dfa.c:1205 +#: lib/dfa.c:1217 msgid "character class syntax is [[:space:]], not [:space:]" msgstr "syntaksen for tegnklasser er [[:space:]], ikke [:space:]" -#: lib/dfa.c:1272 +#: lib/dfa.c:1284 msgid "unfinished \\ escape" msgstr "ufærdig \\-undvigesekvens" -#: lib/dfa.c:1433 +#: lib/dfa.c:1445 msgid "invalid content of \\{\\}" msgstr "ugyldigt indhold af \\{\\}" -#: lib/dfa.c:1436 +#: lib/dfa.c:1448 msgid "regular expression too big" msgstr "regulært udtryk er for stort" -#: lib/dfa.c:1850 +#: lib/dfa.c:1863 msgid "unbalanced (" msgstr "ubalanceret (" -#: lib/dfa.c:1968 +#: lib/dfa.c:1981 msgid "no syntax specified" msgstr "ingen syntaks angivet" -#: lib/dfa.c:1976 +#: lib/dfa.c:1992 msgid "unbalanced )" msgstr "ubalanceret )" @@ -98,41 +104,41 @@ msgstr "Ukendt systemfejl" #: lib/getopt.c:278 -#, fuzzy, c-format +#, c-format msgid "%s: option '%s%s' is ambiguous\n" -msgstr "%s: flaget '%s' er flertydigt\n" +msgstr "%s: flaget \"%s%s\" er flertydigt\n" #: lib/getopt.c:284 -#, fuzzy, c-format +#, c-format msgid "%s: option '%s%s' is ambiguous; possibilities:" -msgstr "%s: flaget '%s' er flertydigt; muligheder:" +msgstr "%s: flaget \"%s%s\" er flertydigt; muligheder:" #: lib/getopt.c:319 -#, fuzzy, c-format +#, c-format msgid "%s: unrecognized option '%s%s'\n" -msgstr "%s: ukendt flag '%c%s'\n" +msgstr "%s: ukendt flag \"%s%s\"\n" #: lib/getopt.c:345 -#, fuzzy, c-format +#, c-format msgid "%s: option '%s%s' doesn't allow an argument\n" -msgstr "%s: flaget '%c%s' tillader ikke et argument\n" +msgstr "%s: flaget \"%s%s\" tillader ikke et argument\n" #: lib/getopt.c:360 -#, fuzzy, c-format +#, c-format msgid "%s: option '%s%s' requires an argument\n" -msgstr "%s: flaget '--%s' kræver et argument\n" +msgstr "%s: flaget \"%s%s\" kræver et argument\n" #: lib/getopt.c:621 #, c-format msgid "%s: invalid option -- '%c'\n" -msgstr "%s: ugyldigt flag -- '%c'\n" +msgstr "%s: ugyldigt flag -- \"%c\"\n" #: lib/getopt.c:636 lib/getopt.c:682 #, c-format msgid "%s: option requires an argument -- '%c'\n" -msgstr "%s: flaget kræver et argument -- '%c'\n" +msgstr "%s: flaget kræver et argument -- \"%c\"\n" -#: lib/obstack.c:338 lib/obstack.c:340 lib/xalloc-die.c:34 src/pcresearch.c:291 +#: lib/obstack.c:338 lib/obstack.c:340 lib/xalloc-die.c:34 src/pcresearch.c:313 msgid "memory exhausted" msgstr "hukommelse opbrugt" @@ -149,7 +155,7 @@ #: lib/xbinary-io.c:37 #, c-format msgid "failed to set file descriptor text/binary mode" -msgstr "" +msgstr "kunne ikke angive tekst-/binærtilstand for fildeskriptor" #. TRANSLATORS: #. Get translations for open and closing quotation marks. @@ -170,15 +176,15 @@ #. for your locale. #. #. If you don't know what to put here, please see -#. +#. #. and use glyphs suitable for your language. #: lib/quotearg.c:362 msgid "`" -msgstr "'" +msgstr "\"" #: lib/quotearg.c:363 msgid "'" -msgstr "'" +msgstr "\"" #: lib/regcomp.c:135 msgid "Success" @@ -209,9 +215,8 @@ msgstr "Ugyldig bagudreference" #: lib/regcomp.c:156 -#, fuzzy msgid "Unmatched [, [^, [:, [., or [=" -msgstr "Uparret [ eller [^" +msgstr "Uparret [, [^, [:, [. eller [=" #: lib/regcomp.c:159 msgid "Unmatched ( or \\(" @@ -249,16 +254,16 @@ msgid "Unmatched ) or \\)" msgstr "Uparret ) eller \\)" -#: lib/regcomp.c:687 +#: lib/regcomp.c:688 msgid "No previous regular expression" msgstr "Intet foregående regulært udtryk" -#: lib/version-etc.c:74 +#: lib/version-etc.c:73 #, c-format msgid "Packaged by %s (%s)\n" msgstr "Pakket af %s (%s)\n" -#: lib/version-etc.c:77 +#: lib/version-etc.c:76 #, c-format msgid "Packaged by %s\n" msgstr "Pakket af %s\n" @@ -266,14 +271,15 @@ #. TRANSLATORS: Translate "(C)" to the copyright symbol #. (C-in-a-circle), if this symbol is available in the user's #. locale. Otherwise, do not translate "(C)"; leave it as-is. -#: lib/version-etc.c:84 +#: lib/version-etc.c:83 msgid "(C)" msgstr "©" -#: lib/version-etc.c:86 +#: lib/version-etc.c:85 +#, fuzzy msgid "" "\n" -"License GPLv3+: GNU GPL version 3 or later .\n" "This is free software: you are free to change and redistribute it.\n" "There is NO WARRANTY, to the extent permitted by law.\n" @@ -419,119 +425,112 @@ msgstr "Hjemmeside for %s: <%s>\n" #: lib/version-etc.c:253 -#, c-format -msgid "%s home page: \n" +#, fuzzy, c-format +msgid "%s home page: \n" msgstr "Hjemmeside for %s: \n" #: lib/version-etc.c:256 -msgid "General help using GNU software: \n" +#, fuzzy +msgid "General help using GNU software: \n" msgstr "" "Generel hjælp til brug af GNU-software: \n" #: lib/xstrtol-error.c:63 #, c-format msgid "invalid %s%s argument '%s'" -msgstr "ugyldigt %s%s-argument '%s'" +msgstr "ugyldigt %s%s-argument \"%s\"" #: lib/xstrtol-error.c:68 #, c-format msgid "invalid suffix in %s%s argument '%s'" -msgstr "ugyldigt suffiks i %s%s-argumentet '%s'" +msgstr "ugyldigt suffiks i %s%s-argumentet \"%s\"" #: lib/xstrtol-error.c:72 #, c-format msgid "%s%s argument '%s' too large" -msgstr "%s%s-argumentet '%s' er for stort" +msgstr "%s%s-argumentet \"%s\" er for stort" -#. This is a proper name. See the gettext manual, section Names. -#: src/grep.c:59 -msgid "Mike Haertel" -msgstr "Mike Haertel" - -#: src/grep.c:60 -msgid "others, see " -msgstr "andre, se " - -#: src/grep.c:585 +#: src/grep.c:582 msgid "(standard input)" msgstr "(standard-inddata)" -#: src/grep.c:765 +#: src/grep.c:762 msgid "invalid context length argument" msgstr "ugyldigt kontekstlængdeargument" -#: src/grep.c:828 +#: src/grep.c:827 msgid "input is too large to count" msgstr "inddata er for omfattende at optælle" -#: src/grep.c:1579 +#: src/grep.c:1578 #, c-format msgid "Binary file %s matches\n" msgstr "Binær fil %s stemmer\n" -#: src/grep.c:1627 +#: src/grep.c:1626 #, c-format msgid "warning: %s: %s" msgstr "advarsel: %s: %s" -#: src/grep.c:1628 +#: src/grep.c:1627 msgid "recursive directory loop" msgstr "rekursiv katalogsløjfe" -#: src/grep.c:1844 +#: src/grep.c:1843 #, c-format msgid "input file %s is also the output" msgstr "indfilen %s er også udfilen" -#: src/grep.c:1907 src/grep.c:1914 -#, c-format -msgid "Usage: %s [OPTION]... PATTERN [FILE]...\n" +#: src/grep.c:1906 src/grep.c:1913 +#, fuzzy, c-format +msgid "Usage: %s [OPTION]... PATTERNS [FILE]...\n" msgstr "Brug: %s [FLAG]... MØNSTER [FIL]...\n" -#: src/grep.c:1909 +#: src/grep.c:1908 #, c-format msgid "Try '%s --help' for more information.\n" -msgstr "Prøv '%s --help' for mere information.\n" +msgstr "Prøv \"%s --help\" for mere information.\n" -#: src/grep.c:1915 +#: src/grep.c:1914 #, fuzzy, c-format -msgid "Search for PATTERN in each FILE.\n" -msgstr "Søg efter MØNSTER i hver FIL eller i standard-inddata.\n" +msgid "Search for PATTERNS in each FILE.\n" +msgstr "Søg efter MØNSTER i hver FIL.\n" -# Nederste linje er en overskrift for en samling af kommandolinjeflag. Oversættelsen er ikke direkte, men opdelingen skulle være klar nok -#: src/grep.c:1916 +#: src/grep.c:1915 #, fuzzy, c-format msgid "" "Example: %s -i 'hello world' menu.h main.c\n" +"PATTERNS can contain multiple patterns separated by newlines.\n" "\n" "Pattern selection and interpretation:\n" msgstr "" "Eksempel: %s -i 'hej verden' menu.h main.c\n" "\n" -"Regulære udtryk og fortolkning:\n" +"Valg af mønster og fortolkning:\n" #: src/grep.c:1920 #, fuzzy, c-format msgid "" -" -E, --extended-regexp PATTERN is an extended regular expression\n" -" -F, --fixed-strings PATTERN is a set of newline-separated strings\n" -" -G, --basic-regexp PATTERN is a basic regular expression (default)\n" -" -P, --perl-regexp PATTERN is a Perl regular expression\n" +" -E, --extended-regexp PATTERNS are extended regular expressions\n" +" -F, --fixed-strings PATTERNS are strings\n" +" -G, --basic-regexp PATTERNS are basic regular expressions\n" +" -P, --perl-regexp PATTERNS are Perl regular expressions\n" msgstr "" -" -E, --extended-regexp MØNSTER er et udvidet regulært udtryk (ERE)\n" +" -E, --extended-regexp MØNSTER er et udvidet regulært udtryk\n" " -F, --fixed-strings MØNSTER er en mængde strenge adskilt af " "linjeskift\n" -" -G, --basic-regexp MØNSTER er et almindeligt regulært udtryk (BRE)\n" -" -P, --perl-regexp MØNSTER er et Perl-regulært udtryk\n" +" -G, --basic-regexp MØNSTER er et elementært regulært udtryk " +"(standard)\n" +" -P, --perl-regexp MØNSTER er et regulært udtryk til Perl\n" #: src/grep.c:1926 -#, c-format +#, fuzzy, c-format msgid "" -" -e, --regexp=PATTERN use PATTERN for matching\n" -" -f, --file=FILE obtain PATTERN from FILE\n" +" -e, --regexp=PATTERNS use PATTERNS for matching\n" +" -f, --file=FILE take PATTERNS from FILE\n" " -i, --ignore-case ignore case distinctions\n" -" -w, --word-regexp force PATTERN to match only whole words\n" -" -x, --line-regexp force PATTERN to match only whole lines\n" +" -w, --word-regexp match only whole words\n" +" -x, --line-regexp match only whole lines\n" " -z, --null-data a data line ends in 0 byte, not newline\n" msgstr "" " -e, --regexp=MØNSTER brug MØNSTER i søgning\n" @@ -560,7 +559,7 @@ " --help vis denne hjælpetekst og afslut\n" #: src/grep.c:1940 -#, fuzzy, c-format +#, c-format msgid "" "\n" "Output control:\n" @@ -575,19 +574,19 @@ msgstr "" "\n" "Styring af udskrift:\n" -" -m, --max-count=ANTAL stands efter ANTAL træffere\n" +" -m, --max-count=ANTAL stands efter ANTAL fundne linjer\n" " -b, --byte-offset udskriv startpunkt i byte sammen med fundne " "linjer\n" " -n, --line-number udskriv linjenummer sammen med linjerne\n" " --line-buffered tøm uddatabuffer for hver linje\n" -" -H, --with-filename udskriv filnavnet for hver træffer\n" +" -H, --with-filename udskriv filnavn sammen med udlinjer\n" " -h, --no-filename undertryk indledende filnavn i udskrift\n" " --label=NAVN udskriv NAVN som filnavn for standard-inddata\n" #: src/grep.c:1951 -#, c-format +#, fuzzy, c-format msgid "" -" -o, --only-matching show only the part of a line matching PATTERN\n" +" -o, --only-matching show only nonempty parts of lines that match\n" " -q, --quiet, --silent suppress all normal output\n" " --binary-files=TYPE assume that binary files are TYPE;\n" " TYPE is 'binary', 'text', or 'without-match'\n" @@ -597,7 +596,8 @@ "MØNSTER\n" " -q, --quiet, --silent undertryk al normal udskrift\n" " --binary-files=TYPE antag at binære filer er TYPE;\n" -" TYPE er 'binary', 'text', eller 'without-match'\n" +" TYPE er \"binary\", \"text\" eller \"without-" +"match\"\n" " -a, --text svarer til --binary-files=text\n" #: src/grep.c:1958 @@ -613,23 +613,23 @@ msgstr "" " -I svarer til --binary-files=without-match\n" " -d, --directories=HANDLING hvordan kataloger skal håndteres;\n" -" HANDLING er 'read', 'recurse', eller 'skip'\n" +" HANDLING er \"read\", \"recurse\", eller \"skip" +"\"\n" " -D, --devices=HANDLING hvordan enheder, FIFO'er og sokler skal " "håndteres;\n" -" HANDLING er 'read' eller 'skip'\n" +" HANDLING er \"read\" eller \"skip\"\n" " -r, --recursive svarer til --directories=recurse\n" " -R, --dereference-recursive tilsvarende, men følg alle symlænker\n" # 'spring over' er måske pænere end 'ignorér', men fylder mere, og det er rart at være på <80 kolonner #: src/grep.c:1967 -#, c-format +#, fuzzy, c-format msgid "" -" --include=FILE_PATTERN search only files that match FILE_PATTERN\n" -" --exclude=FILE_PATTERN skip files and directories matching " -"FILE_PATTERN\n" +" --include=GLOB search only files that match GLOB (a file " +"pattern)\n" +" --exclude=GLOB skip files and directories matching GLOB\n" " --exclude-from=FILE skip files matching any file pattern from FILE\n" -" --exclude-dir=PATTERN directories that match PATTERN will be " -"skipped.\n" +" --exclude-dir=GLOB skip directories that match GLOB\n" msgstr "" " --include=FILMØNSTER søg kun i filer, der matcher FILMØNSTER\n" " --exclude=FILMØNSTER ignorér filer og kataloger, der matcher " @@ -639,7 +639,7 @@ " --exclude-dir=MØNSTER ignorér kataloger, der matcher MØNSTER.\n" #: src/grep.c:1974 -#, fuzzy, c-format +#, c-format msgid "" " -L, --files-without-match print only names of FILEs with no selected " "lines\n" @@ -648,11 +648,10 @@ " -T, --initial-tab make tabs line up (if needed)\n" " -Z, --null print 0 byte after FILE name\n" msgstr "" -" -L, --files-without-match udskriv kun navne på FILer uden træffere\n" -" -l, --files-with-matches udskriv kun navne på FILer med træffere\n" -" -c, --count udskriv kun antallet af linjer, der matcher, " -"for \n" -" hver FIL\n" +" -L, --files-without-match udskriv kun navne på FILer uden fundne linjer\n" +" -l, --files-with-matches udskriv kun navne på FILer med fundne linjer\n" +" -c, --count udskriv kun antallet af fundne linjer for hver " +"FIL\n" " -T, --initial-tab arrangér tabulatortegn (om nødvendigt)\n" " -Z, --null udskriv 0-byte efter FILnavn\n" @@ -672,7 +671,7 @@ " -C, --context=ANTAL udskriv ANTAL linjer af omgivende tekst\n" #: src/grep.c:1987 -#, fuzzy, c-format +#, c-format msgid "" " -NUM same as --context=NUM\n" " --color[=WHEN],\n" @@ -685,25 +684,22 @@ " -ANTAL det samme som --context=ANTAL\n" " --color[=HVORNÅR],\n" " --colour[=HVORNÅR] brug farvemarkering til at fremhæve træffere;\n" -" HVORNÅR er 'always', 'never', eller 'auto'\n" +" HVORNÅR er \"always\", \"never\", eller \"auto" +"\"\n" " -U, --binary fjern ikke CR-tegn ved EOL (MSDOS/Windows)\n" -" -u, --unix-byte-offsets rapportér forskydninger som om CR-tegn ikke " -"var \n" -" der (MSDOS/Windows)\n" -"\n" #: src/grep.c:1994 #, fuzzy, c-format msgid "" "When FILE is '-', read standard input. With no FILE, read '.' if\n" "recursive, '-' otherwise. With fewer than two FILEs, assume -h.\n" -"Exit status is 0 if any line is selected, 1 otherwise;\n" +"Exit status is 0 if any line (or file if -L) is selected, 1 otherwise;\n" "if any error occurs and -q is not given, the exit status is 2.\n" msgstr "" -"Når FIL er -, læses standard-inddata. Uden fil læses . hvis -r er givet på\n" -"kommandolinjen, ellers -. Hvis mindre end to FILer er givet, antages -h.\n" -"Afslutningsstatus er 0 hvis mindst én linje blev valgt, ellers 1; hvis der\n" -"opstår nogen fejl, og -q ikke blev givet, er afslutningsstatus 2.\n" +"Når FIL er \"-\", læses standard-inddata. Uden FIL læses \".\" i\n" +"rekursiv tilstand, ellers \"-\". Givet mindre end to FILer antages -h.\n" +"Afslutningsstatus er 0 hvis mindst én linje blev valgt, ellers 1; hvis\n" +"der opstår en fejl, og -q ikke blev givet, er afslutningsstatus 2.\n" #: src/grep.c:2034 msgid "conflicting matchers specified" @@ -715,29 +711,36 @@ msgid "invalid matcher %s" msgstr "ugyldig matcher %s" -#: src/grep.c:2458 +#: src/grep.c:2459 #, c-format msgid "warning: GREP_OPTIONS is deprecated; please use an alias or script" msgstr "" "advarsel: GREP_OPTIONS er forældet; brug venligst et alias eller skript" -#: src/grep.c:2485 +#: src/grep.c:2486 msgid "unknown devices method" msgstr "ukendt enhedsmetode" -#: src/grep.c:2629 +#: src/grep.c:2630 msgid "invalid max count" msgstr "ugyldig angivelse af maksimum" -#: src/grep.c:2687 +#: src/grep.c:2688 msgid "unknown binary-files type" msgstr "ukendt binær filtype" -#: src/pcresearch.c:80 +#: src/grep.c:2770 +#, fuzzy +msgid "" +"Written by Mike Haertel and others; see\n" +"." +msgstr "andre, se " + +#: src/pcresearch.c:86 msgid "failed to allocate memory for the PCRE JIT stack" msgstr "kunne ikke allokere hukommelse til PCRE JIT-stakken" -#: src/pcresearch.c:97 +#: src/pcresearch.c:118 msgid "" "support for the -P option is not compiled into this --disable-perl-regexp " "binary" @@ -745,78 +748,78 @@ "understøttelse for flaget -P er ikke kompileret ind i denne binærfil for --" "disable-perl-regexp" -#: src/pcresearch.c:119 +#: src/pcresearch.c:140 msgid "-P supports only unibyte and UTF-8 locales" msgstr "-P understøtter kun unibyte- og UTF-8-sprogindstillinger" -#: src/pcresearch.c:125 +#: src/pcresearch.c:146 msgid "the -P option only supports a single pattern" msgstr "flaget -P understøtter kun et enkelt mønster" -#: src/pcresearch.c:167 +#: src/pcresearch.c:189 msgid "internal error (should never happen)" msgstr "intern fejl (burde aldrig ske)" -#: src/pcresearch.c:192 +#: src/pcresearch.c:214 msgid "internal error" msgstr "intern fejl" -#: src/pcresearch.c:215 +#: src/pcresearch.c:237 msgid "exceeded PCRE's line length limit" msgstr "overskred maksimal linjelængde for PCRE" -#: src/pcresearch.c:295 +#: src/pcresearch.c:317 msgid "exhausted PCRE JIT stack" msgstr "PCRE JIT-stak tømt" -#: src/pcresearch.c:299 +#: src/pcresearch.c:321 msgid "exceeded PCRE's backtracking limit" msgstr "overskred tilbagerækkevidde for PCRE" -#: src/pcresearch.c:306 +#: src/pcresearch.c:328 #, c-format msgid "internal PCRE error: %d" msgstr "intern PCRE-fejl: %d" +#~ msgid "Mike Haertel" +#~ msgstr "Mike Haertel" + #~ msgid "%s: option '--%s' doesn't allow an argument\n" -#~ msgstr "%s: flaget '--%s' tillader ikke et argument\n" +#~ msgstr "%s: flaget \"--%s\" tillader ikke et argument\n" #~ msgid "%s: unrecognized option '--%s'\n" -#~ msgstr "%s: ukendt flag '--%s'\n" +#~ msgstr "%s: ukendt flag \"--%s\"\n" #~ msgid "%s: option '-W %s' is ambiguous\n" -#~ msgstr "%s: flaget '-W %s' er flertydigt\n" +#~ msgstr "%s: flaget \"-W %s\" er flertydigt\n" #~ msgid "%s: option '-W %s' doesn't allow an argument\n" -#~ msgstr "%s: flaget '-W %s' tillader ikke et argument\n" +#~ msgstr "%s: flaget \"-W %s\" tillader ikke et argument\n" #~ msgid "%s: option '-W %s' requires an argument\n" -#~ msgstr "%s: flaget '-W %s' kræver et argument\n" +#~ msgstr "%s: flaget \"-W %s\" kræver et argument\n" -#~ msgid "PATTERN is, by default, a basic regular expression (BRE).\n" -#~ msgstr "MØNSTER er som standard et almindeligt regulært udtryk (BRE).\n" +#~ msgid "lseek failed" +#~ msgstr "lseek mislykkedes" #~ msgid "" #~ "'egrep' means 'grep -E'. 'fgrep' means 'grep -F'.\n" #~ "Direct invocation as either 'egrep' or 'fgrep' is deprecated.\n" #~ msgstr "" -#~ "'egrep' betyder 'grep -E'. 'fgrep' betyder 'grep -F'.\n" -#~ "Direkte kørsel som enten 'egrep' eller 'fgrep' er forældet.\n" - -#~ msgid "lseek failed" -#~ msgstr "lseek mislykkedes" +#~ "\"egrep\" betyder \"grep -E\". \"fgrep\" betyder \"grep -F\".\n" +#~ "Direkte kørsel som enten \"egrep\" eller \"fgrep\" er forældet.\n" #~ msgid "PATTERN is an extended regular expression (ERE).\n" #~ msgstr "MØNSTER er et udvidet regulært udtryk (ERE).\n" #~ msgid "Invocation as 'egrep' is deprecated; use 'grep -E' instead.\n" -#~ msgstr "Kørsel som 'egrep' er forældet; brug 'grep -E' i stedet.\n" +#~ msgstr "Kørsel som \"egrep\" er forældet; brug \"grep -E\" i stedet.\n" #~ msgid "PATTERN is a set of newline-separated fixed strings.\n" #~ msgstr "MØNSTER er en mængde faste strenge adskilt af linjeskift.\n" #~ msgid "Invocation as 'fgrep' is deprecated; use 'grep -F' instead.\n" -#~ msgstr "Kørsel som 'fgrep' er forældet; brug 'grep -F' i stedet.\n" +#~ msgstr "Kørsel som \"fgrep\" er forældet; brug \"grep -F\" i stedet.\n" #~ msgid "GNU Grep home page: <%s>\n" #~ msgstr "Hjemmeside for GNU Grep: <%s>\n" Binary files /tmp/tmppJ6Y2n/6jFha9hbxv/grep-3.1/po/de.gmo and /tmp/tmppJ6Y2n/tYMwNxGD36/grep-3.3/po/de.gmo differ diff -Nru grep-3.1/po/de.po grep-3.3/po/de.po --- grep-3.1/po/de.po 2017-07-02 20:21:16.000000000 +0000 +++ grep-3.3/po/de.po 2018-12-21 04:39:02.000000000 +0000 @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: GNU grep 2.23.7\n" "Report-Msgid-Bugs-To: bug-grep@gnu.org\n" -"POT-Creation-Date: 2017-07-02 13:21-0700\n" +"POT-Creation-Date: 2018-12-20 20:39-0800\n" "PO-Revision-Date: 2016-03-08 10:01+0100\n" "Last-Translator: Philipp Thomas \n" "Language-Team: German \n" @@ -33,45 +33,53 @@ msgid "Valid arguments are:" msgstr "Gültige Argumente sind:" -#: lib/closeout.c:122 src/grep.c:1274 +#: lib/c-stack.c:208 lib/c-stack.c:301 +msgid "program error" +msgstr "" + +#: lib/c-stack.c:209 lib/c-stack.c:302 +msgid "stack overflow" +msgstr "" + +#: lib/closeout.c:122 src/grep.c:1273 msgid "write error" msgstr "Schreibfehler" # Is this message used only for [ without matching ], # or for ] without [ as well? -#: lib/dfa.c:958 +#: lib/dfa.c:970 msgid "unbalanced [" msgstr "[ ohne schließendes Gegenstück" -#: lib/dfa.c:1079 +#: lib/dfa.c:1091 msgid "invalid character class" msgstr "Ungültige Zeichenklasse %s" -#: lib/dfa.c:1205 +#: lib/dfa.c:1217 msgid "character class syntax is [[:space:]], not [:space:]" msgstr "die Syntax für Zeichenklassen ist [[:space:]], nicht [:space:]" -#: lib/dfa.c:1272 +#: lib/dfa.c:1284 msgid "unfinished \\ escape" msgstr "unbeendete \\-Escape-Sequenz" -#: lib/dfa.c:1433 +#: lib/dfa.c:1445 msgid "invalid content of \\{\\}" msgstr "Ungültiger Inhalt von \\{\\}" -#: lib/dfa.c:1436 +#: lib/dfa.c:1448 msgid "regular expression too big" msgstr "Der reguläre Ausdruck ist zu groß" -#: lib/dfa.c:1850 +#: lib/dfa.c:1863 msgid "unbalanced (" msgstr "( ohne schließendes Gegenstück" -#: lib/dfa.c:1968 +#: lib/dfa.c:1981 msgid "no syntax specified" msgstr "es wurde keine Syntax angegeben" -#: lib/dfa.c:1976 +#: lib/dfa.c:1992 msgid "unbalanced )" msgstr "Schließende ) ohne öffnendes Gegenstück" @@ -114,7 +122,7 @@ msgid "%s: option requires an argument -- '%c'\n" msgstr "%s: Option erfordert ein Argument -- „%c“\n" -#: lib/obstack.c:338 lib/obstack.c:340 lib/xalloc-die.c:34 src/pcresearch.c:291 +#: lib/obstack.c:338 lib/obstack.c:340 lib/xalloc-die.c:34 src/pcresearch.c:313 msgid "memory exhausted" msgstr "Speicher ausgeschöpft" @@ -152,7 +160,7 @@ #. for your locale. #. #. If you don't know what to put here, please see -#. +#. #. and use glyphs suitable for your language. #: lib/quotearg.c:362 msgid "`" @@ -230,16 +238,16 @@ msgid "Unmatched ) or \\)" msgstr "Kein Gegenstück für ) oder \\)" -#: lib/regcomp.c:687 +#: lib/regcomp.c:688 msgid "No previous regular expression" msgstr "Kein vorhergehender regulärer Ausdruck" -#: lib/version-etc.c:74 +#: lib/version-etc.c:73 #, c-format msgid "Packaged by %s (%s)\n" msgstr "Gepackt von %s (%s)\n" -#: lib/version-etc.c:77 +#: lib/version-etc.c:76 #, c-format msgid "Packaged by %s\n" msgstr "Gepackt von %s\n" @@ -247,14 +255,15 @@ #. TRANSLATORS: Translate "(C)" to the copyright symbol #. (C-in-a-circle), if this symbol is available in the user's #. locale. Otherwise, do not translate "(C)"; leave it as-is. -#: lib/version-etc.c:84 +#: lib/version-etc.c:83 msgid "(C)" msgstr "©" -#: lib/version-etc.c:86 +#: lib/version-etc.c:85 +#, fuzzy msgid "" "\n" -"License GPLv3+: GNU GPL version 3 or later .\n" "This is free software: you are free to change and redistribute it.\n" "There is NO WARRANTY, to the extent permitted by law.\n" @@ -401,12 +410,13 @@ msgstr "%s Homepage: <%s>\n" #: lib/version-etc.c:253 -#, c-format -msgid "%s home page: \n" +#, fuzzy, c-format +msgid "%s home page: \n" msgstr "Homepage für %s: \n" #: lib/version-etc.c:256 -msgid "General help using GNU software: \n" +#, fuzzy +msgid "General help using GNU software: \n" msgstr "" "Allgemeine Hilfe zur Benutzung von GNU-Software: \n" @@ -426,65 +436,57 @@ msgid "%s%s argument '%s' too large" msgstr "%s%s-Argument „%s“ ist zu groß" -#. This is a proper name. See the gettext manual, section Names. -#: src/grep.c:59 -msgid "Mike Haertel" -msgstr "Mike Haertel" - -#: src/grep.c:60 -msgid "others, see " -msgstr "für weitere siehe " - -#: src/grep.c:585 +#: src/grep.c:582 msgid "(standard input)" msgstr "(Standardeingabe)" -#: src/grep.c:765 +#: src/grep.c:762 msgid "invalid context length argument" msgstr "ungültiges Argument für die Kontextlänge" -#: src/grep.c:828 +#: src/grep.c:827 msgid "input is too large to count" msgstr "die Eingabe ist zu groß, um gezählt zu werden" -#: src/grep.c:1579 +#: src/grep.c:1578 #, c-format msgid "Binary file %s matches\n" msgstr "Übereinstimmungen in Binärdatei %s\n" -#: src/grep.c:1627 +#: src/grep.c:1626 #, c-format msgid "warning: %s: %s" msgstr "Warnung: %s: %s" -#: src/grep.c:1628 +#: src/grep.c:1627 msgid "recursive directory loop" msgstr "rekursive Verzeichnisschleife" -#: src/grep.c:1844 +#: src/grep.c:1843 #, c-format msgid "input file %s is also the output" msgstr "die Eingabedatei %s ist auch die Ausgabedatei" -#: src/grep.c:1907 src/grep.c:1914 -#, c-format -msgid "Usage: %s [OPTION]... PATTERN [FILE]...\n" +#: src/grep.c:1906 src/grep.c:1913 +#, fuzzy, c-format +msgid "Usage: %s [OPTION]... PATTERNS [FILE]...\n" msgstr "Aufruf: %s [OPTION]... MUSTER [DATEI]...\n" -#: src/grep.c:1909 +#: src/grep.c:1908 #, c-format msgid "Try '%s --help' for more information.\n" msgstr "„%s --help“ liefert weitere Informationen.\n" -#: src/grep.c:1915 +#: src/grep.c:1914 #, fuzzy, c-format -msgid "Search for PATTERN in each FILE.\n" +msgid "Search for PATTERNS in each FILE.\n" msgstr "Suche nach MUSTER in jeder DATEI oder der Standardeingabe.\n" -#: src/grep.c:1916 +#: src/grep.c:1915 #, fuzzy, c-format msgid "" "Example: %s -i 'hello world' menu.h main.c\n" +"PATTERNS can contain multiple patterns separated by newlines.\n" "\n" "Pattern selection and interpretation:\n" msgstr "" @@ -495,10 +497,10 @@ #: src/grep.c:1920 #, fuzzy, c-format msgid "" -" -E, --extended-regexp PATTERN is an extended regular expression\n" -" -F, --fixed-strings PATTERN is a set of newline-separated strings\n" -" -G, --basic-regexp PATTERN is a basic regular expression (default)\n" -" -P, --perl-regexp PATTERN is a Perl regular expression\n" +" -E, --extended-regexp PATTERNS are extended regular expressions\n" +" -F, --fixed-strings PATTERNS are strings\n" +" -G, --basic-regexp PATTERNS are basic regular expressions\n" +" -P, --perl-regexp PATTERNS are Perl regular expressions\n" msgstr "" " -E, --extended-regexp MUSTER ist ein erweiterter regulärer Ausdruck\n" " -F, --fixed-strings MUSTER ist eine Menge durch Zeilenumbruch\n" @@ -508,13 +510,13 @@ " ihn akzeptiert\n" #: src/grep.c:1926 -#, c-format +#, fuzzy, c-format msgid "" -" -e, --regexp=PATTERN use PATTERN for matching\n" -" -f, --file=FILE obtain PATTERN from FILE\n" +" -e, --regexp=PATTERNS use PATTERNS for matching\n" +" -f, --file=FILE take PATTERNS from FILE\n" " -i, --ignore-case ignore case distinctions\n" -" -w, --word-regexp force PATTERN to match only whole words\n" -" -x, --line-regexp force PATTERN to match only whole lines\n" +" -w, --word-regexp match only whole words\n" +" -x, --line-regexp match only whole lines\n" " -z, --null-data a data line ends in 0 byte, not newline\n" msgstr "" " -e, --regexp=MUSTER MUSTER als regulären Ausdruck verwenden\n" @@ -571,9 +573,9 @@ " der Standardeingabe\n" #: src/grep.c:1951 -#, c-format +#, fuzzy, c-format msgid "" -" -o, --only-matching show only the part of a line matching PATTERN\n" +" -o, --only-matching show only nonempty parts of lines that match\n" " -q, --quiet, --silent suppress all normal output\n" " --binary-files=TYPE assume that binary files are TYPE;\n" " TYPE is 'binary', 'text', or 'without-match'\n" @@ -609,14 +611,13 @@ " -R, --dereference-recursive ebenso, folgt aber allen symbolischen Links\n" #: src/grep.c:1967 -#, c-format +#, fuzzy, c-format msgid "" -" --include=FILE_PATTERN search only files that match FILE_PATTERN\n" -" --exclude=FILE_PATTERN skip files and directories matching " -"FILE_PATTERN\n" +" --include=GLOB search only files that match GLOB (a file " +"pattern)\n" +" --exclude=GLOB skip files and directories matching GLOB\n" " --exclude-from=FILE skip files matching any file pattern from FILE\n" -" --exclude-dir=PATTERN directories that match PATTERN will be " -"skipped.\n" +" --exclude-dir=GLOB skip directories that match GLOB\n" msgstr "" " --include=DATEIMUSTER durchsucht nur Dateien, die DATEIMUSTER " "entsprechen\n" @@ -688,7 +689,7 @@ msgid "" "When FILE is '-', read standard input. With no FILE, read '.' if\n" "recursive, '-' otherwise. With fewer than two FILEs, assume -h.\n" -"Exit status is 0 if any line is selected, 1 otherwise;\n" +"Exit status is 0 if any line (or file if -L) is selected, 1 otherwise;\n" "if any error occurs and -q is not given, the exit status is 2.\n" msgstr "" "Wenn DATEI - ist, wird die Standardeingabe gelesen. Ohne DATEI wird „.“\n" @@ -707,30 +708,37 @@ msgid "invalid matcher %s" msgstr "ungültige Entsprechung %s" -#: src/grep.c:2458 +#: src/grep.c:2459 #, c-format msgid "warning: GREP_OPTIONS is deprecated; please use an alias or script" msgstr "" "Warnung: GREP_OPTIONS sind veraltet. Bitte benutzen Sie ein Alias oder ein " "Skript" -#: src/grep.c:2485 +#: src/grep.c:2486 msgid "unknown devices method" msgstr "Unbekannte Methode für Gerätedateien" -#: src/grep.c:2629 +#: src/grep.c:2630 msgid "invalid max count" msgstr "ungültige Maximalanzahl" -#: src/grep.c:2687 +#: src/grep.c:2688 msgid "unknown binary-files type" msgstr "unbekannter Typ für Binärdateien" -#: src/pcresearch.c:80 +#: src/grep.c:2770 +#, fuzzy +msgid "" +"Written by Mike Haertel and others; see\n" +"." +msgstr "für weitere siehe " + +#: src/pcresearch.c:86 msgid "failed to allocate memory for the PCRE JIT stack" msgstr "es konnte kein Speicher für den PCRE-JIT-Stack reserviert werden" -#: src/pcresearch.c:97 +#: src/pcresearch.c:118 msgid "" "support for the -P option is not compiled into this --disable-perl-regexp " "binary" @@ -738,39 +746,42 @@ "Unterstützung für die Option -P wurde in dieses --disable-perl-regexp-Binary " "nicht einkompiliert" -#: src/pcresearch.c:119 +#: src/pcresearch.c:140 msgid "-P supports only unibyte and UTF-8 locales" msgstr "-P unterstützt nur Unibyte- oder UTF-8 Locales" -#: src/pcresearch.c:125 +#: src/pcresearch.c:146 msgid "the -P option only supports a single pattern" msgstr "Die Option -P unterstützt nur ein einzelnes Suchmuster" -#: src/pcresearch.c:167 +#: src/pcresearch.c:189 msgid "internal error (should never happen)" msgstr "Interner Fehler (sollte nie vorkommen)" -#: src/pcresearch.c:192 +#: src/pcresearch.c:214 msgid "internal error" msgstr "Interner Fehler" -#: src/pcresearch.c:215 +#: src/pcresearch.c:237 msgid "exceeded PCRE's line length limit" msgstr "Überschreitung der zulässigen Zeilenlänge von PCREs" -#: src/pcresearch.c:295 +#: src/pcresearch.c:317 msgid "exhausted PCRE JIT stack" msgstr "Kellerspeicher für PCRE JIT ist erschöpft" -#: src/pcresearch.c:299 +#: src/pcresearch.c:321 msgid "exceeded PCRE's backtracking limit" msgstr "Überschreitung der Zurückverfolgungsbeschränkung des PCREs" -#: src/pcresearch.c:306 +#: src/pcresearch.c:328 #, c-format msgid "internal PCRE error: %d" msgstr "interner PCRE-Fehler: %d" +#~ msgid "Mike Haertel" +#~ msgstr "Mike Haertel" + #~ msgid "%s: option '--%s' doesn't allow an argument\n" #~ msgstr "%s: Option „--%s“ erlaubt kein Argument\n" Binary files /tmp/tmppJ6Y2n/6jFha9hbxv/grep-3.1/po/el.gmo and /tmp/tmppJ6Y2n/tYMwNxGD36/grep-3.3/po/el.gmo differ diff -Nru grep-3.1/po/el.po grep-3.3/po/el.po --- grep-3.1/po/el.po 2017-07-02 20:21:16.000000000 +0000 +++ grep-3.3/po/el.po 2018-12-21 04:39:02.000000000 +0000 @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: grep 2.11.11-pre1\n" "Report-Msgid-Bugs-To: bug-grep@gnu.org\n" -"POT-Creation-Date: 2017-07-02 13:21-0700\n" +"POT-Creation-Date: 2018-12-20 20:39-0800\n" "PO-Revision-Date: 2012-05-05 23:23+0100\n" "Last-Translator: Savvas Radevic \n" "Language-Team: Greek \n" @@ -34,7 +34,15 @@ msgid "Valid arguments are:" msgstr "Έγκυρες επιλογές είναι οι εξής:" -#: lib/closeout.c:122 src/grep.c:1274 +#: lib/c-stack.c:208 lib/c-stack.c:301 +msgid "program error" +msgstr "" + +#: lib/c-stack.c:209 lib/c-stack.c:302 +msgid "stack overflow" +msgstr "" + +#: lib/closeout.c:122 src/grep.c:1273 msgid "write error" msgstr "σφάλμα εγγραφής" @@ -42,55 +50,55 @@ # src/dfa.c:690 src/dfa.c:703 src/dfa.c:704 # src/dfa.c:660 src/dfa.c:663 src/dfa.c:690 src/dfa.c:694 src/dfa.c:695 # src/dfa.c:698 src/dfa.c:711 src/dfa.c:712 -#: lib/dfa.c:958 +#: lib/dfa.c:970 #, fuzzy msgid "unbalanced [" msgstr "Μη ισορροπημένο [" -#: lib/dfa.c:1079 +#: lib/dfa.c:1091 msgid "invalid character class" msgstr "άκυρη κατηγορία χαρακτήρων" -#: lib/dfa.c:1205 +#: lib/dfa.c:1217 msgid "character class syntax is [[:space:]], not [:space:]" msgstr "η σύνταξη κατηγορίας χαρακτήρων είναι [[:space:]], όχι [:space:]" # src/dfa.c:444 # src/dfa.c:452 -#: lib/dfa.c:1272 +#: lib/dfa.c:1284 #, fuzzy msgid "unfinished \\ escape" msgstr "Μη τερματισμένος χαρακτήρας διαφυγής \\" # src/dfa.c:556 src/dfa.c:562 src/dfa.c:573 src/dfa.c:584 # src/dfa.c:564 src/dfa.c:570 src/dfa.c:581 src/dfa.c:592 -#: lib/dfa.c:1433 +#: lib/dfa.c:1445 #, fuzzy msgid "invalid content of \\{\\}" msgstr "μη έγκυρος μέγιστος μετρητής" -#: lib/dfa.c:1436 +#: lib/dfa.c:1448 #, fuzzy msgid "regular expression too big" msgstr "Υπερβολικά μεγάλη η κανονική έκφραση" # src/dfa.c:841 # src/dfa.c:849 -#: lib/dfa.c:1850 +#: lib/dfa.c:1863 #, fuzzy msgid "unbalanced (" msgstr "Μη ισορροπημένο (" # src/dfa.c:962 # src/dfa.c:970 -#: lib/dfa.c:1968 +#: lib/dfa.c:1981 #, fuzzy msgid "no syntax specified" msgstr "Δεν ορίστηκε συντακτικό" # src/dfa.c:970 # src/dfa.c:978 -#: lib/dfa.c:1976 +#: lib/dfa.c:1992 #, fuzzy msgid "unbalanced )" msgstr "Μη ισορροπημένο )" @@ -152,7 +160,7 @@ # src/kwset.c:190 # src/grep.c:164 src/grep.c:181 src/grep.c:283 src/grep.c:338 src/kwset.c:184 # src/kwset.c:190 -#: lib/obstack.c:338 lib/obstack.c:340 lib/xalloc-die.c:34 src/pcresearch.c:291 +#: lib/obstack.c:338 lib/obstack.c:340 lib/xalloc-die.c:34 src/pcresearch.c:313 msgid "memory exhausted" msgstr "η μνήμη εξαντλήθηκε" @@ -190,7 +198,7 @@ #. for your locale. #. #. If you don't know what to put here, please see -#. +#. #. and use glyphs suitable for your language. #: lib/quotearg.c:362 msgid "`" @@ -270,16 +278,16 @@ msgid "Unmatched ) or \\)" msgstr "" -#: lib/regcomp.c:687 +#: lib/regcomp.c:688 msgid "No previous regular expression" msgstr "Καμία προηγούμενη κανονική έκφραση" -#: lib/version-etc.c:74 +#: lib/version-etc.c:73 #, fuzzy, c-format msgid "Packaged by %s (%s)\n" msgstr "Συσκευάστηκε από %s (%s)\n" -#: lib/version-etc.c:77 +#: lib/version-etc.c:76 #, fuzzy, c-format msgid "Packaged by %s\n" msgstr "Συσκευάστηκε από %s\n" @@ -287,14 +295,15 @@ #. TRANSLATORS: Translate "(C)" to the copyright symbol #. (C-in-a-circle), if this symbol is available in the user's #. locale. Otherwise, do not translate "(C)"; leave it as-is. -#: lib/version-etc.c:84 +#: lib/version-etc.c:83 msgid "(C)" msgstr "(C)" -#: lib/version-etc.c:86 +#: lib/version-etc.c:85 +#, fuzzy msgid "" "\n" -"License GPLv3+: GNU GPL version 3 or later .\n" "This is free software: you are free to change and redistribute it.\n" "There is NO WARRANTY, to the extent permitted by law.\n" @@ -440,12 +449,13 @@ msgstr "%s κεντρική σελίδα: <%s>\n" #: lib/version-etc.c:253 -#, c-format -msgid "%s home page: \n" +#, fuzzy, c-format +msgid "%s home page: \n" msgstr "%s κεντρική σελίδα: \n" #: lib/version-etc.c:256 -msgid "General help using GNU software: \n" +#, fuzzy +msgid "General help using GNU software: \n" msgstr "Γενική βοήθεια χρήσης λογισμικού GNU: \n" #: lib/xstrtol-error.c:63 @@ -463,79 +473,69 @@ msgid "%s%s argument '%s' too large" msgstr "η %s%s επιλογή «%s» είναι υπερβολικά μεγάλη" -#. This is a proper name. See the gettext manual, section Names. -#: src/grep.c:59 -msgid "Mike Haertel" -msgstr "Mike Haertel" - -#: src/grep.c:60 -msgid "others, see " -msgstr "" -"άλλοι, κοιτάξτε τον σύνδεσμο " - # src/grep.c:964 src/grep.c:1015 # src/grep.c:730 -#: src/grep.c:585 +#: src/grep.c:582 msgid "(standard input)" msgstr "(κανονική είσοδος)" # src/grep.c:785 src/grep.c:792 # src/grep.c:1060 src/grep.c:1067 src/grep.c:1076 -#: src/grep.c:765 +#: src/grep.c:762 msgid "invalid context length argument" msgstr "μη έγκυρο όρισμα μήκους περιεχομένου" -#: src/grep.c:828 +#: src/grep.c:827 msgid "input is too large to count" msgstr "η είσοδος είναι πολύ μεγάλη για να μετρηθεί" # src/grep.c:715 -#: src/grep.c:1579 +#: src/grep.c:1578 #, c-format msgid "Binary file %s matches\n" msgstr "Το δυαδικό αρχείο %s ταιριάζει\n" # src/grep.c:293 # src/grep.c:366 -#: src/grep.c:1627 +#: src/grep.c:1626 #, fuzzy, c-format msgid "warning: %s: %s" msgstr "προειδοποίηση: %s: %s\n" # src/grep.c:844 -#: src/grep.c:1628 +#: src/grep.c:1627 msgid "recursive directory loop" msgstr "αναδρομική αλληλοδιαδοχή καταλόγων" -#: src/grep.c:1844 +#: src/grep.c:1843 #, c-format msgid "input file %s is also the output" msgstr "το αρχείο εισαγωγής %s είναι επίσης το αρχείο εξόδου" # src/grep.c:597 # src/grep.c:862 -#: src/grep.c:1907 src/grep.c:1914 -#, c-format -msgid "Usage: %s [OPTION]... PATTERN [FILE]...\n" +#: src/grep.c:1906 src/grep.c:1913 +#, fuzzy, c-format +msgid "Usage: %s [OPTION]... PATTERNS [FILE]...\n" msgstr "Χρήση: %s [ΕΠΙΛΟΓΗ]... ΥΠΟΔΕΙΓΜΑ [ΑΡΧΕΙΟ]...\n" # src/grep.c:598 # src/grep.c:863 -#: src/grep.c:1909 +#: src/grep.c:1908 #, c-format msgid "Try '%s --help' for more information.\n" msgstr "Δοκιμάστε «%s --help» για περισσότερες πληροφορίες.\n" -#: src/grep.c:1915 +#: src/grep.c:1914 #, c-format -msgid "Search for PATTERN in each FILE.\n" +msgid "Search for PATTERNS in each FILE.\n" msgstr "" -#: src/grep.c:1916 +#: src/grep.c:1915 #, fuzzy, c-format msgid "" "Example: %s -i 'hello world' menu.h main.c\n" +"PATTERNS can contain multiple patterns separated by newlines.\n" "\n" "Pattern selection and interpretation:\n" msgstr "" @@ -547,10 +547,10 @@ #: src/grep.c:1920 #, fuzzy, c-format msgid "" -" -E, --extended-regexp PATTERN is an extended regular expression\n" -" -F, --fixed-strings PATTERN is a set of newline-separated strings\n" -" -G, --basic-regexp PATTERN is a basic regular expression (default)\n" -" -P, --perl-regexp PATTERN is a Perl regular expression\n" +" -E, --extended-regexp PATTERNS are extended regular expressions\n" +" -F, --fixed-strings PATTERNS are strings\n" +" -G, --basic-regexp PATTERNS are basic regular expressions\n" +" -P, --perl-regexp PATTERNS are Perl regular expressions\n" msgstr "" " -E, --extended-regexp ΥΠΟΔΕΙΓΜΑ είναι μια εκτεταμένη κανονική έκφραση\n" " -F, --fixed-regexp ΥΠΟΔΕΙΓΜΑ είναι στατικό αλφαριθμητικό διαχωρι-\n" @@ -561,13 +561,13 @@ # src/grep.c:603 # src/grep.c:868 #: src/grep.c:1926 -#, c-format +#, fuzzy, c-format msgid "" -" -e, --regexp=PATTERN use PATTERN for matching\n" -" -f, --file=FILE obtain PATTERN from FILE\n" +" -e, --regexp=PATTERNS use PATTERNS for matching\n" +" -f, --file=FILE take PATTERNS from FILE\n" " -i, --ignore-case ignore case distinctions\n" -" -w, --word-regexp force PATTERN to match only whole words\n" -" -x, --line-regexp force PATTERN to match only whole lines\n" +" -w, --word-regexp match only whole words\n" +" -x, --line-regexp match only whole lines\n" " -z, --null-data a data line ends in 0 byte, not newline\n" msgstr "" " -e, --regexp=ΥΠΟΔΕΙΓΜΑ χρήση ΥΠΟΔΕΙΓΜΑτος για κανονική έκφραση\n" @@ -619,7 +619,7 @@ #: src/grep.c:1951 #, c-format msgid "" -" -o, --only-matching show only the part of a line matching PATTERN\n" +" -o, --only-matching show only nonempty parts of lines that match\n" " -q, --quiet, --silent suppress all normal output\n" " --binary-files=TYPE assume that binary files are TYPE;\n" " TYPE is 'binary', 'text', or 'without-match'\n" @@ -641,12 +641,11 @@ #: src/grep.c:1967 #, c-format msgid "" -" --include=FILE_PATTERN search only files that match FILE_PATTERN\n" -" --exclude=FILE_PATTERN skip files and directories matching " -"FILE_PATTERN\n" +" --include=GLOB search only files that match GLOB (a file " +"pattern)\n" +" --exclude=GLOB skip files and directories matching GLOB\n" " --exclude-from=FILE skip files matching any file pattern from FILE\n" -" --exclude-dir=PATTERN directories that match PATTERN will be " -"skipped.\n" +" --exclude-dir=GLOB skip directories that match GLOB\n" msgstr "" #: src/grep.c:1974 @@ -706,7 +705,7 @@ msgid "" "When FILE is '-', read standard input. With no FILE, read '.' if\n" "recursive, '-' otherwise. With fewer than two FILEs, assume -h.\n" -"Exit status is 0 if any line is selected, 1 otherwise;\n" +"Exit status is 0 if any line (or file if -L) is selected, 1 otherwise;\n" "if any error occurs and -q is not given, the exit status is 2.\n" msgstr "" "Χωρία ΑΡΧΕΙΟ, ή όταν το ΑΡΧΕΙΟ είναι -, διαβάζεται η κανονική είσοδος.\n" @@ -727,31 +726,40 @@ msgid "invalid matcher %s" msgstr "μη έγκυρος μέγιστος μετρητής" -#: src/grep.c:2458 +#: src/grep.c:2459 #, c-format msgid "warning: GREP_OPTIONS is deprecated; please use an alias or script" msgstr "" # src/grep.c:1133 -#: src/grep.c:2485 +#: src/grep.c:2486 msgid "unknown devices method" msgstr "άγνωστη μέθοδος συσκευών" # src/dfa.c:556 src/dfa.c:562 src/dfa.c:573 src/dfa.c:584 # src/dfa.c:564 src/dfa.c:570 src/dfa.c:581 src/dfa.c:592 -#: src/grep.c:2629 +#: src/grep.c:2630 msgid "invalid max count" msgstr "μη έγκυρος μέγιστος μετρητής" -#: src/grep.c:2687 +#: src/grep.c:2688 msgid "unknown binary-files type" msgstr "άγνωστο είδος δυαδικών αρχείων" -#: src/pcresearch.c:80 +#: src/grep.c:2770 +#, fuzzy +msgid "" +"Written by Mike Haertel and others; see\n" +"." +msgstr "" +"άλλοι, κοιτάξτε τον σύνδεσμο " + +#: src/pcresearch.c:86 msgid "failed to allocate memory for the PCRE JIT stack" msgstr "" -#: src/pcresearch.c:97 +#: src/pcresearch.c:118 msgid "" "support for the -P option is not compiled into this --disable-perl-regexp " "binary" @@ -759,39 +767,42 @@ "η υποστήριξη για την επιλογή -P δεν είναι μεταγλωττισμένη σε αυτό το --" "disable-perl-regexp δυαδικό [αρχείο]" -#: src/pcresearch.c:119 +#: src/pcresearch.c:140 msgid "-P supports only unibyte and UTF-8 locales" msgstr "" -#: src/pcresearch.c:125 +#: src/pcresearch.c:146 msgid "the -P option only supports a single pattern" msgstr "Η επιλογή -P υποστηρίζει μόνο ένα υπόδειγμα" -#: src/pcresearch.c:167 +#: src/pcresearch.c:189 msgid "internal error (should never happen)" msgstr "" -#: src/pcresearch.c:192 +#: src/pcresearch.c:214 msgid "internal error" msgstr "εσωτερικό σφάλμα" -#: src/pcresearch.c:215 +#: src/pcresearch.c:237 msgid "exceeded PCRE's line length limit" msgstr "" -#: src/pcresearch.c:295 +#: src/pcresearch.c:317 msgid "exhausted PCRE JIT stack" msgstr "" -#: src/pcresearch.c:299 +#: src/pcresearch.c:321 msgid "exceeded PCRE's backtracking limit" msgstr "" -#: src/pcresearch.c:306 +#: src/pcresearch.c:328 #, fuzzy, c-format msgid "internal PCRE error: %d" msgstr "εσωτερικό σφάλμα" +#~ msgid "Mike Haertel" +#~ msgstr "Mike Haertel" + # src/getopt.c:652 # src/getopt.c:652 #, fuzzy Binary files /tmp/tmppJ6Y2n/6jFha9hbxv/grep-3.1/po/eo.gmo and /tmp/tmppJ6Y2n/tYMwNxGD36/grep-3.3/po/eo.gmo differ diff -Nru grep-3.1/po/eo.po grep-3.3/po/eo.po --- grep-3.1/po/eo.po 2017-07-02 20:21:16.000000000 +0000 +++ grep-3.3/po/eo.po 2018-12-21 04:39:02.000000000 +0000 @@ -1,5 +1,5 @@ # Esperanto translations for GNU grep. -# Copyright (C) 2015 Free Software Foundation, Inc. +# Copyright (C) 2018 Free Software Foundation, Inc. # This file is distributed under the same license as the grep package. # # “Jeder ist seines Glückes Schmied, @@ -7,14 +7,14 @@ # # D. Dale Gulledge , 1999. # Edmund GRIMLEY EVANS , 2000-2009. -# Benno Schulenberg , 2013, 2014, 2015, 2016. +# Benno Schulenberg , 2013, 2014, 2015, 2016, 2018. msgid "" msgstr "" -"Project-Id-Version: GNU grep 2.23.7\n" +"Project-Id-Version: GNU grep 3.0.23-b00\n" "Report-Msgid-Bugs-To: bug-grep@gnu.org\n" -"POT-Creation-Date: 2017-07-02 13:21-0700\n" -"PO-Revision-Date: 2016-03-05 17:40+0100\n" -"Last-Translator: Benno Schulenberg \n" +"POT-Creation-Date: 2018-12-20 20:39-0800\n" +"PO-Revision-Date: 2018-09-16 12:44+0200\n" +"Last-Translator: Benno Schulenberg \n" "Language-Team: Esperanto \n" "Language: eo\n" "MIME-Version: 1.0\n" @@ -22,7 +22,6 @@ "Content-Transfer-Encoding: 8bit\n" "X-Bugs: Report translation errors to the Language-Team address.\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Lokalize 1.0\n" #: lib/argmatch.c:134 #, c-format @@ -32,49 +31,57 @@ #: lib/argmatch.c:135 #, c-format msgid "ambiguous argument %s for %s" -msgstr "plursenca argumento %s por %s" +msgstr "ambigua argumento %s por %s" #: lib/argmatch.c:154 msgid "Valid arguments are:" msgstr "Validaj argumentoj estas:" -#: lib/closeout.c:122 src/grep.c:1274 +#: lib/c-stack.c:208 lib/c-stack.c:301 +msgid "program error" +msgstr "" + +#: lib/c-stack.c:209 lib/c-stack.c:302 +msgid "stack overflow" +msgstr "" + +#: lib/closeout.c:122 src/grep.c:1273 msgid "write error" msgstr "skrib-eraro" -#: lib/dfa.c:958 +#: lib/dfa.c:970 msgid "unbalanced [" msgstr "senpara [" -#: lib/dfa.c:1079 +#: lib/dfa.c:1091 msgid "invalid character class" msgstr "nevalida signoklaso" -#: lib/dfa.c:1205 +#: lib/dfa.c:1217 msgid "character class syntax is [[:space:]], not [:space:]" msgstr "sintakso de signoklaso estas ekzemple [[:spaco:]], ne [:spaco:]" -#: lib/dfa.c:1272 +#: lib/dfa.c:1284 msgid "unfinished \\ escape" msgstr "nefinita \\-eskapo" -#: lib/dfa.c:1433 +#: lib/dfa.c:1445 msgid "invalid content of \\{\\}" msgstr "nevalida enhavo de \\{\\}" -#: lib/dfa.c:1436 +#: lib/dfa.c:1448 msgid "regular expression too big" msgstr "regulesprimo tro grandas" -#: lib/dfa.c:1850 +#: lib/dfa.c:1863 msgid "unbalanced (" msgstr "senpara (" -#: lib/dfa.c:1968 +#: lib/dfa.c:1981 msgid "no syntax specified" msgstr "neniu sintakso indikatas" -#: lib/dfa.c:1976 +#: lib/dfa.c:1992 msgid "unbalanced )" msgstr "senpara )" @@ -83,29 +90,29 @@ msgstr "Nekonata sistemeraro" #: lib/getopt.c:278 -#, fuzzy, c-format +#, c-format msgid "%s: option '%s%s' is ambiguous\n" -msgstr "%s: opcio «%s» estas ambigua\n" +msgstr "%s: opcio «%s%s» estas ambigua\n" #: lib/getopt.c:284 -#, fuzzy, c-format +#, c-format msgid "%s: option '%s%s' is ambiguous; possibilities:" -msgstr "%s: opcio «%s» estas plursenca; eblaĵoj estas:" +msgstr "%s: opcio «%s%s» estas ambigua; eblaĵoj estas:" #: lib/getopt.c:319 -#, fuzzy, c-format +#, c-format msgid "%s: unrecognized option '%s%s'\n" -msgstr "%s: nekonata opcio «%c%s»\n" +msgstr "%s: nekonata opcio «%s%s»\n" #: lib/getopt.c:345 -#, fuzzy, c-format +#, c-format msgid "%s: option '%s%s' doesn't allow an argument\n" -msgstr "%s: opcio «%c%s» ne toleras argumenton\n" +msgstr "%s: opcio «%s%s» ne toleras argumenton\n" #: lib/getopt.c:360 -#, fuzzy, c-format +#, c-format msgid "%s: option '%s%s' requires an argument\n" -msgstr "--%s: opcio «%s» bezonas argumenton\n" +msgstr "%s: opcio «%s%s» bezonas argumenton\n" #: lib/getopt.c:621 #, c-format @@ -117,7 +124,7 @@ msgid "%s: option requires an argument -- '%c'\n" msgstr "%s: opcio bezonas argumenton -- «%c»\n" -#: lib/obstack.c:338 lib/obstack.c:340 lib/xalloc-die.c:34 src/pcresearch.c:291 +#: lib/obstack.c:338 lib/obstack.c:340 lib/xalloc-die.c:34 src/pcresearch.c:313 msgid "memory exhausted" msgstr "mankas sufiĉa memoro" @@ -134,7 +141,7 @@ #: lib/xbinary-io.c:37 #, c-format msgid "failed to set file descriptor text/binary mode" -msgstr "" +msgstr "malsukcesis agordi tekstan/duuman moduson de dosierpriaĵo" #. TRANSLATORS: #. Get translations for open and closing quotation marks. @@ -155,7 +162,7 @@ #. for your locale. #. #. If you don't know what to put here, please see -#. +#. #. and use glyphs suitable for your language. #: lib/quotearg.c:362 msgid "`" @@ -233,16 +240,16 @@ msgid "Unmatched ) or \\)" msgstr "Senpara ) aŭ \\)" -#: lib/regcomp.c:687 +#: lib/regcomp.c:688 msgid "No previous regular expression" msgstr "Mankas antaŭa regulesprimo" -#: lib/version-etc.c:74 +#: lib/version-etc.c:73 #, c-format msgid "Packaged by %s (%s)\n" msgstr "Pakigita far %s (%s)\n" -#: lib/version-etc.c:77 +#: lib/version-etc.c:76 #, c-format msgid "Packaged by %s\n" msgstr "Pakigita far %s\n" @@ -250,14 +257,15 @@ #. TRANSLATORS: Translate "(C)" to the copyright symbol #. (C-in-a-circle), if this symbol is available in the user's #. locale. Otherwise, do not translate "(C)"; leave it as-is. -#: lib/version-etc.c:84 +#: lib/version-etc.c:83 msgid "(C)" msgstr "©" -#: lib/version-etc.c:86 +#: lib/version-etc.c:85 +#, fuzzy msgid "" "\n" -"License GPLv3+: GNU GPL version 3 or later .\n" "This is free software: you are free to change and redistribute it.\n" "There is NO WARRANTY, to the extent permitted by law.\n" @@ -403,12 +411,13 @@ msgstr "Hejmpaĝo de %s: %s\n" #: lib/version-etc.c:253 -#, c-format -msgid "%s home page: \n" +#, fuzzy, c-format +msgid "%s home page: \n" msgstr "Hejmpaĝo de «%s»: http://www.gnu.org/software/%s/\n" #: lib/version-etc.c:256 -msgid "General help using GNU software: \n" +#, fuzzy +msgid "General help using GNU software: \n" msgstr "Ĝenerala helpo por uzi GNU-programojn: http://www.gnu.org/gethelp/\n" #: lib/xstrtol-error.c:63 @@ -426,94 +435,86 @@ msgid "%s%s argument '%s' too large" msgstr "argumento de %s%s tro grandas: «%s»" -#. This is a proper name. See the gettext manual, section Names. -#: src/grep.c:59 -msgid "Mike Haertel" -msgstr "Majk HERTEL (Mike Haertel)" - -#: src/grep.c:60 -msgid "others, see " -msgstr "aliuloj, vidu " - -#: src/grep.c:585 +#: src/grep.c:582 msgid "(standard input)" msgstr "(ĉefenigujo)" -#: src/grep.c:765 +#: src/grep.c:762 msgid "invalid context length argument" msgstr "nevalida kuntekstlongeca argumento" -#: src/grep.c:828 +#: src/grep.c:827 msgid "input is too large to count" msgstr "enigo tro longas por nombri" -#: src/grep.c:1579 +#: src/grep.c:1578 #, c-format msgid "Binary file %s matches\n" msgstr "Duuma dosiero %s kongruas\n" -#: src/grep.c:1627 +#: src/grep.c:1626 #, c-format msgid "warning: %s: %s" msgstr "averto: %s: %s" -#: src/grep.c:1628 +#: src/grep.c:1627 msgid "recursive directory loop" msgstr "rikura ciklo de dosierujoj" -#: src/grep.c:1844 +#: src/grep.c:1843 #, c-format msgid "input file %s is also the output" msgstr "eniga dosiero %s estas ankaŭ la eliga dosiero; ĝi ignoriĝas" -#: src/grep.c:1907 src/grep.c:1914 -#, c-format -msgid "Usage: %s [OPTION]... PATTERN [FILE]...\n" +#: src/grep.c:1906 src/grep.c:1913 +#, fuzzy, c-format +msgid "Usage: %s [OPTION]... PATTERNS [FILE]...\n" msgstr "Uzmaniero: %s [OPCIO...] ŜABLONO [DOSIERO...]\n" -#: src/grep.c:1909 +#: src/grep.c:1908 #, c-format msgid "Try '%s --help' for more information.\n" msgstr "Tajpu '%s --help' por pli da informoj.\n" -#: src/grep.c:1915 +#: src/grep.c:1914 #, fuzzy, c-format -msgid "Search for PATTERN in each FILE.\n" -msgstr "Serĉas ŜABLONOn en ĉiu DOSIERO aŭ en ĉefenigujo.\n" +msgid "Search for PATTERNS in each FILE.\n" +msgstr "Serĉas ŜABLONOn en ĉiu DOSIERO.\n" -#: src/grep.c:1916 +#: src/grep.c:1915 #, fuzzy, c-format msgid "" "Example: %s -i 'hello world' menu.h main.c\n" +"PATTERNS can contain multiple patterns separated by newlines.\n" "\n" "Pattern selection and interpretation:\n" msgstr "" "Ekzemplo: %s -i 'hello world' menu.h main.c\n" "\n" -"Elekto kaj interpreto de regulesprimoj:\n" +"Elekto kaj interpreto de ŝablono:\n" #: src/grep.c:1920 #, fuzzy, c-format msgid "" -" -E, --extended-regexp PATTERN is an extended regular expression\n" -" -F, --fixed-strings PATTERN is a set of newline-separated strings\n" -" -G, --basic-regexp PATTERN is a basic regular expression (default)\n" -" -P, --perl-regexp PATTERN is a Perl regular expression\n" +" -E, --extended-regexp PATTERNS are extended regular expressions\n" +" -F, --fixed-strings PATTERNS are strings\n" +" -G, --basic-regexp PATTERNS are basic regular expressions\n" +" -P, --perl-regexp PATTERNS are Perl regular expressions\n" msgstr "" " -E, --extended-regexp ŜABLONO estas etendita regulesprimo (ERE)\n" " -F, --fixed-strings ŜABLONO estas aro da ĉenoj apartigitaj de " "linifinoj\n" -" -G, --basic-regexp ŜABLONO estas baza regulesprimo (BRE)\n" +" -G, --basic-regexp ŜABLONO estas baza regulesprimo (BRE, defaŭlta)\n" " -P, --perl-regexp ŜABLONO estas regulesprimo de Perl\n" #: src/grep.c:1926 -#, c-format +#, fuzzy, c-format msgid "" -" -e, --regexp=PATTERN use PATTERN for matching\n" -" -f, --file=FILE obtain PATTERN from FILE\n" +" -e, --regexp=PATTERNS use PATTERNS for matching\n" +" -f, --file=FILE take PATTERNS from FILE\n" " -i, --ignore-case ignore case distinctions\n" -" -w, --word-regexp force PATTERN to match only whole words\n" -" -x, --line-regexp force PATTERN to match only whole lines\n" +" -w, --word-regexp match only whole words\n" +" -x, --line-regexp match only whole lines\n" " -z, --null-data a data line ends in 0 byte, not newline\n" msgstr "" " -e, --regexp=ŜABLONO uzi ŜABLONOn kiel regulesprimon\n" @@ -542,7 +543,7 @@ " --help montri ĉi tiun helpon kaj eliri\n" #: src/grep.c:1940 -#, fuzzy, c-format +#, c-format msgid "" "\n" "Output control:\n" @@ -557,18 +558,18 @@ msgstr "" "\n" "Regado de la eligo:\n" -" -m, --max-count==NOMBRO halti post NOMBRO da trafoj\n" +" -m, --max-count==NOMBRO halti post NOMBRO da elektitaj linioj\n" " -b, --byte-offset montri la bitoknumeron kun eligataj linioj\n" " -n, --line-number montri la lininumeron kun eligataj linioj\n" " --line-buffered peli la eligon post ĉiu linio\n" -" -H, --with-filename montri la dosiernomon por ĉiu trafo\n" +" -H, --with-filename montri la dosiernomon antaŭ eligataj linioj\n" " -h, --no-filename subpremi la prefiksan dosiernomon ĉe eligo\n" " --label=ETIKEDO uzi ETIKEDOn kiel dosiernomon de ĉefenigujo\n" #: src/grep.c:1951 -#, c-format +#, fuzzy, c-format msgid "" -" -o, --only-matching show only the part of a line matching PATTERN\n" +" -o, --only-matching show only nonempty parts of lines that match\n" " -q, --quiet, --silent suppress all normal output\n" " --binary-files=TYPE assume that binary files are TYPE;\n" " TYPE is 'binary', 'text', or 'without-match'\n" @@ -603,14 +604,13 @@ " -R, -r, --recursive egalas al «--directories=recurse»\n" #: src/grep.c:1967 -#, c-format +#, fuzzy, c-format msgid "" -" --include=FILE_PATTERN search only files that match FILE_PATTERN\n" -" --exclude=FILE_PATTERN skip files and directories matching " -"FILE_PATTERN\n" +" --include=GLOB search only files that match GLOB (a file " +"pattern)\n" +" --exclude=GLOB skip files and directories matching GLOB\n" " --exclude-from=FILE skip files matching any file pattern from FILE\n" -" --exclude-dir=PATTERN directories that match PATTERN will be " -"skipped.\n" +" --exclude-dir=GLOB skip directories that match GLOB\n" msgstr "" " --include=ŜABLONO ekzameni nur dosierojn kiuj kongruas kun " "ŜABLONO\n" @@ -620,7 +620,7 @@ " --exclude-dir=ŜABLONO ignori dosierujojn kiuj kongruas kun ŜABLONO\n" #: src/grep.c:1974 -#, fuzzy, c-format +#, c-format msgid "" " -L, --files-without-match print only names of FILEs with no selected " "lines\n" @@ -652,7 +652,7 @@ " -C, --context=NOMBRO egalas al «-A NOMBRO -B NOMBRO»\n" #: src/grep.c:1987 -#, fuzzy, c-format +#, c-format msgid "" " -NUM same as --context=NUM\n" " --color[=WHEN],\n" @@ -668,8 +668,6 @@ " KIAM estus 'always' (ĉiam), 'never' (neniam),\n" " aŭ 'auto' (aŭtomate)\n" " -U, --binary ne forigi \\r-signojn ĉe linifino (MSDOS)\n" -" -u, --unix-byte-offsets doni bitoknumerojn kvazaŭ \\r-signoj mankus " -"(MSDOS)\n" "\n" #: src/grep.c:1994 @@ -677,12 +675,12 @@ msgid "" "When FILE is '-', read standard input. With no FILE, read '.' if\n" "recursive, '-' otherwise. With fewer than two FILEs, assume -h.\n" -"Exit status is 0 if any line is selected, 1 otherwise;\n" +"Exit status is 0 if any line (or file if -L) is selected, 1 otherwise;\n" "if any error occurs and -q is not given, the exit status is 2.\n" msgstr "" "Kiam DOSIERO estas «-», ĉefenigujo legiĝas.\n" -"Kiam DOSIERO mankas, «.» legiĝas se «-r» inidikatas, alie «-» legiĝas.\n" -"Kiam malpli ol du DOSIEROJ indikatas, «-h» supoziĝas.\n" +"Kiam DOSIERO mankas, «.» legiĝas se rikura, alie «-» legiĝas.\n" +"Kiam malpli ol du DOSIEROj indikatas, «-h» supoziĝas.\n" "Elirstato estas 0 se iu linio elektiĝis, alie 1;\n" "elirstato estas 2 se iu eraro okazis kaj «-q» ne indikatis.\n" @@ -695,28 +693,35 @@ msgid "invalid matcher %s" msgstr "nevalida esprimtipo %s" -#: src/grep.c:2458 +#: src/grep.c:2459 #, c-format msgid "warning: GREP_OPTIONS is deprecated; please use an alias or script" msgstr "averto: GREP_OPTIONS evitindas; bonvolu uzi 'alias' aŭ skripton" -#: src/grep.c:2485 +#: src/grep.c:2486 msgid "unknown devices method" msgstr "nekonata ago por aparatoj" -#: src/grep.c:2629 +#: src/grep.c:2630 msgid "invalid max count" msgstr "nevalida maksimuma nombro" -#: src/grep.c:2687 +#: src/grep.c:2688 msgid "unknown binary-files type" msgstr "nekonata ago por duumaj dosieroj" -#: src/pcresearch.c:80 +#: src/grep.c:2770 +#, fuzzy +msgid "" +"Written by Mike Haertel and others; see\n" +"." +msgstr "aliuloj, vidu " + +#: src/pcresearch.c:86 msgid "failed to allocate memory for the PCRE JIT stack" msgstr "mankas sufiĉa memoro por la PCRE-JIT-stako" -#: src/pcresearch.c:97 +#: src/pcresearch.c:118 msgid "" "support for the -P option is not compiled into this --disable-perl-regexp " "binary" @@ -724,39 +729,42 @@ "opcio «-P» ne funkcias en ĉi tiu programo ĉar ĝi kompiliĝis kun «--disable-" "perl-regexp»" -#: src/pcresearch.c:119 +#: src/pcresearch.c:140 msgid "-P supports only unibyte and UTF-8 locales" msgstr "opcio «-P» subtenas nur unubajtajn kaj UTF-8-ajn lokaĵojn" -#: src/pcresearch.c:125 +#: src/pcresearch.c:146 msgid "the -P option only supports a single pattern" msgstr "opcio «-P» akceptas nur unuopan ŝablonon" -#: src/pcresearch.c:167 +#: src/pcresearch.c:189 msgid "internal error (should never happen)" msgstr "**interna eraro** (devus neniam okazi)" -#: src/pcresearch.c:192 +#: src/pcresearch.c:214 msgid "internal error" msgstr "**interna eraro**" -#: src/pcresearch.c:215 +#: src/pcresearch.c:237 msgid "exceeded PCRE's line length limit" msgstr "transpasiĝis linilongecan limon de PCRE" -#: src/pcresearch.c:295 +#: src/pcresearch.c:317 msgid "exhausted PCRE JIT stack" msgstr "la PCRE-JIT-stako tute pleniĝis" -#: src/pcresearch.c:299 +#: src/pcresearch.c:321 msgid "exceeded PCRE's backtracking limit" msgstr "transpasiĝis retroreferencan limon de PCRE" -#: src/pcresearch.c:306 +#: src/pcresearch.c:328 #, c-format msgid "internal PCRE error: %d" msgstr "**interna eraro** en PCRE: %d" +#~ msgid "Mike Haertel" +#~ msgstr "Majk HERTEL (Mike Haertel)" + #~ msgid "%s: option '--%s' doesn't allow an argument\n" #~ msgstr "%s: opcio «--%s» ne toleras argumenton\n" @@ -772,6 +780,9 @@ #~ msgid "%s: option '-W %s' requires an argument\n" #~ msgstr "%s: opcio «-W %s» bezonas argumenton\n" +#~ msgid "lseek failed" +#~ msgstr "malsukcesis 'lseek'" + #~ msgid "PATTERN is, by default, a basic regular expression (BRE).\n" #~ msgstr "ŜABLONO defaŭlte estas baza regulesprimo (BRE).\n" @@ -782,9 +793,6 @@ #~ "Rekta alvoko kiel aŭ 'egrep' aŭ 'fgrep' malrekomendatas;\n" #~ "'egrep' signifas 'grep -E; 'fgrep' signifas 'grep -F'.\n" -#~ msgid "lseek failed" -#~ msgstr "malsukcesis 'lseek'" - #~ msgid "unescaped ^ or $ not supported with -Pz" #~ msgstr "seneskapa ^ aŭ $ ne subtenatas kun opcio «-Pz»" Binary files /tmp/tmppJ6Y2n/6jFha9hbxv/grep-3.1/po/es.gmo and /tmp/tmppJ6Y2n/tYMwNxGD36/grep-3.3/po/es.gmo differ diff -Nru grep-3.1/po/es.po grep-3.3/po/es.po --- grep-3.1/po/es.po 2017-07-02 20:21:16.000000000 +0000 +++ grep-3.3/po/es.po 2018-12-21 04:39:02.000000000 +0000 @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: GNU grep 2.19.12\n" "Report-Msgid-Bugs-To: bug-grep@gnu.org\n" -"POT-Creation-Date: 2017-07-02 13:21-0700\n" +"POT-Creation-Date: 2018-12-20 20:39-0800\n" "PO-Revision-Date: 2014-07-11 18:53+0200\n" "Last-Translator: Santiago Vila Doncel \n" "Language-Team: Spanish \n" @@ -32,43 +32,51 @@ msgid "Valid arguments are:" msgstr "Los argumentos válidos son:" -#: lib/closeout.c:122 src/grep.c:1274 +#: lib/c-stack.c:208 lib/c-stack.c:301 +msgid "program error" +msgstr "" + +#: lib/c-stack.c:209 lib/c-stack.c:302 +msgid "stack overflow" +msgstr "" + +#: lib/closeout.c:122 src/grep.c:1273 msgid "write error" msgstr "error de escritura" -#: lib/dfa.c:958 +#: lib/dfa.c:970 msgid "unbalanced [" msgstr "[ desemparejado" -#: lib/dfa.c:1079 +#: lib/dfa.c:1091 msgid "invalid character class" msgstr "clase de caracteres inválida" -#: lib/dfa.c:1205 +#: lib/dfa.c:1217 msgid "character class syntax is [[:space:]], not [:space:]" msgstr "la sintaxis de la clase de caracteres es [[:space:]], no [:space:]" -#: lib/dfa.c:1272 +#: lib/dfa.c:1284 msgid "unfinished \\ escape" msgstr "secuencia de escape \\ sin terminar" -#: lib/dfa.c:1433 +#: lib/dfa.c:1445 msgid "invalid content of \\{\\}" msgstr "contenido inválido de \\{\\}" -#: lib/dfa.c:1436 +#: lib/dfa.c:1448 msgid "regular expression too big" msgstr "la expresión regular es demasiado grande" -#: lib/dfa.c:1850 +#: lib/dfa.c:1863 msgid "unbalanced (" msgstr "( desemparejado" -#: lib/dfa.c:1968 +#: lib/dfa.c:1981 msgid "no syntax specified" msgstr "no se ha especificado ninguna sintaxis" -#: lib/dfa.c:1976 +#: lib/dfa.c:1992 msgid "unbalanced )" msgstr ") desemparejado" @@ -111,7 +119,7 @@ msgid "%s: option requires an argument -- '%c'\n" msgstr "%s: la opción requiere un argumento -- '%c'\n" -#: lib/obstack.c:338 lib/obstack.c:340 lib/xalloc-die.c:34 src/pcresearch.c:291 +#: lib/obstack.c:338 lib/obstack.c:340 lib/xalloc-die.c:34 src/pcresearch.c:313 msgid "memory exhausted" msgstr "memoria agotada" @@ -149,7 +157,7 @@ #. for your locale. #. #. If you don't know what to put here, please see -#. +#. #. and use glyphs suitable for your language. #: lib/quotearg.c:362 msgid "`" @@ -228,16 +236,16 @@ msgid "Unmatched ) or \\)" msgstr ") o \\) desemparejado" -#: lib/regcomp.c:687 +#: lib/regcomp.c:688 msgid "No previous regular expression" msgstr "No hay ninguna expresión regular anterior" -#: lib/version-etc.c:74 +#: lib/version-etc.c:73 #, c-format msgid "Packaged by %s (%s)\n" msgstr "Empaquetado por %s (%s)\n" -#: lib/version-etc.c:77 +#: lib/version-etc.c:76 #, c-format msgid "Packaged by %s\n" msgstr "Empaquetado por %s\n" @@ -245,14 +253,15 @@ #. TRANSLATORS: Translate "(C)" to the copyright symbol #. (C-in-a-circle), if this symbol is available in the user's #. locale. Otherwise, do not translate "(C)"; leave it as-is. -#: lib/version-etc.c:84 +#: lib/version-etc.c:83 msgid "(C)" msgstr "(C)" -#: lib/version-etc.c:86 +#: lib/version-etc.c:85 +#, fuzzy msgid "" "\n" -"License GPLv3+: GNU GPL version 3 or later .\n" "This is free software: you are free to change and redistribute it.\n" "There is NO WARRANTY, to the extent permitted by law.\n" @@ -396,12 +405,13 @@ msgstr "Página inicial de %s: <%s>\n" #: lib/version-etc.c:253 -#, c-format -msgid "%s home page: \n" +#, fuzzy, c-format +msgid "%s home page: \n" msgstr "página inicial de %s: \n" #: lib/version-etc.c:256 -msgid "General help using GNU software: \n" +#, fuzzy +msgid "General help using GNU software: \n" msgstr "" "Ayuda general sobre el uso de software de GNU: \n" @@ -421,65 +431,57 @@ msgid "%s%s argument '%s' too large" msgstr "%s%s argumento '%s' demasiado grande" -#. This is a proper name. See the gettext manual, section Names. -#: src/grep.c:59 -msgid "Mike Haertel" -msgstr "Mike Haertel" - -#: src/grep.c:60 -msgid "others, see " -msgstr "otros, véase " - -#: src/grep.c:585 +#: src/grep.c:582 msgid "(standard input)" msgstr "(entrada estándar)" -#: src/grep.c:765 +#: src/grep.c:762 msgid "invalid context length argument" msgstr "longitud de contexto inválida" -#: src/grep.c:828 +#: src/grep.c:827 msgid "input is too large to count" msgstr "la entrada es demasiado grande para contar" -#: src/grep.c:1579 +#: src/grep.c:1578 #, c-format msgid "Binary file %s matches\n" msgstr "Coincidencia en el fichero binario %s\n" -#: src/grep.c:1627 +#: src/grep.c:1626 #, c-format msgid "warning: %s: %s" msgstr "atención: %s: %s" -#: src/grep.c:1628 +#: src/grep.c:1627 msgid "recursive directory loop" msgstr "bucle de directorio recursivo" -#: src/grep.c:1844 +#: src/grep.c:1843 #, c-format msgid "input file %s is also the output" msgstr "el fichero de entrada %s también es el de salida" -#: src/grep.c:1907 src/grep.c:1914 -#, c-format -msgid "Usage: %s [OPTION]... PATTERN [FILE]...\n" +#: src/grep.c:1906 src/grep.c:1913 +#, fuzzy, c-format +msgid "Usage: %s [OPTION]... PATTERNS [FILE]...\n" msgstr "Modo de empleo: %s [OPCIÓN]... PATRÓN [FICHERO]...\n" -#: src/grep.c:1909 +#: src/grep.c:1908 #, c-format msgid "Try '%s --help' for more information.\n" msgstr "Pruebe '%s --help' para más información.\n" -#: src/grep.c:1915 +#: src/grep.c:1914 #, fuzzy, c-format -msgid "Search for PATTERN in each FILE.\n" +msgid "Search for PATTERNS in each FILE.\n" msgstr "Busca PATRÓN en cada FICHERO o en la entrada estándar.\n" -#: src/grep.c:1916 +#: src/grep.c:1915 #, fuzzy, c-format msgid "" "Example: %s -i 'hello world' menu.h main.c\n" +"PATTERNS can contain multiple patterns separated by newlines.\n" "\n" "Pattern selection and interpretation:\n" msgstr "" @@ -490,10 +492,10 @@ #: src/grep.c:1920 #, fuzzy, c-format msgid "" -" -E, --extended-regexp PATTERN is an extended regular expression\n" -" -F, --fixed-strings PATTERN is a set of newline-separated strings\n" -" -G, --basic-regexp PATTERN is a basic regular expression (default)\n" -" -P, --perl-regexp PATTERN is a Perl regular expression\n" +" -E, --extended-regexp PATTERNS are extended regular expressions\n" +" -F, --fixed-strings PATTERNS are strings\n" +" -G, --basic-regexp PATTERNS are basic regular expressions\n" +" -P, --perl-regexp PATTERNS are Perl regular expressions\n" msgstr "" " -E, --extended-regexp PATRÓN es una expresión regular extendida (ERE)\n" " -F, --fixed-strings PATRÓN es un conjunto de cadenas separadas por\n" @@ -502,13 +504,13 @@ " -P, --perl-regexp PATRÓN es una expresión regular en Perl\n" #: src/grep.c:1926 -#, c-format +#, fuzzy, c-format msgid "" -" -e, --regexp=PATTERN use PATTERN for matching\n" -" -f, --file=FILE obtain PATTERN from FILE\n" +" -e, --regexp=PATTERNS use PATTERNS for matching\n" +" -f, --file=FILE take PATTERNS from FILE\n" " -i, --ignore-case ignore case distinctions\n" -" -w, --word-regexp force PATTERN to match only whole words\n" -" -x, --line-regexp force PATTERN to match only whole lines\n" +" -w, --word-regexp match only whole words\n" +" -x, --line-regexp match only whole lines\n" " -z, --null-data a data line ends in 0 byte, not newline\n" msgstr "" " -e, --regexp=PATRÓN utiliza PATRÓN como expresión regular\n" @@ -569,9 +571,9 @@ " para la entrada estándar\n" #: src/grep.c:1951 -#, c-format +#, fuzzy, c-format msgid "" -" -o, --only-matching show only the part of a line matching PATTERN\n" +" -o, --only-matching show only nonempty parts of lines that match\n" " -q, --quiet, --silent suppress all normal output\n" " --binary-files=TYPE assume that binary files are TYPE;\n" " TYPE is 'binary', 'text', or 'without-match'\n" @@ -605,14 +607,13 @@ "simbólicos\n" #: src/grep.c:1967 -#, c-format +#, fuzzy, c-format msgid "" -" --include=FILE_PATTERN search only files that match FILE_PATTERN\n" -" --exclude=FILE_PATTERN skip files and directories matching " -"FILE_PATTERN\n" +" --include=GLOB search only files that match GLOB (a file " +"pattern)\n" +" --exclude=GLOB skip files and directories matching GLOB\n" " --exclude-from=FILE skip files matching any file pattern from FILE\n" -" --exclude-dir=PATTERN directories that match PATTERN will be " -"skipped.\n" +" --exclude-dir=GLOB skip directories that match GLOB\n" msgstr "" " --include=PATRÓN examina los ficheros que encajan con PATRÓN\n" " --exclude=PATRÓN se salta los ficheros que encajan con PATRÓN\n" @@ -681,7 +682,7 @@ msgid "" "When FILE is '-', read standard input. With no FILE, read '.' if\n" "recursive, '-' otherwise. With fewer than two FILEs, assume -h.\n" -"Exit status is 0 if any line is selected, 1 otherwise;\n" +"Exit status is 0 if any line (or file if -L) is selected, 1 otherwise;\n" "if any error occurs and -q is not given, the exit status is 2.\n" msgstr "" "Cuando FICHERO es -, lee la entrada estándar. Si no se especifica\n" @@ -710,28 +711,35 @@ msgid "invalid matcher %s" msgstr "expresión inválida %s" -#: src/grep.c:2458 +#: src/grep.c:2459 #, c-format msgid "warning: GREP_OPTIONS is deprecated; please use an alias or script" msgstr "" -#: src/grep.c:2485 +#: src/grep.c:2486 msgid "unknown devices method" msgstr "método de dispositivos desconocido" -#: src/grep.c:2629 +#: src/grep.c:2630 msgid "invalid max count" msgstr "contador máximo inválido" -#: src/grep.c:2687 +#: src/grep.c:2688 msgid "unknown binary-files type" msgstr "tipo binary-files desconocido" -#: src/pcresearch.c:80 +#: src/grep.c:2770 +#, fuzzy +msgid "" +"Written by Mike Haertel and others; see\n" +"." +msgstr "otros, véase " + +#: src/pcresearch.c:86 msgid "failed to allocate memory for the PCRE JIT stack" msgstr "fallo al asignar memoria para la pila JIT de PCRE" -#: src/pcresearch.c:97 +#: src/pcresearch.c:118 msgid "" "support for the -P option is not compiled into this --disable-perl-regexp " "binary" @@ -739,39 +747,42 @@ "el soporte para la opción -P no está compilado en este ejecutable --disable-" "perl-regexp" -#: src/pcresearch.c:119 +#: src/pcresearch.c:140 msgid "-P supports only unibyte and UTF-8 locales" msgstr "" -#: src/pcresearch.c:125 +#: src/pcresearch.c:146 msgid "the -P option only supports a single pattern" msgstr "la opción -P solamente admite un patrón" -#: src/pcresearch.c:167 +#: src/pcresearch.c:189 msgid "internal error (should never happen)" msgstr "error interno (no debería ocurrir nunca)" -#: src/pcresearch.c:192 +#: src/pcresearch.c:214 msgid "internal error" msgstr "error interno" -#: src/pcresearch.c:215 +#: src/pcresearch.c:237 msgid "exceeded PCRE's line length limit" msgstr "se ha excedido el límite de longitud de línea de las PCREs" -#: src/pcresearch.c:295 +#: src/pcresearch.c:317 msgid "exhausted PCRE JIT stack" msgstr "" -#: src/pcresearch.c:299 +#: src/pcresearch.c:321 msgid "exceeded PCRE's backtracking limit" msgstr "se ha excedido el límite de vuelta atrás de las PCREs" -#: src/pcresearch.c:306 +#: src/pcresearch.c:328 #, c-format msgid "internal PCRE error: %d" msgstr "error interno de PCRE: %d" +#~ msgid "Mike Haertel" +#~ msgstr "Mike Haertel" + #~ msgid "%s: option '--%s' doesn't allow an argument\n" #~ msgstr "%s: la opción '--%s' no admite ningún argumento\n" Binary files /tmp/tmppJ6Y2n/6jFha9hbxv/grep-3.1/po/et.gmo and /tmp/tmppJ6Y2n/tYMwNxGD36/grep-3.3/po/et.gmo differ diff -Nru grep-3.1/po/et.po grep-3.3/po/et.po --- grep-3.1/po/et.po 2017-07-02 20:21:16.000000000 +0000 +++ grep-3.3/po/et.po 2018-12-21 04:39:02.000000000 +0000 @@ -1,14 +1,14 @@ # This file is distributed under the same license as the grep package. # Estonian translations for grep # Copyright (C) 2000 Free Software Foundation, Inc. -# Toomas Soome , 2017. +# Toomas Soome , 2018. # msgid "" msgstr "" -"Project-Id-Version: grep 3.0.23-b00\n" +"Project-Id-Version: grep 3.1.48\n" "Report-Msgid-Bugs-To: bug-grep@gnu.org\n" -"POT-Creation-Date: 2017-07-02 13:21-0700\n" -"PO-Revision-Date: 2017-06-25 22:44+0300\n" +"POT-Creation-Date: 2018-12-20 20:39-0800\n" +"PO-Revision-Date: 2018-12-16 11:02+0200\n" "Last-Translator: Toomas Soome \n" "Language-Team: Estonian \n" "Language: et\n" @@ -31,43 +31,51 @@ msgid "Valid arguments are:" msgstr "Lubatud argumendid on:" -#: lib/closeout.c:122 src/grep.c:1274 +#: lib/c-stack.c:208 lib/c-stack.c:301 +msgid "program error" +msgstr "programmi viga" + +#: lib/c-stack.c:209 lib/c-stack.c:302 +msgid "stack overflow" +msgstr "pinu ületäitumine" + +#: lib/closeout.c:122 src/grep.c:1273 msgid "write error" msgstr "viga kirjutamisel" -#: lib/dfa.c:958 +#: lib/dfa.c:970 msgid "unbalanced [" msgstr "balanseerimata [" -#: lib/dfa.c:1079 +#: lib/dfa.c:1091 msgid "invalid character class" msgstr "vigane sümboliklass" -#: lib/dfa.c:1205 +#: lib/dfa.c:1217 msgid "character class syntax is [[:space:]], not [:space:]" msgstr "sümbolklassi süntaks on [[:space:]], mitte [:space:]" -#: lib/dfa.c:1272 +#: lib/dfa.c:1284 msgid "unfinished \\ escape" msgstr "lõpetamata \\ paojada" -#: lib/dfa.c:1433 +#: lib/dfa.c:1445 msgid "invalid content of \\{\\}" msgstr "vigane \\{\\} sisu" -#: lib/dfa.c:1436 +#: lib/dfa.c:1448 msgid "regular expression too big" msgstr "regulaaravaldis on liiga suur" -#: lib/dfa.c:1850 +#: lib/dfa.c:1863 msgid "unbalanced (" msgstr "balanseerimata (" -#: lib/dfa.c:1968 +#: lib/dfa.c:1981 msgid "no syntax specified" msgstr "süntaksit pole määratud" -#: lib/dfa.c:1976 +#: lib/dfa.c:1992 msgid "unbalanced )" msgstr "balanseerimata )" @@ -110,7 +118,7 @@ msgid "%s: option requires an argument -- '%c'\n" msgstr "%s: võti nõuab argumenti -- '%c'\n" -#: lib/obstack.c:338 lib/obstack.c:340 lib/xalloc-die.c:34 src/pcresearch.c:291 +#: lib/obstack.c:338 lib/obstack.c:340 lib/xalloc-die.c:34 src/pcresearch.c:313 msgid "memory exhausted" msgstr "mälu on otsas" @@ -148,7 +156,7 @@ #. for your locale. #. #. If you don't know what to put here, please see -#. +#. #. and use glyphs suitable for your language. #: lib/quotearg.c:362 msgid "`" @@ -226,16 +234,16 @@ msgid "Unmatched ) or \\)" msgstr "Puudub ) või \\)" -#: lib/regcomp.c:687 +#: lib/regcomp.c:688 msgid "No previous regular expression" msgstr "Eelnevat regulaaravaldist pole" -#: lib/version-etc.c:74 +#: lib/version-etc.c:73 #, c-format msgid "Packaged by %s (%s)\n" msgstr "Pakendanud %s (%s)\n" -#: lib/version-etc.c:77 +#: lib/version-etc.c:76 #, c-format msgid "Packaged by %s\n" msgstr "Pakendanud %s\n" @@ -243,23 +251,23 @@ #. TRANSLATORS: Translate "(C)" to the copyright symbol #. (C-in-a-circle), if this symbol is available in the user's #. locale. Otherwise, do not translate "(C)"; leave it as-is. -#: lib/version-etc.c:84 +#: lib/version-etc.c:83 msgid "(C)" msgstr "©" -#: lib/version-etc.c:86 +#: lib/version-etc.c:85 msgid "" "\n" -"License GPLv3+: GNU GPL version 3 or later .\n" "This is free software: you are free to change and redistribute it.\n" "There is NO WARRANTY, to the extent permitted by law.\n" "\n" msgstr "" "\n" -"Litsents GPLv3+: GNU GPL versioon 3 või uuem \n" -"See on vaba tarkvara; teil on lubatud seda muuta ja levitada.\n" +"See on vaba tarkvara: teil on lubatud seda muuta ja levitada.\n" "Garantii PUUDUB; vastavalt seadustega lubatud piiridele.\n" #. TRANSLATORS: %s denotes an author name. @@ -395,12 +403,12 @@ #: lib/version-etc.c:253 #, c-format -msgid "%s home page: \n" -msgstr "%s koduleht: \n" +msgid "%s home page: \n" +msgstr "%s koduleht: \n" #: lib/version-etc.c:256 -msgid "General help using GNU software: \n" -msgstr "Üldine abiinfo GNU tarkvara kohta: \n" +msgid "General help using GNU software: \n" +msgstr "Üldine abiinfo GNU tarkvara kohta: \n" #: lib/xstrtol-error.c:63 #, c-format @@ -417,97 +425,92 @@ msgid "%s%s argument '%s' too large" msgstr "%s%s argument '%s' on liiga suur" -#. This is a proper name. See the gettext manual, section Names. -#: src/grep.c:59 -msgid "Mike Haertel" -msgstr "Mike Haertel" - -#: src/grep.c:60 -msgid "others, see " -msgstr "teised, vaata " - -#: src/grep.c:585 +#: src/grep.c:582 msgid "(standard input)" msgstr "(standardsisend)" -#: src/grep.c:765 +#: src/grep.c:762 msgid "invalid context length argument" msgstr "vigane konteksti pikkuse argument" -#: src/grep.c:828 +#: src/grep.c:827 msgid "input is too large to count" msgstr "sisend on loendamiseks liiga suur" -#: src/grep.c:1579 +#: src/grep.c:1578 #, c-format msgid "Binary file %s matches\n" msgstr "Kahendfail %s sobib\n" -#: src/grep.c:1627 +#: src/grep.c:1626 #, c-format msgid "warning: %s: %s" msgstr "hoiatus: %s: %s" -#: src/grep.c:1628 +#: src/grep.c:1627 msgid "recursive directory loop" msgstr "rekursiivne kataloogipuu tsükkel" -#: src/grep.c:1844 +#: src/grep.c:1843 #, c-format msgid "input file %s is also the output" msgstr "sisendfail %s on samuti väljund" -#: src/grep.c:1907 src/grep.c:1914 +#: src/grep.c:1906 src/grep.c:1913 #, c-format -msgid "Usage: %s [OPTION]... PATTERN [FILE]...\n" -msgstr "Kasuta: %s [VÕTI]... MUSTER [FAIL] ...\n" +msgid "Usage: %s [OPTION]... PATTERNS [FILE]...\n" +msgstr "Kasutamine: %s [VÕTI]... MUSTRID [FAIL] ...\n" -#: src/grep.c:1909 +#: src/grep.c:1908 #, c-format msgid "Try '%s --help' for more information.\n" msgstr "Lisainfo saamiseks proovige võtit '%s --help'.\n" -#: src/grep.c:1915 +#: src/grep.c:1914 #, c-format -msgid "Search for PATTERN in each FILE.\n" -msgstr "Otsi MUSTRIT igast FAIList.\n" +msgid "Search for PATTERNS in each FILE.\n" +msgstr "Otsi MUSTREID igast FAIList.\n" -#: src/grep.c:1916 +#: src/grep.c:1915 #, c-format msgid "" "Example: %s -i 'hello world' menu.h main.c\n" +"PATTERNS can contain multiple patterns separated by newlines.\n" "\n" "Pattern selection and interpretation:\n" msgstr "" "Näiteks: %s -i 'tere kõik' menu.h main.c\n" +"MUSTRID võivad sisaldada mitut reavahetusega eraldatud mustrit.\n" "\n" "Mustri valik ja interpreteerimine:\n" #: src/grep.c:1920 #, c-format msgid "" -" -E, --extended-regexp PATTERN is an extended regular expression\n" -" -F, --fixed-strings PATTERN is a set of newline-separated strings\n" -" -G, --basic-regexp PATTERN is a basic regular expression (default)\n" -" -P, --perl-regexp PATTERN is a Perl regular expression\n" -msgstr "" -" -E, --extended-regexp MUSTER on laiendatud regulaaravaldis\n" -" -F, --fixed-strings MUSTER on hulk reavahetustega eraldatud sõnesid\n" -" -G, --basic-regexp MUSTER on lihtne regulaaravaldis (vaikimisi)\n" -" -P, --perl-regexp MUSTER on Perl regulaaravaldis\n" +" -E, --extended-regexp PATTERNS are extended regular expressions\n" +" -F, --fixed-strings PATTERNS are strings\n" +" -G, --basic-regexp PATTERNS are basic regular expressions\n" +" -P, --perl-regexp PATTERNS are Perl regular expressions\n" +msgstr "" +" -E, --extended-regexp MUSTRID on laiendatud regulaaravaldised\n" +" -F, --fixed-strings MUSTRID on hulk reavahetustega eraldatud " +"sõnesid\n" +" -G, --basic-regexp MUSTRID on lihtsad regulaaravaldised " +"(vaikimisi)\n" +" -P, --perl-regexp MUSTRID on Perl regulaaravaldised\n" #: src/grep.c:1926 #, c-format msgid "" -" -e, --regexp=PATTERN use PATTERN for matching\n" -" -f, --file=FILE obtain PATTERN from FILE\n" +" -e, --regexp=PATTERNS use PATTERNS for matching\n" +" -f, --file=FILE take PATTERNS from FILE\n" " -i, --ignore-case ignore case distinctions\n" -" -w, --word-regexp force PATTERN to match only whole words\n" -" -x, --line-regexp force PATTERN to match only whole lines\n" +" -w, --word-regexp match only whole words\n" +" -x, --line-regexp match only whole lines\n" " -z, --null-data a data line ends in 0 byte, not newline\n" msgstr "" -" -e, --regexp=MUSTER kasuta regulaaravaldisena\n" -" -f, --file=FAIL loe MUSTER failist FAIL\n" +" -e, --regexp=MUSTER kasuta regulaaravaldistena\n" +" -f, --file=FAIL loe MUSTRID failist FAIL\n" " -i, --ignore-case ignoreeri suur- ja väiketähtede erinevusi\n" " -w, --word-regexp kasuta MUSTRIT sõnade leidmiseks\n" " -x, --line-regexp kasuta MUSTRIT ridade leidmiseks\n" @@ -558,13 +561,13 @@ #: src/grep.c:1951 #, c-format msgid "" -" -o, --only-matching show only the part of a line matching PATTERN\n" +" -o, --only-matching show only nonempty parts of lines that match\n" " -q, --quiet, --silent suppress all normal output\n" " --binary-files=TYPE assume that binary files are TYPE;\n" " TYPE is 'binary', 'text', or 'without-match'\n" " -a, --text equivalent to --binary-files=text\n" msgstr "" -" -o, --only-matching näita ainult mustriga sobivat reaosa\n" +" -o, --only-matching näita ainult mustriga sobivat mittetühja reaosa\n" " -q, --quiet, --silent blokeeri kogu tavaline väljund\n" " --binary-files=TÜÜP eelda binaarfailide tüüpi;\n" " TÜÜP on 'binary', 'text', või 'without-match'\n" @@ -593,12 +596,11 @@ #: src/grep.c:1967 #, c-format msgid "" -" --include=FILE_PATTERN search only files that match FILE_PATTERN\n" -" --exclude=FILE_PATTERN skip files and directories matching " -"FILE_PATTERN\n" +" --include=GLOB search only files that match GLOB (a file " +"pattern)\n" +" --exclude=GLOB skip files and directories matching GLOB\n" " --exclude-from=FILE skip files matching any file pattern from FILE\n" -" --exclude-dir=PATTERN directories that match PATTERN will be " -"skipped.\n" +" --exclude-dir=GLOB skip directories that match GLOB\n" msgstr "" " --include=FAILI_MUSTER otsi alinult mustrile vastavaid faile\n" " --exclude=FAILI_MUSTER välista mustrile vastavad failid ja " @@ -663,13 +665,13 @@ msgid "" "When FILE is '-', read standard input. With no FILE, read '.' if\n" "recursive, '-' otherwise. With fewer than two FILEs, assume -h.\n" -"Exit status is 0 if any line is selected, 1 otherwise;\n" +"Exit status is 0 if any line (or file if -L) is selected, 1 otherwise;\n" "if any error occurs and -q is not given, the exit status is 2.\n" msgstr "" "Kui fail on '-', loe standardsisendit. Kui faili ei antud ja kasutati võtit -" "r,\n" "loe '.', muidu '-'. Kui anti vähem kui kaks faili, eelda -h. \n" -"Lõpetamise kood on 0, kui rida leiti, muidu 1;\n" +"Lõpetamise kood on 0, kui rida (või fail võtmega -L) leiti, muidu 1;\n" "kui tekkis viga ja -q ei kasutatud, on lõpetamise kood 2.\n" #: src/grep.c:2034 @@ -681,63 +683,73 @@ msgid "invalid matcher %s" msgstr "vigane sobitaja %s" -#: src/grep.c:2458 +#: src/grep.c:2459 #, c-format msgid "warning: GREP_OPTIONS is deprecated; please use an alias or script" msgstr "hoiatus: GREP_OPTIONS pole soovitatav; kasutage palun alias või script" -#: src/grep.c:2485 +#: src/grep.c:2486 msgid "unknown devices method" msgstr "tundmatu seadmete meetod" -#: src/grep.c:2629 +#: src/grep.c:2630 msgid "invalid max count" msgstr "vigane maksimum" -#: src/grep.c:2687 +#: src/grep.c:2688 msgid "unknown binary-files type" msgstr "tundmatu kahendfailide tüüp" -#: src/pcresearch.c:80 +#: src/grep.c:2770 +#, fuzzy +msgid "" +"Written by Mike Haertel and others; see\n" +"." +msgstr "teised, vaata " + +#: src/pcresearch.c:86 msgid "failed to allocate memory for the PCRE JIT stack" msgstr "PCRE JIT magasini jaoks ei jätku mälu" -#: src/pcresearch.c:97 +#: src/pcresearch.c:118 msgid "" "support for the -P option is not compiled into this --disable-perl-regexp " "binary" msgstr "" "võtme -P tuge ei ole kompileeritud sellesse --disable-perl-regexp koodi" -#: src/pcresearch.c:119 +#: src/pcresearch.c:140 msgid "-P supports only unibyte and UTF-8 locales" msgstr "-P toetab ainult ühebaidilisi ja UTF-8 lokaate" -#: src/pcresearch.c:125 +#: src/pcresearch.c:146 msgid "the -P option only supports a single pattern" msgstr "võti -P toetab ainult ühte mustrit" -#: src/pcresearch.c:167 +#: src/pcresearch.c:189 msgid "internal error (should never happen)" msgstr "sisemine viga (ei peaks kunagi juhtuma)" -#: src/pcresearch.c:192 +#: src/pcresearch.c:214 msgid "internal error" msgstr "sisemine viga" -#: src/pcresearch.c:215 +#: src/pcresearch.c:237 msgid "exceeded PCRE's line length limit" msgstr "PCRE rea pikkuse piirang on ületatud" -#: src/pcresearch.c:295 +#: src/pcresearch.c:317 msgid "exhausted PCRE JIT stack" msgstr "PCRE JIT pinu sai täis" -#: src/pcresearch.c:299 +#: src/pcresearch.c:321 msgid "exceeded PCRE's backtracking limit" msgstr "PCRE tagasivaate piirang on ületatud" -#: src/pcresearch.c:306 +#: src/pcresearch.c:328 #, c-format msgid "internal PCRE error: %d" msgstr "sisemine PCRE viga: %d" + +#~ msgid "Mike Haertel" +#~ msgstr "Mike Haertel" Binary files /tmp/tmppJ6Y2n/6jFha9hbxv/grep-3.1/po/eu.gmo and /tmp/tmppJ6Y2n/tYMwNxGD36/grep-3.3/po/eu.gmo differ diff -Nru grep-3.1/po/eu.po grep-3.3/po/eu.po --- grep-3.1/po/eu.po 2017-07-02 20:21:16.000000000 +0000 +++ grep-3.3/po/eu.po 2018-12-21 04:39:02.000000000 +0000 @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: grep 2.5.1a\n" "Report-Msgid-Bugs-To: bug-grep@gnu.org\n" -"POT-Creation-Date: 2017-07-02 13:21-0700\n" +"POT-Creation-Date: 2018-12-20 20:39-0800\n" "PO-Revision-Date: 2005-03-03 21:40+0100\n" "Last-Translator: Mikel Olasagasti \n" "Language-Team: Basque \n" @@ -33,48 +33,56 @@ msgid "Valid arguments are:" msgstr "" -#: lib/closeout.c:122 src/grep.c:1274 +#: lib/c-stack.c:208 lib/c-stack.c:301 +msgid "program error" +msgstr "" + +#: lib/c-stack.c:209 lib/c-stack.c:302 +msgid "stack overflow" +msgstr "" + +#: lib/closeout.c:122 src/grep.c:1273 msgid "write error" msgstr "" -#: lib/dfa.c:958 +#: lib/dfa.c:970 #, fuzzy msgid "unbalanced [" msgstr "Parekatu gabeko [" -#: lib/dfa.c:1079 +#: lib/dfa.c:1091 msgid "invalid character class" msgstr "" -#: lib/dfa.c:1205 +#: lib/dfa.c:1217 msgid "character class syntax is [[:space:]], not [:space:]" msgstr "" -#: lib/dfa.c:1272 +#: lib/dfa.c:1284 #, fuzzy msgid "unfinished \\ escape" msgstr "Amaitu gabeko \\ eskapea" -#: lib/dfa.c:1433 +#: lib/dfa.c:1445 #, fuzzy msgid "invalid content of \\{\\}" msgstr "baliogabeko gehienezko zenbaketa" -#: lib/dfa.c:1436 +#: lib/dfa.c:1448 msgid "regular expression too big" msgstr "" -#: lib/dfa.c:1850 +#: lib/dfa.c:1863 #, fuzzy msgid "unbalanced (" msgstr "Parekatu gabeko (" -#: lib/dfa.c:1968 +#: lib/dfa.c:1981 #, fuzzy msgid "no syntax specified" msgstr "Ez da sintaxirik zehaztu" -#: lib/dfa.c:1976 +#: lib/dfa.c:1992 #, fuzzy msgid "unbalanced )" msgstr "Parekatu gabeko )" @@ -118,7 +126,7 @@ msgid "%s: option requires an argument -- '%c'\n" msgstr "%s: aukerak argumentu bat behar du -- %c\n" -#: lib/obstack.c:338 lib/obstack.c:340 lib/xalloc-die.c:34 src/pcresearch.c:291 +#: lib/obstack.c:338 lib/obstack.c:340 lib/xalloc-die.c:34 src/pcresearch.c:313 msgid "memory exhausted" msgstr "memoria agortuta" @@ -156,7 +164,7 @@ #. for your locale. #. #. If you don't know what to put here, please see -#. +#. #. and use glyphs suitable for your language. #: lib/quotearg.c:362 msgid "`" @@ -234,16 +242,16 @@ msgid "Unmatched ) or \\)" msgstr "" -#: lib/regcomp.c:687 +#: lib/regcomp.c:688 msgid "No previous regular expression" msgstr "" -#: lib/version-etc.c:74 +#: lib/version-etc.c:73 #, c-format msgid "Packaged by %s (%s)\n" msgstr "" -#: lib/version-etc.c:77 +#: lib/version-etc.c:76 #, c-format msgid "Packaged by %s\n" msgstr "" @@ -251,14 +259,14 @@ #. TRANSLATORS: Translate "(C)" to the copyright symbol #. (C-in-a-circle), if this symbol is available in the user's #. locale. Otherwise, do not translate "(C)"; leave it as-is. -#: lib/version-etc.c:84 +#: lib/version-etc.c:83 msgid "(C)" msgstr "" -#: lib/version-etc.c:86 +#: lib/version-etc.c:85 msgid "" "\n" -"License GPLv3+: GNU GPL version 3 or later .\n" "This is free software: you are free to change and redistribute it.\n" "There is NO WARRANTY, to the extent permitted by law.\n" @@ -381,11 +389,11 @@ #: lib/version-etc.c:253 #, c-format -msgid "%s home page: \n" +msgid "%s home page: \n" msgstr "" #: lib/version-etc.c:256 -msgid "General help using GNU software: \n" +msgid "General help using GNU software: \n" msgstr "" #: lib/xstrtol-error.c:63 @@ -403,65 +411,57 @@ msgid "%s%s argument '%s' too large" msgstr "" -#. This is a proper name. See the gettext manual, section Names. -#: src/grep.c:59 -msgid "Mike Haertel" -msgstr "" - -#: src/grep.c:60 -msgid "others, see " -msgstr "" - -#: src/grep.c:585 +#: src/grep.c:582 msgid "(standard input)" msgstr "(sarrera estandarra)" -#: src/grep.c:765 +#: src/grep.c:762 msgid "invalid context length argument" msgstr "balio gabeko testuinguru luzeera argumentua" -#: src/grep.c:828 +#: src/grep.c:827 msgid "input is too large to count" msgstr "sarrera luzeegia da kontatzeko" -#: src/grep.c:1579 +#: src/grep.c:1578 #, c-format msgid "Binary file %s matches\n" msgstr "%s fitxategi binarioa bat dator\n" -#: src/grep.c:1627 +#: src/grep.c:1626 #, fuzzy, c-format msgid "warning: %s: %s" msgstr "abisua: %s: %s\n" -#: src/grep.c:1628 +#: src/grep.c:1627 msgid "recursive directory loop" msgstr "direktorio bukle errekurtsiboa" -#: src/grep.c:1844 +#: src/grep.c:1843 #, c-format msgid "input file %s is also the output" msgstr "" -#: src/grep.c:1907 src/grep.c:1914 -#, c-format -msgid "Usage: %s [OPTION]... PATTERN [FILE]...\n" +#: src/grep.c:1906 src/grep.c:1913 +#, fuzzy, c-format +msgid "Usage: %s [OPTION]... PATTERNS [FILE]...\n" msgstr "Erabilera: %s [AUKERA]... EREDUA [FITXATEGIA]...\n" -#: src/grep.c:1909 +#: src/grep.c:1908 #, fuzzy, c-format msgid "Try '%s --help' for more information.\n" msgstr "Saiatu `%s --help' informazio gehiagorako.\n" -#: src/grep.c:1915 +#: src/grep.c:1914 #, c-format -msgid "Search for PATTERN in each FILE.\n" +msgid "Search for PATTERNS in each FILE.\n" msgstr "" -#: src/grep.c:1916 +#: src/grep.c:1915 #, fuzzy, c-format msgid "" "Example: %s -i 'hello world' menu.h main.c\n" +"PATTERNS can contain multiple patterns separated by newlines.\n" "\n" "Pattern selection and interpretation:\n" msgstr "" @@ -473,10 +473,10 @@ #: src/grep.c:1920 #, fuzzy, c-format msgid "" -" -E, --extended-regexp PATTERN is an extended regular expression\n" -" -F, --fixed-strings PATTERN is a set of newline-separated strings\n" -" -G, --basic-regexp PATTERN is a basic regular expression (default)\n" -" -P, --perl-regexp PATTERN is a Perl regular expression\n" +" -E, --extended-regexp PATTERNS are extended regular expressions\n" +" -F, --fixed-strings PATTERNS are strings\n" +" -G, --basic-regexp PATTERNS are basic regular expressions\n" +" -P, --perl-regexp PATTERNS are Perl regular expressions\n" msgstr "" " -E, --extended-regexp EREDUA espresio erregular zabaldu bat da\n" " -F, --fixed-strings EREDUA lerro berri batekin banatutako kate " @@ -487,11 +487,11 @@ #: src/grep.c:1926 #, fuzzy, c-format msgid "" -" -e, --regexp=PATTERN use PATTERN for matching\n" -" -f, --file=FILE obtain PATTERN from FILE\n" +" -e, --regexp=PATTERNS use PATTERNS for matching\n" +" -f, --file=FILE take PATTERNS from FILE\n" " -i, --ignore-case ignore case distinctions\n" -" -w, --word-regexp force PATTERN to match only whole words\n" -" -x, --line-regexp force PATTERN to match only whole lines\n" +" -w, --word-regexp match only whole words\n" +" -x, --line-regexp match only whole lines\n" " -z, --null-data a data line ends in 0 byte, not newline\n" msgstr "" " -e, --regexp=EREDUA erabili EREDUA espresio erregular bezala\n" @@ -541,7 +541,7 @@ #: src/grep.c:1951 #, c-format msgid "" -" -o, --only-matching show only the part of a line matching PATTERN\n" +" -o, --only-matching show only nonempty parts of lines that match\n" " -q, --quiet, --silent suppress all normal output\n" " --binary-files=TYPE assume that binary files are TYPE;\n" " TYPE is 'binary', 'text', or 'without-match'\n" @@ -563,12 +563,11 @@ #: src/grep.c:1967 #, c-format msgid "" -" --include=FILE_PATTERN search only files that match FILE_PATTERN\n" -" --exclude=FILE_PATTERN skip files and directories matching " -"FILE_PATTERN\n" +" --include=GLOB search only files that match GLOB (a file " +"pattern)\n" +" --exclude=GLOB skip files and directories matching GLOB\n" " --exclude-from=FILE skip files matching any file pattern from FILE\n" -" --exclude-dir=PATTERN directories that match PATTERN will be " -"skipped.\n" +" --exclude-dir=GLOB skip directories that match GLOB\n" msgstr "" #: src/grep.c:1974 @@ -630,7 +629,7 @@ msgid "" "When FILE is '-', read standard input. With no FILE, read '.' if\n" "recursive, '-' otherwise. With fewer than two FILEs, assume -h.\n" -"Exit status is 0 if any line is selected, 1 otherwise;\n" +"Exit status is 0 if any line (or file if -L) is selected, 1 otherwise;\n" "if any error occurs and -q is not given, the exit status is 2.\n" msgstr "" @@ -643,63 +642,69 @@ msgid "invalid matcher %s" msgstr "baliogabeko gehienezko zenbaketa" -#: src/grep.c:2458 +#: src/grep.c:2459 #, c-format msgid "warning: GREP_OPTIONS is deprecated; please use an alias or script" msgstr "" -#: src/grep.c:2485 +#: src/grep.c:2486 msgid "unknown devices method" msgstr "gailu metodo ezezaguna" -#: src/grep.c:2629 +#: src/grep.c:2630 msgid "invalid max count" msgstr "baliogabeko gehienezko zenbaketa" -#: src/grep.c:2687 +#: src/grep.c:2688 msgid "unknown binary-files type" msgstr "fitxategi-binario moeta ezezaguna" -#: src/pcresearch.c:80 +#: src/grep.c:2770 +msgid "" +"Written by Mike Haertel and others; see\n" +"." +msgstr "" + +#: src/pcresearch.c:86 msgid "failed to allocate memory for the PCRE JIT stack" msgstr "" -#: src/pcresearch.c:97 +#: src/pcresearch.c:118 msgid "" "support for the -P option is not compiled into this --disable-perl-regexp " "binary" msgstr "" -#: src/pcresearch.c:119 +#: src/pcresearch.c:140 msgid "-P supports only unibyte and UTF-8 locales" msgstr "" -#: src/pcresearch.c:125 +#: src/pcresearch.c:146 #, fuzzy msgid "the -P option only supports a single pattern" msgstr "-P aukerak ez du euskarririk" -#: src/pcresearch.c:167 +#: src/pcresearch.c:189 msgid "internal error (should never happen)" msgstr "" -#: src/pcresearch.c:192 +#: src/pcresearch.c:214 msgid "internal error" msgstr "" -#: src/pcresearch.c:215 +#: src/pcresearch.c:237 msgid "exceeded PCRE's line length limit" msgstr "" -#: src/pcresearch.c:295 +#: src/pcresearch.c:317 msgid "exhausted PCRE JIT stack" msgstr "" -#: src/pcresearch.c:299 +#: src/pcresearch.c:321 msgid "exceeded PCRE's backtracking limit" msgstr "" -#: src/pcresearch.c:306 +#: src/pcresearch.c:328 #, c-format msgid "internal PCRE error: %d" msgstr "" Binary files /tmp/tmppJ6Y2n/6jFha9hbxv/grep-3.1/po/fi.gmo and /tmp/tmppJ6Y2n/tYMwNxGD36/grep-3.3/po/fi.gmo differ diff -Nru grep-3.1/po/fi.po grep-3.3/po/fi.po --- grep-3.1/po/fi.po 2017-07-02 20:21:16.000000000 +0000 +++ grep-3.3/po/fi.po 2018-12-21 04:39:02.000000000 +0000 @@ -1,15 +1,15 @@ # Finnish translation for GNU grep. -# Copyright © 2002, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016 Free Software Foundation, Inc. +# Copyright © 2002, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2018 Free Software Foundation, Inc. # This file is distributed under the same license as the grep package. # Sami J. Laine , 2002. -# Jorma Karvonen , 2007-2016. +# Jorma Karvonen , 2007-2016, 2018. # msgid "" msgstr "" -"Project-Id-Version: grep 2.26.37\n" +"Project-Id-Version: grep 3.0.23-b00\n" "Report-Msgid-Bugs-To: bug-grep@gnu.org\n" -"POT-Creation-Date: 2017-07-02 13:21-0700\n" -"PO-Revision-Date: 2016-12-16 18:24+0200\n" +"POT-Creation-Date: 2018-12-20 20:39-0800\n" +"PO-Revision-Date: 2018-07-02 13:28+0300\n" "Last-Translator: Jorma Karvonen \n" "Language-Team: Finnish \n" "Language: fi\n" @@ -34,43 +34,51 @@ msgid "Valid arguments are:" msgstr "Kelvollisia argumentteja ovat:" -#: lib/closeout.c:122 src/grep.c:1274 +#: lib/c-stack.c:208 lib/c-stack.c:301 +msgid "program error" +msgstr "" + +#: lib/c-stack.c:209 lib/c-stack.c:302 +msgid "stack overflow" +msgstr "" + +#: lib/closeout.c:122 src/grep.c:1273 msgid "write error" msgstr "kirjoitusvirhe" -#: lib/dfa.c:958 +#: lib/dfa.c:970 msgid "unbalanced [" msgstr "pariton [" -#: lib/dfa.c:1079 +#: lib/dfa.c:1091 msgid "invalid character class" msgstr "virheellinen merkkiluokkanimi" -#: lib/dfa.c:1205 +#: lib/dfa.c:1217 msgid "character class syntax is [[:space:]], not [:space:]" msgstr "merkkiluokkasyntaksi on [[:välilyönti:]], ei [:välilyönti:]" -#: lib/dfa.c:1272 +#: lib/dfa.c:1284 msgid "unfinished \\ escape" msgstr "päättymätön \\-ohjausmerkki" -#: lib/dfa.c:1433 +#: lib/dfa.c:1445 msgid "invalid content of \\{\\}" msgstr "virheellinen kohteen \\{\\} sisältö" -#: lib/dfa.c:1436 +#: lib/dfa.c:1448 msgid "regular expression too big" msgstr "säännöllinen lauseke on liian suuri" -#: lib/dfa.c:1850 +#: lib/dfa.c:1863 msgid "unbalanced (" msgstr "pariton (" -#: lib/dfa.c:1968 +#: lib/dfa.c:1981 msgid "no syntax specified" msgstr "syntaksia ei ole määritelty" -#: lib/dfa.c:1976 +#: lib/dfa.c:1992 msgid "unbalanced )" msgstr "pariton )" @@ -79,29 +87,29 @@ msgstr "Tuntematon järjestelmävirhe" #: lib/getopt.c:278 -#, fuzzy, c-format +#, c-format msgid "%s: option '%s%s' is ambiguous\n" -msgstr "%s: valitsin ’%s’ ei ole yksiselitteinen\n" +msgstr "%s: valitsin ’%s%s’ ei ole yksiselitteinen\n" #: lib/getopt.c:284 -#, fuzzy, c-format +#, c-format msgid "%s: option '%s%s' is ambiguous; possibilities:" -msgstr "%s: valitsin ’%s’ ei ole yksiselitteinen; mahdollisuudet:" +msgstr "%s: valitsin ’%s%s’ ei ole yksiselitteinen; mahdollisuudet:" #: lib/getopt.c:319 -#, fuzzy, c-format +#, c-format msgid "%s: unrecognized option '%s%s'\n" -msgstr "%s: tuntematon valitsin ’%c%s’\n" +msgstr "%s: tuntematon valitsin ’%s%s’\n" #: lib/getopt.c:345 -#, fuzzy, c-format +#, c-format msgid "%s: option '%s%s' doesn't allow an argument\n" -msgstr "%s: valitsin ’%c%s’ ei salli argumenttia\n" +msgstr "%s: valitsin ’%s%s’ ei salli argumenttia\n" #: lib/getopt.c:360 -#, fuzzy, c-format +#, c-format msgid "%s: option '%s%s' requires an argument\n" -msgstr "%s: valitsin ’--%s’ tarvitsee argumentin\n" +msgstr "%s: valitsin ’%s%s’ tarvitsee argumentin\n" #: lib/getopt.c:621 #, c-format @@ -113,24 +121,25 @@ msgid "%s: option requires an argument -- '%c'\n" msgstr "%s: valitsin tarvitsee argumentin -- ’%c’\n" -#: lib/obstack.c:338 lib/obstack.c:340 lib/xalloc-die.c:34 src/pcresearch.c:291 +#: lib/obstack.c:338 lib/obstack.c:340 lib/xalloc-die.c:34 src/pcresearch.c:313 msgid "memory exhausted" msgstr "muisti loppui" #: lib/openat-die.c:38 #, c-format msgid "unable to record current working directory" -msgstr "ei kyetä dokumentoimaan nykyistä työskentelyhakemistoa" +msgstr "nykyisen työhakemiston dokumentointi epäonnistui" #: lib/openat-die.c:57 #, c-format msgid "failed to return to initial working directory" -msgstr "alustavan työhakemiston palattaminen epäonnistui" +msgstr "palaaminen alustavaan työhakemistoon epäonnistui" #: lib/xbinary-io.c:37 #, c-format msgid "failed to set file descriptor text/binary mode" msgstr "" +"tiedostokuvaajatekstin/tiedostokuvajaajabinaaritilan asettaminen epäonnistui" #. TRANSLATORS: #. Get translations for open and closing quotation marks. @@ -151,7 +160,7 @@ #. for your locale. #. #. If you don't know what to put here, please see -#. +#. #. and use glyphs suitable for your language. #: lib/quotearg.c:362 msgid "`" @@ -229,16 +238,16 @@ msgid "Unmatched ) or \\)" msgstr "Pariton ) tai \\)" -#: lib/regcomp.c:687 +#: lib/regcomp.c:688 msgid "No previous regular expression" msgstr "Ei edeltävää säännöllistä lauseketta" -#: lib/version-etc.c:74 +#: lib/version-etc.c:73 #, c-format msgid "Packaged by %s (%s)\n" msgstr "Pakkaaja: %s (%s)\n" -#: lib/version-etc.c:77 +#: lib/version-etc.c:76 #, c-format msgid "Packaged by %s\n" msgstr "Pakkaaja: %s\n" @@ -246,14 +255,15 @@ #. TRANSLATORS: Translate "(C)" to the copyright symbol #. (C-in-a-circle), if this symbol is available in the user's #. locale. Otherwise, do not translate "(C)"; leave it as-is. -#: lib/version-etc.c:84 +#: lib/version-etc.c:83 msgid "(C)" msgstr "©" -#: lib/version-etc.c:86 +#: lib/version-etc.c:85 +#, fuzzy msgid "" "\n" -"License GPLv3+: GNU GPL version 3 or later .\n" "This is free software: you are free to change and redistribute it.\n" "There is NO WARRANTY, to the extent permitted by law.\n" @@ -402,12 +412,13 @@ msgstr "%s kotisivu: <%s>\n" #: lib/version-etc.c:253 -#, c-format -msgid "%s home page: \n" +#, fuzzy, c-format +msgid "%s home page: \n" msgstr "%s kotisivu: \n" #: lib/version-etc.c:256 -msgid "General help using GNU software: \n" +#, fuzzy +msgid "General help using GNU software: \n" msgstr "" "Yleinen opaste GNU-ohjelmiston käyttöön: \n" @@ -429,96 +440,88 @@ msgid "%s%s argument '%s' too large" msgstr "valitsimen %s%s argumentti ’%s’ on liian iso" -#. This is a proper name. See the gettext manual, section Names. -#: src/grep.c:59 -msgid "Mike Haertel" -msgstr "Mike Haertel" - -#: src/grep.c:60 -msgid "others, see " -msgstr "muut, katso " - -#: src/grep.c:585 +#: src/grep.c:582 msgid "(standard input)" msgstr "(vakiosyöte)" -#: src/grep.c:765 +#: src/grep.c:762 msgid "invalid context length argument" msgstr "virheellinen kontekstin pituusargumentti" -#: src/grep.c:828 +#: src/grep.c:827 msgid "input is too large to count" msgstr "syöte on liian suuri laskettavaksi" -#: src/grep.c:1579 +#: src/grep.c:1578 #, c-format msgid "Binary file %s matches\n" -msgstr "Binääritiedosto %s täsmää hakuun\n" +msgstr "Binaaritiedosto %s täsmää hakuun\n" -#: src/grep.c:1627 +#: src/grep.c:1626 #, c-format msgid "warning: %s: %s" msgstr "varoitus: %s: %s" -#: src/grep.c:1628 +#: src/grep.c:1627 msgid "recursive directory loop" msgstr "rekursiivinen hakemistosilmukka" -#: src/grep.c:1844 +#: src/grep.c:1843 #, c-format msgid "input file %s is also the output" msgstr "syötetiedosto %s on myös tuloste" -#: src/grep.c:1907 src/grep.c:1914 -#, c-format -msgid "Usage: %s [OPTION]... PATTERN [FILE]...\n" +#: src/grep.c:1906 src/grep.c:1913 +#, fuzzy, c-format +msgid "Usage: %s [OPTION]... PATTERNS [FILE]...\n" msgstr "Käyttö: %s [VALITSIN]... HAKULAUSEKE [TIEDOSTO]...\n" -#: src/grep.c:1909 +#: src/grep.c:1908 #, c-format msgid "Try '%s --help' for more information.\n" msgstr "Katso lisäohjeet valitsimella ’%s --help’.\n" -#: src/grep.c:1915 +#: src/grep.c:1914 #, fuzzy, c-format -msgid "Search for PATTERN in each FILE.\n" -msgstr "Haetaan HAKULAUSEKEtta jokaisessa TIEDOSTOssa tai vakiosyötteessä.\n" +msgid "Search for PATTERNS in each FILE.\n" +msgstr "Haetaan HAKULAUSEKEtta jokaisessa TIEDOSTOssa.\n" -#: src/grep.c:1916 +#: src/grep.c:1915 #, fuzzy, c-format msgid "" "Example: %s -i 'hello world' menu.h main.c\n" +"PATTERNS can contain multiple patterns separated by newlines.\n" "\n" "Pattern selection and interpretation:\n" msgstr "" "Esimerkki: %s -i 'hei maailma' menu.h main.c\n" "\n" -"Säännöllisten lausekkeiden valinta ja tulkinta:\n" +"Hakulausekkeiden valinta ja tulkinta:\n" #: src/grep.c:1920 #, fuzzy, c-format msgid "" -" -E, --extended-regexp PATTERN is an extended regular expression\n" -" -F, --fixed-strings PATTERN is a set of newline-separated strings\n" -" -G, --basic-regexp PATTERN is a basic regular expression (default)\n" -" -P, --perl-regexp PATTERN is a Perl regular expression\n" -msgstr "" -" -E, --extended-regexp HAKULAUSEKE on laajennettu säännöllinen lauseke " -"(ERE)\n" -" -F, --fixed-strings HAKULAUSEKE on joukko rivinvaihdolla eroteltuja " +" -E, --extended-regexp PATTERNS are extended regular expressions\n" +" -F, --fixed-strings PATTERNS are strings\n" +" -G, --basic-regexp PATTERNS are basic regular expressions\n" +" -P, --perl-regexp PATTERNS are Perl regular expressions\n" +msgstr "" +" -E, --extended-regexp HAKULAUSEKE on laajennettu säännöllinen lauseke\n" +" -F, --fixed-strings HAKULAUSEKE on joukko rivinvaihdolla eroteltuja " "merkkijonoja\n" -" -G, --basic-regexp HAKULAUSEKE on perussäännöllinen lauseke (BRE)\n" +" -G, --basic-regexp HAKULAUSEKE on perussäännöllinen lauseke " +"(oletus)\n" " -P, --perl-regexp HAKULAUSEKE on Perl-tyyppinen säännöllinen " "lauseke\n" #: src/grep.c:1926 -#, c-format +#, fuzzy, c-format msgid "" -" -e, --regexp=PATTERN use PATTERN for matching\n" -" -f, --file=FILE obtain PATTERN from FILE\n" +" -e, --regexp=PATTERNS use PATTERNS for matching\n" +" -f, --file=FILE take PATTERNS from FILE\n" " -i, --ignore-case ignore case distinctions\n" -" -w, --word-regexp force PATTERN to match only whole words\n" -" -x, --line-regexp force PATTERN to match only whole lines\n" +" -w, --word-regexp match only whole words\n" +" -x, --line-regexp match only whole lines\n" " -z, --null-data a data line ends in 0 byte, not newline\n" msgstr "" " -e, --regexp=HAKULAUSEKE käytä HAKULAUSEKEtta säännöllisenä lausekkeena\n" @@ -548,7 +551,7 @@ " --help tulosta tämä ohje ja poistu\n" #: src/grep.c:1940 -#, fuzzy, c-format +#, c-format msgid "" "\n" "Output control:\n" @@ -563,7 +566,7 @@ msgstr "" "\n" "Tulostehallinta:\n" -" -m, --max-count=N pysäytä N täsmäävän jälkeen\n" +" -m, --max-count=NUM pysäytä NUM täsmäävän jälkeen\n" " -b, --byte-offset tulosta tavusiirros tulosteriveillä\n" " -n, --line-number tulosta rivinumero tulosteriveillä\n" " --line-buffered tasaa tuloste joka rivillä\n" @@ -573,9 +576,9 @@ " --label=NIMIÖ tulosta NIMIÖ tiedostonimenä vakiosyötteelle\n" #: src/grep.c:1951 -#, c-format +#, fuzzy, c-format msgid "" -" -o, --only-matching show only the part of a line matching PATTERN\n" +" -o, --only-matching show only nonempty parts of lines that match\n" " -q, --quiet, --silent suppress all normal output\n" " --binary-files=TYPE assume that binary files are TYPE;\n" " TYPE is 'binary', 'text', or 'without-match'\n" @@ -609,14 +612,13 @@ "linkkejä\n" #: src/grep.c:1967 -#, c-format +#, fuzzy, c-format msgid "" -" --include=FILE_PATTERN search only files that match FILE_PATTERN\n" -" --exclude=FILE_PATTERN skip files and directories matching " -"FILE_PATTERN\n" +" --include=GLOB search only files that match GLOB (a file " +"pattern)\n" +" --exclude=GLOB skip files and directories matching GLOB\n" " --exclude-from=FILE skip files matching any file pattern from FILE\n" -" --exclude-dir=PATTERN directories that match PATTERN will be " -"skipped.\n" +" --exclude-dir=GLOB skip directories that match GLOB\n" msgstr "" " --include=TIEDOSTO_HAKULAUSEKE etsi vain TIEDOSTO_HAKULAUSEKE-" "täsmäävät tiedostot\n" @@ -628,7 +630,7 @@ "hakemistot.\n" #: src/grep.c:1974 -#, fuzzy, c-format +#, c-format msgid "" " -L, --files-without-match print only names of FILEs with no selected " "lines\n" @@ -662,7 +664,7 @@ " -C, --context=N tulosta N riviä tulostekonteksia\n" #: src/grep.c:1987 -#, fuzzy, c-format +#, c-format msgid "" " -NUM same as --context=NUM\n" " --color[=WHEN],\n" @@ -673,15 +675,15 @@ "\n" msgstr "" " -NUM sama kuin --context=NUM\n" -" --color[=KOSKA],\n" -" --colour[=KOSKA] käytä merkkejä täsmäävän merkkijonon\n" +" --color[=KUN],\n" +" --colour[=KUN] käytä merkkejä täsmäävän merkkijonon\n" " korostamiseen\n" -" KOSKA voi olla ’always’ (aina), ’never’\n" +" KUN voi olla ’always’ (aina), ’never’\n" " (ei koskaan) tai ’auto’ (automaattisesti).\n" " -U, --binary älä poista ”telan palatus”-merkkiä CR rivin\n" " lopusta (MSDOS/Windows)\n" " -u, --unix-byte-offsets ilmoita siirrokset aivan kuin ”telan palatus”\n" -" -merkkiä CR ei olisi lainkaan (MSDOS/Windows)\n" +" -merkkiä CR (MSDOS/Windows) ei olisi lainkaan\n" "\n" #: src/grep.c:1994 @@ -689,15 +691,14 @@ msgid "" "When FILE is '-', read standard input. With no FILE, read '.' if\n" "recursive, '-' otherwise. With fewer than two FILEs, assume -h.\n" -"Exit status is 0 if any line is selected, 1 otherwise;\n" +"Exit status is 0 if any line (or file if -L) is selected, 1 otherwise;\n" "if any error occurs and -q is not given, the exit status is 2.\n" msgstr "" -"Kun TIEDOSTO on -, lue vakiosyötettä. Jos TIEDOSTOa ei ole ja jos\n" -"komentorivivalitsin -r on on annettu, niin lue ., muussa tapauksessa -. Jos\n" -"on annettu vähemmän kuin kaksi TIEDOSTOa, otaksu ”-h”-valitsin.\n" -"Paluuarvo on nolla, jos yksikin rivi on valittu, muutoin yksi;\n" -"jos tapahtuu virheitä ja ”-q”-valitsinta ei ollut annettu, niin paluuarvo\n" -"on kaksi.\n" +"Kun TIEDOSTO on -, lue vakiosyötteestä. Ilman TIEDOSTOa, lue . jos\n" +"komentorivivalitsin -r on annettu, muuten - . Jos vähemmän kuin kaksi\n" +"TIEDOSTOa on annettu, otaksu valitsimeksi -h . Poistumistila on 0, jos\n" +"mikä tahansa rivi on valittu, muuten poistumistila on 1 ; jos tapahtuu\n" +"mikä tahansa virhe tai annetaan valitsin -q, poistumistila on 2.\n" #: src/grep.c:2034 msgid "conflicting matchers specified" @@ -708,68 +709,78 @@ msgid "invalid matcher %s" msgstr "virheellinen täsmääjä %s" -#: src/grep.c:2458 +#: src/grep.c:2459 #, c-format msgid "warning: GREP_OPTIONS is deprecated; please use an alias or script" msgstr "varoitus: GREP_OPTIONS on vanhentunut; käytä aliasta tai skriptiä" -#: src/grep.c:2485 +#: src/grep.c:2486 msgid "unknown devices method" msgstr "tuntematon laitemetodi" -#: src/grep.c:2629 +#: src/grep.c:2630 msgid "invalid max count" msgstr "virheellinen maksimimäärä" -#: src/grep.c:2687 +#: src/grep.c:2688 msgid "unknown binary-files type" -msgstr "tuntematon binääritiedostojen tyyppi" +msgstr "tuntematon binaaritiedostojen tyyppi" -#: src/pcresearch.c:80 +#: src/grep.c:2770 +#, fuzzy +msgid "" +"Written by Mike Haertel and others; see\n" +"." +msgstr "muut, katso " + +#: src/pcresearch.c:86 msgid "failed to allocate memory for the PCRE JIT stack" msgstr "muistin varaaminen PCRE JIT-pinolle epäonnistui" -#: src/pcresearch.c:97 +#: src/pcresearch.c:118 msgid "" "support for the -P option is not compiled into this --disable-perl-regexp " "binary" msgstr "" "tuki valitsimelle ”-P” ei ole käännetty tähän ”--disable-perl-regexp”-" -"binääriin" +"binaariin" -#: src/pcresearch.c:119 +#: src/pcresearch.c:140 msgid "-P supports only unibyte and UTF-8 locales" msgstr "-P tukee vain unibyte- ja UTF-8-paikallisasetuksia" -#: src/pcresearch.c:125 +#: src/pcresearch.c:146 msgid "the -P option only supports a single pattern" msgstr "valitsin ”-P” tukee vain yhtä HAKULAUSEKEtta" -#: src/pcresearch.c:167 +#: src/pcresearch.c:189 msgid "internal error (should never happen)" msgstr "sisäinen virhe (ei pitäisi koskaan tapahtua)" -#: src/pcresearch.c:192 +#: src/pcresearch.c:214 msgid "internal error" msgstr "sisäinen virhe" -#: src/pcresearch.c:215 +#: src/pcresearch.c:237 msgid "exceeded PCRE's line length limit" msgstr "ylitettiin PCRE-rivipituusraja" -#: src/pcresearch.c:295 +#: src/pcresearch.c:317 msgid "exhausted PCRE JIT stack" msgstr "loppuunkäsitelty PCRE JIT-pino" -#: src/pcresearch.c:299 +#: src/pcresearch.c:321 msgid "exceeded PCRE's backtracking limit" msgstr "ylitettiin PCRE-paluujäljitysraja" -#: src/pcresearch.c:306 +#: src/pcresearch.c:328 #, c-format msgid "internal PCRE error: %d" msgstr "sisäinen PCRE-virhe: %d" +#~ msgid "Mike Haertel" +#~ msgstr "Mike Haertel" + #~ msgid "%s: option '--%s' doesn't allow an argument\n" #~ msgstr "%s: valitsin ’--%s’ ei salli argumenttia\n" Binary files /tmp/tmppJ6Y2n/6jFha9hbxv/grep-3.1/po/fr.gmo and /tmp/tmppJ6Y2n/tYMwNxGD36/grep-3.3/po/fr.gmo differ diff -Nru grep-3.1/po/fr.po grep-3.3/po/fr.po --- grep-3.1/po/fr.po 2017-07-02 20:21:16.000000000 +0000 +++ grep-3.3/po/fr.po 2018-12-21 04:39:02.000000000 +0000 @@ -6,15 +6,15 @@ # Nicolas Provost , 2009, 2010. # Jean-Christophe Helary , 2011. # David Prévot , 2012-2014. -# Stéphane Aulery , 2016. +# Stéphane Aulery , 2016, 2017. # msgid "" msgstr "" -"Project-Id-Version: GNU grep 2.26.37\n" +"Project-Id-Version: GNU grep 3.0.23-b00\n" "Report-Msgid-Bugs-To: bug-grep@gnu.org\n" -"POT-Creation-Date: 2017-07-02 13:21-0700\n" -"PO-Revision-Date: 2016-12-23 22:56+0100\n" -"Last-Translator: David Prévot \n" +"POT-Creation-Date: 2018-12-20 20:39-0800\n" +"PO-Revision-Date: 2017-08-21 23:23+0200\n" +"Last-Translator: Stéphane Aulery \n" "Language-Team: French \n" "Language: fr\n" "MIME-Version: 1.0\n" @@ -38,43 +38,51 @@ msgid "Valid arguments are:" msgstr "Les arguments valables sont :" -#: lib/closeout.c:122 src/grep.c:1274 +#: lib/c-stack.c:208 lib/c-stack.c:301 +msgid "program error" +msgstr "" + +#: lib/c-stack.c:209 lib/c-stack.c:302 +msgid "stack overflow" +msgstr "" + +#: lib/closeout.c:122 src/grep.c:1273 msgid "write error" msgstr "erreur d'écriture" -#: lib/dfa.c:958 +#: lib/dfa.c:970 msgid "unbalanced [" msgstr "[ non apparié" -#: lib/dfa.c:1079 +#: lib/dfa.c:1091 msgid "invalid character class" msgstr "classe de caractères incorrecte" -#: lib/dfa.c:1205 +#: lib/dfa.c:1217 msgid "character class syntax is [[:space:]], not [:space:]" msgstr "la syntaxe d'une classe de caractères est [[:space:]], pas [:space:]" -#: lib/dfa.c:1272 +#: lib/dfa.c:1284 msgid "unfinished \\ escape" msgstr "séquence d'échappement \\ non terminée" -#: lib/dfa.c:1433 +#: lib/dfa.c:1445 msgid "invalid content of \\{\\}" msgstr "contenu de \\{\\} incorrect" -#: lib/dfa.c:1436 +#: lib/dfa.c:1448 msgid "regular expression too big" msgstr "expression rationnelle trop grande" -#: lib/dfa.c:1850 +#: lib/dfa.c:1863 msgid "unbalanced (" msgstr "( non appariée" -#: lib/dfa.c:1968 +#: lib/dfa.c:1981 msgid "no syntax specified" msgstr "aucune syntaxe indiquée" -#: lib/dfa.c:1976 +#: lib/dfa.c:1992 msgid "unbalanced )" msgstr ") non appariée" @@ -83,29 +91,29 @@ msgstr "Erreur système inconnue" #: lib/getopt.c:278 -#, fuzzy, c-format +#, c-format msgid "%s: option '%s%s' is ambiguous\n" -msgstr "%s : l'option « %s » est ambiguë\n" +msgstr "%s : l'option « %s%s » est ambiguë\n" #: lib/getopt.c:284 -#, fuzzy, c-format +#, c-format msgid "%s: option '%s%s' is ambiguous; possibilities:" -msgstr "%s : l'option « %s » est ambiguë ; possibilités :" +msgstr "%s : l'option « %s%s » est ambiguë ; possibilités :" #: lib/getopt.c:319 -#, fuzzy, c-format +#, c-format msgid "%s: unrecognized option '%s%s'\n" -msgstr "%s : option « %c%s » non reconnue\n" +msgstr "%s : option « %s%s » non reconnue\n" #: lib/getopt.c:345 -#, fuzzy, c-format +#, c-format msgid "%s: option '%s%s' doesn't allow an argument\n" -msgstr "%s : l'option « %c%s » n'accepte pas d'argument\n" +msgstr "%s : l'option « %s%s » n'accepte pas d'argument\n" #: lib/getopt.c:360 -#, fuzzy, c-format +#, c-format msgid "%s: option '%s%s' requires an argument\n" -msgstr "%s : l'option « --%s » nécessite un argument\n" +msgstr "%s : l'option « %s%s » nécessite un argument\n" #: lib/getopt.c:621 #, c-format @@ -117,7 +125,7 @@ msgid "%s: option requires an argument -- '%c'\n" msgstr "%s : l'option nécessite un argument — « %c »\n" -#: lib/obstack.c:338 lib/obstack.c:340 lib/xalloc-die.c:34 src/pcresearch.c:291 +#: lib/obstack.c:338 lib/obstack.c:340 lib/xalloc-die.c:34 src/pcresearch.c:313 msgid "memory exhausted" msgstr "mémoire épuisée" @@ -135,6 +143,7 @@ #, c-format msgid "failed to set file descriptor text/binary mode" msgstr "" +"l’obtention d’un descripteur de fichier en mode text / binaire a échoué" #. TRANSLATORS: #. Get translations for open and closing quotation marks. @@ -155,7 +164,7 @@ #. for your locale. #. #. If you don't know what to put here, please see -#. +#. #. and use glyphs suitable for your language. #: lib/quotearg.c:362 msgid "`" @@ -233,16 +242,16 @@ msgid "Unmatched ) or \\)" msgstr ") ou \\) sans correspondance" -#: lib/regcomp.c:687 +#: lib/regcomp.c:688 msgid "No previous regular expression" msgstr "Pas d'expression rationnelle précédente" -#: lib/version-etc.c:74 +#: lib/version-etc.c:73 #, c-format msgid "Packaged by %s (%s)\n" msgstr "Empaqueté par %s (%s)\n" -#: lib/version-etc.c:77 +#: lib/version-etc.c:76 #, c-format msgid "Packaged by %s\n" msgstr "Empaqueté par %s\n" @@ -250,14 +259,15 @@ #. TRANSLATORS: Translate "(C)" to the copyright symbol #. (C-in-a-circle), if this symbol is available in the user's #. locale. Otherwise, do not translate "(C)"; leave it as-is. -#: lib/version-etc.c:84 +#: lib/version-etc.c:83 msgid "(C)" msgstr "©" -#: lib/version-etc.c:86 +#: lib/version-etc.c:85 +#, fuzzy msgid "" "\n" -"License GPLv3+: GNU GPL version 3 or later .\n" "This is free software: you are free to change and redistribute it.\n" "There is NO WARRANTY, to the extent permitted by law.\n" @@ -402,12 +412,13 @@ msgstr "Page d'accueil de %s : <%s>\n" #: lib/version-etc.c:253 -#, c-format -msgid "%s home page: \n" +#, fuzzy, c-format +msgid "%s home page: \n" msgstr "Page d'accueil de %s : \n" #: lib/version-etc.c:256 -msgid "General help using GNU software: \n" +#, fuzzy +msgid "General help using GNU software: \n" msgstr "" "Aide globale sur les logiciels GNU : \n" @@ -426,95 +437,88 @@ msgid "%s%s argument '%s' too large" msgstr "argument %s%s « %s » trop grand" -#. This is a proper name. See the gettext manual, section Names. -#: src/grep.c:59 -msgid "Mike Haertel" -msgstr "Mike Haertel" - -#: src/grep.c:60 -msgid "others, see " -msgstr "autres, consultez " - -#: src/grep.c:585 +#: src/grep.c:582 msgid "(standard input)" msgstr "(entrée standard)" -#: src/grep.c:765 +#: src/grep.c:762 msgid "invalid context length argument" msgstr "argument de longueur de contexte incorrect" -#: src/grep.c:828 +#: src/grep.c:827 msgid "input is too large to count" msgstr "taille des données en entrée trop importante pour compter" -#: src/grep.c:1579 +#: src/grep.c:1578 #, c-format msgid "Binary file %s matches\n" msgstr "Fichier binaire %s correspondant\n" -#: src/grep.c:1627 +#: src/grep.c:1626 #, c-format msgid "warning: %s: %s" msgstr "Avertissement : %s : %s" -#: src/grep.c:1628 +#: src/grep.c:1627 msgid "recursive directory loop" msgstr "boucle de répertoire récursive" -#: src/grep.c:1844 +#: src/grep.c:1843 #, c-format msgid "input file %s is also the output" msgstr "le fichier d'entrée %s est aussi en sortie" -#: src/grep.c:1907 src/grep.c:1914 -#, c-format -msgid "Usage: %s [OPTION]... PATTERN [FILE]...\n" +#: src/grep.c:1906 src/grep.c:1913 +#, fuzzy, c-format +msgid "Usage: %s [OPTION]... PATTERNS [FILE]...\n" msgstr "Utilisation : %s [OPTION]... MOTIF [FICHIER]...\n" -#: src/grep.c:1909 +#: src/grep.c:1908 #, c-format msgid "Try '%s --help' for more information.\n" msgstr "" "Exécutez « %s --help » pour obtenir des renseignements complémentaires.\n" -#: src/grep.c:1915 +#: src/grep.c:1914 #, fuzzy, c-format -msgid "Search for PATTERN in each FILE.\n" -msgstr "" -"Chercher un MOTIF dans chaque FICHIER ou à partir de l'entrée standard.\n" +msgid "Search for PATTERNS in each FILE.\n" +msgstr "Chercher un MOTIF dans chaque FICHIER.\n" -#: src/grep.c:1916 +#: src/grep.c:1915 #, fuzzy, c-format msgid "" "Example: %s -i 'hello world' menu.h main.c\n" +"PATTERNS can contain multiple patterns separated by newlines.\n" "\n" "Pattern selection and interpretation:\n" msgstr "" "Exemple : %s -i 'Bonjour, le monde' menu.h main.c\n" "\n" -"Sélection et interprétation de l'expression rationnelle :\n" +"Motif de sélection et interprétation :\n" #: src/grep.c:1920 #, fuzzy, c-format msgid "" -" -E, --extended-regexp PATTERN is an extended regular expression\n" -" -F, --fixed-strings PATTERN is a set of newline-separated strings\n" -" -G, --basic-regexp PATTERN is a basic regular expression (default)\n" -" -P, --perl-regexp PATTERN is a Perl regular expression\n" +" -E, --extended-regexp PATTERNS are extended regular expressions\n" +" -F, --fixed-strings PATTERNS are strings\n" +" -G, --basic-regexp PATTERNS are basic regular expressions\n" +" -P, --perl-regexp PATTERNS are Perl regular expressions\n" msgstr "" " -E, --extended-regexp MOTIF est une expression rationnelle étendue\n" -" -F, --fixed-regexp chaînes séparées par des changements de ligne\n" -" -G, --basic-regexp MOTIF est une expression rationnelle de base\n" +" -F, --fixed-regexp PATTERN est une série de chaînes séparées par " +"des sauts de ligne\n" +" -G, --basic-regexp MOTIF est une expression rationnelle de base " +"(default)\n" " -P, --perl-regexp MOTIF est une expression rationnelle en Perl\n" #: src/grep.c:1926 -#, c-format +#, fuzzy, c-format msgid "" -" -e, --regexp=PATTERN use PATTERN for matching\n" -" -f, --file=FILE obtain PATTERN from FILE\n" +" -e, --regexp=PATTERNS use PATTERNS for matching\n" +" -f, --file=FILE take PATTERNS from FILE\n" " -i, --ignore-case ignore case distinctions\n" -" -w, --word-regexp force PATTERN to match only whole words\n" -" -x, --line-regexp force PATTERN to match only whole lines\n" +" -w, --word-regexp match only whole words\n" +" -x, --line-regexp match only whole lines\n" " -z, --null-data a data line ends in 0 byte, not newline\n" msgstr "" " -e, --regexp=MOTIF utiliser MOTIF comme expression rationnelle\n" @@ -544,7 +548,7 @@ " --help afficher l'aide et quitter\n" #: src/grep.c:1940 -#, fuzzy, c-format +#, c-format msgid "" "\n" "Output control:\n" @@ -559,21 +563,20 @@ msgstr "" "\n" "Contrôle de la sortie :\n" -" -m, --max-count=NOMBRE arrêter après NOMBRE correspondances\n" +" -m, --max-count=NOMBRE arrêter après NOMBRE de ligne sélectionnées\n" " -b, --byte-offset afficher la position en octet avec la sortie\n" " -n, --line-number afficher le numéro de ligne avec la sortie\n" " --line-buffered vider le tampon après chaque ligne\n" -" -H, --with-filename afficher le nom de fichier avec les " -"correspondances\n" +" -H, --with-filename afficher le nom de fichier avec les lignes\n" " -h, --no-filename supprimer le préfixe de nom de fichier en " "sortie\n" " --label=ÉTIQUETTE utiliser ÉTIQUETTE pour le préfixe d'entrée " "standard\n" #: src/grep.c:1951 -#, c-format +#, fuzzy, c-format msgid "" -" -o, --only-matching show only the part of a line matching PATTERN\n" +" -o, --only-matching show only nonempty parts of lines that match\n" " -q, --quiet, --silent suppress all normal output\n" " --binary-files=TYPE assume that binary files are TYPE;\n" " TYPE is 'binary', 'text', or 'without-match'\n" @@ -611,14 +614,13 @@ "symboliques\n" #: src/grep.c:1967 -#, c-format +#, fuzzy, c-format msgid "" -" --include=FILE_PATTERN search only files that match FILE_PATTERN\n" -" --exclude=FILE_PATTERN skip files and directories matching " -"FILE_PATTERN\n" +" --include=GLOB search only files that match GLOB (a file " +"pattern)\n" +" --exclude=GLOB skip files and directories matching GLOB\n" " --exclude-from=FILE skip files matching any file pattern from FILE\n" -" --exclude-dir=PATTERN directories that match PATTERN will be " -"skipped.\n" +" --exclude-dir=GLOB skip directories that match GLOB\n" msgstr "" " --include=MOTIF_FIC ne chercher que fichiers correspondants à " "MOTIF_FIC\n" @@ -629,7 +631,7 @@ " --exclude-dir=MOTIF ignorer les répertoires correspondants au MOTIF\n" #: src/grep.c:1974 -#, fuzzy, c-format +#, c-format msgid "" " -L, --files-without-match print only names of FILEs with no selected " "lines\n" @@ -638,11 +640,12 @@ " -T, --initial-tab make tabs line up (if needed)\n" " -Z, --null print 0 byte after FILE name\n" msgstr "" -" -L, --files-without-match n'afficher que les fichiers sans correspondance\n" -" -l, --files-with-matches n'afficher que les fichiers avec " -"correspondances\n" -" -c, --count n'afficher que le nombre de lignes " -"correspondantes\n" +" -L, --files-without-match n'afficher que les fichiers sans lignes " +"sélectionnées\n" +" -l, --files-with-matches n'afficher que les fichiers avec des lignes " +"sélectionnées\n" +" -c, --count n'afficher que le nombre de lignes sélectionnées " +"par FICHIER\n" " -T, --initial-tab insérer des tabulations (si nécessaire)\n" " -Z, --null afficher l'octet nul après le nom de fichier\n" @@ -662,7 +665,7 @@ " -C, --context=NBRE afficher NBRE lignes de contexte en sortie\n" #: src/grep.c:1987 -#, fuzzy, c-format +#, c-format msgid "" " -NUM same as --context=NUM\n" " --color[=WHEN],\n" @@ -672,17 +675,14 @@ "Windows)\n" "\n" msgstr "" -" -NBRE identique à --context=NBRE\n" +" -NONBRE identique à --context=NONBRE\n" " --color[=QUAND],\n" " --colour[=QUAND] mettre en évidence les correspondances ; QUAND " "est\n" " « always » (toujours) « never » (jamais) ou " "« auto »\n" " -U, --binary ne pas enlever les retours chariot en fin de " -"ligne\n" -" -u, --unix-byte-offsets afficher les positions sans tenir compte des " -"retours\n" -" chariot (MS-DOS ou Windows)\n" +"ligne (MSDOS/Windows)\n" "\n" #: src/grep.c:1994 @@ -690,12 +690,12 @@ msgid "" "When FILE is '-', read standard input. With no FILE, read '.' if\n" "recursive, '-' otherwise. With fewer than two FILEs, assume -h.\n" -"Exit status is 0 if any line is selected, 1 otherwise;\n" +"Exit status is 0 if any line (or file if -L) is selected, 1 otherwise;\n" "if any error occurs and -q is not given, the exit status is 2.\n" msgstr "" -"Si FICHIER vaut -, lire l'entrée standard. Sans FICHIER, lire . si une " -"option\n" -"-r est donnée, - sinon. Si moins de deux fichiers sont donnés, utiliser -h.\n" +"Si FICHIER vaut « - », lire l'entrée standard. Sans FICHIER, lire « . ».\n" +"Si mode récursif, autrement « - »\n" +"Si moins de deux fichiers sont indiqués, execute -h.\n" "Le code de sortie est 0 si une ligne est sélectionnée, 1 sinon ;\n" "en cas d'erreur et si l'option -q n'est pas présente, le code de sortie est " "2.\n" @@ -709,30 +709,37 @@ msgid "invalid matcher %s" msgstr "motif de correspondance incorrect %s" -#: src/grep.c:2458 +#: src/grep.c:2459 #, c-format msgid "warning: GREP_OPTIONS is deprecated; please use an alias or script" msgstr "" "Avertissement : GREP_OPTIONS doit être abandonnée ; veuillez utiliser un " "alias ou un script" -#: src/grep.c:2485 +#: src/grep.c:2486 msgid "unknown devices method" msgstr "méthode d'examen des périphériques inconnue" -#: src/grep.c:2629 +#: src/grep.c:2630 msgid "invalid max count" msgstr "décompte maximal incorrect" -#: src/grep.c:2687 +#: src/grep.c:2688 msgid "unknown binary-files type" msgstr "type de fichier binaire inconnu" -#: src/pcresearch.c:80 +#: src/grep.c:2770 +#, fuzzy +msgid "" +"Written by Mike Haertel and others; see\n" +"." +msgstr "autres, consultez " + +#: src/pcresearch.c:86 msgid "failed to allocate memory for the PCRE JIT stack" msgstr "échec d’allocation mémoire pour la pile JIT PCRE" -#: src/pcresearch.c:97 +#: src/pcresearch.c:118 msgid "" "support for the -P option is not compiled into this --disable-perl-regexp " "binary" @@ -740,60 +747,38 @@ "l'option -P n'est pas prise en charge par ce programme compilé avec l'option " "--disable-perl-regexp" -#: src/pcresearch.c:119 +#: src/pcresearch.c:140 msgid "-P supports only unibyte and UTF-8 locales" msgstr "-P ne fonctionne qu’avec des paramètres régionaux monooctets ou UTF-8" -#: src/pcresearch.c:125 +#: src/pcresearch.c:146 msgid "the -P option only supports a single pattern" msgstr "l'option -P ne permet d'utiliser qu'un seul motif" -#: src/pcresearch.c:167 +#: src/pcresearch.c:189 msgid "internal error (should never happen)" msgstr "erreur interne (ça ne devrait jamais arriver)" -#: src/pcresearch.c:192 +#: src/pcresearch.c:214 msgid "internal error" msgstr "erreur interne" -#: src/pcresearch.c:215 +#: src/pcresearch.c:237 msgid "exceeded PCRE's line length limit" msgstr "limite de longueur de ligne des PCRE dépassée" -#: src/pcresearch.c:295 +#: src/pcresearch.c:317 msgid "exhausted PCRE JIT stack" msgstr "pile PCRE JIT dépassée" -#: src/pcresearch.c:299 +#: src/pcresearch.c:321 msgid "exceeded PCRE's backtracking limit" msgstr "limite de retour arrière des PCRE dépassée" -#: src/pcresearch.c:306 +#: src/pcresearch.c:328 #, c-format msgid "internal PCRE error: %d" msgstr "erreur PCRE interne : %d" -#~ msgid "%s: option '--%s' doesn't allow an argument\n" -#~ msgstr "%s : l'option « --%s » n'accepte pas d'argument\n" - -#~ msgid "%s: unrecognized option '--%s'\n" -#~ msgstr "%s : option « --%s » non reconnue\n" - -#~ msgid "%s: option '-W %s' is ambiguous\n" -#~ msgstr "%s : l'option « -W %s » est ambiguë\n" - -#~ msgid "%s: option '-W %s' doesn't allow an argument\n" -#~ msgstr "%s : l'option « -W %s » n'accepte pas d'argument\n" - -#~ msgid "%s: option '-W %s' requires an argument\n" -#~ msgstr "%s : l'option « -W %s » nécessite un argument\n" - -#~ msgid "PATTERN is, by default, a basic regular expression (BRE).\n" -#~ msgstr "MOTIF est, par défaut, une expression rationnelle simple.\n" - -#~ msgid "" -#~ "'egrep' means 'grep -E'. 'fgrep' means 'grep -F'.\n" -#~ "Direct invocation as either 'egrep' or 'fgrep' is deprecated.\n" -#~ msgstr "" -#~ "« egrep » équivaut à « grep -E ». « fgrep » équivaut à « grep -F ».\n" -#~ "L'invocation directe de « egrep » ou « fgrep » doit être abandonnée.\n" +#~ msgid "Mike Haertel" +#~ msgstr "Mike Haertel" Binary files /tmp/tmppJ6Y2n/6jFha9hbxv/grep-3.1/po/ga.gmo and /tmp/tmppJ6Y2n/tYMwNxGD36/grep-3.3/po/ga.gmo differ diff -Nru grep-3.1/po/ga.po grep-3.3/po/ga.po --- grep-3.1/po/ga.po 2017-07-02 20:21:16.000000000 +0000 +++ grep-3.3/po/ga.po 2018-12-21 04:39:02.000000000 +0000 @@ -6,7 +6,7 @@ msgstr "" "Project-Id-Version: grep 3.0.23-b00\n" "Report-Msgid-Bugs-To: bug-grep@gnu.org\n" -"POT-Creation-Date: 2017-07-02 13:21-0700\n" +"POT-Creation-Date: 2018-12-20 20:39-0800\n" "PO-Revision-Date: 2017-06-25 05:18-0600\n" "Last-Translator: Kevin Scannell \n" "Language-Team: Irish \n" @@ -30,44 +30,52 @@ msgid "Valid arguments are:" msgstr "Na hargóintí bailí:" -#: lib/closeout.c:122 src/grep.c:1274 +#: lib/c-stack.c:208 lib/c-stack.c:301 +msgid "program error" +msgstr "" + +#: lib/c-stack.c:209 lib/c-stack.c:302 +msgid "stack overflow" +msgstr "" + +#: lib/closeout.c:122 src/grep.c:1273 msgid "write error" msgstr "earráid sa scríobh" -#: lib/dfa.c:958 +#: lib/dfa.c:970 msgid "unbalanced [" msgstr "[ corr" -#: lib/dfa.c:1079 +#: lib/dfa.c:1091 msgid "invalid character class" msgstr "Aicme charachtar neamhbhailí" -#: lib/dfa.c:1205 +#: lib/dfa.c:1217 msgid "character class syntax is [[:space:]], not [:space:]" msgstr "" "Is é [[:space:]] an chomhréir cheart in aicme carachtar, in ionad [:space:]" -#: lib/dfa.c:1272 +#: lib/dfa.c:1284 msgid "unfinished \\ escape" msgstr "Seicheamh éalúcháin \\ gan chríochnú" -#: lib/dfa.c:1433 +#: lib/dfa.c:1445 msgid "invalid content of \\{\\}" msgstr "ábhar neamhbhailí laistigh de \\{\\}" -#: lib/dfa.c:1436 +#: lib/dfa.c:1448 msgid "regular expression too big" msgstr "slonn ionadaíochta rómhór" -#: lib/dfa.c:1850 +#: lib/dfa.c:1863 msgid "unbalanced (" msgstr "( corr" -#: lib/dfa.c:1968 +#: lib/dfa.c:1981 msgid "no syntax specified" msgstr "níor sonraíodh aon chomhréir" -#: lib/dfa.c:1976 +#: lib/dfa.c:1992 msgid "unbalanced )" msgstr ") corr" @@ -110,7 +118,7 @@ msgid "%s: option requires an argument -- '%c'\n" msgstr "%s: tá argóint de dhíth i ndiaidh na rogha -- '%c'\n" -#: lib/obstack.c:338 lib/obstack.c:340 lib/xalloc-die.c:34 src/pcresearch.c:291 +#: lib/obstack.c:338 lib/obstack.c:340 lib/xalloc-die.c:34 src/pcresearch.c:313 msgid "memory exhausted" msgstr "cuimhne ídithe" @@ -148,7 +156,7 @@ #. for your locale. #. #. If you don't know what to put here, please see -#. +#. #. and use glyphs suitable for your language. #: lib/quotearg.c:362 msgid "`" @@ -226,16 +234,16 @@ msgid "Unmatched ) or \\)" msgstr ") nó \\) corr" -#: lib/regcomp.c:687 +#: lib/regcomp.c:688 msgid "No previous regular expression" msgstr "Níl aon slonn ionadaíochta roimhe seo" -#: lib/version-etc.c:74 +#: lib/version-etc.c:73 #, c-format msgid "Packaged by %s (%s)\n" msgstr "Arna phacáistiú ag %s (%s)\n" -#: lib/version-etc.c:77 +#: lib/version-etc.c:76 #, c-format msgid "Packaged by %s\n" msgstr "Arna phacáistiú ag %s\n" @@ -243,14 +251,15 @@ #. TRANSLATORS: Translate "(C)" to the copyright symbol #. (C-in-a-circle), if this symbol is available in the user's #. locale. Otherwise, do not translate "(C)"; leave it as-is. -#: lib/version-etc.c:84 +#: lib/version-etc.c:83 msgid "(C)" msgstr "©" -#: lib/version-etc.c:86 +#: lib/version-etc.c:85 +#, fuzzy msgid "" "\n" -"License GPLv3+: GNU GPL version 3 or later .\n" "This is free software: you are free to change and redistribute it.\n" "There is NO WARRANTY, to the extent permitted by law.\n" @@ -394,12 +403,13 @@ msgstr "Leathanach baile %s: <%s>\n" #: lib/version-etc.c:253 -#, c-format -msgid "%s home page: \n" +#, fuzzy, c-format +msgid "%s home page: \n" msgstr "Leathanach baile %s: \n" #: lib/version-etc.c:256 -msgid "General help using GNU software: \n" +#, fuzzy +msgid "General help using GNU software: \n" msgstr "" "Cabhair ghinearálta maidir le bogearraí GNU: \n" @@ -418,67 +428,58 @@ msgid "%s%s argument '%s' too large" msgstr "argóint %s%s rómhór: '%s'" -#. This is a proper name. See the gettext manual, section Names. -#: src/grep.c:59 -msgid "Mike Haertel" -msgstr "Mike Haertel" - -#: src/grep.c:60 -msgid "others, see " -msgstr "" -"agus daoine eile, féach ar " - -#: src/grep.c:585 +#: src/grep.c:582 msgid "(standard input)" msgstr "(gnáth-ionchur)" -#: src/grep.c:765 +#: src/grep.c:762 msgid "invalid context length argument" msgstr "tá an argóint a shonraíonn fad an chomhthéacs neamhbhailí" -#: src/grep.c:828 +#: src/grep.c:827 msgid "input is too large to count" msgstr "tá an t-ionchur rómhór le háireamh" # using lit. "matching string" throughout for "match" - KPS -#: src/grep.c:1579 +#: src/grep.c:1578 #, c-format msgid "Binary file %s matches\n" msgstr "Teaghrán comhoiriúnach sa chomhad dhénártha %s\n" -#: src/grep.c:1627 +#: src/grep.c:1626 #, c-format msgid "warning: %s: %s" msgstr "rabhadh: %s: %s" -#: src/grep.c:1628 +#: src/grep.c:1627 msgid "recursive directory loop" msgstr "lúb athchúrsach i gcomhadlann" -#: src/grep.c:1844 +#: src/grep.c:1843 #, c-format msgid "input file %s is also the output" msgstr "is ionann an t-inchomhad %s agus an t-aschomhad" -#: src/grep.c:1907 src/grep.c:1914 -#, c-format -msgid "Usage: %s [OPTION]... PATTERN [FILE]...\n" +#: src/grep.c:1906 src/grep.c:1913 +#, fuzzy, c-format +msgid "Usage: %s [OPTION]... PATTERNS [FILE]...\n" msgstr "Úsáid: %s [ROGHA]... PATRÚN [COMHAD]...\n" -#: src/grep.c:1909 +#: src/grep.c:1908 #, c-format msgid "Try '%s --help' for more information.\n" msgstr "Bain triail as '%s --help' chun tuilleadh eolais a fháil.\n" -#: src/grep.c:1915 -#, c-format -msgid "Search for PATTERN in each FILE.\n" +#: src/grep.c:1914 +#, fuzzy, c-format +msgid "Search for PATTERNS in each FILE.\n" msgstr "Déan cuardach ar PATRÚN i ngach COMHAD.\n" -#: src/grep.c:1916 -#, c-format +#: src/grep.c:1915 +#, fuzzy, c-format msgid "" "Example: %s -i 'hello world' menu.h main.c\n" +"PATTERNS can contain multiple patterns separated by newlines.\n" "\n" "Pattern selection and interpretation:\n" msgstr "" @@ -487,12 +488,12 @@ "Roghnú agus léirmhíniú patrún:\n" #: src/grep.c:1920 -#, c-format +#, fuzzy, c-format msgid "" -" -E, --extended-regexp PATTERN is an extended regular expression\n" -" -F, --fixed-strings PATTERN is a set of newline-separated strings\n" -" -G, --basic-regexp PATTERN is a basic regular expression (default)\n" -" -P, --perl-regexp PATTERN is a Perl regular expression\n" +" -E, --extended-regexp PATTERNS are extended regular expressions\n" +" -F, --fixed-strings PATTERNS are strings\n" +" -G, --basic-regexp PATTERNS are basic regular expressions\n" +" -P, --perl-regexp PATTERNS are Perl regular expressions\n" msgstr "" " -E, --extended-regexp is slonn ionadaíochta breisithe é PATRÚN\n" " -F, --fixed-strings is tacar teaghrán é PATRÚN, línte nua eatarthu\n" @@ -500,13 +501,13 @@ " -P, --perl-regexp is slonn ionadaíochta Perl é PATRÚN\n" #: src/grep.c:1926 -#, c-format +#, fuzzy, c-format msgid "" -" -e, --regexp=PATTERN use PATTERN for matching\n" -" -f, --file=FILE obtain PATTERN from FILE\n" +" -e, --regexp=PATTERNS use PATTERNS for matching\n" +" -f, --file=FILE take PATTERNS from FILE\n" " -i, --ignore-case ignore case distinctions\n" -" -w, --word-regexp force PATTERN to match only whole words\n" -" -x, --line-regexp force PATTERN to match only whole lines\n" +" -w, --word-regexp match only whole words\n" +" -x, --line-regexp match only whole lines\n" " -z, --null-data a data line ends in 0 byte, not newline\n" msgstr "" " -e, --regexp=PATRÚN déan cuardach ar PATRÚN\n" @@ -558,9 +559,9 @@ " --label=LIPÉAD úsáid LIPÉAD mar ainm ar an ngnáth-ionchur\n" #: src/grep.c:1951 -#, c-format +#, fuzzy, c-format msgid "" -" -o, --only-matching show only the part of a line matching PATTERN\n" +" -o, --only-matching show only nonempty parts of lines that match\n" " -q, --quiet, --silent suppress all normal output\n" " --binary-files=TYPE assume that binary files are TYPE;\n" " TYPE is 'binary', 'text', or 'without-match'\n" @@ -592,14 +593,13 @@ " -R, --dereference-recursive mar an gcéanna, ach lean naisc shiombalacha\n" #: src/grep.c:1967 -#, c-format +#, fuzzy, c-format msgid "" -" --include=FILE_PATTERN search only files that match FILE_PATTERN\n" -" --exclude=FILE_PATTERN skip files and directories matching " -"FILE_PATTERN\n" +" --include=GLOB search only files that match GLOB (a file " +"pattern)\n" +" --exclude=GLOB skip files and directories matching GLOB\n" " --exclude-from=FILE skip files matching any file pattern from FILE\n" -" --exclude-dir=PATTERN directories that match PATTERN will be " -"skipped.\n" +" --exclude-dir=GLOB skip directories that match GLOB\n" msgstr "" " --include=PATRÚN déan cuardach i gcomhaid chomhoiriúnacha amháin\n" " --exclude=PATRÚN ná déan cuardach i gcomhaid chomhoiriúnacha\n" @@ -662,11 +662,11 @@ "\n" #: src/grep.c:1994 -#, c-format +#, fuzzy, c-format msgid "" "When FILE is '-', read standard input. With no FILE, read '.' if\n" "recursive, '-' otherwise. With fewer than two FILEs, assume -h.\n" -"Exit status is 0 if any line is selected, 1 otherwise;\n" +"Exit status is 0 if any line (or file if -L) is selected, 1 otherwise;\n" "if any error occurs and -q is not given, the exit status is 2.\n" msgstr "" "Más é '-' an COMHAD, léigh ón ionchur caighdeánach. Gan COMHAD ar bith,\n" @@ -683,30 +683,38 @@ msgid "invalid matcher %s" msgstr "meaitseálaí neamhbhailí %s" -#: src/grep.c:2458 +#: src/grep.c:2459 #, c-format msgid "warning: GREP_OPTIONS is deprecated; please use an alias or script" msgstr "" "rabhadh: ní mholtar GREP_OPTIONS a úsáid a thuilleadh; bain úsáid as ailias " "nó as script" -#: src/grep.c:2485 +#: src/grep.c:2486 msgid "unknown devices method" msgstr "modh anaithnid gléasanna" -#: src/grep.c:2629 +#: src/grep.c:2630 msgid "invalid max count" msgstr "uasmhéid neamhbhailí" -#: src/grep.c:2687 +#: src/grep.c:2688 msgid "unknown binary-files type" msgstr "cineál anaithnid de chomhad dénártha" -#: src/pcresearch.c:80 +#: src/grep.c:2770 +#, fuzzy +msgid "" +"Written by Mike Haertel and others; see\n" +"." +msgstr "" +"agus daoine eile, féach ar " + +#: src/pcresearch.c:86 msgid "failed to allocate memory for the PCRE JIT stack" msgstr "níorbh fhéidir cuimhne a dháil le haghaidh na cruaiche PCRE JIT" -#: src/pcresearch.c:97 +#: src/pcresearch.c:118 msgid "" "support for the -P option is not compiled into this --disable-perl-regexp " "binary" @@ -714,39 +722,42 @@ "Tiomsaíodh an clár dénártha seo le --disable-perl-regexp agus gan tacaíocht " "do rogha -P" -#: src/pcresearch.c:119 +#: src/pcresearch.c:140 msgid "-P supports only unibyte and UTF-8 locales" msgstr "Tacaíonn an rogha -P logchaighdeáin aonbhearta agus UTF-8 amháin" -#: src/pcresearch.c:125 +#: src/pcresearch.c:146 msgid "the -P option only supports a single pattern" msgstr "Ní thacaíonn rogha -P ach le patrún amháin" -#: src/pcresearch.c:167 +#: src/pcresearch.c:189 msgid "internal error (should never happen)" msgstr "earráid inmheánach (ní tharlaíonn seo riamh)" -#: src/pcresearch.c:192 +#: src/pcresearch.c:214 msgid "internal error" msgstr "earráid inmheánach" -#: src/pcresearch.c:215 +#: src/pcresearch.c:237 msgid "exceeded PCRE's line length limit" msgstr "sáraíodh uasfhad líne PCRE" -#: src/pcresearch.c:295 +#: src/pcresearch.c:317 msgid "exhausted PCRE JIT stack" msgstr "cruach PCRE JIT líonta" -#: src/pcresearch.c:299 +#: src/pcresearch.c:321 msgid "exceeded PCRE's backtracking limit" msgstr "sáraíodh teorainn PCRE ar chúlú" -#: src/pcresearch.c:306 +#: src/pcresearch.c:328 #, c-format msgid "internal PCRE error: %d" msgstr "earráid inmheánach PCRE: %d" +#~ msgid "Mike Haertel" +#~ msgstr "Mike Haertel" + #~ msgid "%s: option '--%s' doesn't allow an argument\n" #~ msgstr "%s: ní cheadaítear argóint i ndiaidh rogha '--%s'\n" Binary files /tmp/tmppJ6Y2n/6jFha9hbxv/grep-3.1/po/gl.gmo and /tmp/tmppJ6Y2n/tYMwNxGD36/grep-3.3/po/gl.gmo differ diff -Nru grep-3.1/po/gl.po grep-3.3/po/gl.po --- grep-3.1/po/gl.po 2017-07-02 20:21:16.000000000 +0000 +++ grep-3.3/po/gl.po 2018-12-21 04:39:02.000000000 +0000 @@ -1,82 +1,87 @@ # Galician Translation of grep # Copyright (C) 2001 Free Software Foundation, Inc. # This file is distributed under the same license as the grep package. -# -# Jacobo Tarro Barreiro , 2001. -# Francisco Diguez , 2012. +# Jacobo Tarrío Barreiro , 2001. +# Francisco Diéguez , 2012. # Leandro Regueiro , 2012. -# -# Proxecto Trasno - Adaptacin do software libre lingua galega: Se desexas -# colaborar connosco, podes atopar mis informacin en -# +# Antón Méixome , 2018. +# Proxecto Trasno - Adaptación do software libre á lingua galega: Se desexas +# colaborar connosco, podes atopar máis información en msgid "" msgstr "" -"Project-Id-Version: grep 2.10\n" +"Project-Id-Version: grep 3.0.23-b00\n" "Report-Msgid-Bugs-To: bug-grep@gnu.org\n" -"POT-Creation-Date: 2017-07-02 13:21-0700\n" -"PO-Revision-Date: 2012-02-23 18:30+0100\n" -"Last-Translator: Leandro Regueiro \n" -"Language-Team: Galician \n" +"POT-Creation-Date: 2018-12-20 20:39-0800\n" +"PO-Revision-Date: 2018-04-19 21:30+0200\n" +"Last-Translator: Antón Méixome \n" +"Language-Team: Galician \n" "Language: gl\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"X-Generator: Virtaal 0.7.1\n" "X-Bugs: Report translation errors to the Language-Team address.\n" -"Plural-Forms: nplurals=2; plural=(n!=1);\n" #: lib/argmatch.c:134 #, c-format msgid "invalid argument %s for %s" -msgstr "argumento %s non válido %s" +msgstr "o argumento %s para %s é incorrecto" #: lib/argmatch.c:135 #, c-format msgid "ambiguous argument %s for %s" -msgstr "argumento %s ambiguo para %s" +msgstr "o argumento %s para %s é ambiguo" #: lib/argmatch.c:154 msgid "Valid arguments are:" -msgstr "Os argumentos válidos son:" +msgstr "Os argumentos correctos son:" -#: lib/closeout.c:122 src/grep.c:1274 +#: lib/c-stack.c:208 lib/c-stack.c:301 +msgid "program error" +msgstr "" + +#: lib/c-stack.c:209 lib/c-stack.c:302 +msgid "stack overflow" +msgstr "" + +#: lib/closeout.c:122 src/grep.c:1273 msgid "write error" msgstr "erro de escritura" -#: lib/dfa.c:958 +#: lib/dfa.c:970 msgid "unbalanced [" msgstr "[ desemparellado" -#: lib/dfa.c:1079 +#: lib/dfa.c:1091 msgid "invalid character class" -msgstr "clase de caracteres non válida" +msgstr "clase de caracteres incorrecta" -#: lib/dfa.c:1205 +#: lib/dfa.c:1217 msgid "character class syntax is [[:space:]], not [:space:]" msgstr "a sintaxe da clase de caracteres é [[:space:]], non [:space:]" -#: lib/dfa.c:1272 +#: lib/dfa.c:1284 msgid "unfinished \\ escape" msgstr "secuencia de escape \\ sen rematar" -#: lib/dfa.c:1433 -#, fuzzy +#: lib/dfa.c:1445 msgid "invalid content of \\{\\}" -msgstr "Contido non válido de \\{\\}" +msgstr "contido incorrecto de \\{\\}" -#: lib/dfa.c:1436 -#, fuzzy +#: lib/dfa.c:1448 msgid "regular expression too big" -msgstr "A expresión regular é demasiado grande" +msgstr "expresión regular demasiado grande" -#: lib/dfa.c:1850 +#: lib/dfa.c:1863 msgid "unbalanced (" msgstr "( desemparellado" -#: lib/dfa.c:1968 +#: lib/dfa.c:1981 msgid "no syntax specified" msgstr "no se especificou ningunha sintaxe" -#: lib/dfa.c:1976 +#: lib/dfa.c:1992 msgid "unbalanced )" msgstr ") desemparellado" @@ -85,58 +90,58 @@ msgstr "Erro do sistema descoñecido" #: lib/getopt.c:278 -#, fuzzy, c-format +#, c-format msgid "%s: option '%s%s' is ambiguous\n" -msgstr "%s: a opción '-W %s' é ambigua\n" +msgstr "%s: a opción '%s%s' é ambigua\n" #: lib/getopt.c:284 -#, fuzzy, c-format +#, c-format msgid "%s: option '%s%s' is ambiguous; possibilities:" -msgstr "%s: a opción '%s' es ambigua; posibilidades:" +msgstr "%s: a opción '%s%s' é ambigüa; posibilidades:" #: lib/getopt.c:319 -#, fuzzy, c-format +#, c-format msgid "%s: unrecognized option '%s%s'\n" -msgstr "%s: opción non recoñecida '%c%s'\n" +msgstr "%s: non se recoñece a opción '%s%s'\n" #: lib/getopt.c:345 -#, fuzzy, c-format +#, c-format msgid "%s: option '%s%s' doesn't allow an argument\n" -msgstr "%s: a opción '%c%s' non admite ningún argumento\n" +msgstr "%s: a opción '%s%s' non admite ningún argumento\n" #: lib/getopt.c:360 -#, fuzzy, c-format +#, c-format msgid "%s: option '%s%s' requires an argument\n" -msgstr "%s: a opción '--%s' require un argumento\n" +msgstr "%s: a opción '%s%s' require un argumento\n" #: lib/getopt.c:621 #, c-format msgid "%s: invalid option -- '%c'\n" -msgstr "%s: opción non válida -- '%c'\n" +msgstr "%s: a opción -- '%c' non é correcta\n" #: lib/getopt.c:636 lib/getopt.c:682 #, c-format msgid "%s: option requires an argument -- '%c'\n" msgstr "%s: a opción require un argumento -- '%c'\n" -#: lib/obstack.c:338 lib/obstack.c:340 lib/xalloc-die.c:34 src/pcresearch.c:291 +#: lib/obstack.c:338 lib/obstack.c:340 lib/xalloc-die.c:34 src/pcresearch.c:313 msgid "memory exhausted" msgstr "memoria esgotada" #: lib/openat-die.c:38 #, c-format msgid "unable to record current working directory" -msgstr "" +msgstr "non se puido rexistrar o cartafol de traballo activo" #: lib/openat-die.c:57 #, c-format msgid "failed to return to initial working directory" -msgstr "" +msgstr "produciuse un fallo ao volver ao cartafol de traballo inicial" #: lib/xbinary-io.c:37 #, c-format msgid "failed to set file descriptor text/binary mode" -msgstr "" +msgstr "produciuse un fallo ao configurar o modo do descritor texto/binario" #. TRANSLATORS: #. Get translations for open and closing quotation marks. @@ -157,19 +162,19 @@ #. for your locale. #. #. If you don't know what to put here, please see -#. +#. #. and use glyphs suitable for your language. #: lib/quotearg.c:362 msgid "`" -msgstr "\"" +msgstr "«" #: lib/quotearg.c:363 msgid "'" -msgstr "\"" +msgstr "‹" #: lib/regcomp.c:135 msgid "Success" -msgstr "Éxito" +msgstr "Correcto" #: lib/regcomp.c:138 msgid "No match" @@ -177,15 +182,15 @@ #: lib/regcomp.c:141 msgid "Invalid regular expression" -msgstr "Expresión regular non válida" +msgstr "Expresión regular incorrecta" #: lib/regcomp.c:144 msgid "Invalid collation character" -msgstr "Carácter de unión non válido" +msgstr "Carácter de unión incorrecto" #: lib/regcomp.c:147 msgid "Invalid character class name" -msgstr "Nome de clase de caracteres non válido" +msgstr "Nome de clase de caracteres incorrecto" #: lib/regcomp.c:150 msgid "Trailing backslash" @@ -193,28 +198,27 @@ #: lib/regcomp.c:153 msgid "Invalid back reference" -msgstr "Referencia cara atrás non válida" +msgstr "Referencia cara atrás incorrecta" #: lib/regcomp.c:156 -#, fuzzy msgid "Unmatched [, [^, [:, [., or [=" -msgstr "[ ou [^ desemparellado" +msgstr "Desemparellado [, [^, [:, [., ou [=" #: lib/regcomp.c:159 msgid "Unmatched ( or \\(" -msgstr "( ou \\( desemparellado" +msgstr "Desemparellado ( ou \\(" #: lib/regcomp.c:162 msgid "Unmatched \\{" -msgstr "\\{ desemparellado" +msgstr "Desemparellado \\{" #: lib/regcomp.c:165 msgid "Invalid content of \\{\\}" -msgstr "Contido non válido de \\{\\}" +msgstr "Contido incorrecto \\{\\}" #: lib/regcomp.c:168 msgid "Invalid range end" -msgstr "Final de rango non válido" +msgstr "Final de intervalo incorrecto" #: lib/regcomp.c:171 msgid "Memory exhausted" @@ -222,7 +226,7 @@ #: lib/regcomp.c:174 msgid "Invalid preceding regular expression" -msgstr "A expresión regular precedente non é válida" +msgstr "A expresión regular precedente é incorrecta" #: lib/regcomp.c:177 msgid "Premature end of regular expression" @@ -234,18 +238,18 @@ #: lib/regcomp.c:183 msgid "Unmatched ) or \\)" -msgstr ") o \\) desemparellado" +msgstr "Desemparellado ) ou \\)" -#: lib/regcomp.c:687 +#: lib/regcomp.c:688 msgid "No previous regular expression" msgstr "No hai ningunha expresión regular anterior" -#: lib/version-etc.c:74 +#: lib/version-etc.c:73 #, c-format msgid "Packaged by %s (%s)\n" msgstr "Empaquetado por %s (%s)\n" -#: lib/version-etc.c:77 +#: lib/version-etc.c:76 #, c-format msgid "Packaged by %s\n" msgstr "Empaquetado por %s\n" @@ -253,24 +257,25 @@ #. TRANSLATORS: Translate "(C)" to the copyright symbol #. (C-in-a-circle), if this symbol is available in the user's #. locale. Otherwise, do not translate "(C)"; leave it as-is. -#: lib/version-etc.c:84 +#: lib/version-etc.c:83 msgid "(C)" -msgstr "(C)" +msgstr "©" -#: lib/version-etc.c:86 +#: lib/version-etc.c:85 +#, fuzzy msgid "" "\n" -"License GPLv3+: GNU GPL version 3 or later .\n" "This is free software: you are free to change and redistribute it.\n" "There is NO WARRANTY, to the extent permitted by law.\n" "\n" msgstr "" "\n" -"Licencia GPLv3+: GPL de GNU versión 3 ou posterior\n" -"\n" -"Isto é software libre: vostede é libre de cambialo e redistribuilo.\n" -"Non hai NINGUNHA GARANTÍA, até onde permite a ley.\n" +"Licenza GPLv3+: GPL de GNU versión 3 ou posterior .\n" +"Isto é software libre: vostede é libre de modificalo e redistribuílo.\n" +"Non hai NINGUNHA GARANT͍A, ata onde o permite a lei.\n" #. TRANSLATORS: %s denotes an author name. #: lib/version-etc.c:102 @@ -391,145 +396,139 @@ "Report bugs to: %s\n" msgstr "" "\n" -"Comunicar erros no programa a: %s\n" +"Comunicar erros no programa en: %s\n" #: lib/version-etc.c:247 #, c-format msgid "Report %s bugs to: %s\n" -msgstr "Comunicar erros sobre %s a: %s\n" +msgstr "Comunicar erros de %s en: %s\n" #: lib/version-etc.c:251 #, c-format msgid "%s home page: <%s>\n" -msgstr "Páxina web de %s: <%s>\n" +msgstr "Páxina de web de %s: <%s>\n" #: lib/version-etc.c:253 -#, c-format -msgid "%s home page: \n" -msgstr "páxina web de %s: \n" +#, fuzzy, c-format +msgid "%s home page: \n" +msgstr "Páxina de web de %s: \n" #: lib/version-etc.c:256 -msgid "General help using GNU software: \n" +#, fuzzy +msgid "General help using GNU software: \n" msgstr "" "Axuda xeral sobre o uso de software de GNU: \n" #: lib/xstrtol-error.c:63 -#, fuzzy, c-format +#, c-format msgid "invalid %s%s argument '%s'" -msgstr "argumento %s%s non válido `%s'" +msgstr "argumento %s%s incorrect ‹%s›" #: lib/xstrtol-error.c:68 -#, fuzzy, c-format +#, c-format msgid "invalid suffix in %s%s argument '%s'" -msgstr "sufixo non válido no argumento %s%s `%s'" +msgstr "sufixo incorrecto no %s%s argumento ‹%s›" #: lib/xstrtol-error.c:72 -#, fuzzy, c-format +#, c-format msgid "%s%s argument '%s' too large" -msgstr "%s%s argumento `%s' demasiado grande" - -#. This is a proper name. See the gettext manual, section Names. -#: src/grep.c:59 -msgid "Mike Haertel" -msgstr "Mike Haertel" - -#: src/grep.c:60 -msgid "others, see " -msgstr "outros, véase " +msgstr "%s%s argumento ‹%s› demasiado grande" -#: src/grep.c:585 +#: src/grep.c:582 msgid "(standard input)" msgstr "(entrada estándar)" -#: src/grep.c:765 +#: src/grep.c:762 msgid "invalid context length argument" -msgstr "argumento de lonxitude do contexto non vlido" +msgstr "argumento de lonxitude do contexto incorrecto" -#: src/grep.c:828 +#: src/grep.c:827 msgid "input is too large to count" -msgstr "a entrada longa de mis para contala" +msgstr "a entrada é longa de máis para facer a conta" -#: src/grep.c:1579 +#: src/grep.c:1578 #, c-format msgid "Binary file %s matches\n" -msgstr "Arquivo binario %s aparicins\n" +msgstr "Ficheiro binario %s coincidencias\n" -#: src/grep.c:1627 +#: src/grep.c:1626 #, c-format msgid "warning: %s: %s" msgstr "atención: %s: %s" -#: src/grep.c:1628 +#: src/grep.c:1627 msgid "recursive directory loop" -msgstr "ciclo de directorios recursivo" +msgstr "ciclo de cartafoles recursivo" -#: src/grep.c:1844 +#: src/grep.c:1843 #, c-format msgid "input file %s is also the output" -msgstr "o fichero de entrada %s tamén é o de salida" - -#: src/grep.c:1907 src/grep.c:1914 -#, c-format -msgid "Usage: %s [OPTION]... PATTERN [FILE]...\n" -msgstr "Emprego: %s [OPCIN]... PATRN [FICHEIRO]...\n" +msgstr "o ficheiro de entrada %s tamén é o de saída" -#: src/grep.c:1909 +#: src/grep.c:1906 src/grep.c:1913 #, fuzzy, c-format +msgid "Usage: %s [OPTION]... PATTERNS [FILE]...\n" +msgstr "Utilización: %s [OPCIÓN]... PATRÓN [FICHEIRO]...\n" + +#: src/grep.c:1908 +#, c-format msgid "Try '%s --help' for more information.\n" -msgstr "Escriba `%s --help' para mis informacin.\n" +msgstr "Consulte con ‹%s --help› para máis información.\n" -#: src/grep.c:1915 +#: src/grep.c:1914 #, fuzzy, c-format -msgid "Search for PATTERN in each FILE.\n" +msgid "Search for PATTERNS in each FILE.\n" msgstr "Busca PATRÓN en cada FICHERO ou na entrada estándar.\n" -#: src/grep.c:1916 +#: src/grep.c:1915 #, fuzzy, c-format msgid "" "Example: %s -i 'hello world' menu.h main.c\n" +"PATTERNS can contain multiple patterns separated by newlines.\n" "\n" "Pattern selection and interpretation:\n" msgstr "" -"Exemplo: %s -i 'hello world' menu.h main.c\n" +"Exemplo: %s -i «hello world» menu.h main.c\n" "\n" -"Selección e interpretación de Expreg:\n" +"Selección e interpretación de patrón:\n" #: src/grep.c:1920 #, fuzzy, c-format msgid "" -" -E, --extended-regexp PATTERN is an extended regular expression\n" -" -F, --fixed-strings PATTERN is a set of newline-separated strings\n" -" -G, --basic-regexp PATTERN is a basic regular expression (default)\n" -" -P, --perl-regexp PATTERN is a Perl regular expression\n" -msgstr "" -" -E, --extended-regexp PATRÓN é unha expresión regular estendida (ERE)\n" -" -F, --fixed-strings PATRÓN é un conxunto de cadenas separadas por\n" -" caracteres de nova liña\n" -" -G, --basic-regexp PATRÓN é unha expresión regular básica (BRE)\n" -" -P, --perl-regexp PATRÓN é unha expresión regular en Perl\n" +" -E, --extended-regexp PATTERNS are extended regular expressions\n" +" -F, --fixed-strings PATTERNS are strings\n" +" -G, --basic-regexp PATTERNS are basic regular expressions\n" +" -P, --perl-regexp PATTERNS are Perl regular expressions\n" +msgstr "" +" -E, --extended-regexp O PATRÓN é unha expresión regular estendida " +"(ERE)\n" +" -F, --fixed-strings O PATRÓN é un conxunto de cadeas separadas por " +"caracteres de nova liña\n" +" -G, --basic-regexp O PATRÓN é unha expresión regular básica (BRE)\n" +" -P, --perl-regexp O PATRÓN é unha expresión regular en Perl\n" #: src/grep.c:1926 -#, c-format +#, fuzzy, c-format msgid "" -" -e, --regexp=PATTERN use PATTERN for matching\n" -" -f, --file=FILE obtain PATTERN from FILE\n" +" -e, --regexp=PATTERNS use PATTERNS for matching\n" +" -f, --file=FILE take PATTERNS from FILE\n" " -i, --ignore-case ignore case distinctions\n" -" -w, --word-regexp force PATTERN to match only whole words\n" -" -x, --line-regexp force PATTERN to match only whole lines\n" +" -w, --word-regexp match only whole words\n" +" -x, --line-regexp match only whole lines\n" " -z, --null-data a data line ends in 0 byte, not newline\n" msgstr "" -" -e, --regexp=PATRÓN utiliza PATRÓN como expresión regular\n" -" -f, --file=FICHERO obtén PATRÓN de FICHEIRO\n" -" -i, --ignore-case considera iguais maiúsculas e minúsculas\n" -" -w, --word-regexp obriga a que PATRÓN coincida só con\n" -" palabras completas\n" -" -x, --line-regexp obriga a que PATRÓN coincida só con\n" -" liñas completas\n" -" -z, --null-data unha liña de datos termina nun byte 0, non\n" -" nun carácter de nova liña\n" +" -e, --regexp=PATRÓN utiliza PATRÓN para atopar coincidencias\n" +" -f, --file=FICHEIRO obtén PATRÓN de FICHEIRO\n" +" -i, --ignore-case considera iguais as maiúsculas e as minúsculas\n" +" -w, --word-regexp obriga a que o PATRÓN coincida só con palabras " +"completas\n" +" -x, --line-regexp obriga a que o PATRÓN coincida só con liñas " +"completas\n" +" -z, --null-data unha liña de datos termina nun byte 0, non nun " +"carácter de nova liña\n" #: src/grep.c:1933 -#, fuzzy, c-format +#, c-format msgid "" "\n" "Miscellaneous:\n" @@ -542,12 +541,11 @@ "Variadas:\n" " -s, --no-messages suprime as mensaxes de erro\n" " -v, --invert-match selecciona as liñas que non coinciden\n" -" -V, --version mostra a versión e finaliza\n" -" --help mostra esta axuda e finaliza\n" -" --mmap descártase para compatibilidade cara atrás\n" +" -V, --version amosa a versión e finaliza\n" +" --help amosa esta axuda e finaliza\n" #: src/grep.c:1940 -#, fuzzy, c-format +#, c-format msgid "" "\n" "Output control:\n" @@ -561,38 +559,38 @@ "prefix\n" msgstr "" "\n" -"Control do resultado:\n" -" -m, --max-count=NÚM detense despois de NÚM coincidencias\n" -" -b, --byte-offset mostra o desprazamento en bytes xunto\n" -" coas liñas de saída\n" -" -n, --line-number mostra o número de liña xunto coas\n" -" liñas de saída\n" +"Control da saída como resultado:\n" +" -m, --max-count=NUM detense despois do NUM de liñas seleccionadas\n" +" -b, --byte-offset amosa o desprazamento en bytes xunto coas liñas " +"de saí­da\n" +" -n, --line-number amosa o número de liña xunto coas liñas de saí­" +"da\n" " --line-buffered descarga o resultado para cada liña\n" -" -H, --with-filename mostra o nome do ficheiro para cada\n" -" coincidencia\n" -" -h, --no-filename suprime os nomes dos ficheiros como prefixo\n" -" no resultado\n" -" --label=ETIQUETA utiliza ETIQUETA como nome de ficheiro prefixo\n" -" para a entrada estándar\n" +" -H, --with-filename amosa o nome do ficheiro de cada coincidencia\n" +" -h, --no-filename suprime os nomes dos ficheiros como prefixo no " +"resultado\n" +" --label=ETIQUETA utiliza ETIQUETA como prefixo estándar do nome " +"de ficheiro\n" #: src/grep.c:1951 #, fuzzy, c-format msgid "" -" -o, --only-matching show only the part of a line matching PATTERN\n" +" -o, --only-matching show only nonempty parts of lines that match\n" " -q, --quiet, --silent suppress all normal output\n" " --binary-files=TYPE assume that binary files are TYPE;\n" " TYPE is 'binary', 'text', or 'without-match'\n" " -a, --text equivalent to --binary-files=text\n" msgstr "" -" -o, --only-matching mostra só a parte dunha liña que\n" -" coincide con PATRÓN\n" +" -o, --only-matching amosa só a parte dunha liña que coincide co " +"PATRÓN\n" " -q, --quiet, --silent suprime todo o resultado normal\n" -" --binary-files=TIPO supón que os ficheros binarios son TIPO\n" -" TIPO é `binary', `text', ou `without-match'\n" -" -a, --text equivalente a --binary-files=text\n" +" --binary-files=TIPO supón que os ficheros binarios son de TIPO;\n" +" TIPO é ‹binario›, ‹texto›, ou ‹sen-" +"coincidencia›\n" +" -a, --text equivalente a --binary-files=texto\n" #: src/grep.c:1958 -#, fuzzy, c-format +#, c-format msgid "" " -I equivalent to --binary-files=without-match\n" " -d, --directories=ACTION how to handle directories;\n" @@ -602,34 +600,33 @@ " -r, --recursive like --directories=recurse\n" " -R, --dereference-recursive likewise, but follow all symlinks\n" msgstr "" -" -I equivalente a --binary-files=without-match\n" -" -d, --directories=ACCIÓN especifica como manexar os directorios\n" -" ACCIÓN é 'read', 'recurse', o 'skip'\n" -" -D, --devices=ACCIÓN especifica cómo manexar dispositivos, FIFOs e\n" -" `sockets', pode ser 'read' ou 'skip'\n" -" -R, -r, --recursive equivalente a --directories=recurse\n" +" -I equivalente a --binary-files=sen-coincidencia\n" +" -d, --directories=ACCIÓN especifica como manexar os cartafoles\n" +" ACCIÓN pode ser ‹ler›, ‹recursivo›, ou ‹omitir›\n" +" -D, --devices=ACCIÓN especifica como manexar dispositivos, FIFO e\n" +" ‹sockets›, pode ser ‹ler› ou ‹omitir›\n" +" -R, -r, --recursive equivalente a --directories=recursivo\n" #: src/grep.c:1967 -#, c-format +#, fuzzy, c-format msgid "" -" --include=FILE_PATTERN search only files that match FILE_PATTERN\n" -" --exclude=FILE_PATTERN skip files and directories matching " -"FILE_PATTERN\n" +" --include=GLOB search only files that match GLOB (a file " +"pattern)\n" +" --exclude=GLOB skip files and directories matching GLOB\n" " --exclude-from=FILE skip files matching any file pattern from FILE\n" -" --exclude-dir=PATTERN directories that match PATTERN will be " -"skipped.\n" +" --exclude-dir=GLOB skip directories that match GLOB\n" msgstr "" -" --include=PATRÓN examina os ficheiros que coinciden con PATRÓN\n" -" --exclude=PATRÓN omítense os ficheiros que coinciden con " -"PATRÓN\n" -" --exclude-from=FICHEIRO omítense os ficheiros que coinciden cos " -"patróns\n" -" de FICHEIRO\n" -" --exclude-dir=PATRÓN omítense os directorios que coinciden con " +" --include=PATRÓN_FICHEIRO busca os ficheiros que coinciden con " +"PATRÓN_FICHEIRO\n" +" --exclude=PATRÓN omí­tense os ficheiros e cartafoles que " +"coinciden con PATRÓN_FICHEIRO\n" +" --exclude-from=FICHEIRO omí­tense os ficheiros que coinciden con " +"calquera patrón de ficheiro de FICHEIRO\n" +" --exclude-dir=PATRÓN omí­tense os cartafoles que coinciden con " "PATRÓN\n" #: src/grep.c:1974 -#, fuzzy, c-format +#, c-format msgid "" " -L, --files-without-match print only names of FILEs with no selected " "lines\n" @@ -638,12 +635,12 @@ " -T, --initial-tab make tabs line up (if needed)\n" " -Z, --null print 0 byte after FILE name\n" msgstr "" -" -L, --files-without-match mostra só os nomes de FICHEIROs\n" -" que no contienen ninguna coincidencia\n" -" -l, --files-with-matches mostra só os nomes de FICHEIROs\n" -" que conteñen algunha coincidencia\n" -" -c, --count mostra só o total de liñas que coinciden\n" -" por cada FICHEIRO\n" +" -L, --files-without-match amosa só os nomes dos FICHEIROS que no conteñen " +"ningunha coincidencia\n" +" -l, --files-with-matches amosa só os nomes de FICHEIROS que conteñen " +"algunha coincidencia\n" +" -c, --count amosa só resultado de liñas que coinciden de " +"cada FICHEIRO\n" " -Z, --null imprime un byte 0 despois do nome do FICHEIRO\n" #: src/grep.c:1980 @@ -657,12 +654,12 @@ msgstr "" "\n" "Control do contexto:\n" -" -B, --before-context=NÚM mostra NÚM liñas de contexto anterior\n" -" -A, --after-context=NÚM mostra NÚM liñas de contexto posterior\n" -" -C, --context=NÚM mostra NÚM liñas de contexto\n" +" -B, --before-context=NÚM amosa o NÚM de liñas de contexto anterior\n" +" -A, --after-context=NÚM amosa o NÚM de liñas de contexto posterior\n" +" -C, --context=NÚM amosa o NÚM liñas de contexto\n" #: src/grep.c:1987 -#, fuzzy, c-format +#, c-format msgid "" " -NUM same as --context=NUM\n" " --color[=WHEN],\n" @@ -672,129 +669,120 @@ "Windows)\n" "\n" msgstr "" -" -NÚM o mesmo que --context=NÚM\n" +" -NUM o mesmo que --context=NUM\n" " --color[=CANDO],\n" -" --colour[=CANDO] distingue con marcadores a cadea que encaixa\n" -" CANDO puede ser `always', `never' ou `auto'.\n" -" -U, --binary non elimina os caracteres de retorno de carro\n" -" finais de liña (MSDOS)\n" -" -u, --unix-byte-offsets conta os desprazamentos como se non houbera\n" -" retornos de carro (MSDOS)\n" +" --colour[=CANDO] distingue con marcadores a cadea que encaixa; " +"CANDO pode ser ‹sempre›, ‹nunca› ou ‹auto›.\n" +" -U, --binary non elimina os caracteres de retorno de liña " +"(MSDOS/Windows)\n" #: src/grep.c:1994 #, fuzzy, c-format msgid "" "When FILE is '-', read standard input. With no FILE, read '.' if\n" "recursive, '-' otherwise. With fewer than two FILEs, assume -h.\n" -"Exit status is 0 if any line is selected, 1 otherwise;\n" +"Exit status is 0 if any line (or file if -L) is selected, 1 otherwise;\n" "if any error occurs and -q is not given, the exit status is 2.\n" msgstr "" -"Se non se especifica ningún FICHERO, ou cando FICHERO é -, lee a entrada\n" -"estándar. Se se dan menos de dous FICHEROs, suponse -h. O estado de saída\n" -"é 0 se hai coincidencias, 1 se non as hai; se se produce algún error e non \n" -"se especificou -q, o estado de saída é 2.\n" +"De non especificar ningún FICHEIRO, ou cando o FICHEIRO é ‹-›,\n" +"lee a entrada estándar. De se dar menos de dous FICHEIROS, suponse -h.\n" +"O estado de saí­da é 0 se hai coincidencias nalgunha liña, 1 se non as hai;\n" +"de se producir algún erro e asemade non se especificou -q,\n" +"o estado de saí­da é 2.\n" #: src/grep.c:2034 msgid "conflicting matchers specified" -msgstr "especificronse patrns conflictivos" +msgstr "especificáronse expresión conflitivas" #: src/grep.c:2038 #, c-format msgid "invalid matcher %s" -msgstr "expresión non válida %s" +msgstr "a expresión %s non é correcta" -#: src/grep.c:2458 +#: src/grep.c:2459 #, c-format msgid "warning: GREP_OPTIONS is deprecated; please use an alias or script" -msgstr "" +msgstr "aviso: GREP_OPTIONS está obsoleto; utilice un alias ou un script" -#: src/grep.c:2485 +#: src/grep.c:2486 msgid "unknown devices method" msgstr "método de dispositivos descoñecido" -#: src/grep.c:2629 +#: src/grep.c:2630 msgid "invalid max count" -msgstr "contador máximo non válido" +msgstr "contador máximo incorrecto" -#: src/grep.c:2687 +#: src/grep.c:2688 msgid "unknown binary-files type" msgstr "tipo binary-files descoñecido" -#: src/pcresearch.c:80 +#: src/grep.c:2770 +#, fuzzy +msgid "" +"Written by Mike Haertel and others; see\n" +"." +msgstr "outros, véxase " + +#: src/pcresearch.c:86 msgid "failed to allocate memory for the PCRE JIT stack" -msgstr "" +msgstr "ao tentar dispoñer de memoria produciuse un erro para a pila PCRE JIT" -#: src/pcresearch.c:97 +#: src/pcresearch.c:118 msgid "" "support for the -P option is not compiled into this --disable-perl-regexp " "binary" msgstr "" -"a compatibilidade para a opción -P non está compilada neste executábel --" +"a compatibilidade coa opción -P non está compilada neste executábel --" "disable-perl-regexp" -#: src/pcresearch.c:119 +#: src/pcresearch.c:140 msgid "-P supports only unibyte and UTF-8 locales" -msgstr "" +msgstr "-P admite só locales unibyte e UTF-8" -#: src/pcresearch.c:125 +#: src/pcresearch.c:146 msgid "the -P option only supports a single pattern" -msgstr "a opción -P só admite un patrón" +msgstr "a opción -P admite só un patrón" -#: src/pcresearch.c:167 +#: src/pcresearch.c:189 msgid "internal error (should never happen)" -msgstr "" +msgstr "erro interno (non debería ocorrer nunca)" -#: src/pcresearch.c:192 +#: src/pcresearch.c:214 msgid "internal error" msgstr "erro interno" -#: src/pcresearch.c:215 -#, fuzzy +#: src/pcresearch.c:237 msgid "exceeded PCRE's line length limit" -msgstr "excedeuse o límite de volta atrás das PCREs" +msgstr "excedeuse o tamaño lí­mite das liñas PCRE" -#: src/pcresearch.c:295 +#: src/pcresearch.c:317 msgid "exhausted PCRE JIT stack" -msgstr "" +msgstr "esgotouse a pila PCRE JIT" -#: src/pcresearch.c:299 +#: src/pcresearch.c:321 msgid "exceeded PCRE's backtracking limit" -msgstr "excedeuse o límite de volta atrás das PCREs" +msgstr "excedeuse o lí­mite de volta atrás das PCREs" -#: src/pcresearch.c:306 -#, fuzzy, c-format +#: src/pcresearch.c:328 +#, c-format msgid "internal PCRE error: %d" -msgstr "erro interno" +msgstr "erro interno de PCRE: %d" + +#~ msgid "Mike Haertel" +#~ msgstr "Mike Haertel" #~ msgid "%s: option '--%s' doesn't allow an argument\n" -#~ msgstr "%s: a opción '--%s' non admite ningún argumento\n" +#~ msgstr "%s: a opción '--%s' non admite ningíºn argumento\n" #~ msgid "%s: unrecognized option '--%s'\n" #~ msgstr "%s: opción non recoñecida '--%s'\n" -#~ msgid "%s: option '-W %s' is ambiguous\n" -#~ msgstr "%s: a opción '-W %s' é ambigua\n" - #~ msgid "%s: option '-W %s' doesn't allow an argument\n" -#~ msgstr "%s: a opción '-W %s' non admite ningún argumento\n" +#~ msgstr "%s: a opción '-W %s' non admite ningíºn argumento\n" #~ msgid "%s: option '-W %s' requires an argument\n" #~ msgstr "%s: a opción '-W %s' require un argumento\n" -#~ msgid "PATTERN is, by default, a basic regular expression (BRE).\n" -#~ msgstr "PATRÓN é, por omisión, unha expresión regular básica (BRE).\n" - -#, fuzzy -#~ msgid "" -#~ "'egrep' means 'grep -E'. 'fgrep' means 'grep -F'.\n" -#~ "Direct invocation as either 'egrep' or 'fgrep' is deprecated.\n" -#~ msgstr "" -#~ "`egrep' significa `grep -E'. `fgrep' significa `grep -F'.\n" -#~ "A invocación directa como `egrep' ou `fgrep' está obsoleta.\n" - -#~ msgid "lseek failed" -#~ msgstr "fallou a chamada ao sistema `lskeek'" - #~ msgid "unfinished repeat count" #~ msgstr "contador de repetición sen rematar" @@ -815,6 +803,19 @@ #~ msgstr "" #~ "A invocación como `fgrep' está obsoleta; utilice `grep -F' no seu lugar.\n" +#~ msgid "PATTERN is, by default, a basic regular expression (BRE).\n" +#~ msgstr "PATRÓN é, por omisión, unha expresión regular básica (BRE).\n" + +#~ msgid "" +#~ "`egrep' means `grep -E'. `fgrep' means `grep -F'.\n" +#~ "Direct invocation as either `egrep' or `fgrep' is deprecated.\n" +#~ msgstr "" +#~ "`egrep' significa `grep -E'. `fgrep' significa `grep -F'.\n" +#~ "A invocación directa como `egrep' ou `fgrep' está obsoleta.\n" + +#~ msgid "lseek failed" +#~ msgstr "fallou a chamada ao sistema `lskeek'" + #~ msgid "writing output" #~ msgstr "escribiendo o resultado" @@ -845,7 +846,7 @@ #~ "stopped processing of ill-formed GREP_COLORS=\"%s\" at remaining " #~ "substring \"%s\"" #~ msgstr "" -#~ "o proceso do erróneo GREP_COLORS=\"%s\" detívose na subcadena \"%s\"." +#~ "o proceso do erróneo GREP_COLORS=\"%s\" detí­vose na subcadena \"%s\"." #~ msgid "out of memory" #~ msgstr "memoria esgotada" diff -Nru grep-3.1/po/grep.pot grep-3.3/po/grep.pot --- grep-3.1/po/grep.pot 2017-07-02 20:21:16.000000000 +0000 +++ grep-3.3/po/grep.pot 2018-12-21 04:39:02.000000000 +0000 @@ -6,9 +6,9 @@ #, fuzzy msgid "" msgstr "" -"Project-Id-Version: GNU grep 3.1\n" +"Project-Id-Version: GNU grep 3.3\n" "Report-Msgid-Bugs-To: bug-grep@gnu.org\n" -"POT-Creation-Date: 2017-07-02 13:21-0700\n" +"POT-Creation-Date: 2018-12-20 20:39-0800\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -31,43 +31,51 @@ msgid "Valid arguments are:" msgstr "" -#: lib/closeout.c:122 src/grep.c:1274 +#: lib/c-stack.c:208 lib/c-stack.c:301 +msgid "program error" +msgstr "" + +#: lib/c-stack.c:209 lib/c-stack.c:302 +msgid "stack overflow" +msgstr "" + +#: lib/closeout.c:122 src/grep.c:1273 msgid "write error" msgstr "" -#: lib/dfa.c:958 +#: lib/dfa.c:970 msgid "unbalanced [" msgstr "" -#: lib/dfa.c:1079 +#: lib/dfa.c:1091 msgid "invalid character class" msgstr "" -#: lib/dfa.c:1205 +#: lib/dfa.c:1217 msgid "character class syntax is [[:space:]], not [:space:]" msgstr "" -#: lib/dfa.c:1272 +#: lib/dfa.c:1284 msgid "unfinished \\ escape" msgstr "" -#: lib/dfa.c:1433 +#: lib/dfa.c:1445 msgid "invalid content of \\{\\}" msgstr "" -#: lib/dfa.c:1436 +#: lib/dfa.c:1448 msgid "regular expression too big" msgstr "" -#: lib/dfa.c:1850 +#: lib/dfa.c:1863 msgid "unbalanced (" msgstr "" -#: lib/dfa.c:1968 +#: lib/dfa.c:1981 msgid "no syntax specified" msgstr "" -#: lib/dfa.c:1976 +#: lib/dfa.c:1992 msgid "unbalanced )" msgstr "" @@ -110,7 +118,7 @@ msgid "%s: option requires an argument -- '%c'\n" msgstr "" -#: lib/obstack.c:338 lib/obstack.c:340 lib/xalloc-die.c:34 src/pcresearch.c:291 +#: lib/obstack.c:338 lib/obstack.c:340 lib/xalloc-die.c:34 src/pcresearch.c:313 msgid "memory exhausted" msgstr "" @@ -148,7 +156,7 @@ #. for your locale. #. #. If you don't know what to put here, please see -#. +#. #. and use glyphs suitable for your language. #: lib/quotearg.c:362 msgid "`" @@ -226,16 +234,16 @@ msgid "Unmatched ) or \\)" msgstr "" -#: lib/regcomp.c:687 +#: lib/regcomp.c:688 msgid "No previous regular expression" msgstr "" -#: lib/version-etc.c:74 +#: lib/version-etc.c:73 #, c-format msgid "Packaged by %s (%s)\n" msgstr "" -#: lib/version-etc.c:77 +#: lib/version-etc.c:76 #, c-format msgid "Packaged by %s\n" msgstr "" @@ -243,14 +251,14 @@ #. TRANSLATORS: Translate "(C)" to the copyright symbol #. (C-in-a-circle), if this symbol is available in the user's #. locale. Otherwise, do not translate "(C)"; leave it as-is. -#: lib/version-etc.c:84 +#: lib/version-etc.c:83 msgid "(C)" msgstr "" -#: lib/version-etc.c:86 +#: lib/version-etc.c:85 msgid "" "\n" -"License GPLv3+: GNU GPL version 3 or later .\n" "This is free software: you are free to change and redistribute it.\n" "There is NO WARRANTY, to the extent permitted by law.\n" @@ -371,11 +379,11 @@ #: lib/version-etc.c:253 #, c-format -msgid "%s home page: \n" +msgid "%s home page: \n" msgstr "" #: lib/version-etc.c:256 -msgid "General help using GNU software: \n" +msgid "General help using GNU software: \n" msgstr "" #: lib/xstrtol-error.c:63 @@ -393,65 +401,57 @@ msgid "%s%s argument '%s' too large" msgstr "" -#. This is a proper name. See the gettext manual, section Names. -#: src/grep.c:59 -msgid "Mike Haertel" -msgstr "" - -#: src/grep.c:60 -msgid "others, see " -msgstr "" - -#: src/grep.c:585 +#: src/grep.c:582 msgid "(standard input)" msgstr "" -#: src/grep.c:765 +#: src/grep.c:762 msgid "invalid context length argument" msgstr "" -#: src/grep.c:828 +#: src/grep.c:827 msgid "input is too large to count" msgstr "" -#: src/grep.c:1579 +#: src/grep.c:1578 #, c-format msgid "Binary file %s matches\n" msgstr "" -#: src/grep.c:1627 +#: src/grep.c:1626 #, c-format msgid "warning: %s: %s" msgstr "" -#: src/grep.c:1628 +#: src/grep.c:1627 msgid "recursive directory loop" msgstr "" -#: src/grep.c:1844 +#: src/grep.c:1843 #, c-format msgid "input file %s is also the output" msgstr "" -#: src/grep.c:1907 src/grep.c:1914 +#: src/grep.c:1906 src/grep.c:1913 #, c-format -msgid "Usage: %s [OPTION]... PATTERN [FILE]...\n" +msgid "Usage: %s [OPTION]... PATTERNS [FILE]...\n" msgstr "" -#: src/grep.c:1909 +#: src/grep.c:1908 #, c-format msgid "Try '%s --help' for more information.\n" msgstr "" -#: src/grep.c:1915 +#: src/grep.c:1914 #, c-format -msgid "Search for PATTERN in each FILE.\n" +msgid "Search for PATTERNS in each FILE.\n" msgstr "" -#: src/grep.c:1916 +#: src/grep.c:1915 #, c-format msgid "" "Example: %s -i 'hello world' menu.h main.c\n" +"PATTERNS can contain multiple patterns separated by newlines.\n" "\n" "Pattern selection and interpretation:\n" msgstr "" @@ -459,20 +459,20 @@ #: src/grep.c:1920 #, c-format msgid "" -" -E, --extended-regexp PATTERN is an extended regular expression\n" -" -F, --fixed-strings PATTERN is a set of newline-separated strings\n" -" -G, --basic-regexp PATTERN is a basic regular expression (default)\n" -" -P, --perl-regexp PATTERN is a Perl regular expression\n" +" -E, --extended-regexp PATTERNS are extended regular expressions\n" +" -F, --fixed-strings PATTERNS are strings\n" +" -G, --basic-regexp PATTERNS are basic regular expressions\n" +" -P, --perl-regexp PATTERNS are Perl regular expressions\n" msgstr "" #: src/grep.c:1926 #, c-format msgid "" -" -e, --regexp=PATTERN use PATTERN for matching\n" -" -f, --file=FILE obtain PATTERN from FILE\n" +" -e, --regexp=PATTERNS use PATTERNS for matching\n" +" -f, --file=FILE take PATTERNS from FILE\n" " -i, --ignore-case ignore case distinctions\n" -" -w, --word-regexp force PATTERN to match only whole words\n" -" -x, --line-regexp force PATTERN to match only whole lines\n" +" -w, --word-regexp match only whole words\n" +" -x, --line-regexp match only whole lines\n" " -z, --null-data a data line ends in 0 byte, not newline\n" msgstr "" @@ -505,7 +505,7 @@ #: src/grep.c:1951 #, c-format msgid "" -" -o, --only-matching show only the part of a line matching PATTERN\n" +" -o, --only-matching show only nonempty parts of lines that match\n" " -q, --quiet, --silent suppress all normal output\n" " --binary-files=TYPE assume that binary files are TYPE;\n" " TYPE is 'binary', 'text', or 'without-match'\n" @@ -527,12 +527,11 @@ #: src/grep.c:1967 #, c-format msgid "" -" --include=FILE_PATTERN search only files that match FILE_PATTERN\n" -" --exclude=FILE_PATTERN skip files and directories matching " -"FILE_PATTERN\n" +" --include=GLOB search only files that match GLOB (a file " +"pattern)\n" +" --exclude=GLOB skip files and directories matching GLOB\n" " --exclude-from=FILE skip files matching any file pattern from FILE\n" -" --exclude-dir=PATTERN directories that match PATTERN will be " -"skipped.\n" +" --exclude-dir=GLOB skip directories that match GLOB\n" msgstr "" #: src/grep.c:1974 @@ -573,7 +572,7 @@ msgid "" "When FILE is '-', read standard input. With no FILE, read '.' if\n" "recursive, '-' otherwise. With fewer than two FILEs, assume -h.\n" -"Exit status is 0 if any line is selected, 1 otherwise;\n" +"Exit status is 0 if any line (or file if -L) is selected, 1 otherwise;\n" "if any error occurs and -q is not given, the exit status is 2.\n" msgstr "" @@ -586,62 +585,68 @@ msgid "invalid matcher %s" msgstr "" -#: src/grep.c:2458 +#: src/grep.c:2459 #, c-format msgid "warning: GREP_OPTIONS is deprecated; please use an alias or script" msgstr "" -#: src/grep.c:2485 +#: src/grep.c:2486 msgid "unknown devices method" msgstr "" -#: src/grep.c:2629 +#: src/grep.c:2630 msgid "invalid max count" msgstr "" -#: src/grep.c:2687 +#: src/grep.c:2688 msgid "unknown binary-files type" msgstr "" -#: src/pcresearch.c:80 +#: src/grep.c:2770 +msgid "" +"Written by Mike Haertel and others; see\n" +"." +msgstr "" + +#: src/pcresearch.c:86 msgid "failed to allocate memory for the PCRE JIT stack" msgstr "" -#: src/pcresearch.c:97 +#: src/pcresearch.c:118 msgid "" "support for the -P option is not compiled into this --disable-perl-regexp " "binary" msgstr "" -#: src/pcresearch.c:119 +#: src/pcresearch.c:140 msgid "-P supports only unibyte and UTF-8 locales" msgstr "" -#: src/pcresearch.c:125 +#: src/pcresearch.c:146 msgid "the -P option only supports a single pattern" msgstr "" -#: src/pcresearch.c:167 +#: src/pcresearch.c:189 msgid "internal error (should never happen)" msgstr "" -#: src/pcresearch.c:192 +#: src/pcresearch.c:214 msgid "internal error" msgstr "" -#: src/pcresearch.c:215 +#: src/pcresearch.c:237 msgid "exceeded PCRE's line length limit" msgstr "" -#: src/pcresearch.c:295 +#: src/pcresearch.c:317 msgid "exhausted PCRE JIT stack" msgstr "" -#: src/pcresearch.c:299 +#: src/pcresearch.c:321 msgid "exceeded PCRE's backtracking limit" msgstr "" -#: src/pcresearch.c:306 +#: src/pcresearch.c:328 #, c-format msgid "internal PCRE error: %d" msgstr "" Binary files /tmp/tmppJ6Y2n/6jFha9hbxv/grep-3.1/po/he.gmo and /tmp/tmppJ6Y2n/tYMwNxGD36/grep-3.3/po/he.gmo differ diff -Nru grep-3.1/po/he.po grep-3.3/po/he.po --- grep-3.1/po/he.po 2017-07-02 20:21:16.000000000 +0000 +++ grep-3.3/po/he.po 2018-12-21 04:39:02.000000000 +0000 @@ -6,7 +6,7 @@ msgstr "" "Project-Id-Version: grep 2.5.1a\n" "Report-Msgid-Bugs-To: bug-grep@gnu.org\n" -"POT-Creation-Date: 2017-07-02 13:21-0700\n" +"POT-Creation-Date: 2018-12-20 20:39-0800\n" "PO-Revision-Date: 2005-03-04 14:55+0200\n" "Last-Translator: Eli Zaretskii \n" "Language-Team: Hebrew \n" @@ -30,48 +30,56 @@ msgid "Valid arguments are:" msgstr "" -#: lib/closeout.c:122 src/grep.c:1274 +#: lib/c-stack.c:208 lib/c-stack.c:301 +msgid "program error" +msgstr "" + +#: lib/c-stack.c:209 lib/c-stack.c:302 +msgid "stack overflow" +msgstr "" + +#: lib/closeout.c:122 src/grep.c:1273 msgid "write error" msgstr "" -#: lib/dfa.c:958 +#: lib/dfa.c:970 #, fuzzy msgid "unbalanced [" msgstr "- [" -#: lib/dfa.c:1079 +#: lib/dfa.c:1091 msgid "invalid character class" msgstr "" -#: lib/dfa.c:1205 +#: lib/dfa.c:1217 msgid "character class syntax is [[:space:]], not [:space:]" msgstr "" -#: lib/dfa.c:1272 +#: lib/dfa.c:1284 #, fuzzy msgid "unfinished \\ escape" msgstr "- \\ " -#: lib/dfa.c:1433 +#: lib/dfa.c:1445 #, fuzzy msgid "invalid content of \\{\\}" msgstr " " -#: lib/dfa.c:1436 +#: lib/dfa.c:1448 msgid "regular expression too big" msgstr "" -#: lib/dfa.c:1850 +#: lib/dfa.c:1863 #, fuzzy msgid "unbalanced (" msgstr "- (" -#: lib/dfa.c:1968 +#: lib/dfa.c:1981 #, fuzzy msgid "no syntax specified" msgstr " " -#: lib/dfa.c:1976 +#: lib/dfa.c:1992 #, fuzzy msgid "unbalanced )" msgstr "- )" @@ -115,7 +123,7 @@ msgid "%s: option requires an argument -- '%c'\n" msgstr "%s: -- %c\n" -#: lib/obstack.c:338 lib/obstack.c:340 lib/xalloc-die.c:34 src/pcresearch.c:291 +#: lib/obstack.c:338 lib/obstack.c:340 lib/xalloc-die.c:34 src/pcresearch.c:313 msgid "memory exhausted" msgstr " " @@ -153,7 +161,7 @@ #. for your locale. #. #. If you don't know what to put here, please see -#. +#. #. and use glyphs suitable for your language. #: lib/quotearg.c:362 msgid "`" @@ -231,16 +239,16 @@ msgid "Unmatched ) or \\)" msgstr "" -#: lib/regcomp.c:687 +#: lib/regcomp.c:688 msgid "No previous regular expression" msgstr "" -#: lib/version-etc.c:74 +#: lib/version-etc.c:73 #, c-format msgid "Packaged by %s (%s)\n" msgstr "" -#: lib/version-etc.c:77 +#: lib/version-etc.c:76 #, c-format msgid "Packaged by %s\n" msgstr "" @@ -248,14 +256,14 @@ #. TRANSLATORS: Translate "(C)" to the copyright symbol #. (C-in-a-circle), if this symbol is available in the user's #. locale. Otherwise, do not translate "(C)"; leave it as-is. -#: lib/version-etc.c:84 +#: lib/version-etc.c:83 msgid "(C)" msgstr "" -#: lib/version-etc.c:86 +#: lib/version-etc.c:85 msgid "" "\n" -"License GPLv3+: GNU GPL version 3 or later .\n" "This is free software: you are free to change and redistribute it.\n" "There is NO WARRANTY, to the extent permitted by law.\n" @@ -378,11 +386,11 @@ #: lib/version-etc.c:253 #, c-format -msgid "%s home page: \n" +msgid "%s home page: \n" msgstr "" #: lib/version-etc.c:256 -msgid "General help using GNU software: \n" +msgid "General help using GNU software: \n" msgstr "" #: lib/xstrtol-error.c:63 @@ -400,65 +408,57 @@ msgid "%s%s argument '%s' too large" msgstr "" -#. This is a proper name. See the gettext manual, section Names. -#: src/grep.c:59 -msgid "Mike Haertel" -msgstr "" - -#: src/grep.c:60 -msgid "others, see " -msgstr "" - -#: src/grep.c:585 +#: src/grep.c:582 msgid "(standard input)" msgstr "( )" -#: src/grep.c:765 +#: src/grep.c:762 msgid "invalid context length argument" msgstr " " -#: src/grep.c:828 +#: src/grep.c:827 msgid "input is too large to count" msgstr " " -#: src/grep.c:1579 +#: src/grep.c:1578 #, c-format msgid "Binary file %s matches\n" msgstr " %s \n" -#: src/grep.c:1627 +#: src/grep.c:1626 #, fuzzy, c-format msgid "warning: %s: %s" msgstr "%s %s :\n" -#: src/grep.c:1628 +#: src/grep.c:1627 msgid "recursive directory loop" msgstr " " -#: src/grep.c:1844 +#: src/grep.c:1843 #, c-format msgid "input file %s is also the output" msgstr "" -#: src/grep.c:1907 src/grep.c:1914 -#, c-format -msgid "Usage: %s [OPTION]... PATTERN [FILE]...\n" +#: src/grep.c:1906 src/grep.c:1913 +#, fuzzy, c-format +msgid "Usage: %s [OPTION]... PATTERNS [FILE]...\n" msgstr "%s []... PATTERN [] : \n" -#: src/grep.c:1909 +#: src/grep.c:1908 #, fuzzy, c-format msgid "Try '%s --help' for more information.\n" msgstr ". `%s --help' \n" -#: src/grep.c:1915 +#: src/grep.c:1914 #, c-format -msgid "Search for PATTERN in each FILE.\n" +msgid "Search for PATTERNS in each FILE.\n" msgstr "" -#: src/grep.c:1916 +#: src/grep.c:1915 #, fuzzy, c-format msgid "" "Example: %s -i 'hello world' menu.h main.c\n" +"PATTERNS can contain multiple patterns separated by newlines.\n" "\n" "Pattern selection and interpretation:\n" msgstr "" @@ -470,10 +470,10 @@ #: src/grep.c:1920 #, fuzzy, c-format msgid "" -" -E, --extended-regexp PATTERN is an extended regular expression\n" -" -F, --fixed-strings PATTERN is a set of newline-separated strings\n" -" -G, --basic-regexp PATTERN is a basic regular expression (default)\n" -" -P, --perl-regexp PATTERN is a Perl regular expression\n" +" -E, --extended-regexp PATTERNS are extended regular expressions\n" +" -F, --fixed-strings PATTERNS are strings\n" +" -G, --basic-regexp PATTERNS are basic regular expressions\n" +" -P, --perl-regexp PATTERNS are Perl regular expressions\n" msgstr "" " PATTERN -E, --extended-regexp\n" " newline \" PATTERN -F, --fixed-strings\n" @@ -483,11 +483,11 @@ #: src/grep.c:1926 #, fuzzy, c-format msgid "" -" -e, --regexp=PATTERN use PATTERN for matching\n" -" -f, --file=FILE obtain PATTERN from FILE\n" +" -e, --regexp=PATTERNS use PATTERNS for matching\n" +" -f, --file=FILE take PATTERNS from FILE\n" " -i, --ignore-case ignore case distinctions\n" -" -w, --word-regexp force PATTERN to match only whole words\n" -" -x, --line-regexp force PATTERN to match only whole lines\n" +" -w, --word-regexp match only whole words\n" +" -x, --line-regexp match only whole lines\n" " -z, --null-data a data line ends in 0 byte, not newline\n" msgstr "" " PATTERN- -e, --regexp=PATTERN\n" @@ -533,7 +533,7 @@ #: src/grep.c:1951 #, c-format msgid "" -" -o, --only-matching show only the part of a line matching PATTERN\n" +" -o, --only-matching show only nonempty parts of lines that match\n" " -q, --quiet, --silent suppress all normal output\n" " --binary-files=TYPE assume that binary files are TYPE;\n" " TYPE is 'binary', 'text', or 'without-match'\n" @@ -555,12 +555,11 @@ #: src/grep.c:1967 #, c-format msgid "" -" --include=FILE_PATTERN search only files that match FILE_PATTERN\n" -" --exclude=FILE_PATTERN skip files and directories matching " -"FILE_PATTERN\n" +" --include=GLOB search only files that match GLOB (a file " +"pattern)\n" +" --exclude=GLOB skip files and directories matching GLOB\n" " --exclude-from=FILE skip files matching any file pattern from FILE\n" -" --exclude-dir=PATTERN directories that match PATTERN will be " -"skipped.\n" +" --exclude-dir=GLOB skip directories that match GLOB\n" msgstr "" #: src/grep.c:1974 @@ -617,7 +616,7 @@ msgid "" "When FILE is '-', read standard input. With no FILE, read '.' if\n" "recursive, '-' otherwise. With fewer than two FILEs, assume -h.\n" -"Exit status is 0 if any line is selected, 1 otherwise;\n" +"Exit status is 0 if any line (or file if -L) is selected, 1 otherwise;\n" "if any error occurs and -q is not given, the exit status is 2.\n" msgstr "" @@ -630,63 +629,69 @@ msgid "invalid matcher %s" msgstr " " -#: src/grep.c:2458 +#: src/grep.c:2459 #, c-format msgid "warning: GREP_OPTIONS is deprecated; please use an alias or script" msgstr "" -#: src/grep.c:2485 +#: src/grep.c:2486 msgid "unknown devices method" msgstr " - " -#: src/grep.c:2629 +#: src/grep.c:2630 msgid "invalid max count" msgstr " " -#: src/grep.c:2687 +#: src/grep.c:2688 msgid "unknown binary-files type" msgstr " - " -#: src/pcresearch.c:80 +#: src/grep.c:2770 +msgid "" +"Written by Mike Haertel and others; see\n" +"." +msgstr "" + +#: src/pcresearch.c:86 msgid "failed to allocate memory for the PCRE JIT stack" msgstr "" -#: src/pcresearch.c:97 +#: src/pcresearch.c:118 msgid "" "support for the -P option is not compiled into this --disable-perl-regexp " "binary" msgstr "" -#: src/pcresearch.c:119 +#: src/pcresearch.c:140 msgid "-P supports only unibyte and UTF-8 locales" msgstr "" -#: src/pcresearch.c:125 +#: src/pcresearch.c:146 #, fuzzy msgid "the -P option only supports a single pattern" msgstr "-P " -#: src/pcresearch.c:167 +#: src/pcresearch.c:189 msgid "internal error (should never happen)" msgstr "" -#: src/pcresearch.c:192 +#: src/pcresearch.c:214 msgid "internal error" msgstr "" -#: src/pcresearch.c:215 +#: src/pcresearch.c:237 msgid "exceeded PCRE's line length limit" msgstr "" -#: src/pcresearch.c:295 +#: src/pcresearch.c:317 msgid "exhausted PCRE JIT stack" msgstr "" -#: src/pcresearch.c:299 +#: src/pcresearch.c:321 msgid "exceeded PCRE's backtracking limit" msgstr "" -#: src/pcresearch.c:306 +#: src/pcresearch.c:328 #, c-format msgid "internal PCRE error: %d" msgstr "" Binary files /tmp/tmppJ6Y2n/6jFha9hbxv/grep-3.1/po/hr.gmo and /tmp/tmppJ6Y2n/tYMwNxGD36/grep-3.3/po/hr.gmo differ diff -Nru grep-3.1/po/hr.po grep-3.3/po/hr.po --- grep-3.1/po/hr.po 2017-07-02 20:21:16.000000000 +0000 +++ grep-3.3/po/hr.po 2018-12-21 04:39:02.000000000 +0000 @@ -2,10 +2,6 @@ # Copyright © 2016 Free Software Foundation, Inc. # This file is distributed under the same license as the grep package. # -# Matej Vela , 1999. -# Hrvoje Niksic , 2002. -# Tomislav Krznar , 2012. -# Božidar Putanec , 2016. # bp, nekoliko noticija # ovo je ista verzija grep.po kao 2012. od TK. Samo je nekoliko riječi # izmjenjeno. Dodani su novi msgid-ovi i popravljeni su fuzzies. @@ -13,13 +9,17 @@ # lingvistima, i hrvatskim TP članovima. # Zahvaljujem prijašnjim prevoditeljima, jer je na njihovom trudu, # napravljena i ova dopuna. -# bp, 2016-04-03 +# Matej Vela , 1999. +# Hrvoje Niksic , 2002. +# Tomislav Krznar , 2012. +# Božidar Putanec , 2016, 2017, 2018. +# bp, 2016-04-03. msgid "" msgstr "" -"Project-Id-Version: grep-2.26.37\n" +"Project-Id-Version: grep-3.1.48\n" "Report-Msgid-Bugs-To: bug-grep@gnu.org\n" -"POT-Creation-Date: 2017-07-02 13:21-0700\n" -"PO-Revision-Date: 2016-11-28 12:35-0800\n" +"POT-Creation-Date: 2018-12-20 20:39-0800\n" +"PO-Revision-Date: 2018-12-16 16:02-0800\n" "Last-Translator: Božidar Putanec \n" "Language-Team: Croatian \n" "Language: hr\n" @@ -29,63 +29,68 @@ "X-Bugs: Report translation errors to the Language-Team address.\n" "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" "%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" -"X-Generator: Poedit 1.8.7.1\n" -"X-Poedit-SourceCharset: UTF-8\n" -"X-Poedit-Basepath: ../../Downloads/grep/src\n" -"X-Poedit-SearchPath-0: .\n" +"X-Generator: Poedit 2.2\n" #: lib/argmatch.c:134 #, c-format msgid "invalid argument %s for %s" -msgstr "neispravan argument %s za %s" +msgstr "nevaljani argument %s za %s" #: lib/argmatch.c:135 #, c-format msgid "ambiguous argument %s for %s" -msgstr "višeznačan argument %s za %s" +msgstr "dvosmisleni argument %s za %s" #: lib/argmatch.c:154 msgid "Valid arguments are:" -msgstr "Ispravni argumenti su:" +msgstr "Valjani argumenti su:" -#: lib/closeout.c:122 src/grep.c:1274 +#: lib/c-stack.c:208 lib/c-stack.c:301 +msgid "program error" +msgstr "greška u programu" + +#: lib/c-stack.c:209 lib/c-stack.c:302 +msgid "stack overflow" +msgstr "prelijevanje snopa" + +#: lib/closeout.c:122 src/grep.c:1273 msgid "write error" -msgstr "greška u zapisivanju" +msgstr "pogreška u pisanju" -#: lib/dfa.c:958 +#: lib/dfa.c:970 msgid "unbalanced [" msgstr "nesparena [" -#: lib/dfa.c:1079 +#: lib/dfa.c:1091 msgid "invalid character class" -msgstr "neispravan razred znakova" +msgstr "nevaljana znakovna klasa" -#: lib/dfa.c:1205 +#: lib/dfa.c:1217 msgid "character class syntax is [[:space:]], not [:space:]" -msgstr "sintaksa razreda znakova je [[:space]], ne [:space:]" +msgstr "sintaksa znakovne klase je [[:space]], ne [:space:]" -#: lib/dfa.c:1272 +#: lib/dfa.c:1284 msgid "unfinished \\ escape" -msgstr "nedovršeni \\ izlaz (escape znak)" +msgstr "nedovršena \\ escape sekvencija" -#: lib/dfa.c:1433 +#: lib/dfa.c:1445 msgid "invalid content of \\{\\}" -msgstr "neispravan sadržaj \\{\\}" +msgstr "nevaljani sadržaj od \\{\\}" -#: lib/dfa.c:1436 +#: lib/dfa.c:1448 msgid "regular expression too big" -msgstr "regularni izraz je prevelik" +msgstr "regularni izraz je preveliki" -#: lib/dfa.c:1850 +#: lib/dfa.c:1863 msgid "unbalanced (" msgstr "nesparena (" # „zadano“ je često „default“, pa radije „navedena“ ili „imenovana“ -#: lib/dfa.c:1968 +#: lib/dfa.c:1981 msgid "no syntax specified" msgstr "sintaksa nije navedena" -#: lib/dfa.c:1976 +#: lib/dfa.c:1992 msgid "unbalanced )" msgstr "nesparena )" @@ -94,41 +99,41 @@ msgstr "Nepoznata greška sustava" #: lib/getopt.c:278 -#, fuzzy, c-format +#, c-format msgid "%s: option '%s%s' is ambiguous\n" -msgstr "%s: opcija „%s“ je dvosmislena\n" +msgstr "%s: opcija „%s%s“ je dvosmislena\n" #: lib/getopt.c:284 -#, fuzzy, c-format +#, c-format msgid "%s: option '%s%s' is ambiguous; possibilities:" -msgstr "%s: opcija „%s“ je dvosmislena; mogućnosti:" +msgstr "%s: opcija „%s%s“ je dvosmislena; mogućnosti:" #: lib/getopt.c:319 -#, fuzzy, c-format +#, c-format msgid "%s: unrecognized option '%s%s'\n" -msgstr "%s: nepoznata opcija „%c%s“\n" +msgstr "%s: neprepoznata opcija „%s%s“\n" #: lib/getopt.c:345 -#, fuzzy, c-format +#, c-format msgid "%s: option '%s%s' doesn't allow an argument\n" -msgstr "%s: opcija „%c%s“ ne dopušta argument\n" +msgstr "%s: opcija „%s%s“ ne dopušta argument\n" #: lib/getopt.c:360 -#, fuzzy, c-format +#, c-format msgid "%s: option '%s%s' requires an argument\n" -msgstr "%s: opcija „--%s“ zahtijeva argument\n" +msgstr "%s: opcija „%s%s“ zahtijeva argument\n" #: lib/getopt.c:621 #, c-format msgid "%s: invalid option -- '%c'\n" -msgstr "%s: neispravna opcija -- „%c“\n" +msgstr "%s: nevaljana opcija -- „%c“\n" #: lib/getopt.c:636 lib/getopt.c:682 #, c-format msgid "%s: option requires an argument -- '%c'\n" msgstr "%s: opcija zahtijeva argument -- „%c“\n" -#: lib/obstack.c:338 lib/obstack.c:340 lib/xalloc-die.c:34 src/pcresearch.c:291 +#: lib/obstack.c:338 lib/obstack.c:340 lib/xalloc-die.c:34 src/pcresearch.c:313 msgid "memory exhausted" msgstr "nema dovoljno memorije" @@ -136,17 +141,17 @@ #: lib/openat-die.c:38 #, c-format msgid "unable to record current working directory" -msgstr "ne mogu registrirati trenutačni radni direktorij" +msgstr "nije moguće registrirati trenutačni radni direktorij" #: lib/openat-die.c:57 #, c-format msgid "failed to return to initial working directory" -msgstr "nisam se uspio vratiti u početni radni direktorij" +msgstr "povratak u početni radni direktorij nije uspio" #: lib/xbinary-io.c:37 #, c-format msgid "failed to set file descriptor text/binary mode" -msgstr "" +msgstr "nije uspjelo postaviti mod deskriptora datoteke u tekst ili binarni" #. TRANSLATORS: #. Get translations for open and closing quotation marks. @@ -167,7 +172,7 @@ #. for your locale. #. #. If you don't know what to put here, please see -#. +#. #. and use glyphs suitable for your language. #: lib/quotearg.c:362 msgid "`" @@ -196,39 +201,39 @@ #: lib/regcomp.c:147 msgid "Invalid character class name" -msgstr "Neispravno ime razreda znakova" +msgstr "Neispravno ime klase znakova" # obrnuta > obratna #: lib/regcomp.c:150 msgid "Trailing backslash" -msgstr "Zaostala obratna kosa crta (na kraju)" +msgstr "Zaostala obratna kosa crta („\\“ na kraju retka)" # http://ihjj.hr/ referenca > referencija #: lib/regcomp.c:153 msgid "Invalid back reference" -msgstr "Neispravna povratna referencija" +msgstr "Nevaljana povratna referencija" # bp: fuzzy > popravljen # razmotri: nema para za [, [^, [:, [., ili [= #: lib/regcomp.c:156 msgid "Unmatched [, [^, [:, [., or [=" -msgstr "Nesparena [, [^, [:, [., ili [=" +msgstr "Nespareni [, [^, [:, [., ili [=" #: lib/regcomp.c:159 msgid "Unmatched ( or \\(" -msgstr "Nesparena ( ili \\(" +msgstr "Nespareni ( ili \\(" #: lib/regcomp.c:162 msgid "Unmatched \\{" -msgstr "Nesparena \\{" +msgstr "Nespareni \\{" #: lib/regcomp.c:165 msgid "Invalid content of \\{\\}" -msgstr "Neispravan sadržaj \\{\\}" +msgstr "Nevaljani sadržaj od \\{\\}" #: lib/regcomp.c:168 msgid "Invalid range end" -msgstr "Neispravan završetak područja" +msgstr "Nevaljani kraj raspona" # nedostaje memorije #: lib/regcomp.c:171 @@ -237,7 +242,7 @@ #: lib/regcomp.c:174 msgid "Invalid preceding regular expression" -msgstr "Neispravan prethodni regularni izraz" +msgstr "Nevaljani prethodni regularni izraz" #: lib/regcomp.c:177 msgid "Premature end of regular expression" @@ -249,43 +254,43 @@ #: lib/regcomp.c:183 msgid "Unmatched ) or \\)" -msgstr "Nesparena ) ili \\)" +msgstr "Nespareni ) ili \\)" -#: lib/regcomp.c:687 +#: lib/regcomp.c:688 msgid "No previous regular expression" -msgstr "Nedostaje prethodni regularni izraz" +msgstr "Nema prethodnog regularnog izraza" -#: lib/version-etc.c:74 +#: lib/version-etc.c:73 #, c-format msgid "Packaged by %s (%s)\n" -msgstr "Spakirao %s (%s)\n" +msgstr "Pakirao %s (%s)\n" -#: lib/version-etc.c:77 +#: lib/version-etc.c:76 #, c-format msgid "Packaged by %s\n" -msgstr "Spakirao %s\n" +msgstr "Pakirao %s\n" #. TRANSLATORS: Translate "(C)" to the copyright symbol #. (C-in-a-circle), if this symbol is available in the user's #. locale. Otherwise, do not translate "(C)"; leave it as-is. -#: lib/version-etc.c:84 +#: lib/version-etc.c:83 msgid "(C)" msgstr "©" -#: lib/version-etc.c:86 +#: lib/version-etc.c:85 msgid "" "\n" -"License GPLv3+: GNU GPL version 3 or later .\n" "This is free software: you are free to change and redistribute it.\n" "There is NO WARRANTY, to the extent permitted by law.\n" "\n" msgstr "" "\n" -"Licencija GPLv3+: GNU GPL inačica 3 ili kasnija .\n" +"Licencija:\n" +"GPLv3+: GNU GPL inačica 3 ili kasnija .\n" "Ovo je slobodan softver: slobodno ga mijenjajte i dijelite.\n" -"NEMA JAMSTVA, do granica dopuštenih zakonom.\n" +"NEMA JAMSTVA do granica dopuštenih zakonom.\n" "\n" #. TRANSLATORS: %s denotes an author name. @@ -424,130 +429,124 @@ #: lib/version-etc.c:253 #, c-format -msgid "%s home page: \n" -msgstr "%s početna stranica: \n" +msgid "%s home page: \n" +msgstr "%s internetska stranica: \n" #: lib/version-etc.c:256 -msgid "General help using GNU software: \n" +msgid "General help using GNU software: \n" msgstr "" -"Općenita pomoć za korištenje GNU softvera: \n" +"Općenita pomoć za korištenje GNU softvera: \n" #: lib/xstrtol-error.c:63 #, c-format msgid "invalid %s%s argument '%s'" -msgstr "neispravan %s%s argument „%s“" +msgstr "nevaljani %s%s argument „%s“" #: lib/xstrtol-error.c:68 #, c-format msgid "invalid suffix in %s%s argument '%s'" -msgstr "neispravan sufiks u %s%s argumentu „%s“" +msgstr "nevaljani sufiks u %s%s argumentu „%s“" #: lib/xstrtol-error.c:72 #, c-format msgid "%s%s argument '%s' too large" -msgstr "%s%s argument „%s“ je prevelik" - -#. This is a proper name. See the gettext manual, section Names. -#: src/grep.c:59 -msgid "Mike Haertel" -msgstr "Mike Haertel" - -#: src/grep.c:60 -msgid "others, see " -msgstr "ostali, pogledajte " +msgstr "%s%s argument „%s“ je preveliki" -#: src/grep.c:585 +#: src/grep.c:582 msgid "(standard input)" msgstr "(standardni ulaz)" -#: src/grep.c:765 +#: src/grep.c:762 msgid "invalid context length argument" -msgstr "neispravan kontekst duljine argumenta" +msgstr "nevaljani kontekst duljine argumenta" -#: src/grep.c:828 +#: src/grep.c:827 msgid "input is too large to count" msgstr "ulaz je prevelik da se prebroji" -#: src/grep.c:1579 +#: src/grep.c:1578 #, c-format msgid "Binary file %s matches\n" msgstr "Binarna datoteka %s se podudara\n" -#: src/grep.c:1627 +#: src/grep.c:1626 #, c-format msgid "warning: %s: %s" msgstr "upozorenje: %s: %s" -#: src/grep.c:1628 +#: src/grep.c:1627 msgid "recursive directory loop" msgstr "rekurzivna petlja direktorija" -#: src/grep.c:1844 +#: src/grep.c:1843 #, c-format msgid "input file %s is also the output" msgstr "ulazna datoteka %s je također i izlaz" -#: src/grep.c:1907 src/grep.c:1914 +#: src/grep.c:1906 src/grep.c:1913 #, c-format -msgid "Usage: %s [OPTION]... PATTERN [FILE]...\n" -msgstr "Uporaba: %s [OPCIJA]... UZORAK [DATOTEKA]...\n" +msgid "Usage: %s [OPTION]... PATTERNS [FILE]...\n" +msgstr "Uporaba: %s [OPCIJA]... UZORCI [DATOTEKA]...\n" -#: src/grep.c:1909 +#: src/grep.c:1908 #, c-format msgid "Try '%s --help' for more information.\n" -msgstr "‘%s --help’ za pomoć i više informacija\n" +msgstr "Za pomoć i više informacija pokušajte s „%s --help“\n" -#: src/grep.c:1915 -#, fuzzy, c-format -msgid "Search for PATTERN in each FILE.\n" -msgstr "Traži UZORAK u svakoj DATOTECI ili standardnom ulazu.\n" +#: src/grep.c:1914 +#, c-format +msgid "Search for PATTERNS in each FILE.\n" +msgstr "Traži UZORKE u svakoj DATOTECI.\n" -#: src/grep.c:1916 -#, fuzzy, c-format +#: src/grep.c:1915 +#, c-format msgid "" "Example: %s -i 'hello world' menu.h main.c\n" +"PATTERNS can contain multiple patterns separated by newlines.\n" "\n" "Pattern selection and interpretation:\n" msgstr "" -"Primjer: %s -i „hello world“ menu.h main.c\n" +"Primjer: %s -i 'hello world' menu.h main.c\n" +"UZORCI mogu sadržavati višestruke mustre odijeljene sa znakom novog retka " +"(\\n).\n" "\n" -"Izbor i interpretacija regularnih izraza:\n" +"Izbor uzorka i interpretacija:\n" # engl. „string“ hrvatske mogućnosti: biseri, zrna i sl. nanizani na nit; niska. # Prijedlog je string > niska # vidi http://hjp.znanje.hr/index.php?show=search_by_id&id=eF1uXRg%3D # ili ostavimo string = string ! #: src/grep.c:1920 -#, fuzzy, c-format +#, c-format msgid "" -" -E, --extended-regexp PATTERN is an extended regular expression\n" -" -F, --fixed-strings PATTERN is a set of newline-separated strings\n" -" -G, --basic-regexp PATTERN is a basic regular expression (default)\n" -" -P, --perl-regexp PATTERN is a Perl regular expression\n" +" -E, --extended-regexp PATTERNS are extended regular expressions\n" +" -F, --fixed-strings PATTERNS are strings\n" +" -G, --basic-regexp PATTERNS are basic regular expressions\n" +" -P, --perl-regexp PATTERNS are Perl regular expressions\n" msgstr "" " -E, --extended-regexp UZORAK je prošireni regularni izraz (ERE)\n" -" -F, --fixed-strings UZORAK je skup fiksnih nizova, jedan niz po " -"retku\n" +" -F, --fixed-strings UZORAK je skup stringova odvojenih\n" +" znakom novog retka (\\n)\n" " -G, --basic-regexp UZORAK je osnovni regularni izraz (BRE)\n" " -P, --perl-regexp UZORAK je Perl regularni izraz\n" #: src/grep.c:1926 #, c-format msgid "" -" -e, --regexp=PATTERN use PATTERN for matching\n" -" -f, --file=FILE obtain PATTERN from FILE\n" +" -e, --regexp=PATTERNS use PATTERNS for matching\n" +" -f, --file=FILE take PATTERNS from FILE\n" " -i, --ignore-case ignore case distinctions\n" -" -w, --word-regexp force PATTERN to match only whole words\n" -" -x, --line-regexp force PATTERN to match only whole lines\n" +" -w, --word-regexp match only whole words\n" +" -x, --line-regexp match only whole lines\n" " -z, --null-data a data line ends in 0 byte, not newline\n" msgstr "" " -e, --regexp=UZORAK koristi UZORAK kao regularni izraz\n" " -f, --file=DATOTEKA pribavi UZORAK iz DATOTEKE\n" " -i, --ignore-case zanemari razlike između velikih i malih slova\n" -" -w, --word-regexp UZORAK može odgovarati samo potpunim riječima\n" -" -x, --line-regexp UZORAK može odgovarati samo potpunim recima\n" -" -z, --null-data podatkovni redak završava bajtom 0, ne znakom\n" -" novog retka\n" +" -w, --word-regexp UZORAK podudara samo cijele riječi\n" +" -x, --line-regexp UZORAK podudara samo cijele redove\n" +" -z, --null-data redak završava s bajtom 0 a ne znakom novog " +"retka\n" #: src/grep.c:1933 #, c-format @@ -562,12 +561,12 @@ "\n" "Razno:\n" " -s, --no-messages izostavi poruke o greškama\n" -" -v, --invert-match odaberi redove koji se ne podudaraju\n" -" -V, --version ispiši informacije o inačici i iziđi\n" -" --help prikaži ovu pomoć i iziđi\n" +" -v, --invert-match odabere redove koji se ne podudaraju\n" +" -V, --version informacije o inačici ovog programa\n" +" --help ova pomoć\n" #: src/grep.c:1940 -#, fuzzy, c-format +#, c-format msgid "" "\n" "Output control:\n" @@ -581,33 +580,31 @@ "prefix\n" msgstr "" "\n" -"Output control:\n" -" -m, --max-count=BROJ zaustavi nakon BROJ podudaranja\n" -" -b, --byte-offset ispiši pomak izlaznih redaka u bajtovima\n" -" -n, --line-number uz izlazne retke ispiši brojeve redaka\n" -" --line-buffered ispiši izlaz na svaki redak\n" -" -H, --with-filename ispiši ime datoteke za svako podudaranje\n" -" -h, --no-filename izostavi prefiks imena datoteke na izlazu\n" -" --label=OZNAKA koristi OZNAKU kao prefiks imena datoteke\n" -" standardnog ulaza\n" -"\n" +"Kontrola izlaza:\n" +" -m, --max-count=BROJ stane nakon BROJ nađenih redaka\n" +" -b, --byte-offset uz retke ispiše i poziciju u bajtovima\n" +" -n, --line-number uz retke ispiše broj retka\n" +" --line-buffered izravno ispiše svaki izlazni redak\n" +" -H, --with-filename uz retke ispiše ime datoteke za svako " +"podudaranje\n" +" -h, --no-filename bez ispisa imena datoteke za svako podudaranje\n" +" --label=OZNAKA rabi OZNAKU kao ime datoteke na standardnom " +"ulazu\n" #: src/grep.c:1951 #, c-format msgid "" -" -o, --only-matching show only the part of a line matching PATTERN\n" +" -o, --only-matching show only nonempty parts of lines that match\n" " -q, --quiet, --silent suppress all normal output\n" " --binary-files=TYPE assume that binary files are TYPE;\n" " TYPE is 'binary', 'text', or 'without-match'\n" " -a, --text equivalent to --binary-files=text\n" msgstr "" -" -o, --only-matching prikaži samo dio retka koji odgovara UZORKU\n" -" -q, --quiet, --silent ispusti sav normalan izlaz\n" -" --binary-files=VRSTA pretpostavi VRSTU binarnih datoteka;\n" +" -o, --only-matching prikaže samo dio retka koji se podudara\n" +" -q, --quiet, --silent izostavi svaki normalni izlaz (ništa ne ispiše)\n" +" --binary-files=VRSTA pretpostavi binarne datoteke tipa VRSTA;\n" " VRSTA je „binary“, „text“ ili „without-match“\n" -" -a, --text ekvivalentno opciji --binary-files=text\n" -"\n" -"\n" +" -a, --text isto kao --binary-files=text\n" #: src/grep.c:1958 #, c-format @@ -620,40 +617,35 @@ " -r, --recursive like --directories=recurse\n" " -R, --dereference-recursive likewise, but follow all symlinks\n" msgstr "" -" -I isto kao --binary-files=without-match\n" -" -d, --directories=AKCIJA kako rukovati direktorijima;\n" -" AKCIJA je „read“, „recurse“ ili „skip“\n" -" -D, --devices=AKCIJA kako rukovati uređajima, FIFO uređajima\n" -" i utičnicama; AKCIJA je „read“ ili „skip“\n" -" -r, --recursive isto kao --directories=recurse\n" -" -R, --dereference-recursive jednako, ali slijedi simboličke veze\n" -"\n" +" -I isto kao --binary-files=without-match\n" +" -d, --directories=AKCIJA kako rukovati direktorijima;\n" +" AKCIJA je „read“, „recurse“ ili „skip“\n" +" -D, --devices=AKCIJA kako rukovati uređajima, FIFO uređajima\n" +" i utičnicama; AKCIJA je „read“ ili „skip“\n" +" -r, --recursive isto kao --directories=recurse\n" +" -R, --dereference-recursive jednako, ali slijedi svaku simboličku vezu\n" # http://hjp.znanje.hr/index.php?show=kosi_oblici&id=eVxhWxI%3D # podudaran > koji je sukladan s čim, koji se poklapa s kim/čim #: src/grep.c:1967 #, c-format msgid "" -" --include=FILE_PATTERN search only files that match FILE_PATTERN\n" -" --exclude=FILE_PATTERN skip files and directories matching " -"FILE_PATTERN\n" +" --include=GLOB search only files that match GLOB (a file " +"pattern)\n" +" --exclude=GLOB skip files and directories matching GLOB\n" " --exclude-from=FILE skip files matching any file pattern from FILE\n" -" --exclude-dir=PATTERN directories that match PATTERN will be " -"skipped.\n" +" --exclude-dir=GLOB skip directories that match GLOB\n" msgstr "" -" --include=UZORAK_DATOTEKE pretraži samo datoteke podudarne\n" -" s UZORAK_DATOTEKE\n" -" --exclude=UZORAK_DATOTEKE preskoči datoteke i direktorije podudarne\n" -" s UZORAK_DATOTEKE\n" -" --exclude-from=DATOTEKA preskoči datoteke podudarne bilo kojem " -"uzorku\n" -" iz DATOTEKA\n" -" --exclude-dir=UZORAK preskoči direktorije podudarne s UZORAK\n" -"\n" -"\n" +" --include=GLOB pretraži samo datoteke koje se podudaraju\n" +" s GLOB-om (datoteka s uzorcima)\n" +" --exclude=GLOB preskoči sve datoteke i direktorije koji se\n" +" podudaraju s GLOB-om (datoteka s uzorcima)\n" +" --exclude-from=DATOTEKA preskoči sve datoteke koje se podudaraju s\n" +" bilo kojim uzorkom u DATOTEKA\n" +" --exclude-dir=GLOB preskoči direktorije koji podudaraju GLOB\n" #: src/grep.c:1974 -#, fuzzy, c-format +#, c-format msgid "" " -L, --files-without-match print only names of FILEs with no selected " "lines\n" @@ -662,12 +654,11 @@ " -T, --initial-tab make tabs line up (if needed)\n" " -Z, --null print 0 byte after FILE name\n" msgstr "" -" -L, --files-without-match ispiši samo imena DATOTEKA bez podudaranja\n" -" -l, --files-with-matches ispiši samo imena DATOTEKA s podudaranjima\n" -" -c, --count ispiši samo broj odgovarajućih redaka po " -"DATOTECI\n" -" -T, --initial-tab poravnaj tabulatore (ako je potrebno)\n" -" -Z, --null ispiši bajt 0 nakon imena DATOTEKE\n" +" -L, --files-without-match ispiše samo imena DATOTEKA bez podudaranja\n" +" -l, --files-with-matches ispiše samo imena DATOTEKA s podudaranjima\n" +" -c, --count ispiše samo broj podudarnih redaka po DATOTECI\n" +" -T, --initial-tab poravna tabove (ako je potrebno)\n" +" -Z, --null ispiše bajt 0 nakon imena DATOTEKE\n" #: src/grep.c:1980 #, c-format @@ -679,13 +670,14 @@ " -C, --context=NUM print NUM lines of output context\n" msgstr "" "\n" -"Kontrola sadržaja:\n" -" -B, --before-context=BROJ ispiši BROJ redaka sadržaja koji prethodi\n" -" -A, --after-context=BROJ ispiši BROJ redaka sadržaja koji slijedi\n" -" -C, --context=BROJ ispiši BROJ redaka izlaznog sadržaja\n" +"Kontrola konteksta:\n" +" -B, --before-context=BROJ ispiše BROJ redaka konteksta koji prethode\n" +" -A, --after-context=BROJ ispiše BROJ redaka konteksta koji slijede\n" +" -C, --context=BROJ ispiše BROJ redaka konteksta koji prethode/" +"slijede\n" #: src/grep.c:1987 -#, fuzzy, c-format +#, c-format msgid "" " -NUM same as --context=NUM\n" " --color[=WHEN],\n" @@ -695,111 +687,116 @@ "Windows)\n" "\n" msgstr "" -" -BROJ isto kao --context=BROJ\n" +" -BROJ isto kao --context=BROJ\n" " --color[=KADA],\n" -" --colour[=KADA] koristi oznake za razlikovanje podudarajućeg " -"niza;\n" -" KADA može biti „always“ (uvijek), " -"„never“ (nikad)\n" -" ili „auto“ (automatski).\n" -" -U, --binary ne uklanjaj CR znakove na kraju retka\n" -" (MSDOS/Windows)\n" -" -u, --unix-byte-offsets prikazuj pomake kao da CR-ova nema (MSDOS/" -"Windows)\n" +" --colour[=KADA] bojama istakne nađene stringove i markere;\n" +" KADA može biti „always“ ili „never“ ili „auto“\n" +" -U, --binary ne uklanja CqR znakove na EOL (MSDOS/Windows)\n" "\n" #: src/grep.c:1994 -#, fuzzy, c-format +#, c-format msgid "" "When FILE is '-', read standard input. With no FILE, read '.' if\n" "recursive, '-' otherwise. With fewer than two FILEs, assume -h.\n" -"Exit status is 0 if any line is selected, 1 otherwise;\n" +"Exit status is 0 if any line (or file if -L) is selected, 1 otherwise;\n" "if any error occurs and -q is not given, the exit status is 2.\n" msgstr "" -"Kada je DATOTEKA -, čitaj standardni ulaz. Ako nije zadana, čitaj . ako je\n" -"navedena opcija -r u naredbenom retku, inače -. Ako je navedeno manje od\n" -"dvije DATOTEKE, pretpostavi opciju -h.\n" -"Izlazno stanje je 0 ako je odabran bilo koji redak, inače 1;\n" -"ako su se pojavile greške i opcija -q nije zadana, izlazno stanje je 2.\n" +"Ako je DATOTEKA „-“ (spojnica), čita standardni ulaz. Bez DATOTEKE i ako\n" +"je opcija -r aktivna, rekurzivno čita „.“, inače čita „-“ (stdin).\n" +"S manje od dvije navedene DATOTEKE implicira opciju -h.\n" +"Završi sa statusom 0 ako je nađen barem jedan redak, inače s 1;\n" +"ako ima grešaka i nije navedena opcija -q, završi sa statusom 2.\n" # matchers su tragači (java, perl, itd.) #: src/grep.c:2034 msgid "conflicting matchers specified" -msgstr "navedeni su konfliktni izrazi" +msgstr "navedeni su konfliktni uzorci" #: src/grep.c:2038 #, c-format msgid "invalid matcher %s" -msgstr "neispravan komparator %s" +msgstr "nevaljana sintaksa uzorka %s" # bp: alias > pseudonim ? > nadimak ? # script > skripta -#: src/grep.c:2458 +#: src/grep.c:2459 #, c-format msgid "warning: GREP_OPTIONS is deprecated; please use an alias or script" -msgstr "Upozorenje: GREP_OPTIONS je zastario; upotrijebite alias ili script" +msgstr "" +"Upozorenje: upotreba GREP_OPTIONS je zastarila; rabite alias ili script" -#: src/grep.c:2485 +#: src/grep.c:2486 msgid "unknown devices method" -msgstr "nepoznati uređaj" +msgstr "nepoznata akcija za uređaj(e)" -#: src/grep.c:2629 +#: src/grep.c:2630 msgid "invalid max count" -msgstr "neispravan maksimalni broj" +msgstr "nevaljani maksimalni broj" -#: src/grep.c:2687 +#: src/grep.c:2688 msgid "unknown binary-files type" msgstr "nepoznata vrsta binarnih datoteka" +#: src/grep.c:2770 +#, fuzzy +msgid "" +"Written by Mike Haertel and others; see\n" +"." +msgstr "" +"ostali; pogledajte na:\n" +"" + # bp: novi msgid -#: src/pcresearch.c:80 +#: src/pcresearch.c:86 msgid "failed to allocate memory for the PCRE JIT stack" msgstr "dodjela memorije za PCRE JIT stog nije uspjela" -#: src/pcresearch.c:97 +#: src/pcresearch.c:118 msgid "" "support for the -P option is not compiled into this --disable-perl-regexp " "binary" -msgstr "" -"podrška za opciju -P nije kompajlirana u ovu --disable-perl-regexp binarnu " -"datoteku" +msgstr "ova inačica programa ne podržava opciju -P (nije ukompilirana)" # bp: novi msgid -#: src/pcresearch.c:119 +#: src/pcresearch.c:140 msgid "-P supports only unibyte and UTF-8 locales" -msgstr "-P podržava samo jednobajtne kodove i UTF-8 locale" +msgstr "-P podržava samo unibyte i UTF-8 locale" -#: src/pcresearch.c:125 +#: src/pcresearch.c:146 msgid "the -P option only supports a single pattern" msgstr "opcija -P podržava samo jedan uzorak" # bp: novi msgid -#: src/pcresearch.c:167 +#: src/pcresearch.c:189 msgid "internal error (should never happen)" -msgstr "interna greška (ne bi se smjela dogoditi)" +msgstr "**interna greška** (nije se smjela dogoditi)" -#: src/pcresearch.c:192 +#: src/pcresearch.c:214 msgid "internal error" msgstr "interna greška" -#: src/pcresearch.c:215 +#: src/pcresearch.c:237 msgid "exceeded PCRE's line length limit" msgstr "prekoračeno ograničenje PCRE duljine retka" -#: src/pcresearch.c:295 +#: src/pcresearch.c:317 msgid "exhausted PCRE JIT stack" msgstr "PCRE JIT stog je iscrpljen" -#: src/pcresearch.c:299 +#: src/pcresearch.c:321 msgid "exceeded PCRE's backtracking limit" msgstr "prekoračeno ograničenje PCRE praćenja" # bp:fuzzy popravljen -#: src/pcresearch.c:306 +#: src/pcresearch.c:328 #, c-format msgid "internal PCRE error: %d" msgstr "interna PCRE greška: %d" +#~ msgid "Mike Haertel" +#~ msgstr "Mike Haertel" + # http://ihjj.hr/ : dozvoljava > dopušta #~ msgid "%s: option '--%s' doesn't allow an argument\n" #~ msgstr "%s: opcija „--%s“ ne dopušta argument\n" Binary files /tmp/tmppJ6Y2n/6jFha9hbxv/grep-3.1/po/hu.gmo and /tmp/tmppJ6Y2n/tYMwNxGD36/grep-3.3/po/hu.gmo differ diff -Nru grep-3.1/po/hu.po grep-3.3/po/hu.po --- grep-3.1/po/hu.po 2017-07-02 20:21:16.000000000 +0000 +++ grep-3.3/po/hu.po 2018-12-21 04:39:02.000000000 +0000 @@ -9,7 +9,7 @@ msgstr "" "Project-Id-Version: grep 3.0.23-b00\n" "Report-Msgid-Bugs-To: bug-grep@gnu.org\n" -"POT-Creation-Date: 2017-07-02 13:21-0700\n" +"POT-Creation-Date: 2018-12-20 20:39-0800\n" "PO-Revision-Date: 2017-06-25 21:30+0200\n" "Last-Translator: Gabor Kelemen \n" "Language-Team: Hungarian \n" @@ -35,43 +35,51 @@ msgid "Valid arguments are:" msgstr "Az érvényes argumentumok a következők:" -#: lib/closeout.c:122 src/grep.c:1274 +#: lib/c-stack.c:208 lib/c-stack.c:301 +msgid "program error" +msgstr "" + +#: lib/c-stack.c:209 lib/c-stack.c:302 +msgid "stack overflow" +msgstr "" + +#: lib/closeout.c:122 src/grep.c:1273 msgid "write error" msgstr "íráshiba" -#: lib/dfa.c:958 +#: lib/dfa.c:970 msgid "unbalanced [" msgstr "kiegyensúlyozatlan [" -#: lib/dfa.c:1079 +#: lib/dfa.c:1091 msgid "invalid character class" msgstr "érvénytelen karakterosztály" -#: lib/dfa.c:1205 +#: lib/dfa.c:1217 msgid "character class syntax is [[:space:]], not [:space:]" msgstr "a karakterosztály szintaxisa [[:space:]], nem [:space:]" -#: lib/dfa.c:1272 +#: lib/dfa.c:1284 msgid "unfinished \\ escape" msgstr "befejezetlen \\ escape" -#: lib/dfa.c:1433 +#: lib/dfa.c:1445 msgid "invalid content of \\{\\}" msgstr "a \\{\\} tartalma érvénytelen" -#: lib/dfa.c:1436 +#: lib/dfa.c:1448 msgid "regular expression too big" msgstr "a reguláris kifejezés túl nagy" -#: lib/dfa.c:1850 +#: lib/dfa.c:1863 msgid "unbalanced (" msgstr "kiegyensúlyozatlan (" -#: lib/dfa.c:1968 +#: lib/dfa.c:1981 msgid "no syntax specified" msgstr "nincs szintaxis megadva" -#: lib/dfa.c:1976 +#: lib/dfa.c:1992 msgid "unbalanced )" msgstr "kiegyensúlyozatlan )" @@ -114,7 +122,7 @@ msgid "%s: option requires an argument -- '%c'\n" msgstr "%s: a kapcsoló egy argumentumot igényel -- „%c”\n" -#: lib/obstack.c:338 lib/obstack.c:340 lib/xalloc-die.c:34 src/pcresearch.c:291 +#: lib/obstack.c:338 lib/obstack.c:340 lib/xalloc-die.c:34 src/pcresearch.c:313 msgid "memory exhausted" msgstr "elfogyott a memória" @@ -152,7 +160,7 @@ #. for your locale. #. #. If you don't know what to put here, please see -#. +#. #. and use glyphs suitable for your language. #: lib/quotearg.c:362 msgid "`" @@ -230,16 +238,16 @@ msgid "Unmatched ) or \\)" msgstr "Pár nélküli ) vagy \\)" -#: lib/regcomp.c:687 +#: lib/regcomp.c:688 msgid "No previous regular expression" msgstr "Nincs megelőző reguláris kifejezés" -#: lib/version-etc.c:74 +#: lib/version-etc.c:73 #, c-format msgid "Packaged by %s (%s)\n" msgstr "Csomagolta: %s (%s)\n" -#: lib/version-etc.c:77 +#: lib/version-etc.c:76 #, c-format msgid "Packaged by %s\n" msgstr "Csomagolta: %s\n" @@ -247,14 +255,15 @@ #. TRANSLATORS: Translate "(C)" to the copyright symbol #. (C-in-a-circle), if this symbol is available in the user's #. locale. Otherwise, do not translate "(C)"; leave it as-is. -#: lib/version-etc.c:84 +#: lib/version-etc.c:83 msgid "(C)" msgstr "©" -#: lib/version-etc.c:86 +#: lib/version-etc.c:85 +#, fuzzy msgid "" "\n" -"License GPLv3+: GNU GPL version 3 or later .\n" "This is free software: you are free to change and redistribute it.\n" "There is NO WARRANTY, to the extent permitted by law.\n" @@ -399,12 +408,13 @@ msgstr "A(z) %s honlapja: <%s>\n" #: lib/version-etc.c:253 -#, c-format -msgid "%s home page: \n" +#, fuzzy, c-format +msgid "%s home page: \n" msgstr "A %s honlapja: \n" #: lib/version-etc.c:256 -msgid "General help using GNU software: \n" +#, fuzzy +msgid "General help using GNU software: \n" msgstr "" "Általános segítség a GNU szoftverek használatához: \n" @@ -424,65 +434,57 @@ msgid "%s%s argument '%s' too large" msgstr "%s%s: a(z) „%s” argumentum túl nagy" -#. This is a proper name. See the gettext manual, section Names. -#: src/grep.c:59 -msgid "Mike Haertel" -msgstr "Mike Haertel" - -#: src/grep.c:60 -msgid "others, see " -msgstr "mások, lásd: " - -#: src/grep.c:585 +#: src/grep.c:582 msgid "(standard input)" msgstr "(szabványos bemenet)" -#: src/grep.c:765 +#: src/grep.c:762 msgid "invalid context length argument" msgstr "érvénytelen szövegkörnyezethossz argumentum" -#: src/grep.c:828 +#: src/grep.c:827 msgid "input is too large to count" msgstr "a bemenet túl nagy a megszámláláshoz" -#: src/grep.c:1579 +#: src/grep.c:1578 #, c-format msgid "Binary file %s matches\n" msgstr "%s bináris fájl illeszkedik\n" -#: src/grep.c:1627 +#: src/grep.c:1626 #, c-format msgid "warning: %s: %s" msgstr "figyelmeztetés: %s: %s" -#: src/grep.c:1628 +#: src/grep.c:1627 msgid "recursive directory loop" msgstr "rekurzív könyvtárhurok" -#: src/grep.c:1844 +#: src/grep.c:1843 #, c-format msgid "input file %s is also the output" msgstr "%s bemeneti fájl a kimenet is" -#: src/grep.c:1907 src/grep.c:1914 -#, c-format -msgid "Usage: %s [OPTION]... PATTERN [FILE]...\n" +#: src/grep.c:1906 src/grep.c:1913 +#, fuzzy, c-format +msgid "Usage: %s [OPTION]... PATTERNS [FILE]...\n" msgstr "Használat: %s [KAPCSOLÓ]… MINTA [FÁJL]…\n" -#: src/grep.c:1909 +#: src/grep.c:1908 #, c-format msgid "Try '%s --help' for more information.\n" msgstr "További információkért adja ki a(z) „%s --help” parancsot.\n" -#: src/grep.c:1915 -#, c-format -msgid "Search for PATTERN in each FILE.\n" +#: src/grep.c:1914 +#, fuzzy, c-format +msgid "Search for PATTERNS in each FILE.\n" msgstr "A MINTA keresése minden FÁJLBAN.\n" -#: src/grep.c:1916 -#, c-format +#: src/grep.c:1915 +#, fuzzy, c-format msgid "" "Example: %s -i 'hello world' menu.h main.c\n" +"PATTERNS can contain multiple patterns separated by newlines.\n" "\n" "Pattern selection and interpretation:\n" msgstr "" @@ -491,12 +493,12 @@ "Minta kiválasztása és értelmezése:\n" #: src/grep.c:1920 -#, c-format +#, fuzzy, c-format msgid "" -" -E, --extended-regexp PATTERN is an extended regular expression\n" -" -F, --fixed-strings PATTERN is a set of newline-separated strings\n" -" -G, --basic-regexp PATTERN is a basic regular expression (default)\n" -" -P, --perl-regexp PATTERN is a Perl regular expression\n" +" -E, --extended-regexp PATTERNS are extended regular expressions\n" +" -F, --fixed-strings PATTERNS are strings\n" +" -G, --basic-regexp PATTERNS are basic regular expressions\n" +" -P, --perl-regexp PATTERNS are Perl regular expressions\n" msgstr "" " -E, --extended-regexp a MINTA kiterjesztett reguláris kifejezés\n" " -F, --fixed-strings a MINTA új sorokkal elválasztott karakterláncok\n" @@ -505,13 +507,13 @@ " -P, --perl-regexp a MINTA Perl reguláris kifejezés\n" #: src/grep.c:1926 -#, c-format +#, fuzzy, c-format msgid "" -" -e, --regexp=PATTERN use PATTERN for matching\n" -" -f, --file=FILE obtain PATTERN from FILE\n" +" -e, --regexp=PATTERNS use PATTERNS for matching\n" +" -f, --file=FILE take PATTERNS from FILE\n" " -i, --ignore-case ignore case distinctions\n" -" -w, --word-regexp force PATTERN to match only whole words\n" -" -x, --line-regexp force PATTERN to match only whole lines\n" +" -w, --word-regexp match only whole words\n" +" -x, --line-regexp match only whole lines\n" " -z, --null-data a data line ends in 0 byte, not newline\n" msgstr "" " -e, --regexp=MINTA a MINTA használata illesztésre\n" @@ -566,9 +568,9 @@ " használatakor\n" #: src/grep.c:1951 -#, c-format +#, fuzzy, c-format msgid "" -" -o, --only-matching show only the part of a line matching PATTERN\n" +" -o, --only-matching show only nonempty parts of lines that match\n" " -q, --quiet, --silent suppress all normal output\n" " --binary-files=TYPE assume that binary files are TYPE;\n" " TYPE is 'binary', 'text', or 'without-match'\n" @@ -604,14 +606,13 @@ " -R, --dereference-recursive hasonló, de követi az összes szimlinket\n" #: src/grep.c:1967 -#, c-format +#, fuzzy, c-format msgid "" -" --include=FILE_PATTERN search only files that match FILE_PATTERN\n" -" --exclude=FILE_PATTERN skip files and directories matching " -"FILE_PATTERN\n" +" --include=GLOB search only files that match GLOB (a file " +"pattern)\n" +" --exclude=GLOB skip files and directories matching GLOB\n" " --exclude-from=FILE skip files matching any file pattern from FILE\n" -" --exclude-dir=PATTERN directories that match PATTERN will be " -"skipped.\n" +" --exclude-dir=GLOB skip directories that match GLOB\n" msgstr "" " --include=FÁJLMINTA csak a FÁJLMINTÁRA illeszkedő fájlokat " "vizsgálja\n" @@ -677,11 +678,11 @@ "\n" #: src/grep.c:1994 -#, c-format +#, fuzzy, c-format msgid "" "When FILE is '-', read standard input. With no FILE, read '.' if\n" "recursive, '-' otherwise. With fewer than two FILEs, assume -h.\n" -"Exit status is 0 if any line is selected, 1 otherwise;\n" +"Exit status is 0 if any line (or file if -L) is selected, 1 otherwise;\n" "if any error occurs and -q is not given, the exit status is 2.\n" msgstr "" "Ha a FÁJL a '-', akkor a szabványos bemenetről olvas. Ha nincs megadva " @@ -699,28 +700,35 @@ msgid "invalid matcher %s" msgstr "érvénytelen illesztő: %s" -#: src/grep.c:2458 +#: src/grep.c:2459 #, c-format msgid "warning: GREP_OPTIONS is deprecated; please use an alias or script" msgstr "figyelem: a GREP_OPTIONS elavult; használjon álnevet vagy parancsfájlt" -#: src/grep.c:2485 +#: src/grep.c:2486 msgid "unknown devices method" msgstr "ismeretlen eszközmódszer" -#: src/grep.c:2629 +#: src/grep.c:2630 msgid "invalid max count" msgstr "érvénytelen maximális szám" -#: src/grep.c:2687 +#: src/grep.c:2688 msgid "unknown binary-files type" msgstr "ismeretlen bináris fájl típus" -#: src/pcresearch.c:80 +#: src/grep.c:2770 +#, fuzzy +msgid "" +"Written by Mike Haertel and others; see\n" +"." +msgstr "mások, lásd: " + +#: src/pcresearch.c:86 msgid "failed to allocate memory for the PCRE JIT stack" msgstr "nem sikerült memóriát foglalni a PCRE JIT veremnek" -#: src/pcresearch.c:97 +#: src/pcresearch.c:118 msgid "" "support for the -P option is not compiled into this --disable-perl-regexp " "binary" @@ -728,39 +736,42 @@ "a -P kapcsoló támogatása nincs belefordítva ebbe a --disable-perl-regexp " "binárisba" -#: src/pcresearch.c:119 +#: src/pcresearch.c:140 msgid "-P supports only unibyte and UTF-8 locales" msgstr "a -P csak unibyte és UTF-8 területi beállításokat támogat" -#: src/pcresearch.c:125 +#: src/pcresearch.c:146 msgid "the -P option only supports a single pattern" msgstr "a -P kapcsoló csak egy mintát támogat" -#: src/pcresearch.c:167 +#: src/pcresearch.c:189 msgid "internal error (should never happen)" msgstr "belső hiba (soha nem szabadna előfordulnia)" -#: src/pcresearch.c:192 +#: src/pcresearch.c:214 msgid "internal error" msgstr "belső hiba" -#: src/pcresearch.c:215 +#: src/pcresearch.c:237 msgid "exceeded PCRE's line length limit" msgstr "a PCRE sorhossza túllépve" -#: src/pcresearch.c:295 +#: src/pcresearch.c:317 msgid "exhausted PCRE JIT stack" msgstr "kifogyott a PCRE JIT verem" -#: src/pcresearch.c:299 +#: src/pcresearch.c:321 msgid "exceeded PCRE's backtracking limit" msgstr "a PCRE visszakövetési korlátja túllépve" -#: src/pcresearch.c:306 +#: src/pcresearch.c:328 #, c-format msgid "internal PCRE error: %d" msgstr "belső PCRE hiba: %d" +#~ msgid "Mike Haertel" +#~ msgstr "Mike Haertel" + #~ msgid "%s: option '--%s' doesn't allow an argument\n" #~ msgstr "%s: a(z) „--%s” kapcsoló nem enged meg argumentumot\n" Binary files /tmp/tmppJ6Y2n/6jFha9hbxv/grep-3.1/po/id.gmo and /tmp/tmppJ6Y2n/tYMwNxGD36/grep-3.3/po/id.gmo differ diff -Nru grep-3.1/po/id.po grep-3.3/po/id.po --- grep-3.1/po/id.po 2017-07-02 20:21:16.000000000 +0000 +++ grep-3.3/po/id.po 2018-12-21 04:39:02.000000000 +0000 @@ -3,73 +3,82 @@ # This file is distributed under the same license as the grep package. # Tedi Heriyanto , 1999, 2000, 2001, 2002. # Arif E. Nugroho , 2008, 2009, 2010, 2011, 2012, 2013, 2014. +# Andika Triwidada , 2018. # msgid "" msgstr "" -"Project-Id-Version: grep 2.19.12\n" +"Project-Id-Version: grep 3.0.23-b00\n" "Report-Msgid-Bugs-To: bug-grep@gnu.org\n" -"POT-Creation-Date: 2017-07-02 13:21-0700\n" -"PO-Revision-Date: 2014-08-05 07:00+0700\n" -"Last-Translator: Arif E. Nugroho \n" +"POT-Creation-Date: 2018-12-20 20:39-0800\n" +"PO-Revision-Date: 2018-03-07 15:59+0700\n" +"Last-Translator: Andika Triwidada \n" "Language-Team: Indonesian \n" "Language: id\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=ISO-8859-1\n" "Content-Transfer-Encoding: 8bit\n" "X-Bugs: Report translation errors to the Language-Team address.\n" +"X-Generator: Poedit 2.0.6\n" #: lib/argmatch.c:134 #, c-format msgid "invalid argument %s for %s" -msgstr "invalid (tidak sesuai) argumen %s untuk %s" +msgstr "argumen %s yang tidak valid untuk %s" #: lib/argmatch.c:135 #, c-format msgid "ambiguous argument %s for %s" -msgstr "ambiguous (tidak sesuai) argumen %s untuk %s" +msgstr "argumen %s ambigu untuk %s" #: lib/argmatch.c:154 msgid "Valid arguments are:" -msgstr "Valid (sesuai) argumen adalah:" +msgstr "Argumen yang valid adalah:" -#: lib/closeout.c:122 src/grep.c:1274 +#: lib/c-stack.c:208 lib/c-stack.c:301 +msgid "program error" +msgstr "" + +#: lib/c-stack.c:209 lib/c-stack.c:302 +msgid "stack overflow" +msgstr "" + +#: lib/closeout.c:122 src/grep.c:1273 msgid "write error" -msgstr "penulisan error" +msgstr "kesalahan tulis" -#: lib/dfa.c:958 +#: lib/dfa.c:970 msgid "unbalanced [" msgstr "[ tidak seimbang" -#: lib/dfa.c:1079 +#: lib/dfa.c:1091 msgid "invalid character class" -msgstr "Nama kelas karakter tidak valid" +msgstr "kelas karakter tidak valid" -#: lib/dfa.c:1205 +#: lib/dfa.c:1217 msgid "character class syntax is [[:space:]], not [:space:]" -msgstr "" -"character (karakter) tingkat sintaks adalah [[:space:]], tidak [:space:]" +msgstr "sintaks kelas karakter adalah [[:space:]], bukan [:space:]" -#: lib/dfa.c:1272 +#: lib/dfa.c:1284 msgid "unfinished \\ escape" -msgstr "escape \\\\ tidak selesai" +msgstr "escape \\ tidak selesai" -#: lib/dfa.c:1433 +#: lib/dfa.c:1445 msgid "invalid content of \\{\\}" -msgstr "Isi dari \\{\\} tidak valid" +msgstr "isi dari \\{\\} tidak valid" -#: lib/dfa.c:1436 +#: lib/dfa.c:1448 msgid "regular expression too big" -msgstr "Ekspresi umum terlalu besar" +msgstr "ekspresi reguler terlalu besar" -#: lib/dfa.c:1850 +#: lib/dfa.c:1863 msgid "unbalanced (" msgstr "( tidak seimbang" -#: lib/dfa.c:1968 +#: lib/dfa.c:1981 msgid "no syntax specified" -msgstr "Tidak ada sintaks yang dispesifikasikan" +msgstr "tidak ada sintaks yang dinyatakan" -#: lib/dfa.c:1976 +#: lib/dfa.c:1992 msgid "unbalanced )" msgstr ") tidak seimbang" @@ -78,29 +87,29 @@ msgstr "Kesalahan sistem tidak dikenal" #: lib/getopt.c:278 -#, fuzzy, c-format +#, c-format msgid "%s: option '%s%s' is ambiguous\n" -msgstr "%s: opsi `-W %s' rancu\n" +msgstr "%s: opsi '%s%s' ambigu\n" #: lib/getopt.c:284 -#, fuzzy, c-format +#, c-format msgid "%s: option '%s%s' is ambiguous; possibilities:" -msgstr "%s: opsi `%s' rancu; kemungkinan:" +msgstr "%s: opsi '%s%s' ambigu; kemungkinan:" #: lib/getopt.c:319 -#, fuzzy, c-format +#, c-format msgid "%s: unrecognized option '%s%s'\n" -msgstr "%s: opsi tidak dikenal `%c%s'\n" +msgstr "%s: opsi tidak dikenal '%s%s'\n" #: lib/getopt.c:345 -#, fuzzy, c-format +#, c-format msgid "%s: option '%s%s' doesn't allow an argument\n" -msgstr "%s: opsi `%c%s' tidak mengijinkan sebuah argumen\n" +msgstr "%s: opsi '%s%s' tidak mengizinkan sebuah argumen\n" #: lib/getopt.c:360 -#, fuzzy, c-format +#, c-format msgid "%s: option '%s%s' requires an argument\n" -msgstr "%s: opsi `--%s' membutuhkan sebuah argumen\n" +msgstr "%s: opsi '%s%s' membutuhkan sebuah argumen\n" #: lib/getopt.c:621 #, c-format @@ -112,24 +121,24 @@ msgid "%s: option requires an argument -- '%c'\n" msgstr "%s: opsi membutuhkan sebuah argumen -- %c\n" -#: lib/obstack.c:338 lib/obstack.c:340 lib/xalloc-die.c:34 src/pcresearch.c:291 +#: lib/obstack.c:338 lib/obstack.c:340 lib/xalloc-die.c:34 src/pcresearch.c:313 msgid "memory exhausted" msgstr "kehabisan memori" #: lib/openat-die.c:38 #, c-format msgid "unable to record current working directory" -msgstr "unable (gagal) menrekam direktori kerja sekarang" +msgstr "tidak bisa merekam direktori kerja sekarang" #: lib/openat-die.c:57 #, c-format msgid "failed to return to initial working directory" -msgstr "failed (gagal) kembali ke direktori kerja sekarang" +msgstr "gagal kembali ke direktori kerja sekarang" #: lib/xbinary-io.c:37 #, c-format msgid "failed to set file descriptor text/binary mode" -msgstr "" +msgstr "gagal menata mode teks/biner descriptor berkas" #. TRANSLATORS: #. Get translations for open and closing quotation marks. @@ -150,11 +159,11 @@ #. for your locale. #. #. If you don't know what to put here, please see -#. +#. #. and use glyphs suitable for your language. #: lib/quotearg.c:362 msgid "`" -msgstr "`" +msgstr "'" #: lib/quotearg.c:363 msgid "'" @@ -166,11 +175,11 @@ #: lib/regcomp.c:138 msgid "No match" -msgstr "Tidak cocok" +msgstr "Tak ada yang cocok" #: lib/regcomp.c:141 msgid "Invalid regular expression" -msgstr "Ekspresi umum tidak valid" +msgstr "Ekspresi reguler tidak valid" #: lib/regcomp.c:144 msgid "Invalid collation character" @@ -189,17 +198,16 @@ msgstr "Referensi balik tidak valid" #: lib/regcomp.c:156 -#, fuzzy msgid "Unmatched [, [^, [:, [., or [=" -msgstr "Tidak cocok [ atau [^" +msgstr "[, [^, [:, [., atau [= tanpa pasangan" #: lib/regcomp.c:159 msgid "Unmatched ( or \\(" -msgstr "Tidak cocok ( atau \\(" +msgstr "( atau \\( tanpa pasangan" #: lib/regcomp.c:162 msgid "Unmatched \\{" -msgstr "Tidak cocok \\{" +msgstr "\\{ tanpa pasangan" #: lib/regcomp.c:165 msgid "Invalid content of \\{\\}" @@ -207,7 +215,7 @@ #: lib/regcomp.c:168 msgid "Invalid range end" -msgstr "Akhir jangkauan tidak valid" +msgstr "Akhir rentang tidak valid" #: lib/regcomp.c:171 msgid "Memory exhausted" @@ -215,45 +223,46 @@ #: lib/regcomp.c:174 msgid "Invalid preceding regular expression" -msgstr "Ekspresi umum yang mengawali tidak valid" +msgstr "Ekspresi reguler yang mendahului tidak valid" #: lib/regcomp.c:177 msgid "Premature end of regular expression" -msgstr "Akhir dari ekspresi umum tidak sempurna" +msgstr "Akhir dini dari ekspresi reguler" #: lib/regcomp.c:180 msgid "Regular expression too big" -msgstr "Ekspresi umum terlalu besar" +msgstr "Ekspresi reguler terlalu besar" #: lib/regcomp.c:183 msgid "Unmatched ) or \\)" -msgstr "Tidak cocok ) atau \\)" +msgstr ") atau \\) tanpa pasangan" -#: lib/regcomp.c:687 +#: lib/regcomp.c:688 msgid "No previous regular expression" -msgstr "Tidak ada ekspresi umum sebelumnya" +msgstr "Tidak ada ekspresi reguler sebelumnya" -#: lib/version-etc.c:74 +#: lib/version-etc.c:73 #, c-format msgid "Packaged by %s (%s)\n" -msgstr "Packaged (tersimpan) oleh %s (%s)\n" +msgstr "Dipaketkan oleh %s (%s)\n" -#: lib/version-etc.c:77 +#: lib/version-etc.c:76 #, c-format msgid "Packaged by %s\n" -msgstr "Packaged (tersimpan) oleh %s \n" +msgstr "Dipaketkan oleh %s \n" #. TRANSLATORS: Translate "(C)" to the copyright symbol #. (C-in-a-circle), if this symbol is available in the user's #. locale. Otherwise, do not translate "(C)"; leave it as-is. -#: lib/version-etc.c:84 +#: lib/version-etc.c:83 msgid "(C)" -msgstr "(c)" +msgstr "(C)" -#: lib/version-etc.c:86 +#: lib/version-etc.c:85 +#, fuzzy msgid "" "\n" -"License GPLv3+: GNU GPL version 3 or later .\n" "This is free software: you are free to change and redistribute it.\n" "There is NO WARRANTY, to the extent permitted by law.\n" @@ -271,19 +280,19 @@ #: lib/version-etc.c:102 #, c-format msgid "Written by %s.\n" -msgstr "Written (tulis) oleh %s.\n" +msgstr "Ditulis oleh %s.\n" #. TRANSLATORS: Each %s denotes an author name. #: lib/version-etc.c:106 #, c-format msgid "Written by %s and %s.\n" -msgstr "Written (tulis) oleh %s dan %s.\n" +msgstr "Ditulis oleh %s dan %s.\n" #. TRANSLATORS: Each %s denotes an author name. #: lib/version-etc.c:110 #, c-format msgid "Written by %s, %s, and %s.\n" -msgstr "Written (tulis) oleh %s, %s, and %s.\n" +msgstr "Ditulis oleh %s, %s, and %s.\n" #. TRANSLATORS: Each %s denotes an author name. #. You can use line breaks, estimating that each author name occupies @@ -294,7 +303,7 @@ "Written by %s, %s, %s,\n" "and %s.\n" msgstr "" -"Written (tulis) oleh %s, %s, %s,\n" +"Ditulis oleh %s, %s, %s,\n" "dan %s.\n" #. TRANSLATORS: Each %s denotes an author name. @@ -306,7 +315,7 @@ "Written by %s, %s, %s,\n" "%s, and %s.\n" msgstr "" -"Written (tulis) oleh %s, %s, %s,\n" +"Ditulis oleh %s, %s, %s,\n" "%s, dan %s.\n" #. TRANSLATORS: Each %s denotes an author name. @@ -318,7 +327,7 @@ "Written by %s, %s, %s,\n" "%s, %s, and %s.\n" msgstr "" -"Written (tulis) %s, %s, %s,\n" +"Ditulis oleh %s, %s, %s,\n" "%s, %s, dan %s.\n" #. TRANSLATORS: Each %s denotes an author name. @@ -330,7 +339,7 @@ "Written by %s, %s, %s,\n" "%s, %s, %s, and %s.\n" msgstr "" -"Written (tulis) oleh %s, %s, %s,\n" +"Ditulis oleh %s, %s, %s,\n" "%s, %s, %s, dan %s.\n" #. TRANSLATORS: Each %s denotes an author name. @@ -343,9 +352,9 @@ "%s, %s, %s, %s,\n" "and %s.\n" msgstr "" -"Written (tulis) oleh %s, %s, %s,\n" -" %s, %s, %s, %s,\n" -" dan %s.\n" +"Ditulis oleh %s, %s, %s,\n" +"%s, %s, %s, %s,\n" +"dan %s.\n" #. TRANSLATORS: Each %s denotes an author name. #. You can use line breaks, estimating that each author name occupies @@ -357,7 +366,7 @@ "%s, %s, %s, %s,\n" "%s, and %s.\n" msgstr "" -"Written (tulis) oleh %s, %s, %s,\n" +"Ditulis oleh %s, %s, %s,\n" "%s, %s, %s, %s,\n" "%s, dan %s.\n" @@ -371,9 +380,9 @@ "%s, %s, %s, %s,\n" "%s, %s, and others.\n" msgstr "" -"Written (tulis) oleh %s, %s, %s,\n" +"Ditulis oleh %s, %s, %s,\n" "%s, %s, %s, %s,\n" -"%s, %s, dan lain.\n" +"%s, %s, dan yang lain.\n" #. TRANSLATORS: The placeholder indicates the bug-reporting address #. for this package. Please add _another line_ saying @@ -386,140 +395,133 @@ "Report bugs to: %s\n" msgstr "" "\n" -"Laporkan bugs ke: %s\n" +"Laporkan kutu ke: %s\n" #: lib/version-etc.c:247 #, c-format msgid "Report %s bugs to: %s\n" -msgstr "Laporkan kesalahan %s ke: %s\n" +msgstr "Laporkan kutu %s ke: %s\n" #: lib/version-etc.c:251 #, c-format msgid "%s home page: <%s>\n" -msgstr "Halaman rumah %s: <%s>\n" +msgstr "Laman web %s: <%s>\n" #: lib/version-etc.c:253 -#, c-format -msgid "%s home page: \n" -msgstr "Halaman rumah %s: \n" +#, fuzzy, c-format +msgid "%s home page: \n" +msgstr "Laman web %s: \n" #: lib/version-etc.c:256 -msgid "General help using GNU software: \n" +#, fuzzy +msgid "General help using GNU software: \n" msgstr "Bantuan umum menggunakan aplikasi GNU: \n" #: lib/xstrtol-error.c:63 #, c-format msgid "invalid %s%s argument '%s'" -msgstr "invalid (tidak sesuai) %s%s argumen '%s'" +msgstr "%s%s argumen '%s' tidak valid" #: lib/xstrtol-error.c:68 #, c-format msgid "invalid suffix in %s%s argument '%s'" -msgstr "invalid (tidak sesuai) akhiran dalam %s%s argumen '%s'" +msgstr "akhiran dalam %s%s argumen '%s' tidak valid" #: lib/xstrtol-error.c:72 #, c-format msgid "%s%s argument '%s' too large" msgstr "%s%s argumen '%s' terlalu besar" -#. This is a proper name. See the gettext manual, section Names. -#: src/grep.c:59 -msgid "Mike Haertel" -msgstr "Mike Haertel" - -#: src/grep.c:60 -msgid "others, see " -msgstr "lain, lihat " - -#: src/grep.c:585 +#: src/grep.c:582 msgid "(standard input)" -msgstr "(standar masukan)" +msgstr "(masukan standar)" -#: src/grep.c:765 +#: src/grep.c:762 msgid "invalid context length argument" -msgstr "konteks panjang argumen tidak valid" +msgstr "argumen panjang konteks tidak valid" -#: src/grep.c:828 +#: src/grep.c:827 msgid "input is too large to count" msgstr "masukan terlalu besar untuk dihitung" -#: src/grep.c:1579 +#: src/grep.c:1578 #, c-format msgid "Binary file %s matches\n" -msgstr "Berkas binari %s cocok\n" +msgstr "Berkas biner %s cocok\n" -#: src/grep.c:1627 +#: src/grep.c:1626 #, c-format msgid "warning: %s: %s" msgstr "peringatan: %s: %s" -#: src/grep.c:1628 +#: src/grep.c:1627 msgid "recursive directory loop" msgstr "perulangan direktori rekursif" -#: src/grep.c:1844 +#: src/grep.c:1843 #, c-format msgid "input file %s is also the output" -msgstr "input (masuk) berkas %s juga keluar" +msgstr "berkas masukan %s juga sebagai keluaran" -#: src/grep.c:1907 src/grep.c:1914 -#, c-format -msgid "Usage: %s [OPTION]... PATTERN [FILE]...\n" +#: src/grep.c:1906 src/grep.c:1913 +#, fuzzy, c-format +msgid "Usage: %s [OPTION]... PATTERNS [FILE]...\n" msgstr "Penggunaan: %s [OPSI]... POLA [BERKAS]...\n" -#: src/grep.c:1909 +#: src/grep.c:1908 #, c-format msgid "Try '%s --help' for more information.\n" msgstr "Coba '%s --help' untuk informasi lebih lanjut.\n" -#: src/grep.c:1915 +#: src/grep.c:1914 #, fuzzy, c-format -msgid "Search for PATTERN in each FILE.\n" -msgstr "Cari untuk POLA dalam setiap berkas atau standar masukan.\n" +msgid "Search for PATTERNS in each FILE.\n" +msgstr "Cari POLA dalam setiap BERKAS.\n" -#: src/grep.c:1916 +#: src/grep.c:1915 #, fuzzy, c-format msgid "" "Example: %s -i 'hello world' menu.h main.c\n" +"PATTERNS can contain multiple patterns separated by newlines.\n" "\n" "Pattern selection and interpretation:\n" msgstr "" "Contoh: %s -i 'hello world' menu.h main.c\n" "\n" -"Seleksi dan interpretasi regexp:\n" +"Seleksi dan interpretasi pola:\n" #: src/grep.c:1920 #, fuzzy, c-format msgid "" -" -E, --extended-regexp PATTERN is an extended regular expression\n" -" -F, --fixed-strings PATTERN is a set of newline-separated strings\n" -" -G, --basic-regexp PATTERN is a basic regular expression (default)\n" -" -P, --perl-regexp PATTERN is a Perl regular expression\n" +" -E, --extended-regexp PATTERNS are extended regular expressions\n" +" -F, --fixed-strings PATTERNS are strings\n" +" -G, --basic-regexp PATTERNS are basic regular expressions\n" +" -P, --perl-regexp PATTERNS are Perl regular expressions\n" msgstr "" " -E, --extended-regexp POLA adalah ekstensi ekspresi reguler\n" -" -F, --fixed-stromg POLA adalah string tetap yang dipisahkan oleh " -"sebuah set baris-baru\n" -" -G, --basic-regexp POLA adalah ekspresi reguler dasar\n" +" -F, --fixed-string POLA adalah kumpulan string yang dipisahkan " +"baris-baru\n" +" -G, --basic-regexp POLA adalah ekspresi reguler dasar (baku)\n" " -P, --perl-regexp POLA adalah sebuah ekspresi reguler Perl\n" #: src/grep.c:1926 -#, c-format +#, fuzzy, c-format msgid "" -" -e, --regexp=PATTERN use PATTERN for matching\n" -" -f, --file=FILE obtain PATTERN from FILE\n" +" -e, --regexp=PATTERNS use PATTERNS for matching\n" +" -f, --file=FILE take PATTERNS from FILE\n" " -i, --ignore-case ignore case distinctions\n" -" -w, --word-regexp force PATTERN to match only whole words\n" -" -x, --line-regexp force PATTERN to match only whole lines\n" +" -w, --word-regexp match only whole words\n" +" -x, --line-regexp match only whole lines\n" " -z, --null-data a data line ends in 0 byte, not newline\n" msgstr "" " -e, --regexp=POLA gunakan POLA untuk pencocokan\n" " -f, --file=BERKAS dapatkan pola dari BERKAS\n" -" -i, --ignore-case abaikan perbedaan besar huruf\n" +" -i, --ignore-case abaikan perbedaan besar kecil huruf\n" " -w, --word-regexp paksa POLA hanya untuk pencocokan dengan " "keseluruhan kata\n" " -x, --line-regexp paksa POLA hanya untuk pencocokan dengan " "keseluruhan baris\n" -" -z, --null-data baris data berakhir dalam 0 byte, bukan baris-" +" -z, --null-data baris data berakhir dengan byte 0, bukan baris-" "baru\n" "\n" @@ -535,13 +537,13 @@ msgstr "" "\n" "Lain-lain:\n" -" -s, --no-messages tekan pesan kesalahan\n" +" -s, --no-messages sembunyikan pesan kesalahan\n" " -v, --invert-match pilih baris-baris yang tidak sesuai\n" " -V, --version tampilkan informasi versi dan keluar\n" " --help tampilkan bantuan ini dan keluar\n" #: src/grep.c:1940 -#, fuzzy, c-format +#, c-format msgid "" "\n" "Output control:\n" @@ -555,30 +557,32 @@ "prefix\n" msgstr "" "\n" -"Output control:\n" -" -m, --max-count=NUM stop after NUM matches\n" -" -b, --byte-offset print the byte offset with output lines\n" -" -n, --line-number print line number with output lines\n" -" --line-buffered flush output on every line\n" -" -H, --with-filename print the file name for each match\n" -" -h, --no-filename suppress the file name prefix on output\n" -" --label=LABEL use LABEL as the standard input file name " -"prefix\n" +"Kendali keluaran:\n" +" -m, --max-count=NUM berhenti setelah NUM kecocokan\n" +" -b, --byte-offset cetak ofset byte dengan baris-baris keluaran\n" +" -n, --line-number cetak nomor baris dengan baris-baris keluaran\n" +" --line-buffered gelontor keluaran pada setiap baris\n" +" -H, --with-filename cetak nama berkas dengan baris-baris keluaran\n" +" -h, --no-filename sembunyikan prefiks nama berkas pada keluaran\n" +" --label=LABEL pakai LABEL sebagai prefiks nama berkas masukan " +"standar\n" #: src/grep.c:1951 -#, c-format +#, fuzzy, c-format msgid "" -" -o, --only-matching show only the part of a line matching PATTERN\n" +" -o, --only-matching show only nonempty parts of lines that match\n" " -q, --quiet, --silent suppress all normal output\n" " --binary-files=TYPE assume that binary files are TYPE;\n" " TYPE is 'binary', 'text', or 'without-match'\n" " -a, --text equivalent to --binary-files=text\n" msgstr "" -" -o, --only-matching show only the part of a line matching PATTERN\n" -" -q, --quiet, --silent suppress all normal output\n" -" --binary-files=TYPE assume that binary files are TYPE;\n" -" TYPE is 'binary', 'text', or 'without-match'\n" -" -a, --text equivalent to --binary-files=text\n" +" -o, --only-matching hanya tampilkan bagian dari baris yang cocok " +"dengan POLA\n" +" -q, --quiet, --silent sembunyikan semua keluaran normal\n" +" --binary-files=TYPE asumsikan bahwa berkas biner adalah TIPE;\n" +" TIPE adalah 'binary', 'text', or 'without-" +"match'\n" +" -a, --text ekuivalen dengan --binary-files=text\n" #: src/grep.c:1958 #, c-format @@ -591,33 +595,34 @@ " -r, --recursive like --directories=recurse\n" " -R, --dereference-recursive likewise, but follow all symlinks\n" msgstr "" -" -I equivalent to --binary-files=without-match\n" -" -d, --directories=ACTION how to handle directories;\n" -" ACTION is 'read', 'recurse', or 'skip'\n" -" -D, --devices=ACTION how to handle devices, FIFOs and sockets;\n" -" ACTION is 'read' or 'skip'\n" -" -r, --recursive like --directories=recurse\n" -" -R, --dereference-recursive likewise, but follow all symlinks\n" +" -I ekuivalen dengan --binary-files=without-match\n" +" -d, --directories=AKSI bagaimana menangani direktori;\n" +" AKSI adalah 'read', 'recurse', atau 'skip'\n" +" -D, --devices=AKSI bagaimana menangani peranti, FIFO, dan soket;\n" +" AKSI adalah 'read' atau 'skip'\n" +" -r, --recursive seperti --directories=recurse\n" +" -R, --dereference-recursive serupa, tapi ikut semua symlink\n" #: src/grep.c:1967 -#, c-format +#, fuzzy, c-format msgid "" -" --include=FILE_PATTERN search only files that match FILE_PATTERN\n" -" --exclude=FILE_PATTERN skip files and directories matching " -"FILE_PATTERN\n" +" --include=GLOB search only files that match GLOB (a file " +"pattern)\n" +" --exclude=GLOB skip files and directories matching GLOB\n" " --exclude-from=FILE skip files matching any file pattern from FILE\n" -" --exclude-dir=PATTERN directories that match PATTERN will be " -"skipped.\n" +" --exclude-dir=GLOB skip directories that match GLOB\n" msgstr "" -" --include=FILE_PATTERN search only files that match FILE_PATTERN\n" -" --exclude=FILE_PATTERN skip files and directories matching " -"FILE_PATTERN\n" -" --exclude-from=FILE skip files matching any file pattern from FILE\n" -" --exclude-dir=PATTERN directories that match PATTERN will be " -"skipped.\n" +" --include=POLA_BERKAS hanya cari berkas yang cocok dengan " +"POLA_BERKAS\n" +" --exclude=POLA_BERKAS lewati berkas dan direktori yang cocok dengan " +"POLA_BERKAS\n" +" --exclude-from=BERKAS lewati berkas yang cocok dengan sebarang pola " +"dari BERKAS\n" +" --exclude-dir=POLA direktori yang cocok dengan POLA akan " +"dilewati.\n" #: src/grep.c:1974 -#, fuzzy, c-format +#, c-format msgid "" " -L, --files-without-match print only names of FILEs with no selected " "lines\n" @@ -626,11 +631,13 @@ " -T, --initial-tab make tabs line up (if needed)\n" " -Z, --null print 0 byte after FILE name\n" msgstr "" -" -L, --files-without-match print only names of FILEs containing no match\n" -" -l, --files-with-matches print only names of FILEs containing matches\n" -" -c, --count print only a count of matching lines per FILE\n" -" -T, --initial-tab make tabs line up (if needed)\n" -" -Z, --null print 0 byte after FILE name\n" +" -L, --files-without-match hanya cetak nama BERKAS yang tidak memuat baris " +"yang cocok\n" +" -l, --files-with-matches hanya cetak nama BERKAS dengan baris yang " +"cocok\n" +" -c, --count hanya cetak cacah baris yang cocok per BERKAS\n" +" -T, --initial-tab jadikan tab sejajar (bila diperlukan)\n" +" -Z, --null cetak byte 0 setelah nama BERKAS\n" #: src/grep.c:1980 #, c-format @@ -642,13 +649,13 @@ " -C, --context=NUM print NUM lines of output context\n" msgstr "" "\n" -"Context control:\n" -" -B, --before-context=NUM print NUM lines of leading context\n" -" -A, --after-context=NUM print NUM lines of trailing context\n" -" -C, --context=NUM print NUM lines of output context\n" +"Kendali konteks:\n" +" -B, --before-context=NUM cetak NUM baris yang mendahului konteks\n" +" -A, --after-context=NUM cetak NUM baris yang mengikuti konteks\n" +" -C, --context=NUM cetak NUM baris konteks keluaran\n" #: src/grep.c:1987 -#, fuzzy, c-format +#, c-format msgid "" " -NUM same as --context=NUM\n" " --color[=WHEN],\n" @@ -665,8 +672,6 @@ " WHEN dapat berupa 'always', 'never', atau " "'auto'\n" " -U, --binary jangan hapus karakter CR di EOL (MSDOS)\n" -" -u, --unix-byte-offsets laporkan ofset seperti bila CR tidak ada " -"(MSDOS)\n" "\n" #: src/grep.c:1994 @@ -674,274 +679,92 @@ msgid "" "When FILE is '-', read standard input. With no FILE, read '.' if\n" "recursive, '-' otherwise. With fewer than two FILEs, assume -h.\n" -"Exit status is 0 if any line is selected, 1 otherwise;\n" +"Exit status is 0 if any line (or file if -L) is selected, 1 otherwise;\n" "if any error occurs and -q is not given, the exit status is 2.\n" msgstr "" -"Jika tidak ada BERKAS, atau ketika BERKAS adalah -, baca standar masukan. " -"Jika lebih kecil dari dua BERKAS\n" -"yang diberikan, asumsikan -h. Status keluar adalah 0 jika baris apapun telah " -"dipilih, 1 jika tidak;\n" -"jika ada error apapun yang terjadi dan opsi -q tidak diberikan, status " -"keluar adalah 2.\n" +"Jika BERKAS adalah '-', baca masukan standar. Tanpa BERKAS, baca '.'\n" +"bila rekursif, '-' jika tidak. Dengan kurang dari dua BERKAS, asumsikan -" +"h.\n" +"Status keluar adalah 0 jika baris apapun telah dipilih, 1 jika tidak;\n" +"jika ada error apapun dan opsi -q tidak diberikan, status keluar adalah 2.\n" #: src/grep.c:2034 msgid "conflicting matchers specified" -msgstr "konflik pencocokan dispesifikasikan" +msgstr "pencocok yang bertentangan dispesifikasikan" #: src/grep.c:2038 #, c-format msgid "invalid matcher %s" -msgstr "matcher tidak valid %s" +msgstr "pencocok tidak valid %s" -#: src/grep.c:2458 +#: src/grep.c:2459 #, c-format msgid "warning: GREP_OPTIONS is deprecated; please use an alias or script" -msgstr "" +msgstr "peringatan: GREP_OPTIONS usang; harap gunakan alias atau skrip" -#: src/grep.c:2485 +#: src/grep.c:2486 msgid "unknown devices method" -msgstr "metode device tidak dikenal" +msgstr "metode peranti tidak dikenal" -#: src/grep.c:2629 +#: src/grep.c:2630 msgid "invalid max count" -msgstr "jumlah maksimal tidak valid" +msgstr "cacah maks tidak valid" -#: src/grep.c:2687 +#: src/grep.c:2688 msgid "unknown binary-files type" -msgstr "tipe berkas binari tidak dikenal" +msgstr "tipe berkas biner tidak dikenal" + +#: src/grep.c:2770 +#, fuzzy +msgid "" +"Written by Mike Haertel and others; see\n" +"." +msgstr "lainnya, lihat " -#: src/pcresearch.c:80 +#: src/pcresearch.c:86 msgid "failed to allocate memory for the PCRE JIT stack" -msgstr "failed to allocate memory for the PCRE JIT stack" +msgstr "gagal mengalokasikan memori untuk stack JIT PCRE" -#: src/pcresearch.c:97 +#: src/pcresearch.c:118 msgid "" "support for the -P option is not compiled into this --disable-perl-regexp " "binary" msgstr "" -"Dukungan untuk opsi -P tidak dikompile kedalam ini --disable-perl-regexp " -"binari" +"dukungan untuk opsi -P tidak di-kompile ke dalam biner --disable-perl-regexp " +"ini" -#: src/pcresearch.c:119 +#: src/pcresearch.c:140 msgid "-P supports only unibyte and UTF-8 locales" -msgstr "" +msgstr "-P hanya mendukung unibyte dan locale UTF-8" -#: src/pcresearch.c:125 +#: src/pcresearch.c:146 msgid "the -P option only supports a single pattern" -msgstr "Opsi -P hanya mendukung sebuah pola tunggal" +msgstr "opsi -P hanya mendukung sebuah pola tunggal" -#: src/pcresearch.c:167 +#: src/pcresearch.c:189 msgid "internal error (should never happen)" -msgstr "internal error (should never happen)" +msgstr "kesalahan internal (mestinya tidak pernah terjadi)" -#: src/pcresearch.c:192 +#: src/pcresearch.c:214 msgid "internal error" -msgstr "penulisan error" +msgstr "kesalahan internal" -#: src/pcresearch.c:215 +#: src/pcresearch.c:237 msgid "exceeded PCRE's line length limit" -msgstr "exceeded PCRE's line length limit" +msgstr "melampaui batas panjang baris PCRE" -#: src/pcresearch.c:295 +#: src/pcresearch.c:317 msgid "exhausted PCRE JIT stack" -msgstr "" +msgstr "stack JIT PCRE habis" -#: src/pcresearch.c:299 +#: src/pcresearch.c:321 msgid "exceeded PCRE's backtracking limit" -msgstr "exceeded PCRE's backtracking limit" +msgstr "melampaui batas backtrack PCRE" -#: src/pcresearch.c:306 +#: src/pcresearch.c:328 #, c-format msgid "internal PCRE error: %d" -msgstr "penulisan error PCRE: %d" - -#~ msgid "%s: option '--%s' doesn't allow an argument\n" -#~ msgstr "%s: opsi `--%s' tidak mengijinkan sebuah argumen\n" - -#~ msgid "%s: unrecognized option '--%s'\n" -#~ msgstr "%s: opsi tidak dikenal `--%s'\n" +msgstr "kesalahan PCRE internal: %d" -#~ msgid "%s: option '-W %s' is ambiguous\n" -#~ msgstr "%s: opsi `-W %s' rancu\n" - -#~ msgid "%s: option '-W %s' doesn't allow an argument\n" -#~ msgstr "%s: opsi `-W %s' tidak mengijinkan sebuah argumen\n" - -#~ msgid "%s: option '-W %s' requires an argument\n" -#~ msgstr "%s: opsi `-W %s' membutuhkan sebuah argumen\n" - -#~ msgid "PATTERN is, by default, a basic regular expression (BRE).\n" -#~ msgstr "POLA adalah, secara baku, sebuah ekspresi regular dasar (BRE).\n" - -#~ msgid "" -#~ "'egrep' means 'grep -E'. 'fgrep' means 'grep -F'.\n" -#~ "Direct invocation as either 'egrep' or 'fgrep' is deprecated.\n" -#~ msgstr "" -#~ "`egrep' berarti `grep -E'. `fgrep' berarti `grep -F'.\n" -#~ "Pemanggilan langsung baik sebagai `egrep' atau `fgrep' sudah " -#~ "ditinggalkan.\n" - -#~ msgid "lseek failed" -#~ msgstr "gagal lseek" - -#~ msgid "GNU Grep home page: <%s>\n" -#~ msgstr "Halaman rumah GNU Grep: <%s>\n" - -#~ msgid "invalid UTF-8 byte sequence in input" -#~ msgstr "invalid UTF-8 byte sequence in input" - -#~ msgid "PATTERN is an extended regular expression (ERE).\n" -#~ msgstr "POLA adalah sebuah ekstensi ekspresi regular (ERE).\n" - -#~ msgid "Invocation as 'egrep' is deprecated; use 'grep -E' instead.\n" -#~ msgstr "" -#~ "Pemanggilan sebagai `egrep' sudah ditinggalkan; lebih baik gunakan `grep -" -#~ "E'.\n" - -#~ msgid "PATTERN is a set of newline-separated fixed strings.\n" -#~ msgstr "POLA adalah sebuah seet dari baris-baru dipisahkan string tetap.\n" - -#~ msgid "Invocation as 'fgrep' is deprecated; use 'grep -F' instead.\n" -#~ msgstr "" -#~ "pemanggilan sebagai `fgrep' sudah ditinggalkan; lebih baik gunakan `grep -" -#~ "F'.\n" - -#~ msgid "unfinished repeat count" -#~ msgstr "jumlah perulangan tidak selesai" - -#~ msgid "malformed repeat count" -#~ msgstr "jumlah perulangan salah bentuk" - -#~ msgid "writing output" -#~ msgstr "menulis keluaran" - -#~ msgid "" -#~ "\n" -#~ "Output control:\n" -#~ " -m, --max-count=NUM stop after NUM matches\n" -#~ " -b, --byte-offset print the byte offset with output lines\n" -#~ " -n, --line-number print line number with output lines\n" -#~ " --line-buffered flush output on every line\n" -#~ " -H, --with-filename print the filename for each match\n" -#~ " -h, --no-filename suppress the prefixing filename on output\n" -#~ " --label=LABEL print LABEL as filename for standard input\n" -#~ " -o, --only-matching show only the part of a line matching " -#~ "PATTERN\n" -#~ " -q, --quiet, --silent suppress all normal output\n" -#~ " --binary-files=TYPE assume that binary files are TYPE;\n" -#~ " TYPE is `binary', `text', or `without-match'\n" -#~ " -a, --text equivalent to --binary-files=text\n" -#~ " -I equivalent to --binary-files=without-match\n" -#~ " -d, --directories=ACTION how to handle directories;\n" -#~ " ACTION is `read', `recurse', or `skip'\n" -#~ " -D, --devices=ACTION how to handle devices, FIFOs and sockets;\n" -#~ " ACTION is `read' or `skip'\n" -#~ " -R, -r, --recursive equivalent to --directories=recurse\n" -#~ " --include=FILE_PATTERN search only files that match FILE_PATTERN\n" -#~ " --exclude=FILE_PATTERN skip files and directories matching " -#~ "FILE_PATTERN\n" -#~ " --exclude-from=FILE skip files matching any file pattern from " -#~ "FILE\n" -#~ " --exclude-dir=PATTERN directories that match PATTERN will be " -#~ "skipped.\n" -#~ " -L, --files-without-match print only names of FILEs containing no " -#~ "match\n" -#~ " -l, --files-with-matches print only names of FILEs containing matches\n" -#~ " -c, --count print only a count of matching lines per " -#~ "FILE\n" -#~ " -T, --initial-tab make tabs line up (if needed)\n" -#~ " -Z, --null print 0 byte after FILE name\n" -#~ msgstr "" -#~ "\n" -#~ "Kontrol keluaran:\n" -#~ " -m, --max-count=NUM berhenti setelah cocok sejumlah NUM\n" -#~ " -b, --byte-offset tampilkan ofset byte dengan baris keluaran\n" -#~ " -n, --line-number tampilkan nomor baris dengan baris keluaran\n" -#~ " --line-buffered flush keluaran di setiap baris\n" -#~ " -H, --with-filename tampilkan nama berkas untuk setiap kecocokan\n" -#~ " -h, --no-filename tekan mengawali nama berkas di output\n" -#~ " --label=LABEL tampilkan LABEL sebagai nama berkas standar " -#~ "masukan\n" -#~ " -o, --only-matching hanya tampilkan bagian dari baris yang cocok " -#~ "dengan POLA\n" -#~ " -q, --quiet, --silent tekan seluruh keluaran normal\n" -#~ " --binary-files=TIPE asumsikan bahwa berkas binari adalah TIPE\n" -#~ " TIPE adalah 'binary', 'text', atau 'without " -#~ "match'\n" -#~ " -a, --text sama dengan --binary-files=text\n" -#~ " -l sama dengan --binary-files=without-match\n" -#~ " -d, --directories=AKSI bagaimana menangani direktori;\n" -#~ " AKSI adalah 'read', 'recurse', atau 'skip'.\n" -#~ " -D, --devices=AKSI bagaimana menangani device, FIFO dan soket\n" -#~ " AKSI adalah 'read' atau 'skip'\n" -#~ " -R, -r, --recursive sama dengan --directories=recurse.\n" -#~ " --include=POLA_BERKAS cari hanya berkas yang cocok dengan " -#~ "POLA_BERKAS\n" -#~ " --exclude=POLA_BERKAS lewatkan berkas dan direktori yang cocok " -#~ "dengan POLA_BERKAS\n" -#~ " --exclude-from=FILE lewatkan berkas yang cocok dengan pola berkas " -#~ "dari FILE\n" -#~ " -L, --files-without-match hanya menampilkan nama dari BERKAS yang tidak " -#~ "ada kecocokan\n" -#~ " -l, --files-with-match hanya menampilkan nama dari BERKAS yang ada " -#~ "kecocokan\n" -#~ " -c, --count hanya menampilkan jumlah baris yang cocok " -#~ "setiap BERKAS\n" -#~ " -T, --inital-tab buat baris tabs line up (jika diperlukan)\n" -#~ " -Z, --null menampilkan 0 byte setelah nama BERKAS\n" - -#~ msgid "" -#~ "In GREP_COLORS=\"%s\", the \"%s\" capacity needs a value (\"=...\"); " -#~ "skipped." -#~ msgstr "" -#~ "Dalam GREP_COLORS=\"%s\", kapasitas \"%s\" membutuhkan sebuah nilai " -#~ "(\"=...\"); dilewatkan." - -#~ msgid "" -#~ "In GREP_COLORS=\"%s\", the \"%s\" capacity is boolean and cannot take a " -#~ "value (\"=%s\"); skipped." -#~ msgstr "" -#~ "Dalam GREP_COLORS=\"%s\", kapasitas \"%s\" adalah boolean dan tidak dapat " -#~ "mengambil sebuah nilai (\"=%s\"); dilewatkan" - -#~ msgid "In GREP_COLORS=\"%s\", the \"%s\" capacity %s." -#~ msgstr "Dalam GREP_COLORS=\"%s\", kapasitas \"%s\" adalah %s." - -#~ msgid "" -#~ "Stopped processing of ill-formed GREP_COLORS=\"%s\" at remaining " -#~ "substring \"%s\"." -#~ msgstr "" -#~ "Berhenti pemrosesan dari berbentuk-buruk GREP_COLORS=\"%s\" di substring " -#~ "yang tersisa \"%s\"." - -#~ msgid "unknown directories method" -#~ msgstr "metode direktori tidak dikenal" - -#~ msgid "The -P and -z options cannot be combined" -#~ msgstr "Opsi -P dan -z tidak dapat digabungkan" - -#~ msgid "%s: illegal option -- %c\n" -#~ msgstr "%s: opsi ilegal -- %c\n" - -#~ msgid "Copyright (C) 2008 Free Software Foundation, Inc.\n" -#~ msgstr "Hak Cipta (C) 2008 Free Software Foundation, Inc.\n" - -#~ msgid "out of memory" -#~ msgstr "memori habis" - -#~ msgid "Usage: %s [OPTION]... PATTERN [FILE] ...\n" -#~ msgstr "Pemakaian: %s [OPSI]... POLA [FILE] ...\n" - -#~ msgid "%s (GNU grep) %s\n" -#~ msgstr "%s (GNU grep) %s\n" - -#~ msgid "" -#~ "This is free software; see the source for copying conditions. There is " -#~ "NO\n" -#~ "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR " -#~ "PURPOSE.\n" -#~ msgstr "" -#~ "Ini adalah free software; lihat sumber untuk syarat penyalinan. Tidak " -#~ "ada\n" -#~ "jaminan; sekalipun untuk PENJUALAN atau KESESUAIAN UNTUK TUJUAN " -#~ "TERTENTU.\n" +#~ msgid "Mike Haertel" +#~ msgstr "Mike Haertel" Binary files /tmp/tmppJ6Y2n/6jFha9hbxv/grep-3.1/po/it.gmo and /tmp/tmppJ6Y2n/tYMwNxGD36/grep-3.3/po/it.gmo differ diff -Nru grep-3.1/po/it.po grep-3.3/po/it.po --- grep-3.1/po/it.po 2017-07-02 20:21:16.000000000 +0000 +++ grep-3.3/po/it.po 2018-12-21 04:39:02.000000000 +0000 @@ -1,16 +1,16 @@ # Italian translation of grep -# Copyright (C) 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2016 Free Software Foundation, Inc. +# Copyright (C) 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2016, 2018 Free Software Foundation, Inc. # This file is distributed under the same license as the grep package. # # Marco d'Itri , 1999, 2001. -# Milo Casagrande , 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2016. +# Milo Casagrande , 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2016, 2018. # msgid "" msgstr "" -"Project-Id-Version: grep-2.23.7\n" +"Project-Id-Version: grep-3.1.48\n" "Report-Msgid-Bugs-To: bug-grep@gnu.org\n" -"POT-Creation-Date: 2017-07-02 13:21-0700\n" -"PO-Revision-Date: 2016-03-15 12:10+0100\n" +"POT-Creation-Date: 2018-12-20 20:39-0800\n" +"PO-Revision-Date: 2018-12-20 08:29+0100\n" "Last-Translator: Milo Casagrande \n" "Language-Team: Italian \n" "Language: it\n" @@ -19,7 +19,7 @@ "Content-Transfer-Encoding: 8bit\n" "X-Bugs: Report translation errors to the Language-Team address.\n" "Plural-Forms: nplurals=2; plural=(n!=1);\n" -"X-Generator: Poedit 1.8.7\n" +"X-Generator: Poedit 2.2\n" "X-Poedit-SourceCharset: UTF-8\n" #: lib/argmatch.c:134 @@ -36,43 +36,51 @@ msgid "Valid arguments are:" msgstr "Gli argomenti validi sono:" -#: lib/closeout.c:122 src/grep.c:1274 +#: lib/c-stack.c:208 lib/c-stack.c:301 +msgid "program error" +msgstr "errore del programma" + +#: lib/c-stack.c:209 lib/c-stack.c:302 +msgid "stack overflow" +msgstr "overflow dello stack" + +#: lib/closeout.c:122 src/grep.c:1273 msgid "write error" msgstr "errore di scrittura" -#: lib/dfa.c:958 +#: lib/dfa.c:970 msgid "unbalanced [" msgstr "[ non bilanciata" -#: lib/dfa.c:1079 +#: lib/dfa.c:1091 msgid "invalid character class" msgstr "Classe del carattere non valido" -#: lib/dfa.c:1205 +#: lib/dfa.c:1217 msgid "character class syntax is [[:space:]], not [:space:]" msgstr "La sintassi per la classe di caratteri è [[:space:]], non [:space:]" -#: lib/dfa.c:1272 +#: lib/dfa.c:1284 msgid "unfinished \\ escape" msgstr "Escape \\ incompleto" -#: lib/dfa.c:1433 +#: lib/dfa.c:1445 msgid "invalid content of \\{\\}" msgstr "Contenuto di \\{\\} non valido" -#: lib/dfa.c:1436 +#: lib/dfa.c:1448 msgid "regular expression too big" msgstr "Espressione regolare troppo grande" -#: lib/dfa.c:1850 +#: lib/dfa.c:1863 msgid "unbalanced (" msgstr "( non bilanciata" -#: lib/dfa.c:1968 +#: lib/dfa.c:1981 msgid "no syntax specified" msgstr "Nessuna sintassi specificata" -#: lib/dfa.c:1976 +#: lib/dfa.c:1992 msgid "unbalanced )" msgstr ") non bilanciata" @@ -81,29 +89,29 @@ msgstr "Errore di sistema sconosciuto" #: lib/getopt.c:278 -#, fuzzy, c-format +#, c-format msgid "%s: option '%s%s' is ambiguous\n" -msgstr "%s: l'opzione \"%s\" è ambigua\n" +msgstr "%s: l'opzione \"%s%s\" è ambigua\n" #: lib/getopt.c:284 -#, fuzzy, c-format +#, c-format msgid "%s: option '%s%s' is ambiguous; possibilities:" -msgstr "%s: l'opzione \"%s\" è ambigua. Possibilità:" +msgstr "%s: l'opzione \"%s%s\" è ambigua. Possibilità:" #: lib/getopt.c:319 -#, fuzzy, c-format +#, c-format msgid "%s: unrecognized option '%s%s'\n" -msgstr "%s: opzione \"%c%s\" non riconosciuta\n" +msgstr "%s: opzione \"%s%s\" non riconosciuta\n" #: lib/getopt.c:345 -#, fuzzy, c-format +#, c-format msgid "%s: option '%s%s' doesn't allow an argument\n" -msgstr "%s: l'opzione \"%c%s\" non accetta argomenti\n" +msgstr "%s: l'opzione \"%s%s\" non accetta argomenti\n" #: lib/getopt.c:360 -#, fuzzy, c-format +#, c-format msgid "%s: option '%s%s' requires an argument\n" -msgstr "%s: l'opzione \"--%s\" richiede un argomento\n" +msgstr "%s: l'opzione \"%s%s\" richiede un argomento\n" #: lib/getopt.c:621 #, c-format @@ -115,7 +123,7 @@ msgid "%s: option requires an argument -- '%c'\n" msgstr "%s: l'opzione richiede un argomento -- \"%c\"\n" -#: lib/obstack.c:338 lib/obstack.c:340 lib/xalloc-die.c:34 src/pcresearch.c:291 +#: lib/obstack.c:338 lib/obstack.c:340 lib/xalloc-die.c:34 src/pcresearch.c:313 msgid "memory exhausted" msgstr "memoria esaurita" @@ -133,6 +141,7 @@ #, c-format msgid "failed to set file descriptor text/binary mode" msgstr "" +"impostazione del descrittore file in modalità testo/binario non riuscita" #. TRANSLATORS: #. Get translations for open and closing quotation marks. @@ -153,7 +162,7 @@ #. for your locale. #. #. If you don't know what to put here, please see -#. +#. #. and use glyphs suitable for your language. #: lib/quotearg.c:362 msgid "`" @@ -232,16 +241,16 @@ msgid "Unmatched ) or \\)" msgstr ") o \\) senza corrispondenza" -#: lib/regcomp.c:687 +#: lib/regcomp.c:688 msgid "No previous regular expression" msgstr "Nessuna espressione regolare precedente" -#: lib/version-etc.c:74 +#: lib/version-etc.c:73 #, c-format msgid "Packaged by %s (%s)\n" msgstr "Pacchetto creato da %s (%s)\n" -#: lib/version-etc.c:77 +#: lib/version-etc.c:76 #, c-format msgid "Packaged by %s\n" msgstr "Pacchetto creato da %s\n" @@ -249,22 +258,22 @@ #. TRANSLATORS: Translate "(C)" to the copyright symbol #. (C-in-a-circle), if this symbol is available in the user's #. locale. Otherwise, do not translate "(C)"; leave it as-is. -#: lib/version-etc.c:84 +#: lib/version-etc.c:83 msgid "(C)" msgstr "©" -#: lib/version-etc.c:86 +#: lib/version-etc.c:85 msgid "" "\n" -"License GPLv3+: GNU GPL version 3 or later .\n" "This is free software: you are free to change and redistribute it.\n" "There is NO WARRANTY, to the extent permitted by law.\n" "\n" msgstr "" "\n" -"Licenza GPLv3+: GNU GPL versione 3 o successiva .\n" +"Licenza GPLv3+: GNU GPL versione 3 o successiva .\n" "Questo programma è software libero: siete liberi di modificarlo e " "ridistribuirlo.\n" "Non c'è ALCUNA GARANZIA, per quanto consentito dalle vigenti normative.\n" @@ -403,13 +412,13 @@ #: lib/version-etc.c:253 #, c-format -msgid "%s home page: \n" -msgstr "Sito web di %s: \n" +msgid "%s home page: \n" +msgstr "Sito web di %s: \n" #: lib/version-etc.c:256 -msgid "General help using GNU software: \n" +msgid "General help using GNU software: \n" msgstr "" -"Pagina di aiuto per l'utilizzo di software GNU: \n" #: lib/xstrtol-error.c:63 @@ -427,105 +436,93 @@ msgid "%s%s argument '%s' too large" msgstr "l'argomento \"%3$s\" di %1$s%2$s è troppo grande" -#. This is a proper name. See the gettext manual, section Names. -#: src/grep.c:59 -msgid "Mike Haertel" -msgstr "Mike Haertel" - -#: src/grep.c:60 -msgid "others, see " -msgstr "altri, consultare " - -#: src/grep.c:585 +#: src/grep.c:582 msgid "(standard input)" msgstr "(standard input)" -#: src/grep.c:765 +#: src/grep.c:762 msgid "invalid context length argument" msgstr "argomento della lunghezza del contesto non valido" -#: src/grep.c:828 +#: src/grep.c:827 msgid "input is too large to count" msgstr "l'input è troppo grande per essere contato" -#: src/grep.c:1579 +#: src/grep.c:1578 #, c-format msgid "Binary file %s matches\n" msgstr "Il file binario %s corrisponde\n" -#: src/grep.c:1627 +#: src/grep.c:1626 #, c-format msgid "warning: %s: %s" msgstr "attenzione: %s: %s" -#: src/grep.c:1628 +#: src/grep.c:1627 msgid "recursive directory loop" msgstr "ciclo ricorsivo di directory" -#: src/grep.c:1844 +#: src/grep.c:1843 #, c-format msgid "input file %s is also the output" msgstr "il file di input %s è anche l'output" -#: src/grep.c:1907 src/grep.c:1914 +#: src/grep.c:1906 src/grep.c:1913 #, c-format -msgid "Usage: %s [OPTION]... PATTERN [FILE]...\n" -msgstr "Uso: %s [OPZIONE]... MODELLO [FILE]...\n" +msgid "Usage: %s [OPTION]... PATTERNS [FILE]...\n" +msgstr "Uso: %s [OPZIONE]... MODELLI [FILE]...\n" -#: src/grep.c:1909 +#: src/grep.c:1908 #, c-format msgid "Try '%s --help' for more information.\n" msgstr "Usare \"%s --help\" per ulteriori informazioni.\n" -#: src/grep.c:1915 -#, fuzzy, c-format -msgid "Search for PATTERN in each FILE.\n" -msgstr "Cerca il MODELLO in ogni FILE o nello standard input.\n" +#: src/grep.c:1914 +#, c-format +msgid "Search for PATTERNS in each FILE.\n" +msgstr "Cerca MODELLI in ogni FILE\n" -#: src/grep.c:1916 -#, fuzzy, c-format +#: src/grep.c:1915 +#, c-format msgid "" "Example: %s -i 'hello world' menu.h main.c\n" +"PATTERNS can contain multiple patterns separated by newlines.\n" "\n" "Pattern selection and interpretation:\n" msgstr "" "Esempio: %s -i \"ciao mondo\" menu.h main.c\n" +"MODELLI può contenere diversi modelli separati da newline.\n" "\n" -"Selezione e interpretazione delle regexp:\n" +"Selezione e interpretazione del modello:\n" #: src/grep.c:1920 -#, fuzzy, c-format +#, c-format msgid "" -" -E, --extended-regexp PATTERN is an extended regular expression\n" -" -F, --fixed-strings PATTERN is a set of newline-separated strings\n" -" -G, --basic-regexp PATTERN is a basic regular expression (default)\n" -" -P, --perl-regexp PATTERN is a Perl regular expression\n" -msgstr "" -" -E, --extended-regexp MODELLO è un'espressione regolare estesa (ERE)\n" -" -F, --fixed-strings MODELLO è un insieme di stringhe letterali " -"separate\n" -" da newline\n" -" -G, --basic-regexp MODELLO è un'espressione regolare semplice " -"(BRE)\n" -" -P, --perl-regexp MODELLO è un'espressione regolare Perl\n" +" -E, --extended-regexp PATTERNS are extended regular expressions\n" +" -F, --fixed-strings PATTERNS are strings\n" +" -G, --basic-regexp PATTERNS are basic regular expressions\n" +" -P, --perl-regexp PATTERNS are Perl regular expressions\n" +msgstr "" +" -E, --extended-regexp MODELLI sono espressioni regolari estese\n" +" -F, --fixed-strings MODELLI sono stringhe\n" +" -G, --basic-regexp MODELLI sono espressioni regolari semplici\n" +" -P, --perl-regexp MODELLI sono espressioni regolari Perl\n" #: src/grep.c:1926 #, c-format msgid "" -" -e, --regexp=PATTERN use PATTERN for matching\n" -" -f, --file=FILE obtain PATTERN from FILE\n" +" -e, --regexp=PATTERNS use PATTERNS for matching\n" +" -f, --file=FILE take PATTERNS from FILE\n" " -i, --ignore-case ignore case distinctions\n" -" -w, --word-regexp force PATTERN to match only whole words\n" -" -x, --line-regexp force PATTERN to match only whole lines\n" +" -w, --word-regexp match only whole words\n" +" -x, --line-regexp match only whole lines\n" " -z, --null-data a data line ends in 0 byte, not newline\n" msgstr "" -" -e, --regexp=MODELLO Usa MODELLO per la corrispondenza\n" -" -f, --file=FILE Ottiene il MODELLO dal FILE\n" +" -e, --regexp=MODELLI Usa MODELLI per la corrispondenza\n" +" -f, --file=FILE Ottiene i MODELLI dal FILE\n" " -i, --ignore-case Ignora la distinzione tra maiuscole e minuscole\n" -" -w, --word-regexp Forza MODELLO a corrispondere solo a parole " -"intere\n" -" -x, --line-regexp Forza MODELLO a corrispondere solo a righe " -"intere\n" +" -w, --word-regexp Corrispondere solo a parole intere\n" +" -x, --line-regexp Corrispondere solo a righe intere\n" " -z, --null-data Una riga di dati termina con il byte 0 invece " "che\n" " newline\n" @@ -548,7 +545,7 @@ " --help Visualizza questo aiuto ed esce\n" #: src/grep.c:1940 -#, fuzzy, c-format +#, c-format msgid "" "\n" "Output control:\n" @@ -563,12 +560,12 @@ msgstr "" "\n" "Controllo dell'output:\n" -" -m, --max-count=NUM Si ferma dopo NUM corrispondenze\n" +" -m, --max-count=NUM Si ferma dopo NUM righe selezionate\n" " -b, --byte-offset Stampa l'offset del byte con le righe di output\n" " -n, --line-number Stampa il numero della riga con le righe di " "output\n" -" --line-buffered Fa il flush dell'output con ogni riga\n" -" -H, --with-filename Stampa il nome del file per ogni corrispondenza\n" +" --line-buffered Esegue il flush dell'output con ogni riga\n" +" -H, --with-filename Stampa il nome del file con le righe di output\n" " -h, --no-filename Elimina il nome del file dall'output\n" " --label=ETICH Usa ETICH come nome del file per lo standard " "input\n" @@ -576,19 +573,17 @@ #: src/grep.c:1951 #, c-format msgid "" -" -o, --only-matching show only the part of a line matching PATTERN\n" +" -o, --only-matching show only nonempty parts of lines that match\n" " -q, --quiet, --silent suppress all normal output\n" " --binary-files=TYPE assume that binary files are TYPE;\n" " TYPE is 'binary', 'text', or 'without-match'\n" " -a, --text equivalent to --binary-files=text\n" msgstr "" -" -o, --only-matching Mostra solo la parte della riga corrispondente " -"al\n" -" MODELLO\n" +" -o, --only-matching Mostra solo la parte della riga che corrisponde\n" " -q, --quiet, --silent Elimina tutto l'output normale\n" -" --binary-files=TIPO Suppone che i file binari siano del TIPO \\" -"\"binary\\\",\n" -" \\\"text\\\" oppure \\\"without-match\\\"\n" +" --binary-files=TIPO Suppone che i file binari siano del TIPO \"binary" +"\",\n" +" \"text\" oppure \"without-match\"\n" " -a, --text Equivale a --binary-files=text\n" #: src/grep.c:1958 @@ -615,20 +610,20 @@ #: src/grep.c:1967 #, c-format msgid "" -" --include=FILE_PATTERN search only files that match FILE_PATTERN\n" -" --exclude=FILE_PATTERN skip files and directories matching " -"FILE_PATTERN\n" +" --include=GLOB search only files that match GLOB (a file " +"pattern)\n" +" --exclude=GLOB skip files and directories matching GLOB\n" " --exclude-from=FILE skip files matching any file pattern from FILE\n" -" --exclude-dir=PATTERN directories that match PATTERN will be " -"skipped.\n" +" --exclude-dir=GLOB skip directories that match GLOB\n" msgstr "" -" --include=MODELLO Esamina i file corrispondenti al MODELLO\n" -" --exclude=MODELLO Salta i file corrispondenti al MODELLO\n" +" --include=GLOB Esamina i file corrispondenti a GLOB (modello di " +"file)\n" +" --exclude=GLOB Salta file e directory corrispondenti a GLOB\n" " --exclude-from=FILE Salta i file corrispondenti ai modelli nel FILE\n" -" --exclude-dir=MODELLO Salta le directory corrispondenti al MODELLO\n" +" --exclude-dir=GLOB Salta le directory corrispondenti a GLOB\n" #: src/grep.c:1974 -#, fuzzy, c-format +#, c-format msgid "" " -L, --files-without-match print only names of FILEs with no selected " "lines\n" @@ -637,13 +632,13 @@ " -T, --initial-tab make tabs line up (if needed)\n" " -Z, --null print 0 byte after FILE name\n" msgstr "" -" -L, --files-without-match Stampa solo i nomi dei FILE senza " -"corrispondenze\n" -" -l, --files-with-matches Stampa solo i nomi dei FILE contenenti " -"corrispondenze\n" -" -c, --count Stampa solo il conteggio delle righe occorrenti " -"in ogni\n" -" FILE\n" +" -L, --files-without-match Stampa solo i nomi dei FILE senza righe " +"selezionate\n" +" -l, --files-with-matches Stampa solo i nomi dei FILE con righe " +"selezionate\n" +" -c, --count Stampa solo il conteggio delle righe selezionate " +"in\n" +" ogni FILE\n" " -T, --initial-tab Allinea le tabulazioni (se necessario)\n" " -Z, --null Stampa il byte 0 dopo ogni nome di FILE\n" @@ -663,7 +658,7 @@ " -C, --context=NUM Stampa NUM righe di contesto dell'output\n" #: src/grep.c:1987 -#, fuzzy, c-format +#, c-format msgid "" " -NUM same as --context=NUM\n" " --color[=WHEN],\n" @@ -681,26 +676,24 @@ " o \"auto\"\n" " -U, --binary Non rimuove i caratteri CR all'EOL (MSDOS/" "Windows)\n" -" -u, --unix-byte-offsets Segnala gli offset come se non ci fossero CR\n" -" (MSDOS/Windows)\n" "\n" #: src/grep.c:1994 -#, fuzzy, c-format +#, c-format msgid "" "When FILE is '-', read standard input. With no FILE, read '.' if\n" "recursive, '-' otherwise. With fewer than two FILEs, assume -h.\n" -"Exit status is 0 if any line is selected, 1 otherwise;\n" +"Exit status is 0 if any line (or file if -L) is selected, 1 otherwise;\n" "if any error occurs and -q is not given, the exit status is 2.\n" msgstr "" -"Se FILE è -, legge lo standard input, se non c'è alcun FILE legge . se è " -"stata\n" -"passata l'opzione -r altrimenti -. Se sono stati specificati meno di due " +"Se FILE è \"-\", legge lo standard input; se non c'è alcun FILE, legge \".\" " +"se in\n" +"modalità ricorsiva, altrimenti \"-\". Se sono stati specificati meno di due " "FILE\n" -"presume -h. Esce con lo stato 0 se è stata selezionata almeno una riga, 1 \n" -"altrimenti. Se si verifica un errore e l'opzione -q non è stata usata, lo " -"stato\n" -"è 2.\n" +"presume -h. Esce con lo stato 0 se è stata selezionata almeno una riga\n" +"(o file con -L), 1 altrimenti. Se si verifica un errore e l'opzione -q non " +"è\n" +"stata usata, lo stato di uscita è 2.\n" #: src/grep.c:2034 msgid "conflicting matchers specified" @@ -711,28 +704,35 @@ msgid "invalid matcher %s" msgstr "corrispondenza %s non valida" -#: src/grep.c:2458 +#: src/grep.c:2459 #, c-format msgid "warning: GREP_OPTIONS is deprecated; please use an alias or script" msgstr "attenzione: GREP_OPTIONS è deprecata, utilizzare un alias o uno script" -#: src/grep.c:2485 +#: src/grep.c:2486 msgid "unknown devices method" msgstr "metodo per i device sconosciuto" -#: src/grep.c:2629 +#: src/grep.c:2630 msgid "invalid max count" msgstr "numero massimo non valido" -#: src/grep.c:2687 +#: src/grep.c:2688 msgid "unknown binary-files type" msgstr "tipo di file binario sconosciuto" -#: src/pcresearch.c:80 +#: src/grep.c:2770 +#, fuzzy +msgid "" +"Written by Mike Haertel and others; see\n" +"." +msgstr "altri, consultare " + +#: src/pcresearch.c:86 msgid "failed to allocate memory for the PCRE JIT stack" msgstr "impossibile allocare memoria per lo stack PCRE JIT" -#: src/pcresearch.c:97 +#: src/pcresearch.c:118 msgid "" "support for the -P option is not compiled into this --disable-perl-regexp " "binary" @@ -740,67 +740,38 @@ "il supporto all'opzione -P non è compilato in questo binario --disable-perl-" "regexp" -#: src/pcresearch.c:119 +#: src/pcresearch.c:140 msgid "-P supports only unibyte and UTF-8 locales" msgstr "-P supporta solamente lingue unibyte e UTF-8" -#: src/pcresearch.c:125 +#: src/pcresearch.c:146 msgid "the -P option only supports a single pattern" msgstr "l'opzione -P supporta un solo modello" -#: src/pcresearch.c:167 +#: src/pcresearch.c:189 msgid "internal error (should never happen)" msgstr "errore interno (non si dovrebbe mai verificare)" -#: src/pcresearch.c:192 +#: src/pcresearch.c:214 msgid "internal error" msgstr "errore interno" -#: src/pcresearch.c:215 +#: src/pcresearch.c:237 msgid "exceeded PCRE's line length limit" msgstr "limite di lunghezza riga PCRE raggiunto" -#: src/pcresearch.c:295 +#: src/pcresearch.c:317 msgid "exhausted PCRE JIT stack" msgstr "stack JIT PCRE esaurito" -#: src/pcresearch.c:299 +#: src/pcresearch.c:321 msgid "exceeded PCRE's backtracking limit" msgstr "limite di backtrack PCRE raggiunto" -#: src/pcresearch.c:306 +#: src/pcresearch.c:328 #, c-format msgid "internal PCRE error: %d" msgstr "errore interno PCRE: %d" -#~ msgid "%s: option '--%s' doesn't allow an argument\n" -#~ msgstr "%s: l'opzione \"--%s\" non accetta argomenti\n" - -#~ msgid "%s: unrecognized option '--%s'\n" -#~ msgstr "%s: opzione \"--%s\" non riconosciuta\n" - -#~ msgid "%s: option '-W %s' is ambiguous\n" -#~ msgstr "%s: l'opzione \"-W %s\" è ambigua\n" - -#~ msgid "%s: option '-W %s' doesn't allow an argument\n" -#~ msgstr "%s: l'opzione \"-W %s\" non accetta un argomento\n" - -#~ msgid "%s: option '-W %s' requires an argument\n" -#~ msgstr "%s: l'opzione \"-W %s\" richiede un argomento\n" - -#~ msgid "PATTERN is, by default, a basic regular expression (BRE).\n" -#~ msgstr "" -#~ "MODELLO è, in modo predefinito, un'espressione regolare di base (BRE).\n" - -#~ msgid "" -#~ "'egrep' means 'grep -E'. 'fgrep' means 'grep -F'.\n" -#~ "Direct invocation as either 'egrep' or 'fgrep' is deprecated.\n" -#~ msgstr "" -#~ "\"egrep\" significa \"grep -E\", \"fgrep\" significa \"grep -F\".\n" -#~ "L'invocazione diretta come \"egrep\" o \"fgrep\" è deprecata.\n" - -#~ msgid "lseek failed" -#~ msgstr "lseek non riuscita" - -#~ msgid "unescaped ^ or $ not supported with -Pz" -#~ msgstr "^ o $ senza escape non supportato con -Pz" +#~ msgid "Mike Haertel" +#~ msgstr "Mike Haertel" Binary files /tmp/tmppJ6Y2n/6jFha9hbxv/grep-3.1/po/ja.gmo and /tmp/tmppJ6Y2n/tYMwNxGD36/grep-3.3/po/ja.gmo differ diff -Nru grep-3.1/po/ja.po grep-3.3/po/ja.po --- grep-3.1/po/ja.po 2017-07-02 20:21:16.000000000 +0000 +++ grep-3.3/po/ja.po 2018-12-21 04:39:02.000000000 +0000 @@ -16,7 +16,7 @@ msgstr "" "Project-Id-Version: GNU grep 3.0.23-b00\n" "Report-Msgid-Bugs-To: bug-grep@gnu.org\n" -"POT-Creation-Date: 2017-07-02 13:21-0700\n" +"POT-Creation-Date: 2018-12-20 20:39-0800\n" "PO-Revision-Date: 2017-06-25 20:16+0900\n" "Last-Translator: Yasuaki Taniguchi \n" "Language-Team: Japanese \n" @@ -42,43 +42,51 @@ msgid "Valid arguments are:" msgstr "有効な引数:" -#: lib/closeout.c:122 src/grep.c:1274 +#: lib/c-stack.c:208 lib/c-stack.c:301 +msgid "program error" +msgstr "プログラムエラー" + +#: lib/c-stack.c:209 lib/c-stack.c:302 +msgid "stack overflow" +msgstr "スタックオーバーフロー" + +#: lib/closeout.c:122 src/grep.c:1273 msgid "write error" msgstr "書き込みエラー" -#: lib/dfa.c:958 +#: lib/dfa.c:970 msgid "unbalanced [" msgstr "対応がとれていない [ です" -#: lib/dfa.c:1079 +#: lib/dfa.c:1091 msgid "invalid character class" msgstr "無効な文字クラス名です" -#: lib/dfa.c:1205 +#: lib/dfa.c:1217 msgid "character class syntax is [[:space:]], not [:space:]" msgstr "文字クラスの構文は [[:space:]] です。 [:space:] ではありません" -#: lib/dfa.c:1272 +#: lib/dfa.c:1284 msgid "unfinished \\ escape" msgstr "\\ エスケープが終了していません" -#: lib/dfa.c:1433 +#: lib/dfa.c:1445 msgid "invalid content of \\{\\}" msgstr "\\{\\} の中身が無効です" -#: lib/dfa.c:1436 +#: lib/dfa.c:1448 msgid "regular expression too big" msgstr "正規表現が大きすぎます" -#: lib/dfa.c:1850 +#: lib/dfa.c:1863 msgid "unbalanced (" msgstr "対応がとれていない ( です" -#: lib/dfa.c:1968 +#: lib/dfa.c:1981 msgid "no syntax specified" msgstr "構文が指定されていません" -#: lib/dfa.c:1976 +#: lib/dfa.c:1992 msgid "unbalanced )" msgstr "対応がとれていない ) です" @@ -121,7 +129,7 @@ msgid "%s: option requires an argument -- '%c'\n" msgstr "%s: オプションには引数が必要です -- '%c'\n" -#: lib/obstack.c:338 lib/obstack.c:340 lib/xalloc-die.c:34 src/pcresearch.c:291 +#: lib/obstack.c:338 lib/obstack.c:340 lib/xalloc-die.c:34 src/pcresearch.c:313 msgid "memory exhausted" msgstr "メモリを使い果たしました" @@ -159,7 +167,7 @@ #. for your locale. #. #. If you don't know what to put here, please see -#. +#. #. and use glyphs suitable for your language. #: lib/quotearg.c:362 msgid "`" @@ -237,16 +245,16 @@ msgid "Unmatched ) or \\)" msgstr ") または \\) が不一致です" -#: lib/regcomp.c:687 +#: lib/regcomp.c:688 msgid "No previous regular expression" msgstr "以前に正規表現がありません" -#: lib/version-etc.c:74 +#: lib/version-etc.c:73 #, c-format msgid "Packaged by %s (%s)\n" msgstr "パッケージ作成者: %s (%s)\n" -#: lib/version-etc.c:77 +#: lib/version-etc.c:76 #, c-format msgid "Packaged by %s\n" msgstr "パッケージ作成者: %s\n" @@ -254,14 +262,15 @@ #. TRANSLATORS: Translate "(C)" to the copyright symbol #. (C-in-a-circle), if this symbol is available in the user's #. locale. Otherwise, do not translate "(C)"; leave it as-is. -#: lib/version-etc.c:84 +#: lib/version-etc.c:83 msgid "(C)" msgstr "(C)" -#: lib/version-etc.c:86 +#: lib/version-etc.c:85 +#, fuzzy msgid "" "\n" -"License GPLv3+: GNU GPL version 3 or later .\n" "This is free software: you are free to change and redistribute it.\n" "There is NO WARRANTY, to the extent permitted by law.\n" @@ -411,12 +420,13 @@ msgstr "%s のホームページ: <%s>\n" #: lib/version-etc.c:253 -#, c-format -msgid "%s home page: \n" +#, fuzzy, c-format +msgid "%s home page: \n" msgstr "%s のホームページ: \n" #: lib/version-etc.c:256 -msgid "General help using GNU software: \n" +#, fuzzy +msgid "General help using GNU software: \n" msgstr "" "GNU ソフトウェアを使用する際の一般的なヘルプ: \n" @@ -435,67 +445,57 @@ msgid "%s%s argument '%s' too large" msgstr "引数 '%3$s' に対する %1$s%2$s が大きすぎます" -#. This is a proper name. See the gettext manual, section Names. -#: src/grep.c:59 -msgid "Mike Haertel" -msgstr "Mike Haertel" - -#: src/grep.c:60 -msgid "others, see " -msgstr "" -"その他の方々は を参照して" -"ください" - -#: src/grep.c:585 +#: src/grep.c:582 msgid "(standard input)" msgstr "(標準入力)" -#: src/grep.c:765 +#: src/grep.c:762 msgid "invalid context length argument" msgstr "一致した前後の行の表示に関する引数が無効です" -#: src/grep.c:828 +#: src/grep.c:827 msgid "input is too large to count" msgstr "入力が大きすぎて数えられません" -#: src/grep.c:1579 +#: src/grep.c:1578 #, c-format msgid "Binary file %s matches\n" msgstr "バイナリファイル %s に一致しました\n" -#: src/grep.c:1627 +#: src/grep.c:1626 #, c-format msgid "warning: %s: %s" msgstr "警告: %s: %s" -#: src/grep.c:1628 +#: src/grep.c:1627 msgid "recursive directory loop" msgstr "ディレクトリーが再帰的ループをしています" -#: src/grep.c:1844 +#: src/grep.c:1843 #, c-format msgid "input file %s is also the output" msgstr "入力ファイル %s が出力にもなっています" -#: src/grep.c:1907 src/grep.c:1914 -#, c-format -msgid "Usage: %s [OPTION]... PATTERN [FILE]...\n" +#: src/grep.c:1906 src/grep.c:1913 +#, fuzzy, c-format +msgid "Usage: %s [OPTION]... PATTERNS [FILE]...\n" msgstr "使用法: %s [OPTION]... PATTERN [FILE]...\n" -#: src/grep.c:1909 +#: src/grep.c:1908 #, c-format msgid "Try '%s --help' for more information.\n" msgstr "詳しくは'%s --help'を実行してください。\n" -#: src/grep.c:1915 -#, c-format -msgid "Search for PATTERN in each FILE.\n" +#: src/grep.c:1914 +#, fuzzy, c-format +msgid "Search for PATTERNS in each FILE.\n" msgstr "各 FILE 内で PATTERN を検索します。\n" -#: src/grep.c:1916 -#, c-format +#: src/grep.c:1915 +#, fuzzy, c-format msgid "" "Example: %s -i 'hello world' menu.h main.c\n" +"PATTERNS can contain multiple patterns separated by newlines.\n" "\n" "Pattern selection and interpretation:\n" msgstr "" @@ -504,12 +504,12 @@ "パターンの選択および解釈:\n" #: src/grep.c:1920 -#, c-format +#, fuzzy, c-format msgid "" -" -E, --extended-regexp PATTERN is an extended regular expression\n" -" -F, --fixed-strings PATTERN is a set of newline-separated strings\n" -" -G, --basic-regexp PATTERN is a basic regular expression (default)\n" -" -P, --perl-regexp PATTERN is a Perl regular expression\n" +" -E, --extended-regexp PATTERNS are extended regular expressions\n" +" -F, --fixed-strings PATTERNS are strings\n" +" -G, --basic-regexp PATTERNS are basic regular expressions\n" +" -P, --perl-regexp PATTERNS are Perl regular expressions\n" msgstr "" " -E, --extended-regexp PATTERN を拡張正規表現とする\n" " -F, --fixed-strings PATTERN を改行で区切られた文字列の組とする\n" @@ -517,13 +517,13 @@ " -P, --perl-regexp PATTERN を Perl 正規表現とする\n" #: src/grep.c:1926 -#, c-format +#, fuzzy, c-format msgid "" -" -e, --regexp=PATTERN use PATTERN for matching\n" -" -f, --file=FILE obtain PATTERN from FILE\n" +" -e, --regexp=PATTERNS use PATTERNS for matching\n" +" -f, --file=FILE take PATTERNS from FILE\n" " -i, --ignore-case ignore case distinctions\n" -" -w, --word-regexp force PATTERN to match only whole words\n" -" -x, --line-regexp force PATTERN to match only whole lines\n" +" -w, --word-regexp match only whole words\n" +" -x, --line-regexp match only whole lines\n" " -z, --null-data a data line ends in 0 byte, not newline\n" msgstr "" " -e, --regexp=PATTERN 一致処理に PATTERN を使用する\n" @@ -576,9 +576,9 @@ "る\n" #: src/grep.c:1951 -#, c-format +#, fuzzy, c-format msgid "" -" -o, --only-matching show only the part of a line matching PATTERN\n" +" -o, --only-matching show only nonempty parts of lines that match\n" " -q, --quiet, --silent suppress all normal output\n" " --binary-files=TYPE assume that binary files are TYPE;\n" " TYPE is 'binary', 'text', or 'without-match'\n" @@ -610,14 +610,13 @@ " -R, --dereference-recursive 上と同様だがシンボリックリンクを辿る\n" #: src/grep.c:1967 -#, c-format +#, fuzzy, c-format msgid "" -" --include=FILE_PATTERN search only files that match FILE_PATTERN\n" -" --exclude=FILE_PATTERN skip files and directories matching " -"FILE_PATTERN\n" +" --include=GLOB search only files that match GLOB (a file " +"pattern)\n" +" --exclude=GLOB skip files and directories matching GLOB\n" " --exclude-from=FILE skip files matching any file pattern from FILE\n" -" --exclude-dir=PATTERN directories that match PATTERN will be " -"skipped.\n" +" --exclude-dir=GLOB skip directories that match GLOB\n" msgstr "" " --include=FILE_PATTERN FILE_PATTERN に一致したファイルのみ検索する\n" " --exclude=FILE_PATTERN FILE_PATTERN 一致したファイル・ディレクトリーを" @@ -678,11 +677,11 @@ "\n" #: src/grep.c:1994 -#, c-format +#, fuzzy, c-format msgid "" "When FILE is '-', read standard input. With no FILE, read '.' if\n" "recursive, '-' otherwise. With fewer than two FILEs, assume -h.\n" -"Exit status is 0 if any line is selected, 1 otherwise;\n" +"Exit status is 0 if any line (or file if -L) is selected, 1 otherwise;\n" "if any error occurs and -q is not given, the exit status is 2.\n" msgstr "" "FILE が '-' の場合、標準入力から読み込みます。FILE を指定しない場合、ディレク" @@ -702,29 +701,38 @@ msgid "invalid matcher %s" msgstr "%s は無効な一致処理系です" -#: src/grep.c:2458 +#: src/grep.c:2459 #, c-format msgid "warning: GREP_OPTIONS is deprecated; please use an alias or script" msgstr "" "警告: GREP_OPTIONS は廃止されました。alias またはスクリプトを使用してください" -#: src/grep.c:2485 +#: src/grep.c:2486 msgid "unknown devices method" msgstr "デバイスに対する不明な操作です" -#: src/grep.c:2629 +#: src/grep.c:2630 msgid "invalid max count" msgstr "無効な一致回数です" -#: src/grep.c:2687 +#: src/grep.c:2688 msgid "unknown binary-files type" msgstr "不明なバイナリファイルの形式です" -#: src/pcresearch.c:80 +#: src/grep.c:2770 +#, fuzzy +msgid "" +"Written by Mike Haertel and others; see\n" +"." +msgstr "" +"その他の方々は を参照して" +"ください" + +#: src/pcresearch.c:86 msgid "failed to allocate memory for the PCRE JIT stack" msgstr "PCRE JIT スタックへのメモリ割り当てに失敗しました" -#: src/pcresearch.c:97 +#: src/pcresearch.c:118 msgid "" "support for the -P option is not compiled into this --disable-perl-regexp " "binary" @@ -732,39 +740,42 @@ "このバイナリは --disable-perl-regexp 付きでコンパイルされているため -P オプ" "ションはサポートしません" -#: src/pcresearch.c:119 +#: src/pcresearch.c:140 msgid "-P supports only unibyte and UTF-8 locales" msgstr "-P は1バイトの UTF-8 ロケールのみサポートします" -#: src/pcresearch.c:125 +#: src/pcresearch.c:146 msgid "the -P option only supports a single pattern" msgstr "-P オプションは単一のパターンしかサポートしません" -#: src/pcresearch.c:167 +#: src/pcresearch.c:189 msgid "internal error (should never happen)" msgstr "内部エラー (決して発生しないはず)" -#: src/pcresearch.c:192 +#: src/pcresearch.c:214 msgid "internal error" msgstr "内部エラー" -#: src/pcresearch.c:215 +#: src/pcresearch.c:237 msgid "exceeded PCRE's line length limit" msgstr "PCRE の行長制限を超過しました" -#: src/pcresearch.c:295 +#: src/pcresearch.c:317 msgid "exhausted PCRE JIT stack" msgstr "PCRE JIT スタックを使い果たしました" -#: src/pcresearch.c:299 +#: src/pcresearch.c:321 msgid "exceeded PCRE's backtracking limit" msgstr "PCRE のバックスラッシュ制限を超過しました" -#: src/pcresearch.c:306 +#: src/pcresearch.c:328 #, c-format msgid "internal PCRE error: %d" msgstr "PCRE 内部エラー: %d" +#~ msgid "Mike Haertel" +#~ msgstr "Mike Haertel" + #~ msgid "%s: option '--%s' doesn't allow an argument\n" #~ msgstr "%s: オプション '--%s' は引数を取ることができません\n" @@ -912,12 +923,6 @@ #~ msgid "(PROGRAM ERROR) Option should have been recognized!?" #~ msgstr "(プログラムエラー) オプションは認識されているべきです!?" -#~ msgid "program error" -#~ msgstr "プログラムエラー" - -#~ msgid "stack overflow" -#~ msgstr "スタックオーバーフロー" - #~ msgid "cannot find a temporary directory, try setting $TMPDIR" #~ msgstr "一時ディレクトリを作成できません。 $TMPDIR を設定してみてください" Binary files /tmp/tmppJ6Y2n/6jFha9hbxv/grep-3.1/po/ko.gmo and /tmp/tmppJ6Y2n/tYMwNxGD36/grep-3.3/po/ko.gmo differ diff -Nru grep-3.1/po/ko.po grep-3.3/po/ko.po --- grep-3.1/po/ko.po 2017-07-02 20:21:16.000000000 +0000 +++ grep-3.3/po/ko.po 2018-12-21 04:39:02.000000000 +0000 @@ -6,7 +6,7 @@ msgstr "" "Project-Id-Version: GNU grep 2.0f\n" "Report-Msgid-Bugs-To: bug-grep@gnu.org\n" -"POT-Creation-Date: 2017-07-02 13:21-0700\n" +"POT-Creation-Date: 2018-12-20 20:39-0800\n" "PO-Revision-Date: 1997-09-03 11:19+0900\n" "Last-Translator: Bang Jun-Young \n" "Language-Team: Korean \n" @@ -30,47 +30,55 @@ msgid "Valid arguments are:" msgstr "" -#: lib/closeout.c:122 src/grep.c:1274 +#: lib/c-stack.c:208 lib/c-stack.c:301 +msgid "program error" +msgstr "" + +#: lib/c-stack.c:209 lib/c-stack.c:302 +msgid "stack overflow" +msgstr "" + +#: lib/closeout.c:122 src/grep.c:1273 msgid "write error" msgstr "" -#: lib/dfa.c:958 +#: lib/dfa.c:970 #, fuzzy msgid "unbalanced [" msgstr "¦ ʴ [" -#: lib/dfa.c:1079 +#: lib/dfa.c:1091 msgid "invalid character class" msgstr "" -#: lib/dfa.c:1205 +#: lib/dfa.c:1217 msgid "character class syntax is [[:space:]], not [:space:]" msgstr "" -#: lib/dfa.c:1272 +#: lib/dfa.c:1284 #, fuzzy msgid "unfinished \\ escape" msgstr "ϰ \\ ̽" -#: lib/dfa.c:1433 +#: lib/dfa.c:1445 msgid "invalid content of \\{\\}" msgstr "" -#: lib/dfa.c:1436 +#: lib/dfa.c:1448 msgid "regular expression too big" msgstr "" -#: lib/dfa.c:1850 +#: lib/dfa.c:1863 #, fuzzy msgid "unbalanced (" msgstr "¦ ʴ (" -#: lib/dfa.c:1968 +#: lib/dfa.c:1981 #, fuzzy msgid "no syntax specified" msgstr " ʾ" -#: lib/dfa.c:1976 +#: lib/dfa.c:1992 #, fuzzy msgid "unbalanced )" msgstr "¦ ʴ )" @@ -114,7 +122,7 @@ msgid "%s: option requires an argument -- '%c'\n" msgstr "%s: ɼ μ ʿմϴ -- %c\n" -#: lib/obstack.c:338 lib/obstack.c:340 lib/xalloc-die.c:34 src/pcresearch.c:291 +#: lib/obstack.c:338 lib/obstack.c:340 lib/xalloc-die.c:34 src/pcresearch.c:313 msgid "memory exhausted" msgstr "޸𸮰 ٴڳ" @@ -152,7 +160,7 @@ #. for your locale. #. #. If you don't know what to put here, please see -#. +#. #. and use glyphs suitable for your language. #: lib/quotearg.c:362 msgid "`" @@ -230,16 +238,16 @@ msgid "Unmatched ) or \\)" msgstr "" -#: lib/regcomp.c:687 +#: lib/regcomp.c:688 msgid "No previous regular expression" msgstr "" -#: lib/version-etc.c:74 +#: lib/version-etc.c:73 #, c-format msgid "Packaged by %s (%s)\n" msgstr "" -#: lib/version-etc.c:77 +#: lib/version-etc.c:76 #, c-format msgid "Packaged by %s\n" msgstr "" @@ -247,14 +255,14 @@ #. TRANSLATORS: Translate "(C)" to the copyright symbol #. (C-in-a-circle), if this symbol is available in the user's #. locale. Otherwise, do not translate "(C)"; leave it as-is. -#: lib/version-etc.c:84 +#: lib/version-etc.c:83 msgid "(C)" msgstr "" -#: lib/version-etc.c:86 +#: lib/version-etc.c:85 msgid "" "\n" -"License GPLv3+: GNU GPL version 3 or later .\n" "This is free software: you are free to change and redistribute it.\n" "There is NO WARRANTY, to the extent permitted by law.\n" @@ -375,11 +383,11 @@ #: lib/version-etc.c:253 #, c-format -msgid "%s home page: \n" +msgid "%s home page: \n" msgstr "" #: lib/version-etc.c:256 -msgid "General help using GNU software: \n" +msgid "General help using GNU software: \n" msgstr "" #: lib/xstrtol-error.c:63 @@ -397,65 +405,57 @@ msgid "%s%s argument '%s' too large" msgstr "" -#. This is a proper name. See the gettext manual, section Names. -#: src/grep.c:59 -msgid "Mike Haertel" -msgstr "" - -#: src/grep.c:60 -msgid "others, see " -msgstr "" - -#: src/grep.c:585 +#: src/grep.c:582 msgid "(standard input)" msgstr "(ǥ Է)" -#: src/grep.c:765 +#: src/grep.c:762 msgid "invalid context length argument" msgstr "" -#: src/grep.c:828 +#: src/grep.c:827 msgid "input is too large to count" msgstr "" -#: src/grep.c:1579 +#: src/grep.c:1578 #, c-format msgid "Binary file %s matches\n" msgstr "" -#: src/grep.c:1627 +#: src/grep.c:1626 #, fuzzy, c-format msgid "warning: %s: %s" msgstr "%s: : %s: %s\n" -#: src/grep.c:1628 +#: src/grep.c:1627 msgid "recursive directory loop" msgstr "" -#: src/grep.c:1844 +#: src/grep.c:1843 #, c-format msgid "input file %s is also the output" msgstr "" -#: src/grep.c:1907 src/grep.c:1914 -#, c-format -msgid "Usage: %s [OPTION]... PATTERN [FILE]...\n" +#: src/grep.c:1906 src/grep.c:1913 +#, fuzzy, c-format +msgid "Usage: %s [OPTION]... PATTERNS [FILE]...\n" msgstr ": %s [ɼ]... []...\n" -#: src/grep.c:1909 +#: src/grep.c:1908 #, fuzzy, c-format msgid "Try '%s --help' for more information.\n" msgstr " `%s --help' Ͻʽÿ.\n" -#: src/grep.c:1915 +#: src/grep.c:1914 #, c-format -msgid "Search for PATTERN in each FILE.\n" +msgid "Search for PATTERNS in each FILE.\n" msgstr "" -#: src/grep.c:1916 +#: src/grep.c:1915 #, fuzzy, c-format msgid "" "Example: %s -i 'hello world' menu.h main.c\n" +"PATTERNS can contain multiple patterns separated by newlines.\n" "\n" "Pattern selection and interpretation:\n" msgstr "Խ ð ؼ:\n" @@ -463,20 +463,20 @@ #: src/grep.c:1920 #, c-format msgid "" -" -E, --extended-regexp PATTERN is an extended regular expression\n" -" -F, --fixed-strings PATTERN is a set of newline-separated strings\n" -" -G, --basic-regexp PATTERN is a basic regular expression (default)\n" -" -P, --perl-regexp PATTERN is a Perl regular expression\n" +" -E, --extended-regexp PATTERNS are extended regular expressions\n" +" -F, --fixed-strings PATTERNS are strings\n" +" -G, --basic-regexp PATTERNS are basic regular expressions\n" +" -P, --perl-regexp PATTERNS are Perl regular expressions\n" msgstr "" #: src/grep.c:1926 #, c-format msgid "" -" -e, --regexp=PATTERN use PATTERN for matching\n" -" -f, --file=FILE obtain PATTERN from FILE\n" +" -e, --regexp=PATTERNS use PATTERNS for matching\n" +" -f, --file=FILE take PATTERNS from FILE\n" " -i, --ignore-case ignore case distinctions\n" -" -w, --word-regexp force PATTERN to match only whole words\n" -" -x, --line-regexp force PATTERN to match only whole lines\n" +" -w, --word-regexp match only whole words\n" +" -x, --line-regexp match only whole lines\n" " -z, --null-data a data line ends in 0 byte, not newline\n" msgstr "" @@ -509,7 +509,7 @@ #: src/grep.c:1951 #, c-format msgid "" -" -o, --only-matching show only the part of a line matching PATTERN\n" +" -o, --only-matching show only nonempty parts of lines that match\n" " -q, --quiet, --silent suppress all normal output\n" " --binary-files=TYPE assume that binary files are TYPE;\n" " TYPE is 'binary', 'text', or 'without-match'\n" @@ -531,12 +531,11 @@ #: src/grep.c:1967 #, c-format msgid "" -" --include=FILE_PATTERN search only files that match FILE_PATTERN\n" -" --exclude=FILE_PATTERN skip files and directories matching " -"FILE_PATTERN\n" +" --include=GLOB search only files that match GLOB (a file " +"pattern)\n" +" --exclude=GLOB skip files and directories matching GLOB\n" " --exclude-from=FILE skip files matching any file pattern from FILE\n" -" --exclude-dir=PATTERN directories that match PATTERN will be " -"skipped.\n" +" --exclude-dir=GLOB skip directories that match GLOB\n" msgstr "" #: src/grep.c:1974 @@ -577,7 +576,7 @@ msgid "" "When FILE is '-', read standard input. With no FILE, read '.' if\n" "recursive, '-' otherwise. With fewer than two FILEs, assume -h.\n" -"Exit status is 0 if any line is selected, 1 otherwise;\n" +"Exit status is 0 if any line (or file if -L) is selected, 1 otherwise;\n" "if any error occurs and -q is not given, the exit status is 2.\n" msgstr "" @@ -591,63 +590,69 @@ msgid "invalid matcher %s" msgstr "" -#: src/grep.c:2458 +#: src/grep.c:2459 #, c-format msgid "warning: GREP_OPTIONS is deprecated; please use an alias or script" msgstr "" -#: src/grep.c:2485 +#: src/grep.c:2486 msgid "unknown devices method" msgstr "" -#: src/grep.c:2629 +#: src/grep.c:2630 #, fuzzy msgid "invalid max count" msgstr "ϰ ݺ ȸ" -#: src/grep.c:2687 +#: src/grep.c:2688 msgid "unknown binary-files type" msgstr "" -#: src/pcresearch.c:80 +#: src/grep.c:2770 +msgid "" +"Written by Mike Haertel and others; see\n" +"." +msgstr "" + +#: src/pcresearch.c:86 msgid "failed to allocate memory for the PCRE JIT stack" msgstr "" -#: src/pcresearch.c:97 +#: src/pcresearch.c:118 msgid "" "support for the -P option is not compiled into this --disable-perl-regexp " "binary" msgstr "" -#: src/pcresearch.c:119 +#: src/pcresearch.c:140 msgid "-P supports only unibyte and UTF-8 locales" msgstr "" -#: src/pcresearch.c:125 +#: src/pcresearch.c:146 msgid "the -P option only supports a single pattern" msgstr "" -#: src/pcresearch.c:167 +#: src/pcresearch.c:189 msgid "internal error (should never happen)" msgstr "" -#: src/pcresearch.c:192 +#: src/pcresearch.c:214 msgid "internal error" msgstr "" -#: src/pcresearch.c:215 +#: src/pcresearch.c:237 msgid "exceeded PCRE's line length limit" msgstr "" -#: src/pcresearch.c:295 +#: src/pcresearch.c:317 msgid "exhausted PCRE JIT stack" msgstr "" -#: src/pcresearch.c:299 +#: src/pcresearch.c:321 msgid "exceeded PCRE's backtracking limit" msgstr "" -#: src/pcresearch.c:306 +#: src/pcresearch.c:328 #, c-format msgid "internal PCRE error: %d" msgstr "" Binary files /tmp/tmppJ6Y2n/6jFha9hbxv/grep-3.1/po/ky.gmo and /tmp/tmppJ6Y2n/tYMwNxGD36/grep-3.3/po/ky.gmo differ diff -Nru grep-3.1/po/ky.po grep-3.3/po/ky.po --- grep-3.1/po/ky.po 2017-07-02 20:21:16.000000000 +0000 +++ grep-3.3/po/ky.po 2018-12-21 04:39:02.000000000 +0000 @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: grep 2.5.3\n" "Report-Msgid-Bugs-To: bug-grep@gnu.org\n" -"POT-Creation-Date: 2017-07-02 13:21-0700\n" +"POT-Creation-Date: 2018-12-20 20:39-0800\n" "PO-Revision-Date: 2007-09-01 17:27+0100\n" "Last-Translator: Azilet Beishenaliev \n" "Language-Team: Kirghiz \n" @@ -34,50 +34,58 @@ msgid "Valid arguments are:" msgstr "" -#: lib/closeout.c:122 src/grep.c:1274 +#: lib/c-stack.c:208 lib/c-stack.c:301 +msgid "program error" +msgstr "" + +#: lib/c-stack.c:209 lib/c-stack.c:302 +msgid "stack overflow" +msgstr "" + +#: lib/closeout.c:122 src/grep.c:1273 msgid "write error" msgstr "" -#: lib/dfa.c:958 +#: lib/dfa.c:970 #, fuzzy msgid "unbalanced [" msgstr "[ - мунун уйкашы жок" -#: lib/dfa.c:1079 +#: lib/dfa.c:1091 msgid "invalid character class" msgstr "" -#: lib/dfa.c:1205 +#: lib/dfa.c:1217 msgid "character class syntax is [[:space:]], not [:space:]" msgstr "" # escape - кыргызча??? -#: lib/dfa.c:1272 +#: lib/dfa.c:1284 #, fuzzy msgid "unfinished \\ escape" msgstr "Бүтпөй калган эскейп \\" -#: lib/dfa.c:1433 +#: lib/dfa.c:1445 #, fuzzy msgid "invalid content of \\{\\}" msgstr "максимум сан жарабайт" -#: lib/dfa.c:1436 +#: lib/dfa.c:1448 msgid "regular expression too big" msgstr "" -#: lib/dfa.c:1850 +#: lib/dfa.c:1863 #, fuzzy msgid "unbalanced (" msgstr "( - мунун уйкашы жок" # кайсы синтаксис? грептин шаблонубу? -#: lib/dfa.c:1968 +#: lib/dfa.c:1981 #, fuzzy msgid "no syntax specified" msgstr "Синтаксис аталган жок" -#: lib/dfa.c:1976 +#: lib/dfa.c:1992 #, fuzzy msgid "unbalanced )" msgstr ") - мунун уйкашы жок" @@ -122,7 +130,7 @@ msgstr "%s: бул опциянын аргументи болуш керек -- %c\n" # Памятты эмне дейбиз яя? ;) -#: lib/obstack.c:338 lib/obstack.c:340 lib/xalloc-die.c:34 src/pcresearch.c:291 +#: lib/obstack.c:338 lib/obstack.c:340 lib/xalloc-die.c:34 src/pcresearch.c:313 msgid "memory exhausted" msgstr "память жетпей калды" @@ -160,7 +168,7 @@ #. for your locale. #. #. If you don't know what to put here, please see -#. +#. #. and use glyphs suitable for your language. #: lib/quotearg.c:362 msgid "`" @@ -239,16 +247,16 @@ msgid "Unmatched ) or \\)" msgstr "" -#: lib/regcomp.c:687 +#: lib/regcomp.c:688 msgid "No previous regular expression" msgstr "" -#: lib/version-etc.c:74 +#: lib/version-etc.c:73 #, c-format msgid "Packaged by %s (%s)\n" msgstr "" -#: lib/version-etc.c:77 +#: lib/version-etc.c:76 #, c-format msgid "Packaged by %s\n" msgstr "" @@ -256,14 +264,14 @@ #. TRANSLATORS: Translate "(C)" to the copyright symbol #. (C-in-a-circle), if this symbol is available in the user's #. locale. Otherwise, do not translate "(C)"; leave it as-is. -#: lib/version-etc.c:84 +#: lib/version-etc.c:83 msgid "(C)" msgstr "" -#: lib/version-etc.c:86 +#: lib/version-etc.c:85 msgid "" "\n" -"License GPLv3+: GNU GPL version 3 or later .\n" "This is free software: you are free to change and redistribute it.\n" "There is NO WARRANTY, to the extent permitted by law.\n" @@ -388,11 +396,11 @@ #: lib/version-etc.c:253 #, c-format -msgid "%s home page: \n" +msgid "%s home page: \n" msgstr "" #: lib/version-etc.c:256 -msgid "General help using GNU software: \n" +msgid "General help using GNU software: \n" msgstr "" #: lib/xstrtol-error.c:63 @@ -410,66 +418,58 @@ msgid "%s%s argument '%s' too large" msgstr "" -#. This is a proper name. See the gettext manual, section Names. -#: src/grep.c:59 -msgid "Mike Haertel" -msgstr "" - -#: src/grep.c:60 -msgid "others, see " -msgstr "" - -#: src/grep.c:585 +#: src/grep.c:582 msgid "(standard input)" msgstr "(стандарт кирүү)" -#: src/grep.c:765 +#: src/grep.c:762 msgid "invalid context length argument" msgstr "контекст узундугу жарабайт" -#: src/grep.c:828 +#: src/grep.c:827 msgid "input is too large to count" msgstr "берилген данныйлардын саны саналбай турганча көп" -#: src/grep.c:1579 +#: src/grep.c:1578 #, c-format msgid "Binary file %s matches\n" msgstr "Экилик форматтагы %s файлы уйкашат\n" -#: src/grep.c:1627 +#: src/grep.c:1626 #, fuzzy, c-format msgid "warning: %s: %s" msgstr "эскертүү: %s: %s\n" -#: src/grep.c:1628 +#: src/grep.c:1627 msgid "recursive directory loop" msgstr "бирибирине кирген папка айлампасы бар" -#: src/grep.c:1844 +#: src/grep.c:1843 #, c-format msgid "input file %s is also the output" msgstr "" -#: src/grep.c:1907 src/grep.c:1914 -#, c-format -msgid "Usage: %s [OPTION]... PATTERN [FILE]...\n" +#: src/grep.c:1906 src/grep.c:1913 +#, fuzzy, c-format +msgid "Usage: %s [OPTION]... PATTERNS [FILE]...\n" msgstr "Колдонулушу: %s [ОПЦИЯ]... ШАБЛОН [ФАЙЛ]...\n" -#: src/grep.c:1909 +#: src/grep.c:1908 #, fuzzy, c-format msgid "Try '%s --help' for more information.\n" msgstr "Толук маалымат үчүн `%s --help' деп жазгыла.\n" -#: src/grep.c:1915 +#: src/grep.c:1914 #, fuzzy, c-format -msgid "Search for PATTERN in each FILE.\n" +msgid "Search for PATTERNS in each FILE.\n" msgstr "Ар ФАЙЛда же стандарт кирүүдө ШАБЛОНду изде.\n" # выражение дегендин кыргызчасын жазыш керек -#: src/grep.c:1916 +#: src/grep.c:1915 #, fuzzy, c-format msgid "" "Example: %s -i 'hello world' menu.h main.c\n" +"PATTERNS can contain multiple patterns separated by newlines.\n" "\n" "Pattern selection and interpretation:\n" msgstr "" @@ -481,10 +481,10 @@ #: src/grep.c:1920 #, fuzzy, c-format msgid "" -" -E, --extended-regexp PATTERN is an extended regular expression\n" -" -F, --fixed-strings PATTERN is a set of newline-separated strings\n" -" -G, --basic-regexp PATTERN is a basic regular expression (default)\n" -" -P, --perl-regexp PATTERN is a Perl regular expression\n" +" -E, --extended-regexp PATTERNS are extended regular expressions\n" +" -F, --fixed-strings PATTERNS are strings\n" +" -G, --basic-regexp PATTERNS are basic regular expressions\n" +" -P, --perl-regexp PATTERNS are Perl regular expressions\n" msgstr "" " -E, --extended-regexp ШАБЛОН кеңейтилген түрдөгү регулярдуу выражение\n" " -F, --fixed-strings ШАБЛОН ар сапта бир сөз болгон жыйын\n" @@ -493,13 +493,13 @@ # выражение!!!! #: src/grep.c:1926 -#, c-format +#, fuzzy, c-format msgid "" -" -e, --regexp=PATTERN use PATTERN for matching\n" -" -f, --file=FILE obtain PATTERN from FILE\n" +" -e, --regexp=PATTERNS use PATTERNS for matching\n" +" -f, --file=FILE take PATTERNS from FILE\n" " -i, --ignore-case ignore case distinctions\n" -" -w, --word-regexp force PATTERN to match only whole words\n" -" -x, --line-regexp force PATTERN to match only whole lines\n" +" -w, --word-regexp match only whole words\n" +" -x, --line-regexp match only whole lines\n" " -z, --null-data a data line ends in 0 byte, not newline\n" msgstr "" " -e, --regexp=ШАБЛОН ШАБЛОНду регулярдуу выражение катары колдон\n" @@ -546,7 +546,7 @@ #: src/grep.c:1951 #, c-format msgid "" -" -o, --only-matching show only the part of a line matching PATTERN\n" +" -o, --only-matching show only nonempty parts of lines that match\n" " -q, --quiet, --silent suppress all normal output\n" " --binary-files=TYPE assume that binary files are TYPE;\n" " TYPE is 'binary', 'text', or 'without-match'\n" @@ -568,12 +568,11 @@ #: src/grep.c:1967 #, c-format msgid "" -" --include=FILE_PATTERN search only files that match FILE_PATTERN\n" -" --exclude=FILE_PATTERN skip files and directories matching " -"FILE_PATTERN\n" +" --include=GLOB search only files that match GLOB (a file " +"pattern)\n" +" --exclude=GLOB skip files and directories matching GLOB\n" " --exclude-from=FILE skip files matching any file pattern from FILE\n" -" --exclude-dir=PATTERN directories that match PATTERN will be " -"skipped.\n" +" --exclude-dir=GLOB skip directories that match GLOB\n" msgstr "" #: src/grep.c:1974 @@ -629,7 +628,7 @@ msgid "" "When FILE is '-', read standard input. With no FILE, read '.' if\n" "recursive, '-' otherwise. With fewer than two FILEs, assume -h.\n" -"Exit status is 0 if any line is selected, 1 otherwise;\n" +"Exit status is 0 if any line (or file if -L) is selected, 1 otherwise;\n" "if any error occurs and -q is not given, the exit status is 2.\n" msgstr "" "ФАЙЛ жазылбаса же ФАЙЛ - (тире) болсо, стандарт кирүү колдонулат. Экиден аз " @@ -646,28 +645,34 @@ msgid "invalid matcher %s" msgstr "максимум сан жарабайт" -#: src/grep.c:2458 +#: src/grep.c:2459 #, c-format msgid "warning: GREP_OPTIONS is deprecated; please use an alias or script" msgstr "" -#: src/grep.c:2485 +#: src/grep.c:2486 msgid "unknown devices method" msgstr "аспап методу белгисиз" -#: src/grep.c:2629 +#: src/grep.c:2630 msgid "invalid max count" msgstr "максимум сан жарабайт" -#: src/grep.c:2687 +#: src/grep.c:2688 msgid "unknown binary-files type" msgstr "белгисиз файл түрү" -#: src/pcresearch.c:80 +#: src/grep.c:2770 +msgid "" +"Written by Mike Haertel and others; see\n" +"." +msgstr "" + +#: src/pcresearch.c:86 msgid "failed to allocate memory for the PCRE JIT stack" msgstr "" -#: src/pcresearch.c:97 +#: src/pcresearch.c:118 #, fuzzy msgid "" "support for the -P option is not compiled into this --disable-perl-regexp " @@ -675,36 +680,36 @@ msgstr "" "Бул --disable-perl-regexp опциясы менен жасалган, -P опциясы кошулуу эмес" -#: src/pcresearch.c:119 +#: src/pcresearch.c:140 msgid "-P supports only unibyte and UTF-8 locales" msgstr "" -#: src/pcresearch.c:125 +#: src/pcresearch.c:146 #, fuzzy msgid "the -P option only supports a single pattern" msgstr "-P опциясы бир гана шаблон ала алат" -#: src/pcresearch.c:167 +#: src/pcresearch.c:189 msgid "internal error (should never happen)" msgstr "" -#: src/pcresearch.c:192 +#: src/pcresearch.c:214 msgid "internal error" msgstr "" -#: src/pcresearch.c:215 +#: src/pcresearch.c:237 msgid "exceeded PCRE's line length limit" msgstr "" -#: src/pcresearch.c:295 +#: src/pcresearch.c:317 msgid "exhausted PCRE JIT stack" msgstr "" -#: src/pcresearch.c:299 +#: src/pcresearch.c:321 msgid "exceeded PCRE's backtracking limit" msgstr "" -#: src/pcresearch.c:306 +#: src/pcresearch.c:328 #, c-format msgid "internal PCRE error: %d" msgstr "" Binary files /tmp/tmppJ6Y2n/6jFha9hbxv/grep-3.1/po/lt.gmo and /tmp/tmppJ6Y2n/tYMwNxGD36/grep-3.3/po/lt.gmo differ diff -Nru grep-3.1/po/lt.po grep-3.3/po/lt.po --- grep-3.1/po/lt.po 2017-07-02 20:21:16.000000000 +0000 +++ grep-3.3/po/lt.po 2018-12-21 04:39:02.000000000 +0000 @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: grep-2.5.4-pre3\n" "Report-Msgid-Bugs-To: bug-grep@gnu.org\n" -"POT-Creation-Date: 2017-07-02 13:21-0700\n" +"POT-Creation-Date: 2018-12-20 20:39-0800\n" "PO-Revision-Date: 2008-07-09 13:28+0300\n" "Last-Translator: Gintautas Miliauskas \n" "Language-Team: Lithuanian \n" @@ -34,48 +34,56 @@ msgid "Valid arguments are:" msgstr "" -#: lib/closeout.c:122 src/grep.c:1274 +#: lib/c-stack.c:208 lib/c-stack.c:301 +msgid "program error" +msgstr "" + +#: lib/c-stack.c:209 lib/c-stack.c:302 +msgid "stack overflow" +msgstr "" + +#: lib/closeout.c:122 src/grep.c:1273 msgid "write error" msgstr "" -#: lib/dfa.c:958 +#: lib/dfa.c:970 #, fuzzy msgid "unbalanced [" msgstr "Nesubalansuotas [" -#: lib/dfa.c:1079 +#: lib/dfa.c:1091 msgid "invalid character class" msgstr "" -#: lib/dfa.c:1205 +#: lib/dfa.c:1217 msgid "character class syntax is [[:space:]], not [:space:]" msgstr "" -#: lib/dfa.c:1272 +#: lib/dfa.c:1284 #, fuzzy msgid "unfinished \\ escape" msgstr "Nebaigta \\ kaitos seka" -#: lib/dfa.c:1433 +#: lib/dfa.c:1445 #, fuzzy msgid "invalid content of \\{\\}" msgstr "netaisyklingas maksimalus skaičius" -#: lib/dfa.c:1436 +#: lib/dfa.c:1448 msgid "regular expression too big" msgstr "" -#: lib/dfa.c:1850 +#: lib/dfa.c:1863 #, fuzzy msgid "unbalanced (" msgstr "Nesubalansuotas (" -#: lib/dfa.c:1968 +#: lib/dfa.c:1981 #, fuzzy msgid "no syntax specified" msgstr "Nenurodyta sintaksė" -#: lib/dfa.c:1976 +#: lib/dfa.c:1992 #, fuzzy msgid "unbalanced )" msgstr "Nesubalansuotas )" @@ -119,7 +127,7 @@ msgid "%s: option requires an argument -- '%c'\n" msgstr "%s: parametrui reikia argumento -- %c\n" -#: lib/obstack.c:338 lib/obstack.c:340 lib/xalloc-die.c:34 src/pcresearch.c:291 +#: lib/obstack.c:338 lib/obstack.c:340 lib/xalloc-die.c:34 src/pcresearch.c:313 msgid "memory exhausted" msgstr "baigėsi atmintis" @@ -157,7 +165,7 @@ #. for your locale. #. #. If you don't know what to put here, please see -#. +#. #. and use glyphs suitable for your language. #: lib/quotearg.c:362 msgid "`" @@ -235,16 +243,16 @@ msgid "Unmatched ) or \\)" msgstr "" -#: lib/regcomp.c:687 +#: lib/regcomp.c:688 msgid "No previous regular expression" msgstr "" -#: lib/version-etc.c:74 +#: lib/version-etc.c:73 #, c-format msgid "Packaged by %s (%s)\n" msgstr "" -#: lib/version-etc.c:77 +#: lib/version-etc.c:76 #, c-format msgid "Packaged by %s\n" msgstr "" @@ -252,15 +260,15 @@ #. TRANSLATORS: Translate "(C)" to the copyright symbol #. (C-in-a-circle), if this symbol is available in the user's #. locale. Otherwise, do not translate "(C)"; leave it as-is. -#: lib/version-etc.c:84 +#: lib/version-etc.c:83 msgid "(C)" msgstr "" -#: lib/version-etc.c:86 +#: lib/version-etc.c:85 #, fuzzy msgid "" "\n" -"License GPLv3+: GNU GPL version 3 or later .\n" "This is free software: you are free to change and redistribute it.\n" "There is NO WARRANTY, to the extent permitted by law.\n" @@ -389,11 +397,11 @@ #: lib/version-etc.c:253 #, c-format -msgid "%s home page: \n" +msgid "%s home page: \n" msgstr "" #: lib/version-etc.c:256 -msgid "General help using GNU software: \n" +msgid "General help using GNU software: \n" msgstr "" #: lib/xstrtol-error.c:63 @@ -411,65 +419,57 @@ msgid "%s%s argument '%s' too large" msgstr "" -#. This is a proper name. See the gettext manual, section Names. -#: src/grep.c:59 -msgid "Mike Haertel" -msgstr "" - -#: src/grep.c:60 -msgid "others, see " -msgstr "" - -#: src/grep.c:585 +#: src/grep.c:582 msgid "(standard input)" msgstr "(standartinis įvedimas)" -#: src/grep.c:765 +#: src/grep.c:762 msgid "invalid context length argument" msgstr "netaisyklingas konteksto ilgio argumentas" -#: src/grep.c:828 +#: src/grep.c:827 msgid "input is too large to count" msgstr "įvedimas per didelis skaičiavimui" -#: src/grep.c:1579 +#: src/grep.c:1578 #, c-format msgid "Binary file %s matches\n" msgstr "Dvejetainis failas %s atitinka\n" -#: src/grep.c:1627 +#: src/grep.c:1626 #, fuzzy, c-format msgid "warning: %s: %s" msgstr "įspėjimas: %s: %s\n" -#: src/grep.c:1628 +#: src/grep.c:1627 msgid "recursive directory loop" msgstr "rekursyvus aplankų ciklas" -#: src/grep.c:1844 +#: src/grep.c:1843 #, c-format msgid "input file %s is also the output" msgstr "" -#: src/grep.c:1907 src/grep.c:1914 -#, c-format -msgid "Usage: %s [OPTION]... PATTERN [FILE]...\n" +#: src/grep.c:1906 src/grep.c:1913 +#, fuzzy, c-format +msgid "Usage: %s [OPTION]... PATTERNS [FILE]...\n" msgstr "Naudojimas: %s [ARGUMENTAS]... ŠABLONAS [FAILAS]...\n" -#: src/grep.c:1909 +#: src/grep.c:1908 #, fuzzy, c-format msgid "Try '%s --help' for more information.\n" msgstr "Pabandykite „%s --help“, jei norite gauti daugiau informacijos.\n" -#: src/grep.c:1915 +#: src/grep.c:1914 #, fuzzy, c-format -msgid "Search for PATTERN in each FILE.\n" +msgid "Search for PATTERNS in each FILE.\n" msgstr "Ieškoti ŠABLONO kiekviename faile arba standartiniame įėjime.\n" -#: src/grep.c:1916 +#: src/grep.c:1915 #, fuzzy, c-format msgid "" "Example: %s -i 'hello world' menu.h main.c\n" +"PATTERNS can contain multiple patterns separated by newlines.\n" "\n" "Pattern selection and interpretation:\n" msgstr "" @@ -480,10 +480,10 @@ #: src/grep.c:1920 #, fuzzy, c-format msgid "" -" -E, --extended-regexp PATTERN is an extended regular expression\n" -" -F, --fixed-strings PATTERN is a set of newline-separated strings\n" -" -G, --basic-regexp PATTERN is a basic regular expression (default)\n" -" -P, --perl-regexp PATTERN is a Perl regular expression\n" +" -E, --extended-regexp PATTERNS are extended regular expressions\n" +" -F, --fixed-strings PATTERNS are strings\n" +" -G, --basic-regexp PATTERNS are basic regular expressions\n" +" -P, --perl-regexp PATTERNS are Perl regular expressions\n" msgstr "" " -E, --extended-regexp ŠABLONAS yra išplėstinė reguliarioji išr. (ERE)\n" " -F, --fixed-strings ŠABLONAS yra aibė fiksuotų sekų atskirose " @@ -493,13 +493,13 @@ " -P, --perl-regexp ŠABLONAS yra Perl reguliarioji išraiška\n" #: src/grep.c:1926 -#, c-format +#, fuzzy, c-format msgid "" -" -e, --regexp=PATTERN use PATTERN for matching\n" -" -f, --file=FILE obtain PATTERN from FILE\n" +" -e, --regexp=PATTERNS use PATTERNS for matching\n" +" -f, --file=FILE take PATTERNS from FILE\n" " -i, --ignore-case ignore case distinctions\n" -" -w, --word-regexp force PATTERN to match only whole words\n" -" -x, --line-regexp force PATTERN to match only whole lines\n" +" -w, --word-regexp match only whole words\n" +" -x, --line-regexp match only whole lines\n" " -z, --null-data a data line ends in 0 byte, not newline\n" msgstr "" " -e, --regexp=ŠABLONAS naudoti ŠABLONĄ paieškai\n" @@ -546,7 +546,7 @@ #: src/grep.c:1951 #, c-format msgid "" -" -o, --only-matching show only the part of a line matching PATTERN\n" +" -o, --only-matching show only nonempty parts of lines that match\n" " -q, --quiet, --silent suppress all normal output\n" " --binary-files=TYPE assume that binary files are TYPE;\n" " TYPE is 'binary', 'text', or 'without-match'\n" @@ -568,12 +568,11 @@ #: src/grep.c:1967 #, c-format msgid "" -" --include=FILE_PATTERN search only files that match FILE_PATTERN\n" -" --exclude=FILE_PATTERN skip files and directories matching " -"FILE_PATTERN\n" +" --include=GLOB search only files that match GLOB (a file " +"pattern)\n" +" --exclude=GLOB skip files and directories matching GLOB\n" " --exclude-from=FILE skip files matching any file pattern from FILE\n" -" --exclude-dir=PATTERN directories that match PATTERN will be " -"skipped.\n" +" --exclude-dir=GLOB skip directories that match GLOB\n" msgstr "" #: src/grep.c:1974 @@ -627,7 +626,7 @@ msgid "" "When FILE is '-', read standard input. With no FILE, read '.' if\n" "recursive, '-' otherwise. With fewer than two FILEs, assume -h.\n" -"Exit status is 0 if any line is selected, 1 otherwise;\n" +"Exit status is 0 if any line (or file if -L) is selected, 1 otherwise;\n" "if any error occurs and -q is not given, the exit status is 2.\n" msgstr "" "Jei FAILAS nenurodytas arba yra -, skaityti standartinį įvedimą. Jei\n" @@ -644,28 +643,34 @@ msgid "invalid matcher %s" msgstr "netaisyklingas maksimalus skaičius" -#: src/grep.c:2458 +#: src/grep.c:2459 #, c-format msgid "warning: GREP_OPTIONS is deprecated; please use an alias or script" msgstr "" -#: src/grep.c:2485 +#: src/grep.c:2486 msgid "unknown devices method" msgstr "nežinomas įrenginių metodas" -#: src/grep.c:2629 +#: src/grep.c:2630 msgid "invalid max count" msgstr "netaisyklingas maksimalus skaičius" -#: src/grep.c:2687 +#: src/grep.c:2688 msgid "unknown binary-files type" msgstr "nežinomas dvejetainių failų tipas" -#: src/pcresearch.c:80 +#: src/grep.c:2770 +msgid "" +"Written by Mike Haertel and others; see\n" +"." +msgstr "" + +#: src/pcresearch.c:86 msgid "failed to allocate memory for the PCRE JIT stack" msgstr "" -#: src/pcresearch.c:97 +#: src/pcresearch.c:118 #, fuzzy msgid "" "support for the -P option is not compiled into this --disable-perl-regexp " @@ -673,36 +678,36 @@ msgstr "" "Parametro -P palaikymas neįkompiliuotas į šią --disable-perl-regexp programą" -#: src/pcresearch.c:119 +#: src/pcresearch.c:140 msgid "-P supports only unibyte and UTF-8 locales" msgstr "" -#: src/pcresearch.c:125 +#: src/pcresearch.c:146 #, fuzzy msgid "the -P option only supports a single pattern" msgstr "Parametras -P leidžia tik vieną šabloną" -#: src/pcresearch.c:167 +#: src/pcresearch.c:189 msgid "internal error (should never happen)" msgstr "" -#: src/pcresearch.c:192 +#: src/pcresearch.c:214 msgid "internal error" msgstr "" -#: src/pcresearch.c:215 +#: src/pcresearch.c:237 msgid "exceeded PCRE's line length limit" msgstr "" -#: src/pcresearch.c:295 +#: src/pcresearch.c:317 msgid "exhausted PCRE JIT stack" msgstr "" -#: src/pcresearch.c:299 +#: src/pcresearch.c:321 msgid "exceeded PCRE's backtracking limit" msgstr "" -#: src/pcresearch.c:306 +#: src/pcresearch.c:328 #, c-format msgid "internal PCRE error: %d" msgstr "" Binary files /tmp/tmppJ6Y2n/6jFha9hbxv/grep-3.1/po/nb.gmo and /tmp/tmppJ6Y2n/tYMwNxGD36/grep-3.3/po/nb.gmo differ diff -Nru grep-3.1/po/nb.po grep-3.3/po/nb.po --- grep-3.1/po/nb.po 2017-07-02 20:21:16.000000000 +0000 +++ grep-3.3/po/nb.po 2018-12-21 04:39:02.000000000 +0000 @@ -1,16 +1,16 @@ -# Norwegian Bokmål translation of GNU Grep +# Norwegian bokmål translation of GNU Grep # Copyright (C) 1996 Free Software Foundation, Inc. # This file is distributed under the same license as the grep package. -# Åka Sikrom , 2014-2016 +# Åka Sikrom , 2014-2018 # Eivind Tagseth , 1997, 2004 # Karl Anders Øygard , 1996. # msgid "" msgstr "" -"Project-Id-Version: grep-2.23.7\n" +"Project-Id-Version: grep-3.1.48\n" "Report-Msgid-Bugs-To: bug-grep@gnu.org\n" -"POT-Creation-Date: 2017-07-02 13:21-0700\n" -"PO-Revision-Date: 2016-03-07 12:12+0100\n" +"POT-Creation-Date: 2018-12-20 20:39-0800\n" +"PO-Revision-Date: 2018-12-16 09:42+0100\n" "Last-Translator: Åka Sikrom \n" "Language-Team: Norwegian Bokmaal \n" "Language: nb\n" @@ -18,7 +18,7 @@ "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Bugs: Report translation errors to the Language-Team address.\n" -"X-Generator: Poedit 1.5.4\n" +"X-Generator: Poedit 2.0.6\n" #: lib/argmatch.c:134 #, c-format @@ -34,43 +34,51 @@ msgid "Valid arguments are:" msgstr "Følgende argumenter er gyldige:" -#: lib/closeout.c:122 src/grep.c:1274 +#: lib/c-stack.c:208 lib/c-stack.c:301 +msgid "program error" +msgstr "programfeil" + +#: lib/c-stack.c:209 lib/c-stack.c:302 +msgid "stack overflow" +msgstr "stabel er full" + +#: lib/closeout.c:122 src/grep.c:1273 msgid "write error" msgstr "skrivefeil" -#: lib/dfa.c:958 +#: lib/dfa.c:970 msgid "unbalanced [" msgstr "ubalansert «[»" -#: lib/dfa.c:1079 +#: lib/dfa.c:1091 msgid "invalid character class" msgstr "ugyldig tegnklasse" -#: lib/dfa.c:1205 +#: lib/dfa.c:1217 msgid "character class syntax is [[:space:]], not [:space:]" msgstr "gjeldende tegnklasse-syntaks er [[:space:]], ikke [:space:]" -#: lib/dfa.c:1272 +#: lib/dfa.c:1284 msgid "unfinished \\ escape" msgstr "ufullstendig \\-skiftetegn" -#: lib/dfa.c:1433 +#: lib/dfa.c:1445 msgid "invalid content of \\{\\}" msgstr "ugyldig innhold i \\{\\}" -#: lib/dfa.c:1436 +#: lib/dfa.c:1448 msgid "regular expression too big" msgstr "regulært uttrykk er for stort" -#: lib/dfa.c:1850 +#: lib/dfa.c:1863 msgid "unbalanced (" msgstr "ubalansert «(»" -#: lib/dfa.c:1968 +#: lib/dfa.c:1981 msgid "no syntax specified" msgstr "ingen syntaks er valgt" -#: lib/dfa.c:1976 +#: lib/dfa.c:1992 msgid "unbalanced )" msgstr "ubalansert «)»" @@ -79,29 +87,29 @@ msgstr "Ukjent systemfeil" #: lib/getopt.c:278 -#, fuzzy, c-format +#, c-format msgid "%s: option '%s%s' is ambiguous\n" -msgstr "%s: valget «%s» er flertydig\n" +msgstr "%s: valget «%s%s» er flertydig\n" #: lib/getopt.c:284 -#, fuzzy, c-format +#, c-format msgid "%s: option '%s%s' is ambiguous; possibilities:" -msgstr "%s: valget «%s» er flertydig, og kan bety følgende:" +msgstr "%s: valget «%s%s» er flertydig, og kan bety følgende:" #: lib/getopt.c:319 -#, fuzzy, c-format +#, c-format msgid "%s: unrecognized option '%s%s'\n" -msgstr "%s: valget «%c%s» er ukjent\n" +msgstr "%s: valget «%s%s» er ukjent\n" #: lib/getopt.c:345 -#, fuzzy, c-format +#, c-format msgid "%s: option '%s%s' doesn't allow an argument\n" -msgstr "%s: valget «%c%s» tillater ikke argumenter\n" +msgstr "%s: valget «%s%s» tillater ikke argumenter\n" #: lib/getopt.c:360 -#, fuzzy, c-format +#, c-format msgid "%s: option '%s%s' requires an argument\n" -msgstr "%s: valget «--%s» krever et argument\n" +msgstr "%s: valget «%s%s» krever et argument\n" #: lib/getopt.c:621 #, c-format @@ -113,7 +121,7 @@ msgid "%s: option requires an argument -- '%c'\n" msgstr "%s: valget -- «%c» krever et argument\n" -#: lib/obstack.c:338 lib/obstack.c:340 lib/xalloc-die.c:34 src/pcresearch.c:291 +#: lib/obstack.c:338 lib/obstack.c:340 lib/xalloc-die.c:34 src/pcresearch.c:313 msgid "memory exhausted" msgstr "minnet er oppbrukt" @@ -130,7 +138,7 @@ #: lib/xbinary-io.c:37 #, c-format msgid "failed to set file descriptor text/binary mode" -msgstr "" +msgstr "klarte ikke å endre fildeskriptor for tekst-/binærmodus" #. TRANSLATORS: #. Get translations for open and closing quotation marks. @@ -151,7 +159,7 @@ #. for your locale. #. #. If you don't know what to put here, please see -#. +#. #. and use glyphs suitable for your language. #: lib/quotearg.c:362 msgid "`" @@ -229,16 +237,16 @@ msgid "Unmatched ) or \\)" msgstr "Ingen treff på «)» eller «\\)»" -#: lib/regcomp.c:687 +#: lib/regcomp.c:688 msgid "No previous regular expression" msgstr "Intet tidligere regulært uttrykk" -#: lib/version-etc.c:74 +#: lib/version-etc.c:73 #, c-format msgid "Packaged by %s (%s)\n" msgstr "Pakket av %s (%s)\n" -#: lib/version-etc.c:77 +#: lib/version-etc.c:76 #, c-format msgid "Packaged by %s\n" msgstr "Pakket av %s\n" @@ -246,14 +254,14 @@ #. TRANSLATORS: Translate "(C)" to the copyright symbol #. (C-in-a-circle), if this symbol is available in the user's #. locale. Otherwise, do not translate "(C)"; leave it as-is. -#: lib/version-etc.c:84 +#: lib/version-etc.c:83 msgid "(C)" msgstr "(C)" -#: lib/version-etc.c:86 +#: lib/version-etc.c:85 msgid "" "\n" -"License GPLv3+: GNU GPL version 3 or later .\n" "This is free software: you are free to change and redistribute it.\n" "There is NO WARRANTY, to the extent permitted by law.\n" @@ -263,8 +271,7 @@ "Lisens GPLv3+: GNU GPL versjon 3 eller nyere .\n" "Dette er fri programvare. Du kan endre og dele den videre så mye du vil.\n" -"Det stilles imidlertid INGEN GARANTI, i den grad gjeldende lovverk tillater " -"det.\n" +"Utgiveren stiller INGEN GARANTI, i den grad gjeldende lovverk tillater det.\n" "\n" #. TRANSLATORS: %s denotes an author name. @@ -400,13 +407,13 @@ #: lib/version-etc.c:253 #, c-format -msgid "%s home page: \n" +msgid "%s home page: \n" msgstr "Nettside for %s: \n" #: lib/version-etc.c:256 -msgid "General help using GNU software: \n" +msgid "General help using GNU software: \n" msgstr "" -"Generell hjelp til å bruke GNU-programvare: \n" +"Generell hjelp til bruk av GNU-programvare: \n" #: lib/xstrtol-error.c:63 #, c-format @@ -423,93 +430,86 @@ msgid "%s%s argument '%s' too large" msgstr "%s%s-argumentet «%s» er for stort/langt" -#. This is a proper name. See the gettext manual, section Names. -#: src/grep.c:59 -msgid "Mike Haertel" -msgstr "Mike Haertel" - -#: src/grep.c:60 -msgid "others, see " -msgstr "andre (se )" - -#: src/grep.c:585 +#: src/grep.c:582 msgid "(standard input)" msgstr "(standard inndata)" -#: src/grep.c:765 +#: src/grep.c:762 msgid "invalid context length argument" msgstr "ugyldig kontekstlengde" -#: src/grep.c:828 +#: src/grep.c:827 msgid "input is too large to count" msgstr "for mye inndata å telle" -#: src/grep.c:1579 +#: src/grep.c:1578 #, c-format msgid "Binary file %s matches\n" msgstr "Binærfil %s samsvarer\n" -#: src/grep.c:1627 +#: src/grep.c:1626 #, c-format msgid "warning: %s: %s" msgstr "advarsel: %s. %s" -#: src/grep.c:1628 +#: src/grep.c:1627 msgid "recursive directory loop" msgstr "rekursiv mappeløkke" -#: src/grep.c:1844 +#: src/grep.c:1843 #, c-format msgid "input file %s is also the output" msgstr "inndatafil %s er også brukt som utdata" -#: src/grep.c:1907 src/grep.c:1914 +#: src/grep.c:1906 src/grep.c:1913 #, c-format -msgid "Usage: %s [OPTION]... PATTERN [FILE]...\n" +msgid "Usage: %s [OPTION]... PATTERNS [FILE]...\n" msgstr "Bruk: %s [VALG] … MØNSTER [FIL] …\n" -#: src/grep.c:1909 +#: src/grep.c:1908 #, c-format msgid "Try '%s --help' for more information.\n" msgstr "Prøv å skrive «%s --help» for mer informasjon.\n" -#: src/grep.c:1915 -#, fuzzy, c-format -msgid "Search for PATTERN in each FILE.\n" -msgstr "Søk etter valgt MØNSTER i valgt(e) FIL(er) eller standard inndata.\n" +#: src/grep.c:1914 +#, c-format +msgid "Search for PATTERNS in each FILE.\n" +msgstr "Søk etter MØNSTER i valgt(e) FIL(er).\n" -#: src/grep.c:1916 -#, fuzzy, c-format +#: src/grep.c:1915 +#, c-format msgid "" "Example: %s -i 'hello world' menu.h main.c\n" +"PATTERNS can contain multiple patterns separated by newlines.\n" "\n" "Pattern selection and interpretation:\n" msgstr "" "Eksempel: %s -i 'hei verden' menu.h main.c\n" +"MØNSTER kan inneholde flere mønstre adskilt med linjeskift.\n" "\n" "Reg.uttrykksutvalg og tolkning:\n" #: src/grep.c:1920 -#, fuzzy, c-format +#, c-format msgid "" -" -E, --extended-regexp PATTERN is an extended regular expression\n" -" -F, --fixed-strings PATTERN is a set of newline-separated strings\n" -" -G, --basic-regexp PATTERN is a basic regular expression (default)\n" -" -P, --perl-regexp PATTERN is a Perl regular expression\n" +" -E, --extended-regexp PATTERNS are extended regular expressions\n" +" -F, --fixed-strings PATTERNS are strings\n" +" -G, --basic-regexp PATTERNS are basic regular expressions\n" +" -P, --perl-regexp PATTERNS are Perl regular expressions\n" msgstr "" -" -E, --extended-regexp MØNSTER er et utvidet regulært uttrykk (ERE)\n" +" -E, --extended-regexp MØNSTER er et utvidet regulært uttrykk\n" " -F, --fixed-strings MØNSTER er flere linje-adskilte strenger\n" -" -G, --basic-regexp MØNSTER er et enkelt regulært uttrykk (BRE)\n" -" -P, --perl-regexp MØNSTER er et regulært uttrykk i Perl-format\n" +" -G, --basic-regexp MØNSTER er et enkelt regulært uttrykk\n" +" -P, --perl-regexp MØNSTER er et Perl-uttrykk\n" #: src/grep.c:1926 #, c-format msgid "" -" -e, --regexp=PATTERN use PATTERN for matching\n" -" -f, --file=FILE obtain PATTERN from FILE\n" +" -e, --regexp=PATTERNS use PATTERNS for matching\n" +" -f, --file=FILE take PATTERNS from FILE\n" " -i, --ignore-case ignore case distinctions\n" -" -w, --word-regexp force PATTERN to match only whole words\n" -" -x, --line-regexp force PATTERN to match only whole lines\n" +" -w, --word-regexp match only whole words\n" +" -x, --line-regexp match only whole lines\n" " -z, --null-data a data line ends in 0 byte, not newline\n" msgstr "" " -e, --regexp=MØNSTER bruk MØNSTER for utvalg\n" @@ -538,7 +538,7 @@ " --help vis denne helpeteksten og avslutt\n" #: src/grep.c:1940 -#, fuzzy, c-format +#, c-format msgid "" "\n" "Output control:\n" @@ -558,15 +558,15 @@ "utdatalinje\n" " -n, --line-number skriv ut linjenummmer per utdatalinje\n" " --line-buffered tøm utdata på hver linje\n" -" -H, --with-filename skriv ut filnavn per søketreff\n" +" -H, --with-filename ta med filnavn på søketreff-linjer\n" " -h, --no-filename ikke ta med filnavn-prefiks i utdata\n" -" --label=ETTIKETT bruk valgt ETIKETT som prefiks på standard " +" --label=ETIKETT bruk valgt ETIKETT som prefiks på standard " "inndata-filnavn\n" #: src/grep.c:1951 #, c-format msgid "" -" -o, --only-matching show only the part of a line matching PATTERN\n" +" -o, --only-matching show only nonempty parts of lines that match\n" " -q, --quiet, --silent suppress all normal output\n" " --binary-files=TYPE assume that binary files are TYPE;\n" " TYPE is 'binary', 'text', or 'without-match'\n" @@ -604,23 +604,21 @@ #: src/grep.c:1967 #, c-format msgid "" -" --include=FILE_PATTERN search only files that match FILE_PATTERN\n" -" --exclude=FILE_PATTERN skip files and directories matching " -"FILE_PATTERN\n" +" --include=GLOB search only files that match GLOB (a file " +"pattern)\n" +" --exclude=GLOB skip files and directories matching GLOB\n" " --exclude-from=FILE skip files matching any file pattern from FILE\n" -" --exclude-dir=PATTERN directories that match PATTERN will be " -"skipped.\n" +" --exclude-dir=GLOB skip directories that match GLOB\n" msgstr "" -" --include=FILMØNSTER bare søk gjennom filer som samsvarer med " -"FILMØNSTER\n" -" --exclude=FILMØNSTER hopp over filer og mapper som samsvarer med " -"FILMØNSTER\n" +" --include=MØNSTER bare søk gjennom filer som samsvarer med MØNSTER\n" +" --exclude=MØNSTER hopp over filer og mapper som samsvarer med " +"MØNSTER\n" " --exclude-from=FIL hopp over filer som samsvarer med mønstre nevnt i " "FIL\n" " --exclude-dir=MØNSTER hopp over mapper som samsvarer med MØNSTER.\n" #: src/grep.c:1974 -#, fuzzy, c-format +#, c-format msgid "" " -L, --files-without-match print only names of FILEs with no selected " "lines\n" @@ -634,7 +632,7 @@ " -l, --files-with-matches bare skriv ut FILnavn som inneholder søketreff\n" " -c, --count bare skriv ut antall samsvarende linjer per FIL\n" " -T, --initial-tab still opp tabulatorer (hvis nødvendig)\n" -" -Z, --null skriv ut tom byte etter FILnavn\n" +" -Z, --null skriv ut 0-byte etter FILnavn\n" #: src/grep.c:1980 #, c-format @@ -655,7 +653,7 @@ "kontekst\n" #: src/grep.c:1987 -#, fuzzy, c-format +#, c-format msgid "" " -NUM same as --context=NUM\n" " --color[=WHEN],\n" @@ -672,25 +670,23 @@ " NÅR er enten «always» (alltid) , " "«never» (aldri), eller «auto»\n" " -U, --binary ikke fjern CR-tegn ved EOL (MSDOS/Windows)\n" -" -u, --unix-byte-offsets rapporter posisjoner som om CR-tegn ikke var " -"tilstede\n" -" (MSDOS/Windows)\n" "\n" #: src/grep.c:1994 -#, fuzzy, c-format +#, c-format msgid "" "When FILE is '-', read standard input. With no FILE, read '.' if\n" "recursive, '-' otherwise. With fewer than two FILEs, assume -h.\n" -"Exit status is 0 if any line is selected, 1 otherwise;\n" +"Exit status is 0 if any line (or file if -L) is selected, 1 otherwise;\n" "if any error occurs and -q is not given, the exit status is 2.\n" msgstr "" "Programmet leser standard inndata når FIL er «-». Når FIL ikke er valgt, " -"leses «.» hvis\n" -"valget «-r» er tatt, og ellers «-». Valget «-h» gjelder implisitt hvis færre " -"enn to FILer er valgt.\n" -"Avsluttende statuskode er 0 hvis linje(r) er valgt, og ellers 1.\n" -"Hvis det oppstår feil og «-q» ikke er valgt, gjelder statuskode 2.\n" +"leses «.» i\n" +"rekursiv modus, og ellers «-». Valget «-h» gjelder implisitt hvis færre enn " +"to FILer er valgt.\n" +"Avsluttende statuskode er 0 når søket gir treff, og ellers 1.\n" +"Hvis det oppstår feil og «-q» ikke er valgt, avslutter programmet med " +"statuskode 2.\n" #: src/grep.c:2034 msgid "conflicting matchers specified" @@ -701,28 +697,35 @@ msgid "invalid matcher %s" msgstr "«%s» er et ugyldig søkeuttrykk" -#: src/grep.c:2458 +#: src/grep.c:2459 #, c-format msgid "warning: GREP_OPTIONS is deprecated; please use an alias or script" msgstr "advarsel: GREP_OPTIONS er utdatert. Bruk et alias eller skript" -#: src/grep.c:2485 +#: src/grep.c:2486 msgid "unknown devices method" msgstr "ukjent enhetsmetode" -#: src/grep.c:2629 +#: src/grep.c:2630 msgid "invalid max count" msgstr "ugyldig maksantall" -#: src/grep.c:2687 +#: src/grep.c:2688 msgid "unknown binary-files type" msgstr "ukjent binærfiltype" -#: src/pcresearch.c:80 +#: src/grep.c:2770 +#, fuzzy +msgid "" +"Written by Mike Haertel and others; see\n" +"." +msgstr "andre: se " + +#: src/pcresearch.c:86 msgid "failed to allocate memory for the PCRE JIT stack" msgstr "klarte ikke å tildele minne til PCRE JIT-stabelen" -#: src/pcresearch.c:97 +#: src/pcresearch.c:118 msgid "" "support for the -P option is not compiled into this --disable-perl-regexp " "binary" @@ -730,39 +733,42 @@ "denne distribusjonen av grep er installert med valget «--disable-perl-" "regexp», og valget «-P» er ikke tilgjengelig" -#: src/pcresearch.c:119 +#: src/pcresearch.c:140 msgid "-P supports only unibyte and UTF-8 locales" msgstr "-P støtter bare regioner i unibyte- og UTF-8" -#: src/pcresearch.c:125 +#: src/pcresearch.c:146 msgid "the -P option only supports a single pattern" msgstr "valget «-P» støtter bare ett mønster" -#: src/pcresearch.c:167 +#: src/pcresearch.c:189 msgid "internal error (should never happen)" msgstr "intern feil (dette skal aldri skje)" -#: src/pcresearch.c:192 +#: src/pcresearch.c:214 msgid "internal error" msgstr "intern feil" -#: src/pcresearch.c:215 +#: src/pcresearch.c:237 msgid "exceeded PCRE's line length limit" msgstr "grensa for PCRE-linjelengde er overskredet" -#: src/pcresearch.c:295 +#: src/pcresearch.c:317 msgid "exhausted PCRE JIT stack" msgstr "PCRE JIT-stabel er oppbrukt" -#: src/pcresearch.c:299 +#: src/pcresearch.c:321 msgid "exceeded PCRE's backtracking limit" msgstr "grensa for PCRE-tilbakegang er overskredet" -#: src/pcresearch.c:306 +#: src/pcresearch.c:328 #, c-format msgid "internal PCRE error: %d" msgstr "intern PCRE-feil: %d" +#~ msgid "Mike Haertel" +#~ msgstr "Mike Haertel" + #~ msgid "%s: option '--%s' doesn't allow an argument\n" #~ msgstr "%s: valget «--%s» tillater ikke argumenter\n" @@ -778,6 +784,9 @@ #~ msgid "%s: option '-W %s' requires an argument\n" #~ msgstr "%s: valget «-W %s» krever et argument\n" +#~ msgid "lseek failed" +#~ msgstr "lseek mislyktes" + #~ msgid "PATTERN is, by default, a basic regular expression (BRE).\n" #~ msgstr "MØNSTER er et enkelt regulært uttrykk (BRE) som standard. \n" @@ -788,9 +797,6 @@ #~ "«egrep» betyr «grep -E». «fgrep» betyr «grep -F».\n" #~ "Direkte kjøring som «egrep» eller «fgrep» er foreldet.\n" -#~ msgid "lseek failed" -#~ msgstr "lseek mislyktes" - #~ msgid "unescaped ^ or $ not supported with -Pz" #~ msgstr "ingen treff på «^», eller «$» støttes ikke med «-Pz»" Binary files /tmp/tmppJ6Y2n/6jFha9hbxv/grep-3.1/po/nl.gmo and /tmp/tmppJ6Y2n/tYMwNxGD36/grep-3.3/po/nl.gmo differ diff -Nru grep-3.1/po/nl.po grep-3.3/po/nl.po --- grep-3.1/po/nl.po 2017-07-02 20:21:16.000000000 +0000 +++ grep-3.3/po/nl.po 2018-12-21 04:39:02.000000000 +0000 @@ -1,28 +1,27 @@ # Dutch translations for GNU grep. -# Copyright (C) 2015 Free Software Foundation, Inc. +# Copyright (C) 2018 Free Software Foundation, Inc. # This file is distributed under the same license as the grep package. # # "To je zaista najmanje fer igra od svih koje postoje na svijetu." # -# Benno Schulenberg , 2005, 2007, 2008, 2010, 2011, 2012, 2013, 2014, 2015, 2016. +# Benno Schulenberg , 2005, 2007, 2008, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2018. # Erwin Poeze , 2009. # Taco Witte , 2004. # Ivo Timmermans , 2000. # Erick Branderhorst , 1996. msgid "" msgstr "" -"Project-Id-Version: grep-3.0.23-b00\n" +"Project-Id-Version: grep-3.1.48\n" "Report-Msgid-Bugs-To: bug-grep@gnu.org\n" -"POT-Creation-Date: 2017-07-02 13:21-0700\n" -"PO-Revision-Date: 2017-06-25 13:52+0200\n" -"Last-Translator: Benno Schulenberg \n" +"POT-Creation-Date: 2018-12-20 20:39-0800\n" +"PO-Revision-Date: 2018-12-19 09:35+0100\n" +"Last-Translator: Benno Schulenberg \n" "Language-Team: Dutch \n" "Language: nl\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Bugs: Report translation errors to the Language-Team address.\n" -"X-Generator: Poedit 2.0.1\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" #: lib/argmatch.c:134 @@ -39,43 +38,51 @@ msgid "Valid arguments are:" msgstr "Geldige argumenten zijn:" -#: lib/closeout.c:122 src/grep.c:1274 +#: lib/c-stack.c:208 lib/c-stack.c:301 +msgid "program error" +msgstr "programmafout" + +#: lib/c-stack.c:209 lib/c-stack.c:302 +msgid "stack overflow" +msgstr "stack-overloop" + +#: lib/closeout.c:122 src/grep.c:1273 msgid "write error" msgstr "schrijffout" -#: lib/dfa.c:958 +#: lib/dfa.c:970 msgid "unbalanced [" msgstr "ongepaarde [" -#: lib/dfa.c:1079 +#: lib/dfa.c:1091 msgid "invalid character class" msgstr "ongeldige tekenklasse" -#: lib/dfa.c:1205 +#: lib/dfa.c:1217 msgid "character class syntax is [[:space:]], not [:space:]" msgstr "syntax van tekenklasse is [[:space:]], niet [:space:]" -#: lib/dfa.c:1272 +#: lib/dfa.c:1284 msgid "unfinished \\ escape" msgstr "onafgemaakte \\-stuurcode" -#: lib/dfa.c:1433 +#: lib/dfa.c:1445 msgid "invalid content of \\{\\}" msgstr "ongeldige inhoud van \\{\\}" -#: lib/dfa.c:1436 +#: lib/dfa.c:1448 msgid "regular expression too big" msgstr "reguliere expressie is te groot" -#: lib/dfa.c:1850 +#: lib/dfa.c:1863 msgid "unbalanced (" msgstr "ongepaarde (" -#: lib/dfa.c:1968 +#: lib/dfa.c:1981 msgid "no syntax specified" msgstr "geen syntax opgegeven" -#: lib/dfa.c:1976 +#: lib/dfa.c:1992 msgid "unbalanced )" msgstr "ongepaarde )" @@ -118,7 +125,7 @@ msgid "%s: option requires an argument -- '%c'\n" msgstr "%s: optie vereist een argument -- '%c'\n" -#: lib/obstack.c:338 lib/obstack.c:340 lib/xalloc-die.c:34 src/pcresearch.c:291 +#: lib/obstack.c:338 lib/obstack.c:340 lib/xalloc-die.c:34 src/pcresearch.c:313 msgid "memory exhausted" msgstr "onvoldoende geheugen beschikbaar" @@ -156,7 +163,7 @@ #. for your locale. #. #. If you don't know what to put here, please see -#. +#. #. and use glyphs suitable for your language. #: lib/quotearg.c:362 msgid "`" @@ -235,16 +242,16 @@ msgid "Unmatched ) or \\)" msgstr "Ongepaarde ) of \\)" -#: lib/regcomp.c:687 +#: lib/regcomp.c:688 msgid "No previous regular expression" msgstr "Geen eerdere reguliere expressie" -#: lib/version-etc.c:74 +#: lib/version-etc.c:73 #, c-format msgid "Packaged by %s (%s)\n" msgstr "In pakketvorm gebracht door %s (%s)\n" -#: lib/version-etc.c:77 +#: lib/version-etc.c:76 #, c-format msgid "Packaged by %s\n" msgstr "In pakketvorm gebracht door %s\n" @@ -252,14 +259,14 @@ #. TRANSLATORS: Translate "(C)" to the copyright symbol #. (C-in-a-circle), if this symbol is available in the user's #. locale. Otherwise, do not translate "(C)"; leave it as-is. -#: lib/version-etc.c:84 +#: lib/version-etc.c:83 msgid "(C)" msgstr "©" -#: lib/version-etc.c:86 +#: lib/version-etc.c:85 msgid "" "\n" -"License GPLv3+: GNU GPL version 3 or later .\n" "This is free software: you are free to change and redistribute it.\n" "There is NO WARRANTY, to the extent permitted by law.\n" @@ -269,7 +276,7 @@ "Dit is vrije software: u mag het vrijelijk wijzigen en verder verspreiden.\n" "De precieze licentie is GPL-3+: GNU General Public License versie 3 of " "later.\n" -"Zie http://gnu.org/licenses/gpl.html voor de volledige (Engelse) tekst.\n" +"Zie https://gnu.org/licenses/gpl.html voor de volledige (Engelse) tekst.\n" "Deze software kent GEEN GARANTIE, voor zover de wet dit toestaat.\n" "\n" @@ -409,13 +416,13 @@ #: lib/version-etc.c:253 #, c-format -msgid "%s home page: \n" -msgstr "Webpagina van %s: \n" +msgid "%s home page: \n" +msgstr "Webpagina van '%s': \n" #: lib/version-etc.c:256 -msgid "General help using GNU software: \n" +msgid "General help using GNU software: \n" msgstr "" -"Algemene hulp bij gebruik van GNU-software: \n" +"Algemene hulp bij gebruik van GNU-software: \n" #: lib/xstrtol-error.c:63 #, c-format @@ -432,101 +439,93 @@ msgid "%s%s argument '%s' too large" msgstr "argument '%3$s' van %1$s%2$s is te groot" -#. This is a proper name. See the gettext manual, section Names. -#: src/grep.c:59 -msgid "Mike Haertel" -msgstr "Mike Haertel" - -#: src/grep.c:60 -msgid "others, see " -msgstr "anderen, zie " - -#: src/grep.c:585 +#: src/grep.c:582 msgid "(standard input)" msgstr "(standaardinvoer)" -#: src/grep.c:765 +#: src/grep.c:762 msgid "invalid context length argument" msgstr "ongeldig argument voor contextlengte" -#: src/grep.c:828 +#: src/grep.c:827 msgid "input is too large to count" msgstr "invoer is te groot om te kunnen tellen" -#: src/grep.c:1579 +#: src/grep.c:1578 #, c-format msgid "Binary file %s matches\n" msgstr "Binair bestand %s bevat de gezochte tekst.\n" -#: src/grep.c:1627 +#: src/grep.c:1626 #, c-format msgid "warning: %s: %s" msgstr "waarschuwing: %s: %s" -#: src/grep.c:1628 +#: src/grep.c:1627 msgid "recursive directory loop" msgstr "oneindige lus in de mappen" -#: src/grep.c:1844 +#: src/grep.c:1843 #, c-format msgid "input file %s is also the output" msgstr "invoerbestand %s is gelijk aan het uitvoerbestand" -#: src/grep.c:1907 src/grep.c:1914 +#: src/grep.c:1906 src/grep.c:1913 #, c-format -msgid "Usage: %s [OPTION]... PATTERN [FILE]...\n" -msgstr "Gebruik: %s [OPTIE...] PATROON [BESTAND...]\n" +msgid "Usage: %s [OPTION]... PATTERNS [FILE]...\n" +msgstr "Gebruik: %s [OPTIE...] PATRONEN [BESTAND...]\n" -#: src/grep.c:1909 +#: src/grep.c:1908 #, c-format msgid "Try '%s --help' for more information.\n" msgstr "Typ '%s --help' voor meer informatie.\n" -#: src/grep.c:1915 +#: src/grep.c:1914 #, c-format -msgid "Search for PATTERN in each FILE.\n" +msgid "Search for PATTERNS in each FILE.\n" msgstr "" " \n" -"Zoekt naar PATROON in ieder gegeven BESTAND.\n" +"Zoekt naar PATRONEN in ieder gegeven BESTAND.\n" -#: src/grep.c:1916 +#: src/grep.c:1915 #, c-format msgid "" "Example: %s -i 'hello world' menu.h main.c\n" +"PATTERNS can contain multiple patterns separated by newlines.\n" "\n" "Pattern selection and interpretation:\n" msgstr "" " \n" " Voorbeeld: %s -i 'hallo wereld' menu.h main.c\n" "\n" -"Keuze en interpretatie van het patroon:\n" +"PATRONEN kan uit meerdere patronen op aparte regels bestaan.\n" +"\n" +"Keuze en interpretatie van PATRONEN:\n" #: src/grep.c:1920 #, c-format msgid "" -" -E, --extended-regexp PATTERN is an extended regular expression\n" -" -F, --fixed-strings PATTERN is a set of newline-separated strings\n" -" -G, --basic-regexp PATTERN is a basic regular expression (default)\n" -" -P, --perl-regexp PATTERN is a Perl regular expression\n" -msgstr "" -" -E, --extended-regexp PATROON is een uitgebreide reguliere expressie\n" -" -F, --fixed-strings PATROON is een serie tekenreeksen,\n" -" elke tekenreeks op een aparte regel\n" -" -G, --basic-regexp PATROON is een gewone reguliere expressie " -"(standaard)\n" -" -P, --perl-regexp PATROON is een reguliere Perl-expressie\n" +" -E, --extended-regexp PATTERNS are extended regular expressions\n" +" -F, --fixed-strings PATTERNS are strings\n" +" -G, --basic-regexp PATTERNS are basic regular expressions\n" +" -P, --perl-regexp PATTERNS are Perl regular expressions\n" +msgstr "" +" -E, --extended-regexp PATRONEN zijn uitgebreide reguliere expressies\n" +" -F, --fixed-strings PATRONEN zijn tekenreeksen\n" +" -G, --basic-regexp PATRONEN zijn gewone reguliere expressies\n" +" -P, --perl-regexp PATRONEN zijn reguliere Perl-expressies\n" #: src/grep.c:1926 #, c-format msgid "" -" -e, --regexp=PATTERN use PATTERN for matching\n" -" -f, --file=FILE obtain PATTERN from FILE\n" +" -e, --regexp=PATTERNS use PATTERNS for matching\n" +" -f, --file=FILE take PATTERNS from FILE\n" " -i, --ignore-case ignore case distinctions\n" -" -w, --word-regexp force PATTERN to match only whole words\n" -" -x, --line-regexp force PATTERN to match only whole lines\n" +" -w, --word-regexp match only whole words\n" +" -x, --line-regexp match only whole lines\n" " -z, --null-data a data line ends in 0 byte, not newline\n" msgstr "" -" -e, --regexp=PATROON dit PATROON gebruiken bij het zoeken\n" +" -e, --regexp=PATRONEN deze PATRONEN gebruiken bij het zoeken\n" " -f, --file=BESTAND patronen uit dit BESTAND halen\n" " -i, --ignore-case verschil tussen hoofd- en kleine letters " "negeren\n" @@ -581,13 +580,14 @@ #: src/grep.c:1951 #, c-format msgid "" -" -o, --only-matching show only the part of a line matching PATTERN\n" +" -o, --only-matching show only nonempty parts of lines that match\n" " -q, --quiet, --silent suppress all normal output\n" " --binary-files=TYPE assume that binary files are TYPE;\n" " TYPE is 'binary', 'text', or 'without-match'\n" " -a, --text equivalent to --binary-files=text\n" msgstr "" -" -o, --only-matching alleen het overeenkomende regelfragment tonen\n" +" -o, --only-matching alleen overeenkomende niet-lege fragmenten " +"tonen\n" " -q, --quiet, --silent alle normale uitvoer onderdrukken\n" " --binary-files=TYPE aannemen dat binaire bestanden van dit TYPE " "zijn;\n" @@ -624,21 +624,20 @@ #: src/grep.c:1967 #, c-format msgid "" -" --include=FILE_PATTERN search only files that match FILE_PATTERN\n" -" --exclude=FILE_PATTERN skip files and directories matching " -"FILE_PATTERN\n" +" --include=GLOB search only files that match GLOB (a file " +"pattern)\n" +" --exclude=GLOB skip files and directories matching GLOB\n" " --exclude-from=FILE skip files matching any file pattern from FILE\n" -" --exclude-dir=PATTERN directories that match PATTERN will be " -"skipped.\n" +" --exclude-dir=GLOB skip directories that match GLOB\n" msgstr "" " --include=BESTANDSPATROON alleen bestanden doorzoeken die aan\n" " BESTANDSPATROON voldoen\n" -" --exclude=BESTANDSPATROON bestanden overslaan die aan " -"BESTANDSPATROON\n" -" voldoen\n" +" --exclude=BESTANDSPATROON bestanden en mappen overslaan die aan\n" +" BESTANDSPATROON voldoen\n" " --exclude-from=BESTAND bestanden overslaan die aan een patroon in\n" " BESTAND voldoen\n" -" --exclude-dir=PATROON mappen overslaan die aan PATROON voldoen\n" +" --exclude-dir=BSTNDSPTRN mappen overslaan die aan BSTNDSPTRN " +"voldoen\n" #: src/grep.c:1974 #, c-format @@ -703,15 +702,17 @@ msgid "" "When FILE is '-', read standard input. With no FILE, read '.' if\n" "recursive, '-' otherwise. With fewer than two FILEs, assume -h.\n" -"Exit status is 0 if any line is selected, 1 otherwise;\n" +"Exit status is 0 if any line (or file if -L) is selected, 1 otherwise;\n" "if any error occurs and -q is not given, the exit status is 2.\n" msgstr "" "Indien BESTAND '-' is, wordt standaardinvoer gelezen. Zonder een BESTAND\n" "wordt '.' gelezen indien in recursieve modus, anders wordt '-' gelezen.\n" "Bij minder dan twee BESTANDen wordt '-h' aangenomen.\n" "\n" -"De afsluitwaarde is 0 in geval van overeenkomsten, anders 1; als er\n" -"een fout optreedt en '-q' is niet gegeven, dan is de afsluitwaarde 2.\n" +"De afsluitwaarde is 0 wanneer enige regel (of bestand bij '-L') " +"geselecteerd\n" +"werd, anders 1; als er een fout optreedt en '-q' is niet gegeven, dan is de\n" +"afsluitwaarde 2.\n" #: src/grep.c:2034 msgid "conflicting matchers specified" @@ -722,68 +723,78 @@ msgid "invalid matcher %s" msgstr "ongeldige expressiesoort '%s'" -#: src/grep.c:2458 +#: src/grep.c:2459 #, c-format msgid "warning: GREP_OPTIONS is deprecated; please use an alias or script" msgstr "" "waarschuwing: GREP_OPTIONS is verouderd; gebruik een alias of een script" -#: src/grep.c:2485 +#: src/grep.c:2486 msgid "unknown devices method" msgstr "onbekende apparaten-actie" -#: src/grep.c:2629 +#: src/grep.c:2630 msgid "invalid max count" msgstr "ongeldig maximum aantal" -#: src/grep.c:2687 +#: src/grep.c:2688 msgid "unknown binary-files type" msgstr "onbekend binair bestandstype" -#: src/pcresearch.c:80 +#: src/grep.c:2770 +#, fuzzy +msgid "" +"Written by Mike Haertel and others; see\n" +"." +msgstr "anderen, zie " + +#: src/pcresearch.c:86 msgid "failed to allocate memory for the PCRE JIT stack" msgstr "onvoldoende geheugen beschikbaar voor de PCRE-JIT-stack" -#: src/pcresearch.c:97 +#: src/pcresearch.c:118 msgid "" "support for the -P option is not compiled into this --disable-perl-regexp " "binary" msgstr "" "ondersteuning voor de optie '-P' is in deze programmaversie niet opgenomen" -#: src/pcresearch.c:119 +#: src/pcresearch.c:140 msgid "-P supports only unibyte and UTF-8 locales" msgstr "optie '-P' ondersteunt alleen enkelbytes- en UTF-8-taalregio's" -#: src/pcresearch.c:125 +#: src/pcresearch.c:146 msgid "the -P option only supports a single pattern" msgstr "optie '-P' accepteert slechts één patroon" -#: src/pcresearch.c:167 +#: src/pcresearch.c:189 msgid "internal error (should never happen)" msgstr "**interne programmafout** (zou nooit mogen gebeuren)" -#: src/pcresearch.c:192 +#: src/pcresearch.c:214 msgid "internal error" msgstr "**interne programmafout**" -#: src/pcresearch.c:215 +#: src/pcresearch.c:237 msgid "exceeded PCRE's line length limit" msgstr "de regellengtegrens van PCRE is overschreden" -#: src/pcresearch.c:295 +#: src/pcresearch.c:317 msgid "exhausted PCRE JIT stack" msgstr "de PCRE-JIT-stack is volledig gebruikt" -#: src/pcresearch.c:299 +#: src/pcresearch.c:321 msgid "exceeded PCRE's backtracking limit" msgstr "de terugverwijzingsgrens van PCRE is overschreden" -#: src/pcresearch.c:306 +#: src/pcresearch.c:328 #, c-format msgid "internal PCRE error: %d" msgstr "**interne programmafout** in PCRE: %d" +#~ msgid "Mike Haertel" +#~ msgstr "Mike Haertel" + #~ msgid "%s: option '--%s' doesn't allow an argument\n" #~ msgstr "%s: optie '--%s' staat geen argument toe\n" Binary files /tmp/tmppJ6Y2n/6jFha9hbxv/grep-3.1/po/pa.gmo and /tmp/tmppJ6Y2n/tYMwNxGD36/grep-3.3/po/pa.gmo differ diff -Nru grep-3.1/po/pa.po grep-3.3/po/pa.po --- grep-3.1/po/pa.po 2017-07-02 20:21:16.000000000 +0000 +++ grep-3.3/po/pa.po 2018-12-21 04:39:02.000000000 +0000 @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: grep 2.11.11-pre1\n" "Report-Msgid-Bugs-To: bug-grep@gnu.org\n" -"POT-Creation-Date: 2017-07-02 13:21-0700\n" +"POT-Creation-Date: 2018-12-20 20:39-0800\n" "PO-Revision-Date: 2012-05-19 17:52+0530\n" "Last-Translator: A S Alam \n" "Language-Team: Punjabi \n" @@ -33,45 +33,53 @@ msgid "Valid arguments are:" msgstr "ਠੀਕ ਆਰਗੂਮੈਂਟ ਹਨ:" -#: lib/closeout.c:122 src/grep.c:1274 +#: lib/c-stack.c:208 lib/c-stack.c:301 +msgid "program error" +msgstr "" + +#: lib/c-stack.c:209 lib/c-stack.c:302 +msgid "stack overflow" +msgstr "" + +#: lib/closeout.c:122 src/grep.c:1273 msgid "write error" msgstr "ਲਿਖਣ ਗਲਤੀ" -#: lib/dfa.c:958 +#: lib/dfa.c:970 msgid "unbalanced [" msgstr "ਅਧੂਰੀ [" -#: lib/dfa.c:1079 +#: lib/dfa.c:1091 msgid "invalid character class" msgstr "ਗਲਤ ਕਰੈਕਟਰ ਕਲਾਸ" -#: lib/dfa.c:1205 +#: lib/dfa.c:1217 msgid "character class syntax is [[:space:]], not [:space:]" msgstr "" -#: lib/dfa.c:1272 +#: lib/dfa.c:1284 msgid "unfinished \\ escape" msgstr "" -#: lib/dfa.c:1433 +#: lib/dfa.c:1445 #, fuzzy msgid "invalid content of \\{\\}" msgstr "ਗਲਤ ਵੱਧ ਤੋਂ ਵੱਧ ਗਿਣਤੀ" -#: lib/dfa.c:1436 +#: lib/dfa.c:1448 #, fuzzy msgid "regular expression too big" msgstr "ਨਿਯਮਤ ਸਮੀਕਰਨ ਬਹੁਤ ਵੱਡੀ ਹੈ" -#: lib/dfa.c:1850 +#: lib/dfa.c:1863 msgid "unbalanced (" msgstr "ਅਧੂਰੀ (" -#: lib/dfa.c:1968 +#: lib/dfa.c:1981 msgid "no syntax specified" msgstr "ਕੋਈ ਸੰਟੈਕਸ ਨਹੀਂ ਦਿੱਤਾ" -#: lib/dfa.c:1976 +#: lib/dfa.c:1992 msgid "unbalanced )" msgstr "ਅਧੂਰੀ )" @@ -114,7 +122,7 @@ msgid "%s: option requires an argument -- '%c'\n" msgstr "%s: ਚੋਣ ਲਈ ਆਰਗੂਮੈਂਟ ਚਾਹੀਦਾ ਹੈ --'%c'\n" -#: lib/obstack.c:338 lib/obstack.c:340 lib/xalloc-die.c:34 src/pcresearch.c:291 +#: lib/obstack.c:338 lib/obstack.c:340 lib/xalloc-die.c:34 src/pcresearch.c:313 msgid "memory exhausted" msgstr "ਮੈਮੋਰੀ ਖਤਮ ਹੋਈ" @@ -152,7 +160,7 @@ #. for your locale. #. #. If you don't know what to put here, please see -#. +#. #. and use glyphs suitable for your language. #: lib/quotearg.c:362 msgid "`" @@ -231,16 +239,16 @@ msgid "Unmatched ) or \\)" msgstr "ਨਾ ਮਿਲਦੇ ) ਜਾਂ \\)" -#: lib/regcomp.c:687 +#: lib/regcomp.c:688 msgid "No previous regular expression" msgstr "ਕੋਈ ਪਿਛਲਾ ਨਿਯਮਤ ਸਮੀਕਰਨ ਨਹੀਂ" -#: lib/version-etc.c:74 +#: lib/version-etc.c:73 #, c-format msgid "Packaged by %s (%s)\n" msgstr "%s (%s) ਵਲੋਂ ਪੈਕ ਕੀਤਾ\n" -#: lib/version-etc.c:77 +#: lib/version-etc.c:76 #, c-format msgid "Packaged by %s\n" msgstr "%s ਵਲੋਂ ਪੈਕੇਜ ਬਣਾਇਆ\n" @@ -248,14 +256,14 @@ #. TRANSLATORS: Translate "(C)" to the copyright symbol #. (C-in-a-circle), if this symbol is available in the user's #. locale. Otherwise, do not translate "(C)"; leave it as-is. -#: lib/version-etc.c:84 +#: lib/version-etc.c:83 msgid "(C)" msgstr "(C)" -#: lib/version-etc.c:86 +#: lib/version-etc.c:85 msgid "" "\n" -"License GPLv3+: GNU GPL version 3 or later .\n" "This is free software: you are free to change and redistribute it.\n" "There is NO WARRANTY, to the extent permitted by law.\n" @@ -394,12 +402,13 @@ msgstr "%s ਮੁੱਖ ਪੇਜ਼: <%s>\n" #: lib/version-etc.c:253 -#, c-format -msgid "%s home page: \n" +#, fuzzy, c-format +msgid "%s home page: \n" msgstr "%s ਮੁੱਖ ਪੇਜ਼: \n" #: lib/version-etc.c:256 -msgid "General help using GNU software: \n" +#, fuzzy +msgid "General help using GNU software: \n" msgstr "ਗਨੂ ਸਾਫਟਵੇਅਰ ਦੀ ਵਰਤੋਂ ਲਈ ਆਮ ਮੱਦਦ ਵਾਸਤੇ: \n" #: lib/xstrtol-error.c:63 @@ -417,65 +426,57 @@ msgid "%s%s argument '%s' too large" msgstr "%s%s ਆਰਗੂਮੈਂਟ '%s' ਬਹੁਤ ਵੱਡਾ ਹੈ" -#. This is a proper name. See the gettext manual, section Names. -#: src/grep.c:59 -msgid "Mike Haertel" -msgstr "ਮਾਈਕ ਹਾਇਰਟੇਲ" - -#: src/grep.c:60 -msgid "others, see " -msgstr "ਹੋਰਾਂ ਲਈ ਵੇਖੋ" - -#: src/grep.c:585 +#: src/grep.c:582 msgid "(standard input)" msgstr "(ਸਟੈਂਡਰਡ ਆਉਟਪੁੱਟ)" -#: src/grep.c:765 +#: src/grep.c:762 msgid "invalid context length argument" msgstr "" -#: src/grep.c:828 +#: src/grep.c:827 msgid "input is too large to count" msgstr "ਇੰਪੁੱਟ ਗਿਣਤੀ ਕਰਨ ਲਈ ਬਹੁਤ ਵੱਡੀ ਹੈ" -#: src/grep.c:1579 +#: src/grep.c:1578 #, c-format msgid "Binary file %s matches\n" msgstr "ਬਾਈਨਰੀ ਫਾਇਲ %s ਮਿਲਦੀ ਹੈ\n" -#: src/grep.c:1627 +#: src/grep.c:1626 #, c-format msgid "warning: %s: %s" msgstr "ਸਾਵਧਾਨ: %s: %s" -#: src/grep.c:1628 +#: src/grep.c:1627 msgid "recursive directory loop" msgstr "ਲਗਾਤਾਰ ਡਾਇਰੈਕਟਰੀ ਲੂਪ" -#: src/grep.c:1844 +#: src/grep.c:1843 #, c-format msgid "input file %s is also the output" msgstr "ਇੰਪੁੱਟ ਫਾਇਲ %s ਆਉਟਪੁੱਟ ਫਾਇਲ ਵੀ ਹੈ" -#: src/grep.c:1907 src/grep.c:1914 -#, c-format -msgid "Usage: %s [OPTION]... PATTERN [FILE]...\n" +#: src/grep.c:1906 src/grep.c:1913 +#, fuzzy, c-format +msgid "Usage: %s [OPTION]... PATTERNS [FILE]...\n" msgstr "ਵਰਤੋਂ: %s [ਚੋਣਾਂ]... ਪੈਟਰਨ [ਫਾਇਲ]...\n" -#: src/grep.c:1909 +#: src/grep.c:1908 #, c-format msgid "Try '%s --help' for more information.\n" msgstr "ਹੋਰ ਜਾਣਕਾਰੀ ਲਈ '%s --help' ਨਾਲ ਕੋਸ਼ਿਸ਼ ਕਰੋ।\n" -#: src/grep.c:1915 +#: src/grep.c:1914 #, fuzzy, c-format -msgid "Search for PATTERN in each FILE.\n" +msgid "Search for PATTERNS in each FILE.\n" msgstr "ਹਰੇਕ ਫਾਇਲ (FILE) ਜਾਂ ਸਟੈਂਡਰਡ ਆਉਟਪੁੱਟ ਲਈ ਪੈਟਰਨ ਦੀ ਖੋਜ।\n" -#: src/grep.c:1916 +#: src/grep.c:1915 #, fuzzy, c-format msgid "" "Example: %s -i 'hello world' menu.h main.c\n" +"PATTERNS can contain multiple patterns separated by newlines.\n" "\n" "Pattern selection and interpretation:\n" msgstr "" @@ -486,20 +487,20 @@ #: src/grep.c:1920 #, c-format msgid "" -" -E, --extended-regexp PATTERN is an extended regular expression\n" -" -F, --fixed-strings PATTERN is a set of newline-separated strings\n" -" -G, --basic-regexp PATTERN is a basic regular expression (default)\n" -" -P, --perl-regexp PATTERN is a Perl regular expression\n" +" -E, --extended-regexp PATTERNS are extended regular expressions\n" +" -F, --fixed-strings PATTERNS are strings\n" +" -G, --basic-regexp PATTERNS are basic regular expressions\n" +" -P, --perl-regexp PATTERNS are Perl regular expressions\n" msgstr "" #: src/grep.c:1926 #, c-format msgid "" -" -e, --regexp=PATTERN use PATTERN for matching\n" -" -f, --file=FILE obtain PATTERN from FILE\n" +" -e, --regexp=PATTERNS use PATTERNS for matching\n" +" -f, --file=FILE take PATTERNS from FILE\n" " -i, --ignore-case ignore case distinctions\n" -" -w, --word-regexp force PATTERN to match only whole words\n" -" -x, --line-regexp force PATTERN to match only whole lines\n" +" -w, --word-regexp match only whole words\n" +" -x, --line-regexp match only whole lines\n" " -z, --null-data a data line ends in 0 byte, not newline\n" msgstr "" @@ -532,7 +533,7 @@ #: src/grep.c:1951 #, c-format msgid "" -" -o, --only-matching show only the part of a line matching PATTERN\n" +" -o, --only-matching show only nonempty parts of lines that match\n" " -q, --quiet, --silent suppress all normal output\n" " --binary-files=TYPE assume that binary files are TYPE;\n" " TYPE is 'binary', 'text', or 'without-match'\n" @@ -554,12 +555,11 @@ #: src/grep.c:1967 #, c-format msgid "" -" --include=FILE_PATTERN search only files that match FILE_PATTERN\n" -" --exclude=FILE_PATTERN skip files and directories matching " -"FILE_PATTERN\n" +" --include=GLOB search only files that match GLOB (a file " +"pattern)\n" +" --exclude=GLOB skip files and directories matching GLOB\n" " --exclude-from=FILE skip files matching any file pattern from FILE\n" -" --exclude-dir=PATTERN directories that match PATTERN will be " -"skipped.\n" +" --exclude-dir=GLOB skip directories that match GLOB\n" msgstr "" #: src/grep.c:1974 @@ -600,7 +600,7 @@ msgid "" "When FILE is '-', read standard input. With no FILE, read '.' if\n" "recursive, '-' otherwise. With fewer than two FILEs, assume -h.\n" -"Exit status is 0 if any line is selected, 1 otherwise;\n" +"Exit status is 0 if any line (or file if -L) is selected, 1 otherwise;\n" "if any error occurs and -q is not given, the exit status is 2.\n" msgstr "" @@ -613,66 +613,76 @@ msgid "invalid matcher %s" msgstr "ਗਲਤ ਮੈਚਰ %s" -#: src/grep.c:2458 +#: src/grep.c:2459 #, c-format msgid "warning: GREP_OPTIONS is deprecated; please use an alias or script" msgstr "" -#: src/grep.c:2485 +#: src/grep.c:2486 msgid "unknown devices method" msgstr "ਅਣਜਾਣ ਜੰਤਰ ਢੰਗ" -#: src/grep.c:2629 +#: src/grep.c:2630 msgid "invalid max count" msgstr "ਗਲਤ ਵੱਧ ਤੋਂ ਵੱਧ ਗਿਣਤੀ" -#: src/grep.c:2687 +#: src/grep.c:2688 msgid "unknown binary-files type" msgstr "ਅਣਜਾਣ ਬਾਈਨਰੀ-ਫਾਇਲ ਕਿਸਮ" -#: src/pcresearch.c:80 +#: src/grep.c:2770 +#, fuzzy +msgid "" +"Written by Mike Haertel and others; see\n" +"." +msgstr "ਹੋਰਾਂ ਲਈ ਵੇਖੋ" + +#: src/pcresearch.c:86 msgid "failed to allocate memory for the PCRE JIT stack" msgstr "" -#: src/pcresearch.c:97 +#: src/pcresearch.c:118 msgid "" "support for the -P option is not compiled into this --disable-perl-regexp " "binary" msgstr "" -#: src/pcresearch.c:119 +#: src/pcresearch.c:140 msgid "-P supports only unibyte and UTF-8 locales" msgstr "" -#: src/pcresearch.c:125 +#: src/pcresearch.c:146 msgid "the -P option only supports a single pattern" msgstr "" -#: src/pcresearch.c:167 +#: src/pcresearch.c:189 msgid "internal error (should never happen)" msgstr "" -#: src/pcresearch.c:192 +#: src/pcresearch.c:214 msgid "internal error" msgstr "ਅੰਦਰੂਨੀ ਗਲਤੀ" -#: src/pcresearch.c:215 +#: src/pcresearch.c:237 msgid "exceeded PCRE's line length limit" msgstr "" -#: src/pcresearch.c:295 +#: src/pcresearch.c:317 msgid "exhausted PCRE JIT stack" msgstr "" -#: src/pcresearch.c:299 +#: src/pcresearch.c:321 msgid "exceeded PCRE's backtracking limit" msgstr "" -#: src/pcresearch.c:306 +#: src/pcresearch.c:328 #, fuzzy, c-format msgid "internal PCRE error: %d" msgstr "ਅੰਦਰੂਨੀ ਗਲਤੀ" +#~ msgid "Mike Haertel" +#~ msgstr "ਮਾਈਕ ਹਾਇਰਟੇਲ" + #~ msgid "%s: option '--%s' doesn't allow an argument\n" #~ msgstr "%s: ਚੋਣ '--%s' ਇੱਕ ਆਰਗੂਮੈਂਟ ਨਹੀਂ ਲੈਂਦੀ\n" Binary files /tmp/tmppJ6Y2n/6jFha9hbxv/grep-3.1/po/pl.gmo and /tmp/tmppJ6Y2n/tYMwNxGD36/grep-3.3/po/pl.gmo differ diff -Nru grep-3.1/po/pl.po grep-3.3/po/pl.po --- grep-3.1/po/pl.po 2017-07-02 20:21:16.000000000 +0000 +++ grep-3.3/po/pl.po 2018-12-21 04:39:02.000000000 +0000 @@ -6,7 +6,7 @@ msgstr "" "Project-Id-Version: GNU grep 3.0.23-b00\n" "Report-Msgid-Bugs-To: bug-grep@gnu.org\n" -"POT-Creation-Date: 2017-07-02 13:21-0700\n" +"POT-Creation-Date: 2018-12-20 20:39-0800\n" "PO-Revision-Date: 2017-06-26 01:25+0100\n" "Last-Translator: Rafał Maszkowski \n" "Language-Team: Polish \n" @@ -30,43 +30,51 @@ msgid "Valid arguments are:" msgstr "Prawidłowe agrumenty to:" -#: lib/closeout.c:122 src/grep.c:1274 +#: lib/c-stack.c:208 lib/c-stack.c:301 +msgid "program error" +msgstr "" + +#: lib/c-stack.c:209 lib/c-stack.c:302 +msgid "stack overflow" +msgstr "" + +#: lib/closeout.c:122 src/grep.c:1273 msgid "write error" msgstr "błąd zapisu" -#: lib/dfa.c:958 +#: lib/dfa.c:970 msgid "unbalanced [" msgstr "[ nie do pary" -#: lib/dfa.c:1079 +#: lib/dfa.c:1091 msgid "invalid character class" msgstr "błędna nazwa klasy znaków" -#: lib/dfa.c:1205 +#: lib/dfa.c:1217 msgid "character class syntax is [[:space:]], not [:space:]" msgstr "składnia klasy znaków to [[:space:]], nie [:space:]" -#: lib/dfa.c:1272 +#: lib/dfa.c:1284 msgid "unfinished \\ escape" msgstr "niedokończona sekwencja \\" -#: lib/dfa.c:1433 +#: lib/dfa.c:1445 msgid "invalid content of \\{\\}" msgstr "błędna zawartość \\{\\}" -#: lib/dfa.c:1436 +#: lib/dfa.c:1448 msgid "regular expression too big" msgstr "za duże wyrażenie regularne" -#: lib/dfa.c:1850 +#: lib/dfa.c:1863 msgid "unbalanced (" msgstr "( nie do pary" -#: lib/dfa.c:1968 +#: lib/dfa.c:1981 msgid "no syntax specified" msgstr "brak specyfikacji składni" -#: lib/dfa.c:1976 +#: lib/dfa.c:1992 msgid "unbalanced )" msgstr ") nie do pary" @@ -109,7 +117,7 @@ msgid "%s: option requires an argument -- '%c'\n" msgstr "%s: opcja wymaga argumentu -- „%c”\n" -#: lib/obstack.c:338 lib/obstack.c:340 lib/xalloc-die.c:34 src/pcresearch.c:291 +#: lib/obstack.c:338 lib/obstack.c:340 lib/xalloc-die.c:34 src/pcresearch.c:313 msgid "memory exhausted" msgstr "pamięć wyczerpana" @@ -147,7 +155,7 @@ #. for your locale. #. #. If you don't know what to put here, please see -#. +#. #. and use glyphs suitable for your language. #: lib/quotearg.c:362 msgid "`" @@ -225,16 +233,16 @@ msgid "Unmatched ) or \\)" msgstr "Nie pasujący ) albo \\)" -#: lib/regcomp.c:687 +#: lib/regcomp.c:688 msgid "No previous regular expression" msgstr "Brak poprzedniego wyrażenia regularnego" -#: lib/version-etc.c:74 +#: lib/version-etc.c:73 #, c-format msgid "Packaged by %s (%s)\n" msgstr "Spakowane przez %s (%s)\n" -#: lib/version-etc.c:77 +#: lib/version-etc.c:76 #, c-format msgid "Packaged by %s\n" msgstr "Spakowane przez %s\n" @@ -242,14 +250,15 @@ #. TRANSLATORS: Translate "(C)" to the copyright symbol #. (C-in-a-circle), if this symbol is available in the user's #. locale. Otherwise, do not translate "(C)"; leave it as-is. -#: lib/version-etc.c:84 +#: lib/version-etc.c:83 msgid "(C)" msgstr "©" -#: lib/version-etc.c:86 +#: lib/version-etc.c:85 +#, fuzzy msgid "" "\n" -"License GPLv3+: GNU GPL version 3 or later .\n" "This is free software: you are free to change and redistribute it.\n" "There is NO WARRANTY, to the extent permitted by law.\n" @@ -393,12 +402,13 @@ msgstr "Strona domowa %s: %s\n" #: lib/version-etc.c:253 -#, c-format -msgid "%s home page: \n" +#, fuzzy, c-format +msgid "%s home page: \n" msgstr "Strona domowa %s: http://www.gnu.org/software/%s/\n" #: lib/version-etc.c:256 -msgid "General help using GNU software: \n" +#, fuzzy +msgid "General help using GNU software: \n" msgstr "Pomoc w używaniu oprogramowania GNU: http://www.gnu.org/gethelp/\n" #: lib/xstrtol-error.c:63 @@ -416,65 +426,57 @@ msgid "%s%s argument '%s' too large" msgstr "argument %s%s „%s” jest za duży" -#. This is a proper name. See the gettext manual, section Names. -#: src/grep.c:59 -msgid "Mike Haertel" -msgstr "Mike'a Haertela" - -#: src/grep.c:60 -msgid "others, see " -msgstr "innych, zobacz: http://git.sv.gnu.org/cgit/grep.git/tree/AUTHORS" - -#: src/grep.c:585 +#: src/grep.c:582 msgid "(standard input)" msgstr "(standardowe wejście)" -#: src/grep.c:765 +#: src/grep.c:762 msgid "invalid context length argument" msgstr "błędny argument długości kontekstowej" -#: src/grep.c:828 +#: src/grep.c:827 msgid "input is too large to count" msgstr "danych wejściowych jest zbyt dużo do policzenia" -#: src/grep.c:1579 +#: src/grep.c:1578 #, c-format msgid "Binary file %s matches\n" msgstr "Plik binarny %s pasuje do wzorca\n" -#: src/grep.c:1627 +#: src/grep.c:1626 #, c-format msgid "warning: %s: %s" msgstr "uwaga: %s: %s" -#: src/grep.c:1628 +#: src/grep.c:1627 msgid "recursive directory loop" msgstr "nieskończona pętla przeglądania katalogów" -#: src/grep.c:1844 +#: src/grep.c:1843 #, c-format msgid "input file %s is also the output" msgstr "plik wejściowy %s jest również plikiem wyjściowym" -#: src/grep.c:1907 src/grep.c:1914 -#, c-format -msgid "Usage: %s [OPTION]... PATTERN [FILE]...\n" +#: src/grep.c:1906 src/grep.c:1913 +#, fuzzy, c-format +msgid "Usage: %s [OPTION]... PATTERNS [FILE]...\n" msgstr "Składnia: %s [OPCJA]... WZORZEC [PLIK] ...\n" -#: src/grep.c:1909 +#: src/grep.c:1908 #, c-format msgid "Try '%s --help' for more information.\n" msgstr "Napisz „%s --help” żeby dowiedzieć się więcej.\n" -#: src/grep.c:1915 -#, c-format -msgid "Search for PATTERN in each FILE.\n" +#: src/grep.c:1914 +#, fuzzy, c-format +msgid "Search for PATTERNS in each FILE.\n" msgstr "Szukanie WZORCA w PLIKACH.\n" -#: src/grep.c:1916 -#, c-format +#: src/grep.c:1915 +#, fuzzy, c-format msgid "" "Example: %s -i 'hello world' menu.h main.c\n" +"PATTERNS can contain multiple patterns separated by newlines.\n" "\n" "Pattern selection and interpretation:\n" msgstr "" @@ -483,12 +485,12 @@ "Wybór i interpretacja wzorców:\n" #: src/grep.c:1920 -#, c-format +#, fuzzy, c-format msgid "" -" -E, --extended-regexp PATTERN is an extended regular expression\n" -" -F, --fixed-strings PATTERN is a set of newline-separated strings\n" -" -G, --basic-regexp PATTERN is a basic regular expression (default)\n" -" -P, --perl-regexp PATTERN is a Perl regular expression\n" +" -E, --extended-regexp PATTERNS are extended regular expressions\n" +" -F, --fixed-strings PATTERNS are strings\n" +" -G, --basic-regexp PATTERNS are basic regular expressions\n" +" -P, --perl-regexp PATTERNS are Perl regular expressions\n" msgstr "" " -E, --extended-regexp WZORZEC jest rozszerzonym wyrażeniem regularnym\n" " -F, --fixed-strings WZORZEC to napisy oddzielone przez znaki\n" @@ -498,13 +500,13 @@ " -P, --perl-regexp WZORZEC jest wyrażeniem regularnym perla\n" #: src/grep.c:1926 -#, c-format +#, fuzzy, c-format msgid "" -" -e, --regexp=PATTERN use PATTERN for matching\n" -" -f, --file=FILE obtain PATTERN from FILE\n" +" -e, --regexp=PATTERNS use PATTERNS for matching\n" +" -f, --file=FILE take PATTERNS from FILE\n" " -i, --ignore-case ignore case distinctions\n" -" -w, --word-regexp force PATTERN to match only whole words\n" -" -x, --line-regexp force PATTERN to match only whole lines\n" +" -w, --word-regexp match only whole words\n" +" -x, --line-regexp match only whole lines\n" " -z, --null-data a data line ends in 0 byte, not newline\n" msgstr "" " -e, --regexp=WZORZEC użycie WZORCA jako wyrażenia regularnego\n" @@ -558,9 +560,9 @@ " --label=ETYKIETA w wyniku ETYKIETA zastępuje nazwe pliku\n" #: src/grep.c:1951 -#, c-format +#, fuzzy, c-format msgid "" -" -o, --only-matching show only the part of a line matching PATTERN\n" +" -o, --only-matching show only nonempty parts of lines that match\n" " -q, --quiet, --silent suppress all normal output\n" " --binary-files=TYPE assume that binary files are TYPE;\n" " TYPE is 'binary', 'text', or 'without-match'\n" @@ -596,14 +598,13 @@ " symbolicznymi\n" #: src/grep.c:1967 -#, c-format +#, fuzzy, c-format msgid "" -" --include=FILE_PATTERN search only files that match FILE_PATTERN\n" -" --exclude=FILE_PATTERN skip files and directories matching " -"FILE_PATTERN\n" +" --include=GLOB search only files that match GLOB (a file " +"pattern)\n" +" --exclude=GLOB skip files and directories matching GLOB\n" " --exclude-from=FILE skip files matching any file pattern from FILE\n" -" --exclude-dir=PATTERN directories that match PATTERN will be " -"skipped.\n" +" --exclude-dir=GLOB skip directories that match GLOB\n" msgstr "" " --include=WZORZEC przeszukiwane będą pliki pasujące do WZORCA\n" " --exclude=WZORZEC pliki pasujące do WZORCA będą pominięte\n" @@ -664,11 +665,11 @@ "\n" #: src/grep.c:1994 -#, c-format +#, fuzzy, c-format msgid "" "When FILE is '-', read standard input. With no FILE, read '.' if\n" "recursive, '-' otherwise. With fewer than two FILEs, assume -h.\n" -"Exit status is 0 if any line is selected, 1 otherwise;\n" +"Exit status is 0 if any line (or file if -L) is selected, 1 otherwise;\n" "if any error occurs and -q is not given, the exit status is 2.\n" msgstr "" "Jeżeli PLIK to „-”, czytane jest standardowe wejście. Jeżeli PLIK nie jest\n" @@ -695,65 +696,75 @@ msgid "invalid matcher %s" msgstr "błędna dopasowanie %s" -#: src/grep.c:2458 +#: src/grep.c:2459 #, c-format msgid "warning: GREP_OPTIONS is deprecated; please use an alias or script" msgstr "" "uwaga: zmienna GREP_OPTIONS nie będzie już używana, proszę użyć aliasu albo " "skryptu" -#: src/grep.c:2485 +#: src/grep.c:2486 msgid "unknown devices method" msgstr "nieznany sposób przeglądania urządzeń" -#: src/grep.c:2629 +#: src/grep.c:2630 msgid "invalid max count" msgstr "błędna maksymalna liczba powtórzeń" -#: src/grep.c:2687 +#: src/grep.c:2688 msgid "unknown binary-files type" msgstr "nieznany typ pliku binarnego" -#: src/pcresearch.c:80 +#: src/grep.c:2770 +#, fuzzy +msgid "" +"Written by Mike Haertel and others; see\n" +"." +msgstr "innych, zobacz: http://git.sv.gnu.org/cgit/grep.git/tree/AUTHORS" + +#: src/pcresearch.c:86 msgid "failed to allocate memory for the PCRE JIT stack" msgstr "nie udało się zaalokować pamięci dla stosu PCRE JIT" -#: src/pcresearch.c:97 +#: src/pcresearch.c:118 msgid "" "support for the -P option is not compiled into this --disable-perl-regexp " "binary" msgstr "" "program skompilowany bez opcji -P poprzez włączenie --disable-perl-regexp" -#: src/pcresearch.c:119 +#: src/pcresearch.c:140 msgid "-P supports only unibyte and UTF-8 locales" msgstr "-P działa tylko kodowaniem jednobajtowym albo UTF-8" -#: src/pcresearch.c:125 +#: src/pcresearch.c:146 msgid "the -P option only supports a single pattern" msgstr "opcja -P może być użyta tylko do pojedynczego wzorca" -#: src/pcresearch.c:167 +#: src/pcresearch.c:189 msgid "internal error (should never happen)" msgstr "błąd wewnętrzny (nigdy nie powinien się zdarzyć)" -#: src/pcresearch.c:192 +#: src/pcresearch.c:214 msgid "internal error" msgstr "błąd wewnętrzny" -#: src/pcresearch.c:215 +#: src/pcresearch.c:237 msgid "exceeded PCRE's line length limit" msgstr "przekroczony limit długości linii PCRE" -#: src/pcresearch.c:295 +#: src/pcresearch.c:317 msgid "exhausted PCRE JIT stack" msgstr "wyczerpany stos JIT PCRE" -#: src/pcresearch.c:299 +#: src/pcresearch.c:321 msgid "exceeded PCRE's backtracking limit" msgstr "przekroczony limit analizy wstecznej PCRE" -#: src/pcresearch.c:306 +#: src/pcresearch.c:328 #, c-format msgid "internal PCRE error: %d" msgstr "błąd wewnętrzny PCRE: %d" + +#~ msgid "Mike Haertel" +#~ msgstr "Mike'a Haertela" diff -Nru grep-3.1/po/POTFILES.in grep-3.3/po/POTFILES.in --- grep-3.1/po/POTFILES.in 2017-02-18 04:45:14.000000000 +0000 +++ grep-3.3/po/POTFILES.in 2018-04-21 23:35:48.000000000 +0000 @@ -1,6 +1,6 @@ # List of files which containing translatable strings. # -# Copyright 1997-1998, 2005-2017 Free Software Foundation, Inc. +# Copyright 1997-1998, 2005-2018 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 @@ -13,9 +13,10 @@ # 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 . +# along with this program. If not, see . lib/argmatch.c +lib/c-stack.c lib/closeout.c lib/dfa.c lib/error.c Binary files /tmp/tmppJ6Y2n/6jFha9hbxv/grep-3.1/po/pt_BR.gmo and /tmp/tmppJ6Y2n/tYMwNxGD36/grep-3.3/po/pt_BR.gmo differ diff -Nru grep-3.1/po/pt_BR.po grep-3.3/po/pt_BR.po --- grep-3.1/po/pt_BR.po 2017-07-02 20:21:16.000000000 +0000 +++ grep-3.3/po/pt_BR.po 2018-12-21 04:39:02.000000000 +0000 @@ -13,7 +13,7 @@ msgstr "" "Project-Id-Version: GNU grep-3.0.23-b00\n" "Report-Msgid-Bugs-To: bug-grep@gnu.org\n" -"POT-Creation-Date: 2017-07-02 13:21-0700\n" +"POT-Creation-Date: 2018-12-20 20:39-0800\n" "PO-Revision-Date: 2017-06-25 10:19-0300\n" "Last-Translator: Rodolfo Ribeiro Gomes \n" "Language-Team: Brazilian Portuguese +#. #. and use glyphs suitable for your language. #: lib/quotearg.c:362 msgid "`" @@ -235,16 +243,16 @@ msgid "Unmatched ) or \\)" msgstr ") ou \\) sem correspondente" -#: lib/regcomp.c:687 +#: lib/regcomp.c:688 msgid "No previous regular expression" msgstr "Nenhuma expressão regular anterior" -#: lib/version-etc.c:74 +#: lib/version-etc.c:73 #, c-format msgid "Packaged by %s (%s)\n" msgstr "Empacotado por %s (%s)\n" -#: lib/version-etc.c:77 +#: lib/version-etc.c:76 #, c-format msgid "Packaged by %s\n" msgstr "Empacotado por %s\n" @@ -252,14 +260,15 @@ #. TRANSLATORS: Translate "(C)" to the copyright symbol #. (C-in-a-circle), if this symbol is available in the user's #. locale. Otherwise, do not translate "(C)"; leave it as-is. -#: lib/version-etc.c:84 +#: lib/version-etc.c:83 msgid "(C)" msgstr "(C)" -#: lib/version-etc.c:86 +#: lib/version-etc.c:85 +#, fuzzy msgid "" "\n" -"License GPLv3+: GNU GPL version 3 or later .\n" "This is free software: you are free to change and redistribute it.\n" "There is NO WARRANTY, to the extent permitted by law.\n" @@ -404,12 +413,13 @@ msgstr "página de %s: <%s>\n" #: lib/version-etc.c:253 -#, c-format -msgid "%s home page: \n" +#, fuzzy, c-format +msgid "%s home page: \n" msgstr "página de %s: \n" #: lib/version-etc.c:256 -msgid "General help using GNU software: \n" +#, fuzzy +msgid "General help using GNU software: \n" msgstr "Ajuda geral sobre uso de software GNU: \n" #: lib/xstrtol-error.c:63 @@ -427,65 +437,57 @@ msgid "%s%s argument '%s' too large" msgstr "%s%s: argumento \"%s\" é grande demais" -#. This is a proper name. See the gettext manual, section Names. -#: src/grep.c:59 -msgid "Mike Haertel" -msgstr "Mike Haertel" - -#: src/grep.c:60 -msgid "others, see " -msgstr "outros, veja " - -#: src/grep.c:585 +#: src/grep.c:582 msgid "(standard input)" msgstr "(entrada padrão)" -#: src/grep.c:765 +#: src/grep.c:762 msgid "invalid context length argument" msgstr "argumento inválido para comprimento do contexto" -#: src/grep.c:828 +#: src/grep.c:827 msgid "input is too large to count" msgstr "entrada longa demais para contar" -#: src/grep.c:1579 +#: src/grep.c:1578 #, c-format msgid "Binary file %s matches\n" msgstr "Arquivo binário %s coincide com o padrão\n" -#: src/grep.c:1627 +#: src/grep.c:1626 #, c-format msgid "warning: %s: %s" msgstr "aviso: %s: %s" -#: src/grep.c:1628 +#: src/grep.c:1627 msgid "recursive directory loop" msgstr "recursão cíclica de diretório" -#: src/grep.c:1844 +#: src/grep.c:1843 #, c-format msgid "input file %s is also the output" msgstr "o arquivo de entrada %s é também o de saída" -#: src/grep.c:1907 src/grep.c:1914 -#, c-format -msgid "Usage: %s [OPTION]... PATTERN [FILE]...\n" +#: src/grep.c:1906 src/grep.c:1913 +#, fuzzy, c-format +msgid "Usage: %s [OPTION]... PATTERNS [FILE]...\n" msgstr "Uso: %s [OPÇÃO]... PADRÃO [ARQUIVO]...\n" -#: src/grep.c:1909 +#: src/grep.c:1908 #, c-format msgid "Try '%s --help' for more information.\n" msgstr "Experimente \"%s --help\" para mais informações.\n" -#: src/grep.c:1915 -#, c-format -msgid "Search for PATTERN in each FILE.\n" +#: src/grep.c:1914 +#, fuzzy, c-format +msgid "Search for PATTERNS in each FILE.\n" msgstr "Busca por PADRÃO em cada ARQUIVO.\n" -#: src/grep.c:1916 -#, c-format +#: src/grep.c:1915 +#, fuzzy, c-format msgid "" "Example: %s -i 'hello world' menu.h main.c\n" +"PATTERNS can contain multiple patterns separated by newlines.\n" "\n" "Pattern selection and interpretation:\n" msgstr "" @@ -494,12 +496,12 @@ "Seleção e interpretação de padrão:\n" #: src/grep.c:1920 -#, c-format +#, fuzzy, c-format msgid "" -" -E, --extended-regexp PATTERN is an extended regular expression\n" -" -F, --fixed-strings PATTERN is a set of newline-separated strings\n" -" -G, --basic-regexp PATTERN is a basic regular expression (default)\n" -" -P, --perl-regexp PATTERN is a Perl regular expression\n" +" -E, --extended-regexp PATTERNS are extended regular expressions\n" +" -F, --fixed-strings PATTERNS are strings\n" +" -G, --basic-regexp PATTERNS are basic regular expressions\n" +" -P, --perl-regexp PATTERNS are Perl regular expressions\n" msgstr "" " -E, --extended-regexp PADRÃO é uma expressão regular estendida\n" " -F, --fixed-strings PADRÃO são textos separados por nova linha\n" @@ -508,13 +510,13 @@ " -P, --perl-regexp PADRÃO é uma expressão regular de sintaxe Perl\n" #: src/grep.c:1926 -#, c-format +#, fuzzy, c-format msgid "" -" -e, --regexp=PATTERN use PATTERN for matching\n" -" -f, --file=FILE obtain PATTERN from FILE\n" +" -e, --regexp=PATTERNS use PATTERNS for matching\n" +" -f, --file=FILE take PATTERNS from FILE\n" " -i, --ignore-case ignore case distinctions\n" -" -w, --word-regexp force PATTERN to match only whole words\n" -" -x, --line-regexp force PATTERN to match only whole lines\n" +" -w, --word-regexp match only whole words\n" +" -x, --line-regexp match only whole lines\n" " -z, --null-data a data line ends in 0 byte, not newline\n" msgstr "" " -e, --regexp=PADRÃO usa PADRÃO como uma expressão regular\n" @@ -570,9 +572,9 @@ "padrão\n" #: src/grep.c:1951 -#, c-format +#, fuzzy, c-format msgid "" -" -o, --only-matching show only the part of a line matching PATTERN\n" +" -o, --only-matching show only nonempty parts of lines that match\n" " -q, --quiet, --silent suppress all normal output\n" " --binary-files=TYPE assume that binary files are TYPE;\n" " TYPE is 'binary', 'text', or 'without-match'\n" @@ -611,14 +613,13 @@ "simbólicas\n" #: src/grep.c:1967 -#, c-format +#, fuzzy, c-format msgid "" -" --include=FILE_PATTERN search only files that match FILE_PATTERN\n" -" --exclude=FILE_PATTERN skip files and directories matching " -"FILE_PATTERN\n" +" --include=GLOB search only files that match GLOB (a file " +"pattern)\n" +" --exclude=GLOB skip files and directories matching GLOB\n" " --exclude-from=FILE skip files matching any file pattern from FILE\n" -" --exclude-dir=PATTERN directories that match PATTERN will be " -"skipped.\n" +" --exclude-dir=GLOB skip directories that match GLOB\n" msgstr "" " --include=PADRÃO_ARQ busca apenas em arquivos que casam com " "PADRÃO_ARQ\n" @@ -686,11 +687,11 @@ "\n" #: src/grep.c:1994 -#, c-format +#, fuzzy, c-format msgid "" "When FILE is '-', read standard input. With no FILE, read '.' if\n" "recursive, '-' otherwise. With fewer than two FILEs, assume -h.\n" -"Exit status is 0 if any line is selected, 1 otherwise;\n" +"Exit status is 0 if any line (or file if -L) is selected, 1 otherwise;\n" "if any error occurs and -q is not given, the exit status is 2.\n" msgstr "" "Quando ARQUIVO é \"-\", lê da entrada padrão. Se ARQUIVO não é informado, lê " @@ -708,70 +709,80 @@ msgid "invalid matcher %s" msgstr "comparador inválido %s" -#: src/grep.c:2458 +#: src/grep.c:2459 #, c-format msgid "warning: GREP_OPTIONS is deprecated; please use an alias or script" msgstr "" "aviso: a variável de ambiente GREP_OPTIONS está obsoleta; use um alias ou " "script" -#: src/grep.c:2485 +#: src/grep.c:2486 msgid "unknown devices method" msgstr "método desconhecido de dispositivos" -#: src/grep.c:2629 +#: src/grep.c:2630 msgid "invalid max count" msgstr "valor máximo inválido" -#: src/grep.c:2687 +#: src/grep.c:2688 msgid "unknown binary-files type" msgstr "tipo de arquivo binário desconhecido" -#: src/pcresearch.c:80 +#: src/grep.c:2770 +#, fuzzy +msgid "" +"Written by Mike Haertel and others; see\n" +"." +msgstr "outros, veja " + +#: src/pcresearch.c:86 msgid "failed to allocate memory for the PCRE JIT stack" msgstr "falhou em alocar memória para a pilha de PCRE JIT" -#: src/pcresearch.c:97 +#: src/pcresearch.c:118 msgid "" "support for the -P option is not compiled into this --disable-perl-regexp " "binary" msgstr "" "o suporte à opção -P não foi compilado neste binário --disable-perl-regexp" -#: src/pcresearch.c:119 +#: src/pcresearch.c:140 msgid "-P supports only unibyte and UTF-8 locales" msgstr "" "-P só oferece suporte a localidades unibyte (um caractere por byte) e UTF-8" -#: src/pcresearch.c:125 +#: src/pcresearch.c:146 msgid "the -P option only supports a single pattern" msgstr "a opção -P só oferece suporte a apenas um único padrão" -#: src/pcresearch.c:167 +#: src/pcresearch.c:189 msgid "internal error (should never happen)" msgstr "erro interno (nunca deveria acontecer)" -#: src/pcresearch.c:192 +#: src/pcresearch.c:214 msgid "internal error" msgstr "erro interno" -#: src/pcresearch.c:215 +#: src/pcresearch.c:237 msgid "exceeded PCRE's line length limit" msgstr "atingiu o limite de comprimento de linha das PCRE" -#: src/pcresearch.c:295 +#: src/pcresearch.c:317 msgid "exhausted PCRE JIT stack" msgstr "pilha PCRE JIT estourada" -#: src/pcresearch.c:299 +#: src/pcresearch.c:321 msgid "exceeded PCRE's backtracking limit" msgstr "atingiu o limite de backtracking das PCRE" -#: src/pcresearch.c:306 +#: src/pcresearch.c:328 #, c-format msgid "internal PCRE error: %d" msgstr "erro interno de PCRE: %d" +#~ msgid "Mike Haertel" +#~ msgstr "Mike Haertel" + #~ msgid "%s: option '--%s' doesn't allow an argument\n" #~ msgstr "%s: a opção \"--%s\" não aceita argumentos\n" Binary files /tmp/tmppJ6Y2n/6jFha9hbxv/grep-3.1/po/pt.gmo and /tmp/tmppJ6Y2n/tYMwNxGD36/grep-3.3/po/pt.gmo differ diff -Nru grep-3.1/po/pt.po grep-3.3/po/pt.po --- grep-3.1/po/pt.po 2017-07-02 20:21:16.000000000 +0000 +++ grep-3.3/po/pt.po 2018-12-21 04:39:02.000000000 +0000 @@ -1,139 +1,143 @@ # Localization for Portuguese -# Copyright (C) 2003 Free Software Foundation, Inc. -# Rui Malheiro , 2003. +# Copyright (C) 2018 Free Software Foundation, Inc. +# This file is distributed under the same license as the grep package. +# Pedro Albuquerque , 2018. # msgid "" msgstr "" -"Project-Id-Version: grep 2.5g\n" +"Project-Id-Version: grep 3.1.48\n" "Report-Msgid-Bugs-To: bug-grep@gnu.org\n" -"POT-Creation-Date: 2017-07-02 13:21-0700\n" -"PO-Revision-Date: 2003-04-09 00:07+0100\n" -"Last-Translator: Rui Malheiro \n" +"POT-Creation-Date: 2018-12-20 20:39-0800\n" +"PO-Revision-Date: 2018-12-16 08:41+0000\n" +"Last-Translator: Pedro Albuquerque \n" "Language-Team: Portuguese \n" "Language: pt\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Bugs: Report translation errors to the Language-Team address.\n" -"X-Generator: KBabel 0.9.6\n" +"X-Generator: Gtranslator 2.91.7\n" +"Plural-Forms: nplurals=2; plural=n != 1;\\n\n" #: lib/argmatch.c:134 #, c-format msgid "invalid argument %s for %s" -msgstr "" +msgstr "argumento inválido %s para %s" #: lib/argmatch.c:135 #, c-format msgid "ambiguous argument %s for %s" -msgstr "" +msgstr "argumento ambíguo %s para %s" #: lib/argmatch.c:154 msgid "Valid arguments are:" -msgstr "" +msgstr "Os argumentos válidos são:" + +#: lib/c-stack.c:208 lib/c-stack.c:301 +msgid "program error" +msgstr "erro de programa" + +#: lib/c-stack.c:209 lib/c-stack.c:302 +msgid "stack overflow" +msgstr "transporte da pilha" -#: lib/closeout.c:122 src/grep.c:1274 +#: lib/closeout.c:122 src/grep.c:1273 msgid "write error" -msgstr "" +msgstr "erro de escrita" -#: lib/dfa.c:958 -#, fuzzy +#: lib/dfa.c:970 msgid "unbalanced [" -msgstr "[ sem correspondência" +msgstr "[ sem par" -#: lib/dfa.c:1079 +#: lib/dfa.c:1091 msgid "invalid character class" -msgstr "" +msgstr "classe de carácter inválida" -#: lib/dfa.c:1205 +#: lib/dfa.c:1217 msgid "character class syntax is [[:space:]], not [:space:]" -msgstr "" +msgstr "a sintaxe da classe de carácter é [[:espaço:]], não [:espaço:]" -#: lib/dfa.c:1272 -#, fuzzy +#: lib/dfa.c:1284 msgid "unfinished \\ escape" -msgstr "\\ não terminado" +msgstr "não terminado\\escape" -#: lib/dfa.c:1433 -#, fuzzy +#: lib/dfa.c:1445 msgid "invalid content of \\{\\}" -msgstr "número máximo inválido" +msgstr "Conteúdo inválido de \\{\\}" -#: lib/dfa.c:1436 +#: lib/dfa.c:1448 msgid "regular expression too big" -msgstr "" +msgstr "expressão regular muito grande" -#: lib/dfa.c:1850 -#, fuzzy +#: lib/dfa.c:1863 msgid "unbalanced (" -msgstr "( sem correspondência" +msgstr "( sem par" -#: lib/dfa.c:1968 -#, fuzzy +#: lib/dfa.c:1981 msgid "no syntax specified" msgstr "Sintaxe não especificada" -#: lib/dfa.c:1976 -#, fuzzy +#: lib/dfa.c:1992 msgid "unbalanced )" -msgstr ") sem correspondência" +msgstr ") sem par" #: lib/error.c:195 msgid "Unknown system error" -msgstr "Erro de sistema indeterminado" +msgstr "Erro de sistema desconhecido" #: lib/getopt.c:278 -#, fuzzy, c-format +#, c-format msgid "%s: option '%s%s' is ambiguous\n" -msgstr "%s: a opção `%s' é ambígua\n" +msgstr "%s: a opção \"%s%s\" é ambígua\n" #: lib/getopt.c:284 -#, fuzzy, c-format +#, c-format msgid "%s: option '%s%s' is ambiguous; possibilities:" -msgstr "%s: a opção `%s' é ambígua\n" +msgstr "%s: a opção \"%s%s\" é ambígua; possibilidades:" #: lib/getopt.c:319 -#, fuzzy, c-format +#, c-format msgid "%s: unrecognized option '%s%s'\n" -msgstr "%s: opção `%c%s' desconhecida\n" +msgstr "%s: opção \"%s%s\" desconhecida\n" #: lib/getopt.c:345 -#, fuzzy, c-format +#, c-format msgid "%s: option '%s%s' doesn't allow an argument\n" -msgstr "%s: a opção `%c%s' não aceita um argumento\n" +msgstr "%s: a opção \"%s%s\" não permite um argumento\n" #: lib/getopt.c:360 -#, fuzzy, c-format +#, c-format msgid "%s: option '%s%s' requires an argument\n" -msgstr "\"%s: a opção `%s' exige um argumento\n" +msgstr "\"%s: a opção \"%s%s\" requer um argumento\n" #: lib/getopt.c:621 -#, fuzzy, c-format +#, c-format msgid "%s: invalid option -- '%c'\n" -msgstr "%s: opção inválida -- %c\n" +msgstr "%s: opção inválida -- \"%c\"\n" #: lib/getopt.c:636 lib/getopt.c:682 -#, fuzzy, c-format +#, c-format msgid "%s: option requires an argument -- '%c'\n" -msgstr "%s: a opção exige um argumento -- %c\n" +msgstr "%s: a opção requer um argumento -- \"%c\"\n" -#: lib/obstack.c:338 lib/obstack.c:340 lib/xalloc-die.c:34 src/pcresearch.c:291 +#: lib/obstack.c:338 lib/obstack.c:340 lib/xalloc-die.c:34 src/pcresearch.c:313 msgid "memory exhausted" msgstr "memória esgotada" #: lib/openat-die.c:38 #, c-format msgid "unable to record current working directory" -msgstr "" +msgstr "impossível gravar a pasta de trabalho actual" #: lib/openat-die.c:57 #, c-format msgid "failed to return to initial working directory" -msgstr "" +msgstr "falha ao voltar à pasta de trabalho inicial" #: lib/xbinary-io.c:37 #, c-format msgid "failed to set file descriptor text/binary mode" -msgstr "" +msgstr "falha ao definir modo texto/binário do descritor de ficheiro" #. TRANSLATORS: #. Get translations for open and closing quotation marks. @@ -154,63 +158,63 @@ #. for your locale. #. #. If you don't know what to put here, please see -#. +#. #. and use glyphs suitable for your language. #: lib/quotearg.c:362 msgid "`" -msgstr "`" +msgstr "\"" #: lib/quotearg.c:363 msgid "'" -msgstr "'" +msgstr "\"" #: lib/regcomp.c:135 msgid "Success" -msgstr "" +msgstr "Sucesso" #: lib/regcomp.c:138 msgid "No match" -msgstr "" +msgstr "Sem par" #: lib/regcomp.c:141 msgid "Invalid regular expression" -msgstr "" +msgstr "Expressão regular inválida" #: lib/regcomp.c:144 msgid "Invalid collation character" -msgstr "" +msgstr "Carácter de agrupamento inválido" #: lib/regcomp.c:147 msgid "Invalid character class name" -msgstr "" +msgstr "Nome de classe de carácter inválido" #: lib/regcomp.c:150 msgid "Trailing backslash" -msgstr "" +msgstr "Barra invertida final" #: lib/regcomp.c:153 msgid "Invalid back reference" -msgstr "" +msgstr "Referência de retorno inválida" #: lib/regcomp.c:156 msgid "Unmatched [, [^, [:, [., or [=" -msgstr "" +msgstr "[, [^, [:, [., ou [= sem par" #: lib/regcomp.c:159 msgid "Unmatched ( or \\(" -msgstr "" +msgstr "( ou \\( sem par" #: lib/regcomp.c:162 msgid "Unmatched \\{" -msgstr "" +msgstr "\\{ sem par" #: lib/regcomp.c:165 msgid "Invalid content of \\{\\}" -msgstr "" +msgstr "Conteúdo inválido de \\{\\}" #: lib/regcomp.c:168 msgid "Invalid range end" -msgstr "" +msgstr "Final de intervalo inválido" #: lib/regcomp.c:171 msgid "Memory exhausted" @@ -218,68 +222,74 @@ #: lib/regcomp.c:174 msgid "Invalid preceding regular expression" -msgstr "" +msgstr "Expressão regular precedente inválida" #: lib/regcomp.c:177 msgid "Premature end of regular expression" -msgstr "" +msgstr "Fim prematuro de expressão regular" #: lib/regcomp.c:180 msgid "Regular expression too big" -msgstr "" +msgstr "Expressão regular muito grande" #: lib/regcomp.c:183 msgid "Unmatched ) or \\)" -msgstr "" +msgstr ") ou \\) sem par" -#: lib/regcomp.c:687 +#: lib/regcomp.c:688 msgid "No previous regular expression" -msgstr "" +msgstr "Sem expressão regular prévia" -#: lib/version-etc.c:74 +#: lib/version-etc.c:73 #, c-format msgid "Packaged by %s (%s)\n" -msgstr "" +msgstr "Empacotado por %s (%s)\n" -#: lib/version-etc.c:77 +#: lib/version-etc.c:76 #, c-format msgid "Packaged by %s\n" -msgstr "" +msgstr "Empacotado por %s\n" #. TRANSLATORS: Translate "(C)" to the copyright symbol #. (C-in-a-circle), if this symbol is available in the user's #. locale. Otherwise, do not translate "(C)"; leave it as-is. -#: lib/version-etc.c:84 +#: lib/version-etc.c:83 msgid "(C)" -msgstr "" +msgstr "(©)" -#: lib/version-etc.c:86 +#: lib/version-etc.c:85 msgid "" "\n" -"License GPLv3+: GNU GPL version 3 or later .\n" "This is free software: you are free to change and redistribute it.\n" "There is NO WARRANTY, to the extent permitted by law.\n" "\n" msgstr "" +"\n" +"Licença GPLv3+: GNU GPL versão 3 ou posterior \n" +"Este é um programa grátis: pode alterá-lo e redistribuí-lo.\n" +"Não há QUALQUER GARANTIA, até ao limite da Lei.\n" +"\n" #. TRANSLATORS: %s denotes an author name. #: lib/version-etc.c:102 #, c-format msgid "Written by %s.\n" -msgstr "" +msgstr "Escrito por %s\n" #. TRANSLATORS: Each %s denotes an author name. #: lib/version-etc.c:106 #, c-format msgid "Written by %s and %s.\n" -msgstr "" +msgstr "Escrito por %s e %s.\n" #. TRANSLATORS: Each %s denotes an author name. #: lib/version-etc.c:110 #, c-format msgid "Written by %s, %s, and %s.\n" -msgstr "" +msgstr "Escrito por %s, %s e %s.\n" #. TRANSLATORS: Each %s denotes an author name. #. You can use line breaks, estimating that each author name occupies @@ -290,6 +300,8 @@ "Written by %s, %s, %s,\n" "and %s.\n" msgstr "" +"Escrito por %s, %s, %s\n" +"e %s.\n" #. TRANSLATORS: Each %s denotes an author name. #. You can use line breaks, estimating that each author name occupies @@ -300,6 +312,8 @@ "Written by %s, %s, %s,\n" "%s, and %s.\n" msgstr "" +"Escrito por %s, %s, %s,\n" +"%s e %s.\n" #. TRANSLATORS: Each %s denotes an author name. #. You can use line breaks, estimating that each author name occupies @@ -310,6 +324,8 @@ "Written by %s, %s, %s,\n" "%s, %s, and %s.\n" msgstr "" +"Escrito por %s, %s, %s,\n" +"%s, %s e %s.\n" #. TRANSLATORS: Each %s denotes an author name. #. You can use line breaks, estimating that each author name occupies @@ -320,6 +336,8 @@ "Written by %s, %s, %s,\n" "%s, %s, %s, and %s.\n" msgstr "" +"Escrito por %s, %s, %s,\n" +"%s, %s, %s e %s.\n" #. TRANSLATORS: Each %s denotes an author name. #. You can use line breaks, estimating that each author name occupies @@ -331,6 +349,9 @@ "%s, %s, %s, %s,\n" "and %s.\n" msgstr "" +"Escrito por %s, %s, %s,\n" +"%s, %s, %s, %s\n" +"e %s.\n" #. TRANSLATORS: Each %s denotes an author name. #. You can use line breaks, estimating that each author name occupies @@ -342,6 +363,9 @@ "%s, %s, %s, %s,\n" "%s, and %s.\n" msgstr "" +"Escrito por %s, %s, %s,\n" +"%s, %s, %s, %s,\n" +"%s e %s.\n" #. TRANSLATORS: Each %s denotes an author name. #. You can use line breaks, estimating that each author name occupies @@ -353,6 +377,9 @@ "%s, %s, %s, %s,\n" "%s, %s, and others.\n" msgstr "" +"Escrito por %s, %s, %s,\n" +"%s, %s, %s, %s,\n" +"%s, %s e outros.\n" #. TRANSLATORS: The placeholder indicates the bug-reporting address #. for this package. Please add _another line_ saying @@ -364,145 +391,136 @@ "\n" "Report bugs to: %s\n" msgstr "" +"\n" +"Reportar erros a: %s\n" #: lib/version-etc.c:247 #, c-format msgid "Report %s bugs to: %s\n" -msgstr "" +msgstr "Reportar %s erros a: %s\n" #: lib/version-etc.c:251 #, c-format msgid "%s home page: <%s>\n" -msgstr "" +msgstr "Página inicial %s: <%s>\n" #: lib/version-etc.c:253 #, c-format -msgid "%s home page: \n" -msgstr "" +msgid "%s home page: \n" +msgstr "Página inicial %s: \n" #: lib/version-etc.c:256 -msgid "General help using GNU software: \n" +msgid "General help using GNU software: \n" msgstr "" +"Ajuda geral para uso de programas GNU: \n" #: lib/xstrtol-error.c:63 #, c-format msgid "invalid %s%s argument '%s'" -msgstr "" +msgstr "Argumento \"%s\" de %s%s inválido" #: lib/xstrtol-error.c:68 #, c-format msgid "invalid suffix in %s%s argument '%s'" -msgstr "" +msgstr "sufixo inválido no argumento \"%s\" de %s%s" #: lib/xstrtol-error.c:72 #, c-format msgid "%s%s argument '%s' too large" -msgstr "" - -#. This is a proper name. See the gettext manual, section Names. -#: src/grep.c:59 -msgid "Mike Haertel" -msgstr "" +msgstr "argumento \"%s\" de %s%s muito grande" -#: src/grep.c:60 -msgid "others, see " -msgstr "" - -#: src/grep.c:585 +#: src/grep.c:582 msgid "(standard input)" -msgstr "(standard input)" +msgstr "(entrada padrão)" -#: src/grep.c:765 +#: src/grep.c:762 msgid "invalid context length argument" -msgstr "número de linhas de contexto inválido" +msgstr "argumento de tamanho de contexto inválido" -#: src/grep.c:828 +#: src/grep.c:827 msgid "input is too large to count" -msgstr "ficheiro demasiado grande para manter contagem" +msgstr "entrada muito grande para contar" -#: src/grep.c:1579 +#: src/grep.c:1578 #, c-format msgid "Binary file %s matches\n" -msgstr "Padrão encontrado no ficheiro binário %s\n" +msgstr "ficheiro binário %s coincide\n" -#: src/grep.c:1627 -#, fuzzy, c-format +#: src/grep.c:1626 +#, c-format msgid "warning: %s: %s" -msgstr "aviso: %s: %s\n" +msgstr "aviso: %s: %s" -#: src/grep.c:1628 +#: src/grep.c:1627 msgid "recursive directory loop" -msgstr "directoria em ciclo recursivo" +msgstr "ciclo de pasta recursivo" -#: src/grep.c:1844 +#: src/grep.c:1843 #, c-format msgid "input file %s is also the output" -msgstr "" +msgstr "ficheiro de entrada %s também é saída" -#: src/grep.c:1907 src/grep.c:1914 +#: src/grep.c:1906 src/grep.c:1913 #, c-format -msgid "Usage: %s [OPTION]... PATTERN [FILE]...\n" -msgstr "Utilização: %s [OPÇÃO]... PADRÃO [FICHEIRO]...\n" +msgid "Usage: %s [OPTION]... PATTERNS [FILE]...\n" +msgstr "Uso: %s [OPÇÃO]... PADRÕES [FICHEIRO]...\n" -#: src/grep.c:1909 -#, fuzzy, c-format +#: src/grep.c:1908 +#, c-format msgid "Try '%s --help' for more information.\n" -msgstr "Experimente `%s --help' para mais informação.\n" +msgstr "Tente \"%s --help\" para mais informação.\n" -#: src/grep.c:1915 +#: src/grep.c:1914 #, c-format -msgid "Search for PATTERN in each FILE.\n" -msgstr "" +msgid "Search for PATTERNS in each FILE.\n" +msgstr "Procurar por PADRÕES em cada FICHEIRO\n" -#: src/grep.c:1916 -#, fuzzy, c-format +#: src/grep.c:1915 +#, c-format msgid "" "Example: %s -i 'hello world' menu.h main.c\n" +"PATTERNS can contain multiple patterns separated by newlines.\n" "\n" "Pattern selection and interpretation:\n" msgstr "" -"Procurar por PADRÃO em cada FICHEIRO ou no standard input.\n" -"Exemplo: %s -i 'olá mundo' menu.h main.c\n" +"Exemplo: %s -i 'hello world' menu.h main.c\n" +"PADRÕES pode conter múltiplos padrões separados por newline.\n" "\n" -"Selecção e interpretação de regexp\n" +"Selecção e interpretação de padrão:\n" #: src/grep.c:1920 -#, fuzzy, c-format +#, c-format msgid "" -" -E, --extended-regexp PATTERN is an extended regular expression\n" -" -F, --fixed-strings PATTERN is a set of newline-separated strings\n" -" -G, --basic-regexp PATTERN is a basic regular expression (default)\n" -" -P, --perl-regexp PATTERN is a Perl regular expression\n" -msgstr "" -" -E, --extended-regexp PADRÃO é uma expressão regular extendida\n" -" -F, --fixed-strings PADRÃO é um conjunto de frases separadas por " -"newline\n" -" -G, --basic-regexp PADRÃO é uma expressão regular básica\n" -" -P, --perl-regexp PADRÃO é uma expressão regular de Perl\n" +" -E, --extended-regexp PATTERNS are extended regular expressions\n" +" -F, --fixed-strings PATTERNS are strings\n" +" -G, --basic-regexp PATTERNS are basic regular expressions\n" +" -P, --perl-regexp PATTERNS are Perl regular expressions\n" +msgstr "" +" -E, --extended-regexp PADRÕES são expressões regulares estendidas\n" +" -F, --fixed-strings PADRÕES são cadeias\n" +" -G, --basic-regexp PADRÕES são expressões regulares básicas\n" +" -P, --perl-regexp PADRÕES são expressões regulares Perl\n" #: src/grep.c:1926 -#, fuzzy, c-format +#, c-format msgid "" -" -e, --regexp=PATTERN use PATTERN for matching\n" -" -f, --file=FILE obtain PATTERN from FILE\n" +" -e, --regexp=PATTERNS use PATTERNS for matching\n" +" -f, --file=FILE take PATTERNS from FILE\n" " -i, --ignore-case ignore case distinctions\n" -" -w, --word-regexp force PATTERN to match only whole words\n" -" -x, --line-regexp force PATTERN to match only whole lines\n" +" -w, --word-regexp match only whole words\n" +" -x, --line-regexp match only whole lines\n" " -z, --null-data a data line ends in 0 byte, not newline\n" msgstr "" -" -e, --regexp=PADRÃO usar PADRÃO como uma expressão regular\n" -" -f, --file=FICHEIRO ler PADRÃO do FICHEIRO\n" -" -i, --ignore-case ignorar diferenças entre maiúsculas e " -"minúsculas\n" -" -w, --word-regexp forçar PADRÃO a igualar apenas a palavras " -"completas\n" -" -x, --line-regexp forçar PADRÃO a igualar apenas a linhas " -"completas\n" -" -z, --null-data uma linha é terminada com o byte 0, não com " +" -e, --regexp=PADRÕES usa PADRÕES para comparação\n" +" -f, --file=FICHEIRO lê PADRÕES do FICHEIRO\n" +" -i, --ignore-case ignora diferenças entre maiúsculas e minúsculas\n" +" -w, --word-regexp compara só palavras completas\n" +" -x, --line-regexp compara só linhas completas\n" +" -z, --null-data uma linha de dados termina com o byte 0, não com " "newline\n" #: src/grep.c:1933 -#, fuzzy, c-format +#, c-format msgid "" "\n" "Miscellaneous:\n" @@ -512,12 +530,11 @@ " --help display this help text and exit\n" msgstr "" "\n" -"Miscellaneous:\\n\"\n" +"Diversos:\\n\"\n" " -s, --no-messages suprime mensagens de erro\n" -" -v, --invert-match seleciona linhas que não contenham PADRÃO\n" -" -V, --version apresenta informação de versão e termina\n" -" --help apresenta este texto de auxílio e termina\n" -" --mmap utilizar 'memory-mapped input' se possível\n" +" -v, --invert-match selecciona linhas que não contenham PADRÃO\n" +" -V, --version mostra informação de versão e sai\n" +" --help mostra esta mensagem e sai\n" #: src/grep.c:1940 #, c-format @@ -533,16 +550,34 @@ " --label=LABEL use LABEL as the standard input file name " "prefix\n" msgstr "" +"\n" +"Controlo de saída:\n" +" -m, --max-count=NUM pára após NUM linhas seleccionadas\n" +" -b, --byte-offset imprime o desvio de byte com as linhas de saída\n" +" -n, --line-number imprime o nº de linha com as linhas de saída\n" +" --line-buffered limpa a saída em cada linha\n" +" -H, --with-filename imprime o nome de ficheiro com as linhas de " +"saída\n" +" -h, --no-filename suprime o prefixo do nome de ficheiro na saída\n" +" --label=RÓTULO usa RÓTULO como prefixo de nome de ficheiro de " +"entrada padrão\n" #: src/grep.c:1951 #, c-format msgid "" -" -o, --only-matching show only the part of a line matching PATTERN\n" +" -o, --only-matching show only nonempty parts of lines that match\n" " -q, --quiet, --silent suppress all normal output\n" " --binary-files=TYPE assume that binary files are TYPE;\n" " TYPE is 'binary', 'text', or 'without-match'\n" " -a, --text equivalent to --binary-files=text\n" msgstr "" +" -o, --only-matching mostra só partes não-vazias de linhas que " +"coincidem\n" +" -q, --quiet, --silent suprime toda a saída normal\n" +" --binary-files=TYPE assume que ficheiros binários são TIPO;\n" +" TIPO é \"binary\", \"text\" ou \"without-match" +"\"\n" +" -a, --text equivalente a --binary-files=text\n" #: src/grep.c:1958 #, c-format @@ -555,17 +590,29 @@ " -r, --recursive like --directories=recurse\n" " -R, --dereference-recursive likewise, but follow all symlinks\n" msgstr "" +" -I equivalente a --binary-files=without-match\n" +" -d, --directories=ACÇÃO COMO GERIR PASTAS;\n" +" ACÇÃO é 'read', 'recurse' ou 'skip'\n" +" -D, --devices=ACÇÃO COMO GERIR DISPOSITIVOS, FIFOs e sockets;\n" +" ACÇÃO é 'read' ou 'skip'\n" +" -r, --recursive como --directories=recurse\n" +" -R, --dereference-recursive igual, mas segue todas as symlinks\n" #: src/grep.c:1967 #, c-format msgid "" -" --include=FILE_PATTERN search only files that match FILE_PATTERN\n" -" --exclude=FILE_PATTERN skip files and directories matching " -"FILE_PATTERN\n" +" --include=GLOB search only files that match GLOB (a file " +"pattern)\n" +" --exclude=GLOB skip files and directories matching GLOB\n" " --exclude-from=FILE skip files matching any file pattern from FILE\n" -" --exclude-dir=PATTERN directories that match PATTERN will be " -"skipped.\n" +" --exclude-dir=GLOB skip directories that match GLOB\n" msgstr "" +" --include=GLOB procura só em ficheiros que contêm GLOB (um " +"padrão de ficheiro)\n" +" --exclude=GLOB salta ficheiros e pastas que contêm GLOB\n" +" --exclude-from=FICHEIRO salta ficheiros que contêm qualquer padrão " +"de FICHEIRO\n" +" --exclude-dir=PADRÃO salta pastas que contêm GLOB\n" #: src/grep.c:1974 #, c-format @@ -577,6 +624,14 @@ " -T, --initial-tab make tabs line up (if needed)\n" " -Z, --null print 0 byte after FILE name\n" msgstr "" +" -L, --files-without-match imprime só nomes de FICHEIROs sem linhas " +"seleccionadas\n" +" -l, --files-with-matches imprime só nomes de FICHEIROs com linhas " +"seleccionadas\n" +" -c, --count imprime só um nº de linhas seleccionadas por " +"FICHEIRO\n" +" -T, --initial-tab alinha tabulações (se necessário)\n" +" -Z, --null imprime byte 0 após o nome de FICHEIRO\n" #: src/grep.c:1980 #, c-format @@ -587,9 +642,14 @@ " -A, --after-context=NUM print NUM lines of trailing context\n" " -C, --context=NUM print NUM lines of output context\n" msgstr "" +"\n" +"Context control:\n" +" -B, --before-context=NUM imprime NUM linhas de contexto inicial\n" +" -A, --after-context=NUM imprime NUM linhas de contexto final\n" +" -C, --context=NUM imprime NUM linhas de contexto de saída\n" #: src/grep.c:1987 -#, fuzzy, c-format +#, c-format msgid "" " -NUM same as --context=NUM\n" " --color[=WHEN],\n" @@ -599,126 +659,109 @@ "Windows)\n" "\n" msgstr "" -"\n" -"Controlo de contexto:\n" -" -B, --before-context=NUM apresenta NUM linhas de contexto anteriores a " -"PADRÃO\n" -" -A, --after-context=NUM apresenta NUM linhas de contexto a seguir a " -"PADRÃO\n" -" -C, --context=NUM apresenta NUM linhas de contexto no resultado\n" -" -NUM equivalente a --context=NUM\n" +" -NUM igual a --context=NUM\n" " --color[=QUANDO],\n" -" --colour[=QUANDO] utiliza marcadores para distinguir as partes " -"que\n" -" satisfazem o PADRÃO\n" -" QUANDO pode ser `always', `never' ou `auto'\n" -" -U, --binary não remover caracteres CR em EOL (MSDOS)\n" -" -u, --unix-byte-offsets reportar «offsets» como se não houvesse CRs " -"(MSDOS)\n" -"\n" -"`egrep' é equivalente a `grep -E'. `fgrep' é equivalente a `grep -F'\n" -"Sem FICHEIRO ou quando FICHEIRO é -, ler o «standard input». Se forem dados\n" -"dois FICHEIROS, assume -h. Devolve 0 se encontrar pelo menos uma occorência\n" -"de PADRÃO, 1 se não encontrar, 2 se tiver algum problema.\n" +" --colour[=QUANDO] usa marcadores para realçar as cadeias " +"coincidentes;\n" +" QUANDO é \"always\", \"never\" ou \"auto\"\n" +" -U, --binary não elimina caracteres CR em EOL (MSDOS/" +"Windows)\n" +"\n" #: src/grep.c:1994 #, c-format msgid "" "When FILE is '-', read standard input. With no FILE, read '.' if\n" "recursive, '-' otherwise. With fewer than two FILEs, assume -h.\n" -"Exit status is 0 if any line is selected, 1 otherwise;\n" +"Exit status is 0 if any line (or file if -L) is selected, 1 otherwise;\n" "if any error occurs and -q is not given, the exit status is 2.\n" msgstr "" +"Quando FICHEIRO é '-', lê a entrada padrão. Sem FICHEIRO, lê '.' se\n" +"recursivo, senão lê '-'. Com menos de dois FICHEIROs, assume -h.\n" +"O estado da saída é 0 se qualquer linha (ou ficheiro se -L) for " +"seleccionada,\n" +"senão é 1; se ocorrer um erro e -q não for dado, o estado da saída é 2.\n" #: src/grep.c:2034 msgid "conflicting matchers specified" -msgstr "foram especificados métodos de pesquisa incompatíveis" +msgstr "especificou comparadores em conflito" #: src/grep.c:2038 -#, fuzzy, c-format +#, c-format msgid "invalid matcher %s" -msgstr "número máximo inválido" +msgstr "comparador %s inválido" -#: src/grep.c:2458 +#: src/grep.c:2459 #, c-format msgid "warning: GREP_OPTIONS is deprecated; please use an alias or script" -msgstr "" +msgstr "aviso: GREP_OPTIONS é obsoleto; por favor, use um aliás ou um script" -#: src/grep.c:2485 +#: src/grep.c:2486 msgid "unknown devices method" -msgstr "método para acesso a «devices» desconhecido" +msgstr "método dispositivos desconhecidos" -#: src/grep.c:2629 +#: src/grep.c:2630 msgid "invalid max count" msgstr "número máximo inválido" -#: src/grep.c:2687 +#: src/grep.c:2688 msgid "unknown binary-files type" msgstr "tipo de ficheiro binário desconhecido" -#: src/pcresearch.c:80 +#: src/grep.c:2770 +#, fuzzy +msgid "" +"Written by Mike Haertel and others; see\n" +"." +msgstr "outros, veja " + +#: src/pcresearch.c:86 msgid "failed to allocate memory for the PCRE JIT stack" -msgstr "" +msgstr "falha ao alocar memória para a pilha PCRE JIT" -#: src/pcresearch.c:97 +#: src/pcresearch.c:118 msgid "" "support for the -P option is not compiled into this --disable-perl-regexp " "binary" msgstr "" +"o suporte para a opção -P não foi compilado neste binário --disable-perl-" +"regexp" -#: src/pcresearch.c:119 +#: src/pcresearch.c:140 msgid "-P supports only unibyte and UTF-8 locales" -msgstr "" +msgstr "-P só suporta idiomas unibyte e UTF-8" -#: src/pcresearch.c:125 -#, fuzzy +#: src/pcresearch.c:146 msgid "the -P option only supports a single pattern" -msgstr "A opção -P não é suportada" +msgstr "a opção -P só suporta um padrão" -#: src/pcresearch.c:167 +#: src/pcresearch.c:189 msgid "internal error (should never happen)" -msgstr "" +msgstr "erro interno (nunca devia acontecer)" -#: src/pcresearch.c:192 +#: src/pcresearch.c:214 msgid "internal error" -msgstr "" +msgstr "erro interno" -#: src/pcresearch.c:215 +#: src/pcresearch.c:237 msgid "exceeded PCRE's line length limit" -msgstr "" +msgstr "excedido o limite de tamanho da linha de PCRE" -#: src/pcresearch.c:295 +#: src/pcresearch.c:317 msgid "exhausted PCRE JIT stack" -msgstr "" +msgstr "Pilha PCRE JIT esgotada" -#: src/pcresearch.c:299 +#: src/pcresearch.c:321 msgid "exceeded PCRE's backtracking limit" -msgstr "" +msgstr "excedido o limite de retrocesso de PCRE" -#: src/pcresearch.c:306 +#: src/pcresearch.c:328 #, c-format msgid "internal PCRE error: %d" -msgstr "" - -#, fuzzy -#~ msgid "%s: option '--%s' doesn't allow an argument\n" -#~ msgstr "%s: a opção `%s' não aceita um argumento\n" - -#, fuzzy -#~ msgid "%s: unrecognized option '--%s'\n" -#~ msgstr "%s: opção `--%s' desconhecida\n" - -#, fuzzy -#~ msgid "%s: option '-W %s' is ambiguous\n" -#~ msgstr "%s: a opção `-W %s' é ambígua\n" - -#, fuzzy -#~ msgid "%s: option '-W %s' doesn't allow an argument\n" -#~ msgstr "%s: a opção `-W %s' não aceita um argumento\n" +msgstr "erro interno de PCRE: %d" -#, fuzzy -#~ msgid "%s: option '-W %s' requires an argument\n" -#~ msgstr "\"%s: a opção `%s' exige um argumento\n" +#~ msgid "Mike Haertel" +#~ msgstr "Mike Haertel" #~ msgid "unfinished repeat count" #~ msgstr "contador de repetição não terminado" @@ -810,6 +853,51 @@ #~ msgid "" #~ "\n" +#~ "Context control:\n" +#~ " -B, --before-context=NUM print NUM lines of leading context\n" +#~ " -A, --after-context=NUM print NUM lines of trailing context\n" +#~ " -C, --context=NUM print NUM lines of output context\n" +#~ " -NUM same as --context=NUM\n" +#~ " --color[=WHEN],\n" +#~ " --colour[=WHEN] use markers to distinguish the matching " +#~ "string\n" +#~ " WHEN may be `always', `never' or `auto'.\n" +#~ " -U, --binary do not strip CR characters at EOL (MSDOS)\n" +#~ " -u, --unix-byte-offsets report offsets as if CRs were not there " +#~ "(MSDOS)\n" +#~ "\n" +#~ "`egrep' means `grep -E'. `fgrep' means `grep -F'.\n" +#~ "With no FILE, or when FILE is -, read standard input. If less than\n" +#~ "two FILEs given, assume -h. Exit status is 0 if match, 1 if no match,\n" +#~ "and 2 if trouble.\n" +#~ msgstr "" +#~ "\n" +#~ "Controlo de contexto:\n" +#~ " -B, --before-context=NUM apresenta NUM linhas de contexto anteriores a " +#~ "PADRÃO\n" +#~ " -A, --after-context=NUM apresenta NUM linhas de contexto a seguir a " +#~ "PADRÃO\n" +#~ " -C, --context=NUM apresenta NUM linhas de contexto no " +#~ "resultado\n" +#~ " -NUM equivalente a --context=NUM\n" +#~ " --color[=QUANDO],\n" +#~ " --colour[=QUANDO] utiliza marcadores para distinguir as partes " +#~ "que\n" +#~ " satisfazem o PADRÃO\n" +#~ " QUANDO pode ser `always', `never' ou `auto'\n" +#~ " -U, --binary não remover caracteres CR em EOL (MSDOS)\n" +#~ " -u, --unix-byte-offsets reportar «offsets» como se não houvesse CRs " +#~ "(MSDOS)\n" +#~ "\n" +#~ "`egrep' é equivalente a `grep -E'. `fgrep' é equivalente a `grep -F'\n" +#~ "Sem FICHEIRO ou quando FICHEIRO é -, ler o «standard input». Se forem " +#~ "dados\n" +#~ "dois FICHEIROS, assume -h. Devolve 0 se encontrar pelo menos uma " +#~ "occorência\n" +#~ "de PADRÃO, 1 se não encontrar, 2 se tiver algum problema.\n" + +#~ msgid "" +#~ "\n" #~ "Report bugs to .\n" #~ msgstr "" #~ "\n" @@ -842,5 +930,17 @@ #~ msgid "The -P and -z options cannot be combined" #~ msgstr "A opção -P e -z não podem ser combinadas" +#~ msgid "%s: option `--%s' doesn't allow an argument\n" +#~ msgstr "%s: a opção `%s' não aceita um argumento\n" + +#~ msgid "%s: unrecognized option `--%s'\n" +#~ msgstr "%s: opção `--%s' desconhecida\n" + #~ msgid "%s: illegal option -- %c\n" #~ msgstr "%s: opção ilegal -- %c\n" + +#~ msgid "%s: option `-W %s' is ambiguous\n" +#~ msgstr "%s: a opção `-W %s' é ambígua\n" + +#~ msgid "%s: option `-W %s' doesn't allow an argument\n" +#~ msgstr "%s: a opção `-W %s' não aceita um argumento\n" Binary files /tmp/tmppJ6Y2n/6jFha9hbxv/grep-3.1/po/ro.gmo and /tmp/tmppJ6Y2n/tYMwNxGD36/grep-3.3/po/ro.gmo differ diff -Nru grep-3.1/po/ro.po grep-3.3/po/ro.po --- grep-3.1/po/ro.po 2017-07-02 20:21:16.000000000 +0000 +++ grep-3.3/po/ro.po 2018-12-21 04:39:02.000000000 +0000 @@ -6,7 +6,7 @@ msgstr "" "Project-Id-Version: grep-2.5g.ro\n" "Report-Msgid-Bugs-To: bug-grep@gnu.org\n" -"POT-Creation-Date: 2017-07-02 13:21-0700\n" +"POT-Creation-Date: 2018-12-20 20:39-0800\n" "PO-Revision-Date: 2003-04-19 02:47+0000\n" "Last-Translator: Eugen Hoanca \n" "Language-Team: Romanian \n" @@ -31,48 +31,56 @@ msgid "Valid arguments are:" msgstr "" -#: lib/closeout.c:122 src/grep.c:1274 +#: lib/c-stack.c:208 lib/c-stack.c:301 +msgid "program error" +msgstr "" + +#: lib/c-stack.c:209 lib/c-stack.c:302 +msgid "stack overflow" +msgstr "" + +#: lib/closeout.c:122 src/grep.c:1273 msgid "write error" msgstr "" -#: lib/dfa.c:958 +#: lib/dfa.c:970 #, fuzzy msgid "unbalanced [" msgstr "[ fr pereche" -#: lib/dfa.c:1079 +#: lib/dfa.c:1091 msgid "invalid character class" msgstr "" -#: lib/dfa.c:1205 +#: lib/dfa.c:1217 msgid "character class syntax is [[:space:]], not [:space:]" msgstr "" -#: lib/dfa.c:1272 +#: lib/dfa.c:1284 #, fuzzy msgid "unfinished \\ escape" msgstr "\\ escape neterminat" -#: lib/dfa.c:1433 +#: lib/dfa.c:1445 #, fuzzy msgid "invalid content of \\{\\}" msgstr "numrare maxim invalid" -#: lib/dfa.c:1436 +#: lib/dfa.c:1448 msgid "regular expression too big" msgstr "" -#: lib/dfa.c:1850 +#: lib/dfa.c:1863 #, fuzzy msgid "unbalanced (" msgstr "( fr pereche" -#: lib/dfa.c:1968 +#: lib/dfa.c:1981 #, fuzzy msgid "no syntax specified" msgstr "Nu s-a specificat sintaxa" -#: lib/dfa.c:1976 +#: lib/dfa.c:1992 #, fuzzy msgid "unbalanced )" msgstr ") fra pereche" @@ -116,7 +124,7 @@ msgid "%s: option requires an argument -- '%c'\n" msgstr "%s: opiunea necesit un parametru -- %c\n" -#: lib/obstack.c:338 lib/obstack.c:340 lib/xalloc-die.c:34 src/pcresearch.c:291 +#: lib/obstack.c:338 lib/obstack.c:340 lib/xalloc-die.c:34 src/pcresearch.c:313 msgid "memory exhausted" msgstr "memorie plin" @@ -154,7 +162,7 @@ #. for your locale. #. #. If you don't know what to put here, please see -#. +#. #. and use glyphs suitable for your language. #: lib/quotearg.c:362 msgid "`" @@ -232,16 +240,16 @@ msgid "Unmatched ) or \\)" msgstr "" -#: lib/regcomp.c:687 +#: lib/regcomp.c:688 msgid "No previous regular expression" msgstr "" -#: lib/version-etc.c:74 +#: lib/version-etc.c:73 #, c-format msgid "Packaged by %s (%s)\n" msgstr "" -#: lib/version-etc.c:77 +#: lib/version-etc.c:76 #, c-format msgid "Packaged by %s\n" msgstr "" @@ -249,14 +257,14 @@ #. TRANSLATORS: Translate "(C)" to the copyright symbol #. (C-in-a-circle), if this symbol is available in the user's #. locale. Otherwise, do not translate "(C)"; leave it as-is. -#: lib/version-etc.c:84 +#: lib/version-etc.c:83 msgid "(C)" msgstr "" -#: lib/version-etc.c:86 +#: lib/version-etc.c:85 msgid "" "\n" -"License GPLv3+: GNU GPL version 3 or later .\n" "This is free software: you are free to change and redistribute it.\n" "There is NO WARRANTY, to the extent permitted by law.\n" @@ -377,11 +385,11 @@ #: lib/version-etc.c:253 #, c-format -msgid "%s home page: \n" +msgid "%s home page: \n" msgstr "" #: lib/version-etc.c:256 -msgid "General help using GNU software: \n" +msgid "General help using GNU software: \n" msgstr "" #: lib/xstrtol-error.c:63 @@ -399,65 +407,57 @@ msgid "%s%s argument '%s' too large" msgstr "" -#. This is a proper name. See the gettext manual, section Names. -#: src/grep.c:59 -msgid "Mike Haertel" -msgstr "" - -#: src/grep.c:60 -msgid "others, see " -msgstr "" - -#: src/grep.c:585 +#: src/grep.c:582 msgid "(standard input)" msgstr "(intrare standard)" -#: src/grep.c:765 +#: src/grep.c:762 msgid "invalid context length argument" msgstr "parametru lungime context invalid" -#: src/grep.c:828 +#: src/grep.c:827 msgid "input is too large to count" msgstr "intrarea(input) este prea mare pentru numrare" -#: src/grep.c:1579 +#: src/grep.c:1578 #, c-format msgid "Binary file %s matches\n" msgstr "Fiierul binar %s corespunde\n" -#: src/grep.c:1627 +#: src/grep.c:1626 #, fuzzy, c-format msgid "warning: %s: %s" msgstr "avertisment: %s: %s\n" -#: src/grep.c:1628 +#: src/grep.c:1627 msgid "recursive directory loop" msgstr "bucl recursiv de directoare" -#: src/grep.c:1844 +#: src/grep.c:1843 #, c-format msgid "input file %s is also the output" msgstr "" -#: src/grep.c:1907 src/grep.c:1914 -#, c-format -msgid "Usage: %s [OPTION]... PATTERN [FILE]...\n" +#: src/grep.c:1906 src/grep.c:1913 +#, fuzzy, c-format +msgid "Usage: %s [OPTION]... PATTERNS [FILE]...\n" msgstr "Folosire: %s [OPIUNE]... TIPAR [FIIER]...\n" -#: src/grep.c:1909 +#: src/grep.c:1908 #, fuzzy, c-format msgid "Try '%s --help' for more information.\n" msgstr "ncercai `%s --help' pentru mai multe informaii.\n" -#: src/grep.c:1915 +#: src/grep.c:1914 #, c-format -msgid "Search for PATTERN in each FILE.\n" +msgid "Search for PATTERNS in each FILE.\n" msgstr "" -#: src/grep.c:1916 +#: src/grep.c:1915 #, fuzzy, c-format msgid "" "Example: %s -i 'hello world' menu.h main.c\n" +"PATTERNS can contain multiple patterns separated by newlines.\n" "\n" "Pattern selection and interpretation:\n" msgstr "" @@ -469,10 +469,10 @@ #: src/grep.c:1920 #, fuzzy, c-format msgid "" -" -E, --extended-regexp PATTERN is an extended regular expression\n" -" -F, --fixed-strings PATTERN is a set of newline-separated strings\n" -" -G, --basic-regexp PATTERN is a basic regular expression (default)\n" -" -P, --perl-regexp PATTERN is a Perl regular expression\n" +" -E, --extended-regexp PATTERNS are extended regular expressions\n" +" -F, --fixed-strings PATTERNS are strings\n" +" -G, --basic-regexp PATTERNS are basic regular expressions\n" +" -P, --perl-regexp PATTERNS are Perl regular expressions\n" msgstr "" " -E, --extended-regexp TIPAR este o expresie regulat extins\n" " -F, --fixed-strings TIPAR este un set de iruri separate de " @@ -483,11 +483,11 @@ #: src/grep.c:1926 #, fuzzy, c-format msgid "" -" -e, --regexp=PATTERN use PATTERN for matching\n" -" -f, --file=FILE obtain PATTERN from FILE\n" +" -e, --regexp=PATTERNS use PATTERNS for matching\n" +" -f, --file=FILE take PATTERNS from FILE\n" " -i, --ignore-case ignore case distinctions\n" -" -w, --word-regexp force PATTERN to match only whole words\n" -" -x, --line-regexp force PATTERN to match only whole lines\n" +" -w, --word-regexp match only whole words\n" +" -x, --line-regexp match only whole lines\n" " -z, --null-data a data line ends in 0 byte, not newline\n" msgstr "" " -e, --regexp=TIPAR folosete TIPAR ca expresie regulat\n" @@ -536,7 +536,7 @@ #: src/grep.c:1951 #, c-format msgid "" -" -o, --only-matching show only the part of a line matching PATTERN\n" +" -o, --only-matching show only nonempty parts of lines that match\n" " -q, --quiet, --silent suppress all normal output\n" " --binary-files=TYPE assume that binary files are TYPE;\n" " TYPE is 'binary', 'text', or 'without-match'\n" @@ -558,12 +558,11 @@ #: src/grep.c:1967 #, c-format msgid "" -" --include=FILE_PATTERN search only files that match FILE_PATTERN\n" -" --exclude=FILE_PATTERN skip files and directories matching " -"FILE_PATTERN\n" +" --include=GLOB search only files that match GLOB (a file " +"pattern)\n" +" --exclude=GLOB skip files and directories matching GLOB\n" " --exclude-from=FILE skip files matching any file pattern from FILE\n" -" --exclude-dir=PATTERN directories that match PATTERN will be " -"skipped.\n" +" --exclude-dir=GLOB skip directories that match GLOB\n" msgstr "" #: src/grep.c:1974 @@ -623,7 +622,7 @@ msgid "" "When FILE is '-', read standard input. With no FILE, read '.' if\n" "recursive, '-' otherwise. With fewer than two FILEs, assume -h.\n" -"Exit status is 0 if any line is selected, 1 otherwise;\n" +"Exit status is 0 if any line (or file if -L) is selected, 1 otherwise;\n" "if any error occurs and -q is not given, the exit status is 2.\n" msgstr "" @@ -636,63 +635,69 @@ msgid "invalid matcher %s" msgstr "numrare maxim invalid" -#: src/grep.c:2458 +#: src/grep.c:2459 #, c-format msgid "warning: GREP_OPTIONS is deprecated; please use an alias or script" msgstr "" -#: src/grep.c:2485 +#: src/grep.c:2486 msgid "unknown devices method" msgstr "metod dispozitive(devices) necunoscut" -#: src/grep.c:2629 +#: src/grep.c:2630 msgid "invalid max count" msgstr "numrare maxim invalid" -#: src/grep.c:2687 +#: src/grep.c:2688 msgid "unknown binary-files type" msgstr "tip fiiere-binare necunoscut" -#: src/pcresearch.c:80 +#: src/grep.c:2770 +msgid "" +"Written by Mike Haertel and others; see\n" +"." +msgstr "" + +#: src/pcresearch.c:86 msgid "failed to allocate memory for the PCRE JIT stack" msgstr "" -#: src/pcresearch.c:97 +#: src/pcresearch.c:118 msgid "" "support for the -P option is not compiled into this --disable-perl-regexp " "binary" msgstr "" -#: src/pcresearch.c:119 +#: src/pcresearch.c:140 msgid "-P supports only unibyte and UTF-8 locales" msgstr "" -#: src/pcresearch.c:125 +#: src/pcresearch.c:146 #, fuzzy msgid "the -P option only supports a single pattern" msgstr "Opiunea -P nu este suportat" -#: src/pcresearch.c:167 +#: src/pcresearch.c:189 msgid "internal error (should never happen)" msgstr "" -#: src/pcresearch.c:192 +#: src/pcresearch.c:214 msgid "internal error" msgstr "" -#: src/pcresearch.c:215 +#: src/pcresearch.c:237 msgid "exceeded PCRE's line length limit" msgstr "" -#: src/pcresearch.c:295 +#: src/pcresearch.c:317 msgid "exhausted PCRE JIT stack" msgstr "" -#: src/pcresearch.c:299 +#: src/pcresearch.c:321 msgid "exceeded PCRE's backtracking limit" msgstr "" -#: src/pcresearch.c:306 +#: src/pcresearch.c:328 #, c-format msgid "internal PCRE error: %d" msgstr "" Binary files /tmp/tmppJ6Y2n/6jFha9hbxv/grep-3.1/po/ru.gmo and /tmp/tmppJ6Y2n/tYMwNxGD36/grep-3.3/po/ru.gmo differ diff -Nru grep-3.1/po/ru.po grep-3.3/po/ru.po --- grep-3.1/po/ru.po 2017-07-02 20:21:16.000000000 +0000 +++ grep-3.3/po/ru.po 2018-12-21 04:39:02.000000000 +0000 @@ -4,13 +4,13 @@ # This file is distributed under the same license as the grep package. # # Denis Perchine , 1998-2000. -# Yuri Kozlov , 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017. +# Yuri Kozlov , 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018. msgid "" msgstr "" "Project-Id-Version: grep 3.0.23-b00\n" "Report-Msgid-Bugs-To: bug-grep@gnu.org\n" -"POT-Creation-Date: 2017-07-02 13:21-0700\n" -"PO-Revision-Date: 2017-06-26 19:47+0300\n" +"POT-Creation-Date: 2018-12-20 20:39-0800\n" +"PO-Revision-Date: 2018-07-02 18:53+0300\n" "Last-Translator: Yuri Kozlov \n" "Language-Team: Russian \n" "Language: ru\n" @@ -36,43 +36,51 @@ msgid "Valid arguments are:" msgstr "Допустимые аргументы:" -#: lib/closeout.c:122 src/grep.c:1274 +#: lib/c-stack.c:208 lib/c-stack.c:301 +msgid "program error" +msgstr "" + +#: lib/c-stack.c:209 lib/c-stack.c:302 +msgid "stack overflow" +msgstr "" + +#: lib/closeout.c:122 src/grep.c:1273 msgid "write error" msgstr "ошибка записи" -#: lib/dfa.c:958 +#: lib/dfa.c:970 msgid "unbalanced [" msgstr "несбалансированная [" -#: lib/dfa.c:1079 +#: lib/dfa.c:1091 msgid "invalid character class" msgstr "неправильный класс символов" -#: lib/dfa.c:1205 +#: lib/dfa.c:1217 msgid "character class syntax is [[:space:]], not [:space:]" msgstr "синтаксис класса символов: [[:space:]], а не [:space:]" -#: lib/dfa.c:1272 +#: lib/dfa.c:1284 msgid "unfinished \\ escape" msgstr "незавершённая \\ экранирующая последовательность" -#: lib/dfa.c:1433 +#: lib/dfa.c:1445 msgid "invalid content of \\{\\}" msgstr "неправильное содержимое в \\{\\}" -#: lib/dfa.c:1436 +#: lib/dfa.c:1448 msgid "regular expression too big" msgstr "регулярное выражение слишком большое" -#: lib/dfa.c:1850 +#: lib/dfa.c:1863 msgid "unbalanced (" msgstr "несбалансированная (" -#: lib/dfa.c:1968 +#: lib/dfa.c:1981 msgid "no syntax specified" msgstr "не указан синтаксис" -#: lib/dfa.c:1976 +#: lib/dfa.c:1992 msgid "unbalanced )" msgstr "несбалансированная )" @@ -115,7 +123,7 @@ msgid "%s: option requires an argument -- '%c'\n" msgstr "%s: параметру требуется аргумент «%c»\n" -#: lib/obstack.c:338 lib/obstack.c:340 lib/xalloc-die.c:34 src/pcresearch.c:291 +#: lib/obstack.c:338 lib/obstack.c:340 lib/xalloc-die.c:34 src/pcresearch.c:313 msgid "memory exhausted" msgstr "память исчерпана" @@ -153,7 +161,7 @@ #. for your locale. #. #. If you don't know what to put here, please see -#. +#. #. and use glyphs suitable for your language. #: lib/quotearg.c:362 msgid "`" @@ -231,16 +239,16 @@ msgid "Unmatched ) or \\)" msgstr "Непарная ) или \\)" -#: lib/regcomp.c:687 +#: lib/regcomp.c:688 msgid "No previous regular expression" msgstr "Нет предыдущего регулярного выражения" -#: lib/version-etc.c:74 +#: lib/version-etc.c:73 #, c-format msgid "Packaged by %s (%s)\n" msgstr "Упакован %s (%s)\n" -#: lib/version-etc.c:77 +#: lib/version-etc.c:76 #, c-format msgid "Packaged by %s\n" msgstr "Упакован %s\n" @@ -248,14 +256,15 @@ #. TRANSLATORS: Translate "(C)" to the copyright symbol #. (C-in-a-circle), if this symbol is available in the user's #. locale. Otherwise, do not translate "(C)"; leave it as-is. -#: lib/version-etc.c:84 +#: lib/version-etc.c:83 msgid "(C)" msgstr "(C)" -#: lib/version-etc.c:86 +#: lib/version-etc.c:85 +#, fuzzy msgid "" "\n" -"License GPLv3+: GNU GPL version 3 or later .\n" "This is free software: you are free to change and redistribute it.\n" "There is NO WARRANTY, to the extent permitted by law.\n" @@ -401,12 +410,13 @@ msgstr "Домашняя страница %s: <%s>\n" #: lib/version-etc.c:253 -#, c-format -msgid "%s home page: \n" +#, fuzzy, c-format +msgid "%s home page: \n" msgstr "Домашняя страница %s: \n" #: lib/version-etc.c:256 -msgid "General help using GNU software: \n" +#, fuzzy +msgid "General help using GNU software: \n" msgstr "Справка по работе с программами GNU: \n" #: lib/xstrtol-error.c:63 @@ -424,65 +434,57 @@ msgid "%s%s argument '%s' too large" msgstr "аргумент %s%s слишком велик для «%s»" -#. This is a proper name. See the gettext manual, section Names. -#: src/grep.c:59 -msgid "Mike Haertel" -msgstr "Майк Гертель (Mike Haertel)" - -#: src/grep.c:60 -msgid "others, see " -msgstr "другие, см. " - -#: src/grep.c:585 +#: src/grep.c:582 msgid "(standard input)" msgstr "(стандартный ввод)" -#: src/grep.c:765 +#: src/grep.c:762 msgid "invalid context length argument" msgstr "неверный аргумент длины контекста" -#: src/grep.c:828 +#: src/grep.c:827 msgid "input is too large to count" msgstr "входные данные слишком велики, чтобы сосчитать" -#: src/grep.c:1579 +#: src/grep.c:1578 #, c-format msgid "Binary file %s matches\n" msgstr "Двоичный файл %s совпадает\n" -#: src/grep.c:1627 +#: src/grep.c:1626 #, c-format msgid "warning: %s: %s" msgstr "предупреждение: %s: %s" -#: src/grep.c:1628 +#: src/grep.c:1627 msgid "recursive directory loop" msgstr "каталоги зациклены" -#: src/grep.c:1844 +#: src/grep.c:1843 #, c-format msgid "input file %s is also the output" msgstr "файл ввода %s также используется и для вывода" -#: src/grep.c:1907 src/grep.c:1914 -#, c-format -msgid "Usage: %s [OPTION]... PATTERN [FILE]...\n" +#: src/grep.c:1906 src/grep.c:1913 +#, fuzzy, c-format +msgid "Usage: %s [OPTION]... PATTERNS [FILE]...\n" msgstr "Использование: %s [ПАРАМЕТР]… ШАБЛОН [ФАЙЛ]…\n" -#: src/grep.c:1909 +#: src/grep.c:1908 #, c-format msgid "Try '%s --help' for more information.\n" msgstr "Запустите «%s --help» для получения более подробного описания.\n" -#: src/grep.c:1915 -#, c-format -msgid "Search for PATTERN in each FILE.\n" +#: src/grep.c:1914 +#, fuzzy, c-format +msgid "Search for PATTERNS in each FILE.\n" msgstr "Поиск ШАБЛОНА в каждом ФАЙЛЕ.\n" -#: src/grep.c:1916 -#, c-format +#: src/grep.c:1915 +#, fuzzy, c-format msgid "" "Example: %s -i 'hello world' menu.h main.c\n" +"PATTERNS can contain multiple patterns separated by newlines.\n" "\n" "Pattern selection and interpretation:\n" msgstr "" @@ -491,12 +493,12 @@ "Шаблон выбора и его интерпретация:\n" #: src/grep.c:1920 -#, c-format +#, fuzzy, c-format msgid "" -" -E, --extended-regexp PATTERN is an extended regular expression\n" -" -F, --fixed-strings PATTERN is a set of newline-separated strings\n" -" -G, --basic-regexp PATTERN is a basic regular expression (default)\n" -" -P, --perl-regexp PATTERN is a Perl regular expression\n" +" -E, --extended-regexp PATTERNS are extended regular expressions\n" +" -F, --fixed-strings PATTERNS are strings\n" +" -G, --basic-regexp PATTERNS are basic regular expressions\n" +" -P, --perl-regexp PATTERNS are Perl regular expressions\n" msgstr "" " -E, --extended-regexp ШАБЛОН — расширенное регулярное выражение\n" " -F, --fixed-regexp ШАБЛОН — строки, разделённые символом новой строки\n" @@ -505,13 +507,13 @@ " -P, --perl-regexp ШАБЛОН — регулярное выражения языка Perl\n" #: src/grep.c:1926 -#, c-format +#, fuzzy, c-format msgid "" -" -e, --regexp=PATTERN use PATTERN for matching\n" -" -f, --file=FILE obtain PATTERN from FILE\n" +" -e, --regexp=PATTERNS use PATTERNS for matching\n" +" -f, --file=FILE take PATTERNS from FILE\n" " -i, --ignore-case ignore case distinctions\n" -" -w, --word-regexp force PATTERN to match only whole words\n" -" -x, --line-regexp force PATTERN to match only whole lines\n" +" -w, --word-regexp match only whole words\n" +" -x, --line-regexp match only whole lines\n" " -z, --null-data a data line ends in 0 byte, not newline\n" msgstr "" " -e, --regexp=ШАБЛОН использовать ШАБЛОН для поиска\n" @@ -557,7 +559,7 @@ "\n" "Управление выводом:\n" " -m, --max-count=ЧИСЛО остановиться после указанного\n" -" ЧИСЛА выбранных строк\n" +" ЧИСЛА совпавших строк\n" " -b, --byte-offset печатать вместе с выходными строками смещение в\n" " байтах\n" " -n, --line-number печатать номер строки вместе с выходными " @@ -569,20 +571,20 @@ " стандартного ввода\n" #: src/grep.c:1951 -#, c-format +#, fuzzy, c-format msgid "" -" -o, --only-matching show only the part of a line matching PATTERN\n" +" -o, --only-matching show only nonempty parts of lines that match\n" " -q, --quiet, --silent suppress all normal output\n" " --binary-files=TYPE assume that binary files are TYPE;\n" " TYPE is 'binary', 'text', or 'without-match'\n" " -a, --text equivalent to --binary-files=text\n" msgstr "" -" -o, --only-matching показывать только часть строки, совпадающей с " -"ШАБЛОНОМ\n" +" -o, --only-matching показывать только часть строки, совпадающей\n" +" с ШАБЛОНОМ\n" " -q, --quiet, --silent подавлять весь обычный вывод\n" " --binary-files=ТИП считать, что двоичный файл имеет ТИП:\n" " «binary», «text» или «without-match».\n" -" -a, --text то же что и --binary-files=text\n" +" -a, --text тоже, что и --binary-files=text\n" #: src/grep.c:1958 #, c-format @@ -603,17 +605,17 @@ " ДЕЙСТВИЕ может быть «read» или «skip»\n" " -r, --recursive то же, что и --directories=recurse\n" " -R, --dereference-recursive тоже, но с " -"переходом по всем символьным ссылкам\n" +"переходом\n" +" по всем символьным ссылкам\n" #: src/grep.c:1967 -#, c-format +#, fuzzy, c-format msgid "" -" --include=FILE_PATTERN search only files that match FILE_PATTERN\n" -" --exclude=FILE_PATTERN skip files and directories matching " -"FILE_PATTERN\n" +" --include=GLOB search only files that match GLOB (a file " +"pattern)\n" +" --exclude=GLOB skip files and directories matching GLOB\n" " --exclude-from=FILE skip files matching any file pattern from FILE\n" -" --exclude-dir=PATTERN directories that match PATTERN will be " -"skipped.\n" +" --exclude-dir=GLOB skip directories that match GLOB\n" msgstr "" " --include=Ф_ШАБЛОН обработать только файлы, подпадающие под " "Ф_ШАБЛОН\n" @@ -679,11 +681,11 @@ "\n" #: src/grep.c:1994 -#, c-format +#, fuzzy, c-format msgid "" "When FILE is '-', read standard input. With no FILE, read '.' if\n" "recursive, '-' otherwise. With fewer than two FILEs, assume -h.\n" -"Exit status is 0 if any line is selected, 1 otherwise;\n" +"Exit status is 0 if any line (or file if -L) is selected, 1 otherwise;\n" "if any error occurs and -q is not given, the exit status is 2.\n" msgstr "" "Если в качестве ФАЙЛА указан символ «-», то читается стандартный ввод.\n" @@ -703,29 +705,36 @@ msgid "invalid matcher %s" msgstr "неверный образец %s" -#: src/grep.c:2458 +#: src/grep.c:2459 #, c-format msgid "warning: GREP_OPTIONS is deprecated; please use an alias or script" msgstr "" "предупреждение: GREP_OPTIONS устарел; используйте псевдоним или сценарий" -#: src/grep.c:2485 +#: src/grep.c:2486 msgid "unknown devices method" msgstr "неизвестный метод для устройств" -#: src/grep.c:2629 +#: src/grep.c:2630 msgid "invalid max count" -msgstr "неверное максимальное количество совпадений" +msgstr "неверно задано число максимального количества совпадений" -#: src/grep.c:2687 +#: src/grep.c:2688 msgid "unknown binary-files type" msgstr "неизвестный тип двоичных файлов" -#: src/pcresearch.c:80 +#: src/grep.c:2770 +#, fuzzy +msgid "" +"Written by Mike Haertel and others; see\n" +"." +msgstr "другие, см. " + +#: src/pcresearch.c:86 msgid "failed to allocate memory for the PCRE JIT stack" msgstr "ошибка выделения памяти для стека PCRE JIT" -#: src/pcresearch.c:97 +#: src/pcresearch.c:118 msgid "" "support for the -P option is not compiled into this --disable-perl-regexp " "binary" @@ -733,39 +742,42 @@ "поддержка параметра -P не включена при компиляции данного исполняемого файла " "(--disable-perl-regexp)" -#: src/pcresearch.c:119 +#: src/pcresearch.c:140 msgid "-P supports only unibyte and UTF-8 locales" msgstr "параметр -P поддерживает только однобайтовые локали и UTF-8" -#: src/pcresearch.c:125 +#: src/pcresearch.c:146 msgid "the -P option only supports a single pattern" msgstr "параметр -P поддерживает только одиночный шаблон" -#: src/pcresearch.c:167 +#: src/pcresearch.c:189 msgid "internal error (should never happen)" msgstr "внутренняя ошибка (не должна возникать)" -#: src/pcresearch.c:192 +#: src/pcresearch.c:214 msgid "internal error" msgstr "внутренняя ошибка" -#: src/pcresearch.c:215 +#: src/pcresearch.c:237 msgid "exceeded PCRE's line length limit" msgstr "превышено ограничение длины строки PCRE" -#: src/pcresearch.c:295 +#: src/pcresearch.c:317 msgid "exhausted PCRE JIT stack" msgstr "исчерпан стек PCRE JIT" -#: src/pcresearch.c:299 +#: src/pcresearch.c:321 msgid "exceeded PCRE's backtracking limit" msgstr "исчерпан лимит в PCRE по возврату" -#: src/pcresearch.c:306 +#: src/pcresearch.c:328 #, c-format msgid "internal PCRE error: %d" msgstr "внутренняя ошибка PCRE: %d" +#~ msgid "Mike Haertel" +#~ msgstr "Майк Гертель (Mike Haertel)" + #~ msgid "%s: option '--%s' doesn't allow an argument\n" #~ msgstr "%s: у параметра «--%s» не может быть аргумента\n" Binary files /tmp/tmppJ6Y2n/6jFha9hbxv/grep-3.1/po/sk.gmo and /tmp/tmppJ6Y2n/tYMwNxGD36/grep-3.3/po/sk.gmo differ diff -Nru grep-3.1/po/sk.po grep-3.3/po/sk.po --- grep-3.1/po/sk.po 2017-07-02 20:21:16.000000000 +0000 +++ grep-3.3/po/sk.po 2018-12-21 04:39:02.000000000 +0000 @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: grep 2.13.16-pre1\n" "Report-Msgid-Bugs-To: bug-grep@gnu.org\n" -"POT-Creation-Date: 2017-07-02 13:21-0700\n" +"POT-Creation-Date: 2018-12-20 20:39-0800\n" "PO-Revision-Date: 2012-08-17 13:52+0100\n" "Last-Translator: Ivan Masár \n" "Language-Team: Slovak \n" @@ -31,45 +31,53 @@ msgid "Valid arguments are:" msgstr "Platné argumentu sú:" -#: lib/closeout.c:122 src/grep.c:1274 +#: lib/c-stack.c:208 lib/c-stack.c:301 +msgid "program error" +msgstr "" + +#: lib/c-stack.c:209 lib/c-stack.c:302 +msgid "stack overflow" +msgstr "" + +#: lib/closeout.c:122 src/grep.c:1273 msgid "write error" msgstr "chyba zápisu" -#: lib/dfa.c:958 +#: lib/dfa.c:970 msgid "unbalanced [" msgstr "[ bez náprotivku" -#: lib/dfa.c:1079 +#: lib/dfa.c:1091 msgid "invalid character class" msgstr "neplatná trieda znakov" -#: lib/dfa.c:1205 +#: lib/dfa.c:1217 msgid "character class syntax is [[:space:]], not [:space:]" msgstr "syntax triedy znakov je [[:space:]], nie [:space:]" -#: lib/dfa.c:1272 +#: lib/dfa.c:1284 msgid "unfinished \\ escape" msgstr "nedokončená úniková klauzula \\" -#: lib/dfa.c:1433 +#: lib/dfa.c:1445 #, fuzzy msgid "invalid content of \\{\\}" msgstr "Neplatný obsah \\{\\}" -#: lib/dfa.c:1436 +#: lib/dfa.c:1448 #, fuzzy msgid "regular expression too big" msgstr "Regulárny výraz je príliš veľký" -#: lib/dfa.c:1850 +#: lib/dfa.c:1863 msgid "unbalanced (" msgstr "( bez náprotivku" -#: lib/dfa.c:1968 +#: lib/dfa.c:1981 msgid "no syntax specified" msgstr "neuvedená syntax" -#: lib/dfa.c:1976 +#: lib/dfa.c:1992 msgid "unbalanced )" msgstr ") bez náprotivku" @@ -112,7 +120,7 @@ msgid "%s: option requires an argument -- '%c'\n" msgstr "%s: voľba voľba vyžaduje argument -- %c\n" -#: lib/obstack.c:338 lib/obstack.c:340 lib/xalloc-die.c:34 src/pcresearch.c:291 +#: lib/obstack.c:338 lib/obstack.c:340 lib/xalloc-die.c:34 src/pcresearch.c:313 msgid "memory exhausted" msgstr "pamäť bola vyčerpaná" @@ -150,7 +158,7 @@ #. for your locale. #. #. If you don't know what to put here, please see -#. +#. #. and use glyphs suitable for your language. #: lib/quotearg.c:362 msgid "`" @@ -229,16 +237,16 @@ msgid "Unmatched ) or \\)" msgstr ") alebo \\) bez náprotivku." -#: lib/regcomp.c:687 +#: lib/regcomp.c:688 msgid "No previous regular expression" msgstr "Žiadny predošlý regulárny výraz" -#: lib/version-etc.c:74 +#: lib/version-etc.c:73 #, c-format msgid "Packaged by %s (%s)\n" msgstr "Balík vytvoril %s (%s)\n" -#: lib/version-etc.c:77 +#: lib/version-etc.c:76 #, c-format msgid "Packaged by %s\n" msgstr "Balík vytvoril %s\n" @@ -246,14 +254,15 @@ #. TRANSLATORS: Translate "(C)" to the copyright symbol #. (C-in-a-circle), if this symbol is available in the user's #. locale. Otherwise, do not translate "(C)"; leave it as-is. -#: lib/version-etc.c:84 +#: lib/version-etc.c:83 msgid "(C)" msgstr "(C)" -#: lib/version-etc.c:86 +#: lib/version-etc.c:85 +#, fuzzy msgid "" "\n" -"License GPLv3+: GNU GPL version 3 or later .\n" "This is free software: you are free to change and redistribute it.\n" "There is NO WARRANTY, to the extent permitted by law.\n" @@ -398,12 +407,13 @@ msgstr "Domovská stránka %s: <%s>\n" #: lib/version-etc.c:253 -#, c-format -msgid "%s home page: \n" +#, fuzzy, c-format +msgid "%s home page: \n" msgstr "Domovská stránka %s: \n" #: lib/version-etc.c:256 -msgid "General help using GNU software: \n" +#, fuzzy +msgid "General help using GNU software: \n" msgstr "" "Všeobecná pomoc pri používaní softvéru GNU: \n" @@ -422,65 +432,57 @@ msgid "%s%s argument '%s' too large" msgstr "argument %s%s „%s“ je príliš veľký" -#. This is a proper name. See the gettext manual, section Names. -#: src/grep.c:59 -msgid "Mike Haertel" -msgstr "Mike Haertel" - -#: src/grep.c:60 -msgid "others, see " -msgstr "iní, pozri " - -#: src/grep.c:585 +#: src/grep.c:582 msgid "(standard input)" msgstr "(štandardný vstup)" -#: src/grep.c:765 +#: src/grep.c:762 msgid "invalid context length argument" msgstr "neplatný argument dĺžky kontextu" -#: src/grep.c:828 +#: src/grep.c:827 msgid "input is too large to count" msgstr "vstup je príliš veľký, aby sa dal spočítať" -#: src/grep.c:1579 +#: src/grep.c:1578 #, c-format msgid "Binary file %s matches\n" msgstr "Zhody v binárnom súbore %s\n" -#: src/grep.c:1627 +#: src/grep.c:1626 #, c-format msgid "warning: %s: %s" msgstr "upozornenie: %s: %s" -#: src/grep.c:1628 +#: src/grep.c:1627 msgid "recursive directory loop" msgstr "rekurzívna slučka v adresári" -#: src/grep.c:1844 +#: src/grep.c:1843 #, c-format msgid "input file %s is also the output" msgstr "vstupný súbor %s je tiež uvedený ako výstupný" -#: src/grep.c:1907 src/grep.c:1914 -#, c-format -msgid "Usage: %s [OPTION]... PATTERN [FILE]...\n" +#: src/grep.c:1906 src/grep.c:1913 +#, fuzzy, c-format +msgid "Usage: %s [OPTION]... PATTERNS [FILE]...\n" msgstr "Použitie: %s [VOĽBA]... VZORKA [SÚBOR]...\n" -#: src/grep.c:1909 +#: src/grep.c:1908 #, c-format msgid "Try '%s --help' for more information.\n" msgstr "Ďalšie informácie získate príkazom „%s --help“.\n" -#: src/grep.c:1915 +#: src/grep.c:1914 #, fuzzy, c-format -msgid "Search for PATTERN in each FILE.\n" +msgid "Search for PATTERNS in each FILE.\n" msgstr "Hľadať VZORKU v každom SÚBORE alebo na štandardnom vstupe.\n" -#: src/grep.c:1916 +#: src/grep.c:1915 #, fuzzy, c-format msgid "" "Example: %s -i 'hello world' menu.h main.c\n" +"PATTERNS can contain multiple patterns separated by newlines.\n" "\n" "Pattern selection and interpretation:\n" msgstr "" @@ -491,10 +493,10 @@ #: src/grep.c:1920 #, fuzzy, c-format msgid "" -" -E, --extended-regexp PATTERN is an extended regular expression\n" -" -F, --fixed-strings PATTERN is a set of newline-separated strings\n" -" -G, --basic-regexp PATTERN is a basic regular expression (default)\n" -" -P, --perl-regexp PATTERN is a Perl regular expression\n" +" -E, --extended-regexp PATTERNS are extended regular expressions\n" +" -F, --fixed-strings PATTERNS are strings\n" +" -G, --basic-regexp PATTERNS are basic regular expressions\n" +" -P, --perl-regexp PATTERNS are Perl regular expressions\n" msgstr "" " -E, --extended-regexp VZORKA je rozšírený regular expression (ERE)\n" " -F, --fixed-strings VZORKA je množina pevných reťazcov\n" @@ -503,13 +505,13 @@ " -P, --perl-regexp VZORKA je perlovský regulárny výraz\n" #: src/grep.c:1926 -#, c-format +#, fuzzy, c-format msgid "" -" -e, --regexp=PATTERN use PATTERN for matching\n" -" -f, --file=FILE obtain PATTERN from FILE\n" +" -e, --regexp=PATTERNS use PATTERNS for matching\n" +" -f, --file=FILE take PATTERNS from FILE\n" " -i, --ignore-case ignore case distinctions\n" -" -w, --word-regexp force PATTERN to match only whole words\n" -" -x, --line-regexp force PATTERN to match only whole lines\n" +" -w, --word-regexp match only whole words\n" +" -x, --line-regexp match only whole lines\n" " -z, --null-data a data line ends in 0 byte, not newline\n" msgstr "" " -e, --regexp=VZORKA použiť na hľadanie VZORKU\n" @@ -566,9 +568,9 @@ "vstup\n" #: src/grep.c:1951 -#, c-format +#, fuzzy, c-format msgid "" -" -o, --only-matching show only the part of a line matching PATTERN\n" +" -o, --only-matching show only nonempty parts of lines that match\n" " -q, --quiet, --silent suppress all normal output\n" " --binary-files=TYPE assume that binary files are TYPE;\n" " TYPE is 'binary', 'text', or 'without-match'\n" @@ -604,14 +606,13 @@ " -R, --dereference-recursive podobné, ale nasleduje symbolické odkazy\n" #: src/grep.c:1967 -#, c-format +#, fuzzy, c-format msgid "" -" --include=FILE_PATTERN search only files that match FILE_PATTERN\n" -" --exclude=FILE_PATTERN skip files and directories matching " -"FILE_PATTERN\n" +" --include=GLOB search only files that match GLOB (a file " +"pattern)\n" +" --exclude=GLOB skip files and directories matching GLOB\n" " --exclude-from=FILE skip files matching any file pattern from FILE\n" -" --exclude-dir=PATTERN directories that match PATTERN will be " -"skipped.\n" +" --exclude-dir=GLOB skip directories that match GLOB\n" msgstr "" " --include=VZOR_SÚBORU hľadať iba v súboroch zodpovedajúcich " "VZOR_SÚBORU\n" @@ -680,7 +681,7 @@ msgid "" "When FILE is '-', read standard input. With no FILE, read '.' if\n" "recursive, '-' otherwise. With fewer than two FILEs, assume -h.\n" -"Exit status is 0 if any line is selected, 1 otherwise;\n" +"Exit status is 0 if any line (or file if -L) is selected, 1 otherwise;\n" "if any error occurs and -q is not given, the exit status is 2.\n" msgstr "" "Ak SÚBOR je -, čítať zo štandardného vstupu. Bez SÚBORU čítať . s voľbou -" @@ -698,67 +699,77 @@ msgid "invalid matcher %s" msgstr "neplatný zástupný znak %s" -#: src/grep.c:2458 +#: src/grep.c:2459 #, c-format msgid "warning: GREP_OPTIONS is deprecated; please use an alias or script" msgstr "" -#: src/grep.c:2485 +#: src/grep.c:2486 msgid "unknown devices method" msgstr "neznáme metódy zariadení" -#: src/grep.c:2629 +#: src/grep.c:2630 msgid "invalid max count" msgstr "neplatný maximálny počet" -#: src/grep.c:2687 +#: src/grep.c:2688 msgid "unknown binary-files type" msgstr "neznámy typ binárneho súboru" -#: src/pcresearch.c:80 +#: src/grep.c:2770 +#, fuzzy +msgid "" +"Written by Mike Haertel and others; see\n" +"." +msgstr "iní, pozri " + +#: src/pcresearch.c:86 msgid "failed to allocate memory for the PCRE JIT stack" msgstr "" -#: src/pcresearch.c:97 +#: src/pcresearch.c:118 msgid "" "support for the -P option is not compiled into this --disable-perl-regexp " "binary" msgstr "" "podpora voľby -P nie je zakompilovaná do tejto binárky --disable-perl-regexp" -#: src/pcresearch.c:119 +#: src/pcresearch.c:140 msgid "-P supports only unibyte and UTF-8 locales" msgstr "" -#: src/pcresearch.c:125 +#: src/pcresearch.c:146 msgid "the -P option only supports a single pattern" msgstr "voľba -P podporuje iba jedinú vzorku" -#: src/pcresearch.c:167 +#: src/pcresearch.c:189 msgid "internal error (should never happen)" msgstr "" -#: src/pcresearch.c:192 +#: src/pcresearch.c:214 msgid "internal error" msgstr "vnútorná chyba" -#: src/pcresearch.c:215 +#: src/pcresearch.c:237 msgid "exceeded PCRE's line length limit" msgstr "prekročený limit dĺžky riadka PCRE" -#: src/pcresearch.c:295 +#: src/pcresearch.c:317 msgid "exhausted PCRE JIT stack" msgstr "" -#: src/pcresearch.c:299 +#: src/pcresearch.c:321 msgid "exceeded PCRE's backtracking limit" msgstr "prekročený limit backtrackingu PCRE" -#: src/pcresearch.c:306 +#: src/pcresearch.c:328 #, fuzzy, c-format msgid "internal PCRE error: %d" msgstr "vnútorná chyba" +#~ msgid "Mike Haertel" +#~ msgstr "Mike Haertel" + #~ msgid "%s: option '--%s' doesn't allow an argument\n" #~ msgstr "%s: voľba „--%s“ nepripúšťa argument\n" Binary files /tmp/tmppJ6Y2n/6jFha9hbxv/grep-3.1/po/sl.gmo and /tmp/tmppJ6Y2n/tYMwNxGD36/grep-3.3/po/sl.gmo differ diff -Nru grep-3.1/po/sl.po grep-3.3/po/sl.po --- grep-3.1/po/sl.po 2017-07-02 20:21:16.000000000 +0000 +++ grep-3.3/po/sl.po 2018-12-21 04:39:02.000000000 +0000 @@ -1,16 +1,16 @@ # -*- mode: po; coding: utf-8; -*- Slovenian message catalogue for grep -# Copyright (C) 1996, 1999, 2000, 2007, 2008, 2009, 2011, 2012, 2013, 2014, 2015 Free Software Foundation, Inc. +# Copyright (C) 1996, 1999, 2000, 2007, 2008, 2009, 2011, 2012, 2013, 2014, 2015, 2017 Free Software Foundation, Inc. # This file is distributed under the same license as the grep package. -# Primož Peterlin , 1996, 1999, 2000, 2007, 2008, 2009, 2011, 2012, 2013, 2014, 2015. +# Primož Peterlin , 1996, 1999, 2000, 2007, 2008, 2009, 2011, 2012, 2013, 2014, 2015, 2018. # -# $Id: grep-2.21.78.sl.po,v 1.2 2015/12/13 21:32:58 peterlin Exp $ +# $Id: grep-3.0.23-b00.sl.po,v 1.2 2018/07/28 21:40:33 peterlin Exp $ # msgid "" msgstr "" -"Project-Id-Version: GNU grep 2.21.78\n" +"Project-Id-Version: GNU grep 3.0.23-b00\n" "Report-Msgid-Bugs-To: bug-grep@gnu.org\n" -"POT-Creation-Date: 2017-07-02 13:21-0700\n" -"PO-Revision-Date: 2015-12-13 22:32+0100\n" +"POT-Creation-Date: 2018-12-20 20:39-0800\n" +"PO-Revision-Date: 2018-07-28 23:40+0200\n" "Last-Translator: Primož Peterlin \n" "Language-Team: Slovenian \n" "Language: sl\n" @@ -35,43 +35,51 @@ msgid "Valid arguments are:" msgstr "Veljavni argumenti so:" -#: lib/closeout.c:122 src/grep.c:1274 +#: lib/c-stack.c:208 lib/c-stack.c:301 +msgid "program error" +msgstr "" + +#: lib/c-stack.c:209 lib/c-stack.c:302 +msgid "stack overflow" +msgstr "" + +#: lib/closeout.c:122 src/grep.c:1273 msgid "write error" msgstr "napaka pri pisanju" -#: lib/dfa.c:958 +#: lib/dfa.c:970 msgid "unbalanced [" msgstr "uklepaj [ brez zaklepaja" -#: lib/dfa.c:1079 +#: lib/dfa.c:1091 msgid "invalid character class" msgstr "neveljavno ime razreda znakov" -#: lib/dfa.c:1205 +#: lib/dfa.c:1217 msgid "character class syntax is [[:space:]], not [:space:]" msgstr "skladnja imena razreda znakov je [[:space:]], ne [:space:]" -#: lib/dfa.c:1272 +#: lib/dfa.c:1284 msgid "unfinished \\ escape" msgstr "nedokončano ubežno zaporedje \\" -#: lib/dfa.c:1433 +#: lib/dfa.c:1445 msgid "invalid content of \\{\\}" msgstr "neveljavna vsebina \\{\\}" -#: lib/dfa.c:1436 +#: lib/dfa.c:1448 msgid "regular expression too big" msgstr "regularni izraz je preobsežen" -#: lib/dfa.c:1850 +#: lib/dfa.c:1863 msgid "unbalanced (" msgstr "uklepaj ( brez zaklepaja" -#: lib/dfa.c:1968 +#: lib/dfa.c:1981 msgid "no syntax specified" msgstr "skladnja ni podana" -#: lib/dfa.c:1976 +#: lib/dfa.c:1992 msgid "unbalanced )" msgstr "zaklepaj ) brez uklepaja" @@ -80,29 +88,29 @@ msgstr "Neznana sistemska napaka" #: lib/getopt.c:278 -#, fuzzy, c-format +#, c-format msgid "%s: option '%s%s' is ambiguous\n" -msgstr "%s: izbira »%s« ni enopomenska\n" +msgstr "%s: izbira »%s%s« ni enopomenska\n" #: lib/getopt.c:284 -#, fuzzy, c-format +#, c-format msgid "%s: option '%s%s' is ambiguous; possibilities:" -msgstr "%s: izbira »%s« ni enopomenska; možnosti:" +msgstr "%s: izbira »%s%s« ni enopomenska; možnosti:" #: lib/getopt.c:319 -#, fuzzy, c-format +#, c-format msgid "%s: unrecognized option '%s%s'\n" -msgstr "%s: neprepoznana izbira »%c%s«\n" +msgstr "%s: neprepoznana izbira »%s%s«\n" #: lib/getopt.c:345 -#, fuzzy, c-format +#, c-format msgid "%s: option '%s%s' doesn't allow an argument\n" -msgstr "%s: izbira »%c%s« ne dovoljuje argumenta\n" +msgstr "%s: izbira »%s%s« ne dovoljuje argumenta\n" #: lib/getopt.c:360 -#, fuzzy, c-format +#, c-format msgid "%s: option '%s%s' requires an argument\n" -msgstr "%s: izbira »--%s« zahteva argument\n" +msgstr "%s: izbira »%s%s« zahteva argument\n" #: lib/getopt.c:621 #, c-format @@ -114,7 +122,7 @@ msgid "%s: option requires an argument -- '%c'\n" msgstr "%s: izbira zahteva argument -- »%c«\n" -#: lib/obstack.c:338 lib/obstack.c:340 lib/xalloc-die.c:34 src/pcresearch.c:291 +#: lib/obstack.c:338 lib/obstack.c:340 lib/xalloc-die.c:34 src/pcresearch.c:313 msgid "memory exhausted" msgstr "pomnilnik porabljen" @@ -131,7 +139,7 @@ #: lib/xbinary-io.c:37 #, c-format msgid "failed to set file descriptor text/binary mode" -msgstr "" +msgstr "nastavitev deskriptorja datoteke za tekstovni/binarni način ni uspela" #. TRANSLATORS: #. Get translations for open and closing quotation marks. @@ -152,7 +160,7 @@ #. for your locale. #. #. If you don't know what to put here, please see -#. +#. #. and use glyphs suitable for your language. #: lib/quotearg.c:362 msgid "`" @@ -191,9 +199,8 @@ msgstr "Neveljaven povratni sklic" #: lib/regcomp.c:156 -#, fuzzy msgid "Unmatched [, [^, [:, [., or [=" -msgstr "Uklepaj [ ali [^ brez para" +msgstr "Uklepaj [, [^, [:, [. ali [= brez para" #: lib/regcomp.c:159 msgid "Unmatched ( or \\(" @@ -231,16 +238,16 @@ msgid "Unmatched ) or \\)" msgstr "Zaklepaj ) ali \\\\) brez para" -#: lib/regcomp.c:687 +#: lib/regcomp.c:688 msgid "No previous regular expression" msgstr "Manjkajoč prejšnji regularni izraz" -#: lib/version-etc.c:74 +#: lib/version-etc.c:73 #, c-format msgid "Packaged by %s (%s)\n" msgstr "Priprava paketa: %s (%s)\n" -#: lib/version-etc.c:77 +#: lib/version-etc.c:76 #, c-format msgid "Packaged by %s\n" msgstr "Priprava paketa: %s\n" @@ -248,14 +255,15 @@ #. TRANSLATORS: Translate "(C)" to the copyright symbol #. (C-in-a-circle), if this symbol is available in the user's #. locale. Otherwise, do not translate "(C)"; leave it as-is. -#: lib/version-etc.c:84 +#: lib/version-etc.c:83 msgid "(C)" msgstr "©" -#: lib/version-etc.c:86 +#: lib/version-etc.c:85 +#, fuzzy msgid "" "\n" -"License GPLv3+: GNU GPL version 3 or later .\n" "This is free software: you are free to change and redistribute it.\n" "There is NO WARRANTY, to the extent permitted by law.\n" @@ -402,12 +410,13 @@ msgstr "Spletna stran %s: <%s>\n" #: lib/version-etc.c:253 -#, c-format -msgid "%s home page: \n" +#, fuzzy, c-format +msgid "%s home page: \n" msgstr "Spletna stran %s: \n" #: lib/version-etc.c:256 -msgid "General help using GNU software: \n" +#, fuzzy +msgid "General help using GNU software: \n" msgstr "Splošna pomoč za rabo programja GNU: \n" #: lib/xstrtol-error.c:63 @@ -425,93 +434,85 @@ msgid "%s%s argument '%s' too large" msgstr "%s%s: argument '%s' je prevelik" -#. This is a proper name. See the gettext manual, section Names. -#: src/grep.c:59 -msgid "Mike Haertel" -msgstr "Mike Haertel" - -#: src/grep.c:60 -msgid "others, see " -msgstr "drugi, glejte " - -#: src/grep.c:585 +#: src/grep.c:582 msgid "(standard input)" msgstr "(standardni vhod)" -#: src/grep.c:765 +#: src/grep.c:762 msgid "invalid context length argument" msgstr "velikost konteksta ni veljavna" -#: src/grep.c:828 +#: src/grep.c:827 msgid "input is too large to count" msgstr "vhod je prevelik, da bi ga mogli prešteti" -#: src/grep.c:1579 +#: src/grep.c:1578 #, c-format msgid "Binary file %s matches\n" msgstr "Binarna datoteka %s ustreza\n" -#: src/grep.c:1627 +#: src/grep.c:1626 #, c-format msgid "warning: %s: %s" msgstr "opozorilo: %s: %s" -#: src/grep.c:1628 +#: src/grep.c:1627 msgid "recursive directory loop" msgstr "rekurzivna zanka imenikov" -#: src/grep.c:1844 +#: src/grep.c:1843 #, c-format msgid "input file %s is also the output" msgstr "vhodna datoteka %s je tudi izhodna" -#: src/grep.c:1907 src/grep.c:1914 -#, c-format -msgid "Usage: %s [OPTION]... PATTERN [FILE]...\n" +#: src/grep.c:1906 src/grep.c:1913 +#, fuzzy, c-format +msgid "Usage: %s [OPTION]... PATTERNS [FILE]...\n" msgstr "Uporaba: %s [IZBIRA]... VZOREC [DATOTEKA]...\n" -#: src/grep.c:1909 +#: src/grep.c:1908 #, c-format msgid "Try '%s --help' for more information.\n" msgstr "Poskusite »%s --help« za dodatna pojasnila.\n" -#: src/grep.c:1915 +#: src/grep.c:1914 #, fuzzy, c-format -msgid "Search for PATTERN in each FILE.\n" -msgstr "V DATOTEKI ali na standardnem vhodu se išče VZOREC.\n" +msgid "Search for PATTERNS in each FILE.\n" +msgstr "V vsaki DATOTEKI se išče VZOREC.\n" -#: src/grep.c:1916 +#: src/grep.c:1915 #, fuzzy, c-format msgid "" "Example: %s -i 'hello world' menu.h main.c\n" +"PATTERNS can contain multiple patterns separated by newlines.\n" "\n" "Pattern selection and interpretation:\n" msgstr "" "Zgled: %s -i 'hello world' menu.h main.c\n" "\n" -"Izbira in tolmačenje regularnih izrazov:\n" +"Izbira in tolmačenje vzorcev:\n" #: src/grep.c:1920 #, fuzzy, c-format msgid "" -" -E, --extended-regexp PATTERN is an extended regular expression\n" -" -F, --fixed-strings PATTERN is a set of newline-separated strings\n" -" -G, --basic-regexp PATTERN is a basic regular expression (default)\n" -" -P, --perl-regexp PATTERN is a Perl regular expression\n" +" -E, --extended-regexp PATTERNS are extended regular expressions\n" +" -F, --fixed-strings PATTERNS are strings\n" +" -G, --basic-regexp PATTERNS are basic regular expressions\n" +" -P, --perl-regexp PATTERNS are Perl regular expressions\n" msgstr "" -" -E, --extended-regexp VZOREC je razširjeni regularni izraz (RRI)\n" +" -E, --extended-regexp VZOREC je razširjeni regularni izraz\n" " -F, --fixed-strings VZOREC je množica nizov, vsak v svoji vrstici\n" -" -G, --basic-regexp VZOREC je osnovni regularni izraz (ORI)\n" +" -G, --basic-regexp VZOREC je osnovni regularni izraz (privzeto)\n" " -P, --perl-regexp VZOREC je regularni izraz z razširitvami perla\n" #: src/grep.c:1926 -#, c-format +#, fuzzy, c-format msgid "" -" -e, --regexp=PATTERN use PATTERN for matching\n" -" -f, --file=FILE obtain PATTERN from FILE\n" +" -e, --regexp=PATTERNS use PATTERNS for matching\n" +" -f, --file=FILE take PATTERNS from FILE\n" " -i, --ignore-case ignore case distinctions\n" -" -w, --word-regexp force PATTERN to match only whole words\n" -" -x, --line-regexp force PATTERN to match only whole lines\n" +" -w, --word-regexp match only whole words\n" +" -x, --line-regexp match only whole lines\n" " -z, --null-data a data line ends in 0 byte, not newline\n" msgstr "" " -e, --regexp=VZOREC uporabi VZOREC kot regularni izraz\n" @@ -540,7 +541,7 @@ " --help ta pomoč\n" #: src/grep.c:1940 -#, fuzzy, c-format +#, c-format msgid "" "\n" "Output control:\n" @@ -555,7 +556,7 @@ msgstr "" "\n" "Nadzor izhoda:\n" -" -m, --max-count=ŠTEVILO odnehaj, ko je doseženo ŠTEVILO ujemanj\n" +" -m, --max-count=ŠTEVILO odnehaj po danem ŠTEVILU izbranih vrstic\n" " -b, --byte-offset z izpisom odmika (v zlogih)\n" " -n, --line-number z izpisom zaporedne številke vrstice\n" " --line-buffered izhodni medpomnilnik izpraznimo vsako vrstico\n" @@ -565,9 +566,9 @@ "vhoda\n" #: src/grep.c:1951 -#, c-format +#, fuzzy, c-format msgid "" -" -o, --only-matching show only the part of a line matching PATTERN\n" +" -o, --only-matching show only nonempty parts of lines that match\n" " -q, --quiet, --silent suppress all normal output\n" " --binary-files=TYPE assume that binary files are TYPE;\n" " TYPE is 'binary', 'text', or 'without-match'\n" @@ -601,14 +602,13 @@ " povezav\n" #: src/grep.c:1967 -#, c-format +#, fuzzy, c-format msgid "" -" --include=FILE_PATTERN search only files that match FILE_PATTERN\n" -" --exclude=FILE_PATTERN skip files and directories matching " -"FILE_PATTERN\n" +" --include=GLOB search only files that match GLOB (a file " +"pattern)\n" +" --exclude=GLOB skip files and directories matching GLOB\n" " --exclude-from=FILE skip files matching any file pattern from FILE\n" -" --exclude-dir=PATTERN directories that match PATTERN will be " -"skipped.\n" +" --exclude-dir=GLOB skip directories that match GLOB\n" msgstr "" " --include=VZOREC preišči le datoteke, ki ustrezajo VZORCU\n" " --exclude=VZOREC izpusti datoteke, ki ustrezajo VZORCU\n" @@ -617,7 +617,7 @@ " --exclude-dir=VZOREC izpusti imenike, ki ustrezajo VZORCU\n" #: src/grep.c:1974 -#, fuzzy, c-format +#, c-format msgid "" " -L, --files-without-match print only names of FILEs with no selected " "lines\n" @@ -626,12 +626,9 @@ " -T, --initial-tab make tabs line up (if needed)\n" " -Z, --null print 0 byte after FILE name\n" msgstr "" -" -L, --files-without-match le imena tistih DATOTEK, kjer VZORCA nismo " -"našli\n" -" -l, --files-with-matches le imena tistih DATOTEK, kjer smo VZOREC našli\n" -" -c, --count le skupno število vrstic v DATOTEKI, v katerih " -"se\n" -" pojavi VZOREC\n" +" -L, --files-without-match le imena DATOTEK brez izbranih vrstic\n" +" -l, --files-with-matches le imena DATOTEK z izbranimi vrsticami\n" +" -c, --count le skupno število izbranih vrstic v DATOTEKI\n" " -T, --initial-tab dodaj začetni tabulator (če je potrebno)\n" " -Z, --null izpiši znak NUL za imenom DATOTEKE\n" @@ -652,7 +649,7 @@ "VZORCEM\n" #: src/grep.c:1987 -#, fuzzy, c-format +#, c-format msgid "" " -NUM same as --context=NUM\n" " --color[=WHEN],\n" @@ -668,7 +665,6 @@ " »always«, »never« ali »auto«\n" " -U, --binary ne porežemo znakov CR na koncu vrstic \n" " (MS-DOS/Windows)\n" -" -u, --unix-byte-offsets v odmikih ne štejemo znakov CR (MS-DOS/Windows)\n" "\n" #: src/grep.c:1994 @@ -676,13 +672,13 @@ msgid "" "When FILE is '-', read standard input. With no FILE, read '.' if\n" "recursive, '-' otherwise. With fewer than two FILEs, assume -h.\n" -"Exit status is 0 if any line is selected, 1 otherwise;\n" +"Exit status is 0 if any line (or file if -L) is selected, 1 otherwise;\n" "if any error occurs and -q is not given, the exit status is 2.\n" msgstr "" "Če je podana DATOTEKA enaka »-«, se bere s standardnega vhoda. Če\n" -"DATOTEKA ni podana, se bere ».«, kadar je podana izbira »-r«, sicer\n" -"»-«. Če sta podani manj kot dve DATOTEKI, se privzame izbira\n" -"»-h«. Izhodna koda je 0 ob vsaj eni vrstici zadetka, sicer pa 1; če je\n" +"DATOTEKA ni podana, se bere ».«, kadar je podana izbira »--recursive«,\n" +"sicer »-«. Če sta podani manj kot dve DATOTEKI, se privzame izbira »-h«.\n" +"Izhodna koda je 0 ob vsaj eni izbrani vrstici, sicer pa 1; če je\n" "prišlo do napake in ni bila podana izbira -q, program vrne kodo 2.\n" # Sporočilo se pojavi pri nedokumentirani izbiri -X @@ -699,29 +695,36 @@ msgid "invalid matcher %s" msgstr "neveljaven ujemalnik %s" -#: src/grep.c:2458 +#: src/grep.c:2459 #, c-format msgid "warning: GREP_OPTIONS is deprecated; please use an alias or script" msgstr "" "opozorilo: uporabo GREP_OPTIONS odsvetujemo; uporabite alias ali skript" -#: src/grep.c:2485 +#: src/grep.c:2486 msgid "unknown devices method" msgstr "neznana metoda datotek naprav" -#: src/grep.c:2629 +#: src/grep.c:2630 msgid "invalid max count" msgstr "neveljavno največje število" -#: src/grep.c:2687 +#: src/grep.c:2688 msgid "unknown binary-files type" msgstr "neznan tip binarne datoteke" -#: src/pcresearch.c:80 +#: src/grep.c:2770 +#, fuzzy +msgid "" +"Written by Mike Haertel and others; see\n" +"." +msgstr "drugi, glejte " + +#: src/pcresearch.c:86 msgid "failed to allocate memory for the PCRE JIT stack" msgstr "pomnilnika za sklad PCRE JIT se ni uspelo dodeliti" -#: src/pcresearch.c:97 +#: src/pcresearch.c:118 msgid "" "support for the -P option is not compiled into this --disable-perl-regexp " "binary" @@ -729,39 +732,42 @@ "podpora za izbiro -P ni bila vključena v ta prevedeni program (--disable-" "perl-regexp)" -#: src/pcresearch.c:119 +#: src/pcresearch.c:140 msgid "-P supports only unibyte and UTF-8 locales" msgstr "-P podpira samo enobajtna kodiranja in UTF-8" -#: src/pcresearch.c:125 +#: src/pcresearch.c:146 msgid "the -P option only supports a single pattern" msgstr "izbira -P podpira le en vzorec" -#: src/pcresearch.c:167 +#: src/pcresearch.c:189 msgid "internal error (should never happen)" msgstr "interna napaka (to tega ne bi smelo priti)" -#: src/pcresearch.c:192 +#: src/pcresearch.c:214 msgid "internal error" msgstr "interna napaka" -#: src/pcresearch.c:215 +#: src/pcresearch.c:237 msgid "exceeded PCRE's line length limit" msgstr "prekoračena meja PCRE za dolžino vrstice" -#: src/pcresearch.c:295 +#: src/pcresearch.c:317 msgid "exhausted PCRE JIT stack" msgstr "prekoračitev sklada PCRE JIT" -#: src/pcresearch.c:299 +#: src/pcresearch.c:321 msgid "exceeded PCRE's backtracking limit" msgstr "prekoračena meja PCRE za iskanje s povratnim sledenjem" -#: src/pcresearch.c:306 +#: src/pcresearch.c:328 #, c-format msgid "internal PCRE error: %d" msgstr "interna napaka PCRE: %d" +#~ msgid "Mike Haertel" +#~ msgstr "Mike Haertel" + #~ msgid "%s: option '--%s' doesn't allow an argument\n" #~ msgstr "%s: izbira »--%s« ne dovoljuje argumenta\n" @@ -777,6 +783,9 @@ #~ msgid "%s: option '-W %s' requires an argument\n" #~ msgstr "%s: izbira »-W %s« zahteva argument\n" +#~ msgid "lseek failed" +#~ msgstr "klic lseek ni uspel" + #~ msgid "PATTERN is, by default, a basic regular expression (BRE).\n" #~ msgstr "VZOREC je privzeto osnovni regularni izraz (ORI).\n" @@ -787,9 +796,6 @@ #~ "Ukaz »egrep« pomeni isto kot »grep -E«, »fgrep« pa isto kot »grep -F«.\n" #~ "Neposredna raba ukazov »egrep« ali »fgrep« je odsvetovana.\n" -#~ msgid "lseek failed" -#~ msgstr "klic lseek ni uspel" - #~ msgid "GNU Grep home page: <%s>\n" #~ msgstr "Spletna stran GNU Grep: <%s>\n" Binary files /tmp/tmppJ6Y2n/6jFha9hbxv/grep-3.1/po/sr.gmo and /tmp/tmppJ6Y2n/tYMwNxGD36/grep-3.3/po/sr.gmo differ diff -Nru grep-3.1/po/sr.po grep-3.3/po/sr.po --- grep-3.1/po/sr.po 2017-07-02 20:21:16.000000000 +0000 +++ grep-3.3/po/sr.po 2018-12-21 04:39:02.000000000 +0000 @@ -1,23 +1,23 @@ # Serbian translation of grep -# Copyright (C) 2014 Free Software Foundation, Inc. +# Copyright © 2017 Free Software Foundation, Inc. # This file is distributed under the same license as the grep package. # Danilo Segan , 2003. -# Мирослав Николић , 2011—2016. +# Мирослав Николић , 2011—2017. msgid "" msgstr "" -"Project-Id-Version: grep-2.23.7\n" +"Project-Id-Version: grep-3.0.23-b00\n" "Report-Msgid-Bugs-To: bug-grep@gnu.org\n" -"POT-Creation-Date: 2017-07-02 13:21-0700\n" -"PO-Revision-Date: 2016-03-05 09:37+0200\n" +"POT-Creation-Date: 2018-12-20 20:39-0800\n" +"PO-Revision-Date: 2017-08-06 14:20+0200\n" "Last-Translator: Мирослав Николић \n" "Language-Team: Serbian <(nothing)>\n" "Language: sr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Bugs: Report translation errors to the Language-Team address.\n" "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" "%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" +"X-Bugs: Report translation errors to the Language-Team address.\n" #: lib/argmatch.c:134 #, c-format @@ -33,43 +33,51 @@ msgid "Valid arguments are:" msgstr "Исправни аргументи су:" -#: lib/closeout.c:122 src/grep.c:1274 +#: lib/c-stack.c:208 lib/c-stack.c:301 +msgid "program error" +msgstr "" + +#: lib/c-stack.c:209 lib/c-stack.c:302 +msgid "stack overflow" +msgstr "" + +#: lib/closeout.c:122 src/grep.c:1273 msgid "write error" msgstr "грешка писања" -#: lib/dfa.c:958 +#: lib/dfa.c:970 msgid "unbalanced [" msgstr "неуравнотежена [" -#: lib/dfa.c:1079 +#: lib/dfa.c:1091 msgid "invalid character class" msgstr "неисправна класа знака" -#: lib/dfa.c:1205 +#: lib/dfa.c:1217 msgid "character class syntax is [[:space:]], not [:space:]" msgstr "синтакса класе знака је [[:размак:]], а не [:размак:]" -#: lib/dfa.c:1272 +#: lib/dfa.c:1284 msgid "unfinished \\ escape" msgstr "недовршена \\ излазим" -#: lib/dfa.c:1433 +#: lib/dfa.c:1445 msgid "invalid content of \\{\\}" msgstr "неисправан садржај \\{\\}" -#: lib/dfa.c:1436 +#: lib/dfa.c:1448 msgid "regular expression too big" msgstr "регуларни израз је превелик" -#: lib/dfa.c:1850 +#: lib/dfa.c:1863 msgid "unbalanced (" msgstr "неуравнотежена (" -#: lib/dfa.c:1968 +#: lib/dfa.c:1981 msgid "no syntax specified" msgstr "синтакса није наведена" -#: lib/dfa.c:1976 +#: lib/dfa.c:1992 msgid "unbalanced )" msgstr "неуравнотежена )" @@ -78,29 +86,29 @@ msgstr "Непозната системска грешка" #: lib/getopt.c:278 -#, fuzzy, c-format +#, c-format msgid "%s: option '%s%s' is ambiguous\n" -msgstr "%s: опција „%s“ је нејасна\n" +msgstr "%s: опција „%s%s“ је нејасна\n" #: lib/getopt.c:284 -#, fuzzy, c-format +#, c-format msgid "%s: option '%s%s' is ambiguous; possibilities:" -msgstr "%s: опција „%s“ је нејасна; могућности:" +msgstr "%s: опција „%s%s“ је нејасна; могућности:" #: lib/getopt.c:319 -#, fuzzy, c-format +#, c-format msgid "%s: unrecognized option '%s%s'\n" -msgstr "%s: непрепознатљива опција „%c%s“\n" +msgstr "%s: непрепознатљива опција „%s%s“\n" #: lib/getopt.c:345 -#, fuzzy, c-format +#, c-format msgid "%s: option '%s%s' doesn't allow an argument\n" -msgstr "%s: опција „%c%s“ не дозвољава аргумент\n" +msgstr "%s: опција „%s%s“ не дозвољава аргумент\n" #: lib/getopt.c:360 -#, fuzzy, c-format +#, c-format msgid "%s: option '%s%s' requires an argument\n" -msgstr "%s: опција „--%s“ захтева аргумент\n" +msgstr "%s: опција „%s%s“ захтева аргумент\n" #: lib/getopt.c:621 #, c-format @@ -112,7 +120,7 @@ msgid "%s: option requires an argument -- '%c'\n" msgstr "%s: опција захтева аргумент —— „%c“\n" -#: lib/obstack.c:338 lib/obstack.c:340 lib/xalloc-die.c:34 src/pcresearch.c:291 +#: lib/obstack.c:338 lib/obstack.c:340 lib/xalloc-die.c:34 src/pcresearch.c:313 msgid "memory exhausted" msgstr "меморија је потрошена" @@ -129,7 +137,7 @@ #: lib/xbinary-io.c:37 #, c-format msgid "failed to set file descriptor text/binary mode" -msgstr "" +msgstr "нисам успео да подесим текстуални/бинарни режим описника датотеке" #. TRANSLATORS: #. Get translations for open and closing quotation marks. @@ -150,7 +158,7 @@ #. for your locale. #. #. If you don't know what to put here, please see -#. +#. #. and use glyphs suitable for your language. #: lib/quotearg.c:362 msgid "`" @@ -229,16 +237,16 @@ msgid "Unmatched ) or \\)" msgstr "Не одговара ) или \\)" -#: lib/regcomp.c:687 +#: lib/regcomp.c:688 msgid "No previous regular expression" msgstr "Нема претходног регуларног израза" -#: lib/version-etc.c:74 +#: lib/version-etc.c:73 #, c-format msgid "Packaged by %s (%s)\n" msgstr "Запаковао је %s (%s)\n" -#: lib/version-etc.c:77 +#: lib/version-etc.c:76 #, c-format msgid "Packaged by %s\n" msgstr "Запаковао је %s\n" @@ -246,14 +254,15 @@ #. TRANSLATORS: Translate "(C)" to the copyright symbol #. (C-in-a-circle), if this symbol is available in the user's #. locale. Otherwise, do not translate "(C)"; leave it as-is. -#: lib/version-etc.c:84 +#: lib/version-etc.c:83 msgid "(C)" msgstr "©" -#: lib/version-etc.c:86 +#: lib/version-etc.c:85 +#, fuzzy msgid "" "\n" -"License GPLv3+: GNU GPL version 3 or later .\n" "This is free software: you are free to change and redistribute it.\n" "There is NO WARRANTY, to the extent permitted by law.\n" @@ -398,12 +407,13 @@ msgstr "%s матична страница: <%s>\n" #: lib/version-etc.c:253 -#, c-format -msgid "%s home page: \n" +#, fuzzy, c-format +msgid "%s home page: \n" msgstr "%s матична страница: \n" #: lib/version-etc.c:256 -msgid "General help using GNU software: \n" +#, fuzzy +msgid "General help using GNU software: \n" msgstr "Општа помоћ за Гнуов софтвер: \n" #: lib/xstrtol-error.c:63 @@ -421,93 +431,86 @@ msgid "%s%s argument '%s' too large" msgstr "%s%s аргумент „%s“ је превелик" -#. This is a proper name. See the gettext manual, section Names. -#: src/grep.c:59 -msgid "Mike Haertel" -msgstr "Мајк Хартел" - -#: src/grep.c:60 -msgid "others, see " -msgstr "остали, погледајте " - -#: src/grep.c:585 +#: src/grep.c:582 msgid "(standard input)" msgstr "(стандардни улаз)" -#: src/grep.c:765 +#: src/grep.c:762 msgid "invalid context length argument" msgstr "неисправан аргумент дужине контекста" -#: src/grep.c:828 +#: src/grep.c:827 msgid "input is too large to count" msgstr "улаз је превелик за пребројавање" -#: src/grep.c:1579 +#: src/grep.c:1578 #, c-format msgid "Binary file %s matches\n" msgstr "Бинарна датотека %s одговара\n" -#: src/grep.c:1627 +#: src/grep.c:1626 #, c-format msgid "warning: %s: %s" msgstr "упозорење: %s: %s" -#: src/grep.c:1628 +#: src/grep.c:1627 msgid "recursive directory loop" msgstr "дубинско вртење кроз директоријуме" -#: src/grep.c:1844 +#: src/grep.c:1843 #, c-format msgid "input file %s is also the output" msgstr "улазна датотека %s је такође излаз" -#: src/grep.c:1907 src/grep.c:1914 -#, c-format -msgid "Usage: %s [OPTION]... PATTERN [FILE]...\n" +#: src/grep.c:1906 src/grep.c:1913 +#, fuzzy, c-format +msgid "Usage: %s [OPTION]... PATTERNS [FILE]...\n" msgstr "Употреба: %s [ОПЦИЈА]... ШАБЛОН [ДАТОТЕКА]...\n" -#: src/grep.c:1909 +#: src/grep.c:1908 #, c-format msgid "Try '%s --help' for more information.\n" msgstr "Пробајте „%s --help“ за више података.\n" -#: src/grep.c:1915 +#: src/grep.c:1914 #, fuzzy, c-format -msgid "Search for PATTERN in each FILE.\n" -msgstr "Тражи наведени ШАБЛОН у свакој датотеци или стандардном улазу.\n" +msgid "Search for PATTERNS in each FILE.\n" +msgstr "Тражи наведени ШАБЛОН у свакој ДАТОТЕЦИ.\n" -#: src/grep.c:1916 +#: src/grep.c:1915 #, fuzzy, c-format msgid "" "Example: %s -i 'hello world' menu.h main.c\n" +"PATTERNS can contain multiple patterns separated by newlines.\n" "\n" "Pattern selection and interpretation:\n" msgstr "" "Пример: %s -i „здраво свете“ изборник.h главно.c\n" "\n" -"Избор регуларних израза и обрада:\n" +"Избор шаблона и обрада:\n" #: src/grep.c:1920 #, fuzzy, c-format msgid "" -" -E, --extended-regexp PATTERN is an extended regular expression\n" -" -F, --fixed-strings PATTERN is a set of newline-separated strings\n" -" -G, --basic-regexp PATTERN is a basic regular expression (default)\n" -" -P, --perl-regexp PATTERN is a Perl regular expression\n" +" -E, --extended-regexp PATTERNS are extended regular expressions\n" +" -F, --fixed-strings PATTERNS are strings\n" +" -G, --basic-regexp PATTERNS are basic regular expressions\n" +" -P, --perl-regexp PATTERNS are Perl regular expressions\n" msgstr "" " -E, --extended-regexp ШАБЛОН је проширени регуларан израз\n" " -F, --fixed-strings ШАБЛОН је скуп ниски у новим редовима\n" -" -G, --basic-regexp ШАБЛОН је основни регуларан израз\n" +" -G, --basic-regexp ШАБЛОН је основни регуларан израз " +"(основно)\n" " -P, --perl-regexp ШАБЛОН је Перлов регуларан израз\n" #: src/grep.c:1926 -#, c-format +#, fuzzy, c-format msgid "" -" -e, --regexp=PATTERN use PATTERN for matching\n" -" -f, --file=FILE obtain PATTERN from FILE\n" +" -e, --regexp=PATTERNS use PATTERNS for matching\n" +" -f, --file=FILE take PATTERNS from FILE\n" " -i, --ignore-case ignore case distinctions\n" -" -w, --word-regexp force PATTERN to match only whole words\n" -" -x, --line-regexp force PATTERN to match only whole lines\n" +" -w, --word-regexp match only whole words\n" +" -x, --line-regexp match only whole lines\n" " -z, --null-data a data line ends in 0 byte, not newline\n" msgstr "" " -e, --regexp=ШАБЛОН користи ШАБЛОН за подударање\n" @@ -538,7 +541,7 @@ " --help приказује ову помоћ и излази\n" #: src/grep.c:1940 -#, fuzzy, c-format +#, c-format msgid "" "\n" "Output control:\n" @@ -553,21 +556,21 @@ msgstr "" "\n" "Излазне контроле:\n" -" -m, --max-count=БРОЈ зауставља након БРОЈА поклапања\n" +" -m, --max-count=БРОЈ зауставља након БРОЈА изабраних редова\n" " -b, --byte-offset исписује померај бајта уз редове излаза\n" " -n, --line-number исписује број реда уз редове излаза\n" " --line-buffered претаче излаз на сваком реду\n" -" -H, --with-filename исписује назив датотеке за свако " -"поклапање\n" +" -H, --with-filename исписује назив датотеке са редовима " +"излаза\n" " -h, --no-filename потискује додавање префикса називу " "датотеке на излазу\n" " --label=НАТПИС користи НАТПИС као префикс назива датотеке " "стандардног улаза\n" #: src/grep.c:1951 -#, c-format +#, fuzzy, c-format msgid "" -" -o, --only-matching show only the part of a line matching PATTERN\n" +" -o, --only-matching show only nonempty parts of lines that match\n" " -q, --quiet, --silent suppress all normal output\n" " --binary-files=TYPE assume that binary files are TYPE;\n" " TYPE is 'binary', 'text', or 'without-match'\n" @@ -603,14 +606,13 @@ " -R, --dereference-recursive слично, али прати све симболичке везе\n" #: src/grep.c:1967 -#, c-format +#, fuzzy, c-format msgid "" -" --include=FILE_PATTERN search only files that match FILE_PATTERN\n" -" --exclude=FILE_PATTERN skip files and directories matching " -"FILE_PATTERN\n" +" --include=GLOB search only files that match GLOB (a file " +"pattern)\n" +" --exclude=GLOB skip files and directories matching GLOB\n" " --exclude-from=FILE skip files matching any file pattern from FILE\n" -" --exclude-dir=PATTERN directories that match PATTERN will be " -"skipped.\n" +" --exclude-dir=GLOB skip directories that match GLOB\n" msgstr "" " --include=ДАТОТЕКА_ШАБЛОН тражи само датотеке које се поклапају са " "ДАТОТЕКА_ШАБЛОН\n" @@ -622,7 +624,7 @@ "ШАБЛОНОМ биће прескочени.\n" #: src/grep.c:1974 -#, fuzzy, c-format +#, c-format msgid "" " -L, --files-without-match print only names of FILEs with no selected " "lines\n" @@ -631,11 +633,11 @@ " -T, --initial-tab make tabs line up (if needed)\n" " -Z, --null print 0 byte after FILE name\n" msgstr "" -" -L, --files-without-match исписује само називе ДАТОТЕКА које не " -"садрже поклапања\n" -" -l, --files-with-matches исписује само називе ДАТОТЕКА које садрже " -"поклапања\n" -" -c, --count исписује само број поклопљених редова по " +" -L, --files-without-match исписује само називе ДАТОТЕКА без " +"изабраних редова\n" +" -l, --files-with-matches исписује само називе ДАТОТЕКА са изабраним " +"редовима\n" +" -c, --count исписује само број изабраних редова по " "ДАТОТЕЦИ\n" " -T, --initial-tab помера табове ред горе (ако је потребно)\n" " -Z, --null исписује 0-ти бајт након назива ДАТОТЕКЕ\n" @@ -656,7 +658,7 @@ " -C, --context=БРОЈ исписује БРОЈ редова излазног контекста\n" #: src/grep.c:1987 -#, fuzzy, c-format +#, c-format msgid "" " -NUM same as --context=NUM\n" " --color[=WHEN],\n" @@ -674,8 +676,6 @@ "„auto“.\n" " -U, --binary не исеца ЦР знакове на крају реда (МСДОС/" "Виндоуз)\n" -" -u, --unix-byte-offsets пријављује помераје као да ЦР-ови нису " -"били ту (МСДОС/Виндоуз)\n" "\n" #: src/grep.c:1994 @@ -683,12 +683,12 @@ msgid "" "When FILE is '-', read standard input. With no FILE, read '.' if\n" "recursive, '-' otherwise. With fewer than two FILEs, assume -h.\n" -"Exit status is 0 if any line is selected, 1 otherwise;\n" +"Exit status is 0 if any line (or file if -L) is selected, 1 otherwise;\n" "if any error occurs and -q is not given, the exit status is 2.\n" msgstr "" "Када је ДАТОТЕКА „-“, чита стандардни улаз. Без ДАТОТЕКЕ, чита . ако је " -"задато „-r“,\n" -"у супротном „-“. Ако је наведено мање од две ДАТОТЕКЕ, подразумева се „-h“.\n" +"дубински,\n" +"у супротном „-“. Са мање од две ДАТОТЕКЕ, подразумева се „-h“.\n" "Излазно стање је 0 ако је изабран неки ред, у супротном 1;\n" "ако је дошло до неке грешке а „-q“ није дато, онда је излазно стање 2.\n" @@ -701,67 +701,77 @@ msgid "invalid matcher %s" msgstr "неисправан трагач %s" -#: src/grep.c:2458 +#: src/grep.c:2459 #, c-format msgid "warning: GREP_OPTIONS is deprecated; please use an alias or script" msgstr "упозорење: „GREP_OPTIONS“ је застарело; користите алијас или скрипту" -#: src/grep.c:2485 +#: src/grep.c:2486 msgid "unknown devices method" msgstr "непознат метод уређаја" -#: src/grep.c:2629 +#: src/grep.c:2630 msgid "invalid max count" msgstr "неисправан највећи број" -#: src/grep.c:2687 +#: src/grep.c:2688 msgid "unknown binary-files type" msgstr "непозната врста бинарних датотека" -#: src/pcresearch.c:80 +#: src/grep.c:2770 +#, fuzzy +msgid "" +"Written by Mike Haertel and others; see\n" +"." +msgstr "остали, погледајте " + +#: src/pcresearch.c:86 msgid "failed to allocate memory for the PCRE JIT stack" msgstr "нисам успео да доделим меморију за ПЦРЕ ЏИТ спремник" -#: src/pcresearch.c:97 +#: src/pcresearch.c:118 msgid "" "support for the -P option is not compiled into this --disable-perl-regexp " "binary" msgstr "" "подршка за „-P“ опцију није преведена у овој „--disable-perl-regexp“ извршној" -#: src/pcresearch.c:119 +#: src/pcresearch.c:140 msgid "-P supports only unibyte and UTF-8 locales" msgstr "„-P“ подржава само једнобајтне и УТФ-8 језике" -#: src/pcresearch.c:125 +#: src/pcresearch.c:146 msgid "the -P option only supports a single pattern" msgstr "опција „-P“ подржава само самосталне шаблоне" -#: src/pcresearch.c:167 +#: src/pcresearch.c:189 msgid "internal error (should never happen)" msgstr "унутрашња грешка (не треба никада да се деси)" -#: src/pcresearch.c:192 +#: src/pcresearch.c:214 msgid "internal error" msgstr "унутрашња грешка" -#: src/pcresearch.c:215 +#: src/pcresearch.c:237 msgid "exceeded PCRE's line length limit" msgstr "прекорачено је ограничење дужине реда ПЦРЕ-а" -#: src/pcresearch.c:295 +#: src/pcresearch.c:317 msgid "exhausted PCRE JIT stack" msgstr "потрошени ПЦРЕ ЈИТ спремник" -#: src/pcresearch.c:299 +#: src/pcresearch.c:321 msgid "exceeded PCRE's backtracking limit" msgstr "прекорачено је ПЦРЕ-ово ограничење тражења уназад" -#: src/pcresearch.c:306 +#: src/pcresearch.c:328 #, c-format msgid "internal PCRE error: %d" msgstr "унутрашња грешка ПЦРЕ-а: %d" +#~ msgid "Mike Haertel" +#~ msgstr "Мајк Хартел" + #~ msgid "%s: option '--%s' doesn't allow an argument\n" #~ msgstr "%s: опција „--%s“ не дозвољава аргумент\n" @@ -777,6 +787,9 @@ #~ msgid "%s: option '-W %s' requires an argument\n" #~ msgstr "%s: опција „-W %s“ захтева аргумент\n" +#~ msgid "lseek failed" +#~ msgstr "„lseek“ није успело" + #~ msgid "PATTERN is, by default, a basic regular expression (BRE).\n" #~ msgstr "ШАБЛОН је, по основи, основни регуларан израз (BRE).\n" @@ -787,9 +800,6 @@ #~ "„egrep“ значи „grep -E“. „fgrep“ значи „grep -F“.\n" #~ "Директно призивање као „egrep“ или „fgrep“ није одобрено.\n" -#~ msgid "lseek failed" -#~ msgstr "„lseek“ није успело" - #~ msgid "unescaped ^ or $ not supported with -Pz" #~ msgstr "непреспојено ^ или $ није подржано са „-Pz“" Binary files /tmp/tmppJ6Y2n/6jFha9hbxv/grep-3.1/po/sv.gmo and /tmp/tmppJ6Y2n/tYMwNxGD36/grep-3.3/po/sv.gmo differ diff -Nru grep-3.1/po/sv.po grep-3.3/po/sv.po --- grep-3.1/po/sv.po 2017-07-02 20:21:16.000000000 +0000 +++ grep-3.3/po/sv.po 2018-12-21 04:39:02.000000000 +0000 @@ -1,17 +1,17 @@ # Swedish messages for GNU Grep -# Copyright © 1996, 1998, 1999, 2000, 2001, 2006, 2007, 2008, 2009, 2010, 2011, 2014, 2015, 2016, 2017 Free Software Foundation, Inc. +# Copyright © 1996, 1998, 1999, 2000, 2001, 2006, 2007, 2008, 2009, 2010, 2011, 2014, 2015, 2016, 2017, 2018 Free Software Foundation, Inc. # This file is distributed under the same license as the grep package. # Thomas Olsson , 1996. # Daniel Resare , 1998, 1999, 2000, 2001. # Daniel Nylander , 2006, 2007, 2008, 2009, 2010, 2011. -# Anders Jonsson , 2014, 2015, 2016, 2017. +# Anders Jonsson , 2014, 2015, 2016, 2017, 2018. # msgid "" msgstr "" -"Project-Id-Version: grep 3.0.23-b00\n" +"Project-Id-Version: grep 3.1.48\n" "Report-Msgid-Bugs-To: bug-grep@gnu.org\n" -"POT-Creation-Date: 2017-07-02 13:21-0700\n" -"PO-Revision-Date: 2017-07-02 12:59+0200\n" +"POT-Creation-Date: 2018-12-20 20:39-0800\n" +"PO-Revision-Date: 2018-12-16 22:51+0100\n" "Last-Translator: Anders Jonsson \n" "Language-Team: Swedish \n" "Language: sv\n" @@ -19,7 +19,7 @@ "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Bugs: Report translation errors to the Language-Team address.\n" -"X-Generator: Poedit 2.0.2\n" +"X-Generator: Poedit 2.2\n" #: lib/argmatch.c:134 #, c-format @@ -35,43 +35,51 @@ msgid "Valid arguments are:" msgstr "Giltiga argument är:" -#: lib/closeout.c:122 src/grep.c:1274 +#: lib/c-stack.c:208 lib/c-stack.c:301 +msgid "program error" +msgstr "programfel" + +#: lib/c-stack.c:209 lib/c-stack.c:302 +msgid "stack overflow" +msgstr "stacköverspill" + +#: lib/closeout.c:122 src/grep.c:1273 msgid "write error" msgstr "skrivfel" -#: lib/dfa.c:958 +#: lib/dfa.c:970 msgid "unbalanced [" msgstr "obalanserad [" -#: lib/dfa.c:1079 +#: lib/dfa.c:1091 msgid "invalid character class" msgstr "ogiltig teckenklass" -#: lib/dfa.c:1205 +#: lib/dfa.c:1217 msgid "character class syntax is [[:space:]], not [:space:]" msgstr "syntax för teckenklass är [[:space:]], inte [:space:]" -#: lib/dfa.c:1272 +#: lib/dfa.c:1284 msgid "unfinished \\ escape" msgstr "oavslutad \\-sekvens" -#: lib/dfa.c:1433 +#: lib/dfa.c:1445 msgid "invalid content of \\{\\}" msgstr "ogiltigt innehåll i \\{\\}" -#: lib/dfa.c:1436 +#: lib/dfa.c:1448 msgid "regular expression too big" msgstr "reguljärt uttryck är för stort" -#: lib/dfa.c:1850 +#: lib/dfa.c:1863 msgid "unbalanced (" msgstr "obalanserad (" -#: lib/dfa.c:1968 +#: lib/dfa.c:1981 msgid "no syntax specified" msgstr "ingen syntax angiven" -#: lib/dfa.c:1976 +#: lib/dfa.c:1992 msgid "unbalanced )" msgstr "obalanserad )" @@ -114,7 +122,7 @@ msgid "%s: option requires an argument -- '%c'\n" msgstr "%s: flaggan behöver ett argument -- ”%c”\n" -#: lib/obstack.c:338 lib/obstack.c:340 lib/xalloc-die.c:34 src/pcresearch.c:291 +#: lib/obstack.c:338 lib/obstack.c:340 lib/xalloc-die.c:34 src/pcresearch.c:313 msgid "memory exhausted" msgstr "minnet är slut" @@ -156,7 +164,7 @@ #. for your locale. #. #. If you don't know what to put here, please see -#. +#. #. and use glyphs suitable for your language. #: lib/quotearg.c:362 msgid "`" @@ -234,16 +242,16 @@ msgid "Unmatched ) or \\)" msgstr "Omatchad ) eller \\)" -#: lib/regcomp.c:687 +#: lib/regcomp.c:688 msgid "No previous regular expression" msgstr "Inget tidigare reguljärt uttryck" -#: lib/version-etc.c:74 +#: lib/version-etc.c:73 #, c-format msgid "Packaged by %s (%s)\n" msgstr "Paketerad av %s (%s)\n" -#: lib/version-etc.c:77 +#: lib/version-etc.c:76 #, c-format msgid "Packaged by %s\n" msgstr "Paketerad av %s\n" @@ -251,22 +259,22 @@ #. TRANSLATORS: Translate "(C)" to the copyright symbol #. (C-in-a-circle), if this symbol is available in the user's #. locale. Otherwise, do not translate "(C)"; leave it as-is. -#: lib/version-etc.c:84 +#: lib/version-etc.c:83 msgid "(C)" msgstr "©" -#: lib/version-etc.c:86 +#: lib/version-etc.c:85 msgid "" "\n" -"License GPLv3+: GNU GPL version 3 or later .\n" "This is free software: you are free to change and redistribute it.\n" "There is NO WARRANTY, to the extent permitted by law.\n" "\n" msgstr "" "\n" -"Licens GPLv3+: GNU GPL version 3 eller senare \n" +"Licens GPLv3+: GNU GPL version 3 eller senare .\n" "Det här är fri programvara: du får ändra och distribuera den.\n" "Det finns INGEN GARANTI, så långt som tillåts enligt lag.\n" "\n" @@ -407,12 +415,12 @@ #: lib/version-etc.c:253 #, c-format -msgid "%s home page: \n" -msgstr "Webbplats för %s: \n" +msgid "%s home page: \n" +msgstr "Webbplats för %s: \n" #: lib/version-etc.c:256 -msgid "General help using GNU software: \n" -msgstr "Allmän hjälp för GNU-programvara: \n" +msgid "General help using GNU software: \n" +msgstr "Allmän hjälp för GNU-programvara: \n" #: lib/xstrtol-error.c:63 #, c-format @@ -429,103 +437,94 @@ msgid "%s%s argument '%s' too large" msgstr "%s%s-argumentet ”%s” är för stort" -#. This is a proper name. See the gettext manual, section Names. -#: src/grep.c:59 -msgid "Mike Haertel" -msgstr "Mike Haertel" - -#: src/grep.c:60 -msgid "others, see " -msgstr "andra, se " - -#: src/grep.c:585 +#: src/grep.c:582 msgid "(standard input)" msgstr "(standard in)" -#: src/grep.c:765 +#: src/grep.c:762 msgid "invalid context length argument" msgstr "ogiltigt argument till -A, -B eller -C" -#: src/grep.c:828 +#: src/grep.c:827 msgid "input is too large to count" msgstr "det är för mycket indata för att räkna" -#: src/grep.c:1579 +#: src/grep.c:1578 #, c-format msgid "Binary file %s matches\n" msgstr "Binär fil %s matchar\n" -#: src/grep.c:1627 +#: src/grep.c:1626 #, c-format msgid "warning: %s: %s" msgstr "varning: %s: %s" -#: src/grep.c:1628 +#: src/grep.c:1627 msgid "recursive directory loop" msgstr "rekursiv katalogloop" -#: src/grep.c:1844 +#: src/grep.c:1843 #, c-format msgid "input file %s is also the output" msgstr "inmatningsfilen %s är även utmatningen" -#: src/grep.c:1907 src/grep.c:1914 +#: src/grep.c:1906 src/grep.c:1913 #, c-format -msgid "Usage: %s [OPTION]... PATTERN [FILE]...\n" +msgid "Usage: %s [OPTION]... PATTERNS [FILE]...\n" msgstr "Användning: %s [FLAGGA]... MÖNSTER [FIL]...\n" -#: src/grep.c:1909 +#: src/grep.c:1908 #, c-format msgid "Try '%s --help' for more information.\n" msgstr "Försök med ”%s --help” för mer information\n" -#: src/grep.c:1915 +#: src/grep.c:1914 #, c-format -msgid "Search for PATTERN in each FILE.\n" +msgid "Search for PATTERNS in each FILE.\n" msgstr "Sök efter MÖNSTER i varje FIL.\n" -#: src/grep.c:1916 +#: src/grep.c:1915 #, c-format msgid "" "Example: %s -i 'hello world' menu.h main.c\n" +"PATTERNS can contain multiple patterns separated by newlines.\n" "\n" "Pattern selection and interpretation:\n" msgstr "" "Exempel: %s -i \"hello world\" menu.h main.c\n" +"MÖNSTER kan innehålla flera mönster åtskilda av nyradstecken.\n" "\n" "Val och tolkning av mönster:\n" #: src/grep.c:1920 #, c-format msgid "" -" -E, --extended-regexp PATTERN is an extended regular expression\n" -" -F, --fixed-strings PATTERN is a set of newline-separated strings\n" -" -G, --basic-regexp PATTERN is a basic regular expression (default)\n" -" -P, --perl-regexp PATTERN is a Perl regular expression\n" -msgstr "" -" -E, --extended-regexp MÖNSTER är ett utökat reguljärt uttryck\n" -" -F, --fixed-strings MÖNSTER är ett antal strängar separerade med " -"nyrad\n" -" -G, --basic-regexp MÖNSTER är ett enkelt reguljärt uttryck " -"(standard)\n" -" -P, --perl-regexp MÖNSTER är ett reguljärt uttryck som i Perl\n" +" -E, --extended-regexp PATTERNS are extended regular expressions\n" +" -F, --fixed-strings PATTERNS are strings\n" +" -G, --basic-regexp PATTERNS are basic regular expressions\n" +" -P, --perl-regexp PATTERNS are Perl regular expressions\n" +msgstr "" +" -E, --extended-regexp MÖNSTER är utökade reguljära uttryck\n" +" -F, --fixed-strings MÖNSTER är strängar\n" +" -G, --basic-regexp MÖNSTER är enkla reguljära uttryck\n" +" -P, --perl-regexp MÖNSTER är reguljära uttryck som i Perl\n" #: src/grep.c:1926 #, c-format msgid "" -" -e, --regexp=PATTERN use PATTERN for matching\n" -" -f, --file=FILE obtain PATTERN from FILE\n" +" -e, --regexp=PATTERNS use PATTERNS for matching\n" +" -f, --file=FILE take PATTERNS from FILE\n" " -i, --ignore-case ignore case distinctions\n" -" -w, --word-regexp force PATTERN to match only whole words\n" -" -x, --line-regexp force PATTERN to match only whole lines\n" +" -w, --word-regexp match only whole words\n" +" -x, --line-regexp match only whole lines\n" " -z, --null-data a data line ends in 0 byte, not newline\n" msgstr "" -" -e, --regexp=MÖNSTER använd MÖNSTER som ett reguljärt uttryck\n" -" -f, --file=FIL hämta MÖNSTER från FIL\n" -" -i, --ignore-case skilj ej på gemener och versaler\n" -" -w, --word-regexp tvinga MÖNSTER att endast matcha hela ord\n" -" -x, --line-regexp tvinga MÖNSTER att endast matcha hela rader\n" -" -z, --null-data en datarad slutar i 0 byte, inte nyradstecken\n" +" -e, --regexp=MÖNSTER använd MÖNSTER som ett reguljärt uttryck\n" +" -f, --file=FIL ta MÖNSTER från FIL\n" +" -i, --ignore-case skilj ej på gemener och versaler\n" +" -w, --word-regexp matcha endast hela ord\n" +" -x, --line-regexp matcha endast hela rader\n" +" -z, --null-data en datarad slutar i 0 byte, inte nyradstecken\n" #: src/grep.c:1933 #, c-format @@ -572,14 +571,14 @@ #: src/grep.c:1951 #, c-format msgid "" -" -o, --only-matching show only the part of a line matching PATTERN\n" +" -o, --only-matching show only nonempty parts of lines that match\n" " -q, --quiet, --silent suppress all normal output\n" " --binary-files=TYPE assume that binary files are TYPE;\n" " TYPE is 'binary', 'text', or 'without-match'\n" " -a, --text equivalent to --binary-files=text\n" msgstr "" -" -o, --only-matching visa endast den del av en rad som matchar " -"MÖNSTER\n" +" -o, --only-matching visa endast icke-tomma delar av rader som " +"matchar\n" " -q, --quiet, --silent undertryck all normal utmatning\n" " --binary-files=TYP anta att binärfiler är av TYP;\n" " TYP är ”binary”, ”text” eller ”without-match”\n" @@ -607,19 +606,18 @@ #: src/grep.c:1967 #, c-format msgid "" -" --include=FILE_PATTERN search only files that match FILE_PATTERN\n" -" --exclude=FILE_PATTERN skip files and directories matching " -"FILE_PATTERN\n" +" --include=GLOB search only files that match GLOB (a file " +"pattern)\n" +" --exclude=GLOB skip files and directories matching GLOB\n" " --exclude-from=FILE skip files matching any file pattern from FILE\n" -" --exclude-dir=PATTERN directories that match PATTERN will be " -"skipped.\n" +" --exclude-dir=GLOB skip directories that match GLOB\n" msgstr "" -" --include=FILMÖNSTER sök endast filer som matchar FILMÖNSTER\n" -" --exclude=FILMÖNSTER hoppa över filer/kataloger som matchar " -"FILMÖNSTER\n" +" --include=GLOB sök endast filer som matchar GLOB (ett " +"filmönster)\n" +" --exclude=GLOB hoppa över filer/kataloger som matchar GLOB\n" " --exclude-from=FIL hoppa över filer som matchar filmönster från " "FIL\n" -" --exclude-dir=MÖNSTER kataloger som matchar MÖNSTER hoppas över.\n" +" --exclude-dir=GLOB kataloger som matchar GLOB hoppas över\n" #: src/grep.c:1974 #, c-format @@ -677,12 +675,12 @@ msgid "" "When FILE is '-', read standard input. With no FILE, read '.' if\n" "recursive, '-' otherwise. With fewer than two FILEs, assume -h.\n" -"Exit status is 0 if any line is selected, 1 otherwise;\n" +"Exit status is 0 if any line (or file if -L) is selected, 1 otherwise;\n" "if any error occurs and -q is not given, the exit status is 2.\n" msgstr "" "När FIL är ”-”, läs från standard in. Läs ”.” då FIL saknas om\n" "rekursiv, läs ”-” annars. Om färre än två FILer anges, anta -h.\n" -"Avslutningsstatus är 0 om någon rad valdes, annars 1;\n" +"Avslutningsstatus är 0 om någon rad (eller fil om -L) valdes, annars 1;\n" "om något fel inträffar och -q inte angavs, är avslutningsstatusen 2.\n" #: src/grep.c:2034 @@ -694,28 +692,35 @@ msgid "invalid matcher %s" msgstr "ogiltig matchning %s" -#: src/grep.c:2458 +#: src/grep.c:2459 #, c-format msgid "warning: GREP_OPTIONS is deprecated; please use an alias or script" msgstr "warning: GREP_OPTIONS är föråldrat; använd ett alias eller ett skript" -#: src/grep.c:2485 +#: src/grep.c:2486 msgid "unknown devices method" msgstr "okänd metod för enheter" -#: src/grep.c:2629 +#: src/grep.c:2630 msgid "invalid max count" msgstr "ogiltigt värde för antal träffar" -#: src/grep.c:2687 +#: src/grep.c:2688 msgid "unknown binary-files type" msgstr "okänd binärfiltyp" -#: src/pcresearch.c:80 +#: src/grep.c:2770 +#, fuzzy +msgid "" +"Written by Mike Haertel and others; see\n" +"." +msgstr "andra, se " + +#: src/pcresearch.c:86 msgid "failed to allocate memory for the PCRE JIT stack" msgstr "misslyckades med att allokera minne för JIT-stacken för PCRE" -#: src/pcresearch.c:97 +#: src/pcresearch.c:118 msgid "" "support for the -P option is not compiled into this --disable-perl-regexp " "binary" @@ -723,39 +728,42 @@ "stöd för flaggan -P är inte inbyggd i den här binären med --disable-perl-" "regexp" -#: src/pcresearch.c:119 +#: src/pcresearch.c:140 msgid "-P supports only unibyte and UTF-8 locales" msgstr "-P stöder endast unibyte- och UTF-8-lokaler" -#: src/pcresearch.c:125 +#: src/pcresearch.c:146 msgid "the -P option only supports a single pattern" msgstr "flaggan -P har endast stöd för ett mönster" -#: src/pcresearch.c:167 +#: src/pcresearch.c:189 msgid "internal error (should never happen)" msgstr "internt fel (bör aldrig inträffa)" -#: src/pcresearch.c:192 +#: src/pcresearch.c:214 msgid "internal error" msgstr "internt fel" -#: src/pcresearch.c:215 +#: src/pcresearch.c:237 msgid "exceeded PCRE's line length limit" msgstr "översteg radlängdsgräns för PCRE" -#: src/pcresearch.c:295 +#: src/pcresearch.c:317 msgid "exhausted PCRE JIT stack" msgstr "fyllde JIT-stacken för PCRE" -#: src/pcresearch.c:299 +#: src/pcresearch.c:321 msgid "exceeded PCRE's backtracking limit" msgstr "översteg gräns för PCRE-bakåtspårning" -#: src/pcresearch.c:306 +#: src/pcresearch.c:328 #, c-format msgid "internal PCRE error: %d" msgstr "internt PCRE-fel: %d" +#~ msgid "Mike Haertel" +#~ msgstr "Mike Haertel" + #~ msgid "%s: option '--%s' doesn't allow an argument\n" #~ msgstr "%s: flaggan ”--%s” tillåter inget argument\n" Binary files /tmp/tmppJ6Y2n/6jFha9hbxv/grep-3.1/po/th.gmo and /tmp/tmppJ6Y2n/tYMwNxGD36/grep-3.3/po/th.gmo differ diff -Nru grep-3.1/po/th.po grep-3.3/po/th.po --- grep-3.1/po/th.po 2017-07-02 20:21:16.000000000 +0000 +++ grep-3.3/po/th.po 2018-12-21 04:39:02.000000000 +0000 @@ -1,14 +1,14 @@ # Translation of grep messages to Thai. -# Copyright (C) 2016 Free Software Foundation, Inc. +# Copyright (C) 2018 Free Software Foundation, Inc. # This file is distributed under the same license as the grep package. -# Seksan Poltree , 2009-2016. +# Seksan Poltree , 2009-2018. # msgid "" msgstr "" -"Project-Id-Version: grep-2.26.37\n" +"Project-Id-Version: grep-3.1.48\n" "Report-Msgid-Bugs-To: bug-grep@gnu.org\n" -"POT-Creation-Date: 2017-07-02 13:21-0700\n" -"PO-Revision-Date: 2016-12-02 11:46+0700\n" +"POT-Creation-Date: 2018-12-20 20:39-0800\n" +"PO-Revision-Date: 2018-12-17 01:11+0700\n" "Last-Translator: Seksan Poltree \n" "Language-Team: Thai \n" "Language: th\n" @@ -16,7 +16,6 @@ "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Bugs: Report translation errors to the Language-Team address.\n" -"X-Generator: Poedit 1.8.9\n" #: lib/argmatch.c:134 #, c-format @@ -30,45 +29,53 @@ #: lib/argmatch.c:154 msgid "Valid arguments are:" -msgstr "อาร์กิวเมนต์ที่ถูกต้องได้แก่:" +msgstr "อาร์กิวเมนต์ที่ใช้ได้ ได้แก่:" -#: lib/closeout.c:122 src/grep.c:1274 +#: lib/c-stack.c:208 lib/c-stack.c:301 +msgid "program error" +msgstr "โปรแกรมผิดพลาด" + +#: lib/c-stack.c:209 lib/c-stack.c:302 +msgid "stack overflow" +msgstr "stack overflow" + +#: lib/closeout.c:122 src/grep.c:1273 msgid "write error" msgstr "การเขียนผิดพลาด" -#: lib/dfa.c:958 +#: lib/dfa.c:970 msgid "unbalanced [" -msgstr " [ ไม่สมดุลกัน" +msgstr "[ ไม่สมดุลกัน" -#: lib/dfa.c:1079 +#: lib/dfa.c:1091 msgid "invalid character class" msgstr "ชื่อกลุ่มชุดอักขระไม่ถูกต้อง" -#: lib/dfa.c:1205 +#: lib/dfa.c:1217 msgid "character class syntax is [[:space:]], not [:space:]" -msgstr "character class syntax is [[:space:]], not [:space:]" +msgstr "วากยสัมพันธ์ของกลุ่มชุดอักขระ คือ [[:space:]], ไม่ใช่ [:space:]" -#: lib/dfa.c:1272 +#: lib/dfa.c:1284 msgid "unfinished \\ escape" -msgstr "เครื่องหมายหลีก \\ ไม่เสร็จสิ้น" +msgstr "เครื่องหมายหลีก \\ ไม่จบ" -#: lib/dfa.c:1433 +#: lib/dfa.c:1445 msgid "invalid content of \\{\\}" -msgstr "เนื้อหาของ \\{\\} ไม่ถูกต้อง" +msgstr "เนื้อหาของ \\{\\} ไม่ถูกต้อง" -#: lib/dfa.c:1436 +#: lib/dfa.c:1448 msgid "regular expression too big" msgstr "นิพจน์ปกติใหญ่เกินไป" -#: lib/dfa.c:1850 +#: lib/dfa.c:1863 msgid "unbalanced (" msgstr "( ไม่สมดุลกัน" -#: lib/dfa.c:1968 +#: lib/dfa.c:1981 msgid "no syntax specified" msgstr "ไม่ระบุวากยสัมพันธ์" -#: lib/dfa.c:1976 +#: lib/dfa.c:1992 msgid "unbalanced )" msgstr ") ไม่สมดุลกัน" @@ -77,41 +84,41 @@ msgstr "ข้อผิดพลาดของระบบที่ไม่รู้จัก" #: lib/getopt.c:278 -#, fuzzy, c-format +#, c-format msgid "%s: option '%s%s' is ambiguous\n" -msgstr "%s: ตัวเลือก '%s' คลุมเครือไม่ชัดเจน\n" +msgstr "%s: ตัวเลือก '%s%s' คลุมเครือไม่ชัดเจน\n" #: lib/getopt.c:284 -#, fuzzy, c-format +#, c-format msgid "%s: option '%s%s' is ambiguous; possibilities:" -msgstr "%s: ตัวเลือก ‘%s’ คลุมเครือไม่ชัดเจน; เป็นไปได้ที่จะเป็น:" +msgstr "%s: ตัวเลือก '%s%s' คลุมเครือไม่ชัดเจน; เป็นไปได้ที่จะเป็น:" #: lib/getopt.c:319 -#, fuzzy, c-format +#, c-format msgid "%s: unrecognized option '%s%s'\n" -msgstr "%s: ตัวเลือกที่ไม่รู้จัก ‘%c%s’\n" +msgstr "%s: ตัวเลือกที่ไม่รู้จัก '%s%s'\n" #: lib/getopt.c:345 -#, fuzzy, c-format +#, c-format msgid "%s: option '%s%s' doesn't allow an argument\n" -msgstr "%s: ตัวเลือก ‘%c%s’ ไม่อนุญาตให้มีอาร์กิวเมนต์\n" +msgstr "%s: ตัวเลือก '%s%s' ไม่อนุญาตให้มีอาร์กิวเมนต์\n" #: lib/getopt.c:360 -#, fuzzy, c-format +#, c-format msgid "%s: option '%s%s' requires an argument\n" -msgstr "%s: ตัวเลือก ‘—%s’ ต้องการอาร์กิวเมนต์\n" +msgstr "%s: ตัวเลือก '%s%s' ต้องการอาร์กิวเมนต์\n" #: lib/getopt.c:621 #, c-format msgid "%s: invalid option -- '%c'\n" -msgstr "%s: ตัวเลือกไม่ถูกต้อง — ‘%c’\n" +msgstr "%s: ตัวเลือกไม่ถูกต้อง -- '%c'\n" #: lib/getopt.c:636 lib/getopt.c:682 #, c-format msgid "%s: option requires an argument -- '%c'\n" -msgstr "%s: ตัวเลือกต้องการอาร์กิวเมนต์ — ‘%c’\n" +msgstr "%s: ตัวเลือกต้องการอาร์กิวเมนต์ -- '%c'\n" -#: lib/obstack.c:338 lib/obstack.c:340 lib/xalloc-die.c:34 src/pcresearch.c:291 +#: lib/obstack.c:338 lib/obstack.c:340 lib/xalloc-die.c:34 src/pcresearch.c:313 msgid "memory exhausted" msgstr "หน่วยความจำถูกใช้จนหมด" @@ -128,7 +135,7 @@ #: lib/xbinary-io.c:37 #, c-format msgid "failed to set file descriptor text/binary mode" -msgstr "" +msgstr "ล้มเหลวในการตั้งค่าตัวอธิบายไฟล์ในโหมดข้อความ/ไบนารี" #. TRANSLATORS: #. Get translations for open and closing quotation marks. @@ -149,7 +156,7 @@ #. for your locale. #. #. If you don't know what to put here, please see -#. +#. #. and use glyphs suitable for your language. #: lib/quotearg.c:362 msgid "`" @@ -157,7 +164,7 @@ #: lib/quotearg.c:363 msgid "'" -msgstr "‘" +msgstr "'" #: lib/regcomp.c:135 msgid "Success" @@ -225,18 +232,18 @@ #: lib/regcomp.c:183 msgid "Unmatched ) or \\)" -msgstr "ไม่ตรงกันกับ ) หรือ \\) " +msgstr "ไม่ตรงกันกับ ) หรือ \\)" -#: lib/regcomp.c:687 +#: lib/regcomp.c:688 msgid "No previous regular expression" msgstr "ไม่มีนิพจน์ปกติก่อนหน้า" -#: lib/version-etc.c:74 +#: lib/version-etc.c:73 #, c-format msgid "Packaged by %s (%s)\n" msgstr "สร้างแพกเกจโดย %s (%s)\n" -#: lib/version-etc.c:77 +#: lib/version-etc.c:76 #, c-format msgid "Packaged by %s\n" msgstr "สร้างแพกเกจโดย %s\n" @@ -244,23 +251,23 @@ #. TRANSLATORS: Translate "(C)" to the copyright symbol #. (C-in-a-circle), if this symbol is available in the user's #. locale. Otherwise, do not translate "(C)"; leave it as-is. -#: lib/version-etc.c:84 +#: lib/version-etc.c:83 msgid "(C)" msgstr "(C)" -#: lib/version-etc.c:86 +#: lib/version-etc.c:85 msgid "" "\n" -"License GPLv3+: GNU GPL version 3 or later .\n" "This is free software: you are free to change and redistribute it.\n" "There is NO WARRANTY, to the extent permitted by law.\n" "\n" msgstr "" "\n" -"สัญญาอนุญาต GPLv3: GNU GPL รุ่น 3 หรือใหม่กว่า \n" -"นี่เป็นซอฟต์แวร์เสรี: คุณมีอิสระในการปรับเปลี่ยนและการส่งต่อมัน.\n" +"นี่เป็นซอฟต์แวร์เสรี: คุณมีเสรีในการปรับเปลี่ยนและการส่งต่อมัน.\n" "มีการไม่รับประกัน, จากขอบเขตที่อนุญาตโดยกฎหมาย.\n" "\n" @@ -397,123 +404,116 @@ #: lib/version-etc.c:253 #, c-format -msgid "%s home page: \n" +msgid "%s home page: \n" msgstr "โฮมเพจของ %s : \n" #: lib/version-etc.c:256 -msgid "General help using GNU software: \n" -msgstr "ความช่วยเหลือทั่วไปในการใช้ซอฟต์แวร์ GNU: \n" +msgid "General help using GNU software: \n" +msgstr "ความช่วยเหลือทั่วไปในการใช้ซอฟต์แวร์ GNU: \n" #: lib/xstrtol-error.c:63 #, c-format msgid "invalid %s%s argument '%s'" -msgstr "%s%s รับอาร์กิวเมนต์ที่ไม่ถูกต้อง ‘%s’" +msgstr "%s%s รับอาร์กิวเมนต์ที่ไม่ถูกต้อง '%s'" #: lib/xstrtol-error.c:68 #, c-format msgid "invalid suffix in %s%s argument '%s'" -msgstr "คำเสริมท้ายไม่ถูกต้องใน %s%s อาร์กิวเมนต์ ‘%s’" +msgstr "คำเสริมท้ายไม่ถูกต้องใน %s%s อาร์กิวเมนต์ '%s'" #: lib/xstrtol-error.c:72 #, c-format msgid "%s%s argument '%s' too large" -msgstr "%s%s อาร์กิวเมนต์ ‘%s’ ใหญ่มากเกินไป" - -#. This is a proper name. See the gettext manual, section Names. -#: src/grep.c:59 -msgid "Mike Haertel" -msgstr "ไมค์ ฮาเออร์เทล" - -#: src/grep.c:60 -msgid "others, see " -msgstr "อื่น ๆ , ดูที่ " +msgstr "%s%s อาร์กิวเมนต์ '%s' ใหญ่มากเกินไป" -#: src/grep.c:585 +#: src/grep.c:582 msgid "(standard input)" msgstr "(นำเข้ามาตรฐาน)" -#: src/grep.c:765 +#: src/grep.c:762 msgid "invalid context length argument" msgstr "ความยาวบริบทอาร์กิวเมนต์ไม่ถูกต้อง" -#: src/grep.c:828 +#: src/grep.c:827 msgid "input is too large to count" msgstr "ข้อมูลเข้ายาวเกินกว่าจะนับได้" -#: src/grep.c:1579 +#: src/grep.c:1578 #, c-format msgid "Binary file %s matches\n" msgstr "ตรงกันกันกับแฟ้มฐานสอง %s\n" -#: src/grep.c:1627 +#: src/grep.c:1626 #, c-format msgid "warning: %s: %s" msgstr "คำเตือน: %s: %s" -#: src/grep.c:1628 +#: src/grep.c:1627 msgid "recursive directory loop" msgstr "เรียกซ้ำไดเรกทอรีเป็นวงวน" -#: src/grep.c:1844 +#: src/grep.c:1843 #, c-format msgid "input file %s is also the output" msgstr "แฟ้มนำเข้า %s เป็นแฟ้มส่งออกด้วยเหมือนกัน" -#: src/grep.c:1907 src/grep.c:1914 +#: src/grep.c:1906 src/grep.c:1913 #, c-format -msgid "Usage: %s [OPTION]... PATTERN [FILE]...\n" -msgstr "วิธีใช้: %s [OPTION]… PATTERN [FILE]…\n" +msgid "Usage: %s [OPTION]... PATTERNS [FILE]...\n" +msgstr "วิธีใช้: %s [OPTION]… PATTERNS [FILE]…\n" -#: src/grep.c:1909 +#: src/grep.c:1908 #, c-format msgid "Try '%s --help' for more information.\n" -msgstr "ลองใช้ ‘%s —help’ เพื่อข้อมูลเพิ่มเติม.\n" +msgstr "ลองใช้ '%s --help' เพื่อข้อมูลเพิ่มเติม.\n" -#: src/grep.c:1915 -#, fuzzy, c-format -msgid "Search for PATTERN in each FILE.\n" -msgstr "ค้นหาสำหรับ PATTERN ในแต่ละ FILE หรือตัวนำเข้ามาตรฐาน.\n" +#: src/grep.c:1914 +#, c-format +msgid "Search for PATTERNS in each FILE.\n" +msgstr "ค้นหาสำหรับ PATTERNS ในแต่ละ FILE.\n" -#: src/grep.c:1916 -#, fuzzy, c-format +#: src/grep.c:1915 +#, c-format msgid "" "Example: %s -i 'hello world' menu.h main.c\n" +"PATTERNS can contain multiple patterns separated by newlines.\n" "\n" "Pattern selection and interpretation:\n" msgstr "" -"ตัวอย่าง: %s -i ‘hello world’ menu.h main.c\n" +"ตัวอย่าง: %s -i 'hello world' menu.h main.c\n" +"PATTERNS สามารถประกอบด้วยหลายรูปแบบโดยแยกด้วยตัวขึ้นบรรทัดใหม่\n" "\n" "การเลือกนิพจน์ปกติและการแปลความหมาย:\n" #: src/grep.c:1920 -#, fuzzy, c-format +#, c-format msgid "" -" -E, --extended-regexp PATTERN is an extended regular expression\n" -" -F, --fixed-strings PATTERN is a set of newline-separated strings\n" -" -G, --basic-regexp PATTERN is a basic regular expression (default)\n" -" -P, --perl-regexp PATTERN is a Perl regular expression\n" -msgstr "" -" -E, —extended-regexp PATTERN เป็นส่วนขยายนิพจน์ปกติ (ERE)\n" -" -F, —fixed-strings PATTERN เป็นชุดสายอักขระของตัวแบ่งขึ้นบรรทัดใหม่\n" -" -G, —basic-regexp PATTERN เป็นนิพจน์ปกติพื้นฐาน (BRE)\n" -" -P, —perl-regexp PATTERN เป็นนิจน์ปกติภาษา Perl\n" +" -E, --extended-regexp PATTERNS are extended regular expressions\n" +" -F, --fixed-strings PATTERNS are strings\n" +" -G, --basic-regexp PATTERNS are basic regular expressions\n" +" -P, --perl-regexp PATTERNS are Perl regular expressions\n" +msgstr "" +" -E, --extended-regexp PATTERNS เป็นส่วนขยายนิพจน์ปกติ\n" +" -F, --fixed-strings PATTERNS เป็นชุดสายอักขระ\n" +" -G, --basic-regexp PATTERNS เป็นนิพจน์ปกติพื้นฐาน (BRE)\n" +" -P, --perl-regexp PATTERNS เป็นนิพจน์ปกติภาษา Perl\n" #: src/grep.c:1926 #, c-format msgid "" -" -e, --regexp=PATTERN use PATTERN for matching\n" -" -f, --file=FILE obtain PATTERN from FILE\n" +" -e, --regexp=PATTERNS use PATTERNS for matching\n" +" -f, --file=FILE take PATTERNS from FILE\n" " -i, --ignore-case ignore case distinctions\n" -" -w, --word-regexp force PATTERN to match only whole words\n" -" -x, --line-regexp force PATTERN to match only whole lines\n" +" -w, --word-regexp match only whole words\n" +" -x, --line-regexp match only whole lines\n" " -z, --null-data a data line ends in 0 byte, not newline\n" msgstr "" -" -e, —regexp=PATTERN ใช้ PATTERN สำหรับการจับคู่กัน\n" -" -f, —file=FILE รับ PATTERN มาจาก FILE\n" -" -i, —ignore-case เพิกเฉยต่อความแตกต่างอักษรใหญ่เล็ก\n" -" -w, —word-regexp บังคับ PATTERN ให้จับคู่เฉพาะที่ตรงกันทั้งคำเท่านั้น\n" -" -x, —line-regexp บังคับ PATTERN ให้จับคู่เฉพาะที่ตรงกันทั้งบรรทัดเท่าทั้น\n" -" -z, —null-data ข้อมูลบรรทัดจบด้วยขนาด 0 ไบต์, ไม่มีตัวขึ้นบรรทัดใหม่\n" +" -e, --regexp=PATTERN ใช้ PATTERNS สำหรับการจับคู่กัน\n" +" -f, --file=FILE รับ PATTERNS มาจาก FILE\n" +" -i, --ignore-case เพิกเฉยต่อความแตกต่างอักษรใหญ่เล็ก\n" +" -w, --word-regexp บังคับให้จับคู่เฉพาะที่ตรงกันทั้งคำเท่านั้น\n" +" -x, --line-regexp บังคับให้จับคู่เฉพาะที่ตรงกันทั้งบรรทัดเท่าทั้น\n" +" -z, --null-data ข้อมูลบรรทัดจบด้วยขนาด 0 ไบต์, ไม่มีตัวขึ้นบรรทัดใหม่\n" #: src/grep.c:1933 #, c-format @@ -527,13 +527,13 @@ msgstr "" "\n" "เบ็ดเตล็ด:\n" -" -s, —no-messages ระงับข้อความแสดงข้อผิดพลาด\n" -" -v, —invert-match เลือกบรรทัดที่ไม่ตรงกัน\n" -" -V, —version พิมพ์ข้อมูลรุ่นแล้วออก\n" -" —help แสดงความช่วยเหลือนี้แล้วออก\n" +" -s, --no-messages ระงับข้อความแสดงข้อผิดพลาด\n" +" -v, --invert-match เลือกบรรทัดที่ไม่ตรงกัน\n" +" -V, --version พิมพ์ข้อมูลรุ่นแล้วออก\n" +" --help แสดงความช่วยเหลือนี้แล้วออก\n" #: src/grep.c:1940 -#, fuzzy, c-format +#, c-format msgid "" "\n" "Output control:\n" @@ -548,28 +548,28 @@ msgstr "" "\n" "ควบคุมการนำออก:\n" -" -m, —max-count=NUM หยุดหลังจากมีการตรงกัน NUM ครั้ง\n" -" -b, —byte-offset พิมพ์การชดเชยไบต์กับบรรทัดนำออก\n" -" -n, —line-number พิมพ์หมายเลขบรรทัดกับบรรทัดนำออก\n" -" —line-buffered ล้างนำออกบนทุก ๆ บรรทัด\n" -" -H, —with-filename พิมพ์ชื่อแฟ้มที่ตรงกันในแต่ละครั้ง\n" -" -h, —no-filename ระงับคำนำหน้าชื่อแฟ้มในการนำออก\n" -" —label=LABEL พิมพ์ LABEL เป็นชื่อคำนำหน้าแฟ้มสำหรับนำเข้ามาตรฐาน\n" +" -m, --max-count=NUM หยุดหลังจากมี NUM บรรทัดที่ถูกเลือก\n" +" -b, --byte-offset พิมพ์การชดเชยไบต์กับบรรทัดนำออก\n" +" -n, --line-number พิมพ์หมายเลขบรรทัดกับบรรทัดนำออก\n" +" --line-buffered ล้างนำออกบนทุก ๆ บรรทัด\n" +" -H, --with-filename พิมพ์ชื่อแฟ้มกับบรรทัดนำออก\n" +" -h, --no-filename ระงับคำนำหน้าชื่อแฟ้มในการนำออก\n" +" --label=LABEL ใช้ LABEL เป็นชื่อคำนำหน้าแฟ้มสำหรับนำเข้ามาตรฐาน\n" #: src/grep.c:1951 #, c-format msgid "" -" -o, --only-matching show only the part of a line matching PATTERN\n" +" -o, --only-matching show only nonempty parts of lines that match\n" " -q, --quiet, --silent suppress all normal output\n" " --binary-files=TYPE assume that binary files are TYPE;\n" " TYPE is 'binary', 'text', or 'without-match'\n" " -a, --text equivalent to --binary-files=text\n" msgstr "" -" -o, —only-matching แสดงเพียงแต่ส่วนของบรรทัดที่ตรงกันกับ PATTERN\n" -" -q, —quiet, —silent ระงับนำออกปกติทั้งหมด\n" -" —binary-files=TYPE ทึกทักเอาว่าแฟ้มฐานสองเป็น TYPE;\n" -" TYPE เป็น `binary’, `text’, หรือ `without-match’\n" -" -a, —text มีค่าเท่ากันกับ —binary-files=text\n" +" -o, --only-matching แสดงเพียงแต่ส่วนของบรรทัดที่ไม่ว่างเปล่าของบรรทัดที่ตรงกัน\n" +" -q, --quiet, --silent ระงับนำออกปกติทั้งหมด\n" +" --binary-files=TYPE ทึกทักเอาว่าแฟ้มฐานสองเป็น TYPE;\n" +" TYPE เป็น 'binary', 'text', หรือ 'without-match'\n" +" -a, --text มีค่าเท่ากันกับ --binary-files=text\n" #: src/grep.c:1958 #, c-format @@ -582,31 +582,30 @@ " -r, --recursive like --directories=recurse\n" " -R, --dereference-recursive likewise, but follow all symlinks\n" msgstr "" -" -I มีค่าเท่ากันกับ —binary-files=without-match\n" -" -d, —directories=ACTION จะทำการจัดการไดเรกทอรีอย่างไร;\n" -" ACTION เป็น `read’, `recurse’, หรือ `skip’\n" -" -D, —devices=ACTION จะทำการจัดการอุปกรณ์อย่างไร, FIFOs and sockets;\n" -" ACTION is `read’ or `skip’\n" -" -r, —recursive เหมือนกับ —directories=recurse\n" -" -R, —dereference-recursive เช่นกัน, แต่ตาม symlink ทั้งหมด\n" +" -I มีค่าเท่ากันกับ --binary-files=without-match\n" +" -d, --directories=ACTION จะทำการจัดการไดเรกทอรีอย่างไร;\n" +" ACTION เป็น 'read', 'recurse', หรือ 'skip'\n" +" -D, --devices=ACTION จะทำการจัดการอุปกรณ์อย่างไร, FIFOs and sockets;\n" +" ACTION is 'read' or 'skip'\n" +" -r, --recursive เหมือนกับ --directories=recurse\n" +" -R, --dereference-recursive เช่นกัน, แต่ตาม symlink ทั้งหมด\n" #: src/grep.c:1967 #, c-format msgid "" -" --include=FILE_PATTERN search only files that match FILE_PATTERN\n" -" --exclude=FILE_PATTERN skip files and directories matching " -"FILE_PATTERN\n" +" --include=GLOB search only files that match GLOB (a file " +"pattern)\n" +" --exclude=GLOB skip files and directories matching GLOB\n" " --exclude-from=FILE skip files matching any file pattern from FILE\n" -" --exclude-dir=PATTERN directories that match PATTERN will be " -"skipped.\n" +" --exclude-dir=GLOB skip directories that match GLOB\n" msgstr "" -" —include=FILE_PATTERN ค้นหาเพียงแต่แฟ้มที่ตรงกันกับ FILE_PATTERN\n" -" —exclude=FILE_PATTERN ข้ามแฟ้มและไดเร็กทอรีที่ตรงกันกับ FILE_PATTERN\n" -" —exclude-from=FILE ข้ามแฟ้มที่ตรงกันกับแบบแผนแฟ้มจาก FILE\n" -" —exclude-dir=PATTERN ไดเร็กทอรีที่ตรงกันกับ PATTERN จะถูกข้ามไป.\n" +" --include=GLOB ค้นหาเพียงแต่แฟ้มที่ตรงกันกับ GLOB(รูปแบบชื่อไฟล์)\n" +" --exclude=GLOB ข้ามแฟ้มและไดเร็กทอรีที่ตรงกันกับ GLOB\n" +" --exclude-from=FILE ข้ามแฟ้มที่ตรงกันกับแบบแผนแฟ้มจาก FILE\n" +" --exclude-dir=GLOB ข้ามไดเร็กทอรีที่ตรงกันกับ GLOB\n" #: src/grep.c:1974 -#, fuzzy, c-format +#, c-format msgid "" " -L, --files-without-match print only names of FILEs with no selected " "lines\n" @@ -615,11 +614,11 @@ " -T, --initial-tab make tabs line up (if needed)\n" " -Z, --null print 0 byte after FILE name\n" msgstr "" -" -L, —files-without-match พิมพ์เพียงแค่ชื่อของ FILE ที่ไม่ตรงกันกับที่อยู่ภายใน\n" -" -l, —files-with-matches พิมพ์เพียงแค่ชื่อของ FILE ที่มีตรงกับที่อยู่ภายใน\n" -" -c, —count พิมพ์เพียงแต่จำนวนบรรทัดที่ตรงกันที่นับได้ในแต่ละ FILE\n" -" -T, —initial-tab ทำการจัดเตรียมแท็บ (ถ้าจำเป็น)\n" -" -Z, —null พิมพ์ 0 ไบต์หลังชื่อ FILE\n" +" -L, --files-without-match พิมพ์เพียงแค่ชื่อของ FILEs ที่ไม่ตรงกันกับบรรทัดที่ถูกเลือก\n" +" -l, --files-with-matches พิมพ์เพียงแค่ชื่อของ FILEs กับบรรทัดที่ถูกเลือก\n" +" -c, --count พิมพ์เพียงแต่จำนวนบรรทัดที่ตรงกันที่นับได้ในแต่ละ FILE\n" +" -T, --initial-tab ทำการจัดเตรียมแท็บ (ถ้าจำเป็น)\n" +" -Z, --null พิมพ์ 0 ไบต์หลังชื่อ FILE\n" #: src/grep.c:1980 #, c-format @@ -632,12 +631,12 @@ msgstr "" "\n" "ควบคุมบริบท:\n" -" -B, —before-context=NUM พิมพ์ NUM บรรทัดของบริบทส่วนนำ\n" -" -A, —after-context=NUM พิมพ์ NUM บรรทัดของบริบทส่วนตาม\n" -" -C, —context=NUM พิมพ์ NUM บรรทัดของบริบทส่งออก\n" +" -B, --before-context=NUM พิมพ์ NUM บรรทัดของบริบทส่วนนำ\n" +" -A, --after-context=NUM พิมพ์ NUM บรรทัดของบริบทส่วนตาม\n" +" -C, --context=NUM พิมพ์ NUM บรรทัดของบริบทส่งออก\n" #: src/grep.c:1987 -#, fuzzy, c-format +#, c-format msgid "" " -NUM same as --context=NUM\n" " --color[=WHEN],\n" @@ -647,27 +646,25 @@ "Windows)\n" "\n" msgstr "" -" -NUM เหมือนกับ —context=NUM\n" -" —color[=WHEN],\n" -" —colour[=WHEN] ใช้เครื่องหมายกำกับเพื่อเน้นข้อความที่ตรงกัน;\n" -" เมื่อ WHEN ได้แก่ `always’, `never’, หรือ `auto’\n" -" -U, —binary ไม่ต้องถอดอักขระ CR ที่ EOL (MSDOS/Windows)\n" -" -u, —unix-byte-offsets รายงานการชดเชยก็ต่อเมื่อ CR ไม่ได้มีอยู่\n" -" (MSDOS/Windows)\n" +" -NUM เหมือนกับ --context=NUM\n" +" --color[=WHEN],\n" +" --colour[=WHEN] ใช้เครื่องหมายกำกับเพื่อเน้นสายอักขระที่ตรงกัน;\n" +" เมื่อ WHEN ได้แก่ 'always', 'never', หรือ 'auto'\n" +" -U, --binary ไม่ต้องถอดอักขระ CR ที่ EOL (MSDOS/Windows)\n" "\n" #: src/grep.c:1994 -#, fuzzy, c-format +#, c-format msgid "" "When FILE is '-', read standard input. With no FILE, read '.' if\n" "recursive, '-' otherwise. With fewer than two FILEs, assume -h.\n" -"Exit status is 0 if any line is selected, 1 otherwise;\n" +"Exit status is 0 if any line (or file if -L) is selected, 1 otherwise;\n" "if any error occurs and -q is not given, the exit status is 2.\n" msgstr "" -"เมื่อ FILE เป็น -, อ่านจากนำเข้ามาตรฐาน. กับไม่มี FILE อ่าน. ถ้าบรรทัดคำสั่ง\n" -"-r ถูกให้มา, มิฉะนั้น - . ถ้าให้ FILE มาน้อยกว่าสอง. ทึกทักเอาว่าเป็น -h.\n" -"สถานะการออกเป็น 0 เมื่อบรรทัดใด ๆ ถูกเลือก, มิฉะนั้น 1 ;\n" -"ถ้าเกิดข้อผิดพลาดขึ้นและ -q ไม่ได้ถูกให้มา, สถานะการออกเป็น 2.\n" +"เมื่อ FILE เป็น -, อ่านจากนำเข้ามาตรฐาน. กับไม่มี FILE อ่าน. ถ้าเรียกซ้ำ\n" +", - แทน. ถ้าให้ FILE มาน้อยกว่าสอง. ทึกทักเอาว่าเป็น -h\n" +"สถานะการออกเป็น 0 เมื่อบรรทัดใด ๆ (หรือ ไฟล์ถ้า -L)ถูกเลือก, 1แทน ;\n" +"ถ้าเกิดข้อผิดพลาดขึ้นและ -q ไม่ได้ถูกให้มา, สถานะการออกเป็น 2\n" #: src/grep.c:2034 msgid "conflicting matchers specified" @@ -678,80 +675,90 @@ msgid "invalid matcher %s" msgstr "ตัวจับคู่ไม่ถูกต้อง %s" -#: src/grep.c:2458 +#: src/grep.c:2459 #, c-format msgid "warning: GREP_OPTIONS is deprecated; please use an alias or script" msgstr "คำเตือน: GREP_OPTIONS ไม่สนับสนุนให้ใช้ ; กรุณาใช้นามแฝงหรือสคริปต์" -#: src/grep.c:2485 +#: src/grep.c:2486 msgid "unknown devices method" msgstr "ไม่รู้จักกระบวนการอุปกรณ์" -#: src/grep.c:2629 +#: src/grep.c:2630 msgid "invalid max count" msgstr "ตัวนับสูงสุดไม่ถูกต้อง" -#: src/grep.c:2687 +#: src/grep.c:2688 msgid "unknown binary-files type" -msgstr "ไม่รู้จักชนิดแฟ้มฐานสอง" +msgstr "ชนิดแฟ้มไบนารีที่ไม่รู้จัก" -#: src/pcresearch.c:80 +#: src/grep.c:2770 +#, fuzzy +msgid "" +"Written by Mike Haertel and others; see\n" +"." +msgstr "อื่น ๆ , ดูที่ " + +#: src/pcresearch.c:86 msgid "failed to allocate memory for the PCRE JIT stack" msgstr "ล้มเหลวที่จะจัดสรรหน่วยความจำสำหรับสแต็ก PCRE JIT" -#: src/pcresearch.c:97 +#: src/pcresearch.c:118 msgid "" "support for the -P option is not compiled into this --disable-perl-regexp " "binary" -msgstr "การสนับสนุนตัวเลือก -P ไม่ได้ถูกรวบรวมไปยังแฟ้มฐานสอง —disable-perl-regexp นี้" +msgstr "การสนับสนุนตัวเลือก -P ไม่ได้ถูกรวบรวมไปยังแฟ้มฐานสอง --disable-perl-regexp นี้" -#: src/pcresearch.c:119 +#: src/pcresearch.c:140 msgid "-P supports only unibyte and UTF-8 locales" msgstr "-P สนับสนุนเฉพาะโลแคล unibyte และ UTF-8" -#: src/pcresearch.c:125 +#: src/pcresearch.c:146 msgid "the -P option only supports a single pattern" msgstr "ตัวเลือก -P สนับสนุนรูปแบบเดียวเท่านั้น" -#: src/pcresearch.c:167 +#: src/pcresearch.c:189 msgid "internal error (should never happen)" msgstr "ข้อผิดพลาดภายใน (ไม่ควรเกิดขึ้นมาก่อน)" -#: src/pcresearch.c:192 +#: src/pcresearch.c:214 msgid "internal error" msgstr "ข้อผิดพลาดภายใน" -#: src/pcresearch.c:215 +#: src/pcresearch.c:237 msgid "exceeded PCRE's line length limit" msgstr "ขอบเขตความยาวบรรทัด PCRE เกินจากข้อจำกัด" -#: src/pcresearch.c:295 +#: src/pcresearch.c:317 msgid "exhausted PCRE JIT stack" msgstr "แสต็ก PCRE JIT ถูกใช้จนหมดแล้ว" -#: src/pcresearch.c:299 +#: src/pcresearch.c:321 msgid "exceeded PCRE's backtracking limit" msgstr "ขอบเขตการ backtrack ของ PCRE เกินจากข้อจำกัด" -#: src/pcresearch.c:306 +#: src/pcresearch.c:328 #, c-format msgid "internal PCRE error: %d" msgstr "ข้อผิดพลาด PCRE ภายใน: %d" +#~ msgid "Mike Haertel" +#~ msgstr "ไมค์ ฮาเออร์เทล" + #~ msgid "%s: option '--%s' doesn't allow an argument\n" -#~ msgstr "%s: ตัวเลือก ‘—%s’ ไม่อนุญาตให้มีอาร์กิวเมนต์\n" +#~ msgstr "%s: ตัวเลือก '--%s' ไม่อนุญาตให้มีอาร์กิวเมนต์\n" #~ msgid "%s: unrecognized option '--%s'\n" -#~ msgstr "%s: ตัวเลือกที่ไม่รู้จัก ‘—%s’\n" +#~ msgstr "%s: ตัวเลือกที่ไม่รู้จัก '--%s'\n" #~ msgid "%s: option '-W %s' is ambiguous\n" -#~ msgstr "%s: ตัวเลือก ‘-W %s’ คลุมเครือไม่ชัดเจน\n" +#~ msgstr "%s: ตัวเลือก '-W %s' คลุมเครือไม่ชัดเจน\n" #~ msgid "%s: option '-W %s' doesn't allow an argument\n" -#~ msgstr "%s: ตัวเลือก ‘-W %s’ ไม่อนุญาตให้มีอาร์กิวเมนต์\n" +#~ msgstr "%s: ตัวเลือก '-W %s' ไม่อนุญาตให้มีอาร์กิวเมนต์\n" #~ msgid "%s: option '-W %s' requires an argument\n" -#~ msgstr "%s: ตัวเลือก ‘-W %s’ ต้องการอาร์กิวเมนต์\n" +#~ msgstr "%s: ตัวเลือก '-W %s' ต้องการอาร์กิวเมนต์\n" #~ msgid "PATTERN is, by default, a basic regular expression (BRE).\n" #~ msgstr "PATTERN โดยมาตรฐานเป็นนิพจน์ปกติพื้นฐาน (BRE).\n" @@ -760,8 +767,8 @@ #~ "'egrep' means 'grep -E'. 'fgrep' means 'grep -F'.\n" #~ "Direct invocation as either 'egrep' or 'fgrep' is deprecated.\n" #~ msgstr "" -#~ "‘egrep’ หมายถึง `grep -E’. ‘fgrep’ หมายถึง `grep -F’.\n" -#~ "การร้องขอโดยตรงทั้ง `egrep’ หรือ `fgrep’ ไม่แนะนำให้ใช้.\n" +#~ "'egrep' หมายถึง 'grep -E'. 'fgrep' หมายถึง 'grep -F'.\n" +#~ "การร้องขอโดยตรงทั้ง 'egrep' หรือ 'fgrep' ไม่แนะนำให้ใช้.\n" #~ msgid "lseek failed" #~ msgstr "lseek ล้มเหลว" Binary files /tmp/tmppJ6Y2n/6jFha9hbxv/grep-3.1/po/tr.gmo and /tmp/tmppJ6Y2n/tYMwNxGD36/grep-3.3/po/tr.gmo differ diff -Nru grep-3.1/po/tr.po grep-3.3/po/tr.po --- grep-3.1/po/tr.po 2017-07-02 20:21:16.000000000 +0000 +++ grep-3.3/po/tr.po 2018-12-21 04:39:02.000000000 +0000 @@ -6,7 +6,7 @@ msgstr "" "Project-Id-Version: grep 2.5.1a\n" "Report-Msgid-Bugs-To: bug-grep@gnu.org\n" -"POT-Creation-Date: 2017-07-02 13:21-0700\n" +"POT-Creation-Date: 2018-12-20 20:39-0800\n" "PO-Revision-Date: 2005-03-04 16:37+0300\n" "Last-Translator: Nilgün Belma Bugüner \n" "Language-Team: Turkish \n" @@ -31,48 +31,56 @@ msgid "Valid arguments are:" msgstr "" -#: lib/closeout.c:122 src/grep.c:1274 +#: lib/c-stack.c:208 lib/c-stack.c:301 +msgid "program error" +msgstr "" + +#: lib/c-stack.c:209 lib/c-stack.c:302 +msgid "stack overflow" +msgstr "" + +#: lib/closeout.c:122 src/grep.c:1273 msgid "write error" msgstr "" -#: lib/dfa.c:958 +#: lib/dfa.c:970 #, fuzzy msgid "unbalanced [" msgstr "Karşılıksız [" -#: lib/dfa.c:1079 +#: lib/dfa.c:1091 msgid "invalid character class" msgstr "" -#: lib/dfa.c:1205 +#: lib/dfa.c:1217 msgid "character class syntax is [[:space:]], not [:space:]" msgstr "" -#: lib/dfa.c:1272 +#: lib/dfa.c:1284 #, fuzzy msgid "unfinished \\ escape" msgstr "Tamamlanmamış \\ öncelemi" -#: lib/dfa.c:1433 +#: lib/dfa.c:1445 #, fuzzy msgid "invalid content of \\{\\}" msgstr "en çok miktarı geçersiz" -#: lib/dfa.c:1436 +#: lib/dfa.c:1448 msgid "regular expression too big" msgstr "" -#: lib/dfa.c:1850 +#: lib/dfa.c:1863 #, fuzzy msgid "unbalanced (" msgstr "Karşılıksız (" -#: lib/dfa.c:1968 +#: lib/dfa.c:1981 #, fuzzy msgid "no syntax specified" msgstr "Sözdizimi belirtilmemiş" -#: lib/dfa.c:1976 +#: lib/dfa.c:1992 #, fuzzy msgid "unbalanced )" msgstr "Karşılıksız )" @@ -116,7 +124,7 @@ msgid "%s: option requires an argument -- '%c'\n" msgstr "%s: seçenek bir argümanla kullanılır -- %c\n" -#: lib/obstack.c:338 lib/obstack.c:340 lib/xalloc-die.c:34 src/pcresearch.c:291 +#: lib/obstack.c:338 lib/obstack.c:340 lib/xalloc-die.c:34 src/pcresearch.c:313 msgid "memory exhausted" msgstr "bellek tükendi" @@ -154,7 +162,7 @@ #. for your locale. #. #. If you don't know what to put here, please see -#. +#. #. and use glyphs suitable for your language. #: lib/quotearg.c:362 msgid "`" @@ -232,16 +240,16 @@ msgid "Unmatched ) or \\)" msgstr "" -#: lib/regcomp.c:687 +#: lib/regcomp.c:688 msgid "No previous regular expression" msgstr "" -#: lib/version-etc.c:74 +#: lib/version-etc.c:73 #, c-format msgid "Packaged by %s (%s)\n" msgstr "" -#: lib/version-etc.c:77 +#: lib/version-etc.c:76 #, c-format msgid "Packaged by %s\n" msgstr "" @@ -249,14 +257,14 @@ #. TRANSLATORS: Translate "(C)" to the copyright symbol #. (C-in-a-circle), if this symbol is available in the user's #. locale. Otherwise, do not translate "(C)"; leave it as-is. -#: lib/version-etc.c:84 +#: lib/version-etc.c:83 msgid "(C)" msgstr "" -#: lib/version-etc.c:86 +#: lib/version-etc.c:85 msgid "" "\n" -"License GPLv3+: GNU GPL version 3 or later .\n" "This is free software: you are free to change and redistribute it.\n" "There is NO WARRANTY, to the extent permitted by law.\n" @@ -380,11 +388,11 @@ #: lib/version-etc.c:253 #, c-format -msgid "%s home page: \n" +msgid "%s home page: \n" msgstr "" #: lib/version-etc.c:256 -msgid "General help using GNU software: \n" +msgid "General help using GNU software: \n" msgstr "" #: lib/xstrtol-error.c:63 @@ -402,65 +410,57 @@ msgid "%s%s argument '%s' too large" msgstr "" -#. This is a proper name. See the gettext manual, section Names. -#: src/grep.c:59 -msgid "Mike Haertel" -msgstr "" - -#: src/grep.c:60 -msgid "others, see " -msgstr "" - -#: src/grep.c:585 +#: src/grep.c:582 msgid "(standard input)" msgstr "(standart girdi)" -#: src/grep.c:765 +#: src/grep.c:762 msgid "invalid context length argument" msgstr "bağlam uzunluk değeri geçersiz" -#: src/grep.c:828 +#: src/grep.c:827 msgid "input is too large to count" msgstr "girdi sayılamayacak kadar büyük" -#: src/grep.c:1579 +#: src/grep.c:1578 #, c-format msgid "Binary file %s matches\n" msgstr "İkilik dosya %s eşleşir\n" -#: src/grep.c:1627 +#: src/grep.c:1626 #, fuzzy, c-format msgid "warning: %s: %s" msgstr "uyarı: %s: %s\n" -#: src/grep.c:1628 +#: src/grep.c:1627 msgid "recursive directory loop" msgstr "ardışık dizin çevrimi" -#: src/grep.c:1844 +#: src/grep.c:1843 #, c-format msgid "input file %s is also the output" msgstr "" -#: src/grep.c:1907 src/grep.c:1914 -#, c-format -msgid "Usage: %s [OPTION]... PATTERN [FILE]...\n" +#: src/grep.c:1906 src/grep.c:1913 +#, fuzzy, c-format +msgid "Usage: %s [OPTION]... PATTERNS [FILE]...\n" msgstr "Kullanımı: %s [SEÇENEK]... MASKE [DOSYA]...\n" -#: src/grep.c:1909 +#: src/grep.c:1908 #, fuzzy, c-format msgid "Try '%s --help' for more information.\n" msgstr "Daha fazla bilgi için `%s --help' yazın.\n" -#: src/grep.c:1915 +#: src/grep.c:1914 #, c-format -msgid "Search for PATTERN in each FILE.\n" +msgid "Search for PATTERNS in each FILE.\n" msgstr "" -#: src/grep.c:1916 +#: src/grep.c:1915 #, fuzzy, c-format msgid "" "Example: %s -i 'hello world' menu.h main.c\n" +"PATTERNS can contain multiple patterns separated by newlines.\n" "\n" "Pattern selection and interpretation:\n" msgstr "" @@ -472,10 +472,10 @@ #: src/grep.c:1920 #, fuzzy, c-format msgid "" -" -E, --extended-regexp PATTERN is an extended regular expression\n" -" -F, --fixed-strings PATTERN is a set of newline-separated strings\n" -" -G, --basic-regexp PATTERN is a basic regular expression (default)\n" -" -P, --perl-regexp PATTERN is a Perl regular expression\n" +" -E, --extended-regexp PATTERNS are extended regular expressions\n" +" -F, --fixed-strings PATTERNS are strings\n" +" -G, --basic-regexp PATTERNS are basic regular expressions\n" +" -P, --perl-regexp PATTERNS are Perl regular expressions\n" msgstr "" " -E, --extended-regexp KALIP bir genişletilmiş düzenli ifadedir\n" " -F, --fixed-strings KALIP satır satır ayrılmış bir dizgedir\n" @@ -485,11 +485,11 @@ #: src/grep.c:1926 #, fuzzy, c-format msgid "" -" -e, --regexp=PATTERN use PATTERN for matching\n" -" -f, --file=FILE obtain PATTERN from FILE\n" +" -e, --regexp=PATTERNS use PATTERNS for matching\n" +" -f, --file=FILE take PATTERNS from FILE\n" " -i, --ignore-case ignore case distinctions\n" -" -w, --word-regexp force PATTERN to match only whole words\n" -" -x, --line-regexp force PATTERN to match only whole lines\n" +" -w, --word-regexp match only whole words\n" +" -x, --line-regexp match only whole lines\n" " -z, --null-data a data line ends in 0 byte, not newline\n" msgstr "" " -e, --regexp=KALIP KALIP bir düzenli ifade olarak kullanılır\n" @@ -535,7 +535,7 @@ #: src/grep.c:1951 #, c-format msgid "" -" -o, --only-matching show only the part of a line matching PATTERN\n" +" -o, --only-matching show only nonempty parts of lines that match\n" " -q, --quiet, --silent suppress all normal output\n" " --binary-files=TYPE assume that binary files are TYPE;\n" " TYPE is 'binary', 'text', or 'without-match'\n" @@ -557,12 +557,11 @@ #: src/grep.c:1967 #, c-format msgid "" -" --include=FILE_PATTERN search only files that match FILE_PATTERN\n" -" --exclude=FILE_PATTERN skip files and directories matching " -"FILE_PATTERN\n" +" --include=GLOB search only files that match GLOB (a file " +"pattern)\n" +" --exclude=GLOB skip files and directories matching GLOB\n" " --exclude-from=FILE skip files matching any file pattern from FILE\n" -" --exclude-dir=PATTERN directories that match PATTERN will be " -"skipped.\n" +" --exclude-dir=GLOB skip directories that match GLOB\n" msgstr "" #: src/grep.c:1974 @@ -620,7 +619,7 @@ msgid "" "When FILE is '-', read standard input. With no FILE, read '.' if\n" "recursive, '-' otherwise. With fewer than two FILEs, assume -h.\n" -"Exit status is 0 if any line is selected, 1 otherwise;\n" +"Exit status is 0 if any line (or file if -L) is selected, 1 otherwise;\n" "if any error occurs and -q is not given, the exit status is 2.\n" msgstr "" @@ -633,63 +632,69 @@ msgid "invalid matcher %s" msgstr "en çok miktarı geçersiz" -#: src/grep.c:2458 +#: src/grep.c:2459 #, c-format msgid "warning: GREP_OPTIONS is deprecated; please use an alias or script" msgstr "" -#: src/grep.c:2485 +#: src/grep.c:2486 msgid "unknown devices method" msgstr "bilinmeyen aygıt yöntemi" -#: src/grep.c:2629 +#: src/grep.c:2630 msgid "invalid max count" msgstr "en çok miktarı geçersiz" -#: src/grep.c:2687 +#: src/grep.c:2688 msgid "unknown binary-files type" msgstr "bilinmeyen ikilik dosya türü" -#: src/pcresearch.c:80 +#: src/grep.c:2770 +msgid "" +"Written by Mike Haertel and others; see\n" +"." +msgstr "" + +#: src/pcresearch.c:86 msgid "failed to allocate memory for the PCRE JIT stack" msgstr "" -#: src/pcresearch.c:97 +#: src/pcresearch.c:118 msgid "" "support for the -P option is not compiled into this --disable-perl-regexp " "binary" msgstr "" -#: src/pcresearch.c:119 +#: src/pcresearch.c:140 msgid "-P supports only unibyte and UTF-8 locales" msgstr "" -#: src/pcresearch.c:125 +#: src/pcresearch.c:146 #, fuzzy msgid "the -P option only supports a single pattern" msgstr "-P seçeneği desteklenmiyor" -#: src/pcresearch.c:167 +#: src/pcresearch.c:189 msgid "internal error (should never happen)" msgstr "" -#: src/pcresearch.c:192 +#: src/pcresearch.c:214 msgid "internal error" msgstr "" -#: src/pcresearch.c:215 +#: src/pcresearch.c:237 msgid "exceeded PCRE's line length limit" msgstr "" -#: src/pcresearch.c:295 +#: src/pcresearch.c:317 msgid "exhausted PCRE JIT stack" msgstr "" -#: src/pcresearch.c:299 +#: src/pcresearch.c:321 msgid "exceeded PCRE's backtracking limit" msgstr "" -#: src/pcresearch.c:306 +#: src/pcresearch.c:328 #, c-format msgid "internal PCRE error: %d" msgstr "" Binary files /tmp/tmppJ6Y2n/6jFha9hbxv/grep-3.1/po/uk.gmo and /tmp/tmppJ6Y2n/tYMwNxGD36/grep-3.3/po/uk.gmo differ diff -Nru grep-3.1/po/uk.po grep-3.3/po/uk.po --- grep-3.1/po/uk.po 2017-07-02 20:21:16.000000000 +0000 +++ grep-3.3/po/uk.po 2018-12-21 04:39:02.000000000 +0000 @@ -4,13 +4,13 @@ # # Volodymyr M. Lisivka , 2001-2002. # Dmytro O. Redchuk , 2002. -# Yuri Chornoivan , 2011, 2012, 2013, 2014, 2015, 2016, 2017. +# Yuri Chornoivan , 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018. msgid "" msgstr "" -"Project-Id-Version: grep-3.0.23-b00\n" +"Project-Id-Version: grep-3.1.48\n" "Report-Msgid-Bugs-To: bug-grep@gnu.org\n" -"POT-Creation-Date: 2017-07-02 13:21-0700\n" -"PO-Revision-Date: 2017-06-25 13:19+0300\n" +"POT-Creation-Date: 2018-12-20 20:39-0800\n" +"PO-Revision-Date: 2018-12-16 12:02+0200\n" "Last-Translator: Yuri Chornoivan \n" "Language-Team: Ukrainian \n" "Language: uk\n" @@ -19,7 +19,7 @@ "Content-Transfer-Encoding: 8bit\n" "X-Bugs: Report translation errors to the Language-Team address.\n" "Plural-Forms: nplurals=1; plural=0;\n" -"X-Generator: Lokalize 1.5\n" +"X-Generator: Lokalize 2.0\n" #: lib/argmatch.c:134 #, c-format @@ -35,45 +35,53 @@ msgid "Valid arguments are:" msgstr "Список коректних аргументів:" -#: lib/closeout.c:122 src/grep.c:1274 +#: lib/c-stack.c:208 lib/c-stack.c:301 +msgid "program error" +msgstr "помилка програми" + +#: lib/c-stack.c:209 lib/c-stack.c:302 +msgid "stack overflow" +msgstr "переповнення стека" + +#: lib/closeout.c:122 src/grep.c:1273 msgid "write error" msgstr "помилка запису" -#: lib/dfa.c:958 +#: lib/dfa.c:970 msgid "unbalanced [" msgstr "неврівноважена дужка [" -#: lib/dfa.c:1079 +#: lib/dfa.c:1091 msgid "invalid character class" msgstr "некоректний клас символів" -#: lib/dfa.c:1205 +#: lib/dfa.c:1217 msgid "character class syntax is [[:space:]], not [:space:]" msgstr "" "синтаксичну конструкцію класу символів слід визначати так: [[:space:]], а не " "так: [:space:]" -#: lib/dfa.c:1272 +#: lib/dfa.c:1284 msgid "unfinished \\ escape" msgstr "незавершена \\-послідовність" -#: lib/dfa.c:1433 +#: lib/dfa.c:1445 msgid "invalid content of \\{\\}" msgstr "некоректний вміст \\{\\}" -#: lib/dfa.c:1436 +#: lib/dfa.c:1448 msgid "regular expression too big" msgstr "занадто об'ємний формальний вираз" -#: lib/dfa.c:1850 +#: lib/dfa.c:1863 msgid "unbalanced (" msgstr "неврівноважена дужка (" -#: lib/dfa.c:1968 +#: lib/dfa.c:1981 msgid "no syntax specified" msgstr "не вказано синтаксис" -#: lib/dfa.c:1976 +#: lib/dfa.c:1992 msgid "unbalanced )" msgstr "неврівноважена дужка )" @@ -116,7 +124,7 @@ msgid "%s: option requires an argument -- '%c'\n" msgstr "%s: до параметра слід додати аргумент — «%c»\n" -#: lib/obstack.c:338 lib/obstack.c:340 lib/xalloc-die.c:34 src/pcresearch.c:291 +#: lib/obstack.c:338 lib/obstack.c:340 lib/xalloc-die.c:34 src/pcresearch.c:313 msgid "memory exhausted" msgstr "пам'ять вичерпано" @@ -155,7 +163,7 @@ #. for your locale. #. #. If you don't know what to put here, please see -#. +#. #. and use glyphs suitable for your language. #: lib/quotearg.c:362 msgid "`" @@ -233,16 +241,16 @@ msgid "Unmatched ) or \\)" msgstr "Неврівноважена послідовність ) або \\)" -#: lib/regcomp.c:687 +#: lib/regcomp.c:688 msgid "No previous regular expression" msgstr "Не виявлено попереднього формального виразу" -#: lib/version-etc.c:74 +#: lib/version-etc.c:73 #, c-format msgid "Packaged by %s (%s)\n" msgstr "Пакування — %s (%s)\n" -#: lib/version-etc.c:77 +#: lib/version-etc.c:76 #, c-format msgid "Packaged by %s\n" msgstr "Пакування — %s\n" @@ -250,22 +258,22 @@ #. TRANSLATORS: Translate "(C)" to the copyright symbol #. (C-in-a-circle), if this symbol is available in the user's #. locale. Otherwise, do not translate "(C)"; leave it as-is. -#: lib/version-etc.c:84 +#: lib/version-etc.c:83 msgid "(C)" msgstr "©" -#: lib/version-etc.c:86 +#: lib/version-etc.c:85 msgid "" "\n" -"License GPLv3+: GNU GPL version 3 or later .\n" "This is free software: you are free to change and redistribute it.\n" "There is NO WARRANTY, to the extent permitted by law.\n" "\n" msgstr "" "\n" -"Умови ліцензування викладено у GPLv3+: GNU GPL версії 3 або новішій, \n" +"Умови ліцензування викладено у GPLv3+: GNU GPL версії 3 або новішій, " +"\n" "Це вільне програмне забезпечення: ви можете вільно змінювати і поширювати " "його.\n" "Вам не надається ЖОДНИХ ГАРАНТІЙ, окрім гарантій передбачених " @@ -404,14 +412,14 @@ #: lib/version-etc.c:253 #, c-format -msgid "%s home page: \n" -msgstr "Домашня сторінка %s: \n" +msgid "%s home page: \n" +msgstr "Домашня сторінка %s: \n" #: lib/version-etc.c:256 -msgid "General help using GNU software: \n" +msgid "General help using GNU software: \n" msgstr "" "Загальна довідкова інформація щодо використання програмного забезпечення " -"GNU: \n" +"GNU: \n" #: lib/xstrtol-error.c:63 #, c-format @@ -428,104 +436,95 @@ msgid "%s%s argument '%s' too large" msgstr "%s%s, аргумент «%s» є занадто об'ємним" -#. This is a proper name. See the gettext manual, section Names. -#: src/grep.c:59 -msgid "Mike Haertel" -msgstr "Mike Haertel" - -#: src/grep.c:60 -msgid "others, see " -msgstr "інші, див. " - -#: src/grep.c:585 +#: src/grep.c:582 msgid "(standard input)" msgstr "(стандартне джерело вхідних даних)" -#: src/grep.c:765 +#: src/grep.c:762 msgid "invalid context length argument" msgstr "помилковий аргумент довжини контексту" -#: src/grep.c:828 +#: src/grep.c:827 msgid "input is too large to count" msgstr "вхідні дані занадто довгі для обліку" -#: src/grep.c:1579 +#: src/grep.c:1578 #, c-format msgid "Binary file %s matches\n" msgstr "Двійковий файл %s містить збіжність\n" -#: src/grep.c:1627 +#: src/grep.c:1626 #, c-format msgid "warning: %s: %s" msgstr "попередження: %s: %s" -#: src/grep.c:1628 +#: src/grep.c:1627 msgid "recursive directory loop" msgstr "зациклення рекурсивного проходу каталогів" -#: src/grep.c:1844 +#: src/grep.c:1843 #, c-format msgid "input file %s is also the output" msgstr "файл вхідних даних %s є також файлом вихідних даних" -#: src/grep.c:1907 src/grep.c:1914 +#: src/grep.c:1906 src/grep.c:1913 #, c-format -msgid "Usage: %s [OPTION]... PATTERN [FILE]...\n" -msgstr "Використання: %s [ПАРАМЕТР]... ШАБЛОН [ФАЙЛ]...\n" +msgid "Usage: %s [OPTION]... PATTERNS [FILE]...\n" +msgstr "Використання: %s [ПАРАМЕТР]... ШАБЛОНИ [ФАЙЛ]...\n" -#: src/grep.c:1909 +#: src/grep.c:1908 #, c-format msgid "Try '%s --help' for more information.\n" msgstr "Віддайте команду «%s --help», щоб дізнатися більше.\n" -#: src/grep.c:1915 +#: src/grep.c:1914 #, c-format -msgid "Search for PATTERN in each FILE.\n" -msgstr "Шукати ШАБЛОН у кожному ФАЙЛі.\n" +msgid "Search for PATTERNS in each FILE.\n" +msgstr "Шукати ШАБЛОНИ у кожному ФАЙЛі.\n" -#: src/grep.c:1916 +#: src/grep.c:1915 #, c-format msgid "" "Example: %s -i 'hello world' menu.h main.c\n" +"PATTERNS can contain multiple patterns separated by newlines.\n" "\n" "Pattern selection and interpretation:\n" msgstr "" "Приклад: %s -i 'hello world' menu.h main.c\n" +"Запис ШАБЛОНИ може містити декілька шаблонів, які відокремлено символами " +"нового рядка.\n" "\n" "Вибір за взірцем та інтерпретація:\n" #: src/grep.c:1920 #, c-format msgid "" -" -E, --extended-regexp PATTERN is an extended regular expression\n" -" -F, --fixed-strings PATTERN is a set of newline-separated strings\n" -" -G, --basic-regexp PATTERN is a basic regular expression (default)\n" -" -P, --perl-regexp PATTERN is a Perl regular expression\n" -msgstr "" -" -E, --extended-regexp ШАБЛОН є розширеним формальним виразом\n" -" -F, --fixed-strings ШАБЛОН є набором рядків, розділених символом " -"нового рядка\n" -" -G, --basic-regexp ШАБЛОН є звичайним формальним виразом (типовий)\n" -" -P, --perl-regexp ШАБЛОН є формальним виразом Perl\n" +" -E, --extended-regexp PATTERNS are extended regular expressions\n" +" -F, --fixed-strings PATTERNS are strings\n" +" -G, --basic-regexp PATTERNS are basic regular expressions\n" +" -P, --perl-regexp PATTERNS are Perl regular expressions\n" +msgstr "" +" -E, --extended-regexp ШАБЛОНИ є розширеним формальним виразом\n" +" -F, --fixed-strings ШАБЛОНИ є набором рядків\n" +" -G, --basic-regexp ШАБЛОНИ є звичайними формальними виразами\n" +" -P, --perl-regexp ШАБЛОНИ є формальними виразами Perl\n" #: src/grep.c:1926 #, c-format msgid "" -" -e, --regexp=PATTERN use PATTERN for matching\n" -" -f, --file=FILE obtain PATTERN from FILE\n" +" -e, --regexp=PATTERNS use PATTERNS for matching\n" +" -f, --file=FILE take PATTERNS from FILE\n" " -i, --ignore-case ignore case distinctions\n" -" -w, --word-regexp force PATTERN to match only whole words\n" -" -x, --line-regexp force PATTERN to match only whole lines\n" +" -w, --word-regexp match only whole words\n" +" -x, --line-regexp match only whole lines\n" " -z, --null-data a data line ends in 0 byte, not newline\n" msgstr "" -" -e, --regexp=ШАБЛОН використовувати ШАБЛОН для встановлення " +" -e, --regexp=ШАБЛОНИ використовувати ШАБЛОНИ для встановлення " "відповідності\n" -" -f, --file=ФАЙЛ взяти ШАБЛОН із ФАЙЛа\n" +" -f, --file=ФАЙЛ взяти ШАБЛОНИ із ФАЙЛа\n" " -i, --ignore-case ігнорувати регістр літер\n" -" -w, --word-regexp використовувати ШАБЛОН лише для пошуку цілих " -"слів\n" -" -x, --line-regexp використовувати ШАБЛОН лише для пошуку цілих " -"рядків\n" +" -w, --word-regexp шукати лише цілі слова\n" +" -x, --line-regexp шукати лише цілі рядки\n" " -z, --null-data рядки даних закінчуються байтом \"0\", а не " "символом\n" " кінця рядка (\\n)\n" @@ -578,14 +577,14 @@ #: src/grep.c:1951 #, c-format msgid "" -" -o, --only-matching show only the part of a line matching PATTERN\n" +" -o, --only-matching show only nonempty parts of lines that match\n" " -q, --quiet, --silent suppress all normal output\n" " --binary-files=TYPE assume that binary files are TYPE;\n" " TYPE is 'binary', 'text', or 'without-match'\n" " -a, --text equivalent to --binary-files=text\n" msgstr "" -" -o, --only-matching показувати лише частину рядка, яка збігається з " -"ШАБЛОНом\n" +" -o, --only-matching показувати лише непорожні частини відповідних " +"рядків\n" " -q, --quiet, --silent придушити виведення всіх звичайних даних\n" " --binary-files=ТИП припускати, що всі бінарні файли належать до " "ТИПу;\n" @@ -620,21 +619,20 @@ #: src/grep.c:1967 #, c-format msgid "" -" --include=FILE_PATTERN search only files that match FILE_PATTERN\n" -" --exclude=FILE_PATTERN skip files and directories matching " -"FILE_PATTERN\n" +" --include=GLOB search only files that match GLOB (a file " +"pattern)\n" +" --exclude=GLOB skip files and directories matching GLOB\n" " --exclude-from=FILE skip files matching any file pattern from FILE\n" -" --exclude-dir=PATTERN directories that match PATTERN will be " -"skipped.\n" +" --exclude-dir=GLOB skip directories that match GLOB\n" msgstr "" -" --include=ШАБЛОН_НАЗВИ шукати лише у файлах, назви яких відповідають " -"виразу ШАБЛОН_НАЗВИ\n" -" --exclude=ШАБЛОН_НАЗВИ не шукати у файлах і каталогах, назви яких " -"відповідають виразу ШАБЛОН_НАЗВИ\n" -" --exclude-from=ФАЙЛ пропустити файли, назви яких відповідають будь-" +" --include=ВЗІРЕЦЬ шукати лише у файлах, назви яких відповідають " +"ВЗІРЦЮ\n" +" --exclude=ВЗІРЕЦЬ не шукати у файлах і каталогах, назви яких " +"відповідають ВЗІРЦЮ\n" +" --exclude-from=ФАЙЛ пропустити файли, назви яких відповідають будь-" "якому з шаблонів з ФАЙЛа\n" -" --exclude-dir=ШАБЛОН пропустити каталоги, назви яких відповідають " -"ШАБЛОНу.\n" +" --exclude-dir=ВЗІРЕЦЬ пропустити каталоги, назви яких відповідають " +"ВЗІРЦЮ.\n" #: src/grep.c:1974 #, c-format @@ -699,14 +697,15 @@ msgid "" "When FILE is '-', read standard input. With no FILE, read '.' if\n" "recursive, '-' otherwise. With fewer than two FILEs, assume -h.\n" -"Exit status is 0 if any line is selected, 1 otherwise;\n" +"Exit status is 0 if any line (or file if -L) is selected, 1 otherwise;\n" "if any error occurs and -q is not given, the exit status is 2.\n" msgstr "" "Якщо ФАЙЛом є «-», читати дані зі стандартного джерела вхідних\n" "даних. Якщо не вказано ФАЙЛ, читати «.», якщо режим рекурсивний, і\n" "«-», якщо ні. Якщо вказано менше ніж два ФАЙЛи, буде використано -h.\n" -"Код завершення 0 — якщо було виявлено відповідники, 1 — коли їх нема,\n" -"2 — якщо сталася помилка і не було використано параметр -q.\n" +"Код завершення 0 — якщо було виявлено відповідник рядка (або файла,\n" +"якщо вказано -L), 1 — коли їх нема, 2 — якщо сталася помилка і не\n" +"було використано параметр -q.\n" #: src/grep.c:2034 msgid "conflicting matchers specified" @@ -717,30 +716,37 @@ msgid "invalid matcher %s" msgstr "некоректний вираз порівняння %s" -#: src/grep.c:2458 +#: src/grep.c:2459 #, c-format msgid "warning: GREP_OPTIONS is deprecated; please use an alias or script" msgstr "" "попередження: GREP_OPTIONS вважається застарілою; будь ласка, скористайтеся " "альтернативною змінною або скриптом" -#: src/grep.c:2485 +#: src/grep.c:2486 msgid "unknown devices method" msgstr "невідомий спосіб обробки для пристроїв" -#: src/grep.c:2629 +#: src/grep.c:2630 msgid "invalid max count" msgstr "помилкова максимальна кількість" -#: src/grep.c:2687 +#: src/grep.c:2688 msgid "unknown binary-files type" msgstr "невідомий тип двійкових файлів" -#: src/pcresearch.c:80 +#: src/grep.c:2770 +#, fuzzy +msgid "" +"Written by Mike Haertel and others; see\n" +"." +msgstr "інші, див. " + +#: src/pcresearch.c:86 msgid "failed to allocate memory for the PCRE JIT stack" msgstr "не вдалося отримати область пам’яті під стек JIT PCRE" -#: src/pcresearch.c:97 +#: src/pcresearch.c:118 msgid "" "support for the -P option is not compiled into this --disable-perl-regexp " "binary" @@ -748,39 +754,42 @@ "цей виконуваний файл зібрано без підтримки параметра -P (--disable-perl-" "regexp)" -#: src/pcresearch.c:119 +#: src/pcresearch.c:140 msgid "-P supports only unibyte and UTF-8 locales" msgstr "у -P передбачено підтримку лише однобайтових локалей та UTF-8" -#: src/pcresearch.c:125 +#: src/pcresearch.c:146 msgid "the -P option only supports a single pattern" msgstr "аргументом параметра -P може бути лише один шаблон" -#: src/pcresearch.c:167 +#: src/pcresearch.c:189 msgid "internal error (should never happen)" msgstr "внутрішня помилка (такої помилки не повинно було статися)" -#: src/pcresearch.c:192 +#: src/pcresearch.c:214 msgid "internal error" msgstr "внутрішня помилка" -#: src/pcresearch.c:215 +#: src/pcresearch.c:237 msgid "exceeded PCRE's line length limit" msgstr "перевищено обмеження на довжину рядка PCRE" -#: src/pcresearch.c:295 +#: src/pcresearch.c:317 msgid "exhausted PCRE JIT stack" msgstr "вичерпано стек JIT PCRE" -#: src/pcresearch.c:299 +#: src/pcresearch.c:321 msgid "exceeded PCRE's backtracking limit" msgstr "перевищено обмеження на зворотне стеження у PCRE" -#: src/pcresearch.c:306 +#: src/pcresearch.c:328 #, c-format msgid "internal PCRE error: %d" msgstr "внутрішня помилка PCRE: %d" +#~ msgid "Mike Haertel" +#~ msgstr "Mike Haertel" + #~ msgid "%s: option '--%s' doesn't allow an argument\n" #~ msgstr "%s: додавання аргументів до параметра «--%s» не передбачено\n" Binary files /tmp/tmppJ6Y2n/6jFha9hbxv/grep-3.1/po/vi.gmo and /tmp/tmppJ6Y2n/tYMwNxGD36/grep-3.3/po/vi.gmo differ diff -Nru grep-3.1/po/vi.po grep-3.3/po/vi.po --- grep-3.1/po/vi.po 2017-07-02 20:21:16.000000000 +0000 +++ grep-3.3/po/vi.po 2018-12-21 04:39:02.000000000 +0000 @@ -3,14 +3,14 @@ # Copyright © 2016 Free Software Foundation, Inc. # This file is distributed under the same license as the grep package. # Clytie Siddall , 2005-2010. -# Trần Ngọc Quân , 2012-2014, 2015, 2016, 2017. +# Trần Ngọc Quân , 2012-2014, 2015, 2016, 2017, 2018. # msgid "" msgstr "" -"Project-Id-Version: grep 3.0.23-b00\n" +"Project-Id-Version: grep 3.1.48\n" "Report-Msgid-Bugs-To: bug-grep@gnu.org\n" -"POT-Creation-Date: 2017-07-02 13:21-0700\n" -"PO-Revision-Date: 2017-06-26 06:48+0700\n" +"POT-Creation-Date: 2018-12-20 20:39-0800\n" +"PO-Revision-Date: 2018-12-19 14:06+0700\n" "Last-Translator: Trần Ngọc Quân \n" "Language-Team: Vietnamese \n" "Language: vi\n" @@ -36,43 +36,51 @@ msgid "Valid arguments are:" msgstr "Các đối số hợp lệ là:" -#: lib/closeout.c:122 src/grep.c:1274 +#: lib/c-stack.c:208 lib/c-stack.c:301 +msgid "program error" +msgstr "lỗi chương trình" + +#: lib/c-stack.c:209 lib/c-stack.c:302 +msgid "stack overflow" +msgstr "tràn ngăn xếp" + +#: lib/closeout.c:122 src/grep.c:1273 msgid "write error" msgstr "lỗi ghi" -#: lib/dfa.c:958 +#: lib/dfa.c:970 msgid "unbalanced [" msgstr "thiếu dấu ngoặc vuông mở [" -#: lib/dfa.c:1079 +#: lib/dfa.c:1091 msgid "invalid character class" msgstr "sai lớp ký tự" -#: lib/dfa.c:1205 +#: lib/dfa.c:1217 msgid "character class syntax is [[:space:]], not [:space:]" msgstr "cú pháp lớp ký tự là [[:space:]], không phải [:space:]" -#: lib/dfa.c:1272 +#: lib/dfa.c:1284 msgid "unfinished \\ escape" msgstr "chưa kết thúc thoát chuỗi \\" -#: lib/dfa.c:1433 +#: lib/dfa.c:1445 msgid "invalid content of \\{\\}" msgstr "nội dung của \\{\\} không hợp lệ" -#: lib/dfa.c:1436 +#: lib/dfa.c:1448 msgid "regular expression too big" msgstr "biểu thức chính quy quá lớn" -#: lib/dfa.c:1850 +#: lib/dfa.c:1863 msgid "unbalanced (" msgstr "thiếu dấu ngoặc đơn mở (" -#: lib/dfa.c:1968 +#: lib/dfa.c:1981 msgid "no syntax specified" msgstr "chưa đưa ra cú pháp" -#: lib/dfa.c:1976 +#: lib/dfa.c:1992 msgid "unbalanced )" msgstr "thiếu dấu ngoặc đơn đóng )" @@ -115,7 +123,7 @@ msgid "%s: option requires an argument -- '%c'\n" msgstr "%s: tùy chọn yêu cầu một đối số -- “%c”\n" -#: lib/obstack.c:338 lib/obstack.c:340 lib/xalloc-die.c:34 src/pcresearch.c:291 +#: lib/obstack.c:338 lib/obstack.c:340 lib/xalloc-die.c:34 src/pcresearch.c:313 msgid "memory exhausted" msgstr "hết bộ nhớ" @@ -153,7 +161,7 @@ #. for your locale. #. #. If you don't know what to put here, please see -#. +#. #. and use glyphs suitable for your language. #: lib/quotearg.c:362 msgid "`" @@ -231,16 +239,16 @@ msgid "Unmatched ) or \\)" msgstr "Có ký tự “)” hay “\\)” lẻ cặp" -#: lib/regcomp.c:687 +#: lib/regcomp.c:688 msgid "No previous regular expression" msgstr "Không có biểu thức chính quy nằm trước" -#: lib/version-etc.c:74 +#: lib/version-etc.c:73 #, c-format msgid "Packaged by %s (%s)\n" msgstr "Đóng gói bởi %s (%s)\n" -#: lib/version-etc.c:77 +#: lib/version-etc.c:76 #, c-format msgid "Packaged by %s\n" msgstr "Đóng gói bởi %s\n" @@ -248,24 +256,24 @@ #. TRANSLATORS: Translate "(C)" to the copyright symbol #. (C-in-a-circle), if this symbol is available in the user's #. locale. Otherwise, do not translate "(C)"; leave it as-is. -#: lib/version-etc.c:84 +#: lib/version-etc.c:83 msgid "(C)" msgstr "©" -#: lib/version-etc.c:86 +#: lib/version-etc.c:85 msgid "" "\n" -"License GPLv3+: GNU GPL version 3 or later .\n" "This is free software: you are free to change and redistribute it.\n" "There is NO WARRANTY, to the extent permitted by law.\n" "\n" msgstr "" "\n" -"Giấy phép GPL pb3+: Giấy phép Công cộng GNU phiên bản 3 hoặc mới hơn:\n" -"\n" +"Giấy phép GPL pb3+ : Giấy phép Công cộng GNU phiên bản 3 hay sau .\n" "Đây là phần mềm tự do: bạn có quyền sửa đổi và phát hành lại nó.\n" -"KHÔNG CÓ BẢO HÀNH GÌ CẢ, với điều kiện được pháp luật cho phép.\n" +"KHÔNG CÓ BẢO HÀNH GÌ CẢ, với điều khiển được pháp luật cho phép.\n" "\n" #. TRANSLATORS: %s denotes an author name. @@ -404,13 +412,13 @@ #: lib/version-etc.c:253 #, c-format -msgid "%s home page: \n" -msgstr "Trang chủ của %s: \n" +msgid "%s home page: \n" +msgstr "Trang chủ %s: \n" #: lib/version-etc.c:256 -msgid "General help using GNU software: \n" +msgid "General help using GNU software: \n" msgstr "" -"Trợ giúp chung về sử dụng phần mềm GNU: \n" +"Trợ giúp chung về cách sử dụng phần mềm GNU: \n" #: lib/xstrtol-error.c:63 #, c-format @@ -427,103 +435,93 @@ msgid "%s%s argument '%s' too large" msgstr "%s%s đối số “%s” quá lớn" -#. This is a proper name. See the gettext manual, section Names. -#: src/grep.c:59 -msgid "Mike Haertel" -msgstr "Mike Haertel" - -#: src/grep.c:60 -msgid "others, see " -msgstr "" -"nhiều người khác, xem tại " - -#: src/grep.c:585 +#: src/grep.c:582 msgid "(standard input)" msgstr "(đầu vào tiêu chuẩn)" -#: src/grep.c:765 +#: src/grep.c:762 msgid "invalid context length argument" msgstr "đối số chiều dài ngữ cảnh không hợp lệ" -#: src/grep.c:828 +#: src/grep.c:827 msgid "input is too large to count" msgstr "dữ liệu đầu vào quá lớn nên không thể đếm được" -#: src/grep.c:1579 +#: src/grep.c:1578 #, c-format msgid "Binary file %s matches\n" msgstr "Tập tin nhị phân “%s” khớp mẫu tìm kiếm\n" -#: src/grep.c:1627 +#: src/grep.c:1626 #, c-format msgid "warning: %s: %s" msgstr "cảnh báo: %s: %s" -#: src/grep.c:1628 +#: src/grep.c:1627 msgid "recursive directory loop" msgstr "vòng lặp thư mục đệ quy" -#: src/grep.c:1844 +#: src/grep.c:1843 #, c-format msgid "input file %s is also the output" msgstr "tập tin đầu vào “%s” cũng là kết xuất" -#: src/grep.c:1907 src/grep.c:1914 +#: src/grep.c:1906 src/grep.c:1913 #, c-format -msgid "Usage: %s [OPTION]... PATTERN [FILE]...\n" +msgid "Usage: %s [OPTION]... PATTERNS [FILE]...\n" msgstr "Cách dùng: %s [TÙY_CHỌN]… MẪU [TẬP_TIN]…\n" -#: src/grep.c:1909 +#: src/grep.c:1908 #, c-format msgid "Try '%s --help' for more information.\n" msgstr "Hãy chạy lệnh “%s --help” để biết thêm thông tin.\n" -#: src/grep.c:1915 +#: src/grep.c:1914 #, c-format -msgid "Search for PATTERN in each FILE.\n" +msgid "Search for PATTERNS in each FILE.\n" msgstr "Tìm kiếm MẪU trong từng TẬP_TIN.\n" -#: src/grep.c:1916 +#: src/grep.c:1915 #, c-format msgid "" "Example: %s -i 'hello world' menu.h main.c\n" +"PATTERNS can contain multiple patterns separated by newlines.\n" "\n" "Pattern selection and interpretation:\n" msgstr "" "Ví dụ: %s -i \"chào thế giới\" menu.h main.c\n" +"MẪU có thể chứa nhiều mẫu ngăn cách nhau bằng ký tự dòng mới.\n" "\n" "Chọn và biên dịch mẫu:\n" #: src/grep.c:1920 #, c-format msgid "" -" -E, --extended-regexp PATTERN is an extended regular expression\n" -" -F, --fixed-strings PATTERN is a set of newline-separated strings\n" -" -G, --basic-regexp PATTERN is a basic regular expression (default)\n" -" -P, --perl-regexp PATTERN is a Perl regular expression\n" -msgstr "" -" -E, --extended-regexp MẪU là một biểu thức chính quy mở rộng\n" -" -F, --fixed-strings MẪU là một tập hợp các chuỗi phân cách\n" -" bằng ký tự dòng mới.\n" -" -G, --basic-regexp MẪU là một biểu thức chính quy cơ bản (mặc " -"định).\n" -" -P, --perl-regexp MẪU là một biểu thức chính quy Perl.\n" +" -E, --extended-regexp PATTERNS are extended regular expressions\n" +" -F, --fixed-strings PATTERNS are strings\n" +" -G, --basic-regexp PATTERNS are basic regular expressions\n" +" -P, --perl-regexp PATTERNS are Perl regular expressions\n" +msgstr "" +" -E, --extended-regexp MẪU là các biểu thức chính quy mở rộng\n" +" -F, --fixed-strings MẪU là các chuỗi\n" +" -G, --basic-regexp MẪU là các biểu thức chính quy cơ bản\n" +" -P, --perl-regexp MẪU là các biểu thức chính quy Perl\n" #: src/grep.c:1926 #, c-format msgid "" -" -e, --regexp=PATTERN use PATTERN for matching\n" -" -f, --file=FILE obtain PATTERN from FILE\n" +" -e, --regexp=PATTERNS use PATTERNS for matching\n" +" -f, --file=FILE take PATTERNS from FILE\n" " -i, --ignore-case ignore case distinctions\n" -" -w, --word-regexp force PATTERN to match only whole words\n" -" -x, --line-regexp force PATTERN to match only whole lines\n" +" -w, --word-regexp match only whole words\n" +" -x, --line-regexp match only whole lines\n" " -z, --null-data a data line ends in 0 byte, not newline\n" msgstr "" " -e, --regexp=MẪU dùng MẪU để so khớp\n" " -f, --file=TẬP_TIN lấy MẪU từ TẬP_TIN\n" " -i, --ignore-case không phân biệt HOA/thường\n" -" -w, --word-regexp MẪU khớp toàn bộ từ\n" -" -x, --line-regexp MẪU khớp toàn bộ dòng\n" +" -w, --word-regexp chỉ khớp toàn bộ từ\n" +" -x, --line-regexp chỉ khớp toàn bộ dòng\n" " -z, --null-data một dòng dữ liệu kết thúc bằng byte 0,\n" " không phải ký tự dòng mới\n" @@ -573,13 +571,13 @@ #: src/grep.c:1951 #, c-format msgid "" -" -o, --only-matching show only the part of a line matching PATTERN\n" +" -o, --only-matching show only nonempty parts of lines that match\n" " -q, --quiet, --silent suppress all normal output\n" " --binary-files=TYPE assume that binary files are TYPE;\n" " TYPE is 'binary', 'text', or 'without-match'\n" " -a, --text equivalent to --binary-files=text\n" msgstr "" -" -o, --only-matching chỉ hiển thị phần dòng khớp với MẪU\n" +" -o, --only-matching chỉ hiển thị phần dòng không rỗng khớp với MẪU\n" " -q, --quiet, --silent chặn mọi kết xuất bình thường\n" " --binary-files=KIỂU coi rằng tập tin nhị phân có KIỂU:\n" " * “binary” nhị phân\n" @@ -613,19 +611,18 @@ #: src/grep.c:1967 #, c-format msgid "" -" --include=FILE_PATTERN search only files that match FILE_PATTERN\n" -" --exclude=FILE_PATTERN skip files and directories matching " -"FILE_PATTERN\n" +" --include=GLOB search only files that match GLOB (a file " +"pattern)\n" +" --exclude=GLOB skip files and directories matching GLOB\n" " --exclude-from=FILE skip files matching any file pattern from FILE\n" -" --exclude-dir=PATTERN directories that match PATTERN will be " -"skipped.\n" +" --exclude-dir=GLOB skip directories that match GLOB\n" msgstr "" -" --include=MẪU_TỆP chỉ tìm kiếm những tập tin khớp với MẪU_TỆP này\n" -" --exclude=MẪU_TỆP bỏ qua những tập tin và thư mục khớp với " -"MẪU_TỆP\n" +" --include=GLOB chỉ tìm kiếm những tập tin khớp với GLOB (mẫu " +"tập tin)\n" +" --exclude=GLOB bỏ qua những tập tin và thư mục khớp với GLOB\n" " --exclude-from=TỆP bỏ qua những tập tin khớp với bất cứ mẫu tập\n" -" tin trong tập tin này\n" -" --exclude-dir=MẪU thư mục nào khớp với mẫu này thì bị bỏ qua\n" +" tin trong tập tin này\n" +" --exclude-dir=GLOB thư mục nào khớp với mẫu này thì bị bỏ qua\n" #: src/grep.c:1974 #, c-format @@ -684,13 +681,14 @@ msgid "" "When FILE is '-', read standard input. With no FILE, read '.' if\n" "recursive, '-' otherwise. With fewer than two FILEs, assume -h.\n" -"Exit status is 0 if any line is selected, 1 otherwise;\n" +"Exit status is 0 if any line (or file if -L) is selected, 1 otherwise;\n" "if any error occurs and -q is not given, the exit status is 2.\n" msgstr "" "Khi TẬP_TIN là “-”, thì đọc từ đầu vào tiêu chuẩn. Không có TẬP_TIN, đọc “.” " "nếu\n" -"đệ quy, “-” nếu không có. Nếu ít hơn hai TẬP_TIN thì coi là “-h”.\n" -"Trạng thái thoát là 0 nếu có dòng nào khớp mẫu, không thì bằng 1;\n" +"đệ quy, “-” nếu không phải vậy. Nếu ít hơn hai TẬP_TIN thì coi là “-h”.\n" +"Trạng thái thoát là 0 nếu có dòng (hay tập tin nếu -L) nào khớp mẫu, không " +"thì bằng 1;\n" "nếu có lỗi phát sinh và “-q” không được đưa ra thì trạng thái thoát là 2.\n" #: src/grep.c:2034 @@ -702,29 +700,37 @@ msgid "invalid matcher %s" msgstr "sai mẫu so khớp %s" -#: src/grep.c:2458 +#: src/grep.c:2459 #, c-format msgid "warning: GREP_OPTIONS is deprecated; please use an alias or script" msgstr "" "cảnh báo: GREP_OPTIONS đã lỗi thời; vui lòng dòng một bí danh hoặc văn lệnh" -#: src/grep.c:2485 +#: src/grep.c:2486 msgid "unknown devices method" msgstr "không rõ phương thức thiết bị" -#: src/grep.c:2629 +#: src/grep.c:2630 msgid "invalid max count" msgstr "số lượng tối đa không hợp lệ" -#: src/grep.c:2687 +#: src/grep.c:2688 msgid "unknown binary-files type" msgstr "không rõ kiểu tập tin nhị phân (binary-files)" -#: src/pcresearch.c:80 +#: src/grep.c:2770 +#, fuzzy +msgid "" +"Written by Mike Haertel and others; see\n" +"." +msgstr "" +"nhiều người khác, xem tại " + +#: src/pcresearch.c:86 msgid "failed to allocate memory for the PCRE JIT stack" msgstr "gặp lỗi khi cấp phát bộ nhớ cho stack (ngăn xếp) PCRE JIT" -#: src/pcresearch.c:97 +#: src/pcresearch.c:118 msgid "" "support for the -P option is not compiled into this --disable-perl-regexp " "binary" @@ -732,39 +738,42 @@ "khả năng hỗ trợ tùy chọn -P không được biên dịch vào tập tin nhị phân --" "disable-perl-regexp này" -#: src/pcresearch.c:119 +#: src/pcresearch.c:140 msgid "-P supports only unibyte and UTF-8 locales" msgstr "-P chỉ hỗ trợ miền địa phương unibyte và UTF-8" -#: src/pcresearch.c:125 +#: src/pcresearch.c:146 msgid "the -P option only supports a single pattern" msgstr "tùy chọn “-P” chỉ hỗ trợ một mẫu đơn lẻ" -#: src/pcresearch.c:167 +#: src/pcresearch.c:189 msgid "internal error (should never happen)" msgstr "lỗi nội bộ (không nên xảy ra như thế)" -#: src/pcresearch.c:192 +#: src/pcresearch.c:214 msgid "internal error" msgstr "lỗi nội bộ" -#: src/pcresearch.c:215 +#: src/pcresearch.c:237 msgid "exceeded PCRE's line length limit" msgstr "đã vượt quá giới hạn chiều dài dòng của PCRE" -#: src/pcresearch.c:295 +#: src/pcresearch.c:317 msgid "exhausted PCRE JIT stack" msgstr "ngăn xếp “PCRE JIT” đã hết" -#: src/pcresearch.c:299 +#: src/pcresearch.c:321 msgid "exceeded PCRE's backtracking limit" msgstr "đã vượt quá giới hạn tìm ngược của PCRE" -#: src/pcresearch.c:306 +#: src/pcresearch.c:328 #, c-format msgid "internal PCRE error: %d" msgstr "lỗi nội bộ PCRE: %d" +#~ msgid "Mike Haertel" +#~ msgstr "Mike Haertel" + #~ msgid "%s: option '--%s' doesn't allow an argument\n" #~ msgstr "%s: tùy chọn “--%s” không cho phép có đối số\n" Binary files /tmp/tmppJ6Y2n/6jFha9hbxv/grep-3.1/po/zh_CN.gmo and /tmp/tmppJ6Y2n/tYMwNxGD36/grep-3.3/po/zh_CN.gmo differ diff -Nru grep-3.1/po/zh_CN.po grep-3.3/po/zh_CN.po --- grep-3.1/po/zh_CN.po 2017-07-02 20:21:16.000000000 +0000 +++ grep-3.3/po/zh_CN.po 2018-12-21 04:39:02.000000000 +0000 @@ -1,20 +1,22 @@ # Simplified Chinese(zh_CN) messages for grep. # This file is distributed under the same license as the grep package. # Copyright (C) 2008 Free Software Foundation, Inc. -# Ji ZhengYu , 2016 +# Ji ZhengYu , 2016. +# Boyuan Yang <073plan@gmail.com>, 2018. msgid "" msgstr "" -"Project-Id-Version: grep 2.23.7\n" +"Project-Id-Version: grep 3.0.23-b00\n" "Report-Msgid-Bugs-To: bug-grep@gnu.org\n" -"POT-Creation-Date: 2017-07-02 13:21-0700\n" -"PO-Revision-Date: 2016-03-30 16:53China Standard Time\n" -"Last-Translator: Ji ZhengYu \n" +"POT-Creation-Date: 2018-12-20 20:39-0800\n" +"PO-Revision-Date: 2018-05-30 14:35+0800\n" +"Last-Translator: Boyuan Yang <073plan@gmail.com>\n" "Language-Team: Chinese (simplified) \n" "Language: zh_CN\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Bugs: Report translation errors to the Language-Team address.\n" +"X-Generator: Poedit 2.0.7\n" #: lib/argmatch.c:134 #, c-format @@ -30,43 +32,51 @@ msgid "Valid arguments are:" msgstr "有效参数是:" -#: lib/closeout.c:122 src/grep.c:1274 +#: lib/c-stack.c:208 lib/c-stack.c:301 +msgid "program error" +msgstr "" + +#: lib/c-stack.c:209 lib/c-stack.c:302 +msgid "stack overflow" +msgstr "" + +#: lib/closeout.c:122 src/grep.c:1273 msgid "write error" msgstr "写错误" -#: lib/dfa.c:958 +#: lib/dfa.c:970 msgid "unbalanced [" msgstr "有未匹配的 [" -#: lib/dfa.c:1079 +#: lib/dfa.c:1091 msgid "invalid character class" msgstr "无效的字符类名" -#: lib/dfa.c:1205 +#: lib/dfa.c:1217 msgid "character class syntax is [[:space:]], not [:space:]" msgstr "字符类的语法是 [[:space:]],而非 [:space:]" -#: lib/dfa.c:1272 +#: lib/dfa.c:1284 msgid "unfinished \\ escape" msgstr "未做好 \\ 转义" -#: lib/dfa.c:1433 +#: lib/dfa.c:1445 msgid "invalid content of \\{\\}" msgstr "\\{\\}中内容无效" -#: lib/dfa.c:1436 +#: lib/dfa.c:1448 msgid "regular expression too big" msgstr "正则表达式太长" -#: lib/dfa.c:1850 +#: lib/dfa.c:1863 msgid "unbalanced (" msgstr "有未匹配的 (" -#: lib/dfa.c:1968 +#: lib/dfa.c:1981 msgid "no syntax specified" msgstr "未指定语法" -#: lib/dfa.c:1976 +#: lib/dfa.c:1992 msgid "unbalanced )" msgstr "有未匹配的 )" @@ -75,41 +85,41 @@ msgstr "未知的系统错误" #: lib/getopt.c:278 -#, fuzzy, c-format +#, c-format msgid "%s: option '%s%s' is ambiguous\n" -msgstr "%s: 选项'%s' 有歧义\n" +msgstr "%s:选项“%s%s”有歧义\n" #: lib/getopt.c:284 -#, fuzzy, c-format +#, c-format msgid "%s: option '%s%s' is ambiguous; possibilities:" -msgstr "%s: 选项'%s' 有歧义; 可能原因:" +msgstr "%s:选项“%s%s”有歧义;可能原因:" #: lib/getopt.c:319 -#, fuzzy, c-format +#, c-format msgid "%s: unrecognized option '%s%s'\n" -msgstr "%s: 未知选项'%c%s' \n" +msgstr "%s:无法识别的选项“%s%s”\n" #: lib/getopt.c:345 -#, fuzzy, c-format +#, c-format msgid "%s: option '%s%s' doesn't allow an argument\n" -msgstr "%s: 选项'%c%s' 不允许带参数\n" +msgstr "%s:选项“%s%s”不允许带参数\n" #: lib/getopt.c:360 -#, fuzzy, c-format +#, c-format msgid "%s: option '%s%s' requires an argument\n" -msgstr "%s: 选项'--%s' 必须带参数\n" +msgstr "%s:选项“%s%s”需要一个参数\n" #: lib/getopt.c:621 #, c-format msgid "%s: invalid option -- '%c'\n" -msgstr "%s: 无效选项 -- '%c' \n" +msgstr "%s:无效选项 -- “%c”\n" #: lib/getopt.c:636 lib/getopt.c:682 #, c-format msgid "%s: option requires an argument -- '%c'\n" -msgstr "%s: 选项必须带有一个参数 -- '%c'\n" +msgstr "%s:选项需要一个参数 -- “%c”\n" -#: lib/obstack.c:338 lib/obstack.c:340 lib/xalloc-die.c:34 src/pcresearch.c:291 +#: lib/obstack.c:338 lib/obstack.c:340 lib/xalloc-die.c:34 src/pcresearch.c:313 msgid "memory exhausted" msgstr "内存耗尽" @@ -126,7 +136,7 @@ #: lib/xbinary-io.c:37 #, c-format msgid "failed to set file descriptor text/binary mode" -msgstr "" +msgstr "设置文件描述符文本/二进制模式失败" #. TRANSLATORS: #. Get translations for open and closing quotation marks. @@ -147,7 +157,7 @@ #. for your locale. #. #. If you don't know what to put here, please see -#. +#. #. and use glyphs suitable for your language. #: lib/quotearg.c:362 msgid "`" @@ -225,16 +235,16 @@ msgid "Unmatched ) or \\)" msgstr ") 或 \\) 不匹配" -#: lib/regcomp.c:687 +#: lib/regcomp.c:688 msgid "No previous regular expression" msgstr "没有之前的正则表达式" -#: lib/version-etc.c:74 +#: lib/version-etc.c:73 #, c-format msgid "Packaged by %s (%s)\n" msgstr "由 %s (%s) 打包\n" -#: lib/version-etc.c:77 +#: lib/version-etc.c:76 #, c-format msgid "Packaged by %s\n" msgstr "由 %s 打包\n" @@ -242,14 +252,15 @@ #. TRANSLATORS: Translate "(C)" to the copyright symbol #. (C-in-a-circle), if this symbol is available in the user's #. locale. Otherwise, do not translate "(C)"; leave it as-is. -#: lib/version-etc.c:84 +#: lib/version-etc.c:83 msgid "(C)" msgstr "©" -#: lib/version-etc.c:86 +#: lib/version-etc.c:85 +#, fuzzy msgid "" "\n" -"License GPLv3+: GNU GPL version 3 or later .\n" "This is free software: you are free to change and redistribute it.\n" "There is NO WARRANTY, to the extent permitted by law.\n" @@ -395,12 +406,13 @@ msgstr "%s 主页: <%s>\n" #: lib/version-etc.c:253 -#, c-format -msgid "%s home page: \n" +#, fuzzy, c-format +msgid "%s home page: \n" msgstr "%s 主页: \n" #: lib/version-etc.c:256 -msgid "General help using GNU software: \n" +#, fuzzy +msgid "General help using GNU software: \n" msgstr "GNU 软件的通用帮助: \n" #: lib/xstrtol-error.c:63 @@ -416,103 +428,95 @@ #: lib/xstrtol-error.c:72 #, c-format msgid "%s%s argument '%s' too large" -msgstr "%s%s 参数'%s' 过多" - -#. This is a proper name. See the gettext manual, section Names. -#: src/grep.c:59 -msgid "Mike Haertel" -msgstr "Mike Haertel" +msgstr "%s%s 参数“%s”过大" -#: src/grep.c:60 -msgid "others, see " -msgstr "其余作者请参看 " - -#: src/grep.c:585 +#: src/grep.c:582 msgid "(standard input)" -msgstr "(标准输入)" +msgstr "(标准输入)" -#: src/grep.c:765 +#: src/grep.c:762 msgid "invalid context length argument" msgstr "无效的文本长度参数" -#: src/grep.c:828 +#: src/grep.c:827 msgid "input is too large to count" msgstr "输入太多无法计数" -#: src/grep.c:1579 +#: src/grep.c:1578 #, c-format msgid "Binary file %s matches\n" msgstr "匹配到二进制文件 %s\n" -#: src/grep.c:1627 +#: src/grep.c:1626 #, c-format msgid "warning: %s: %s" msgstr "警告: %s: %s" -#: src/grep.c:1628 +#: src/grep.c:1627 msgid "recursive directory loop" msgstr "嵌套目录循环" -#: src/grep.c:1844 +#: src/grep.c:1843 #, c-format msgid "input file %s is also the output" msgstr "输入文件 %s 同时也作输出" -#: src/grep.c:1907 src/grep.c:1914 -#, c-format -msgid "Usage: %s [OPTION]... PATTERN [FILE]...\n" -msgstr "用法: %s [选项]... PATTERN [FILE]...\n" +#: src/grep.c:1906 src/grep.c:1913 +#, fuzzy, c-format +msgid "Usage: %s [OPTION]... PATTERNS [FILE]...\n" +msgstr "用法: %s [选项]... 模式 [文件]...\n" -#: src/grep.c:1909 +#: src/grep.c:1908 #, c-format msgid "Try '%s --help' for more information.\n" msgstr "试用'%s --help' 来获得更多信息。\n" -#: src/grep.c:1915 +#: src/grep.c:1914 #, fuzzy, c-format -msgid "Search for PATTERN in each FILE.\n" -msgstr "在每个 FILE 或是标准输入中查找 PATTERN。\n" +msgid "Search for PATTERNS in each FILE.\n" +msgstr "在每个<文件>中查找给定<模式>。\n" -#: src/grep.c:1916 +#: src/grep.c:1915 #, fuzzy, c-format msgid "" "Example: %s -i 'hello world' menu.h main.c\n" +"PATTERNS can contain multiple patterns separated by newlines.\n" "\n" "Pattern selection and interpretation:\n" msgstr "" -"例如: %s -i 'hello world' menu.h main.c\n" +"例如:%s -i 'hello world' menu.h main.c\n" "\n" -"正则表达式选择与解释:\n" +"模式选择与解释:\n" #: src/grep.c:1920 #, fuzzy, c-format msgid "" -" -E, --extended-regexp PATTERN is an extended regular expression\n" -" -F, --fixed-strings PATTERN is a set of newline-separated strings\n" -" -G, --basic-regexp PATTERN is a basic regular expression (default)\n" -" -P, --perl-regexp PATTERN is a Perl regular expression\n" -msgstr "" -" -E, --extended-regexp PATTERN 是一个可扩展的正则表达式(缩写为 ERE)\n" -" -F, --fixed-strings PATTERN 是一组由断行符分隔的字符串。\n" -" -G, --basic-regexp PATTERN 是一个基本正则表达式(缩写为 BRE)\n" -" -P, --perl-regexp PATTERN 是一个 Perl 正则表达式\n" +" -E, --extended-regexp PATTERNS are extended regular expressions\n" +" -F, --fixed-strings PATTERNS are strings\n" +" -G, --basic-regexp PATTERNS are basic regular expressions\n" +" -P, --perl-regexp PATTERNS are Perl regular expressions\n" +msgstr "" +" -E, --extended-regexp <模式> 是一个扩展正则表达式\n" +" -F, --fixed-strings <模式> 是一组由换行符分隔的字符串\n" +" -G, --basic-regexp <模式> 是一个基本正则表达式\n" +" -P, --perl-regexp <模式> 是一个 Perl 正则表达式\n" #: src/grep.c:1926 -#, c-format +#, fuzzy, c-format msgid "" -" -e, --regexp=PATTERN use PATTERN for matching\n" -" -f, --file=FILE obtain PATTERN from FILE\n" +" -e, --regexp=PATTERNS use PATTERNS for matching\n" +" -f, --file=FILE take PATTERNS from FILE\n" " -i, --ignore-case ignore case distinctions\n" -" -w, --word-regexp force PATTERN to match only whole words\n" -" -x, --line-regexp force PATTERN to match only whole lines\n" +" -w, --word-regexp match only whole words\n" +" -x, --line-regexp match only whole lines\n" " -z, --null-data a data line ends in 0 byte, not newline\n" msgstr "" -" -e, --regexp=PATTERN 用 PATTERN 来进行匹配操作\n" -" -f, --file=FILE 从 FILE 中取得 PATTERN\n" +" -e, --regexp=<模式> 用指定的<模式>字符串来进行匹配操作\n" +" -f, --file=<文件> 从给定<文件>中取得<模式>\n" " -i, --ignore-case 忽略大小写\n" -" -w, --word-regexp 强制 PATTERN 仅完全匹配字词\n" -" -x, --line-regexp 强制 PATTERN 仅完全匹配一行\n" -" -z, --null-data 一个 0 字节的数据行,但不是空行\n" +" -w, --word-regexp 强制<模式>仅完全匹配字词\n" +" -x, --line-regexp 强制<模式>仅完全匹配整行\n" +" -z, --null-data 数据行以一个 0 字节结束,而非换行符\n" #: src/grep.c:1933 #, c-format @@ -532,7 +536,7 @@ " --help 显示此帮助并退出\n" #: src/grep.c:1940 -#, fuzzy, c-format +#, c-format msgid "" "\n" "Output control:\n" @@ -546,19 +550,19 @@ "prefix\n" msgstr "" "\n" -"输出控制:\n" -" -m, --max-count=NUM NUM 次匹配后停止\n" +"输出控制:\n" +" -m, --max-count=<次数> 得到给定<次数>次匹配后停止\n" " -b, --byte-offset 输出的同时打印字节偏移\n" " -n, --line-number 输出的同时打印行号\n" -" --line-buffered 每行输出清空\n" -" -H, --with-filename 为每一匹配项打印文件名\n" +" --line-buffered 每行输出后刷新输出缓冲区\n" +" -H, --with-filename 为输出行打印文件名\n" " -h, --no-filename 输出时不显示文件名前缀\n" -" --label=LABEL 将LABEL 作为标准输入文件名前缀\n" +" --label=<标签> 将给定<标签>作为标准输入文件名前缀\n" #: src/grep.c:1951 -#, c-format +#, fuzzy, c-format msgid "" -" -o, --only-matching show only the part of a line matching PATTERN\n" +" -o, --only-matching show only nonempty parts of lines that match\n" " -q, --quiet, --silent suppress all normal output\n" " --binary-files=TYPE assume that binary files are TYPE;\n" " TYPE is 'binary', 'text', or 'without-match'\n" @@ -590,14 +594,13 @@ " -R, --dereference-recursive 同上,但遍历所有符号链接\n" #: src/grep.c:1967 -#, c-format +#, fuzzy, c-format msgid "" -" --include=FILE_PATTERN search only files that match FILE_PATTERN\n" -" --exclude=FILE_PATTERN skip files and directories matching " -"FILE_PATTERN\n" +" --include=GLOB search only files that match GLOB (a file " +"pattern)\n" +" --exclude=GLOB skip files and directories matching GLOB\n" " --exclude-from=FILE skip files matching any file pattern from FILE\n" -" --exclude-dir=PATTERN directories that match PATTERN will be " -"skipped.\n" +" --exclude-dir=GLOB skip directories that match GLOB\n" msgstr "" " --include=FILE_PATTERN 只查找匹配FILE_PATTERN 的文件\n" " --exclude=FILE_PATTERN 跳过匹配FILE_PATTERN 的文件和目录\n" @@ -605,7 +608,7 @@ " --exclude-dir=PATTERN 跳过所有匹配PATTERN 的目录。\n" #: src/grep.c:1974 -#, fuzzy, c-format +#, c-format msgid "" " -L, --files-without-match print only names of FILEs with no selected " "lines\n" @@ -614,11 +617,11 @@ " -T, --initial-tab make tabs line up (if needed)\n" " -Z, --null print 0 byte after FILE name\n" msgstr "" -" -L, --files-without-match 只打印不匹配FILEs 的文件名\n" -" -l, --files-with-matches 只打印匹配FILES 的文件名\n" -" -c, --count 只打印每个FILE 中的匹配行数目\n" -" -T, --initial-tab 行首tabs 分隔(如有必要)\n" -" -Z, --null 在FILE 文件最后打印空字符\n" +" -L, --files-without-match 只打印没有匹配上的<文件>的名称\n" +" -l, --files-with-matches 只打印有匹配的<文件>的名称\n" +" -c, --count 只打印每个<文件>中的匹配行数目\n" +" -T, --initial-tab 行首制表符对齐(如有必要)\n" +" -Z, --null 在<文件>名最后打印空字符\n" #: src/grep.c:1980 #, c-format @@ -636,7 +639,7 @@ " -C, --context=NUM 打印NUM 行输出文本\n" #: src/grep.c:1987 -#, fuzzy, c-format +#, c-format msgid "" " -NUM same as --context=NUM\n" " --color[=WHEN],\n" @@ -649,10 +652,8 @@ " -NUM 等同于 --context=NUM\n" " --color[=WHEN],\n" " --colour[=WHEN] 使用标记高亮匹配字串;\n" -" WHEN 可以是`always', `never'或`auto'\n" -" -U, --binary 不要清除行尾的CR 字符(MSDOS/Windows)\n" -" -u, --unix-byte-offsets 忽略CR 字符,报告字节偏移\n" -"\t\t\t (MSDOS/Windows)\n" +" WHEN 可以是“always”、“never”或“auto”\n" +" -U, --binary 不要清除行尾的 CR 字符(MSDOS/Windows)\n" "\n" #: src/grep.c:1994 @@ -660,14 +661,13 @@ msgid "" "When FILE is '-', read standard input. With no FILE, read '.' if\n" "recursive, '-' otherwise. With fewer than two FILEs, assume -h.\n" -"Exit status is 0 if any line is selected, 1 otherwise;\n" +"Exit status is 0 if any line (or file if -L) is selected, 1 otherwise;\n" "if any error occurs and -q is not given, the exit status is 2.\n" msgstr "" -"若FILE 为 -,将读取标准输入。不带FILE,读取当前目录,除非命令行中指定了-r 选" -"项。\n" -"如果少于两个FILE 参数,就要默认使用-h 参数。\n" -"如果有任意行被匹配,那退出状态为 0,否则为 1;\n" -"如果有错误产生,且未指定 -q 参数,那退出状态为 2。\n" +"若给定<文件>为“-”,则从读取标准输入。 若无<文件>参数,则除非处于\n" +"递归工作模式,一律视为从“-”读取。如果提供了少于两个<文件>参数,\n" +"则默认启用 -h 选项。如果有任意行被匹配,则退出状态为 0,否则为 1;\n" +"如果有错误产生,且未指定 -q 参数,则退出状态为 2。\n" #: src/grep.c:2034 msgid "conflicting matchers specified" @@ -678,65 +678,75 @@ msgid "invalid matcher %s" msgstr "无效匹配 %s" -#: src/grep.c:2458 +#: src/grep.c:2459 #, c-format msgid "warning: GREP_OPTIONS is deprecated; please use an alias or script" -msgstr "警告: GREP_OPTIONS 已被废除; 请使用别名或脚本" +msgstr "警告: GREP_OPTIONS 已被废弃;请使用别名或脚本" -#: src/grep.c:2485 +#: src/grep.c:2486 msgid "unknown devices method" msgstr "未知的设备处理方式" -#: src/grep.c:2629 +#: src/grep.c:2630 msgid "invalid max count" msgstr "无效的最大计数" -#: src/grep.c:2687 +#: src/grep.c:2688 msgid "unknown binary-files type" msgstr "未知的二进制文件类型" -#: src/pcresearch.c:80 +#: src/grep.c:2770 +#, fuzzy +msgid "" +"Written by Mike Haertel and others; see\n" +"." +msgstr "其余作者请参看 " + +#: src/pcresearch.c:86 msgid "failed to allocate memory for the PCRE JIT stack" -msgstr "为PCRE JIT 栈分配内存时出错" +msgstr "为 PCRE JIT 栈分配内存时出错" -#: src/pcresearch.c:97 +#: src/pcresearch.c:118 msgid "" "support for the -P option is not compiled into this --disable-perl-regexp " "binary" -msgstr "-P 选项的支持未编译入 --disable-perl-regexp binary" +msgstr "-P 选项的支持未编译入 --disable-perl-regexp 二进制文件" -#: src/pcresearch.c:119 +#: src/pcresearch.c:140 msgid "-P supports only unibyte and UTF-8 locales" msgstr "-P 仅支持单字节及UTF-8 语言环境" -#: src/pcresearch.c:125 +#: src/pcresearch.c:146 msgid "the -P option only supports a single pattern" msgstr "-P 选项仅支持单一匹配字词" -#: src/pcresearch.c:167 +#: src/pcresearch.c:189 msgid "internal error (should never happen)" msgstr "内部错误(本应不可能发生)" -#: src/pcresearch.c:192 +#: src/pcresearch.c:214 msgid "internal error" msgstr "内部错误" -#: src/pcresearch.c:215 +#: src/pcresearch.c:237 msgid "exceeded PCRE's line length limit" -msgstr "超过PCRE 的行长度限制" +msgstr "超过 PCRE 的行长度限制" -#: src/pcresearch.c:295 +#: src/pcresearch.c:317 msgid "exhausted PCRE JIT stack" -msgstr "PCRE JIT栈已经用尽" +msgstr "PCRE JIT 栈已经用尽" -#: src/pcresearch.c:299 +#: src/pcresearch.c:321 msgid "exceeded PCRE's backtracking limit" -msgstr "超过PCRE 的回溯限制" +msgstr "超过 PCRE 的回溯限制" -#: src/pcresearch.c:306 +#: src/pcresearch.c:328 #, c-format msgid "internal PCRE error: %d" -msgstr "内部PCRE 错误: %d" +msgstr "PCRE 内部错误:%d" + +#~ msgid "Mike Haertel" +#~ msgstr "Mike Haertel" #~ msgid "%s: option '--%s' doesn't allow an argument\n" #~ msgstr "%s: 选项'--%s' 不允许带参数\n" @@ -753,6 +763,9 @@ #~ msgid "%s: option '-W %s' requires an argument\n" #~ msgstr "%s: 选项'-W %s' 必须带参数\n" +#~ msgid "lseek failed" +#~ msgstr "lseek 失败" + #~ msgid "PATTERN is, by default, a basic regular expression (BRE).\n" #~ msgstr "默认的 PATTERN 是一个基本正则表达式(缩写为 BRE)。\n" @@ -763,9 +776,6 @@ #~ "'egrep' 即'grep -E'。'fgrep' 即'grep -F'。\n" #~ "直接调用'egrep' 或是'fgrep' 均已被废弃。\n" -#~ msgid "lseek failed" -#~ msgstr "lseek 失败" - #~ msgid "unescaped ^ or $ not supported with -Pz" #~ msgstr "-Pz 不支持未经转义的字符^ 或$" Binary files /tmp/tmppJ6Y2n/6jFha9hbxv/grep-3.1/po/zh_TW.gmo and /tmp/tmppJ6Y2n/tYMwNxGD36/grep-3.3/po/zh_TW.gmo differ diff -Nru grep-3.1/po/zh_TW.po grep-3.3/po/zh_TW.po --- grep-3.1/po/zh_TW.po 2017-07-02 20:21:16.000000000 +0000 +++ grep-3.3/po/zh_TW.po 2018-12-21 04:39:02.000000000 +0000 @@ -10,7 +10,7 @@ msgstr "" "Project-Id-Version: grep 2.23.7\n" "Report-Msgid-Bugs-To: bug-grep@gnu.org\n" -"POT-Creation-Date: 2017-07-02 13:21-0700\n" +"POT-Creation-Date: 2018-12-20 20:39-0800\n" "PO-Revision-Date: 2016-03-26 04:25+0800\n" "Last-Translator: Webber Liao \n" "Language-Team: Chinese (traditional) \n" @@ -36,43 +36,51 @@ msgid "Valid arguments are:" msgstr "有效的引數為:" -#: lib/closeout.c:122 src/grep.c:1274 +#: lib/c-stack.c:208 lib/c-stack.c:301 +msgid "program error" +msgstr "" + +#: lib/c-stack.c:209 lib/c-stack.c:302 +msgid "stack overflow" +msgstr "" + +#: lib/closeout.c:122 src/grep.c:1273 msgid "write error" msgstr "寫入發生錯誤" -#: lib/dfa.c:958 +#: lib/dfa.c:970 msgid "unbalanced [" msgstr "不對稱的 [" -#: lib/dfa.c:1079 +#: lib/dfa.c:1091 msgid "invalid character class" msgstr "無效的字元類別" -#: lib/dfa.c:1205 +#: lib/dfa.c:1217 msgid "character class syntax is [[:space:]], not [:space:]" msgstr "字元類別的語法為 [[:space:]], 非 [:space:]" -#: lib/dfa.c:1272 +#: lib/dfa.c:1284 msgid "unfinished \\ escape" msgstr "不完整的 \\ 逸出" -#: lib/dfa.c:1433 +#: lib/dfa.c:1445 msgid "invalid content of \\{\\}" msgstr "\\{\\} 的內容無效" -#: lib/dfa.c:1436 +#: lib/dfa.c:1448 msgid "regular expression too big" msgstr "正規表示式過長" -#: lib/dfa.c:1850 +#: lib/dfa.c:1863 msgid "unbalanced (" msgstr "不對稱的 (" -#: lib/dfa.c:1968 +#: lib/dfa.c:1981 msgid "no syntax specified" msgstr "沒有指定的語法" -#: lib/dfa.c:1976 +#: lib/dfa.c:1992 msgid "unbalanced )" msgstr "不對稱的 )" @@ -115,7 +123,7 @@ msgid "%s: option requires an argument -- '%c'\n" msgstr "%s: 選項需要一個引數 -- \"%c\"\n" -#: lib/obstack.c:338 lib/obstack.c:340 lib/xalloc-die.c:34 src/pcresearch.c:291 +#: lib/obstack.c:338 lib/obstack.c:340 lib/xalloc-die.c:34 src/pcresearch.c:313 msgid "memory exhausted" msgstr "記憶體用盡" @@ -153,7 +161,7 @@ #. for your locale. #. #. If you don't know what to put here, please see -#. +#. #. and use glyphs suitable for your language. #: lib/quotearg.c:362 msgid "`" @@ -231,16 +239,16 @@ msgid "Unmatched ) or \\)" msgstr "沒有對應的 ) 或 \\)" -#: lib/regcomp.c:687 +#: lib/regcomp.c:688 msgid "No previous regular expression" msgstr "沒有先前的正規表示式" -#: lib/version-etc.c:74 +#: lib/version-etc.c:73 #, c-format msgid "Packaged by %s (%s)\n" msgstr "套件由 %s (%s) 所打包\n" -#: lib/version-etc.c:77 +#: lib/version-etc.c:76 #, c-format msgid "Packaged by %s\n" msgstr "套件由 %s 所打包\n" @@ -248,14 +256,15 @@ #. TRANSLATORS: Translate "(C)" to the copyright symbol #. (C-in-a-circle), if this symbol is available in the user's #. locale. Otherwise, do not translate "(C)"; leave it as-is. -#: lib/version-etc.c:84 +#: lib/version-etc.c:83 msgid "(C)" msgstr "(C)" -#: lib/version-etc.c:86 +#: lib/version-etc.c:85 +#, fuzzy msgid "" "\n" -"License GPLv3+: GNU GPL version 3 or later .\n" "This is free software: you are free to change and redistribute it.\n" "There is NO WARRANTY, to the extent permitted by law.\n" @@ -399,12 +408,13 @@ msgstr "%s 首頁: <%s>\n" #: lib/version-etc.c:253 -#, c-format -msgid "%s home page: \n" +#, fuzzy, c-format +msgid "%s home page: \n" msgstr "%s 首頁: \n" #: lib/version-etc.c:256 -msgid "General help using GNU software: \n" +#, fuzzy +msgid "General help using GNU software: \n" msgstr "GNU 軟體用法的一般說明: \n" #: lib/xstrtol-error.c:63 @@ -422,65 +432,57 @@ msgid "%s%s argument '%s' too large" msgstr "%s%s 引數 \"%s\" 過大" -#. This is a proper name. See the gettext manual, section Names. -#: src/grep.c:59 -msgid "Mike Haertel" -msgstr "Mike Haertel" - -#: src/grep.c:60 -msgid "others, see " -msgstr "其他作者,請見 " - -#: src/grep.c:585 +#: src/grep.c:582 msgid "(standard input)" msgstr "(標準輸入)" -#: src/grep.c:765 +#: src/grep.c:762 msgid "invalid context length argument" msgstr "無效的內容列數值" -#: src/grep.c:828 +#: src/grep.c:827 msgid "input is too large to count" msgstr "輸入過長無法計數" -#: src/grep.c:1579 +#: src/grep.c:1578 #, c-format msgid "Binary file %s matches\n" msgstr "二進位格式檔案 %s 符合\n" -#: src/grep.c:1627 +#: src/grep.c:1626 #, c-format msgid "warning: %s: %s" msgstr "警告: %s: %s" -#: src/grep.c:1628 +#: src/grep.c:1627 msgid "recursive directory loop" msgstr "遞迴的目錄結構" -#: src/grep.c:1844 +#: src/grep.c:1843 #, c-format msgid "input file %s is also the output" msgstr "輸入檔 %s 也是輸出對象" -#: src/grep.c:1907 src/grep.c:1914 -#, c-format -msgid "Usage: %s [OPTION]... PATTERN [FILE]...\n" +#: src/grep.c:1906 src/grep.c:1913 +#, fuzzy, c-format +msgid "Usage: %s [OPTION]... PATTERNS [FILE]...\n" msgstr "用法: %s [選項]… PATTERN [檔案]…\n" -#: src/grep.c:1909 +#: src/grep.c:1908 #, c-format msgid "Try '%s --help' for more information.\n" msgstr "請使用 \"%s --help\" 以閱讀更多的資訊。\n" -#: src/grep.c:1915 +#: src/grep.c:1914 #, fuzzy, c-format -msgid "Search for PATTERN in each FILE.\n" +msgid "Search for PATTERNS in each FILE.\n" msgstr "對每個 檔案 或標準輸入搜尋 PATTERN。\n" -#: src/grep.c:1916 +#: src/grep.c:1915 #, fuzzy, c-format msgid "" "Example: %s -i 'hello world' menu.h main.c\n" +"PATTERNS can contain multiple patterns separated by newlines.\n" "\n" "Pattern selection and interpretation:\n" msgstr "" @@ -491,10 +493,10 @@ #: src/grep.c:1920 #, fuzzy, c-format msgid "" -" -E, --extended-regexp PATTERN is an extended regular expression\n" -" -F, --fixed-strings PATTERN is a set of newline-separated strings\n" -" -G, --basic-regexp PATTERN is a basic regular expression (default)\n" -" -P, --perl-regexp PATTERN is a Perl regular expression\n" +" -E, --extended-regexp PATTERNS are extended regular expressions\n" +" -F, --fixed-strings PATTERNS are strings\n" +" -G, --basic-regexp PATTERNS are basic regular expressions\n" +" -P, --perl-regexp PATTERNS are Perl regular expressions\n" msgstr "" " -E, --extended-regexp PATTERN 是一個延伸正規表示式 (ERE)\n" " -F, --fixed-strings PATTERN 是一組以換列分隔開的固定字串\n" @@ -502,13 +504,13 @@ " -P, --perl-regexp PATTERN 是一個 Perl 的正規表示式\n" #: src/grep.c:1926 -#, c-format +#, fuzzy, c-format msgid "" -" -e, --regexp=PATTERN use PATTERN for matching\n" -" -f, --file=FILE obtain PATTERN from FILE\n" +" -e, --regexp=PATTERNS use PATTERNS for matching\n" +" -f, --file=FILE take PATTERNS from FILE\n" " -i, --ignore-case ignore case distinctions\n" -" -w, --word-regexp force PATTERN to match only whole words\n" -" -x, --line-regexp force PATTERN to match only whole lines\n" +" -w, --word-regexp match only whole words\n" +" -x, --line-regexp match only whole lines\n" " -z, --null-data a data line ends in 0 byte, not newline\n" msgstr "" " -e, --regexp=PATTERN 用 PATTERN 搜尋\n" @@ -560,9 +562,9 @@ " --label=LABEL 以 LABEL 作標準輸入的檔名前綴\n" #: src/grep.c:1951 -#, c-format +#, fuzzy, c-format msgid "" -" -o, --only-matching show only the part of a line matching PATTERN\n" +" -o, --only-matching show only nonempty parts of lines that match\n" " -q, --quiet, --silent suppress all normal output\n" " --binary-files=TYPE assume that binary files are TYPE;\n" " TYPE is 'binary', 'text', or 'without-match'\n" @@ -594,14 +596,13 @@ " -R, -r, --recursive 等同於 --directories=recurse\n" #: src/grep.c:1967 -#, c-format +#, fuzzy, c-format msgid "" -" --include=FILE_PATTERN search only files that match FILE_PATTERN\n" -" --exclude=FILE_PATTERN skip files and directories matching " -"FILE_PATTERN\n" +" --include=GLOB search only files that match GLOB (a file " +"pattern)\n" +" --exclude=GLOB skip files and directories matching GLOB\n" " --exclude-from=FILE skip files matching any file pattern from FILE\n" -" --exclude-dir=PATTERN directories that match PATTERN will be " -"skipped.\n" +" --exclude-dir=GLOB skip directories that match GLOB\n" msgstr "" " --include=FILE_PATTERN 只搜尋檔名符合 FILE_PATTERN 的檔案\n" " --exclude=FILE_PATTERN 跳過名字符合 FILE_PATTERN 的檔案和檔案目錄\n" @@ -664,7 +665,7 @@ msgid "" "When FILE is '-', read standard input. With no FILE, read '.' if\n" "recursive, '-' otherwise. With fewer than two FILEs, assume -h.\n" -"Exit status is 0 if any line is selected, 1 otherwise;\n" +"Exit status is 0 if any line (or file if -L) is selected, 1 otherwise;\n" "if any error occurs and -q is not given, the exit status is 2.\n" msgstr "" "如果 檔案 為 -,讀取標準輸入。 當沒有指定 檔案 時,如果有採用 -r 選項\n" @@ -681,66 +682,76 @@ msgid "invalid matcher %s" msgstr "無效的配對選項 %s" -#: src/grep.c:2458 +#: src/grep.c:2459 #, c-format msgid "warning: GREP_OPTIONS is deprecated; please use an alias or script" msgstr "警告: GREP_OPTIONS 已經被廢除。請使用別名或腳本取代。" -#: src/grep.c:2485 +#: src/grep.c:2486 msgid "unknown devices method" msgstr "未知的裝置方法" -#: src/grep.c:2629 +#: src/grep.c:2630 msgid "invalid max count" msgstr "無效的最大計次" -#: src/grep.c:2687 +#: src/grep.c:2688 msgid "unknown binary-files type" msgstr "未知的二進位檔案類別" -#: src/pcresearch.c:80 +#: src/grep.c:2770 +#, fuzzy +msgid "" +"Written by Mike Haertel and others; see\n" +"." +msgstr "其他作者,請見 " + +#: src/pcresearch.c:86 msgid "failed to allocate memory for the PCRE JIT stack" msgstr "為 PCRE JIT 堆疊分配記憶體時出現錯誤" -#: src/pcresearch.c:97 +#: src/pcresearch.c:118 msgid "" "support for the -P option is not compiled into this --disable-perl-regexp " "binary" msgstr "-P 選項的支援沒有被編譯進此 --disable-perl-regexp 的二進位檔案" -#: src/pcresearch.c:119 +#: src/pcresearch.c:140 msgid "-P supports only unibyte and UTF-8 locales" msgstr "-P 只支援單位元組和 UTF-8 編碼" -#: src/pcresearch.c:125 +#: src/pcresearch.c:146 msgid "the -P option only supports a single pattern" msgstr "-P 選項只支援單一樣式" -#: src/pcresearch.c:167 +#: src/pcresearch.c:189 msgid "internal error (should never happen)" msgstr "內部錯誤 (不應該出現這個錯誤)" -#: src/pcresearch.c:192 +#: src/pcresearch.c:214 msgid "internal error" msgstr "內部錯誤" -#: src/pcresearch.c:215 +#: src/pcresearch.c:237 msgid "exceeded PCRE's line length limit" msgstr "已超過 PCRE 的字數上限" -#: src/pcresearch.c:295 +#: src/pcresearch.c:317 msgid "exhausted PCRE JIT stack" msgstr "已耗盡 PCRE JIT 堆疊" -#: src/pcresearch.c:299 +#: src/pcresearch.c:321 msgid "exceeded PCRE's backtracking limit" msgstr "已超過 PCRE 的回溯上限" -#: src/pcresearch.c:306 +#: src/pcresearch.c:328 #, c-format msgid "internal PCRE error: %d" msgstr "內部 PCRE 錯誤: %d" +#~ msgid "Mike Haertel" +#~ msgstr "Mike Haertel" + #~ msgid "%s: option '--%s' doesn't allow an argument\n" #~ msgstr "%s: 選項 \"--%s\" 不接受引數\n" diff -Nru grep-3.1/README grep-3.3/README --- grep-3.1/README 2017-01-01 11:34:33.000000000 +0000 +++ grep-3.3/README 2018-04-21 23:35:48.000000000 +0000 @@ -1,4 +1,4 @@ - Copyright (C) 1992, 1997-2002, 2004-2017 Free Software Foundation, Inc. + Copyright (C) 1992, 1997-2002, 2004-2018 Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright @@ -49,11 +49,11 @@ A list of outstanding and resolved bugs can be found at: - http://debbugs.gnu.org/cgi/pkgreport.cgi?package=grep + https://debbugs.gnu.org/cgi/pkgreport.cgi?package=grep You can also browse the bug-grep mailing list archive at: - http://lists.gnu.org/archive/html/bug-grep/ + https://lists.gnu.org/r/bug-grep/ For any copyright year range specified as YYYY-ZZZZ in this package note that the range specifies every single year in that closed interval. diff -Nru grep-3.1/README-alpha grep-3.3/README-alpha --- grep-3.1/README-alpha 2017-01-01 11:34:33.000000000 +0000 +++ grep-3.3/README-alpha 2018-04-21 23:35:48.000000000 +0000 @@ -1,33 +1,31 @@ - Copyright (C) 1992, 1997-2002, 2004-2017 Free Software Foundation, Inc. + Copyright (C) 1992, 1997-2002, 2004-2018 Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. The development source code is available via Git from Savannah: see -. The main project page is at -. +. The main project page is at +. The source code in the Git uses autotools to generate some files. Before following the instructions in the INSTALL file for compiling grep, you need to run the bootstrap script. -Test releases are available at . - Please submit bug reports to . If you are interested in the development of GNU grep, you may want to subscribe to the development mailing list. To subscribe, send an email message to with "subscribe" (without the quotation marks) in the subject header field (or in the body) of the -email, or visit . +email, or visit . To follow development more closely, there is also the grep-commit mailing list to which log entries (one per commit) and diff output (one per modified file) from CVS are automatically sent. To subscribe, send an email message to with "subscribe" (without the quotation marks) in the subject header field (or in the body) of -the email, or visit . +the email, or visit . A web page containing information for GNU grep developers is at -. +. diff -Nru grep-3.1/src/dfasearch.c grep-3.3/src/dfasearch.c --- grep-3.1/src/dfasearch.c 2017-01-17 17:04:17.000000000 +0000 +++ grep-3.3/src/dfasearch.c 2018-01-07 00:09:11.000000000 +0000 @@ -1,5 +1,5 @@ /* dfasearch.c - searching subroutines using dfa and regex for grep. - Copyright 1992, 1998, 2000, 2007, 2009-2017 Free Software Foundation, Inc. + Copyright 1992, 1998, 2000, 2007, 2009-2018 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 -Nru grep-3.1/src/die.h grep-3.3/src/die.h --- grep-3.1/src/die.h 2017-01-01 11:34:33.000000000 +0000 +++ grep-3.3/src/die.h 2018-01-07 00:09:11.000000000 +0000 @@ -1,5 +1,5 @@ /* Report an error and exit. - Copyright 2016-2017 Free Software Foundation, Inc. + Copyright 2016-2018 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 -Nru grep-3.1/src/grep.c grep-3.3/src/grep.c --- grep-3.1/src/grep.c 2017-07-02 17:41:41.000000000 +0000 +++ grep-3.3/src/grep.c 2018-12-21 03:31:11.000000000 +0000 @@ -1,5 +1,5 @@ /* grep.c - main driver file for grep. - Copyright (C) 1992, 1997-2002, 2004-2017 Free Software Foundation, Inc. + Copyright (C) 1992, 1997-2002, 2004-2018 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,6 +30,7 @@ #include "argmatch.h" #include "c-ctype.h" +#include "c-stack.h" #include "closeout.h" #include "colorize.h" #include "die.h" @@ -55,10 +56,6 @@ enum { SEP_CHAR_REJECTED = '-' }; static char const SEP_STR_GROUP[] = "--"; -#define AUTHORS \ - proper_name ("Mike Haertel"), \ - _("others, see ") - /* When stdout is connected to a regular file, save its stat information here, so that we can automatically skip it, thus avoiding a potential (racy) infinite loop. */ @@ -798,7 +795,6 @@ static char *buffer; /* Base of buffer. */ static size_t bufalloc; /* Allocated buffer size, counting slop. */ -enum { INITIAL_BUFSIZE = 32768 }; /* Initial buffer size, not counting slop. */ static int bufdesc; /* File descriptor. */ static char *bufbeg; /* Beginning of user-visible stuff. */ static char *buflim; /* Limit of user-visible stuff. */ @@ -811,6 +807,9 @@ static bool skip_empty_lines; /* Skip empty lines in data. */ static uintmax_t totalnl; /* Total newline count before lastnl. */ +/* Initial buffer size, not counting slop. */ +enum { INITIAL_BUFSIZE = 96 * 1024 }; + /* Return VAL aligned to the next multiple of ALIGNMENT. VAL can be an integer or a pointer. Both args must be free of side effects. */ #define ALIGN_TO(val, alignment) \ @@ -1863,11 +1862,11 @@ fflush_errno (); } - status = !count; + status = !count == !(list_files == LISTFILES_NONMATCHING); if (list_files == LISTFILES_NONE) finalize_input (desc, &st, ineof); - else if (list_files == (status ? LISTFILES_NONMATCHING : LISTFILES_MATCHING)) + else if (status == 0) { print_filename (); putchar_errno ('\n' & filename_mask); @@ -1904,31 +1903,32 @@ { if (status != 0) { - fprintf (stderr, _("Usage: %s [OPTION]... PATTERN [FILE]...\n"), + fprintf (stderr, _("Usage: %s [OPTION]... PATTERNS [FILE]...\n"), getprogname ()); fprintf (stderr, _("Try '%s --help' for more information.\n"), getprogname ()); } else { - printf (_("Usage: %s [OPTION]... PATTERN [FILE]...\n"), getprogname ()); - printf (_("Search for PATTERN in each FILE.\n")); + printf (_("Usage: %s [OPTION]... PATTERNS [FILE]...\n"), getprogname ()); + printf (_("Search for PATTERNS in each FILE.\n")); printf (_("\ Example: %s -i 'hello world' menu.h main.c\n\ +PATTERNS can contain multiple patterns separated by newlines.\n\ \n\ Pattern selection and interpretation:\n"), getprogname ()); printf (_("\ - -E, --extended-regexp PATTERN is an extended regular expression\n\ - -F, --fixed-strings PATTERN is a set of newline-separated strings\n\ - -G, --basic-regexp PATTERN is a basic regular expression (default)\n\ - -P, --perl-regexp PATTERN is a Perl regular expression\n")); + -E, --extended-regexp PATTERNS are extended regular expressions\n\ + -F, --fixed-strings PATTERNS are strings\n\ + -G, --basic-regexp PATTERNS are basic regular expressions\n\ + -P, --perl-regexp PATTERNS are Perl regular expressions\n")); /* -X is deliberately undocumented. */ printf (_("\ - -e, --regexp=PATTERN use PATTERN for matching\n\ - -f, --file=FILE obtain PATTERN from FILE\n\ + -e, --regexp=PATTERNS use PATTERNS for matching\n\ + -f, --file=FILE take PATTERNS from FILE\n\ -i, --ignore-case ignore case distinctions\n\ - -w, --word-regexp force PATTERN to match only whole words\n\ - -x, --line-regexp force PATTERN to match only whole lines\n\ + -w, --word-regexp match only whole words\n\ + -x, --line-regexp match only whole lines\n\ -z, --null-data a data line ends in 0 byte, not newline\n")); printf (_("\ \n\ @@ -1949,7 +1949,7 @@ --label=LABEL use LABEL as the standard input file name prefix\n\ ")); printf (_("\ - -o, --only-matching show only the part of a line matching PATTERN\n\ + -o, --only-matching show only nonempty parts of lines that match\n\ -q, --quiet, --silent suppress all normal output\n\ --binary-files=TYPE assume that binary files are TYPE;\n\ TYPE is 'binary', 'text', or 'without-match'\n\ @@ -1965,11 +1965,11 @@ -R, --dereference-recursive likewise, but follow all symlinks\n\ ")); printf (_("\ - --include=FILE_PATTERN search only files that match FILE_PATTERN\n\ - --exclude=FILE_PATTERN skip files and directories matching\ - FILE_PATTERN\n\ + --include=GLOB search only files that match GLOB (a file pattern)" + "\n\ + --exclude=GLOB skip files and directories matching GLOB\n\ --exclude-from=FILE skip files matching any file pattern from FILE\n\ - --exclude-dir=PATTERN directories that match PATTERN will be skipped.\n\ + --exclude-dir=GLOB skip directories that match GLOB\n\ ")); printf (_("\ -L, --files-without-match print only names of FILEs with no selected lines\n\ @@ -1994,7 +1994,7 @@ printf (_("\ When FILE is '-', read standard input. With no FILE, read '.' if\n\ recursive, '-' otherwise. With fewer than two FILEs, assume -h.\n\ -Exit status is 0 if any line is selected, 1 otherwise;\n\ +Exit status is 0 if any line (or file if -L) is selected, 1 otherwise;\n\ if any error occurs and -q is not given, the exit status is 2.\n")); emit_bug_reporting_address (); } @@ -2005,7 +2005,7 @@ static struct { - char const name[12]; + char name[12]; int syntax; /* used if compile == GEAcompile */ compile_fp_t compile; execute_fp_t execute; @@ -2450,6 +2450,7 @@ init_localeinfo (&localeinfo); atexit (clean_up_stdout); + c_stack_action (NULL); last_recursive = 0; @@ -2764,8 +2765,10 @@ if (show_version) { - version_etc (stdout, getprogname (), PACKAGE_NAME, VERSION, AUTHORS, + version_etc (stdout, getprogname (), PACKAGE_NAME, VERSION, (char *) NULL); + puts (_("Written by Mike Haertel and others; see\n" + ".")); return EXIT_SUCCESS; } diff -Nru grep-3.1/src/grep.h grep-3.3/src/grep.h --- grep-3.1/src/grep.h 2017-01-01 11:34:33.000000000 +0000 +++ grep-3.3/src/grep.h 2018-01-07 00:09:11.000000000 +0000 @@ -1,5 +1,5 @@ /* grep.h - interface to grep driver for searching subroutines. - Copyright (C) 1992, 1998, 2001, 2007, 2009-2017 Free Software Foundation, + Copyright (C) 1992, 1998, 2001, 2007, 2009-2018 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify diff -Nru grep-3.1/src/kwsearch.c grep-3.3/src/kwsearch.c --- grep-3.1/src/kwsearch.c 2017-01-17 17:04:17.000000000 +0000 +++ grep-3.3/src/kwsearch.c 2018-01-07 00:09:11.000000000 +0000 @@ -1,5 +1,5 @@ /* kwsearch.c - searching subroutines using kwset for grep. - Copyright 1992, 1998, 2000, 2007, 2009-2017 Free Software Foundation, Inc. + Copyright 1992, 1998, 2000, 2007, 2009-2018 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 -Nru grep-3.1/src/kwset.c grep-3.3/src/kwset.c --- grep-3.1/src/kwset.c 2017-05-21 19:07:57.000000000 +0000 +++ grep-3.3/src/kwset.c 2018-04-21 23:35:48.000000000 +0000 @@ -1,5 +1,5 @@ /* kwset.c - search for any of a set of keywords. - Copyright (C) 1989, 1998, 2000, 2005, 2007, 2009-2017 Free Software + Copyright (C) 1989, 1998, 2000, 2005, 2007, 2009-2018 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify @@ -22,18 +22,18 @@ /* For the Aho-Corasick algorithm, see: Aho AV, Corasick MJ. Efficient string matching: an aid to bibliographic search. CACM 18, 6 (1975), 333-40 - , which describes the + , which describes the failure function used below. For the Boyer-Moore algorithm, see: Boyer RS, Moore JS. A fast string searching algorithm. CACM 20, 10 (1977), 762-72 - . + . For a survey of more-recent string matching algorithms that might help improve performance, see: Faro S, Lecroq T. The exact online string matching problem: a review of the most recent results. ACM Computing Surveys 45, 2 (2013), 13 - . */ + . */ #include diff -Nru grep-3.1/src/kwset.h grep-3.3/src/kwset.h --- grep-3.1/src/kwset.h 2017-01-19 00:37:48.000000000 +0000 +++ grep-3.3/src/kwset.h 2018-01-07 00:09:11.000000000 +0000 @@ -1,5 +1,5 @@ /* kwset.h - header declaring the keyword set library. - Copyright (C) 1989, 1998, 2005, 2007, 2009-2017 Free Software Foundation, + Copyright (C) 1989, 1998, 2005, 2007, 2009-2018 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify diff -Nru grep-3.1/src/Makefile.am grep-3.3/src/Makefile.am --- grep-3.1/src/Makefile.am 2017-03-05 17:53:46.000000000 +0000 +++ grep-3.3/src/Makefile.am 2018-04-21 23:35:48.000000000 +0000 @@ -1,5 +1,5 @@ ## Process this file with automake to create Makefile.in -# Copyright 1997-1998, 2005-2017 Free Software Foundation, Inc. +# Copyright 1997-1998, 2005-2018 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 @@ -12,7 +12,7 @@ # 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 . +# along with this program. If not, see . LN = ln @@ -43,7 +43,7 @@ ../lib/libgreputils.a $(LIBINTL) ../lib/libgreputils.a $(LIBICONV) \ $(LIBTHREAD) -grep_LDADD = $(LDADD) $(PCRE_LIBS) +grep_LDADD = $(LDADD) $(PCRE_LIBS) $(LIBCSTACK) localedir = $(datadir)/locale AM_CPPFLAGS = -I$(top_builddir)/lib -I$(top_srcdir)/lib diff -Nru grep-3.1/src/Makefile.in grep-3.3/src/Makefile.in --- grep-3.1/src/Makefile.in 2017-07-02 20:12:56.000000000 +0000 +++ grep-3.3/src/Makefile.in 2018-12-21 03:59:31.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.99a from Makefile.am. +# Makefile.in generated by automake 1.16a from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2015 Free Software Foundation, Inc. +# Copyright (C) 1994-2018 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -14,7 +14,7 @@ @SET_MAKE@ -# Copyright 1997-1998, 2005-2017 Free Software Foundation, Inc. +# Copyright 1997-1998, 2005-2018 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 @@ -27,7 +27,7 @@ # 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 . +# along with this program. If not, see . @@ -108,17 +108,18 @@ subdir = src ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \ + $(top_srcdir)/m4/__inline.m4 \ $(top_srcdir)/m4/absolute-header.m4 $(top_srcdir)/m4/alloca.m4 \ - $(top_srcdir)/m4/assert.m4 $(top_srcdir)/m4/btowc.m4 \ - $(top_srcdir)/m4/builtin-expect.m4 \ - $(top_srcdir)/m4/chdir-long.m4 \ + $(top_srcdir)/m4/arpa_inet_h.m4 $(top_srcdir)/m4/assert.m4 \ + $(top_srcdir)/m4/btowc.m4 $(top_srcdir)/m4/builtin-expect.m4 \ + $(top_srcdir)/m4/c-stack.m4 $(top_srcdir)/m4/chdir-long.m4 \ $(top_srcdir)/m4/close-stream.m4 $(top_srcdir)/m4/close.m4 \ $(top_srcdir)/m4/closedir.m4 $(top_srcdir)/m4/closeout.m4 \ $(top_srcdir)/m4/codeset.m4 $(top_srcdir)/m4/configmake.m4 \ $(top_srcdir)/m4/ctype.m4 $(top_srcdir)/m4/cycle-check.m4 \ $(top_srcdir)/m4/d-ino.m4 $(top_srcdir)/m4/d-type.m4 \ - $(top_srcdir)/m4/dirent-safer.m4 $(top_srcdir)/m4/dirent_h.m4 \ - $(top_srcdir)/m4/dirfd.m4 $(top_srcdir)/m4/dirname.m4 \ + $(top_srcdir)/m4/dirent_h.m4 $(top_srcdir)/m4/dirfd.m4 \ + $(top_srcdir)/m4/dirname.m4 \ $(top_srcdir)/m4/double-slash-root.m4 $(top_srcdir)/m4/dup.m4 \ $(top_srcdir)/m4/dup2.m4 $(top_srcdir)/m4/eealloc.m4 \ $(top_srcdir)/m4/environ.m4 $(top_srcdir)/m4/errno_h.m4 \ @@ -130,32 +131,38 @@ $(top_srcdir)/m4/fdopen.m4 $(top_srcdir)/m4/fdopendir.m4 \ $(top_srcdir)/m4/filenamecat.m4 $(top_srcdir)/m4/flexmember.m4 \ $(top_srcdir)/m4/float_h.m4 $(top_srcdir)/m4/fnmatch.m4 \ - $(top_srcdir)/m4/fpending.m4 $(top_srcdir)/m4/fpieee.m4 \ - $(top_srcdir)/m4/fstat.m4 $(top_srcdir)/m4/fstatat.m4 \ + $(top_srcdir)/m4/fnmatch_h.m4 $(top_srcdir)/m4/fpending.m4 \ + $(top_srcdir)/m4/fpieee.m4 $(top_srcdir)/m4/fstat.m4 \ + $(top_srcdir)/m4/fstatat.m4 $(top_srcdir)/m4/ftruncate.m4 \ $(top_srcdir)/m4/fts.m4 $(top_srcdir)/m4/getcwd.m4 \ $(top_srcdir)/m4/getdtablesize.m4 $(top_srcdir)/m4/getopt.m4 \ $(top_srcdir)/m4/getpagesize.m4 \ $(top_srcdir)/m4/getprogname.m4 $(top_srcdir)/m4/gettext.m4 \ - $(top_srcdir)/m4/glibc21.m4 $(top_srcdir)/m4/gnulib-common.m4 \ + $(top_srcdir)/m4/gettimeofday.m4 $(top_srcdir)/m4/glibc21.m4 \ + $(top_srcdir)/m4/gnulib-common.m4 \ $(top_srcdir)/m4/gnulib-comp.m4 \ - $(top_srcdir)/m4/hard-locale.m4 $(top_srcdir)/m4/i-ring.m4 \ + $(top_srcdir)/m4/host-cpu-c-abi.m4 $(top_srcdir)/m4/i-ring.m4 \ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/iconv_h.m4 \ $(top_srcdir)/m4/iconv_open.m4 \ - $(top_srcdir)/m4/include_next.m4 $(top_srcdir)/m4/inline.m4 \ + $(top_srcdir)/m4/include_next.m4 $(top_srcdir)/m4/inet_pton.m4 \ + $(top_srcdir)/m4/inline.m4 \ + $(top_srcdir)/m4/intl-thread-locale.m4 \ $(top_srcdir)/m4/intlmacosx.m4 $(top_srcdir)/m4/intmax_t.m4 \ $(top_srcdir)/m4/inttostr.m4 $(top_srcdir)/m4/inttypes-pri.m4 \ $(top_srcdir)/m4/inttypes.m4 $(top_srcdir)/m4/inttypes_h.m4 \ - $(top_srcdir)/m4/isatty.m4 $(top_srcdir)/m4/isblank.m4 \ - $(top_srcdir)/m4/iswblank.m4 $(top_srcdir)/m4/iswctype.m4 \ - $(top_srcdir)/m4/langinfo_h.m4 $(top_srcdir)/m4/largefile.m4 \ - $(top_srcdir)/m4/lcmessage.m4 $(top_srcdir)/m4/lib-ld.m4 \ - $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ + $(top_srcdir)/m4/ioctl.m4 $(top_srcdir)/m4/isatty.m4 \ + $(top_srcdir)/m4/isblank.m4 $(top_srcdir)/m4/iswblank.m4 \ + $(top_srcdir)/m4/iswctype.m4 $(top_srcdir)/m4/langinfo_h.m4 \ + $(top_srcdir)/m4/largefile.m4 $(top_srcdir)/m4/lcmessage.m4 \ + $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ + $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libsigsegv.m4 \ $(top_srcdir)/m4/libunistring-base.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-tr.m4 $(top_srcdir)/m4/locale-zh.m4 \ $(top_srcdir)/m4/locale_h.m4 $(top_srcdir)/m4/localeconv.m4 \ - $(top_srcdir)/m4/localename.m4 $(top_srcdir)/m4/lock.m4 \ + $(top_srcdir)/m4/localename.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/manywarnings.m4 \ @@ -168,35 +175,46 @@ $(top_srcdir)/m4/minmax.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/nanosleep.m4 $(top_srcdir)/m4/netinet_in_h.m4 \ $(top_srcdir)/m4/nl_langinfo.m4 $(top_srcdir)/m4/nls.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/off_t.m4 $(top_srcdir)/m4/open-cloexec.m4 \ $(top_srcdir)/m4/open.m4 $(top_srcdir)/m4/openat.m4 \ $(top_srcdir)/m4/opendir.m4 $(top_srcdir)/m4/pathmax.m4 \ $(top_srcdir)/m4/pcre.m4 $(top_srcdir)/m4/perl.m4 \ - $(top_srcdir)/m4/pipe.m4 $(top_srcdir)/m4/pkg.m4 \ - $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/printf.m4 \ - $(top_srcdir)/m4/progtest.m4 \ + $(top_srcdir)/m4/perror.m4 $(top_srcdir)/m4/pipe.m4 \ + $(top_srcdir)/m4/pkg.m4 $(top_srcdir)/m4/po.m4 \ + $(top_srcdir)/m4/printf.m4 $(top_srcdir)/m4/progtest.m4 \ $(top_srcdir)/m4/pthread_rwlock_rdlock.m4 \ $(top_srcdir)/m4/putenv.m4 $(top_srcdir)/m4/quote.m4 \ - $(top_srcdir)/m4/quotearg.m4 $(top_srcdir)/m4/read.m4 \ - $(top_srcdir)/m4/readdir.m4 $(top_srcdir)/m4/realloc.m4 \ - $(top_srcdir)/m4/regex.m4 $(top_srcdir)/m4/safe-read.m4 \ - $(top_srcdir)/m4/save-cwd.m4 $(top_srcdir)/m4/setenv.m4 \ - $(top_srcdir)/m4/setlocale.m4 $(top_srcdir)/m4/size_max.m4 \ - $(top_srcdir)/m4/snprintf.m4 $(top_srcdir)/m4/ssize_t.m4 \ - $(top_srcdir)/m4/stat.m4 $(top_srcdir)/m4/std-gnu11.m4 \ - $(top_srcdir)/m4/stdalign.m4 $(top_srcdir)/m4/stdarg.m4 \ - $(top_srcdir)/m4/stdbool.m4 $(top_srcdir)/m4/stddef_h.m4 \ - $(top_srcdir)/m4/stdint.m4 $(top_srcdir)/m4/stdint_h.m4 \ - $(top_srcdir)/m4/stdio_h.m4 $(top_srcdir)/m4/stdlib_h.m4 \ - $(top_srcdir)/m4/stpcpy.m4 $(top_srcdir)/m4/strdup.m4 \ - $(top_srcdir)/m4/strerror.m4 $(top_srcdir)/m4/string_h.m4 \ + $(top_srcdir)/m4/quotearg.m4 $(top_srcdir)/m4/raise.m4 \ + $(top_srcdir)/m4/read.m4 $(top_srcdir)/m4/readdir.m4 \ + $(top_srcdir)/m4/realloc.m4 $(top_srcdir)/m4/regex.m4 \ + $(top_srcdir)/m4/safe-read.m4 $(top_srcdir)/m4/save-cwd.m4 \ + $(top_srcdir)/m4/select.m4 $(top_srcdir)/m4/setenv.m4 \ + $(top_srcdir)/m4/setlocale.m4 $(top_srcdir)/m4/sigaction.m4 \ + $(top_srcdir)/m4/signal_h.m4 \ + $(top_srcdir)/m4/signalblocking.m4 \ + $(top_srcdir)/m4/size_max.m4 $(top_srcdir)/m4/sleep.m4 \ + $(top_srcdir)/m4/snprintf.m4 $(top_srcdir)/m4/socketlib.m4 \ + $(top_srcdir)/m4/sockets.m4 $(top_srcdir)/m4/socklen.m4 \ + $(top_srcdir)/m4/sockpfaf.m4 $(top_srcdir)/m4/ssize_t.m4 \ + $(top_srcdir)/m4/stat-time.m4 $(top_srcdir)/m4/stat.m4 \ + $(top_srcdir)/m4/std-gnu11.m4 $(top_srcdir)/m4/stdalign.m4 \ + $(top_srcdir)/m4/stdarg.m4 $(top_srcdir)/m4/stdbool.m4 \ + $(top_srcdir)/m4/stddef_h.m4 $(top_srcdir)/m4/stdint.m4 \ + $(top_srcdir)/m4/stdint_h.m4 $(top_srcdir)/m4/stdio_h.m4 \ + $(top_srcdir)/m4/stdlib_h.m4 $(top_srcdir)/m4/stpcpy.m4 \ + $(top_srcdir)/m4/strdup.m4 $(top_srcdir)/m4/strerror.m4 \ + $(top_srcdir)/m4/strerror_r.m4 $(top_srcdir)/m4/string_h.m4 \ $(top_srcdir)/m4/strnlen.m4 $(top_srcdir)/m4/strstr.m4 \ $(top_srcdir)/m4/strtoimax.m4 $(top_srcdir)/m4/strtoll.m4 \ $(top_srcdir)/m4/strtoull.m4 $(top_srcdir)/m4/strtoumax.m4 \ - $(top_srcdir)/m4/symlink.m4 $(top_srcdir)/m4/sys_socket_h.m4 \ - $(top_srcdir)/m4/sys_stat_h.m4 $(top_srcdir)/m4/sys_types_h.m4 \ + $(top_srcdir)/m4/symlink.m4 $(top_srcdir)/m4/sys_ioctl_h.m4 \ + $(top_srcdir)/m4/sys_select_h.m4 \ + $(top_srcdir)/m4/sys_socket_h.m4 \ + $(top_srcdir)/m4/sys_stat_h.m4 $(top_srcdir)/m4/sys_time_h.m4 \ + $(top_srcdir)/m4/sys_types_h.m4 $(top_srcdir)/m4/sys_uio_h.m4 \ $(top_srcdir)/m4/threadlib.m4 $(top_srcdir)/m4/time_h.m4 \ $(top_srcdir)/m4/unistd-safer.m4 $(top_srcdir)/m4/unistd_h.m4 \ $(top_srcdir)/m4/unlocked-io.m4 $(top_srcdir)/m4/vasnprintf.m4 \ @@ -205,9 +223,11 @@ $(top_srcdir)/m4/wchar_h.m4 $(top_srcdir)/m4/wchar_t.m4 \ $(top_srcdir)/m4/wcrtomb.m4 $(top_srcdir)/m4/wctob.m4 \ $(top_srcdir)/m4/wctomb.m4 $(top_srcdir)/m4/wctype_h.m4 \ - $(top_srcdir)/m4/wcwidth.m4 $(top_srcdir)/m4/wint_t.m4 \ - $(top_srcdir)/m4/xalloc.m4 $(top_srcdir)/m4/xsize.m4 \ - $(top_srcdir)/m4/xstrtol.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/m4/wcwidth.m4 \ + $(top_srcdir)/m4/windows-stat-inodes.m4 \ + $(top_srcdir)/m4/wint_t.m4 $(top_srcdir)/m4/xalloc.m4 \ + $(top_srcdir)/m4/xsize.m4 $(top_srcdir)/m4/xstrtol.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \ @@ -226,7 +246,8 @@ am__DEPENDENCIES_2 = ../lib/libgreputils.a $(am__DEPENDENCIES_1) \ ../lib/libgreputils.a $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) -grep_DEPENDENCIES = $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_1) +grep_DEPENDENCIES = $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_1) \ + $(am__DEPENDENCIES_1) am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ @@ -274,7 +295,6 @@ ./$(DEPDIR)/kwsearch.Po ./$(DEPDIR)/kwset.Po \ ./$(DEPDIR)/pcresearch.Po ./$(DEPDIR)/searchutils.Po am__mv = mv -f -am__set_depbase = depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.[^.]*$$||'` COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) @@ -365,8 +385,11 @@ GLIBC21 = @GLIBC21@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ +GNULIB_ACCEPT = @GNULIB_ACCEPT@ +GNULIB_ACCEPT4 = @GNULIB_ACCEPT4@ GNULIB_ALPHASORT = @GNULIB_ALPHASORT@ GNULIB_ATOLL = @GNULIB_ATOLL@ +GNULIB_BIND = @GNULIB_BIND@ GNULIB_BTOWC = @GNULIB_BTOWC@ GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@ GNULIB_CANONICALIZE_FILE_NAME = @GNULIB_CANONICALIZE_FILE_NAME@ @@ -374,6 +397,7 @@ GNULIB_CHOWN = @GNULIB_CHOWN@ GNULIB_CLOSE = @GNULIB_CLOSE@ GNULIB_CLOSEDIR = @GNULIB_CLOSEDIR@ +GNULIB_CONNECT = @GNULIB_CONNECT@ GNULIB_CTIME = @GNULIB_CTIME@ GNULIB_DIRFD = @GNULIB_DIRFD@ GNULIB_DPRINTF = @GNULIB_DPRINTF@ @@ -383,6 +407,7 @@ GNULIB_DUPLOCALE = @GNULIB_DUPLOCALE@ GNULIB_ENVIRON = @GNULIB_ENVIRON@ GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@ +GNULIB_EXPLICIT_BZERO = @GNULIB_EXPLICIT_BZERO@ GNULIB_FACCESSAT = @GNULIB_FACCESSAT@ GNULIB_FCHDIR = @GNULIB_FCHDIR@ GNULIB_FCHMODAT = @GNULIB_FCHMODAT@ @@ -397,6 +422,7 @@ GNULIB_FFSLL = @GNULIB_FFSLL@ GNULIB_FGETC = @GNULIB_FGETC@ GNULIB_FGETS = @GNULIB_FGETS@ +GNULIB_FNMATCH = @GNULIB_FNMATCH@ GNULIB_FOPEN = @GNULIB_FOPEN@ GNULIB_FPRINTF = @GNULIB_FPRINTF@ GNULIB_FPRINTF_POSIX = @GNULIB_FPRINTF_POSIX@ @@ -429,6 +455,10 @@ GNULIB_GETLOGIN = @GNULIB_GETLOGIN@ GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@ GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@ +GNULIB_GETPASS = @GNULIB_GETPASS@ +GNULIB_GETPEERNAME = @GNULIB_GETPEERNAME@ +GNULIB_GETSOCKNAME = @GNULIB_GETSOCKNAME@ +GNULIB_GETSOCKOPT = @GNULIB_GETSOCKOPT@ GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@ GNULIB_GETTIMEOFDAY = @GNULIB_GETTIMEOFDAY@ GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@ @@ -438,6 +468,9 @@ GNULIB_ICONV = @GNULIB_ICONV@ GNULIB_IMAXABS = @GNULIB_IMAXABS@ GNULIB_IMAXDIV = @GNULIB_IMAXDIV@ +GNULIB_INET_NTOP = @GNULIB_INET_NTOP@ +GNULIB_INET_PTON = @GNULIB_INET_PTON@ +GNULIB_IOCTL = @GNULIB_IOCTL@ GNULIB_ISATTY = @GNULIB_ISATTY@ GNULIB_ISBLANK = @GNULIB_ISBLANK@ GNULIB_ISWBLANK = @GNULIB_ISWBLANK@ @@ -446,7 +479,9 @@ GNULIB_LCHOWN = @GNULIB_LCHOWN@ GNULIB_LINK = @GNULIB_LINK@ GNULIB_LINKAT = @GNULIB_LINKAT@ +GNULIB_LISTEN = @GNULIB_LISTEN@ GNULIB_LOCALECONV = @GNULIB_LOCALECONV@ +GNULIB_LOCALENAME = @GNULIB_LOCALENAME@ GNULIB_LOCALTIME = @GNULIB_LOCALTIME@ GNULIB_LSEEK = @GNULIB_LSEEK@ GNULIB_LSTAT = @GNULIB_LSTAT@ @@ -505,6 +540,8 @@ GNULIB_PREAD = @GNULIB_PREAD@ GNULIB_PRINTF = @GNULIB_PRINTF@ GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@ +GNULIB_PSELECT = @GNULIB_PSELECT@ +GNULIB_PTHREAD_SIGMASK = @GNULIB_PTHREAD_SIGMASK@ GNULIB_PTSNAME = @GNULIB_PTSNAME@ GNULIB_PTSNAME_R = @GNULIB_PTSNAME_R@ GNULIB_PUTC = @GNULIB_PUTC@ @@ -513,6 +550,7 @@ GNULIB_PUTS = @GNULIB_PUTS@ GNULIB_PWRITE = @GNULIB_PWRITE@ GNULIB_QSORT_R = @GNULIB_QSORT_R@ +GNULIB_RAISE = @GNULIB_RAISE@ GNULIB_RANDOM = @GNULIB_RANDOM@ GNULIB_RANDOM_R = @GNULIB_RANDOM_R@ GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@ @@ -520,8 +558,11 @@ GNULIB_READDIR = @GNULIB_READDIR@ GNULIB_READLINK = @GNULIB_READLINK@ GNULIB_READLINKAT = @GNULIB_READLINKAT@ +GNULIB_REALLOCARRAY = @GNULIB_REALLOCARRAY@ GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@ GNULIB_REALPATH = @GNULIB_REALPATH@ +GNULIB_RECV = @GNULIB_RECV@ +GNULIB_RECVFROM = @GNULIB_RECVFROM@ GNULIB_REMOVE = @GNULIB_REMOVE@ GNULIB_RENAME = @GNULIB_RENAME@ GNULIB_RENAMEAT = @GNULIB_RENAMEAT@ @@ -531,11 +572,20 @@ GNULIB_SCANDIR = @GNULIB_SCANDIR@ GNULIB_SCANF = @GNULIB_SCANF@ GNULIB_SECURE_GETENV = @GNULIB_SECURE_GETENV@ +GNULIB_SELECT = @GNULIB_SELECT@ +GNULIB_SEND = @GNULIB_SEND@ +GNULIB_SENDTO = @GNULIB_SENDTO@ GNULIB_SETENV = @GNULIB_SETENV@ GNULIB_SETHOSTNAME = @GNULIB_SETHOSTNAME@ GNULIB_SETLOCALE = @GNULIB_SETLOCALE@ +GNULIB_SETSOCKOPT = @GNULIB_SETSOCKOPT@ +GNULIB_SHUTDOWN = @GNULIB_SHUTDOWN@ +GNULIB_SIGACTION = @GNULIB_SIGACTION@ +GNULIB_SIGNAL_H_SIGPIPE = @GNULIB_SIGNAL_H_SIGPIPE@ +GNULIB_SIGPROCMASK = @GNULIB_SIGPROCMASK@ GNULIB_SLEEP = @GNULIB_SLEEP@ GNULIB_SNPRINTF = @GNULIB_SNPRINTF@ +GNULIB_SOCKET = @GNULIB_SOCKET@ GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@ GNULIB_STAT = @GNULIB_STAT@ GNULIB_STDIO_H_NONBLOCKING = @GNULIB_STDIO_H_NONBLOCKING@ @@ -633,7 +683,9 @@ GNULIB_WRITE = @GNULIB_WRITE@ GNULIB__EXIT = @GNULIB__EXIT@ GREP = @GREP@ +HAVE_ACCEPT4 = @HAVE_ACCEPT4@ HAVE_ALPHASORT = @HAVE_ALPHASORT@ +HAVE_ARPA_INET_H = @HAVE_ARPA_INET_H@ HAVE_ATOLL = @HAVE_ATOLL@ HAVE_BTOWC = @HAVE_BTOWC@ HAVE_C99_STDINT_H = @HAVE_C99_STDINT_H@ @@ -659,12 +711,16 @@ HAVE_DECL_GETUSERSHELL = @HAVE_DECL_GETUSERSHELL@ HAVE_DECL_IMAXABS = @HAVE_DECL_IMAXABS@ HAVE_DECL_IMAXDIV = @HAVE_DECL_IMAXDIV@ +HAVE_DECL_INET_NTOP = @HAVE_DECL_INET_NTOP@ +HAVE_DECL_INET_PTON = @HAVE_DECL_INET_PTON@ +HAVE_DECL_INITSTATE = @HAVE_DECL_INITSTATE@ HAVE_DECL_LOCALTIME_R = @HAVE_DECL_LOCALTIME_R@ HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@ HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@ HAVE_DECL_OBSTACK_PRINTF = @HAVE_DECL_OBSTACK_PRINTF@ HAVE_DECL_SETENV = @HAVE_DECL_SETENV@ HAVE_DECL_SETHOSTNAME = @HAVE_DECL_SETHOSTNAME@ +HAVE_DECL_SETSTATE = @HAVE_DECL_SETSTATE@ HAVE_DECL_SNPRINTF = @HAVE_DECL_SNPRINTF@ HAVE_DECL_STRDUP = @HAVE_DECL_STRDUP@ HAVE_DECL_STRERROR_R = @HAVE_DECL_STRERROR_R@ @@ -674,6 +730,7 @@ HAVE_DECL_STRTOIMAX = @HAVE_DECL_STRTOIMAX@ HAVE_DECL_STRTOK_R = @HAVE_DECL_STRTOK_R@ HAVE_DECL_STRTOUMAX = @HAVE_DECL_STRTOUMAX@ +HAVE_DECL_TRUNCATE = @HAVE_DECL_TRUNCATE@ HAVE_DECL_TTYNAME_R = @HAVE_DECL_TTYNAME_R@ HAVE_DECL_UNSETENV = @HAVE_DECL_UNSETENV@ HAVE_DECL_VSNPRINTF = @HAVE_DECL_VSNPRINTF@ @@ -685,6 +742,7 @@ HAVE_DUP3 = @HAVE_DUP3@ HAVE_DUPLOCALE = @HAVE_DUPLOCALE@ HAVE_EUIDACCESS = @HAVE_EUIDACCESS@ +HAVE_EXPLICIT_BZERO = @HAVE_EXPLICIT_BZERO@ HAVE_FACCESSAT = @HAVE_FACCESSAT@ HAVE_FCHDIR = @HAVE_FCHDIR@ HAVE_FCHMODAT = @HAVE_FCHMODAT@ @@ -695,6 +753,9 @@ HAVE_FEATURES_H = @HAVE_FEATURES_H@ HAVE_FFSL = @HAVE_FFSL@ HAVE_FFSLL = @HAVE_FFSLL@ +HAVE_FNMATCH = @HAVE_FNMATCH@ +HAVE_FNMATCH_H = @HAVE_FNMATCH_H@ +HAVE_FREELOCALE = @HAVE_FREELOCALE@ HAVE_FSEEKO = @HAVE_FSEEKO@ HAVE_FSTATAT = @HAVE_FSTATAT@ HAVE_FSYNC = @HAVE_FSYNC@ @@ -707,13 +768,17 @@ HAVE_GETLOGIN = @HAVE_GETLOGIN@ HAVE_GETOPT_H = @HAVE_GETOPT_H@ HAVE_GETPAGESIZE = @HAVE_GETPAGESIZE@ +HAVE_GETPASS = @HAVE_GETPASS@ HAVE_GETSUBOPT = @HAVE_GETSUBOPT@ +HAVE_GETTIMEOFDAY = @HAVE_GETTIMEOFDAY@ HAVE_GRANTPT = @HAVE_GRANTPT@ HAVE_GROUP_MEMBER = @HAVE_GROUP_MEMBER@ +HAVE_IMAXDIV_T = @HAVE_IMAXDIV_T@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_ISBLANK = @HAVE_ISBLANK@ HAVE_ISWBLANK = @HAVE_ISWBLANK@ HAVE_ISWCNTRL = @HAVE_ISWCNTRL@ +HAVE_LANGINFO_ALTMON = @HAVE_LANGINFO_ALTMON@ HAVE_LANGINFO_CODESET = @HAVE_LANGINFO_CODESET@ HAVE_LANGINFO_ERA = @HAVE_LANGINFO_ERA@ HAVE_LANGINFO_H = @HAVE_LANGINFO_H@ @@ -721,6 +786,7 @@ HAVE_LANGINFO_YESEXPR = @HAVE_LANGINFO_YESEXPR@ HAVE_LCHMOD = @HAVE_LCHMOD@ HAVE_LCHOWN = @HAVE_LCHOWN@ +HAVE_LIBSIGSEGV = @HAVE_LIBSIGSEGV@ HAVE_LINK = @HAVE_LINK@ HAVE_LINKAT = @HAVE_LINKAT@ HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@ @@ -746,6 +812,8 @@ HAVE_MKSTEMPS = @HAVE_MKSTEMPS@ HAVE_MSVC_INVALID_PARAMETER_HANDLER = @HAVE_MSVC_INVALID_PARAMETER_HANDLER@ HAVE_NANOSLEEP = @HAVE_NANOSLEEP@ +HAVE_NETINET_IN_H = @HAVE_NETINET_IN_H@ +HAVE_NEWLOCALE = @HAVE_NEWLOCALE@ HAVE_NL_LANGINFO = @HAVE_NL_LANGINFO@ HAVE_OPENAT = @HAVE_OPENAT@ HAVE_OPENDIR = @HAVE_OPENDIR@ @@ -755,11 +823,15 @@ HAVE_PIPE2 = @HAVE_PIPE2@ HAVE_POPEN = @HAVE_POPEN@ HAVE_POSIX_OPENPT = @HAVE_POSIX_OPENPT@ +HAVE_POSIX_SIGNALBLOCKING = @HAVE_POSIX_SIGNALBLOCKING@ HAVE_PREAD = @HAVE_PREAD@ +HAVE_PSELECT = @HAVE_PSELECT@ +HAVE_PTHREAD_SIGMASK = @HAVE_PTHREAD_SIGMASK@ HAVE_PTSNAME = @HAVE_PTSNAME@ HAVE_PTSNAME_R = @HAVE_PTSNAME_R@ HAVE_PWRITE = @HAVE_PWRITE@ HAVE_QSORT_R = @HAVE_QSORT_R@ +HAVE_RAISE = @HAVE_RAISE@ HAVE_RANDOM = @HAVE_RANDOM@ HAVE_RANDOM_H = @HAVE_RANDOM_H@ HAVE_RANDOM_R = @HAVE_RANDOM_R@ @@ -767,17 +839,23 @@ HAVE_READDIR = @HAVE_READDIR@ HAVE_READLINK = @HAVE_READLINK@ HAVE_READLINKAT = @HAVE_READLINKAT@ +HAVE_REALLOCARRAY = @HAVE_REALLOCARRAY@ HAVE_REALPATH = @HAVE_REALPATH@ HAVE_RENAMEAT = @HAVE_RENAMEAT@ HAVE_REWINDDIR = @HAVE_REWINDDIR@ HAVE_RPMATCH = @HAVE_RPMATCH@ +HAVE_SA_FAMILY_T = @HAVE_SA_FAMILY_T@ HAVE_SCANDIR = @HAVE_SCANDIR@ HAVE_SECURE_GETENV = @HAVE_SECURE_GETENV@ HAVE_SETENV = @HAVE_SETENV@ HAVE_SETHOSTNAME = @HAVE_SETHOSTNAME@ +HAVE_SIGACTION = @HAVE_SIGACTION@ +HAVE_SIGHANDLER_T = @HAVE_SIGHANDLER_T@ +HAVE_SIGINFO_T = @HAVE_SIGINFO_T@ HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@ HAVE_SIGNED_WCHAR_T = @HAVE_SIGNED_WCHAR_T@ HAVE_SIGNED_WINT_T = @HAVE_SIGNED_WINT_T@ +HAVE_SIGSET_T = @HAVE_SIGSET_T@ HAVE_SLEEP = @HAVE_SLEEP@ HAVE_STDINT_H = @HAVE_STDINT_H@ HAVE_STPCPY = @HAVE_STPCPY@ @@ -791,18 +869,27 @@ HAVE_STRTOLL = @HAVE_STRTOLL@ HAVE_STRTOULL = @HAVE_STRTOULL@ HAVE_STRUCT_RANDOM_DATA = @HAVE_STRUCT_RANDOM_DATA@ +HAVE_STRUCT_SIGACTION_SA_SIGACTION = @HAVE_STRUCT_SIGACTION_SA_SIGACTION@ +HAVE_STRUCT_SOCKADDR_STORAGE = @HAVE_STRUCT_SOCKADDR_STORAGE@ +HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY = @HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY@ +HAVE_STRUCT_TIMEVAL = @HAVE_STRUCT_TIMEVAL@ HAVE_STRVERSCMP = @HAVE_STRVERSCMP@ HAVE_SYMLINK = @HAVE_SYMLINK@ HAVE_SYMLINKAT = @HAVE_SYMLINKAT@ HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@ HAVE_SYS_CDEFS_H = @HAVE_SYS_CDEFS_H@ HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@ +HAVE_SYS_IOCTL_H = @HAVE_SYS_IOCTL_H@ HAVE_SYS_LOADAVG_H = @HAVE_SYS_LOADAVG_H@ HAVE_SYS_PARAM_H = @HAVE_SYS_PARAM_H@ +HAVE_SYS_SELECT_H = @HAVE_SYS_SELECT_H@ +HAVE_SYS_SOCKET_H = @HAVE_SYS_SOCKET_H@ +HAVE_SYS_TIME_H = @HAVE_SYS_TIME_H@ HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ +HAVE_SYS_UIO_H = @HAVE_SYS_UIO_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@ @@ -851,6 +938,7 @@ HAVE_WMEMCPY = @HAVE_WMEMCPY@ HAVE_WMEMMOVE = @HAVE_WMEMMOVE@ HAVE_WMEMSET = @HAVE_WMEMSET@ +HAVE_WS2TCPIP_H = @HAVE_WS2TCPIP_H@ HAVE_XLOCALE_H = @HAVE_XLOCALE_H@ HAVE__BOOL = @HAVE__BOOL@ HAVE__EXIT = @HAVE__EXIT@ @@ -858,6 +946,7 @@ ICONV_H = @ICONV_H@ INCLUDE_NEXT = @INCLUDE_NEXT@ INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@ +INET_PTON_LIB = @INET_PTON_LIB@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -868,6 +957,7 @@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ LDFLAGS = @LDFLAGS@ +LIBCSTACK = @LIBCSTACK@ LIBGREPUTILS_LIBDEPS = @LIBGREPUTILS_LIBDEPS@ LIBGREPUTILS_LTLIBDEPS = @LIBGREPUTILS_LTLIBDEPS@ LIBICONV = @LIBICONV@ @@ -877,11 +967,16 @@ LIBPTH = @LIBPTH@ LIBPTH_PREFIX = @LIBPTH_PREFIX@ LIBS = @LIBS@ +LIBSIGSEGV = @LIBSIGSEGV@ +LIBSIGSEGV_PREFIX = @LIBSIGSEGV_PREFIX@ +LIBSOCKET = @LIBSOCKET@ LIBTESTS_LIBDEPS = @LIBTESTS_LIBDEPS@ LIBTHREAD = @LIBTHREAD@ LIBUNISTRING_UNISTR_H = @LIBUNISTRING_UNISTR_H@ LIBUNISTRING_UNITYPES_H = @LIBUNISTRING_UNITYPES_H@ LIBUNISTRING_UNIWIDTH_H = @LIBUNISTRING_UNIWIDTH_H@ +LIB_NANOSLEEP = @LIB_NANOSLEEP@ +LIB_SELECT = @LIB_SELECT@ LIMITS_H = @LIMITS_H@ LOCALCHARSET_TESTS_ENVIRONMENT = @LOCALCHARSET_TESTS_ENVIRONMENT@ LOCALE_FR = @LOCALE_FR@ @@ -889,36 +984,49 @@ LOCALE_JA = @LOCALE_JA@ LOCALE_TR_UTF8 = @LOCALE_TR_UTF8@ LOCALE_ZH_CN = @LOCALE_ZH_CN@ +LTLIBCSTACK = @LTLIBCSTACK@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBMULTITHREAD = @LTLIBMULTITHREAD@ LTLIBOBJS = @LTLIBOBJS@ LTLIBPTH = @LTLIBPTH@ +LTLIBSIGSEGV = @LTLIBSIGSEGV@ LTLIBTHREAD = @LTLIBTHREAD@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ +NETINET_IN_H = @NETINET_IN_H@ +NEXT_ARPA_INET_H = @NEXT_ARPA_INET_H@ +NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H = @NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H@ NEXT_AS_FIRST_DIRECTIVE_CTYPE_H = @NEXT_AS_FIRST_DIRECTIVE_CTYPE_H@ NEXT_AS_FIRST_DIRECTIVE_DIRENT_H = @NEXT_AS_FIRST_DIRECTIVE_DIRENT_H@ NEXT_AS_FIRST_DIRECTIVE_ERRNO_H = @NEXT_AS_FIRST_DIRECTIVE_ERRNO_H@ NEXT_AS_FIRST_DIRECTIVE_FCNTL_H = @NEXT_AS_FIRST_DIRECTIVE_FCNTL_H@ NEXT_AS_FIRST_DIRECTIVE_FLOAT_H = @NEXT_AS_FIRST_DIRECTIVE_FLOAT_H@ +NEXT_AS_FIRST_DIRECTIVE_FNMATCH_H = @NEXT_AS_FIRST_DIRECTIVE_FNMATCH_H@ NEXT_AS_FIRST_DIRECTIVE_GETOPT_H = @NEXT_AS_FIRST_DIRECTIVE_GETOPT_H@ NEXT_AS_FIRST_DIRECTIVE_ICONV_H = @NEXT_AS_FIRST_DIRECTIVE_ICONV_H@ NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H = @NEXT_AS_FIRST_DIRECTIVE_INTTYPES_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_NETINET_IN_H = @NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H@ +NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H = @NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H@ NEXT_AS_FIRST_DIRECTIVE_STDARG_H = @NEXT_AS_FIRST_DIRECTIVE_STDARG_H@ NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@ NEXT_AS_FIRST_DIRECTIVE_STDINT_H = @NEXT_AS_FIRST_DIRECTIVE_STDINT_H@ NEXT_AS_FIRST_DIRECTIVE_STDIO_H = @NEXT_AS_FIRST_DIRECTIVE_STDIO_H@ NEXT_AS_FIRST_DIRECTIVE_STDLIB_H = @NEXT_AS_FIRST_DIRECTIVE_STDLIB_H@ NEXT_AS_FIRST_DIRECTIVE_STRING_H = @NEXT_AS_FIRST_DIRECTIVE_STRING_H@ +NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H@ +NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H@ +NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H@ +NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H@ +NEXT_AS_FIRST_DIRECTIVE_SYS_UIO_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_UIO_H@ NEXT_AS_FIRST_DIRECTIVE_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_TIME_H@ NEXT_AS_FIRST_DIRECTIVE_UNISTD_H = @NEXT_AS_FIRST_DIRECTIVE_UNISTD_H@ NEXT_AS_FIRST_DIRECTIVE_WCHAR_H = @NEXT_AS_FIRST_DIRECTIVE_WCHAR_H@ @@ -928,20 +1036,28 @@ NEXT_ERRNO_H = @NEXT_ERRNO_H@ NEXT_FCNTL_H = @NEXT_FCNTL_H@ NEXT_FLOAT_H = @NEXT_FLOAT_H@ +NEXT_FNMATCH_H = @NEXT_FNMATCH_H@ NEXT_GETOPT_H = @NEXT_GETOPT_H@ NEXT_ICONV_H = @NEXT_ICONV_H@ NEXT_INTTYPES_H = @NEXT_INTTYPES_H@ NEXT_LANGINFO_H = @NEXT_LANGINFO_H@ NEXT_LIMITS_H = @NEXT_LIMITS_H@ NEXT_LOCALE_H = @NEXT_LOCALE_H@ +NEXT_NETINET_IN_H = @NEXT_NETINET_IN_H@ +NEXT_SIGNAL_H = @NEXT_SIGNAL_H@ NEXT_STDARG_H = @NEXT_STDARG_H@ NEXT_STDDEF_H = @NEXT_STDDEF_H@ NEXT_STDINT_H = @NEXT_STDINT_H@ NEXT_STDIO_H = @NEXT_STDIO_H@ NEXT_STDLIB_H = @NEXT_STDLIB_H@ NEXT_STRING_H = @NEXT_STRING_H@ +NEXT_SYS_IOCTL_H = @NEXT_SYS_IOCTL_H@ +NEXT_SYS_SELECT_H = @NEXT_SYS_SELECT_H@ +NEXT_SYS_SOCKET_H = @NEXT_SYS_SOCKET_H@ NEXT_SYS_STAT_H = @NEXT_SYS_STAT_H@ +NEXT_SYS_TIME_H = @NEXT_SYS_TIME_H@ NEXT_SYS_TYPES_H = @NEXT_SYS_TYPES_H@ +NEXT_SYS_UIO_H = @NEXT_SYS_UIO_H@ NEXT_TIME_H = @NEXT_TIME_H@ NEXT_UNISTD_H = @NEXT_UNISTD_H@ NEXT_WCHAR_H = @NEXT_WCHAR_H@ @@ -981,15 +1097,18 @@ REPLACE_DUP = @REPLACE_DUP@ REPLACE_DUP2 = @REPLACE_DUP2@ REPLACE_DUPLOCALE = @REPLACE_DUPLOCALE@ +REPLACE_FACCESSAT = @REPLACE_FACCESSAT@ REPLACE_FCHOWNAT = @REPLACE_FCHOWNAT@ REPLACE_FCLOSE = @REPLACE_FCLOSE@ REPLACE_FCNTL = @REPLACE_FCNTL@ REPLACE_FDOPEN = @REPLACE_FDOPEN@ REPLACE_FDOPENDIR = @REPLACE_FDOPENDIR@ REPLACE_FFLUSH = @REPLACE_FFLUSH@ +REPLACE_FNMATCH = @REPLACE_FNMATCH@ REPLACE_FOPEN = @REPLACE_FOPEN@ REPLACE_FPRINTF = @REPLACE_FPRINTF@ REPLACE_FPURGE = @REPLACE_FPURGE@ +REPLACE_FREELOCALE = @REPLACE_FREELOCALE@ REPLACE_FREOPEN = @REPLACE_FREOPEN@ REPLACE_FSEEK = @REPLACE_FSEEK@ REPLACE_FSEEKO = @REPLACE_FSEEKO@ @@ -1007,10 +1126,15 @@ REPLACE_GETLINE = @REPLACE_GETLINE@ REPLACE_GETLOGIN_R = @REPLACE_GETLOGIN_R@ REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@ +REPLACE_GETPASS = @REPLACE_GETPASS@ +REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@ REPLACE_GMTIME = @REPLACE_GMTIME@ REPLACE_ICONV = @REPLACE_ICONV@ REPLACE_ICONV_OPEN = @REPLACE_ICONV_OPEN@ REPLACE_ICONV_UTF = @REPLACE_ICONV_UTF@ +REPLACE_INET_NTOP = @REPLACE_INET_NTOP@ +REPLACE_INET_PTON = @REPLACE_INET_PTON@ +REPLACE_IOCTL = @REPLACE_IOCTL@ REPLACE_ISATTY = @REPLACE_ISATTY@ REPLACE_ISWBLANK = @REPLACE_ISWBLANK@ REPLACE_ISWCNTRL = @REPLACE_ISWCNTRL@ @@ -1039,6 +1163,7 @@ REPLACE_MKSTEMP = @REPLACE_MKSTEMP@ REPLACE_MKTIME = @REPLACE_MKTIME@ REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@ +REPLACE_NEWLOCALE = @REPLACE_NEWLOCALE@ REPLACE_NL_LANGINFO = @REPLACE_NL_LANGINFO@ REPLACE_NULL = @REPLACE_NULL@ REPLACE_OBSTACK_PRINTF = @REPLACE_OBSTACK_PRINTF@ @@ -1049,11 +1174,14 @@ REPLACE_POPEN = @REPLACE_POPEN@ REPLACE_PREAD = @REPLACE_PREAD@ REPLACE_PRINTF = @REPLACE_PRINTF@ +REPLACE_PSELECT = @REPLACE_PSELECT@ +REPLACE_PTHREAD_SIGMASK = @REPLACE_PTHREAD_SIGMASK@ REPLACE_PTSNAME = @REPLACE_PTSNAME@ REPLACE_PTSNAME_R = @REPLACE_PTSNAME_R@ REPLACE_PUTENV = @REPLACE_PUTENV@ REPLACE_PWRITE = @REPLACE_PWRITE@ REPLACE_QSORT_R = @REPLACE_QSORT_R@ +REPLACE_RAISE = @REPLACE_RAISE@ REPLACE_RANDOM_R = @REPLACE_RANDOM_R@ REPLACE_READ = @REPLACE_READ@ REPLACE_READLINK = @REPLACE_READLINK@ @@ -1064,6 +1192,7 @@ REPLACE_RENAME = @REPLACE_RENAME@ REPLACE_RENAMEAT = @REPLACE_RENAMEAT@ REPLACE_RMDIR = @REPLACE_RMDIR@ +REPLACE_SELECT = @REPLACE_SELECT@ REPLACE_SETENV = @REPLACE_SETENV@ REPLACE_SETLOCALE = @REPLACE_SETLOCALE@ REPLACE_SLEEP = @REPLACE_SLEEP@ @@ -1089,6 +1218,7 @@ REPLACE_STRTOK_R = @REPLACE_STRTOK_R@ REPLACE_STRTOUMAX = @REPLACE_STRTOUMAX@ REPLACE_STRUCT_LCONV = @REPLACE_STRUCT_LCONV@ +REPLACE_STRUCT_TIMEVAL = @REPLACE_STRUCT_TIMEVAL@ REPLACE_SYMLINK = @REPLACE_SYMLINK@ REPLACE_SYMLINKAT = @REPLACE_SYMLINKAT@ REPLACE_TIMEGM = @REPLACE_TIMEGM@ @@ -1128,6 +1258,8 @@ STDDEF_H = @STDDEF_H@ STDINT_H = @STDINT_H@ STRIP = @STRIP@ +SYS_IOCTL_H_HAVE_WINSOCK2_H = @SYS_IOCTL_H_HAVE_WINSOCK2_H@ +SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@ SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@ TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@ UINT32_MAX_LT_UINTMAX_MAX = @UINT32_MAX_LT_UINTMAX_MAX@ @@ -1156,6 +1288,7 @@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ +am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ @@ -1232,7 +1365,7 @@ ../lib/libgreputils.a $(LIBINTL) ../lib/libgreputils.a $(LIBICONV) \ $(LIBTHREAD) -grep_LDADD = $(LDADD) $(PCRE_LIBS) +grep_LDADD = $(LDADD) $(PCRE_LIBS) $(LIBCSTACK) AM_CPPFLAGS = -I$(top_builddir)/lib -I$(top_srcdir)/lib EXTRA_DIST = egrep.sh CLEANFILES = egrep fgrep *-t @@ -1371,22 +1504,20 @@ am--depfiles: $(am__depfiles_remade) .c.o: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(am__set_depbase) && \ -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $<; \ -@am__fastdepCC_TRUE@ if test $$? = 0; then $(am__mv) $$depbase.Tpo $$depbase.Po; \ -@am__fastdepCC_TRUE@ else rm -f $$depbase.Tpo; false; fi +@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ +@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(am__set_depbase) && \ -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $$($(CYGPATH_W) $<); \ -@am__fastdepCC_TRUE@ if test $$? = 0; then $(am__mv) $$depbase.Tpo $$depbase.Po; \ -@am__fastdepCC_TRUE@ else rm -f $$depbase.Tpo; false; fi +@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ +@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $$($(CYGPATH_W) $<) +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique @@ -1440,7 +1571,10 @@ distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -distdir: $(DISTFILES) +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ diff -Nru grep-3.1/src/pcresearch.c grep-3.3/src/pcresearch.c --- grep-3.1/src/pcresearch.c 2017-02-07 23:13:51.000000000 +0000 +++ grep-3.3/src/pcresearch.c 2018-01-07 00:09:11.000000000 +0000 @@ -1,5 +1,5 @@ /* pcresearch.c - searching subroutines using PCRE for grep. - Copyright 2000, 2007, 2009-2017 Free Software Foundation, Inc. + Copyright 2000, 2007, 2009-2018 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,9 +29,15 @@ in pcre_exec. */ enum { NSUB = 300 }; +# ifndef PCRE_EXTRA_MATCH_LIMIT_RECURSION +# define PCRE_EXTRA_MATCH_LIMIT_RECURSION 0 +# endif # ifndef PCRE_STUDY_JIT_COMPILE # define PCRE_STUDY_JIT_COMPILE 0 # endif +# ifndef PCRE_STUDY_EXTRA_NEEDED +# define PCRE_STUDY_EXTRA_NEEDED 0 +# endif struct pcre_comp { @@ -83,6 +89,21 @@ } # endif +# if PCRE_EXTRA_MATCH_LIMIT_RECURSION + if (e == PCRE_ERROR_RECURSIONLIMIT + && (PCRE_STUDY_EXTRA_NEEDED || pc->extra) + && pc->extra->match_limit_recursion <= ULONG_MAX / 2) + { + pc->extra->match_limit_recursion *= 2; + if (pc->extra->match_limit_recursion == 0) + { + pc->extra->match_limit_recursion = (1 << 24) - 1; + pc->extra->flags |= PCRE_EXTRA_MATCH_LIMIT_RECURSION; + } + continue; + } +# endif + return e; } } @@ -158,7 +179,8 @@ if (!pc->cre) die (EXIT_TROUBLE, 0, "%s", ep); - pc->extra = pcre_study (pc->cre, PCRE_STUDY_JIT_COMPILE, &ep); + int pcre_study_flags = PCRE_STUDY_EXTRA_NEEDED | PCRE_STUDY_JIT_COMPILE; + pc->extra = pcre_study (pc->cre, pcre_study_flags, &ep); if (ep) die (EXIT_TROUBLE, 0, "%s", ep); diff -Nru grep-3.1/src/search.h grep-3.3/src/search.h --- grep-3.1/src/search.h 2017-01-17 17:04:17.000000000 +0000 +++ grep-3.3/src/search.h 2018-01-07 00:09:11.000000000 +0000 @@ -1,5 +1,5 @@ /* search.c - searching subroutines using dfa, kwset and regex for grep. - Copyright 1992, 1998, 2000, 2007, 2009-2017 Free Software Foundation, Inc. + Copyright 1992, 1998, 2000, 2007, 2009-2018 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 -Nru grep-3.1/src/searchutils.c grep-3.3/src/searchutils.c --- grep-3.1/src/searchutils.c 2017-01-19 00:37:48.000000000 +0000 +++ grep-3.3/src/searchutils.c 2018-01-07 00:09:11.000000000 +0000 @@ -1,5 +1,5 @@ /* searchutils.c - helper subroutines for grep's matchers. - Copyright 1992, 1998, 2000, 2007, 2009-2017 Free Software Foundation, Inc. + Copyright 1992, 1998, 2000, 2007, 2009-2018 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 -Nru grep-3.1/src/system.h grep-3.3/src/system.h --- grep-3.1/src/system.h 2017-05-21 19:07:57.000000000 +0000 +++ grep-3.3/src/system.h 2018-01-07 00:09:11.000000000 +0000 @@ -1,5 +1,5 @@ /* Portability cruft. Include after config.h and sys/types.h. - Copyright 1996, 1998-2000, 2007, 2009-2017 Free Software Foundation, Inc. + Copyright 1996, 1998-2000, 2007, 2009-2018 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 -Nru grep-3.1/.tarball-version grep-3.3/.tarball-version --- grep-3.1/.tarball-version 2017-07-02 20:22:01.000000000 +0000 +++ grep-3.3/.tarball-version 2018-12-21 04:39:55.000000000 +0000 @@ -1 +1 @@ -3.1 +3.3 diff -Nru grep-3.1/tests/backref grep-3.3/tests/backref --- grep-3.1/tests/backref 2017-01-01 11:34:33.000000000 +0000 +++ grep-3.3/tests/backref 2018-01-07 00:09:11.000000000 +0000 @@ -1,7 +1,7 @@ #! /bin/sh # Test for backreferences and other things. # -# Copyright (C) 2001, 2006, 2009-2017 Free Software Foundation, Inc. +# Copyright (C) 2001, 2006, 2009-2018 Free Software Foundation, Inc. # # Copying and distribution of this file, with or without modification, # are permitted in any medium without royalty provided the copyright diff -Nru grep-3.1/tests/backref-alt grep-3.3/tests/backref-alt --- grep-3.1/tests/backref-alt 2017-01-01 11:34:33.000000000 +0000 +++ grep-3.3/tests/backref-alt 2018-12-21 02:50:49.000000000 +0000 @@ -1,7 +1,7 @@ #! /bin/sh # Test for a bug in glibc's regex code as of 2015-09-19. # -# Copyright 2015-2017 Free Software Foundation, Inc. +# Copyright 2015-2018 Free Software Foundation, Inc. # # Copying and distribution of this file, with or without modification, # are permitted in any medium without royalty provided the copyright @@ -24,4 +24,11 @@ status=$? test $status -eq 2 || test $status -eq 1 || fail=1 +# This test is a reduced version of the one in Bug#27838. +# It triggers this glibc assertion failure: +# grep: regexec.c:1342: pop_fail_stack: Assertion `num >= 0' failed. +LC_ALL=C grep -E '(()x)|\2' in > out +status=$? +test $status -eq 2 || test $status -eq 1 || fail=1 + Exit $fail diff -Nru grep-3.1/tests/backslash-s-and-repetition-operators grep-3.3/tests/backslash-s-and-repetition-operators --- grep-3.1/tests/backslash-s-and-repetition-operators 2017-01-01 11:34:33.000000000 +0000 +++ grep-3.3/tests/backslash-s-and-repetition-operators 2018-01-07 00:09:11.000000000 +0000 @@ -1,7 +1,7 @@ #! /bin/sh # Ensure that \s and \S work with repetition operators. # -# Copyright (C) 2013-2017 Free Software Foundation, Inc. +# Copyright (C) 2013-2018 Free Software Foundation, Inc. # # Copying and distribution of this file, with or without modification, # are permitted in any medium without royalty provided the copyright diff -Nru grep-3.1/tests/backslash-s-vs-invalid-multitype grep-3.3/tests/backslash-s-vs-invalid-multitype --- grep-3.1/tests/backslash-s-vs-invalid-multitype 2017-01-01 11:34:33.000000000 +0000 +++ grep-3.3/tests/backslash-s-vs-invalid-multitype 2018-01-07 00:09:11.000000000 +0000 @@ -1,7 +1,7 @@ #! /bin/sh # Ensure that neither \s nor \S matches an invalid multibyte character. # -# Copyright (C) 2013-2017 Free Software Foundation, Inc. +# Copyright (C) 2013-2018 Free Software Foundation, Inc. # # Copying and distribution of this file, with or without modification, # are permitted in any medium without royalty provided the copyright diff -Nru grep-3.1/tests/bre grep-3.3/tests/bre --- grep-3.1/tests/bre 2017-01-01 11:34:33.000000000 +0000 +++ grep-3.3/tests/bre 2018-01-07 00:09:11.000000000 +0000 @@ -1,7 +1,7 @@ #! /bin/sh # Regression test for GNU grep. # -# Copyright (C) 2001, 2006, 2009-2017 Free Software Foundation, Inc. +# Copyright (C) 2001, 2006, 2009-2018 Free Software Foundation, Inc. # # Copying and distribution of this file, with or without modification, # are permitted in any medium without royalty provided the copyright diff -Nru grep-3.1/tests/bre.awk grep-3.3/tests/bre.awk --- grep-3.1/tests/bre.awk 2017-01-01 11:34:33.000000000 +0000 +++ grep-3.3/tests/bre.awk 2018-01-07 00:09:11.000000000 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2001, 2006, 2009-2017 Free Software Foundation, Inc. +# Copyright (C) 2001, 2006, 2009-2018 Free Software Foundation, Inc. # # Copying and distribution of this file, with or without modification, # are permitted in any medium without royalty provided the copyright diff -Nru grep-3.1/tests/case-fold-titlecase grep-3.3/tests/case-fold-titlecase --- grep-3.1/tests/case-fold-titlecase 2017-01-01 11:34:33.000000000 +0000 +++ grep-3.3/tests/case-fold-titlecase 2018-04-21 23:35:48.000000000 +0000 @@ -1,7 +1,7 @@ #!/bin/sh # Check that case folding works even with titlecase and similarly odd chars. -# Copyright 2014-2017 Free Software Foundation, Inc. +# Copyright 2014-2018 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 @@ # 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 . +# along with this program. If not, see . . "${srcdir=.}/init.sh"; path_prepend_ ../src diff -Nru grep-3.1/tests/c-locale grep-3.3/tests/c-locale --- grep-3.1/tests/c-locale 2017-01-01 11:34:33.000000000 +0000 +++ grep-3.3/tests/c-locale 2018-01-07 00:09:11.000000000 +0000 @@ -1,7 +1,7 @@ #! /bin/sh # Regression test for GNU grep. # -# Copyright 2016-2017 Free Software Foundation, Inc. +# Copyright 2016-2018 Free Software Foundation, Inc. # # Copying and distribution of this file, with or without modification, # are permitted in any medium without royalty provided the copyright diff -Nru grep-3.1/tests/Coreutils.pm grep-3.3/tests/Coreutils.pm --- grep-3.1/tests/Coreutils.pm 2017-01-01 11:34:33.000000000 +0000 +++ grep-3.3/tests/Coreutils.pm 2018-04-21 23:35:48.000000000 +0000 @@ -1,7 +1,7 @@ package Coreutils; # This is a testing framework. -# Copyright (C) 1998-2015, 2017 Free Software Foundation, Inc. +# Copyright (C) 1998-2015, 2017-2018 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 @@ # 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 . +# along with this program. If not, see . use strict; use vars qw($VERSION @ISA @EXPORT); diff -Nru grep-3.1/tests/count-newline grep-3.3/tests/count-newline --- grep-3.1/tests/count-newline 2017-01-01 11:34:33.000000000 +0000 +++ grep-3.3/tests/count-newline 2018-04-21 23:35:48.000000000 +0000 @@ -2,7 +2,7 @@ # Test that newline is counted correctly even when the transition # table is rebuilt. -# Copyright 2014-2017 Free Software Foundation, Inc. +# Copyright 2014-2018 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,7 +15,7 @@ # 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 . +# along with this program. If not, see . . "${srcdir=.}/init.sh"; path_prepend_ ../src diff -Nru grep-3.1/tests/CuSkip.pm grep-3.3/tests/CuSkip.pm --- grep-3.1/tests/CuSkip.pm 2017-01-01 11:34:33.000000000 +0000 +++ grep-3.3/tests/CuSkip.pm 2018-04-21 23:35:48.000000000 +0000 @@ -1,7 +1,7 @@ package CuSkip; # Skip a test: emit diag to log and to stderr, and exit 77 -# Copyright (C) 2011-2015, 2017 Free Software Foundation, Inc. +# Copyright (C) 2011-2015, 2017-2018 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 @@ # 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 . +# along with this program. If not, see . use strict; use warnings; diff -Nru grep-3.1/tests/CuTmpdir.pm grep-3.3/tests/CuTmpdir.pm --- grep-3.1/tests/CuTmpdir.pm 2017-01-01 11:34:33.000000000 +0000 +++ grep-3.3/tests/CuTmpdir.pm 2018-04-21 23:35:48.000000000 +0000 @@ -1,7 +1,7 @@ package CuTmpdir; # create, then chdir into a temporary sub-directory -# Copyright (C) 2007-2015, 2017 Free Software Foundation, Inc. +# Copyright (C) 2007-2015, 2017-2018 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 @@ # 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 . +# along with this program. If not, see . use strict; use warnings; diff -Nru grep-3.1/tests/dfa-coverage grep-3.3/tests/dfa-coverage --- grep-3.1/tests/dfa-coverage 2017-01-01 11:34:33.000000000 +0000 +++ grep-3.3/tests/dfa-coverage 2018-04-21 23:35:48.000000000 +0000 @@ -1,7 +1,7 @@ #!/bin/sh # Exercise the final reachable code in dfa.c's match_mb_charset. -# Copyright (C) 2012-2017 Free Software Foundation, Inc. +# Copyright (C) 2012-2018 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 @@ # 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 . +# along with this program. If not, see . . "${srcdir=.}/init.sh"; path_prepend_ ../src diff -Nru grep-3.1/tests/dfa-heap-overrun grep-3.3/tests/dfa-heap-overrun --- grep-3.1/tests/dfa-heap-overrun 2017-01-01 11:34:33.000000000 +0000 +++ grep-3.3/tests/dfa-heap-overrun 2018-04-21 23:35:48.000000000 +0000 @@ -1,7 +1,7 @@ #!/bin/sh # Trigger a heap overrun in grep-2.6..grep-2.8. -# Copyright (C) 2011-2017 Free Software Foundation, Inc. +# Copyright (C) 2011-2018 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 @@ # 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 . +# along with this program. If not, see . . "${srcdir=.}/init.sh"; path_prepend_ ../src diff -Nru grep-3.1/tests/empty grep-3.3/tests/empty --- grep-3.1/tests/empty 2017-01-01 11:34:33.000000000 +0000 +++ grep-3.3/tests/empty 2018-01-07 00:09:11.000000000 +0000 @@ -2,7 +2,7 @@ # test that the empty file means no pattern # and an empty pattern means match all. # -# Copyright (C) 2001, 2006, 2009-2017 Free Software Foundation, Inc. +# Copyright (C) 2001, 2006, 2009-2018 Free Software Foundation, Inc. # # Copying and distribution of this file, with or without modification, # are permitted in any medium without royalty provided the copyright diff -Nru grep-3.1/tests/empty-line-mb grep-3.3/tests/empty-line-mb --- grep-3.1/tests/empty-line-mb 2017-01-01 11:34:33.000000000 +0000 +++ grep-3.3/tests/empty-line-mb 2018-01-07 00:09:11.000000000 +0000 @@ -1,7 +1,7 @@ #! /bin/sh # Exercise bugs in grep-2.13 with -i, -n and an RE of ^$ in a multi-byte locale. # -# Copyright (C) 2012-2017 Free Software Foundation, Inc. +# Copyright (C) 2012-2018 Free Software Foundation, Inc. # # Copying and distribution of this file, with or without modification, # are permitted in any medium without royalty provided the copyright diff -Nru grep-3.1/tests/encoding-error grep-3.3/tests/encoding-error --- grep-3.1/tests/encoding-error 2017-01-01 11:34:33.000000000 +0000 +++ grep-3.3/tests/encoding-error 2018-01-07 00:09:11.000000000 +0000 @@ -1,7 +1,7 @@ #! /bin/sh # Test grep's behavior on encoding errors. # -# Copyright 2015-2017 Free Software Foundation, Inc. +# Copyright 2015-2018 Free Software Foundation, Inc. # # Copying and distribution of this file, with or without modification, # are permitted in any medium without royalty provided the copyright diff -Nru grep-3.1/tests/envvar-check grep-3.3/tests/envvar-check --- grep-3.1/tests/envvar-check 2017-01-01 11:34:33.000000000 +0000 +++ grep-3.3/tests/envvar-check 2018-04-21 23:35:48.000000000 +0000 @@ -1,7 +1,7 @@ # -*- sh -*- # Check environment variables for sane values while testing. -# Copyright (C) 2000-2017 Free Software Foundation, Inc. +# Copyright (C) 2000-2018 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 @@ # 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 . +# along with this program. If not, see . if (FOO=FOO; unset FOO) >/dev/null 2>&1; then as_unset=unset diff -Nru grep-3.1/tests/ere grep-3.3/tests/ere --- grep-3.1/tests/ere 2017-01-01 11:34:33.000000000 +0000 +++ grep-3.3/tests/ere 2018-01-07 00:09:11.000000000 +0000 @@ -1,7 +1,7 @@ #! /bin/sh # Regression test for GNU grep. # -# Copyright (C) 2001, 2006, 2009-2017 Free Software Foundation, Inc. +# Copyright (C) 2001, 2006, 2009-2018 Free Software Foundation, Inc. # # Copying and distribution of this file, with or without modification, # are permitted in any medium without royalty provided the copyright diff -Nru grep-3.1/tests/ere.awk grep-3.3/tests/ere.awk --- grep-3.1/tests/ere.awk 2017-01-01 11:34:33.000000000 +0000 +++ grep-3.3/tests/ere.awk 2018-01-07 00:09:11.000000000 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2001, 2006, 2009-2017 Free Software Foundation, Inc. +# Copyright (C) 2001, 2006, 2009-2018 Free Software Foundation, Inc. # # Copying and distribution of this file, with or without modification, # are permitted in any medium without royalty provided the copyright diff -Nru grep-3.1/tests/false-match-mb-non-utf8 grep-3.3/tests/false-match-mb-non-utf8 --- grep-3.1/tests/false-match-mb-non-utf8 2017-01-01 11:34:33.000000000 +0000 +++ grep-3.3/tests/false-match-mb-non-utf8 2018-01-07 00:09:11.000000000 +0000 @@ -1,7 +1,7 @@ #! /bin/sh # Test for false matches in grep 2.19..2.26 in multibyte, non-UTF8 locales # -# Copyright (C) 2016-2017 Free Software Foundation, Inc. +# Copyright (C) 2016-2018 Free Software Foundation, Inc. # # Copying and distribution of this file, with or without modification, # are permitted in any medium without royalty provided the copyright diff -Nru grep-3.1/tests/fgrep-longest grep-3.3/tests/fgrep-longest --- grep-3.1/tests/fgrep-longest 2017-01-29 23:53:36.000000000 +0000 +++ grep-3.3/tests/fgrep-longest 2018-01-07 00:09:11.000000000 +0000 @@ -2,7 +2,7 @@ # With multiple matches, grep -Fo could print a shorter one. # This bug affected grep versions 2.26 through 2.27. # -# Copyright (C) 2017 Free Software Foundation, Inc. +# Copyright (C) 2017-2018 Free Software Foundation, Inc. # # Copying and distribution of this file, with or without modification, # are permitted in any medium without royalty provided the copyright diff -Nru grep-3.1/tests/file grep-3.3/tests/file --- grep-3.1/tests/file 2017-01-01 11:34:33.000000000 +0000 +++ grep-3.3/tests/file 2018-01-07 00:09:11.000000000 +0000 @@ -4,7 +4,7 @@ # grep -F -f pattern_file file # grep -G -f pattern_file file # -# Copyright (C) 2001, 2006, 2009-2017 Free Software Foundation, Inc. +# Copyright (C) 2001, 2006, 2009-2018 Free Software Foundation, Inc. # # Copying and distribution of this file, with or without modification, # are permitted in any medium without royalty provided the copyright diff -Nru grep-3.1/tests/filename-lineno.pl grep-3.3/tests/filename-lineno.pl --- grep-3.1/tests/filename-lineno.pl 2017-07-02 17:41:42.000000000 +0000 +++ grep-3.3/tests/filename-lineno.pl 2018-04-21 23:35:48.000000000 +0000 @@ -4,7 +4,7 @@ # file or line number from which the offending regular expression came. # With 2.26, now, each such diagnostic has a "FILENAME:LINENO: " prefix. -# Copyright (C) 2016-2017 Free Software Foundation, Inc. +# Copyright (C) 2016-2018 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 @@ -17,7 +17,7 @@ # 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 . +# along with this program. If not, see . use strict; diff -Nru grep-3.1/tests/fmbtest grep-3.3/tests/fmbtest --- grep-3.1/tests/fmbtest 2017-01-01 11:34:33.000000000 +0000 +++ grep-3.3/tests/fmbtest 2018-01-07 00:09:11.000000000 +0000 @@ -1,5 +1,5 @@ #! /bin/sh -# Copyright (C) 2001, 2006, 2009-2017 Free Software Foundation, Inc. +# Copyright (C) 2001, 2006, 2009-2018 Free Software Foundation, Inc. # # Copying and distribution of this file, with or without modification, # are permitted in any medium without royalty provided the copyright diff -Nru grep-3.1/tests/foad1 grep-3.3/tests/foad1 --- grep-3.1/tests/foad1 2017-06-22 01:20:52.000000000 +0000 +++ grep-3.3/tests/foad1 2018-01-07 00:09:11.000000000 +0000 @@ -1,7 +1,7 @@ #! /bin/sh # Test various combinations of command-line options. # -# Copyright (C) 2001, 2006, 2009-2017 Free Software Foundation, Inc. +# Copyright (C) 2001, 2006, 2009-2018 Free Software Foundation, Inc. # # Copying and distribution of this file, with or without modification, # are permitted in any medium without royalty provided the copyright diff -Nru grep-3.1/tests/get-mb-cur-max.c grep-3.3/tests/get-mb-cur-max.c --- grep-3.1/tests/get-mb-cur-max.c 2017-01-01 11:34:33.000000000 +0000 +++ grep-3.3/tests/get-mb-cur-max.c 2018-01-07 00:09:11.000000000 +0000 @@ -1,5 +1,5 @@ /* Auxiliary program to detect support for a locale. - Copyright 2010-2017 Free Software Foundation, Inc. + Copyright 2010-2018 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 -Nru grep-3.1/tests/help-version grep-3.3/tests/help-version --- grep-3.1/tests/help-version 2017-01-01 11:34:33.000000000 +0000 +++ grep-3.3/tests/help-version 2018-04-21 23:35:48.000000000 +0000 @@ -2,7 +2,7 @@ # Make sure all of these programs work properly # when invoked with --help or --version. -# Copyright (C) 2000-2017 Free Software Foundation, Inc. +# Copyright (C) 2000-2018 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,7 +15,7 @@ # 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 . +# along with this program. If not, see . . "${srcdir=.}/init.sh"; path_prepend_ ../src diff -Nru grep-3.1/tests/high-bit-range grep-3.3/tests/high-bit-range --- grep-3.1/tests/high-bit-range 2017-01-01 11:34:33.000000000 +0000 +++ grep-3.3/tests/high-bit-range 2018-04-21 23:35:48.000000000 +0000 @@ -1,7 +1,7 @@ #!/bin/sh # Exercise high-bit-set unibyte-in-[...]-range bug. -# Copyright (C) 2011-2017 Free Software Foundation, Inc. +# Copyright (C) 2011-2018 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 @@ # 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 . +# along with this program. If not, see . . "${srcdir=.}/init.sh"; path_prepend_ ../src diff -Nru grep-3.1/tests/init.cfg grep-3.3/tests/init.cfg --- grep-3.1/tests/init.cfg 2016-12-10 18:14:29.000000000 +0000 +++ grep-3.3/tests/init.cfg 2018-12-21 02:51:44.000000000 +0000 @@ -134,7 +134,7 @@ *) ;; esac - skip_ "$loc locale not found" + skip_ "$locale locale not found" } expensive_() diff -Nru grep-3.1/tests/initial-tab grep-3.3/tests/initial-tab --- grep-3.1/tests/initial-tab 2017-01-01 11:34:33.000000000 +0000 +++ grep-3.3/tests/initial-tab 2018-04-21 23:35:48.000000000 +0000 @@ -1,7 +1,7 @@ #!/bin/sh # Exercise -T. -# Copyright 2016-2017 Free Software Foundation, Inc. +# Copyright 2016-2018 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 @@ # 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 . +# along with this program. If not, see . . "${srcdir=.}/init.sh"; path_prepend_ ../src diff -Nru grep-3.1/tests/init.sh grep-3.3/tests/init.sh --- grep-3.1/tests/init.sh 2017-05-21 19:07:57.000000000 +0000 +++ grep-3.3/tests/init.sh 2018-12-15 16:59:23.000000000 +0000 @@ -1,6 +1,6 @@ # source this file; set up for tests -# Copyright (C) 2009-2017 Free Software Foundation, Inc. +# Copyright (C) 2009-2018 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 @@ -13,7 +13,7 @@ # 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 . +# along with this program. If not, see . # Using this file in a test # ========================= @@ -62,6 +62,19 @@ ME_=`expr "./$0" : '.*/\(.*\)$'` +# 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 + # We use a trap below for cleanup. This requires us to go through # hoops to get the right exit status transported through the handler. # So use 'Exit STATUS' instead of 'exit STATUS' inside of the tests. @@ -250,7 +263,7 @@ # That is part of the shell-selection test above. Why use aliases rather # than functions? Because support for hyphen-containing aliases is more # widespread than that for hyphen-containing function names. -test -n "$EXEEXT" && shopt -s expand_aliases +test -n "$EXEEXT" && test -n "$BASH_VERSION" && shopt -s expand_aliases # Enable glibc's malloc-perturbing option. # This is useful for exposing code that depends on the fact that @@ -429,13 +442,13 @@ path_dir_=$1 case $path_dir_ in '') fail_ "invalid path dir: '$1'";; - /*) abs_path_dir_=$path_dir_;; + /* | ?:*) abs_path_dir_=$path_dir_;; *) abs_path_dir_=$initial_cwd_/$path_dir_;; esac case $abs_path_dir_ in - *:*) fail_ "invalid path dir: '$abs_path_dir_'";; + *$PATH_SEPARATOR*) fail_ "invalid path dir: '$abs_path_dir_'";; esac - PATH="$abs_path_dir_:$PATH" + PATH="$abs_path_dir_$PATH_SEPARATOR$PATH" # Create an alias, FOO, for each FOO.exe in this directory. create_exe_shims_ "$abs_path_dir_" \ @@ -514,7 +527,7 @@ fi n_plus_50_=`expr $n_ + 50` - cmds_='date; date +%N; free; who -a; w; ps auxww; ps ef; netstat -n' + cmds_='date; date +%N; free; who -a; w; ps auxww; ps -ef' data_=` (eval "$cmds_") 2>&1 | gzip ` # Ensure that $data_ has length at least 50+$n_ diff -Nru grep-3.1/tests/khadafy grep-3.3/tests/khadafy --- grep-3.1/tests/khadafy 2017-01-01 11:34:33.000000000 +0000 +++ grep-3.3/tests/khadafy 2018-01-07 00:09:11.000000000 +0000 @@ -1,7 +1,7 @@ #! /bin/sh # Regression test for GNU grep. # -# Copyright (C) 2001, 2006, 2009-2017 Free Software Foundation, Inc. +# Copyright (C) 2001, 2006, 2009-2018 Free Software Foundation, Inc. # # Copying and distribution of this file, with or without modification, # are permitted in any medium without royalty provided the copyright diff -Nru grep-3.1/tests/kwset-abuse grep-3.3/tests/kwset-abuse --- grep-3.1/tests/kwset-abuse 2017-01-01 11:34:33.000000000 +0000 +++ grep-3.3/tests/kwset-abuse 2018-04-21 23:35:48.000000000 +0000 @@ -2,7 +2,7 @@ # Evoke a segfault in a hard-to-reach code path of kwset.c. # This bug affected grep versions 2.19 through 2.21. # -# Copyright (C) 2015-2017 Free Software Foundation, Inc. +# Copyright (C) 2015-2018 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,7 +15,7 @@ # 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 . +# along with this program. If not, see . . "${srcdir=.}/init.sh"; path_prepend_ ../src diff -Nru grep-3.1/tests/long-pattern-perf grep-3.3/tests/long-pattern-perf --- grep-3.1/tests/long-pattern-perf 2017-01-01 11:34:33.000000000 +0000 +++ grep-3.3/tests/long-pattern-perf 2018-04-21 23:35:48.000000000 +0000 @@ -1,7 +1,7 @@ #!/bin/sh # grep-2.21 would incur a 100x penalty for 10x increase in regexp length -# Copyright 2015-2017 Free Software Foundation, Inc. +# Copyright 2015-2018 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 @@ # 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 . +# along with this program. If not, see . . "${srcdir=.}/init.sh"; path_prepend_ ../src diff -Nru grep-3.1/tests/Makefile.am grep-3.3/tests/Makefile.am --- grep-3.1/tests/Makefile.am 2017-01-29 23:53:16.000000000 +0000 +++ grep-3.3/tests/Makefile.am 2018-12-21 02:42:08.000000000 +0000 @@ -1,5 +1,5 @@ ## Process this file with automake to create Makefile.in -# Copyright 1997-1998, 2005-2017 Free Software Foundation, Inc. +# Copyright 1997-1998, 2005-2018 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 @@ -12,7 +12,7 @@ # 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 . +# along with this program. If not, see . TEST_EXTENSIONS = .sh .pl @@ -56,9 +56,9 @@ if USE_INCLUDED_REGEX XFAIL_TESTS += equiv-classes else -# The backslash-alt test fails for glibc, which needs to be fixed. -# FIXME-2015: Remove this once the glibc bug is fixed. -XFAIL_TESTS += backref-alt +# The backref-alt test fails for glibc 2.27 and earlier. +# If you're using older glibc you can upgrade to glibc 2.28 or later, +# configure --with-included-regex, or ignore the test failure. endif TESTS = \ @@ -151,6 +151,7 @@ skip-read \ spencer1 \ spencer1-locale \ + stack-overflow \ status \ surrogate-pair \ symlink \ @@ -192,7 +193,7 @@ spencer1-locale.awk # Default to a nonzero value. Environment overrides. -# http://udrepper.livejournal.com/11429.html +# https://udrepper.livejournal.com/11429.html MALLOC_PERTURB_ = 1 TESTS_ENVIRONMENT = \ diff -Nru grep-3.1/tests/Makefile.in grep-3.3/tests/Makefile.in --- grep-3.1/tests/Makefile.in 2017-07-02 20:12:56.000000000 +0000 +++ grep-3.3/tests/Makefile.in 2018-12-21 03:59:31.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.99a from Makefile.am. +# Makefile.in generated by automake 1.16a from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2015 Free Software Foundation, Inc. +# Copyright (C) 1994-2018 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -14,7 +14,7 @@ @SET_MAKE@ -# Copyright 1997-1998, 2005-2017 Free Software Foundation, Inc. +# Copyright 1997-1998, 2005-2018 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 @@ -27,7 +27,7 @@ # 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 . +# along with this program. If not, see . VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ @@ -108,23 +108,21 @@ # The included matcher needs to be fixed. # FIXME-2015: Remove this once the gnulib bug is fixed. @USE_INCLUDED_REGEX_TRUE@am__append_1 = equiv-classes -# The backslash-alt test fails for glibc, which needs to be fixed. -# FIXME-2015: Remove this once the glibc bug is fixed. -@USE_INCLUDED_REGEX_FALSE@am__append_2 = backref-alt subdir = tests ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \ + $(top_srcdir)/m4/__inline.m4 \ $(top_srcdir)/m4/absolute-header.m4 $(top_srcdir)/m4/alloca.m4 \ - $(top_srcdir)/m4/assert.m4 $(top_srcdir)/m4/btowc.m4 \ - $(top_srcdir)/m4/builtin-expect.m4 \ - $(top_srcdir)/m4/chdir-long.m4 \ + $(top_srcdir)/m4/arpa_inet_h.m4 $(top_srcdir)/m4/assert.m4 \ + $(top_srcdir)/m4/btowc.m4 $(top_srcdir)/m4/builtin-expect.m4 \ + $(top_srcdir)/m4/c-stack.m4 $(top_srcdir)/m4/chdir-long.m4 \ $(top_srcdir)/m4/close-stream.m4 $(top_srcdir)/m4/close.m4 \ $(top_srcdir)/m4/closedir.m4 $(top_srcdir)/m4/closeout.m4 \ $(top_srcdir)/m4/codeset.m4 $(top_srcdir)/m4/configmake.m4 \ $(top_srcdir)/m4/ctype.m4 $(top_srcdir)/m4/cycle-check.m4 \ $(top_srcdir)/m4/d-ino.m4 $(top_srcdir)/m4/d-type.m4 \ - $(top_srcdir)/m4/dirent-safer.m4 $(top_srcdir)/m4/dirent_h.m4 \ - $(top_srcdir)/m4/dirfd.m4 $(top_srcdir)/m4/dirname.m4 \ + $(top_srcdir)/m4/dirent_h.m4 $(top_srcdir)/m4/dirfd.m4 \ + $(top_srcdir)/m4/dirname.m4 \ $(top_srcdir)/m4/double-slash-root.m4 $(top_srcdir)/m4/dup.m4 \ $(top_srcdir)/m4/dup2.m4 $(top_srcdir)/m4/eealloc.m4 \ $(top_srcdir)/m4/environ.m4 $(top_srcdir)/m4/errno_h.m4 \ @@ -136,32 +134,38 @@ $(top_srcdir)/m4/fdopen.m4 $(top_srcdir)/m4/fdopendir.m4 \ $(top_srcdir)/m4/filenamecat.m4 $(top_srcdir)/m4/flexmember.m4 \ $(top_srcdir)/m4/float_h.m4 $(top_srcdir)/m4/fnmatch.m4 \ - $(top_srcdir)/m4/fpending.m4 $(top_srcdir)/m4/fpieee.m4 \ - $(top_srcdir)/m4/fstat.m4 $(top_srcdir)/m4/fstatat.m4 \ + $(top_srcdir)/m4/fnmatch_h.m4 $(top_srcdir)/m4/fpending.m4 \ + $(top_srcdir)/m4/fpieee.m4 $(top_srcdir)/m4/fstat.m4 \ + $(top_srcdir)/m4/fstatat.m4 $(top_srcdir)/m4/ftruncate.m4 \ $(top_srcdir)/m4/fts.m4 $(top_srcdir)/m4/getcwd.m4 \ $(top_srcdir)/m4/getdtablesize.m4 $(top_srcdir)/m4/getopt.m4 \ $(top_srcdir)/m4/getpagesize.m4 \ $(top_srcdir)/m4/getprogname.m4 $(top_srcdir)/m4/gettext.m4 \ - $(top_srcdir)/m4/glibc21.m4 $(top_srcdir)/m4/gnulib-common.m4 \ + $(top_srcdir)/m4/gettimeofday.m4 $(top_srcdir)/m4/glibc21.m4 \ + $(top_srcdir)/m4/gnulib-common.m4 \ $(top_srcdir)/m4/gnulib-comp.m4 \ - $(top_srcdir)/m4/hard-locale.m4 $(top_srcdir)/m4/i-ring.m4 \ + $(top_srcdir)/m4/host-cpu-c-abi.m4 $(top_srcdir)/m4/i-ring.m4 \ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/iconv_h.m4 \ $(top_srcdir)/m4/iconv_open.m4 \ - $(top_srcdir)/m4/include_next.m4 $(top_srcdir)/m4/inline.m4 \ + $(top_srcdir)/m4/include_next.m4 $(top_srcdir)/m4/inet_pton.m4 \ + $(top_srcdir)/m4/inline.m4 \ + $(top_srcdir)/m4/intl-thread-locale.m4 \ $(top_srcdir)/m4/intlmacosx.m4 $(top_srcdir)/m4/intmax_t.m4 \ $(top_srcdir)/m4/inttostr.m4 $(top_srcdir)/m4/inttypes-pri.m4 \ $(top_srcdir)/m4/inttypes.m4 $(top_srcdir)/m4/inttypes_h.m4 \ - $(top_srcdir)/m4/isatty.m4 $(top_srcdir)/m4/isblank.m4 \ - $(top_srcdir)/m4/iswblank.m4 $(top_srcdir)/m4/iswctype.m4 \ - $(top_srcdir)/m4/langinfo_h.m4 $(top_srcdir)/m4/largefile.m4 \ - $(top_srcdir)/m4/lcmessage.m4 $(top_srcdir)/m4/lib-ld.m4 \ - $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ + $(top_srcdir)/m4/ioctl.m4 $(top_srcdir)/m4/isatty.m4 \ + $(top_srcdir)/m4/isblank.m4 $(top_srcdir)/m4/iswblank.m4 \ + $(top_srcdir)/m4/iswctype.m4 $(top_srcdir)/m4/langinfo_h.m4 \ + $(top_srcdir)/m4/largefile.m4 $(top_srcdir)/m4/lcmessage.m4 \ + $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ + $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libsigsegv.m4 \ $(top_srcdir)/m4/libunistring-base.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-tr.m4 $(top_srcdir)/m4/locale-zh.m4 \ $(top_srcdir)/m4/locale_h.m4 $(top_srcdir)/m4/localeconv.m4 \ - $(top_srcdir)/m4/localename.m4 $(top_srcdir)/m4/lock.m4 \ + $(top_srcdir)/m4/localename.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/manywarnings.m4 \ @@ -174,35 +178,46 @@ $(top_srcdir)/m4/minmax.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/nanosleep.m4 $(top_srcdir)/m4/netinet_in_h.m4 \ $(top_srcdir)/m4/nl_langinfo.m4 $(top_srcdir)/m4/nls.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/off_t.m4 $(top_srcdir)/m4/open-cloexec.m4 \ $(top_srcdir)/m4/open.m4 $(top_srcdir)/m4/openat.m4 \ $(top_srcdir)/m4/opendir.m4 $(top_srcdir)/m4/pathmax.m4 \ $(top_srcdir)/m4/pcre.m4 $(top_srcdir)/m4/perl.m4 \ - $(top_srcdir)/m4/pipe.m4 $(top_srcdir)/m4/pkg.m4 \ - $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/printf.m4 \ - $(top_srcdir)/m4/progtest.m4 \ + $(top_srcdir)/m4/perror.m4 $(top_srcdir)/m4/pipe.m4 \ + $(top_srcdir)/m4/pkg.m4 $(top_srcdir)/m4/po.m4 \ + $(top_srcdir)/m4/printf.m4 $(top_srcdir)/m4/progtest.m4 \ $(top_srcdir)/m4/pthread_rwlock_rdlock.m4 \ $(top_srcdir)/m4/putenv.m4 $(top_srcdir)/m4/quote.m4 \ - $(top_srcdir)/m4/quotearg.m4 $(top_srcdir)/m4/read.m4 \ - $(top_srcdir)/m4/readdir.m4 $(top_srcdir)/m4/realloc.m4 \ - $(top_srcdir)/m4/regex.m4 $(top_srcdir)/m4/safe-read.m4 \ - $(top_srcdir)/m4/save-cwd.m4 $(top_srcdir)/m4/setenv.m4 \ - $(top_srcdir)/m4/setlocale.m4 $(top_srcdir)/m4/size_max.m4 \ - $(top_srcdir)/m4/snprintf.m4 $(top_srcdir)/m4/ssize_t.m4 \ - $(top_srcdir)/m4/stat.m4 $(top_srcdir)/m4/std-gnu11.m4 \ - $(top_srcdir)/m4/stdalign.m4 $(top_srcdir)/m4/stdarg.m4 \ - $(top_srcdir)/m4/stdbool.m4 $(top_srcdir)/m4/stddef_h.m4 \ - $(top_srcdir)/m4/stdint.m4 $(top_srcdir)/m4/stdint_h.m4 \ - $(top_srcdir)/m4/stdio_h.m4 $(top_srcdir)/m4/stdlib_h.m4 \ - $(top_srcdir)/m4/stpcpy.m4 $(top_srcdir)/m4/strdup.m4 \ - $(top_srcdir)/m4/strerror.m4 $(top_srcdir)/m4/string_h.m4 \ + $(top_srcdir)/m4/quotearg.m4 $(top_srcdir)/m4/raise.m4 \ + $(top_srcdir)/m4/read.m4 $(top_srcdir)/m4/readdir.m4 \ + $(top_srcdir)/m4/realloc.m4 $(top_srcdir)/m4/regex.m4 \ + $(top_srcdir)/m4/safe-read.m4 $(top_srcdir)/m4/save-cwd.m4 \ + $(top_srcdir)/m4/select.m4 $(top_srcdir)/m4/setenv.m4 \ + $(top_srcdir)/m4/setlocale.m4 $(top_srcdir)/m4/sigaction.m4 \ + $(top_srcdir)/m4/signal_h.m4 \ + $(top_srcdir)/m4/signalblocking.m4 \ + $(top_srcdir)/m4/size_max.m4 $(top_srcdir)/m4/sleep.m4 \ + $(top_srcdir)/m4/snprintf.m4 $(top_srcdir)/m4/socketlib.m4 \ + $(top_srcdir)/m4/sockets.m4 $(top_srcdir)/m4/socklen.m4 \ + $(top_srcdir)/m4/sockpfaf.m4 $(top_srcdir)/m4/ssize_t.m4 \ + $(top_srcdir)/m4/stat-time.m4 $(top_srcdir)/m4/stat.m4 \ + $(top_srcdir)/m4/std-gnu11.m4 $(top_srcdir)/m4/stdalign.m4 \ + $(top_srcdir)/m4/stdarg.m4 $(top_srcdir)/m4/stdbool.m4 \ + $(top_srcdir)/m4/stddef_h.m4 $(top_srcdir)/m4/stdint.m4 \ + $(top_srcdir)/m4/stdint_h.m4 $(top_srcdir)/m4/stdio_h.m4 \ + $(top_srcdir)/m4/stdlib_h.m4 $(top_srcdir)/m4/stpcpy.m4 \ + $(top_srcdir)/m4/strdup.m4 $(top_srcdir)/m4/strerror.m4 \ + $(top_srcdir)/m4/strerror_r.m4 $(top_srcdir)/m4/string_h.m4 \ $(top_srcdir)/m4/strnlen.m4 $(top_srcdir)/m4/strstr.m4 \ $(top_srcdir)/m4/strtoimax.m4 $(top_srcdir)/m4/strtoll.m4 \ $(top_srcdir)/m4/strtoull.m4 $(top_srcdir)/m4/strtoumax.m4 \ - $(top_srcdir)/m4/symlink.m4 $(top_srcdir)/m4/sys_socket_h.m4 \ - $(top_srcdir)/m4/sys_stat_h.m4 $(top_srcdir)/m4/sys_types_h.m4 \ + $(top_srcdir)/m4/symlink.m4 $(top_srcdir)/m4/sys_ioctl_h.m4 \ + $(top_srcdir)/m4/sys_select_h.m4 \ + $(top_srcdir)/m4/sys_socket_h.m4 \ + $(top_srcdir)/m4/sys_stat_h.m4 $(top_srcdir)/m4/sys_time_h.m4 \ + $(top_srcdir)/m4/sys_types_h.m4 $(top_srcdir)/m4/sys_uio_h.m4 \ $(top_srcdir)/m4/threadlib.m4 $(top_srcdir)/m4/time_h.m4 \ $(top_srcdir)/m4/unistd-safer.m4 $(top_srcdir)/m4/unistd_h.m4 \ $(top_srcdir)/m4/unlocked-io.m4 $(top_srcdir)/m4/vasnprintf.m4 \ @@ -211,9 +226,11 @@ $(top_srcdir)/m4/wchar_h.m4 $(top_srcdir)/m4/wchar_t.m4 \ $(top_srcdir)/m4/wcrtomb.m4 $(top_srcdir)/m4/wctob.m4 \ $(top_srcdir)/m4/wctomb.m4 $(top_srcdir)/m4/wctype_h.m4 \ - $(top_srcdir)/m4/wcwidth.m4 $(top_srcdir)/m4/wint_t.m4 \ - $(top_srcdir)/m4/xalloc.m4 $(top_srcdir)/m4/xsize.m4 \ - $(top_srcdir)/m4/xstrtol.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/m4/wcwidth.m4 \ + $(top_srcdir)/m4/windows-stat-inodes.m4 \ + $(top_srcdir)/m4/wint_t.m4 $(top_srcdir)/m4/xalloc.m4 \ + $(top_srcdir)/m4/xsize.m4 $(top_srcdir)/m4/xstrtol.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) @@ -244,7 +261,6 @@ am__maybe_remake_depfiles = depfiles am__depfiles_remade = ./$(DEPDIR)/get-mb-cur-max.Po am__mv = mv -f -am__set_depbase = depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.[^.]*$$||'` COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) @@ -540,8 +556,11 @@ GLIBC21 = @GLIBC21@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ +GNULIB_ACCEPT = @GNULIB_ACCEPT@ +GNULIB_ACCEPT4 = @GNULIB_ACCEPT4@ GNULIB_ALPHASORT = @GNULIB_ALPHASORT@ GNULIB_ATOLL = @GNULIB_ATOLL@ +GNULIB_BIND = @GNULIB_BIND@ GNULIB_BTOWC = @GNULIB_BTOWC@ GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@ GNULIB_CANONICALIZE_FILE_NAME = @GNULIB_CANONICALIZE_FILE_NAME@ @@ -549,6 +568,7 @@ GNULIB_CHOWN = @GNULIB_CHOWN@ GNULIB_CLOSE = @GNULIB_CLOSE@ GNULIB_CLOSEDIR = @GNULIB_CLOSEDIR@ +GNULIB_CONNECT = @GNULIB_CONNECT@ GNULIB_CTIME = @GNULIB_CTIME@ GNULIB_DIRFD = @GNULIB_DIRFD@ GNULIB_DPRINTF = @GNULIB_DPRINTF@ @@ -558,6 +578,7 @@ GNULIB_DUPLOCALE = @GNULIB_DUPLOCALE@ GNULIB_ENVIRON = @GNULIB_ENVIRON@ GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@ +GNULIB_EXPLICIT_BZERO = @GNULIB_EXPLICIT_BZERO@ GNULIB_FACCESSAT = @GNULIB_FACCESSAT@ GNULIB_FCHDIR = @GNULIB_FCHDIR@ GNULIB_FCHMODAT = @GNULIB_FCHMODAT@ @@ -572,6 +593,7 @@ GNULIB_FFSLL = @GNULIB_FFSLL@ GNULIB_FGETC = @GNULIB_FGETC@ GNULIB_FGETS = @GNULIB_FGETS@ +GNULIB_FNMATCH = @GNULIB_FNMATCH@ GNULIB_FOPEN = @GNULIB_FOPEN@ GNULIB_FPRINTF = @GNULIB_FPRINTF@ GNULIB_FPRINTF_POSIX = @GNULIB_FPRINTF_POSIX@ @@ -604,6 +626,10 @@ GNULIB_GETLOGIN = @GNULIB_GETLOGIN@ GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@ GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@ +GNULIB_GETPASS = @GNULIB_GETPASS@ +GNULIB_GETPEERNAME = @GNULIB_GETPEERNAME@ +GNULIB_GETSOCKNAME = @GNULIB_GETSOCKNAME@ +GNULIB_GETSOCKOPT = @GNULIB_GETSOCKOPT@ GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@ GNULIB_GETTIMEOFDAY = @GNULIB_GETTIMEOFDAY@ GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@ @@ -613,6 +639,9 @@ GNULIB_ICONV = @GNULIB_ICONV@ GNULIB_IMAXABS = @GNULIB_IMAXABS@ GNULIB_IMAXDIV = @GNULIB_IMAXDIV@ +GNULIB_INET_NTOP = @GNULIB_INET_NTOP@ +GNULIB_INET_PTON = @GNULIB_INET_PTON@ +GNULIB_IOCTL = @GNULIB_IOCTL@ GNULIB_ISATTY = @GNULIB_ISATTY@ GNULIB_ISBLANK = @GNULIB_ISBLANK@ GNULIB_ISWBLANK = @GNULIB_ISWBLANK@ @@ -621,7 +650,9 @@ GNULIB_LCHOWN = @GNULIB_LCHOWN@ GNULIB_LINK = @GNULIB_LINK@ GNULIB_LINKAT = @GNULIB_LINKAT@ +GNULIB_LISTEN = @GNULIB_LISTEN@ GNULIB_LOCALECONV = @GNULIB_LOCALECONV@ +GNULIB_LOCALENAME = @GNULIB_LOCALENAME@ GNULIB_LOCALTIME = @GNULIB_LOCALTIME@ GNULIB_LSEEK = @GNULIB_LSEEK@ GNULIB_LSTAT = @GNULIB_LSTAT@ @@ -680,6 +711,8 @@ GNULIB_PREAD = @GNULIB_PREAD@ GNULIB_PRINTF = @GNULIB_PRINTF@ GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@ +GNULIB_PSELECT = @GNULIB_PSELECT@ +GNULIB_PTHREAD_SIGMASK = @GNULIB_PTHREAD_SIGMASK@ GNULIB_PTSNAME = @GNULIB_PTSNAME@ GNULIB_PTSNAME_R = @GNULIB_PTSNAME_R@ GNULIB_PUTC = @GNULIB_PUTC@ @@ -688,6 +721,7 @@ GNULIB_PUTS = @GNULIB_PUTS@ GNULIB_PWRITE = @GNULIB_PWRITE@ GNULIB_QSORT_R = @GNULIB_QSORT_R@ +GNULIB_RAISE = @GNULIB_RAISE@ GNULIB_RANDOM = @GNULIB_RANDOM@ GNULIB_RANDOM_R = @GNULIB_RANDOM_R@ GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@ @@ -695,8 +729,11 @@ GNULIB_READDIR = @GNULIB_READDIR@ GNULIB_READLINK = @GNULIB_READLINK@ GNULIB_READLINKAT = @GNULIB_READLINKAT@ +GNULIB_REALLOCARRAY = @GNULIB_REALLOCARRAY@ GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@ GNULIB_REALPATH = @GNULIB_REALPATH@ +GNULIB_RECV = @GNULIB_RECV@ +GNULIB_RECVFROM = @GNULIB_RECVFROM@ GNULIB_REMOVE = @GNULIB_REMOVE@ GNULIB_RENAME = @GNULIB_RENAME@ GNULIB_RENAMEAT = @GNULIB_RENAMEAT@ @@ -706,11 +743,20 @@ GNULIB_SCANDIR = @GNULIB_SCANDIR@ GNULIB_SCANF = @GNULIB_SCANF@ GNULIB_SECURE_GETENV = @GNULIB_SECURE_GETENV@ +GNULIB_SELECT = @GNULIB_SELECT@ +GNULIB_SEND = @GNULIB_SEND@ +GNULIB_SENDTO = @GNULIB_SENDTO@ GNULIB_SETENV = @GNULIB_SETENV@ GNULIB_SETHOSTNAME = @GNULIB_SETHOSTNAME@ GNULIB_SETLOCALE = @GNULIB_SETLOCALE@ +GNULIB_SETSOCKOPT = @GNULIB_SETSOCKOPT@ +GNULIB_SHUTDOWN = @GNULIB_SHUTDOWN@ +GNULIB_SIGACTION = @GNULIB_SIGACTION@ +GNULIB_SIGNAL_H_SIGPIPE = @GNULIB_SIGNAL_H_SIGPIPE@ +GNULIB_SIGPROCMASK = @GNULIB_SIGPROCMASK@ GNULIB_SLEEP = @GNULIB_SLEEP@ GNULIB_SNPRINTF = @GNULIB_SNPRINTF@ +GNULIB_SOCKET = @GNULIB_SOCKET@ GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@ GNULIB_STAT = @GNULIB_STAT@ GNULIB_STDIO_H_NONBLOCKING = @GNULIB_STDIO_H_NONBLOCKING@ @@ -808,7 +854,9 @@ GNULIB_WRITE = @GNULIB_WRITE@ GNULIB__EXIT = @GNULIB__EXIT@ GREP = @GREP@ +HAVE_ACCEPT4 = @HAVE_ACCEPT4@ HAVE_ALPHASORT = @HAVE_ALPHASORT@ +HAVE_ARPA_INET_H = @HAVE_ARPA_INET_H@ HAVE_ATOLL = @HAVE_ATOLL@ HAVE_BTOWC = @HAVE_BTOWC@ HAVE_C99_STDINT_H = @HAVE_C99_STDINT_H@ @@ -834,12 +882,16 @@ HAVE_DECL_GETUSERSHELL = @HAVE_DECL_GETUSERSHELL@ HAVE_DECL_IMAXABS = @HAVE_DECL_IMAXABS@ HAVE_DECL_IMAXDIV = @HAVE_DECL_IMAXDIV@ +HAVE_DECL_INET_NTOP = @HAVE_DECL_INET_NTOP@ +HAVE_DECL_INET_PTON = @HAVE_DECL_INET_PTON@ +HAVE_DECL_INITSTATE = @HAVE_DECL_INITSTATE@ HAVE_DECL_LOCALTIME_R = @HAVE_DECL_LOCALTIME_R@ HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@ HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@ HAVE_DECL_OBSTACK_PRINTF = @HAVE_DECL_OBSTACK_PRINTF@ HAVE_DECL_SETENV = @HAVE_DECL_SETENV@ HAVE_DECL_SETHOSTNAME = @HAVE_DECL_SETHOSTNAME@ +HAVE_DECL_SETSTATE = @HAVE_DECL_SETSTATE@ HAVE_DECL_SNPRINTF = @HAVE_DECL_SNPRINTF@ HAVE_DECL_STRDUP = @HAVE_DECL_STRDUP@ HAVE_DECL_STRERROR_R = @HAVE_DECL_STRERROR_R@ @@ -849,6 +901,7 @@ HAVE_DECL_STRTOIMAX = @HAVE_DECL_STRTOIMAX@ HAVE_DECL_STRTOK_R = @HAVE_DECL_STRTOK_R@ HAVE_DECL_STRTOUMAX = @HAVE_DECL_STRTOUMAX@ +HAVE_DECL_TRUNCATE = @HAVE_DECL_TRUNCATE@ HAVE_DECL_TTYNAME_R = @HAVE_DECL_TTYNAME_R@ HAVE_DECL_UNSETENV = @HAVE_DECL_UNSETENV@ HAVE_DECL_VSNPRINTF = @HAVE_DECL_VSNPRINTF@ @@ -860,6 +913,7 @@ HAVE_DUP3 = @HAVE_DUP3@ HAVE_DUPLOCALE = @HAVE_DUPLOCALE@ HAVE_EUIDACCESS = @HAVE_EUIDACCESS@ +HAVE_EXPLICIT_BZERO = @HAVE_EXPLICIT_BZERO@ HAVE_FACCESSAT = @HAVE_FACCESSAT@ HAVE_FCHDIR = @HAVE_FCHDIR@ HAVE_FCHMODAT = @HAVE_FCHMODAT@ @@ -870,6 +924,9 @@ HAVE_FEATURES_H = @HAVE_FEATURES_H@ HAVE_FFSL = @HAVE_FFSL@ HAVE_FFSLL = @HAVE_FFSLL@ +HAVE_FNMATCH = @HAVE_FNMATCH@ +HAVE_FNMATCH_H = @HAVE_FNMATCH_H@ +HAVE_FREELOCALE = @HAVE_FREELOCALE@ HAVE_FSEEKO = @HAVE_FSEEKO@ HAVE_FSTATAT = @HAVE_FSTATAT@ HAVE_FSYNC = @HAVE_FSYNC@ @@ -882,13 +939,17 @@ HAVE_GETLOGIN = @HAVE_GETLOGIN@ HAVE_GETOPT_H = @HAVE_GETOPT_H@ HAVE_GETPAGESIZE = @HAVE_GETPAGESIZE@ +HAVE_GETPASS = @HAVE_GETPASS@ HAVE_GETSUBOPT = @HAVE_GETSUBOPT@ +HAVE_GETTIMEOFDAY = @HAVE_GETTIMEOFDAY@ HAVE_GRANTPT = @HAVE_GRANTPT@ HAVE_GROUP_MEMBER = @HAVE_GROUP_MEMBER@ +HAVE_IMAXDIV_T = @HAVE_IMAXDIV_T@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_ISBLANK = @HAVE_ISBLANK@ HAVE_ISWBLANK = @HAVE_ISWBLANK@ HAVE_ISWCNTRL = @HAVE_ISWCNTRL@ +HAVE_LANGINFO_ALTMON = @HAVE_LANGINFO_ALTMON@ HAVE_LANGINFO_CODESET = @HAVE_LANGINFO_CODESET@ HAVE_LANGINFO_ERA = @HAVE_LANGINFO_ERA@ HAVE_LANGINFO_H = @HAVE_LANGINFO_H@ @@ -896,6 +957,7 @@ HAVE_LANGINFO_YESEXPR = @HAVE_LANGINFO_YESEXPR@ HAVE_LCHMOD = @HAVE_LCHMOD@ HAVE_LCHOWN = @HAVE_LCHOWN@ +HAVE_LIBSIGSEGV = @HAVE_LIBSIGSEGV@ HAVE_LINK = @HAVE_LINK@ HAVE_LINKAT = @HAVE_LINKAT@ HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@ @@ -921,6 +983,8 @@ HAVE_MKSTEMPS = @HAVE_MKSTEMPS@ HAVE_MSVC_INVALID_PARAMETER_HANDLER = @HAVE_MSVC_INVALID_PARAMETER_HANDLER@ HAVE_NANOSLEEP = @HAVE_NANOSLEEP@ +HAVE_NETINET_IN_H = @HAVE_NETINET_IN_H@ +HAVE_NEWLOCALE = @HAVE_NEWLOCALE@ HAVE_NL_LANGINFO = @HAVE_NL_LANGINFO@ HAVE_OPENAT = @HAVE_OPENAT@ HAVE_OPENDIR = @HAVE_OPENDIR@ @@ -930,11 +994,15 @@ HAVE_PIPE2 = @HAVE_PIPE2@ HAVE_POPEN = @HAVE_POPEN@ HAVE_POSIX_OPENPT = @HAVE_POSIX_OPENPT@ +HAVE_POSIX_SIGNALBLOCKING = @HAVE_POSIX_SIGNALBLOCKING@ HAVE_PREAD = @HAVE_PREAD@ +HAVE_PSELECT = @HAVE_PSELECT@ +HAVE_PTHREAD_SIGMASK = @HAVE_PTHREAD_SIGMASK@ HAVE_PTSNAME = @HAVE_PTSNAME@ HAVE_PTSNAME_R = @HAVE_PTSNAME_R@ HAVE_PWRITE = @HAVE_PWRITE@ HAVE_QSORT_R = @HAVE_QSORT_R@ +HAVE_RAISE = @HAVE_RAISE@ HAVE_RANDOM = @HAVE_RANDOM@ HAVE_RANDOM_H = @HAVE_RANDOM_H@ HAVE_RANDOM_R = @HAVE_RANDOM_R@ @@ -942,17 +1010,23 @@ HAVE_READDIR = @HAVE_READDIR@ HAVE_READLINK = @HAVE_READLINK@ HAVE_READLINKAT = @HAVE_READLINKAT@ +HAVE_REALLOCARRAY = @HAVE_REALLOCARRAY@ HAVE_REALPATH = @HAVE_REALPATH@ HAVE_RENAMEAT = @HAVE_RENAMEAT@ HAVE_REWINDDIR = @HAVE_REWINDDIR@ HAVE_RPMATCH = @HAVE_RPMATCH@ +HAVE_SA_FAMILY_T = @HAVE_SA_FAMILY_T@ HAVE_SCANDIR = @HAVE_SCANDIR@ HAVE_SECURE_GETENV = @HAVE_SECURE_GETENV@ HAVE_SETENV = @HAVE_SETENV@ HAVE_SETHOSTNAME = @HAVE_SETHOSTNAME@ +HAVE_SIGACTION = @HAVE_SIGACTION@ +HAVE_SIGHANDLER_T = @HAVE_SIGHANDLER_T@ +HAVE_SIGINFO_T = @HAVE_SIGINFO_T@ HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@ HAVE_SIGNED_WCHAR_T = @HAVE_SIGNED_WCHAR_T@ HAVE_SIGNED_WINT_T = @HAVE_SIGNED_WINT_T@ +HAVE_SIGSET_T = @HAVE_SIGSET_T@ HAVE_SLEEP = @HAVE_SLEEP@ HAVE_STDINT_H = @HAVE_STDINT_H@ HAVE_STPCPY = @HAVE_STPCPY@ @@ -966,18 +1040,27 @@ HAVE_STRTOLL = @HAVE_STRTOLL@ HAVE_STRTOULL = @HAVE_STRTOULL@ HAVE_STRUCT_RANDOM_DATA = @HAVE_STRUCT_RANDOM_DATA@ +HAVE_STRUCT_SIGACTION_SA_SIGACTION = @HAVE_STRUCT_SIGACTION_SA_SIGACTION@ +HAVE_STRUCT_SOCKADDR_STORAGE = @HAVE_STRUCT_SOCKADDR_STORAGE@ +HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY = @HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY@ +HAVE_STRUCT_TIMEVAL = @HAVE_STRUCT_TIMEVAL@ HAVE_STRVERSCMP = @HAVE_STRVERSCMP@ HAVE_SYMLINK = @HAVE_SYMLINK@ HAVE_SYMLINKAT = @HAVE_SYMLINKAT@ HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@ HAVE_SYS_CDEFS_H = @HAVE_SYS_CDEFS_H@ HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@ +HAVE_SYS_IOCTL_H = @HAVE_SYS_IOCTL_H@ HAVE_SYS_LOADAVG_H = @HAVE_SYS_LOADAVG_H@ HAVE_SYS_PARAM_H = @HAVE_SYS_PARAM_H@ +HAVE_SYS_SELECT_H = @HAVE_SYS_SELECT_H@ +HAVE_SYS_SOCKET_H = @HAVE_SYS_SOCKET_H@ +HAVE_SYS_TIME_H = @HAVE_SYS_TIME_H@ HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ +HAVE_SYS_UIO_H = @HAVE_SYS_UIO_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@ @@ -1026,6 +1109,7 @@ HAVE_WMEMCPY = @HAVE_WMEMCPY@ HAVE_WMEMMOVE = @HAVE_WMEMMOVE@ HAVE_WMEMSET = @HAVE_WMEMSET@ +HAVE_WS2TCPIP_H = @HAVE_WS2TCPIP_H@ HAVE_XLOCALE_H = @HAVE_XLOCALE_H@ HAVE__BOOL = @HAVE__BOOL@ HAVE__EXIT = @HAVE__EXIT@ @@ -1033,6 +1117,7 @@ ICONV_H = @ICONV_H@ INCLUDE_NEXT = @INCLUDE_NEXT@ INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@ +INET_PTON_LIB = @INET_PTON_LIB@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -1043,6 +1128,7 @@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ LDFLAGS = @LDFLAGS@ +LIBCSTACK = @LIBCSTACK@ LIBGREPUTILS_LIBDEPS = @LIBGREPUTILS_LIBDEPS@ LIBGREPUTILS_LTLIBDEPS = @LIBGREPUTILS_LTLIBDEPS@ LIBICONV = @LIBICONV@ @@ -1052,11 +1138,16 @@ LIBPTH = @LIBPTH@ LIBPTH_PREFIX = @LIBPTH_PREFIX@ LIBS = @LIBS@ +LIBSIGSEGV = @LIBSIGSEGV@ +LIBSIGSEGV_PREFIX = @LIBSIGSEGV_PREFIX@ +LIBSOCKET = @LIBSOCKET@ LIBTESTS_LIBDEPS = @LIBTESTS_LIBDEPS@ LIBTHREAD = @LIBTHREAD@ LIBUNISTRING_UNISTR_H = @LIBUNISTRING_UNISTR_H@ LIBUNISTRING_UNITYPES_H = @LIBUNISTRING_UNITYPES_H@ LIBUNISTRING_UNIWIDTH_H = @LIBUNISTRING_UNIWIDTH_H@ +LIB_NANOSLEEP = @LIB_NANOSLEEP@ +LIB_SELECT = @LIB_SELECT@ LIMITS_H = @LIMITS_H@ LOCALCHARSET_TESTS_ENVIRONMENT = @LOCALCHARSET_TESTS_ENVIRONMENT@ LOCALE_FR = @LOCALE_FR@ @@ -1064,36 +1155,49 @@ LOCALE_JA = @LOCALE_JA@ LOCALE_TR_UTF8 = @LOCALE_TR_UTF8@ LOCALE_ZH_CN = @LOCALE_ZH_CN@ +LTLIBCSTACK = @LTLIBCSTACK@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBMULTITHREAD = @LTLIBMULTITHREAD@ LTLIBOBJS = @LTLIBOBJS@ LTLIBPTH = @LTLIBPTH@ +LTLIBSIGSEGV = @LTLIBSIGSEGV@ LTLIBTHREAD = @LTLIBTHREAD@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ +NETINET_IN_H = @NETINET_IN_H@ +NEXT_ARPA_INET_H = @NEXT_ARPA_INET_H@ +NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H = @NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H@ NEXT_AS_FIRST_DIRECTIVE_CTYPE_H = @NEXT_AS_FIRST_DIRECTIVE_CTYPE_H@ NEXT_AS_FIRST_DIRECTIVE_DIRENT_H = @NEXT_AS_FIRST_DIRECTIVE_DIRENT_H@ NEXT_AS_FIRST_DIRECTIVE_ERRNO_H = @NEXT_AS_FIRST_DIRECTIVE_ERRNO_H@ NEXT_AS_FIRST_DIRECTIVE_FCNTL_H = @NEXT_AS_FIRST_DIRECTIVE_FCNTL_H@ NEXT_AS_FIRST_DIRECTIVE_FLOAT_H = @NEXT_AS_FIRST_DIRECTIVE_FLOAT_H@ +NEXT_AS_FIRST_DIRECTIVE_FNMATCH_H = @NEXT_AS_FIRST_DIRECTIVE_FNMATCH_H@ NEXT_AS_FIRST_DIRECTIVE_GETOPT_H = @NEXT_AS_FIRST_DIRECTIVE_GETOPT_H@ NEXT_AS_FIRST_DIRECTIVE_ICONV_H = @NEXT_AS_FIRST_DIRECTIVE_ICONV_H@ NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H = @NEXT_AS_FIRST_DIRECTIVE_INTTYPES_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_NETINET_IN_H = @NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H@ +NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H = @NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H@ NEXT_AS_FIRST_DIRECTIVE_STDARG_H = @NEXT_AS_FIRST_DIRECTIVE_STDARG_H@ NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@ NEXT_AS_FIRST_DIRECTIVE_STDINT_H = @NEXT_AS_FIRST_DIRECTIVE_STDINT_H@ NEXT_AS_FIRST_DIRECTIVE_STDIO_H = @NEXT_AS_FIRST_DIRECTIVE_STDIO_H@ NEXT_AS_FIRST_DIRECTIVE_STDLIB_H = @NEXT_AS_FIRST_DIRECTIVE_STDLIB_H@ NEXT_AS_FIRST_DIRECTIVE_STRING_H = @NEXT_AS_FIRST_DIRECTIVE_STRING_H@ +NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H@ +NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H@ +NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H@ +NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H@ +NEXT_AS_FIRST_DIRECTIVE_SYS_UIO_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_UIO_H@ NEXT_AS_FIRST_DIRECTIVE_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_TIME_H@ NEXT_AS_FIRST_DIRECTIVE_UNISTD_H = @NEXT_AS_FIRST_DIRECTIVE_UNISTD_H@ NEXT_AS_FIRST_DIRECTIVE_WCHAR_H = @NEXT_AS_FIRST_DIRECTIVE_WCHAR_H@ @@ -1103,20 +1207,28 @@ NEXT_ERRNO_H = @NEXT_ERRNO_H@ NEXT_FCNTL_H = @NEXT_FCNTL_H@ NEXT_FLOAT_H = @NEXT_FLOAT_H@ +NEXT_FNMATCH_H = @NEXT_FNMATCH_H@ NEXT_GETOPT_H = @NEXT_GETOPT_H@ NEXT_ICONV_H = @NEXT_ICONV_H@ NEXT_INTTYPES_H = @NEXT_INTTYPES_H@ NEXT_LANGINFO_H = @NEXT_LANGINFO_H@ NEXT_LIMITS_H = @NEXT_LIMITS_H@ NEXT_LOCALE_H = @NEXT_LOCALE_H@ +NEXT_NETINET_IN_H = @NEXT_NETINET_IN_H@ +NEXT_SIGNAL_H = @NEXT_SIGNAL_H@ NEXT_STDARG_H = @NEXT_STDARG_H@ NEXT_STDDEF_H = @NEXT_STDDEF_H@ NEXT_STDINT_H = @NEXT_STDINT_H@ NEXT_STDIO_H = @NEXT_STDIO_H@ NEXT_STDLIB_H = @NEXT_STDLIB_H@ NEXT_STRING_H = @NEXT_STRING_H@ +NEXT_SYS_IOCTL_H = @NEXT_SYS_IOCTL_H@ +NEXT_SYS_SELECT_H = @NEXT_SYS_SELECT_H@ +NEXT_SYS_SOCKET_H = @NEXT_SYS_SOCKET_H@ NEXT_SYS_STAT_H = @NEXT_SYS_STAT_H@ +NEXT_SYS_TIME_H = @NEXT_SYS_TIME_H@ NEXT_SYS_TYPES_H = @NEXT_SYS_TYPES_H@ +NEXT_SYS_UIO_H = @NEXT_SYS_UIO_H@ NEXT_TIME_H = @NEXT_TIME_H@ NEXT_UNISTD_H = @NEXT_UNISTD_H@ NEXT_WCHAR_H = @NEXT_WCHAR_H@ @@ -1156,15 +1268,18 @@ REPLACE_DUP = @REPLACE_DUP@ REPLACE_DUP2 = @REPLACE_DUP2@ REPLACE_DUPLOCALE = @REPLACE_DUPLOCALE@ +REPLACE_FACCESSAT = @REPLACE_FACCESSAT@ REPLACE_FCHOWNAT = @REPLACE_FCHOWNAT@ REPLACE_FCLOSE = @REPLACE_FCLOSE@ REPLACE_FCNTL = @REPLACE_FCNTL@ REPLACE_FDOPEN = @REPLACE_FDOPEN@ REPLACE_FDOPENDIR = @REPLACE_FDOPENDIR@ REPLACE_FFLUSH = @REPLACE_FFLUSH@ +REPLACE_FNMATCH = @REPLACE_FNMATCH@ REPLACE_FOPEN = @REPLACE_FOPEN@ REPLACE_FPRINTF = @REPLACE_FPRINTF@ REPLACE_FPURGE = @REPLACE_FPURGE@ +REPLACE_FREELOCALE = @REPLACE_FREELOCALE@ REPLACE_FREOPEN = @REPLACE_FREOPEN@ REPLACE_FSEEK = @REPLACE_FSEEK@ REPLACE_FSEEKO = @REPLACE_FSEEKO@ @@ -1182,10 +1297,15 @@ REPLACE_GETLINE = @REPLACE_GETLINE@ REPLACE_GETLOGIN_R = @REPLACE_GETLOGIN_R@ REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@ +REPLACE_GETPASS = @REPLACE_GETPASS@ +REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@ REPLACE_GMTIME = @REPLACE_GMTIME@ REPLACE_ICONV = @REPLACE_ICONV@ REPLACE_ICONV_OPEN = @REPLACE_ICONV_OPEN@ REPLACE_ICONV_UTF = @REPLACE_ICONV_UTF@ +REPLACE_INET_NTOP = @REPLACE_INET_NTOP@ +REPLACE_INET_PTON = @REPLACE_INET_PTON@ +REPLACE_IOCTL = @REPLACE_IOCTL@ REPLACE_ISATTY = @REPLACE_ISATTY@ REPLACE_ISWBLANK = @REPLACE_ISWBLANK@ REPLACE_ISWCNTRL = @REPLACE_ISWCNTRL@ @@ -1214,6 +1334,7 @@ REPLACE_MKSTEMP = @REPLACE_MKSTEMP@ REPLACE_MKTIME = @REPLACE_MKTIME@ REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@ +REPLACE_NEWLOCALE = @REPLACE_NEWLOCALE@ REPLACE_NL_LANGINFO = @REPLACE_NL_LANGINFO@ REPLACE_NULL = @REPLACE_NULL@ REPLACE_OBSTACK_PRINTF = @REPLACE_OBSTACK_PRINTF@ @@ -1224,11 +1345,14 @@ REPLACE_POPEN = @REPLACE_POPEN@ REPLACE_PREAD = @REPLACE_PREAD@ REPLACE_PRINTF = @REPLACE_PRINTF@ +REPLACE_PSELECT = @REPLACE_PSELECT@ +REPLACE_PTHREAD_SIGMASK = @REPLACE_PTHREAD_SIGMASK@ REPLACE_PTSNAME = @REPLACE_PTSNAME@ REPLACE_PTSNAME_R = @REPLACE_PTSNAME_R@ REPLACE_PUTENV = @REPLACE_PUTENV@ REPLACE_PWRITE = @REPLACE_PWRITE@ REPLACE_QSORT_R = @REPLACE_QSORT_R@ +REPLACE_RAISE = @REPLACE_RAISE@ REPLACE_RANDOM_R = @REPLACE_RANDOM_R@ REPLACE_READ = @REPLACE_READ@ REPLACE_READLINK = @REPLACE_READLINK@ @@ -1239,6 +1363,7 @@ REPLACE_RENAME = @REPLACE_RENAME@ REPLACE_RENAMEAT = @REPLACE_RENAMEAT@ REPLACE_RMDIR = @REPLACE_RMDIR@ +REPLACE_SELECT = @REPLACE_SELECT@ REPLACE_SETENV = @REPLACE_SETENV@ REPLACE_SETLOCALE = @REPLACE_SETLOCALE@ REPLACE_SLEEP = @REPLACE_SLEEP@ @@ -1264,6 +1389,7 @@ REPLACE_STRTOK_R = @REPLACE_STRTOK_R@ REPLACE_STRTOUMAX = @REPLACE_STRTOUMAX@ REPLACE_STRUCT_LCONV = @REPLACE_STRUCT_LCONV@ +REPLACE_STRUCT_TIMEVAL = @REPLACE_STRUCT_TIMEVAL@ REPLACE_SYMLINK = @REPLACE_SYMLINK@ REPLACE_SYMLINKAT = @REPLACE_SYMLINKAT@ REPLACE_TIMEGM = @REPLACE_TIMEGM@ @@ -1303,6 +1429,8 @@ STDDEF_H = @STDDEF_H@ STDINT_H = @STDINT_H@ STRIP = @STRIP@ +SYS_IOCTL_H_HAVE_WINSOCK2_H = @SYS_IOCTL_H_HAVE_WINSOCK2_H@ +SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@ SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@ TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@ UINT32_MAX_LT_UINTMAX_MAX = @UINT32_MAX_LT_UINTMAX_MAX@ @@ -1331,6 +1459,7 @@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ +am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ @@ -1408,7 +1537,10 @@ # matcher (i.e., with glibc) and with the included matcher. # Both matchers need to be fixed. # FIXME-2015: Remove this once the glibc and gnulib bugs are fixed. -XFAIL_TESTS = triple-backref $(am__append_1) $(am__append_2) +XFAIL_TESTS = triple-backref $(am__append_1) +# The backref-alt test fails for glibc 2.27 and earlier. +# If you're using older glibc you can upgrade to glibc 2.28 or later, +# configure --with-included-regex, or ignore the test failure. TESTS = \ backref \ backref-alt \ @@ -1499,6 +1631,7 @@ skip-read \ spencer1 \ spencer1-locale \ + stack-overflow \ status \ surrogate-pair \ symlink \ @@ -1541,7 +1674,7 @@ # Default to a nonzero value. Environment overrides. -# http://udrepper.livejournal.com/11429.html +# https://udrepper.livejournal.com/11429.html MALLOC_PERTURB_ = 1 TESTS_ENVIRONMENT = \ tmp__=$${TMPDIR-/tmp}; \ @@ -1655,22 +1788,20 @@ am--depfiles: $(am__depfiles_remade) .c.o: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(am__set_depbase) && \ -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $<; \ -@am__fastdepCC_TRUE@ if test $$? = 0; then $(am__mv) $$depbase.Tpo $$depbase.Po; \ -@am__fastdepCC_TRUE@ else rm -f $$depbase.Tpo; false; fi +@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ +@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(am__set_depbase) && \ -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $$($(CYGPATH_W) $<); \ -@am__fastdepCC_TRUE@ if test $$? = 0; then $(am__mv) $$depbase.Tpo $$depbase.Po; \ -@am__fastdepCC_TRUE@ else rm -f $$depbase.Tpo; false; fi +@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ +@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $$($(CYGPATH_W) $<) +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique @@ -1844,7 +1975,7 @@ fi; \ $$success || exit 1 -check-TESTS: +check-TESTS: $(check_PROGRAMS) @list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list @list='$(RECHECK_LOGS:.log=.trs)'; test -z "$$list" || rm -f $$list @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) @@ -2481,6 +2612,13 @@ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) +stack-overflow.log: stack-overflow + @p='stack-overflow'; \ + b='stack-overflow'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) status.log: status @p='status'; \ b='status'; \ @@ -2650,7 +2788,10 @@ @am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_PL_LOG_DRIVER_FLAGS) $(PL_LOG_DRIVER_FLAGS) -- $(PL_LOG_COMPILE) \ @am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT) -distdir: $(DISTFILES) +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ diff -Nru grep-3.1/tests/match-lines grep-3.3/tests/match-lines --- grep-3.1/tests/match-lines 2017-01-01 11:34:33.000000000 +0000 +++ grep-3.3/tests/match-lines 2018-04-21 23:35:48.000000000 +0000 @@ -3,7 +3,7 @@ # grep -F -x -o PAT print an extra newline for each match. # This would fail for grep-2.19 and grep-2.20. -# Copyright 2014-2017 Free Software Foundation, Inc. +# Copyright 2014-2018 Free Software Foundation, Inc. # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -16,7 +16,7 @@ # 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 . +# along with this program. If not, see . . "${srcdir=.}/init.sh"; path_prepend_ ../src diff -Nru grep-3.1/tests/mb-dot-newline grep-3.3/tests/mb-dot-newline --- grep-3.1/tests/mb-dot-newline 2017-01-01 11:34:33.000000000 +0000 +++ grep-3.3/tests/mb-dot-newline 2018-04-21 23:35:48.000000000 +0000 @@ -2,7 +2,7 @@ # Trigger a bug in the DFA matcher. # This would fail for grep-2.20. -# Copyright 2014-2017 Free Software Foundation, Inc. +# Copyright 2014-2018 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,7 +15,7 @@ # 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 . +# along with this program. If not, see . . "${srcdir=.}/init.sh"; path_prepend_ ../src diff -Nru grep-3.1/tests/mb-non-UTF8-overrun grep-3.3/tests/mb-non-UTF8-overrun --- grep-3.1/tests/mb-non-UTF8-overrun 2017-01-01 11:34:33.000000000 +0000 +++ grep-3.3/tests/mb-non-UTF8-overrun 2018-04-21 23:35:48.000000000 +0000 @@ -2,7 +2,7 @@ # grep would sometimes read beyond end of input, when using a non-UTF8 # multibyte locale. -# Copyright 2014-2017 Free Software Foundation, Inc. +# Copyright 2014-2018 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,7 +15,7 @@ # 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 . +# along with this program. If not, see . . "${srcdir=.}/init.sh"; path_prepend_ ../src require_JP_EUC_locale_ diff -Nru grep-3.1/tests/mb-non-UTF8-performance grep-3.3/tests/mb-non-UTF8-performance --- grep-3.1/tests/mb-non-UTF8-performance 2017-01-01 11:34:33.000000000 +0000 +++ grep-3.3/tests/mb-non-UTF8-performance 2018-04-21 23:35:48.000000000 +0000 @@ -3,7 +3,7 @@ # The 200x is on an Intel i7-based system. # On an AMD FX-4100, it would take up to 2500x longer. -# Copyright 2014-2017 Free Software Foundation, Inc. +# Copyright 2014-2018 Free Software Foundation, Inc. # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -16,7 +16,7 @@ # 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 . +# along with this program. If not, see . . "${srcdir=.}/init.sh"; path_prepend_ ../src diff -Nru grep-3.1/tests/multibyte-white-space grep-3.3/tests/multibyte-white-space --- grep-3.1/tests/multibyte-white-space 2017-01-01 11:34:33.000000000 +0000 +++ grep-3.3/tests/multibyte-white-space 2018-01-07 00:09:11.000000000 +0000 @@ -1,7 +1,7 @@ #! /bin/sh # Test whether \s matches SP and UTF-8 multi-byte white space characters. # -# Copyright (C) 2013-2017 Free Software Foundation, Inc. +# Copyright (C) 2013-2018 Free Software Foundation, Inc. # # Copying and distribution of this file, with or without modification, # are permitted in any medium without royalty provided the copyright diff -Nru grep-3.1/tests/multiple-begin-or-end-line grep-3.3/tests/multiple-begin-or-end-line --- grep-3.1/tests/multiple-begin-or-end-line 2017-01-01 11:34:33.000000000 +0000 +++ grep-3.3/tests/multiple-begin-or-end-line 2018-04-21 23:35:48.000000000 +0000 @@ -2,7 +2,7 @@ # Test a pattern of multiple begin or end line constraints. # This would mistakenly print a line when using grep-2.19. -# Copyright 2014-2017 Free Software Foundation, Inc. +# Copyright 2014-2018 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,7 +15,7 @@ # 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 . +# along with this program. If not, see . . "${srcdir=.}/init.sh"; path_prepend_ ../src diff -Nru grep-3.1/tests/null-byte grep-3.3/tests/null-byte --- grep-3.1/tests/null-byte 2017-01-01 11:34:33.000000000 +0000 +++ grep-3.3/tests/null-byte 2018-04-21 23:35:48.000000000 +0000 @@ -1,7 +1,7 @@ #!/bin/sh # Test NUL bytes in patterns and data. -# Copyright 2014-2017 Free Software Foundation, Inc. +# Copyright 2014-2018 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 @@ # 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 . +# along with this program. If not, see . . "${srcdir=.}/init.sh"; path_prepend_ ../src diff -Nru grep-3.1/tests/options grep-3.3/tests/options --- grep-3.1/tests/options 2017-01-01 11:34:33.000000000 +0000 +++ grep-3.3/tests/options 2018-04-21 23:35:48.000000000 +0000 @@ -1,7 +1,7 @@ #! /bin/sh # Test for POSIX options for grep # -# Copyright (C) 2001, 2006, 2009-2017 Free Software Foundation, Inc. +# Copyright (C) 2001, 2006, 2009-2018 Free Software Foundation, Inc. # # Copying and distribution of this file, with or without modification, # are permitted in any medium without royalty provided the copyright @@ -39,7 +39,7 @@ fi # checking for multiple -e options; see: -# http://bugs.gnu.org/21670 +# https://bugs.gnu.org/21670 echo abchelloabc | grep -e '^hello' -e 'hello$' > /dev/null 2>&1 if test $? -ne 1 ; then echo "Options: Wrong status code, test #4 failed" diff -Nru grep-3.1/tests/pcre grep-3.3/tests/pcre --- grep-3.1/tests/pcre 2017-01-01 11:34:33.000000000 +0000 +++ grep-3.3/tests/pcre 2018-01-07 00:09:11.000000000 +0000 @@ -1,7 +1,7 @@ #! /bin/sh # Simple PCRE tests. # -# Copyright (C) 2001, 2006, 2009-2017 Free Software Foundation, Inc. +# Copyright (C) 2001, 2006, 2009-2018 Free Software Foundation, Inc. # # Copying and distribution of this file, with or without modification, # are permitted in any medium without royalty provided the copyright diff -Nru grep-3.1/tests/pcre-abort grep-3.3/tests/pcre-abort --- grep-3.1/tests/pcre-abort 2017-01-01 11:34:33.000000000 +0000 +++ grep-3.3/tests/pcre-abort 2018-01-07 00:09:11.000000000 +0000 @@ -2,7 +2,7 @@ # Show that grep handles PCRE's PCRE_ERROR_MATCHLIMIT. # In grep-2.8, it would abort. # -# Copyright (C) 2011-2017 Free Software Foundation, Inc. +# Copyright (C) 2011-2018 Free Software Foundation, Inc. # # Copying and distribution of this file, with or without modification, # are permitted in any medium without royalty provided the copyright diff -Nru grep-3.1/tests/pcre-count grep-3.3/tests/pcre-count --- grep-3.1/tests/pcre-count 2017-01-01 11:34:33.000000000 +0000 +++ grep-3.3/tests/pcre-count 2018-01-07 00:09:11.000000000 +0000 @@ -2,7 +2,7 @@ # grep -P / grep -Pc are inconsistent results # This bug affected grep versions 2.21 through 2.22. # -# Copyright (C) 2015-2017 Free Software Foundation, Inc. +# Copyright (C) 2015-2018 Free Software Foundation, Inc. # # Copying and distribution of this file, with or without modification, # are permitted in any medium without royalty provided the copyright diff -Nru grep-3.1/tests/pcre-infloop grep-3.3/tests/pcre-infloop --- grep-3.1/tests/pcre-infloop 2017-01-01 11:34:33.000000000 +0000 +++ grep-3.3/tests/pcre-infloop 2018-04-21 23:35:48.000000000 +0000 @@ -2,7 +2,7 @@ # With some versions of libpcre, apparently including 8.35, # the following would trigger an infinite loop in its match function. -# Copyright 2014-2017 Free Software Foundation, Inc. +# Copyright 2014-2018 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,7 +15,7 @@ # 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 . +# along with this program. If not, see . . "${srcdir=.}/init.sh"; path_prepend_ ../src require_timeout_ diff -Nru grep-3.1/tests/pcre-invalid-utf8-infloop grep-3.3/tests/pcre-invalid-utf8-infloop --- grep-3.1/tests/pcre-invalid-utf8-infloop 2017-01-01 11:34:33.000000000 +0000 +++ grep-3.3/tests/pcre-invalid-utf8-infloop 2018-01-07 00:09:11.000000000 +0000 @@ -1,7 +1,7 @@ #! /bin/sh # Ensure that grep -oaP doesn't infloop for invalid multi-byte input # -# Copyright (C) 2015-2017 Free Software Foundation, Inc. +# Copyright (C) 2015-2018 Free Software Foundation, Inc. # # Copying and distribution of this file, with or without modification, # are permitted in any medium without royalty provided the copyright diff -Nru grep-3.1/tests/pcre-invalid-utf8-input grep-3.3/tests/pcre-invalid-utf8-input --- grep-3.1/tests/pcre-invalid-utf8-input 2017-01-01 11:34:33.000000000 +0000 +++ grep-3.3/tests/pcre-invalid-utf8-input 2018-01-07 00:09:11.000000000 +0000 @@ -1,7 +1,7 @@ #! /bin/sh # Ensure that grep -P doesn't abort or infloop for invalid multi-byte input # -# Copyright (C) 2013-2017 Free Software Foundation, Inc. +# Copyright (C) 2013-2018 Free Software Foundation, Inc. # # Copying and distribution of this file, with or without modification, # are permitted in any medium without royalty provided the copyright diff -Nru grep-3.1/tests/pcre-jitstack grep-3.3/tests/pcre-jitstack --- grep-3.1/tests/pcre-jitstack 2017-01-01 11:34:33.000000000 +0000 +++ grep-3.3/tests/pcre-jitstack 2018-01-07 00:09:11.000000000 +0000 @@ -1,7 +1,7 @@ #! /bin/sh # Grep 2.21 would report "grep: internal PCRE error: -27" # -# Copyright 2015-2017 Free Software Foundation, Inc. +# Copyright 2015-2018 Free Software Foundation, Inc. # # Copying and distribution of this file, with or without modification, # are permitted in any medium without royalty provided the copyright diff -Nru grep-3.1/tests/pcre-o grep-3.3/tests/pcre-o --- grep-3.1/tests/pcre-o 2017-01-01 11:34:33.000000000 +0000 +++ grep-3.3/tests/pcre-o 2018-01-07 00:09:11.000000000 +0000 @@ -1,7 +1,7 @@ #! /bin/sh # Ensure that grep -oP doesn't cause internal error at match. # -# Copyright (C) 2014-2017 Free Software Foundation, Inc. +# Copyright (C) 2014-2018 Free Software Foundation, Inc. # # Copying and distribution of this file, with or without modification, # are permitted in any medium without royalty provided the copyright diff -Nru grep-3.1/tests/pcre-utf8 grep-3.3/tests/pcre-utf8 --- grep-3.1/tests/pcre-utf8 2017-01-01 11:34:33.000000000 +0000 +++ grep-3.3/tests/pcre-utf8 2018-01-07 00:09:11.000000000 +0000 @@ -1,7 +1,7 @@ #! /bin/sh # Ensure that, with -P, Unicode \p{} symbols are correctly matched. # -# Copyright (C) 2012-2017 Free Software Foundation, Inc. +# Copyright (C) 2012-2018 Free Software Foundation, Inc. # # Copying and distribution of this file, with or without modification, # are permitted in any medium without royalty provided the copyright diff -Nru grep-3.1/tests/pcre-w grep-3.3/tests/pcre-w --- grep-3.1/tests/pcre-w 2017-01-01 11:34:33.000000000 +0000 +++ grep-3.3/tests/pcre-w 2018-01-07 00:09:11.000000000 +0000 @@ -1,7 +1,7 @@ #! /bin/sh # Before grep-2.19, grep -Pw %% would match %% enclosed in word boundaries # -# Copyright (C) 2014-2017 Free Software Foundation, Inc. +# Copyright (C) 2014-2018 Free Software Foundation, Inc. # # Copying and distribution of this file, with or without modification, # are permitted in any medium without royalty provided the copyright diff -Nru grep-3.1/tests/pcre-wx-backref grep-3.3/tests/pcre-wx-backref --- grep-3.1/tests/pcre-wx-backref 2017-01-01 11:34:33.000000000 +0000 +++ grep-3.3/tests/pcre-wx-backref 2018-01-07 00:09:11.000000000 +0000 @@ -1,7 +1,7 @@ #! /bin/sh # Before grep-2.19, grep -P and -w/-x would not with a backreference. # -# Copyright (C) 2014-2017 Free Software Foundation, Inc. +# Copyright (C) 2014-2018 Free Software Foundation, Inc. # # Copying and distribution of this file, with or without modification, # are permitted in any medium without royalty provided the copyright diff -Nru grep-3.1/tests/posix-bracket grep-3.3/tests/posix-bracket --- grep-3.1/tests/posix-bracket 2017-01-01 11:34:33.000000000 +0000 +++ grep-3.3/tests/posix-bracket 2018-04-21 23:35:48.000000000 +0000 @@ -1,7 +1,7 @@ #!/bin/sh # Check various bracket expressions in the POSIX locale. -# Copyright 2014-2017 Free Software Foundation, Inc. +# Copyright 2014-2018 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 @@ # 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 . +# along with this program. If not, see . . "${srcdir=.}/init.sh"; path_prepend_ ../src LC_ALL=C diff -Nru grep-3.1/tests/proc grep-3.3/tests/proc --- grep-3.1/tests/proc 2017-01-01 11:34:33.000000000 +0000 +++ grep-3.3/tests/proc 2018-01-07 00:09:11.000000000 +0000 @@ -1,7 +1,7 @@ #! /bin/sh # Test the /proc file system if available. -# Copyright 2016-2017 Free Software Foundation, Inc. +# Copyright 2016-2018 Free Software Foundation, Inc. # # Copying and distribution of this file, with or without modification, # are permitted in any medium without royalty provided the copyright diff -Nru grep-3.1/tests/skip-read grep-3.3/tests/skip-read --- grep-3.1/tests/skip-read 2016-12-10 18:14:29.000000000 +0000 +++ grep-3.3/tests/skip-read 2017-08-26 04:08:34.000000000 +0000 @@ -15,7 +15,7 @@ eval returns_ 1 grep -l $opts $matcher /dev/null > out || fail=1 compare /dev/null out || fail=1 done - eval returns_ 1 grep -L $opts $matcher /dev/null > out || fail=1 + eval grep -L $opts $matcher /dev/null > out || fail=1 compare exp out || fail=1 done done diff -Nru grep-3.1/tests/spencer1 grep-3.3/tests/spencer1 --- grep-3.1/tests/spencer1 2017-01-01 11:34:33.000000000 +0000 +++ grep-3.3/tests/spencer1 2018-01-07 00:09:11.000000000 +0000 @@ -1,7 +1,7 @@ #! /bin/sh # Regression test for GNU grep. # Copyright (C) 1988 Henry Spencer. -# Copyright (C) 2009-2017 Free Software Foundation, Inc. +# Copyright (C) 2009-2018 Free Software Foundation, Inc. # # Copying and distribution of this file, with or without modification, # are permitted in any medium without royalty provided the copyright diff -Nru grep-3.1/tests/spencer1.awk grep-3.3/tests/spencer1.awk --- grep-3.1/tests/spencer1.awk 2017-01-01 11:34:33.000000000 +0000 +++ grep-3.3/tests/spencer1.awk 2018-01-07 00:09:11.000000000 +0000 @@ -1,5 +1,5 @@ # Copyright (C) 1988 Henry Spencer. -# Copyright (C) 2009-2017 Free Software Foundation, Inc. +# Copyright (C) 2009-2018 Free Software Foundation, Inc. # # Copying and distribution of this file, with or without modification, # are permitted in any medium without royalty provided the copyright diff -Nru grep-3.1/tests/spencer1-locale grep-3.3/tests/spencer1-locale --- grep-3.1/tests/spencer1-locale 2017-01-01 11:34:33.000000000 +0000 +++ grep-3.3/tests/spencer1-locale 2018-01-07 00:09:11.000000000 +0000 @@ -2,7 +2,7 @@ # Regression test for GNU grep. # # Copyright (C) 1988 Henry Spencer. -# Copyright (C) 2009-2017 Free Software Foundation, Inc. +# Copyright (C) 2009-2018 Free Software Foundation, Inc. # # Copying and distribution of this file, with or without modification, # are permitted in any medium without royalty provided the copyright diff -Nru grep-3.1/tests/spencer1-locale.awk grep-3.3/tests/spencer1-locale.awk --- grep-3.1/tests/spencer1-locale.awk 2017-01-01 11:34:33.000000000 +0000 +++ grep-3.3/tests/spencer1-locale.awk 2018-01-07 00:09:11.000000000 +0000 @@ -1,5 +1,5 @@ # Copyright (C) 1988 Henry Spencer. -# Copyright (C) 2009-2017 Free Software Foundation, Inc. +# Copyright (C) 2009-2018 Free Software Foundation, Inc. # # Copying and distribution of this file, with or without modification, # are permitted in any medium without royalty provided the copyright diff -Nru grep-3.1/tests/stack-overflow grep-3.3/tests/stack-overflow --- grep-3.1/tests/stack-overflow 1970-01-01 00:00:00.000000000 +0000 +++ grep-3.3/tests/stack-overflow 2018-12-21 03:31:11.000000000 +0000 @@ -0,0 +1,39 @@ +#!/bin/sh +# Ensure a stack overflow no longer segfaults + +. "${srcdir=.}/init.sh"; path_prepend_ ../src + +echo grep: stack overflow > exp || framework_failure_ + +# Limit stack size. Otherwise, it appears to be too hard to overflow the +# stack on some systems like gcc113, aarch64/linux-3.13.0 with 32GB of RAM +# and 20GB of swap. +ulimit -s 8192 2>/dev/null + +# grep attempts to detect overflow via gnulib's c-stack module. +# Trigger that with an input regex composed solely of open parentheses, +# increasing the size of that input until grep emits the expected diagnostic. +fail=0 +for i in 1 3 5 10 20 30 40 50 100 200 400 1000; do + # Create a file containing $i * 10000 open parentheses: + printf %0${i}0000d 0|tr 0 '(' > in || framework_failure_ + grep -E -f in >out 2>err; st=$? + if grep -q 'stack overflow' err; then + test $st = 2 || fail=1 + compare /dev/null out || fail=1 + compare exp err || fail=1 + test $fail = 0 && Exit 0 + fail_ 'printed "stack overflow", but something else was wrong' + fi +done + +# If there was no stack overflow message and the final run exited with +# status 1 and both stdout and stderr were empty, then assume it's a working +# regex that avoids the internal stack overflow problem like glibc's regexp +# used to. +test $st = 1 \ + && ! test -s out \ + && ! test -s err \ + && Exit 0 + +fail_ 'grep never printed "stack overflow"' diff -Nru grep-3.1/tests/status grep-3.3/tests/status --- grep-3.1/tests/status 2017-01-01 11:34:33.000000000 +0000 +++ grep-3.3/tests/status 2018-01-07 00:09:11.000000000 +0000 @@ -5,7 +5,7 @@ # 1 no match # 2 file not found # -# Copyright (C) 2001, 2006, 2009-2017 Free Software Foundation, Inc. +# Copyright (C) 2001, 2006, 2009-2018 Free Software Foundation, Inc. # # Copying and distribution of this file, with or without modification, # are permitted in any medium without royalty provided the copyright diff -Nru grep-3.1/tests/surrogate-pair grep-3.3/tests/surrogate-pair --- grep-3.1/tests/surrogate-pair 2017-01-01 11:34:33.000000000 +0000 +++ grep-3.3/tests/surrogate-pair 2018-12-21 03:31:11.000000000 +0000 @@ -1,7 +1,8 @@ #!/bin/sh -# Trigger a segfault-inducing bug with -i in grep-2.14 on Cygwin. +# Check the handling of characters outside the Unicode BMP. +# Known failures: This test currently fails on Cygwin and AIX. -# Copyright (C) 2013-2017 Free Software Foundation, Inc. +# Copyright (C) 2013-2018 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 +15,7 @@ # 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 . +# along with this program. If not, see . . "${srcdir=.}/init.sh"; path_prepend_ ../src diff -Nru grep-3.1/tests/symlink grep-3.3/tests/symlink --- grep-3.1/tests/symlink 2017-01-01 11:34:33.000000000 +0000 +++ grep-3.3/tests/symlink 2018-04-21 23:35:48.000000000 +0000 @@ -1,7 +1,7 @@ #!/bin/sh # Check that "grep -r" does the right thing with symbolic links. -# Copyright (C) 2012-2017 Free Software Foundation, Inc. +# Copyright (C) 2012-2018 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 @@ # 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 . +# along with this program. If not, see . # written by Paul Eggert diff -Nru grep-3.1/tests/triple-backref grep-3.3/tests/triple-backref --- grep-3.1/tests/triple-backref 2017-01-29 23:54:53.000000000 +0000 +++ grep-3.3/tests/triple-backref 2018-01-07 00:09:11.000000000 +0000 @@ -1,7 +1,7 @@ #! /bin/sh # Test for a bug in glibc's regex code as of September 7, 2014. # -# Copyright (C) 2014-2017 Free Software Foundation, Inc. +# Copyright (C) 2014-2018 Free Software Foundation, Inc. # # Copying and distribution of this file, with or without modification, # are permitted in any medium without royalty provided the copyright diff -Nru grep-3.1/tests/turkish-eyes grep-3.3/tests/turkish-eyes --- grep-3.1/tests/turkish-eyes 2017-01-01 11:34:33.000000000 +0000 +++ grep-3.3/tests/turkish-eyes 2018-04-21 23:35:48.000000000 +0000 @@ -1,7 +1,7 @@ #!/bin/sh # Ensure that case-insensitive matching works with all Turkish i's -# Copyright (C) 2014-2017 Free Software Foundation, Inc. +# Copyright (C) 2014-2018 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 @@ # 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 . +# along with this program. If not, see . . "${srcdir=.}/init.sh"; path_prepend_ ../src diff -Nru grep-3.1/tests/turkish-I grep-3.3/tests/turkish-I --- grep-3.1/tests/turkish-I 2017-01-01 11:34:33.000000000 +0000 +++ grep-3.3/tests/turkish-I 2018-04-21 23:35:48.000000000 +0000 @@ -1,7 +1,7 @@ #!/bin/sh # grep -i in UTF-8: missing NL in output on line containing I WITH DOT (U+0130) -# Copyright (C) 2011-2017 Free Software Foundation, Inc. +# Copyright (C) 2011-2018 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 @@ # 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 . +# along with this program. If not, see . . "${srcdir=.}/init.sh"; path_prepend_ ../src diff -Nru grep-3.1/tests/turkish-I-without-dot grep-3.3/tests/turkish-I-without-dot --- grep-3.1/tests/turkish-I-without-dot 2017-01-01 11:34:33.000000000 +0000 +++ grep-3.3/tests/turkish-I-without-dot 2018-04-21 23:35:48.000000000 +0000 @@ -3,7 +3,7 @@ # (like "I" in the tr_TR.utf8 locale) whose lower-case representation # occupies more bytes (two in this case, for 0xc4b1, aka U+0131). -# Copyright (C) 2011-2017 Free Software Foundation, Inc. +# Copyright (C) 2011-2018 Free Software Foundation, Inc. # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -16,7 +16,7 @@ # 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 . +# along with this program. If not, see . . "${srcdir=.}/init.sh"; path_prepend_ ../src diff -Nru grep-3.1/tests/two-chars grep-3.3/tests/two-chars --- grep-3.1/tests/two-chars 2017-01-01 11:34:33.000000000 +0000 +++ grep-3.3/tests/two-chars 2018-01-07 00:09:11.000000000 +0000 @@ -1,7 +1,7 @@ #! /bin/sh # Check for grep -F with two patterns consisting of the same char. # -# Copyright 2016-2017 Free Software Foundation, Inc. +# Copyright 2016-2018 Free Software Foundation, Inc. # # Copying and distribution of this file, with or without modification, # are permitted in any medium without royalty provided the copyright diff -Nru grep-3.1/tests/two-files grep-3.3/tests/two-files --- grep-3.1/tests/two-files 2017-01-01 11:34:33.000000000 +0000 +++ grep-3.3/tests/two-files 2018-01-07 00:09:11.000000000 +0000 @@ -2,7 +2,7 @@ # Read two files, of increasing size. # With ASAN, this would have triggered a false-positive read of poisoned memory. # -# Copyright 2015-2017 Free Software Foundation, Inc. +# Copyright 2015-2018 Free Software Foundation, Inc. # # Copying and distribution of this file, with or without modification, # are permitted in any medium without royalty provided the copyright diff -Nru grep-3.1/tests/unibyte-binary grep-3.3/tests/unibyte-binary --- grep-3.1/tests/unibyte-binary 2017-01-01 11:34:33.000000000 +0000 +++ grep-3.3/tests/unibyte-binary 2018-04-21 23:35:48.000000000 +0000 @@ -1,7 +1,7 @@ #!/bin/sh # Test binary files in unibyte locales with encoding errors -# Copyright 2016-2017 Free Software Foundation, Inc. +# Copyright 2016-2018 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 @@ # 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 . +# along with this program. If not, see . . "${srcdir=.}/init.sh"; path_prepend_ ../src require_unibyte_locale diff -Nru grep-3.1/tests/unibyte-bracket-expr grep-3.3/tests/unibyte-bracket-expr --- grep-3.1/tests/unibyte-bracket-expr 2017-01-01 11:34:33.000000000 +0000 +++ grep-3.3/tests/unibyte-bracket-expr 2018-04-21 23:35:48.000000000 +0000 @@ -5,7 +5,7 @@ # ru_RU.KOI8-R for any C whose wide-char representation differed from # its single-byte equivalent. -# Copyright (C) 2011-2017 Free Software Foundation, Inc. +# Copyright (C) 2011-2018 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,7 +18,7 @@ # 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 . +# along with this program. If not, see . . "${srcdir=.}/init.sh"; path_prepend_ ../src require_ru_RU_koi8_r diff -Nru grep-3.1/tests/unibyte-negated-circumflex grep-3.3/tests/unibyte-negated-circumflex --- grep-3.1/tests/unibyte-negated-circumflex 2017-01-01 11:34:33.000000000 +0000 +++ grep-3.3/tests/unibyte-negated-circumflex 2018-04-21 23:35:48.000000000 +0000 @@ -1,7 +1,7 @@ #!/bin/sh # Exercise a bug where [^^-^] was treated as if it were [^-^]. -# Copyright 2014-2017 Free Software Foundation, Inc. +# Copyright 2014-2018 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 @@ # 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 . +# along with this program. If not, see . . "${srcdir=.}/init.sh"; path_prepend_ ../src require_unibyte_locale diff -Nru grep-3.1/tests/utf8-bracket grep-3.3/tests/utf8-bracket --- grep-3.1/tests/utf8-bracket 2017-01-01 11:34:33.000000000 +0000 +++ grep-3.3/tests/utf8-bracket 2018-04-21 23:35:48.000000000 +0000 @@ -1,7 +1,7 @@ #!/bin/sh # Check bracket expressions in a UTF-8 locale. -# Copyright 2015-2017 Free Software Foundation, Inc. +# Copyright 2015-2018 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 @@ # 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 . +# along with this program. If not, see . . "${srcdir=.}/init.sh"; path_prepend_ ../src require_en_utf8_locale_ diff -Nru grep-3.1/tests/word-delim-multibyte grep-3.3/tests/word-delim-multibyte --- grep-3.1/tests/word-delim-multibyte 2016-11-21 17:31:31.000000000 +0000 +++ grep-3.3/tests/word-delim-multibyte 2018-12-21 04:26:16.000000000 +0000 @@ -1,6 +1,6 @@ #!/bin/sh # exercise \< and \> with multibyte data. -# Derived from http://savannah.gnu.org/bugs/?29537 +# Derived from https://savannah.gnu.org/bugs/?29537 . "${srcdir=.}/init.sh"; path_prepend_ ../src require_en_utf8_locale_ @@ -24,4 +24,14 @@ compare out in || fail=1 compare /dev/null err || fail=1 +# Also ensure that this works in both the C locale and that multibyte one. +# In the C locale, it failed due to a dfa.c regression in grep-3.2. +echo 123-x > in || framework_failure_ + +for locale in C en_US.UTF-8; do + LC_ALL=$locale grep '.\bx' in > out 2>err || fail=1 + compare out in || fail=1 + compare /dev/null err || fail=1 +done + Exit $fail diff -Nru grep-3.1/tests/word-multi-file grep-3.3/tests/word-multi-file --- grep-3.1/tests/word-multi-file 2014-06-27 22:32:09.000000000 +0000 +++ grep-3.3/tests/word-multi-file 2018-04-21 23:35:48.000000000 +0000 @@ -1,6 +1,6 @@ #!/bin/sh # exercise the -w option on multiple files -# Derived from http://bugzilla.redhat.com/570500 +# Derived from https://bugzilla.redhat.com/570500 . "${srcdir=.}/init.sh"; path_prepend_ ../src mkdir a || framework_failure_ diff -Nru grep-3.1/tests/write-error-msg grep-3.3/tests/write-error-msg --- grep-3.1/tests/write-error-msg 2017-07-02 17:41:42.000000000 +0000 +++ grep-3.3/tests/write-error-msg 2018-04-21 23:35:48.000000000 +0000 @@ -1,7 +1,7 @@ #!/bin/sh # Ensure that output errors are reported with errno information. -# Copyright 2016-2017 Free Software Foundation, Inc. +# Copyright 2016-2018 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 @@ # 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 . +# along with this program. If not, see . . "${srcdir=.}/init.sh"; path_prepend_ ../src test -e /dev/full || skip_ your system lacks /dev/full diff -Nru grep-3.1/tests/yesno grep-3.3/tests/yesno --- grep-3.1/tests/yesno 2017-06-22 01:20:52.000000000 +0000 +++ grep-3.3/tests/yesno 2018-01-07 00:09:11.000000000 +0000 @@ -1,7 +1,7 @@ #! /bin/sh # Test feature interaction of -C, -v, -o, and -m. # -# Copyright (C) 2001, 2006, 2009-2017 Free Software Foundation, Inc. +# Copyright (C) 2001, 2006, 2009-2018 Free Software Foundation, Inc. # # Copying and distribution of this file, with or without modification, # are permitted in any medium without royalty provided the copyright diff -Nru grep-3.1/tests/z-anchor-newline grep-3.3/tests/z-anchor-newline --- grep-3.1/tests/z-anchor-newline 2017-01-01 11:34:33.000000000 +0000 +++ grep-3.3/tests/z-anchor-newline 2018-04-21 23:35:48.000000000 +0000 @@ -2,7 +2,7 @@ # grep -z with an anchor in the regex could mistakenly match text # including a newline. -# Copyright 2016-2017 Free Software Foundation, Inc. +# Copyright 2016-2018 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,7 +15,7 @@ # 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 . +# along with this program. If not, see . . "${srcdir=.}/init.sh"; path_prepend_ ../src diff -Nru grep-3.1/THANKS grep-3.3/THANKS --- grep-3.1/THANKS 2017-03-23 01:56:01.000000000 +0000 +++ grep-3.3/THANKS 2018-04-21 23:52:02.000000000 +0000 @@ -19,6 +19,7 @@ Benno Schulenberg bensberg@justemail.net Bernd Strieder strieder@student.uni-kl.de Bernhard Rosenkraenzer bero@arklinux.org +Bernhard Voelker mail@bernhard-voelker.de Bob Proulx rwp@hprwp.fc.hp.com Brian Youmans 3diff@gnu.org Bruno Haible bruno@clisp.org @@ -112,6 +113,7 @@ Standish Parsley adsspamtrap01@yahoo.com Stefano Lattarini stefano.lattarini@gmail.com Stepan Kasal kasal@ucw.cz +Stephan T. Lavavej stl@nuwen.net Stephane Chazelas stephane.chazelas@gmail.com Stewart Levin stew@sep.stanford.edu Strahinja Kustudic kustodian@gmail.com diff -Nru grep-3.1/TODO grep-3.3/TODO --- grep-3.1/TODO 2017-02-16 17:20:43.000000000 +0000 +++ grep-3.3/TODO 2018-04-21 23:35:48.000000000 +0000 @@ -1,6 +1,6 @@ Things to do for GNU grep - Copyright (C) 1992, 1997-2002, 2004-2017 Free Software Foundation, Inc. + Copyright (C) 1992, 1997-2002, 2004-2018 Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright @@ -83,10 +83,10 @@ handling [= =] and [. .]. For Unicode, interesting things to check include the Unicode Standard - and the Unicode Technical -Standard #18 ( “Unicode Regular + and the Unicode Technical +Standard #18 ( “Unicode Regular Expressions”). Talk to Bruno Haible who’s maintaining GNU libunistring. -See also Unicode Standard Annex #15 ( +See also Unicode Standard Annex #15 ( “Unicode Normalization Forms”), already implemented by GNU libunistring. In particular, --ignore-case needs to be evaluated against the standards. @@ -232,24 +232,24 @@ For this issue, interesting things to check in Unicode include: - The Unicode Standard, Chapter 3 - ( + ( “Conformance”), Section 3.13 (“Default Case Algorithms”) and the toCasefold() case conversion operation. - The Unicode Standard, Chapter 4 - ( + ( “Character Properties”), Section 4.2 (“Case”) and - the + the SpecialCasing.txt and - + CaseFolding.txt files. - The Unicode Standard, Chapter 5 - ( + ( “Implementation Guidelines”), Section 5.18 (“Case Mappings”), Subsection “Caseless Matching”. - - The Unicode case charts . + - The Unicode case charts . Unicode uses the