Imported Upstream version 2.7.1 upstream/2.7.1
authorDongHun Kwak <dh0128.kwak@samsung.com>
Thu, 20 Jan 2022 05:17:41 +0000 (14:17 +0900)
committerDongHun Kwak <dh0128.kwak@samsung.com>
Thu, 20 Jan 2022 05:17:41 +0000 (14:17 +0900)
45 files changed:
.tarball-version
.version
ChangeLog
Makefile.in
NEWS
README
aclocal.m4
build-aux/config.guess
build-aux/test-driver [deleted file]
build-aux/texinfo.tex
config.hin
configure
configure.ac
lib/Makefile.in
lib/gnulib.mk
lib/localcharset.c
lib/malloca.h
lib/xalloc-oversized.h
lib/xsize.c [new file with mode: 0644]
lib/xsize.h
m4/eealloc.m4
m4/gnulib-comp.m4
m4/sys_stat_h.m4
m4/xattr.m4
m4/xsize.m4
maint.mk
patch.man
src/Makefile.in
src/common.h
src/inp.c
src/patch.c
src/pch.c
src/pch.h
src/util.c
src/util.h
tests/Makefile.in
tests/bad-filenames
tests/concat-git-diff
tests/create-delete
tests/crlf-handling
tests/dash-o-append
tests/fifo
tests/mixed-patch-types
tests/reject-format
tests/symlinks

index 1effb003408e4b9fa74b8896ac710b81b6a2e12d..860487ca19cedeaf219ae3caca5e14df61c44f18 100644 (file)
@@ -1 +1 @@
-2.7
+2.7.1
index 1effb003408e4b9fa74b8896ac710b81b6a2e12d..860487ca19cedeaf219ae3caca5e14df61c44f18 100644 (file)
--- a/.version
+++ b/.version
@@ -1 +1 @@
-2.7
+2.7.1
index bac263287ed2748e908c76d6c259f61d449b8c00..cffe3837bb6617ddcb753b58533f3b2d552027d3 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,166 @@
+2012-09-28  Andreas Gruenbacher  <agruen@linbit.com>
+
+       Version 2.7.1
+
+       build: update gnulib submodule to latest
+
+       Repair 'backup of unmodified file' test
+       tests/create-delete: Repair 'backup of unmodified file' test.
+
+       Use gnulib errno module instead of our own default ENOTSUP fallback
+       * bootstrap.conf (gnulib_modules): Add errno module.
+       * src/common.h: Remove ENOTSUP fallback.
+
+       Trailing whitespace fix
+       * NEWS: Trailing whitespace fix.
+
+2012-09-26  Andreas Gruenbacher  <agruen@linbit.com>
+
+       Improve the previous commit
+       * src/patch.c: Only print the "file is not empty after patch" message when
+       trying to delete the output file.  Say that we were trying to delete the file.
+       * tests/create-delete: Fix the expected messages.  Add test cases for the
+       --remove-empty-files and --posix options.
+       * NEWS: Better describe this change.
+
+2012-09-25  Andreas Gruenbacher  <agruen@linbit.com>
+
+       Only expect files to become empty if the patch says so
+       Test cases based on patches from Dmitry V. Levin <ldv@altlinux.org>.
+       * src/patch.c (main): Only expect files to become empty if the patch says so.
+       * NEWS: Document this change.
+       * tests/create-delete: Add (more) empty vs. non-empty test cases.
+
+2012-09-22  Jim Meyering  <meyering@redhat.com>
+
+       build: avoid gcc warnings from -Wsuggest-attribute=format
+       * configure.ac (WARN_CFLAGS): Disable -Wsuggest-attribute=format,
+       to avoid some warnings that are not worth working around.
+
+2012-09-22  Andreas Gruenbacher  <agruen@linbit.com>
+
+       Update NEWS
+       * NEWS: Update.
+
+       Improve messages when in --dry-run mode
+       * src/patch.c (main): Say that we are checking a file and not that we are
+       patching it in --dry-run mode.  Don't say "saving rejects to file" when we
+       don't create reject files.
+       * tests/reject-format: Add rejects with --dry-run test case.
+       * tests/bad-filenames, tests/fifo, tests/mixed-patch-types: Update.
+
+       Improve handling of LF vs. CRLF line endings
+       * src/patch.c (check_line_endings): New function.
+       (main): When a hunk fails, report when the line endings differ between the
+       input file and the patch.
+       * src/pch.c (there_is_another_patch): When saying that we strip trailing CRs,
+       also say how to turn this off.
+       * tests/crlf-handling: Update changed messages.  Add test case that fails.
+
+       Ignore when preserving extended attributes is not supported or allowed
+       * src/common.h (ENOTSUP): Make sure this error code is defined.
+       * src/util.c (set_file_attributes): Ignore ENOSYS, ENOTSUP, and EPERM errors.
+
+2012-09-20  Andreas Gruenbacher  <agruen@linbit.com>
+
+       Add a missing explanation in the tests/crlf-handling test case
+       * tests/crlf-handling: Add explanation.
+
+2012-09-19  Andreas Gruenbacher  <agruen@linbit.com>
+
+       Add --follow-symlinks option for backwards compatibility
+       * src/common.h (follow_symlinks): New variable.
+       * src/patch.c (longopts): Add new --follow-symlinks option.
+       (get_some_switches): Recognize the new option.
+       * src/util.c (stat_file): Follow symlinks if requested.
+       * patch.man: Document the new option.
+       * tests/symlinks: Add test case.
+
+       Introduce function to lstat all input files
+       * src/util.c (stat_file): New function.
+       (move_file): Use here.
+       * src/util.h (stat_file): Declare here.
+       * src/inp.c (get_input_file): Use here.
+       * src/patch.c (main): Use here.
+       (delete_file_later): Use here.
+       * src/pch.c (there_is_another_patch): Use here.
+       (intuit_diff_type): Use here.
+
+       Use stat where we want to follow symlinks
+       * src/pch.c (prefix_components): Follow symlinks.
+       (cwd_is_root): Follow symlinks.
+
+       Document command-line options in alphabetic order
+       * patch.man: The options are mostly listen in alphabetical order; stick to
+       that.
+
+2012-09-18  Andreas Gruenbacher  <agruen@linbit.com>
+
+       Fix file truncation when switching from git diff to non-git diff
+       * src/patch.c (main): Output queued output files only when switching from a git
+       diff to a non-git diff.  This can modify the input file, so make sure to
+       stat() it again.
+       * tests/concat-git-diff: Add test case growing a file with a git diff and then
+       with a non-git diff; without this fix; the result would be truncated.
+
+       Rename get_input_file() parameter to clarify code
+       * src/inp.c (get_input_file): Rename mode parameter to file_type, it's all we
+       care about here.
+
+       Improve error message when patching a file of different type
+       * src/inp.c (get_input_file): Improve error message when patching a file of
+       different type.
+       * tests/symlinks: Update test case.
+
+       Minor test case updates
+       * tests/dash-o-append: Minor update (still expected to fail).
+       * tests/symlinks: Minor update.
+
+2012-09-17  Andreas Gruenbacher  <agruen@linbit.com>
+
+       Disable xattrs if libattr doesn't implement attr_copy_action()
+       * m4/xattr.m4 (gl_FUNC_XATTR): Only enable USE_XATTR if both attr_copy_file()
+       and attr_copy_action() are defined.
+       * src/util.c (copy_attr_check): No fallback needed if attr_copy_action() is not
+       defined.
+
+       Allow to use potentially dangerous filenames from the root directory
+       * src/pch.c (cwd_is_root): New function to check if we are in the root
+       directory of a filename.
+       (name_is_valid): Allow to use potentially dangerous filenames when the current
+       working directory is the root directory: from there, those names are not
+       any more dangerous than other names.
+       * tests/bad-filenames: New test case.
+
+2012-09-14  Andreas Gruenbacher  <agruen@linbit.com>
+
+       Update leftover license notice in README
+       * README: Change leftover GPLv2 license notice to GPLv3.
+
+       Check if libattr implements attr_copy_action()
+       * m4/xattr.m4 (gl_FUNC_XATTR): Check if attr_copy_action() is defined.
+       * src/util.c: If attr_copy_action() doesn't exist, fall back to the default
+       copy_attr_file() behavior of copying most extended attributes except ACLs.
+
+2012-09-13  Andreas Gruenbacher  <agruen@linbit.com>
+
+       Change the type of *_needs_removal from int to bool
+
+       In a git-style diff, make sure not to unlink the original by accident
+       * src/patch.c (main): Fail if a file is not empty as expected.
+       (output_files): In a git-style diff, make sure not to unlink the original when
+       making a backup of an unmodified file.
+       * tests/create-delete: Fix failed-file-deletion test and add
+       successful-file-deletion test.
+
+       Do not pass file type in mode of open(..., O_CREAT, mode)
+       * src/patch.c (main): Strip file type off of create mode for temporary output
+       files: some systems don't ignore the file type; we want to create a regular
+       file even when patching a symlink.
+
+       Add note on GPLv3 license change in version 2.6
+       * NEWS: Add note.
+
 2012-09-12  Andreas Gruenbacher  <agruen@linbit.com>
 
        Version 2.7
index 478dd40a4e725cddc09f96652a457487a0016d9a..17de20fba12f906111791d4a0f999573d2daae2e 100644 (file)
@@ -1,8 +1,9 @@
-# Makefile.in generated by automake 1.12.2 from Makefile.am.
+# Makefile.in generated by automake 1.11.6 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2012 Free Software Foundation, Inc.
-
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+# Foundation, Inc.
 # This Makefile.in 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,12 +69,8 @@ host_triplet = @host@
 subdir = .
 DIST_COMMON = README $(am__configure_deps) $(dist_man1_MANS) \
        $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
-       $(srcdir)/config.hin $(top_srcdir)/build-aux/ar-lib \
-       $(top_srcdir)/build-aux/config.guess \
-       $(top_srcdir)/build-aux/config.sub \
-       $(top_srcdir)/build-aux/install-sh \
-       $(top_srcdir)/build-aux/missing $(top_srcdir)/configure \
-       AUTHORS COPYING ChangeLog INSTALL NEWS TODO build-aux/ar-lib \
+       $(srcdir)/config.hin $(top_srcdir)/configure AUTHORS COPYING \
+       ChangeLog INSTALL NEWS TODO build-aux/ar-lib \
        build-aux/config.guess build-aux/config.rpath \
        build-aux/config.sub build-aux/depcomp build-aux/install-sh \
        build-aux/mdate-sh build-aux/missing build-aux/texinfo.tex \
@@ -153,18 +150,12 @@ mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = config.h
 CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
-AM_V_P = $(am__v_P_@AM_V@)
-am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
-am__v_P_0 = false
-am__v_P_1 = :
 AM_V_GEN = $(am__v_GEN_@AM_V@)
 am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
-am__v_GEN_0 = @echo "  GEN     " $@;
-am__v_GEN_1 = 
+am__v_GEN_0 = @echo "  GEN   " $@;
 AM_V_at = $(am__v_at_@AM_V@)
 am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
 am__v_at_0 = @
-am__v_at_1 = 
 SOURCES =
 DIST_SOURCES =
 RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
@@ -214,10 +205,9 @@ RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive    \
   distclean-recursive maintainer-clean-recursive
 AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
        $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
-       cscope distdir dist dist-all distcheck
+       distdir dist dist-all distcheck
 ETAGS = etags
 CTAGS = ctags
-CSCOPE = cscope
 DIST_SUBDIRS = $(SUBDIRS)
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 distdir = $(PACKAGE)-$(VERSION)
@@ -228,7 +218,6 @@ am__remove_distdir = \
       && rm -rf "$(distdir)" \
       || { sleep 5 && rm -rf "$(distdir)"; }; \
   else :; fi
-am__post_remove_distdir = $(am__remove_distdir)
 am__relativize = \
   dir0=`pwd`; \
   sed_first='s,^\([^/]*\)/.*$$,\1,'; \
@@ -256,7 +245,6 @@ am__relativize = \
   reldir="$$dir2"
 DIST_ARCHIVES = $(distdir).tar.gz $(distdir).tar.bz2 $(distdir).tar.xz
 GZIP_ENV = --best
-DIST_TARGETS = dist-xz dist-bzip2 dist-gzip
 distuninstallcheck_listfiles = find . -type f -print
 am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \
   | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$'
@@ -1157,12 +1145,12 @@ uninstall-man1:
        dir='$(DESTDIR)$(man1dir)'; $(am__uninstall_files_from_dir)
 
 # This directory's subdirectories are mostly independent; you can cd
-# into them and run 'make' without going through this Makefile.
-# To change the values of 'make' variables: instead of editing Makefiles,
-# (1) if the variable is set in 'config.status', edit 'config.status'
-#     (which will cause the Makefiles to be regenerated when you run 'make');
-# (2) otherwise, pass the desired values on the 'make' command line.
-$(RECURSIVE_TARGETS) $(RECURSIVE_CLEAN_TARGETS):
+# into them and run `make' without going through this Makefile.
+# To change the values of `make' variables: instead of editing Makefiles,
+# (1) if the variable is set in `config.status', edit `config.status'
+#     (which will cause the Makefiles to be regenerated when you run `make');
+# (2) otherwise, pass the desired values on the `make' command line.
+$(RECURSIVE_TARGETS):
        @fail= failcom='exit 1'; \
        for f in x $$MAKEFLAGS; do \
          case $$f in \
@@ -1172,11 +1160,7 @@ $(RECURSIVE_TARGETS) $(RECURSIVE_CLEAN_TARGETS):
        done; \
        dot_seen=no; \
        target=`echo $@ | sed s/-recursive//`; \
-       case "$@" in \
-         distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
-         *) list='$(SUBDIRS)' ;; \
-       esac; \
-       for subdir in $$list; do \
+       list='$(SUBDIRS)'; for subdir in $$list; do \
          echo "Making $$target in $$subdir"; \
          if test "$$subdir" = "."; then \
            dot_seen=yes; \
@@ -1190,6 +1174,37 @@ $(RECURSIVE_TARGETS) $(RECURSIVE_CLEAN_TARGETS):
        if test "$$dot_seen" = "no"; then \
          $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
        fi; test -z "$$fail"
+
+$(RECURSIVE_CLEAN_TARGETS):
+       @fail= failcom='exit 1'; \
+       for f in x $$MAKEFLAGS; do \
+         case $$f in \
+           *=* | --[!k]*);; \
+           *k*) failcom='fail=yes';; \
+         esac; \
+       done; \
+       dot_seen=no; \
+       case "$@" in \
+         distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+         *) list='$(SUBDIRS)' ;; \
+       esac; \
+       rev=''; for subdir in $$list; do \
+         if test "$$subdir" = "."; then :; else \
+           rev="$$subdir $$rev"; \
+         fi; \
+       done; \
+       rev="$$rev ."; \
+       target=`echo $@ | sed s/-recursive//`; \
+       for subdir in $$rev; do \
+         echo "Making $$target in $$subdir"; \
+         if test "$$subdir" = "."; then \
+           local_target="$$target-am"; \
+         else \
+           local_target="$$target"; \
+         fi; \
+         ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+         || eval $$failcom; \
+       done && test -z "$$fail"
 tags-recursive:
        list='$(SUBDIRS)'; for subdir in $$list; do \
          test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
@@ -1198,10 +1213,6 @@ ctags-recursive:
        list='$(SUBDIRS)'; for subdir in $$list; do \
          test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
        done
-cscopelist-recursive:
-       list='$(SUBDIRS)'; for subdir in $$list; do \
-         test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) cscopelist); \
-       done
 
 ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
        list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
@@ -1265,32 +1276,8 @@ GTAGS:
          && $(am__cd) $(top_srcdir) \
          && gtags -i $(GTAGS_ARGS) "$$here"
 
-cscope: cscope.files
-       test ! -s cscope.files \
-         || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS)
-
-clean-cscope:
-       -rm -f cscope.files
-
-cscope.files: clean-cscope cscopelist-recursive cscopelist
-
-cscopelist: cscopelist-recursive $(HEADERS) $(SOURCES) $(LISP)
-       list='$(SOURCES) $(HEADERS) $(LISP)'; \
-       case "$(srcdir)" in \
-         [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
-         *) sdir=$(subdir)/$(srcdir) ;; \
-       esac; \
-       for i in $$list; do \
-         if test -f "$$i"; then \
-           echo "$(subdir)/$$i"; \
-         else \
-           echo "$$sdir/$$i"; \
-         fi; \
-       done >> $(top_builddir)/cscope.files
-
 distclean-tags:
        -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-       -rm -f cscope.out cscope.in.out cscope.po.out cscope.files
 
 distdir: $(DISTFILES)
        @list='$(MANS)'; if test -n "$$list"; then \
@@ -1299,10 +1286,10 @@ distdir: $(DISTFILES)
            if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \
          if test -n "$$list" && \
            grep 'ab help2man is required to generate this page' $$list >/dev/null; then \
-           echo "error: found man pages containing the 'missing help2man' replacement text:" >&2; \
+           echo "error: found man pages containing the \`missing help2man' replacement text:" >&2; \
            grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/         /' >&2; \
            echo "       to fix them, install help2man, remove and regenerate the man pages;" >&2; \
-           echo "       typically 'make maintainer-clean' will remove them" >&2; \
+           echo "       typically \`make maintainer-clean' will remove them" >&2; \
            exit 1; \
          else :; fi; \
        else :; fi
@@ -1374,34 +1361,40 @@ distdir: $(DISTFILES)
        || chmod -R a+r "$(distdir)"
 dist-gzip: distdir
        tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
-       $(am__post_remove_distdir)
+       $(am__remove_distdir)
 dist-bzip2: distdir
        tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2
-       $(am__post_remove_distdir)
+       $(am__remove_distdir)
 
 dist-lzip: distdir
        tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz
-       $(am__post_remove_distdir)
+       $(am__remove_distdir)
+
+dist-lzma: distdir
+       tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma
+       $(am__remove_distdir)
 dist-xz: distdir
        tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz
-       $(am__post_remove_distdir)
+       $(am__remove_distdir)
 
 dist-tarZ: distdir
        tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
-       $(am__post_remove_distdir)
+       $(am__remove_distdir)
 
 dist-shar: distdir
        shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
-       $(am__post_remove_distdir)
+       $(am__remove_distdir)
 
 dist-zip: distdir
        -rm -f $(distdir).zip
        zip -rq $(distdir).zip $(distdir)
-       $(am__post_remove_distdir)
+       $(am__remove_distdir)
 
-dist dist-all:
-       $(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:'
-       $(am__post_remove_distdir)
+dist dist-all: distdir
+       tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
+       tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2
+       tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz
+       $(am__remove_distdir)
 
 # This target untars the dist file and tries a VPATH configuration.  Then
 # it guarantees that the distribution is self-contained by making another
@@ -1412,6 +1405,8 @@ distcheck: dist
          GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\
        *.tar.bz2*) \
          bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
+       *.tar.lzma*) \
+         lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\
        *.tar.lz*) \
          lzip -dc $(distdir).tar.lz | $(am__untar) ;;\
        *.tar.xz*) \
@@ -1457,7 +1452,7 @@ distcheck: dist
          && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \
          && cd "$$am__cwd" \
          || exit 1
-       $(am__post_remove_distdir)
+       $(am__remove_distdir)
        @(echo "$(distdir) archives ready for distribution: "; \
          list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
          sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
@@ -1600,25 +1595,25 @@ uninstall-am: uninstall-man
 uninstall-man: uninstall-man1
 
 .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all check \
-       cscopelist-recursive ctags-recursive install install-am \
-       install-strip tags-recursive
+       ctags-recursive install install-am install-strip \
+       tags-recursive
 
 .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
-       all all-am am--refresh check check-am clean clean-cscope \
-       clean-generic cscope cscopelist cscopelist-recursive ctags \
-       ctags-recursive dist dist-all dist-bzip2 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-man1 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-recursive \
-       uninstall uninstall-am uninstall-man uninstall-man1
+       all all-am am--refresh check check-am clean clean-generic \
+       ctags ctags-recursive dist dist-all dist-bzip2 dist-gzip \
+       dist-hook dist-lzip dist-lzma 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-man1 \
+       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-recursive uninstall uninstall-am uninstall-man \
+       uninstall-man1
 
 $(top_srcdir)/.version:
        echo $(VERSION) > $@-t && mv $@-t $@
diff --git a/NEWS b/NEWS
index 997a7269090a3b84c6a498c3594a80675a3e2b43..28d0e91317c137c502591414d97bd8b0be18368f 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,20 @@
+Changes in version 2.7.1:
+
+* Two critical bug fixes in the "diff --git" format support.
+* Clarify the message printed when a patch is expected to empty out and delete
+  a file, but the file does not become empty.
+* Various improvements to messages when applying a patch to a file of different
+  type (regular file vs. symlink), when there are line ending differences (LF
+  vs. CRLF), and when in --dry-run mode.
+* When in the root directory, allow file names that are absolute or that
+  contain a component of "..".
+* New --follow-symlinks option to allow to treat symlinks as files: this was
+  patch's behavior before version 2.7.
+* Ignore when extended attributes cannot be preserved because they are
+  unsupported or because permission to set them is denied.
+* License clarifications in NEWS and README.
+* Portability bug fixes.
+
 Changes in version 2.7:
 
 * Patch no longer gets a failed assertion for certain mangled patches.
@@ -80,6 +97,7 @@ Changes in version 2.6:
   particularly with Perforce.)
 * Handle missing timestamps better.
 * Various bug fixes.
+* Switch to GNU General Public License version 3.
 
 Changes in versions 2.5.8 and 2.5.9: bug fixes only.
 
diff --git a/README b/README
index 9da2bcd0b3fbc7fb7467ffbee866c5cac9cbe1fa..c206370d7543f533e5049bbc8b0bffbce3ed8a41 100644 (file)
--- a/README
+++ b/README
@@ -50,15 +50,13 @@ Foundation, Inc.
 
 This program is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2, or (at your option)
-any later version.
+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.
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
 
 You should have received a copy of the GNU General Public License
-along with this file; see the file COPYING.
-If not, write to the Free Software Foundation,
-51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+along with this program.  If not, see <http://www.gnu.org/licenses/>.
index cbe2e8b800cd34b960e4c9849438b753960a0570..c6236805b6afec03ed8a6ce896c7ab9ea6cc177f 100644 (file)
@@ -1,7 +1,8 @@
-# generated automatically by aclocal 1.12.2 -*- Autoconf -*-
-
-# Copyright (C) 1996-2012 Free Software Foundation, Inc.
+# generated automatically by aclocal 1.11.6 -*- Autoconf -*-
 
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+# 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation,
+# Inc.
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -17,7 +18,7 @@ m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],,
 [m4_warning([this file was generated for autoconf 2.68.
 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'.])])
+To do so, use the procedure documented by the package, typically `autoreconf'.])])
 
 # po.m4 serial 17 (gettext-0.18)
 dnl Copyright (C) 1995-2010 Free Software Foundation, Inc.
@@ -469,13 +470,14 @@ AC_DEFUN([AM_XGETTEXT_OPTION],
   XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS $1"
 ])
 
-# Copyright (C) 2002-2012 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008, 2011 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 8
+# serial 1
 
 # AM_AUTOMAKE_VERSION(VERSION)
 # ----------------------------
@@ -483,10 +485,10 @@ AC_DEFUN([AM_XGETTEXT_OPTION],
 # 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.12'
+[am__api_version='1.11'
 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.12.2], [],
+m4_if([$1], [1.11.6], [],
       [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
 ])
 
@@ -502,12 +504,12 @@ m4_define([_AM_AUTOCONF_VERSION], [])
 # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
 # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
-[AM_AUTOMAKE_VERSION([1.12.2])dnl
+[AM_AUTOMAKE_VERSION([1.11.6])dnl
 m4_ifndef([AC_AUTOCONF_VERSION],
   [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
 _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
 
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -570,17 +572,17 @@ AC_SUBST([AR])dnl
 
 # AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
 
-# Copyright (C) 2001-2012 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2003, 2005, 2011 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 2
+# serial 1
 
 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
-# $ac_aux_dir to '$srcdir/foo'.  In other projects, it is set to
-# '$srcdir', '$srcdir/..', or '$srcdir/../..'.
+# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
+# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
 #
 # Of course, Automake must honor this variable whenever it calls a
 # tool from the auxiliary directory.  The problem is that $srcdir (and
@@ -599,7 +601,7 @@ AC_SUBST([AR])dnl
 #
 # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
 # are both prefixed by $srcdir.  In an in-source build this is usually
-# harmless because $srcdir is '.', but things will broke when you
+# harmless because $srcdir is `.', but things will broke when you
 # start a VPATH build or use an absolute $srcdir.
 #
 # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
@@ -625,21 +627,22 @@ am_aux_dir=`cd $ac_aux_dir && pwd`
 
 # AM_CONDITIONAL                                            -*- Autoconf -*-
 
-# Copyright (C) 1997-2012 Free Software Foundation, Inc.
+# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
+# 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 10
+# serial 9
 
 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
 # -------------------------------------
 # Define a conditional.
 AC_DEFUN([AM_CONDITIONAL],
-[AC_PREREQ([2.52])dnl
m4_if([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
-       [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
+[AC_PREREQ(2.52)dnl
ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
+       [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
 AC_SUBST([$1_TRUE])dnl
 AC_SUBST([$1_FALSE])dnl
 _AM_SUBST_NOTMAKE([$1_TRUE])dnl
@@ -658,15 +661,16 @@ AC_CONFIG_COMMANDS_PRE(
 Usually this means the macro was only invoked conditionally.]])
 fi])])
 
-# Copyright (C) 1999-2012 Free Software Foundation, Inc.
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009,
+# 2010, 2011 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 17
+# serial 12
 
-# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be
+# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
 # written in clear, in which case automake, when reading aclocal.m4,
 # will think it sees a *use*, and therefore will trigger all it's
 # C support machinery.  Also note that it means that autoscan, seeing
@@ -676,7 +680,7 @@ fi])])
 # _AM_DEPENDENCIES(NAME)
 # ----------------------
 # See how the compiler implements dependency checking.
-# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC".
+# NAME is "CC", "CXX", "GCJ", or "OBJC".
 # We try a few techniques and use that to set a single cache variable.
 #
 # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
@@ -689,13 +693,12 @@ AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
 AC_REQUIRE([AM_MAKE_INCLUDE])dnl
 AC_REQUIRE([AM_DEP_TRACK])dnl
 
-m4_if([$1], [CC],   [depcc="$CC"   am_compiler_list=],
-      [$1], [CXX],  [depcc="$CXX"  am_compiler_list=],
-      [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
-      [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'],
-      [$1], [UPC],  [depcc="$UPC"  am_compiler_list=],
-      [$1], [GCJ],  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
-                    [depcc="$$1"   am_compiler_list=])
+ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
+       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
+       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
+       [$1], UPC,  [depcc="$UPC"  am_compiler_list=],
+       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
+                   [depcc="$$1"   am_compiler_list=])
 
 AC_CACHE_CHECK([dependency style of $depcc],
                [am_cv_$1_dependencies_compiler_type],
@@ -703,8 +706,8 @@ AC_CACHE_CHECK([dependency style of $depcc],
   # We make a subdir and do the tests there.  Otherwise we can end up
   # making bogus files that we don't know about and never remove.  For
   # instance it was reported that on HP-UX the gcc test will end up
-  # making a dummy file named 'D' -- because '-MD' means "put the output
-  # in D".
+  # making a dummy file named `D' -- because `-MD' means `put the output
+  # in D'.
   rm -rf conftest.dir
   mkdir conftest.dir
   # Copy depcomp to subdir because otherwise we won't find it if we're
@@ -744,16 +747,16 @@ AC_CACHE_CHECK([dependency style of $depcc],
     : > sub/conftest.c
     for i in 1 2 3 4 5 6; do
       echo '#include "conftst'$i'.h"' >> sub/conftest.c
-      # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
-      # Solaris 10 /bin/sh.
-      echo '/* dummy */' > sub/conftst$i.h
+      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+      # Solaris 8's {/usr,}/bin/sh.
+      touch sub/conftst$i.h
     done
     echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
 
-    # We check with '-c' and '-o' for the sake of the "dashmstdout"
+    # We check with `-c' and `-o' for the sake of the "dashmstdout"
     # mode.  It turns out that the SunPro C++ compiler does not properly
-    # handle '-M -o', and we need to detect this.  Also, some Intel
-    # versions had trouble with output in subdirs.
+    # handle `-M -o', and we need to detect this.  Also, some Intel
+    # versions had trouble with output in subdirs
     am__obj=sub/conftest.${OBJEXT-o}
     am__minus_obj="-o $am__obj"
     case $depmode in
@@ -762,8 +765,8 @@ AC_CACHE_CHECK([dependency style of $depcc],
       test "$am__universal" = false || continue
       ;;
     nosideeffect)
-      # After this tag, mechanisms are not by side-effect, so they'll
-      # only be used when explicitly requested.
+      # after this tag, mechanisms are not by side-effect, so they'll
+      # only be used when explicitly requested
       if test "x$enable_dependency_tracking" = xyes; then
        continue
       else
@@ -771,7 +774,7 @@ AC_CACHE_CHECK([dependency style of $depcc],
       fi
       ;;
     msvc7 | msvc7msys | msvisualcpp | msvcmsys)
-      # This compiler won't grok '-c -o', but also, the minuso test has
+      # This compiler won't grok `-c -o', but also, the minuso test has
       # not run yet.  These depmodes are late enough in the game, and
       # so weak that their functioning should not be impacted.
       am__obj=conftest.${OBJEXT-o}
@@ -819,7 +822,7 @@ AM_CONDITIONAL([am__fastdep$1], [
 # AM_SET_DEPDIR
 # -------------
 # Choose a directory name for dependency files.
-# This macro is AC_REQUIREd in _AM_DEPENDENCIES.
+# This macro is AC_REQUIREd in _AM_DEPENDENCIES
 AC_DEFUN([AM_SET_DEPDIR],
 [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
 AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
@@ -829,13 +832,9 @@ AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
 # AM_DEP_TRACK
 # ------------
 AC_DEFUN([AM_DEP_TRACK],
-[AC_ARG_ENABLE([dependency-tracking], [dnl
-AS_HELP_STRING(
-  [--enable-dependency-tracking],
-  [do not reject slow dependency extractors])
-AS_HELP_STRING(
-  [--disable-dependency-tracking],
-  [speeds up one-time build])])
+[AC_ARG_ENABLE(dependency-tracking,
+[  --disable-dependency-tracking  speeds up one-time build
+  --enable-dependency-tracking   do not reject slow dependency extractors])
 if test "x$enable_dependency_tracking" != xno; then
   am_depcomp="$ac_aux_dir/depcomp"
   AMDEPBACKSLASH='\'
@@ -850,13 +849,14 @@ _AM_SUBST_NOTMAKE([am__nodep])dnl
 
 # Generate code to set up dependency tracking.              -*- Autoconf -*-
 
-# Copyright (C) 1999-2012 Free Software Foundation, Inc.
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
+# 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 6
+#serial 5
 
 # _AM_OUTPUT_DEPENDENCY_COMMANDS
 # ------------------------------
@@ -875,7 +875,7 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
     # Strip MF so we end up with the name of the file.
     mf=`echo "$mf" | sed -e 's/:.*$//'`
     # Check whether this is an Automake generated Makefile or not.
-    # We used to match only the files named 'Makefile.in', but
+    # We used to match only the files named `Makefile.in', but
     # some people rename them; so instead we look at the file content.
     # Grep'ing the first line is not enough: some people post-process
     # each Makefile.in and add a new line on top of each file to say so.
@@ -887,19 +887,21 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
       continue
     fi
     # Extract the definition of DEPDIR, am__include, and am__quote
-    # from the Makefile without running 'make'.
+    # from the Makefile without running `make'.
     DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
     test -z "$DEPDIR" && continue
     am__include=`sed -n 's/^am__include = //p' < "$mf"`
     test -z "am__include" && continue
     am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+    # When using ansi2knr, U may be empty or an underscore; expand it
+    U=`sed -n 's/^U = //p' < "$mf"`
     # Find all dependency output files, they are included files with
     # $(DEPDIR) in their names.  We invoke sed twice because it is the
     # simplest approach to changing $(DEPDIR) to its actual value in the
     # expansion.
     for file in `sed -n "
       s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
-        sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
+        sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
       # Make sure the directory exists.
       test -f "$dirpart/$file" && continue
       fdir=`AS_DIRNAME(["$file"])`
@@ -917,7 +919,7 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
 # This macro should only be invoked once -- use via AC_REQUIRE.
 #
 # This code is only required when automatic dependency tracking
-# is enabled.  FIXME.  This creates each '.P' file that we will
+# is enabled.  FIXME.  This creates each `.P' file that we will
 # need in order to bootstrap the dependency handling code.
 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
 [AC_CONFIG_COMMANDS([depfiles],
@@ -927,13 +929,14 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
 
 # Do all the work for Automake.                             -*- Autoconf -*-
 
-# Copyright (C) 1996-2012 Free Software Foundation, Inc.
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+# 2005, 2006, 2008, 2009 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 19
+# serial 16
 
 # This macro actually does too much.  Some checks are only needed if
 # your package does certain things.  But this isn't really a big deal.
@@ -979,41 +982,31 @@ AC_SUBST([CYGPATH_W])
 # Define the identity of the package.
 dnl Distinguish between old-style and new-style calls.
 m4_ifval([$2],
-[AC_DIAGNOSE([obsolete],
-[$0: two- and three-arguments forms are deprecated.  For more info, see:
-http://www.gnu.org/software/automake/manual/automake.html#Modernize-AM_INIT_AUTOMAKE-invocation])
-m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
+[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
  AC_SUBST([PACKAGE], [$1])dnl
  AC_SUBST([VERSION], [$2])],
 [_AM_SET_OPTIONS([$1])dnl
 dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
-m4_if(
-  m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]),
-  [ok:ok],,
+m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
   [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
  AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
  AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
 
 _AM_IF_OPTION([no-define],,
-[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package])
- AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl
+[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
+ AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
 
 # Some tools Automake needs.
 AC_REQUIRE([AM_SANITY_CHECK])dnl
 AC_REQUIRE([AC_ARG_PROGRAM])dnl
-AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}])
-AM_MISSING_PROG([AUTOCONF], [autoconf])
-AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}])
-AM_MISSING_PROG([AUTOHEADER], [autoheader])
-AM_MISSING_PROG([MAKEINFO], [makeinfo])
+AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
+AM_MISSING_PROG(AUTOCONF, autoconf)
+AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
+AM_MISSING_PROG(AUTOHEADER, autoheader)
+AM_MISSING_PROG(MAKEINFO, makeinfo)
 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:
-# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
-# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
-AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
+AC_REQUIRE([AM_PROG_MKDIR_P])dnl
 # We need awk for the "check" target.  The system "awk" is bad on
 # some platforms.
 AC_REQUIRE([AC_PROG_AWK])dnl
@@ -1024,35 +1017,28 @@ _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
                             [_AM_PROG_TAR([v7])])])
 _AM_IF_OPTION([no-dependencies],,
 [AC_PROVIDE_IFELSE([AC_PROG_CC],
-                 [_AM_DEPENDENCIES([CC])],
-                 [m4_define([AC_PROG_CC],
-                            m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl
+                 [_AM_DEPENDENCIES(CC)],
+                 [define([AC_PROG_CC],
+                         defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
 AC_PROVIDE_IFELSE([AC_PROG_CXX],
-                 [_AM_DEPENDENCIES([CXX])],
-                 [m4_define([AC_PROG_CXX],
-                            m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl
+                 [_AM_DEPENDENCIES(CXX)],
+                 [define([AC_PROG_CXX],
+                         defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
 AC_PROVIDE_IFELSE([AC_PROG_OBJC],
-                 [_AM_DEPENDENCIES([OBJC])],
-                 [m4_define([AC_PROG_OBJC],
-                            m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl
-dnl Support for Objective C++ was only introduced in Autoconf 2.65,
-dnl but we still cater to Autoconf 2.62.
-m4_ifdef([AC_PROG_OBJCXX],
-[AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
-                 [_AM_DEPENDENCIES([OBJCXX])],
-                 [m4_define([AC_PROG_OBJCXX],
-                            m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])])dnl
+                 [_AM_DEPENDENCIES(OBJC)],
+                 [define([AC_PROG_OBJC],
+                         defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
 ])
 _AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
-dnl The 'parallel-tests' driver may need to know about EXEEXT, so add the
-dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This macro
+dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
+dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This macro
 dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
 AC_CONFIG_COMMANDS_PRE(dnl
 [m4_provide_if([_AM_COMPILER_EXEEXT],
   [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
 ])
 
-dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
+dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
 dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
 dnl mangled by Autoconf and run in a shell conditional statement.
 m4_define([_AC_COMPILER_EXEEXT],
@@ -1080,13 +1066,14 @@ for _am_header in $config_headers :; do
 done
 echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
 
-# Copyright (C) 2001-2012 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2003, 2005, 2008, 2011 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 8
+# serial 1
 
 # AM_PROG_INSTALL_SH
 # ------------------
@@ -1101,9 +1088,9 @@ if test x"${install_sh}" != xset; then
     install_sh="\${SHELL} $am_aux_dir/install-sh"
   esac
 fi
-AC_SUBST([install_sh])])
+AC_SUBST(install_sh)])
 
-# Copyright (C) 2003-2012 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2005  Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -1126,13 +1113,13 @@ AC_SUBST([am__leading_dot])])
 
 # Check to see how 'make' treats includes.                 -*- Autoconf -*-
 
-# Copyright (C) 2001-2012 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2003, 2005, 2009  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 5
+# serial 4
 
 # AM_MAKE_INCLUDE()
 # -----------------
@@ -1151,7 +1138,7 @@ am__quote=
 _am_result=none
 # First try GNU make style include.
 echo "include confinc" > confmf
-# Ignore all kinds of additional output from 'make'.
+# Ignore all kinds of additional output from `make'.
 case `$am_make -s -f confmf 2> /dev/null` in #(
 *the\ am__doit\ target*)
   am__include=include
@@ -1178,13 +1165,14 @@ rm -f confinc confmf
 
 # Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
 
-# Copyright (C) 1997-2012 Free Software Foundation, Inc.
+# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
+# 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 7
+# serial 6
 
 # AM_MISSING_PROG(NAME, PROGRAM)
 # ------------------------------
@@ -1214,19 +1202,49 @@ if eval "$MISSING --run true"; then
   am_missing_run="$MISSING --run "
 else
   am_missing_run=
-  AC_MSG_WARN(['missing' script is too old or missing])
+  AC_MSG_WARN([`missing' script is too old or missing])
 fi
 ])
 
+# Copyright (C) 2003, 2004, 2005, 2006, 2011 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 1
+
+# AM_PROG_MKDIR_P
+# ---------------
+# Check for `mkdir -p'.
+AC_DEFUN([AM_PROG_MKDIR_P],
+[AC_PREREQ([2.60])dnl
+AC_REQUIRE([AC_PROG_MKDIR_P])dnl
+dnl Automake 1.8 to 1.9.6 used to define mkdir_p.  We now use MKDIR_P,
+dnl while keeping a definition of mkdir_p for backward compatibility.
+dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
+dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
+dnl Makefile.ins that do not define MKDIR_P, so we do our own
+dnl adjustment using top_builddir (which is defined more often than
+dnl MKDIR_P).
+AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
+case $mkdir_p in
+  [[\\/$]]* | ?:[[\\/]]*) ;;
+  */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
+esac
+])
+
 # Helper functions for option handling.                     -*- Autoconf -*-
 
-# Copyright (C) 2001-2012 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2003, 2005, 2008, 2010 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 6
+# serial 5
 
 # _AM_MANGLE_OPTION(NAME)
 # -----------------------
@@ -1237,7 +1255,7 @@ AC_DEFUN([_AM_MANGLE_OPTION],
 # --------------------
 # Set option NAME.  Presently that only means defining a flag for this option.
 AC_DEFUN([_AM_SET_OPTION],
-[m4_define(_AM_MANGLE_OPTION([$1]), [1])])
+[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
 
 # _AM_SET_OPTIONS(OPTIONS)
 # ------------------------
@@ -1253,18 +1271,22 @@ AC_DEFUN([_AM_IF_OPTION],
 
 # Check to make sure that the build environment is sane.    -*- Autoconf -*-
 
-# Copyright (C) 1996-2012 Free Software Foundation, Inc.
+# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
+# 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 9
+# serial 5
 
 # AM_SANITY_CHECK
 # ---------------
 AC_DEFUN([AM_SANITY_CHECK],
 [AC_MSG_CHECKING([whether build environment is sane])
+# Just in case
+sleep 1
+echo timestamp > conftest.file
 # Reject unsafe characters in $srcdir or the absolute working directory
 # name.  Accept space and tab only in the latter.
 am_lf='
@@ -1275,40 +1297,32 @@ case `pwd` in
 esac
 case $srcdir in
   *[[\\\"\#\$\&\'\`$am_lf\ \   ]]*)
-    AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);;
+    AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
 esac
 
-# Do 'set' in a subshell so we don't clobber the current shell's
+# Do `set' in a subshell so we don't clobber the current shell's
 # arguments.  Must try -L first in case configure is actually a
 # symlink; some systems play weird games with the mod time of symlinks
 # (eg FreeBSD returns the mod time of the symlink's containing
 # directory).
 if (
-   am_has_slept=no
-   for am_try in 1 2; do
-     echo "timestamp, slept: $am_has_slept" > conftest.file
-     set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
-     if test "$[*]" = "X"; then
-       # -L didn't work.
-       set X `ls -t "$srcdir/configure" conftest.file`
-     fi
-     if test "$[*]" != "X $srcdir/configure conftest.file" \
-       && test "$[*]" != "X conftest.file $srcdir/configure"; then
-
-       # If neither matched, then we have a broken ls.  This can happen
-       # if, for instance, CONFIG_SHELL is bash and it inherits a
-       # broken ls alias from the environment.  This has actually
-       # happened.  Such a system could not be considered "sane".
-       AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
-  alias in your environment])
-     fi
-     if test "$[2]" = conftest.file || test $am_try -eq 2; then
-       break
-     fi
-     # Just in case.
-     sleep 1
-     am_has_slept=yes
-   done
+   set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
+   if test "$[*]" = "X"; then
+      # -L didn't work.
+      set X `ls -t "$srcdir/configure" conftest.file`
+   fi
+   rm -f conftest.file
+   if test "$[*]" != "X $srcdir/configure conftest.file" \
+      && test "$[*]" != "X conftest.file $srcdir/configure"; then
+
+      # If neither matched, then we have a broken ls.  This can happen
+      # if, for instance, CONFIG_SHELL is bash and it inherits a
+      # broken ls alias from the environment.  This has actually
+      # happened.  Such a system could not be considered "sane".
+      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
+alias in your environment])
+   fi
+
    test "$[2]" = conftest.file
    )
 then
@@ -1318,52 +1332,31 @@ else
    AC_MSG_ERROR([newly created file is older than distributed files!
 Check your system clock])
 fi
-AC_MSG_RESULT([yes])
-# If we didn't sleep, we still need to ensure time stamps of config.status and
-# generated files are strictly newer.
-am_sleep_pid=
-if grep 'slept: no' conftest.file >/dev/null 2>&1; then
-  ( sleep 1 ) &
-  am_sleep_pid=$!
-fi
-AC_CONFIG_COMMANDS_PRE(
-  [AC_MSG_CHECKING([that generated files are newer than configure])
-   if test -n "$am_sleep_pid"; then
-     # Hide warnings about reused PIDs.
-     wait $am_sleep_pid 2>/dev/null
-   fi
-   AC_MSG_RESULT([done])])
-rm -f conftest.file
-])
+AC_MSG_RESULT(yes)])
 
-# Copyright (C) 2009-2012 Free Software Foundation, Inc.
+# Copyright (C) 2009, 2011  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 3
+# serial 2
 
 # AM_SILENT_RULES([DEFAULT])
 # --------------------------
 # Enable less verbose build rules; with the default set to DEFAULT
-# ("yes" being less verbose, "no" or empty being verbose).
+# (`yes' being less verbose, `no' or empty being verbose).
 AC_DEFUN([AM_SILENT_RULES],
-[AC_ARG_ENABLE([silent-rules], [dnl
-AS_HELP_STRING(
-  [--enable-silent-rules],
-  [less verbose build output (undo: "make V=1")])
-AS_HELP_STRING(
-  [--disable-silent-rules],
-  [verbose build output (undo: "make V=0")])dnl
-])
-case $enable_silent_rules in @%:@ (((
-  yes) AM_DEFAULT_VERBOSITY=0;;
-   no) AM_DEFAULT_VERBOSITY=1;;
-    *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
+[AC_ARG_ENABLE([silent-rules],
+[  --enable-silent-rules          less verbose build output (undo: `make V=1')
+  --disable-silent-rules         verbose build output (undo: `make V=0')])
+case $enable_silent_rules in
+yes) AM_DEFAULT_VERBOSITY=0;;
+no)  AM_DEFAULT_VERBOSITY=1;;
+*)   AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
 esac
 dnl
-dnl A few 'make' implementations (e.g., NonStop OS and NextStep)
+dnl A few `make' implementations (e.g., NonStop OS and NextStep)
 dnl do not support nested variable expansions.
 dnl See automake bug#9928 and bug#10237.
 am_make=${MAKE-make}
@@ -1381,7 +1374,7 @@ else
   am_cv_make_support_nested_variables=no
 fi])
 if test $am_cv_make_support_nested_variables = yes; then
-  dnl Using '$V' instead of '$(V)' breaks IRIX make.
+  dnl Using `$V' instead of `$(V)' breaks IRIX make.
   AM_V='$(V)'
   AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
 else
@@ -1398,37 +1391,37 @@ AC_SUBST([AM_BACKSLASH])dnl
 _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
 ])
 
-# Copyright (C) 2001-2012 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2003, 2005, 2011 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 2
+# serial 1
 
 # AM_PROG_INSTALL_STRIP
 # ---------------------
-# One issue with vendor 'install' (even GNU) is that you can't
+# One issue with vendor `install' (even GNU) is that you can't
 # specify the program used to strip binaries.  This is especially
 # annoying in cross-compiling environments, where the build's strip
 # is unlikely to handle the host's binaries.
 # Fortunately install-sh will honor a STRIPPROG variable, so we
-# always use install-sh in "make install-strip", and initialize
+# always use install-sh in `make install-strip', and initialize
 # STRIPPROG with the value of the STRIP variable (set by the user).
 AC_DEFUN([AM_PROG_INSTALL_STRIP],
 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
-# Installed binaries are usually stripped using 'strip' when the user
-# run "make install-strip".  However 'strip' might not be the right
+# Installed binaries are usually stripped using `strip' when the user
+# run `make install-strip'.  However `strip' might not be the right
 # tool to use in cross-compilation environments, therefore Automake
-# will honor the 'STRIP' environment variable to overrule this program.
-dnl Don't test for $cross_compiling = yes, because it might be 'maybe'.
+# will honor the `STRIP' environment variable to overrule this program.
+dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
 if test "$cross_compiling" != no; then
   AC_CHECK_TOOL([STRIP], [strip], :)
 fi
 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
 AC_SUBST([INSTALL_STRIP_PROGRAM])])
 
-# Copyright (C) 2006-2012 Free Software Foundation, Inc.
+# Copyright (C) 2006, 2008, 2010 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -1449,18 +1442,18 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
 
 # Check how to create a tarball.                            -*- Autoconf -*-
 
-# Copyright (C) 2004-2012 Free Software Foundation, Inc.
+# Copyright (C) 2004, 2005, 2012 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 3
+# serial 2
 
 # _AM_PROG_TAR(FORMAT)
 # --------------------
 # Check how to create a tarball in format FORMAT.
-# FORMAT should be one of 'v7', 'ustar', or 'pax'.
+# FORMAT should be one of `v7', `ustar', or `pax'.
 #
 # Substitute a variable $(am__tar) that is a command
 # writing to stdout a FORMAT-tarball containing the directory
@@ -1483,7 +1476,7 @@ AC_MSG_CHECKING([how to create a $1 tar archive])
 _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
 _am_tools=${am_cv_prog_tar_$1-$_am_tools}
 # Do not fold the above two line into one, because Tru64 sh and
-# Solaris sh will not grok spaces in the rhs of '-'.
+# Solaris sh will not grok spaces in the rhs of `-'.
 for _am_tool in $_am_tools
 do
   case $_am_tool in
index 137bedf2e28b0e831b7b92b3a433d3fca5854a9b..872b96a161eecdf418668d0c9dc2ca84a34b6642 100755 (executable)
@@ -4,7 +4,7 @@
 #   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
 #   2011, 2012 Free Software Foundation, Inc.
 
-timestamp='2012-08-14'
+timestamp='2012-09-25'
 
 # 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
@@ -306,7 +306,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
     arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
        echo arm-acorn-riscix${UNAME_RELEASE}
        exit ;;
-    arm:riscos:*:*|arm:RISCOS:*:*)
+    arm*:riscos:*:*|arm*:RISCOS:*:*)
        echo arm-unknown-riscos
        exit ;;
     SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
diff --git a/build-aux/test-driver b/build-aux/test-driver
deleted file mode 100755 (executable)
index aba4d1d..0000000
+++ /dev/null
@@ -1,127 +0,0 @@
-#! /bin/sh
-# test-driver - basic driver script for the 'parallel-tests' mode.
-
-scriptversion=2012-06-27.10; # UTC
-
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, 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 <http://www.gnu.org/licenses/>.
-
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-# This file is maintained in Automake, please report
-# bugs to <bug-automake@gnu.org> or send patches to
-# <automake-patches@gnu.org>.
-
-# Make unconditional expansion of undefined variables an error.  This
-# helps a lot in preventing typo-related bugs.
-set -u
-
-usage_error ()
-{
-  echo "$0: $*" >&2
-  print_usage >&2
-  exit 2
-}
-
-print_usage ()
-{
-  cat <<END
-Usage:
-  test-driver --test-name=NAME --log-file=PATH --trs-file=PATH
-              [--expect-failure={yes|no}] [--color-tests={yes|no}]
-              [--enable-hard-errors={yes|no}] [--] TEST-SCRIPT
-The '--test-name', '--log-file' and '--trs-file' options are mandatory.
-END
-}
-
-# TODO: better error handling in option parsing (in particular, ensure
-# TODO: $log_file, $trs_file and $test_name are defined).
-test_name= # Used for reporting.
-log_file=  # Where to save the output of the test script.
-trs_file=  # Where to save the metadata of the test run.
-expect_failure=no
-color_tests=no
-enable_hard_errors=yes
-while test $# -gt 0; do
-  case $1 in
-  --help) print_usage; exit $?;;
-  --version) echo "test-driver $scriptversion"; exit $?;;
-  --test-name) test_name=$2; shift;;
-  --log-file) log_file=$2; shift;;
-  --trs-file) trs_file=$2; shift;;
-  --color-tests) color_tests=$2; shift;;
-  --expect-failure) expect_failure=$2; shift;;
-  --enable-hard-errors) enable_hard_errors=$2; shift;;
-  --) shift; break;;
-  -*) usage_error "invalid option: '$1'";;
-  esac
-  shift
-done
-
-if test $color_tests = yes; then
-  # Keep this in sync with 'lib/am/check.am:$(am__tty_colors)'.
-  red='\e[0;31m' # Red.
-  grn='\e[0;32m' # Green.
-  lgn='\e[1;32m' # Light green.
-  blu='\e[1;34m' # Blue.
-  mgn='\e[0;35m' # Magenta.
-  std='\e[m'     # No color.
-else
-  red= grn= lgn= blu= mgn= std=
-fi
-
-do_exit='rm -f $log_file $trs_file; (exit $st); exit $st'
-trap "st=129; $do_exit" 1
-trap "st=130; $do_exit" 2
-trap "st=141; $do_exit" 13
-trap "st=143; $do_exit" 15
-
-# Test script is run here.
-"$@" >$log_file 2>&1
-estatus=$?
-if test $enable_hard_errors = no && test $estatus -eq 99; then
-  estatus=1
-fi
-
-case $estatus:$expect_failure in
-  0:yes) col=$red res=XPASS recheck=yes gcopy=yes;;
-  0:*)   col=$grn res=PASS  recheck=no  gcopy=no;;
-  77:*)  col=$blu res=SKIP  recheck=no  gcopy=yes;;
-  99:*)  col=$mgn res=ERROR recheck=yes gcopy=yes;;
-  *:yes) col=$lgn res=XFAIL recheck=no  gcopy=yes;;
-  *:*)   col=$red res=FAIL  recheck=yes gcopy=yes;;
-esac
-
-# Report outcome to console.
-echo "${col}${res}${std}: $test_name"
-
-# Register the test result, and other relevant metadata.
-echo ":test-result: $res" > $trs_file
-echo ":global-test-result: $res" >> $trs_file
-echo ":recheck: $recheck" >> $trs_file
-echo ":copy-in-global-log: $gcopy" >> $trs_file
-
-# Local Variables:
-# mode: shell-script
-# sh-indentation: 2
-# eval: (add-hook 'write-file-hooks 'time-stamp)
-# time-stamp-start: "scriptversion="
-# time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-time-zone: "UTC"
-# time-stamp-end: "; # UTC"
-# End:
index 9a2439c815d5ca3c20477377e87fd6d852309087..f3093d0853fea8b786794e94d38c1797ae7575be 100644 (file)
@@ -3,7 +3,7 @@
 % Load plain if necessary, i.e., if running under initex.
 \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
 %
-\def\texinfoversion{2012-09-05.06}
+\def\texinfoversion{2012-09-12.16}
 %
 % Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995,
 % 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
@@ -2272,8 +2272,6 @@ end
 
 \gdef\markupsetcodequoteleft{\let`\codequoteleft}
 \gdef\markupsetcodequoteright{\let'\codequoteright}
-
-\gdef\markupsetnoligaturesquoteleft{\let`\noligaturesquoteleft}
 }
 
 \let\markupsetuplqcode \markupsetcodequoteleft
@@ -2282,6 +2280,9 @@ end
 \let\markupsetuplqexample \markupsetcodequoteleft
 \let\markupsetuprqexample \markupsetcodequoteright
 %
+\let\markupsetuplqkbd     \markupsetcodequoteleft
+\let\markupsetuprqkbd     \markupsetcodequoteright
+%
 \let\markupsetuplqsamp \markupsetcodequoteleft
 \let\markupsetuprqsamp \markupsetcodequoteright
 %
@@ -2291,8 +2292,6 @@ end
 \let\markupsetuplqverbatim \markupsetcodequoteleft
 \let\markupsetuprqverbatim \markupsetcodequoteright
 
-\let\markupsetuplqkbd \markupsetnoligaturesquoteleft
-
 % Allow an option to not use regular directed right quote/apostrophe
 % (char 0x27), but instead the undirected quote from cmtt (char 0x0d).
 % The undirected quote is ugly, so don't make it the default, but it
@@ -2382,8 +2381,7 @@ end
   \aftersmartic
 }
 
-% like \smartslanted except unconditionally uses \ttsl, and no ic.
-% @var is set to this for defun arguments.
+% Unconditional use \ttsl, and no ic.  @var is set to this for defuns.
 \def\ttslanted#1{{\ttsl #1}}
 
 % @cite is like \smartslanted except unconditionally use \sl.  We never want
@@ -2695,10 +2693,6 @@ end
   \let\email=\uref
 \fi
 
-% @kbd is like @code, except that if the argument is just one @key command,
-% then @kbd has no effect.
-\def\kbd#1{{\setupmarkupstyle{kbd}\def\look{#1}\expandafter\kbdfoo\look??\par}}
-
 % @kbdinputstyle -- arg is `distinct' (@kbd uses slanted tty font always),
 %   `example' (@kbd uses ttsl only inside of @example and friends),
 %   or `code' (@kbd uses normal tty font always).
@@ -2722,11 +2716,17 @@ end
 % Default is `distinct'.
 \kbdinputstyle distinct
 
+% @kbd is like @code, except that if the argument is just one @key command,
+% then @kbd has no effect.
+\def\kbd#1{{\def\look{#1}\expandafter\kbdsub\look??\par}}
+
 \def\xkey{\key}
-\def\kbdfoo#1#2#3\par{\def\one{#1}\def\three{#3}\def\threex{??}%
-\ifx\one\xkey\ifx\threex\three \key{#2}%
-\else{\tclose{\kbdfont\setupmarkupstyle{kbd}\look}}\fi
-\else{\tclose{\kbdfont\setupmarkupstyle{kbd}\look}}\fi}
+\def\kbdsub#1#2#3\par{%
+  \def\one{#1}\def\three{#3}\def\threex{??}%
+  \ifx\one\xkey\ifx\threex\three \key{#2}%
+  \else{\tclose{\kbdfont\setupmarkupstyle{kbd}\look}}\fi
+  \else{\tclose{\kbdfont\setupmarkupstyle{kbd}\look}}\fi
+}
 
 % definition of @key that produces a lozenge.  Doesn't adjust to text size.
 %\setfont\keyrm\rmshape{8}{1000}{OT1}
@@ -4257,7 +4257,7 @@ end
 }
 \def\ifcmddefinedfail{\doignore{ifcommanddefined}}
 
-% @ifcommandnotdefined CMD ... handlded similar to @ifclear above.
+% @ifcommandnotdefined CMD ... handled similar to @ifclear above.
 \makecond{ifcommandnotdefined}
 \def\ifcommandnotdefined{%
   \parsearg{\doifcmddefined{\else \let\next=\ifcmdnotdefinedfail}}}
@@ -7072,7 +7072,10 @@ end
   \df \sl \hyphenchar\font=0
   %
   % On the other hand, if an argument has two dashes (for instance), we
-  % want a way to get ttsl.  Let's try @var for that.
+  % want a way to get ttsl.  We used to recommend @var for that, so
+  % leave the code in, but it's strange for @var to lead to typewriter.
+  % Nowadays we recommend @code, since the difference between a ttsl hyphen
+  % and a tt hyphen is pretty tiny.  @code also disables ?` !`.
   \def\var##1{{\setupmarkupstyle{var}\ttslanted{##1}}}%
   #1%
   \sl\hyphenchar\font=45
index 6cf5c66b0a9549cbefb9b35125f3bc91c722d6fd..e7d2bde46bb544af072d0522be76960afc55cddd 100644 (file)
    */
 #undef HAVE_ALLOCA_H
 
+/* Define to 1 if you have the `attr_copy_action' function. */
+#undef HAVE_ATTR_COPY_ACTION
+
 /* Define to 1 if you have the `attr_copy_file' function. */
 #undef HAVE_ATTR_COPY_FILE
 
index 6f7c4db03ebcb46106ee3fb2cf2bd96ca368c604..be62e6024ce1b5bbb9cc81cea57a117a18c05773 100755 (executable)
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for GNU patch 2.7.
+# Generated by GNU Autoconf 2.68 for GNU patch 2.7.1.
 #
 # Report bugs to <bug-patch@gnu.org>.
 #
@@ -560,8 +560,8 @@ MAKEFLAGS=
 # Identity of this package.
 PACKAGE_NAME='GNU patch'
 PACKAGE_TARNAME='patch'
-PACKAGE_VERSION='2.7'
-PACKAGE_STRING='GNU patch 2.7'
+PACKAGE_VERSION='2.7.1'
+PACKAGE_STRING='GNU patch 2.7.1'
 PACKAGE_BUGREPORT='bug-patch@gnu.org'
 PACKAGE_URL='http://www.gnu.org/software/patch/'
 
@@ -1981,7 +1981,7 @@ if test "$ac_init_help" = "long"; then
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures GNU patch 2.7 to adapt to many kinds of systems.
+\`configure' configures GNU patch 2.7.1 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -2051,7 +2051,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of GNU patch 2.7:";;
+     short | recursive ) echo "Configuration of GNU patch 2.7.1:";;
    esac
   cat <<\_ACEOF
 
@@ -2060,12 +2060,10 @@ Optional Features:
   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
   --disable-merge         disable support for merging
-  --enable-silent-rules   less verbose build output (undo: "make V=1")
-  --disable-silent-rules  verbose build output (undo: "make V=0")
-  --enable-dependency-tracking
-                          do not reject slow dependency extractors
-  --disable-dependency-tracking
-                          speeds up one-time build
+  --enable-silent-rules          less verbose build output (undo: `make V=1')
+  --disable-silent-rules         verbose build output (undo: `make V=0')
+  --disable-dependency-tracking  speeds up one-time build
+  --enable-dependency-tracking   do not reject slow dependency extractors
   --disable-largefile     omit support for large files
   --enable-gcc-warnings   turn on lots of GCC warnings (for developers)
   --disable-xattr         do not support extended attributes
@@ -2155,7 +2153,7 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-GNU patch configure 2.7
+GNU patch configure 2.7.1
 generated by GNU Autoconf 2.68
 
 Copyright (C) 2010 Free Software Foundation, Inc.
@@ -2859,7 +2857,7 @@ cat >config.log <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by GNU patch $as_me 2.7, which was
+It was created by GNU patch $as_me 2.7.1, which was
 generated by GNU Autoconf 2.68.  Invocation command line was
 
   $ $0 $@
@@ -3307,7 +3305,7 @@ else
 fi
 
 
-am__api_version='1.12'
+am__api_version='1.11'
 
 # Find a good install program.  We prefer a C program (faster),
 # so one script is as good as another.  But avoid the broken or
@@ -3404,6 +3402,9 @@ test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
 $as_echo_n "checking whether build environment is sane... " >&6; }
+# Just in case
+sleep 1
+echo timestamp > conftest.file
 # Reject unsafe characters in $srcdir or the absolute working directory
 # name.  Accept space and tab only in the latter.
 am_lf='
@@ -3414,40 +3415,32 @@ case `pwd` in
 esac
 case $srcdir in
   *[\\\"\#\$\&\'\`$am_lf\ \    ]*)
-    as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;;
+    as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;;
 esac
 
-# Do 'set' in a subshell so we don't clobber the current shell's
+# Do `set' in a subshell so we don't clobber the current shell's
 # arguments.  Must try -L first in case configure is actually a
 # symlink; some systems play weird games with the mod time of symlinks
 # (eg FreeBSD returns the mod time of the symlink's containing
 # directory).
 if (
-   am_has_slept=no
-   for am_try in 1 2; do
-     echo "timestamp, slept: $am_has_slept" > conftest.file
-     set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
-     if test "$*" = "X"; then
-       # -L didn't work.
-       set X `ls -t "$srcdir/configure" conftest.file`
-     fi
-     if test "$*" != "X $srcdir/configure conftest.file" \
-       && test "$*" != "X conftest.file $srcdir/configure"; then
-
-       # If neither matched, then we have a broken ls.  This can happen
-       # if, for instance, CONFIG_SHELL is bash and it inherits a
-       # broken ls alias from the environment.  This has actually
-       # happened.  Such a system could not be considered "sane".
-       as_fn_error $? "ls -t appears to fail.  Make sure there is not a broken
-  alias in your environment" "$LINENO" 5
-     fi
-     if test "$2" = conftest.file || test $am_try -eq 2; then
-       break
-     fi
-     # Just in case.
-     sleep 1
-     am_has_slept=yes
-   done
+   set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
+   if test "$*" = "X"; then
+      # -L didn't work.
+      set X `ls -t "$srcdir/configure" conftest.file`
+   fi
+   rm -f conftest.file
+   if test "$*" != "X $srcdir/configure conftest.file" \
+      && test "$*" != "X conftest.file $srcdir/configure"; then
+
+      # If neither matched, then we have a broken ls.  This can happen
+      # if, for instance, CONFIG_SHELL is bash and it inherits a
+      # broken ls alias from the environment.  This has actually
+      # happened.  Such a system could not be considered "sane".
+      as_fn_error $? "ls -t appears to fail.  Make sure there is not a broken
+alias in your environment" "$LINENO" 5
+   fi
+
    test "$2" = conftest.file
    )
 then
@@ -3459,16 +3452,6 @@ Check your system clock" "$LINENO" 5
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
-# If we didn't sleep, we still need to ensure time stamps of config.status and
-# generated files are strictly newer.
-am_sleep_pid=
-if grep 'slept: no' conftest.file >/dev/null 2>&1; then
-  ( sleep 1 ) &
-  am_sleep_pid=$!
-fi
-
-rm -f conftest.file
-
 test "$program_prefix" != NONE &&
   program_transform_name="s&^&$program_prefix&;$program_transform_name"
 # Use a double $ so make ignores it.
@@ -3495,8 +3478,8 @@ if eval "$MISSING --run true"; then
   am_missing_run="$MISSING --run "
 else
   am_missing_run=
-  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5
-$as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;}
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5
+$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
 fi
 
 if test x"${install_sh}" != xset; then
@@ -3508,10 +3491,10 @@ if test x"${install_sh}" != xset; then
   esac
 fi
 
-# Installed binaries are usually stripped using 'strip' when the user
-# run "make install-strip".  However 'strip' might not be the right
+# Installed binaries are usually stripped using `strip' when the user
+# run `make install-strip'.  However `strip' might not be the right
 # tool to use in cross-compilation environments, therefore Automake
-# will honor the 'STRIP' environment variable to overrule this program.
+# will honor the `STRIP' environment variable to overrule this program.
 if test "$cross_compiling" != no; then
   if test -n "$ac_tool_prefix"; then
   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
@@ -3651,6 +3634,12 @@ fi
 $as_echo "$MKDIR_P" >&6; }
 
 
+mkdir_p="$MKDIR_P"
+case $mkdir_p in
+  [\\/$]* | ?:[\\/]*) ;;
+  */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
+esac
+
 for ac_prog in gawk mawk nawk awk
 do
   # Extract the first word of "$ac_prog", so it can be a program name with args.
@@ -3755,7 +3744,7 @@ fi
 
 # Define the identity of the package.
  PACKAGE='patch'
- VERSION='2.7'
+ VERSION='2.7.1'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -3783,12 +3772,6 @@ AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
 
 MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
 
-# For better backward compatibility.  To be removed once Automake 1.9.x
-# dies out for good.  For more background, see:
-# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
-# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
-mkdir_p='$(MKDIR_P)'
-
 # We need awk for the "check" target.  The system "awk" is bad on
 # some platforms.
 # Always define AMTAR for backward compatibility.  Yes, it's still used
@@ -3806,10 +3789,10 @@ if test "${enable_silent_rules+set}" = set; then :
   enableval=$enable_silent_rules;
 fi
 
-case $enable_silent_rules in # (((
-  yes) AM_DEFAULT_VERBOSITY=0;;
-   no) AM_DEFAULT_VERBOSITY=1;;
-    *) AM_DEFAULT_VERBOSITY=0;;
+case $enable_silent_rules in
+yes) AM_DEFAULT_VERBOSITY=0;;
+no)  AM_DEFAULT_VERBOSITY=1;;
+*)   AM_DEFAULT_VERBOSITY=0;;
 esac
 am_make=${MAKE-make}
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
@@ -4652,7 +4635,7 @@ am__quote=
 _am_result=none
 # First try GNU make style include.
 echo "include confinc" > confmf
-# Ignore all kinds of additional output from 'make'.
+# Ignore all kinds of additional output from `make'.
 case `$am_make -s -f confmf 2> /dev/null` in #(
 *the\ am__doit\ target*)
   am__include=include
@@ -4708,8 +4691,8 @@ else
   # We make a subdir and do the tests there.  Otherwise we can end up
   # making bogus files that we don't know about and never remove.  For
   # instance it was reported that on HP-UX the gcc test will end up
-  # making a dummy file named 'D' -- because '-MD' means "put the output
-  # in D".
+  # making a dummy file named `D' -- because `-MD' means `put the output
+  # in D'.
   rm -rf conftest.dir
   mkdir conftest.dir
   # Copy depcomp to subdir because otherwise we won't find it if we're
@@ -4744,16 +4727,16 @@ else
     : > sub/conftest.c
     for i in 1 2 3 4 5 6; do
       echo '#include "conftst'$i'.h"' >> sub/conftest.c
-      # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
-      # Solaris 10 /bin/sh.
-      echo '/* dummy */' > sub/conftst$i.h
+      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+      # Solaris 8's {/usr,}/bin/sh.
+      touch sub/conftst$i.h
     done
     echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
 
-    # We check with '-c' and '-o' for the sake of the "dashmstdout"
+    # We check with `-c' and `-o' for the sake of the "dashmstdout"
     # mode.  It turns out that the SunPro C++ compiler does not properly
-    # handle '-M -o', and we need to detect this.  Also, some Intel
-    # versions had trouble with output in subdirs.
+    # handle `-M -o', and we need to detect this.  Also, some Intel
+    # versions had trouble with output in subdirs
     am__obj=sub/conftest.${OBJEXT-o}
     am__minus_obj="-o $am__obj"
     case $depmode in
@@ -4762,8 +4745,8 @@ else
       test "$am__universal" = false || continue
       ;;
     nosideeffect)
-      # After this tag, mechanisms are not by side-effect, so they'll
-      # only be used when explicitly requested.
+      # after this tag, mechanisms are not by side-effect, so they'll
+      # only be used when explicitly requested
       if test "x$enable_dependency_tracking" = xyes; then
        continue
       else
@@ -4771,7 +4754,7 @@ else
       fi
       ;;
     msvc7 | msvc7msys | msvisualcpp | msvcmsys)
-      # This compiler won't grok '-c -o', but also, the minuso test has
+      # This compiler won't grok `-c -o', but also, the minuso test has
       # not run yet.  These depmodes are late enough in the game, and
       # so weak that their functioning should not be impacted.
       am__obj=conftest.${OBJEXT-o}
@@ -8207,8 +8190,6 @@ $as_echo "$gl_cv_type_off_t_64" >&6; }
 
 
 
-
-
      if test $gl_cv_have_include_next = yes; then
        gl_cv_next_sys_stat_h='<'sys/stat.h'>'
      else
@@ -19095,8 +19076,6 @@ $as_echo "#define GNULIB_TEST_SYMLINK 1" >>confdefs.h
 
 
 
-
-
      if test $gl_cv_have_include_next = yes; then
        gl_cv_next_sys_stat_h='<'sys/stat.h'>'
      else
@@ -20682,7 +20661,6 @@ $as_echo "#define GNULIB_TEST_WRITE 1" >>confdefs.h
 
 
 
-
   for ac_header in stdint.h
 do :
   ac_fn_c_check_header_mongrel "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default"
@@ -20983,6 +20961,7 @@ fi
   nw="$nw -Wswitch-default"         # Too many warnings for now
   nw="$nw -Wstack-protector"        # not worth working around
   nw="$nw -Wmissing-format-attribute" # not worth working around in patch
+  nw="$nw -Wsuggest-attribute=format" # warns about util.c
   # things to fix soon:
   nw="$nw -Wshadow"
   nw="$nw -Wstrict-overflow"
@@ -21663,19 +21642,21 @@ if test "$ac_res" != no; then :
                         LIB_XATTR=$ac_cv_search_attr_copy_file
 fi
 
-      for ac_func in attr_copy_file
+      for ac_func in attr_copy_file attr_copy_action
 do :
-  ac_fn_c_check_func "$LINENO" "attr_copy_file" "ac_cv_func_attr_copy_file"
-if test "x$ac_cv_func_attr_copy_file" = xyes; then :
+  as_ac_var=`$as_echo "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 HAVE_ATTR_COPY_FILE 1
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
 _ACEOF
 
 fi
 done
 
       LIBS=$xattr_saved_LIBS
-      if test $ac_cv_func_attr_copy_file = yes; then
+      if test $ac_cv_func_attr_copy_file = yes \
+        && test $ac_cv_func_attr_copy_action = yes; then
         use_xattr=yes
       fi
     fi
@@ -21922,14 +21903,6 @@ if test -z "${ALPHA_VERSION_TRUE}" && test -z "${ALPHA_VERSION_FALSE}"; then
   as_fn_error $? "conditional \"ALPHA_VERSION\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5
-$as_echo_n "checking that generated files are newer than configure... " >&6; }
-   if test -n "$am_sleep_pid"; then
-     # Hide warnings about reused PIDs.
-     wait $am_sleep_pid 2>/dev/null
-   fi
-   { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
-$as_echo "done" >&6; }
  if test -n "$EXEEXT"; then
   am__EXEEXT_TRUE=
   am__EXEEXT_FALSE='#'
@@ -22426,7 +22399,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by GNU patch $as_me 2.7, which was
+This file was extended by GNU patch $as_me 2.7.1, which was
 generated by GNU Autoconf 2.68.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -22498,7 +22471,7 @@ _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-GNU patch config.status 2.7
+GNU patch config.status 2.7.1
 configured by $0, generated by GNU Autoconf 2.68,
   with options \\"\$ac_cs_config\\"
 
@@ -23276,7 +23249,7 @@ $as_echo "$as_me: executing $ac_file commands" >&6;}
     # Strip MF so we end up with the name of the file.
     mf=`echo "$mf" | sed -e 's/:.*$//'`
     # Check whether this is an Automake generated Makefile or not.
-    # We used to match only the files named 'Makefile.in', but
+    # We used to match only the files named `Makefile.in', but
     # some people rename them; so instead we look at the file content.
     # Grep'ing the first line is not enough: some people post-process
     # each Makefile.in and add a new line on top of each file to say so.
@@ -23310,19 +23283,21 @@ $as_echo X"$mf" |
       continue
     fi
     # Extract the definition of DEPDIR, am__include, and am__quote
-    # from the Makefile without running 'make'.
+    # from the Makefile without running `make'.
     DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
     test -z "$DEPDIR" && continue
     am__include=`sed -n 's/^am__include = //p' < "$mf"`
     test -z "am__include" && continue
     am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+    # When using ansi2knr, U may be empty or an underscore; expand it
+    U=`sed -n 's/^U = //p' < "$mf"`
     # Find all dependency output files, they are included files with
     # $(DEPDIR) in their names.  We invoke sed twice because it is the
     # simplest approach to changing $(DEPDIR) to its actual value in the
     # expansion.
     for file in `sed -n "
       s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
-        sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
+        sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
       # Make sure the directory exists.
       test -f "$dirpart/$file" && continue
       fdir=`$as_dirname -- "$file" ||
index 9943f0301baa20aac3fefb80f8b3642e3b0e1260..dc837d6cf98672988349646f3723253535540695 100644 (file)
@@ -85,6 +85,7 @@ if test "$gl_gcc_warnings" = yes; then
   nw="$nw -Wswitch-default"         # Too many warnings for now
   nw="$nw -Wstack-protector"        # not worth working around
   nw="$nw -Wmissing-format-attribute" # not worth working around in patch
+  nw="$nw -Wsuggest-attribute=format" # warns about util.c
   # things to fix soon:
   nw="$nw -Wshadow"
   nw="$nw -Wstrict-overflow"
index 4a40b7e99dc7b1c60c1a281003061fe8d7065e1c..1195b468ce4baff9ccd031eb34c5d021643ddbd2 100644 (file)
@@ -1,8 +1,9 @@
-# Makefile.in generated by automake 1.12.2 from Makefile.am.
+# Makefile.in generated by automake 1.11.6 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2012 Free Software Foundation, Inc.
-
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+# Foundation, Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -35,7 +36,7 @@
 # the same distribution terms as the rest of that program.
 #
 # Generated by gnulib-tool.
-# Reproduce by: gnulib-tool --import --dir=. --local-dir=gl --lib=libpatch --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --makefile-name=gnulib.mk --no-conditional-dependencies --no-libtool --macro-prefix=gl argmatch backupfile clock-time diffseq dirname dup2 exitfail extensions fcntl-h full-write getdate getopt-gnu gettime git-version-gen gitlog-to-changelog hash ignore-value largefile lchmod linked-list lstat maintainer-makefile malloc manywarnings memchr minmax mkdir progname quotearg readlink realloc rename rmdir setenv signal ssize_t stat-time stdbool stdlib symlink sys_stat tempname time unistd unlink update-copyright utimens verror xalloc xlist
+# Reproduce by: gnulib-tool --import --dir=. --local-dir=gl --lib=libpatch --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --makefile-name=gnulib.mk --no-conditional-dependencies --no-libtool --macro-prefix=gl argmatch backupfile clock-time diffseq dirname dup2 errno exitfail extensions fcntl-h full-write getdate getopt-gnu gettime git-version-gen gitlog-to-changelog hash ignore-value largefile lchmod linked-list lstat maintainer-makefile malloc manywarnings memchr minmax mkdir progname quotearg readlink realloc rename rmdir setenv signal ssize_t stat-time stdbool stdlib symlink sys_stat tempname time unistd unlink update-copyright utimens verror xalloc xlist
 
 VPATH = @srcdir@
 am__make_dryrun = \
@@ -73,8 +74,7 @@ POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
-       $(srcdir)/gnulib.mk $(top_srcdir)/build-aux/depcomp \
-       $(top_srcdir)/build-aux/ylwrap parse-datetime.c
+       $(srcdir)/gnulib.mk parse-datetime.c
 subdir = lib
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \
@@ -152,8 +152,10 @@ CONFIG_CLEAN_VPATH_FILES =
 LIBRARIES = $(noinst_LIBRARIES)
 AM_V_AR = $(am__v_AR_@AM_V@)
 am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@)
-am__v_AR_0 = @echo "  AR      " $@;
-am__v_AR_1 = 
+am__v_AR_0 = @echo "  AR    " $@;
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
 libpatch_a_AR = $(AR) $(ARFLAGS)
 am__DEPENDENCIES_1 =
 am_libpatch_a_OBJECTS = argmatch.$(OBJEXT) backupfile.$(OBJEXT) \
@@ -169,20 +171,9 @@ am_libpatch_a_OBJECTS = argmatch.$(OBJEXT) backupfile.$(OBJEXT) \
        timespec.$(OBJEXT) dup-safer.$(OBJEXT) fd-safer.$(OBJEXT) \
        pipe-safer.$(OBJEXT) utimens.$(OBJEXT) verror.$(OBJEXT) \
        xmalloc.$(OBJEXT) xalloc-die.$(OBJEXT) gl_xlist.$(OBJEXT) \
-       xstrndup.$(OBJEXT) xvasprintf.$(OBJEXT) xasprintf.$(OBJEXT)
+       xsize.$(OBJEXT) xstrndup.$(OBJEXT) xvasprintf.$(OBJEXT) \
+       xasprintf.$(OBJEXT)
 libpatch_a_OBJECTS = $(am_libpatch_a_OBJECTS)
-AM_V_P = $(am__v_P_@AM_V@)
-am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
-am__v_P_0 = false
-am__v_P_1 = :
-AM_V_GEN = $(am__v_GEN_@AM_V@)
-am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
-am__v_GEN_0 = @echo "  GEN     " $@;
-am__v_GEN_1 = 
-AM_V_at = $(am__v_at_@AM_V@)
-am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
-am__v_at_0 = @
-am__v_at_1 = 
 DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
 depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp
 am__depfiles_maybe = depfiles
@@ -191,22 +182,20 @@ COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
        $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
 AM_V_CC = $(am__v_CC_@AM_V@)
 am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
-am__v_CC_0 = @echo "  CC      " $@;
-am__v_CC_1 = 
+am__v_CC_0 = @echo "  CC    " $@;
 CCLD = $(CC)
 LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
 AM_V_CCLD = $(am__v_CCLD_@AM_V@)
 am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
-am__v_CCLD_0 = @echo "  CCLD    " $@;
-am__v_CCLD_1 = 
-am__yacc_c2h = sed -e s/cc$$/hh/ -e s/cpp$$/hpp/ -e s/cxx$$/hxx/ \
-                  -e s/c++$$/h++/ -e s/c$$/h/
+am__v_CCLD_0 = @echo "  CCLD  " $@;
 YACCCOMPILE = $(YACC) $(AM_YFLAGS) $(YFLAGS)
 AM_V_YACC = $(am__v_YACC_@AM_V@)
 am__v_YACC_ = $(am__v_YACC_@AM_DEFAULT_V@)
-am__v_YACC_0 = @echo "  YACC    " $@;
-am__v_YACC_1 = 
+am__v_YACC_0 = @echo "  YACC  " $@;
 YLWRAP = $(top_srcdir)/build-aux/ylwrap
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo "  GEN   " $@;
 SOURCES = $(libpatch_a_SOURCES) $(EXTRA_libpatch_a_SOURCES)
 DIST_SOURCES = $(libpatch_a_SOURCES) $(EXTRA_libpatch_a_SOURCES)
 am__can_run_installinfo = \
@@ -1087,7 +1076,8 @@ libpatch_a_SOURCES = argmatch.c backupfile.c bitrotate.h c-ctype.h \
        safe-write.c size_max.h stat-time.c tempname.c timespec.c \
        dup-safer.c fd-safer.c pipe-safer.c utimens.c verror.h \
        verror.c xmalloc.c xalloc-die.c gl_xlist.h gl_xlist.c xsize.h \
-       xstrndup.h xstrndup.c xvasprintf.h xvasprintf.c xasprintf.c
+       xsize.c xstrndup.h xstrndup.c xvasprintf.h xvasprintf.c \
+       xasprintf.c
 libpatch_a_LIBADD = $(gl_LIBOBJS)
 libpatch_a_DEPENDENCIES = $(gl_LIBOBJS)
 EXTRA_libpatch_a_SOURCES = canonicalize-lgpl.c close.c closedir.c \
@@ -1244,6 +1234,7 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xalloc-die.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xasprintf.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xmalloc.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xsize.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xstrndup.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xvasprintf.Po@am__quote@
 
@@ -1262,7 +1253,7 @@ distclean-compile:
 @am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'`
 
 .y.c:
-       $(AM_V_YACC)$(am__skipyacc) $(SHELL) $(YLWRAP) $< y.tab.c $@ y.tab.h `echo $@ | $(am__yacc_c2h)` y.output $*.output -- $(YACCCOMPILE)
+       $(AM_V_YACC)$(am__skipyacc) $(SHELL) $(YLWRAP) $< y.tab.c $@ y.tab.h $*.h y.output $*.output -- $(YACCCOMPILE)
 
 ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
        list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
@@ -1313,20 +1304,6 @@ GTAGS:
          && $(am__cd) $(top_srcdir) \
          && gtags -i $(GTAGS_ARGS) "$$here"
 
-cscopelist:  $(HEADERS) $(SOURCES) $(LISP)
-       list='$(SOURCES) $(HEADERS) $(LISP)'; \
-       case "$(srcdir)" in \
-         [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
-         *) sdir=$(subdir)/$(srcdir) ;; \
-       esac; \
-       for i in $$list; do \
-         if test -f "$$i"; then \
-           echo "$(subdir)/$$i"; \
-         else \
-           echo "$$sdir/$$i"; \
-         fi; \
-       done >> $(top_builddir)/cscope.files
-
 distclean-tags:
        -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
 
@@ -1474,7 +1451,7 @@ uninstall-am: uninstall-local
 .MAKE: all check install install-am install-strip
 
 .PHONY: CTAGS GTAGS all all-am all-local check check-am clean \
-       clean-generic clean-noinstLIBRARIES cscopelist ctags distclean \
+       clean-generic clean-noinstLIBRARIES ctags 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 \
index 6b5d6887538cf5fde0302e2d4a241ee09e53d9cc..5580ce9b1478cd8a11ab97c0a1d241fc00fc4bf7 100644 (file)
@@ -21,7 +21,7 @@
 # the same distribution terms as the rest of that program.
 #
 # Generated by gnulib-tool.
-# Reproduce by: gnulib-tool --import --dir=. --local-dir=gl --lib=libpatch --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --makefile-name=gnulib.mk --no-conditional-dependencies --no-libtool --macro-prefix=gl argmatch backupfile clock-time diffseq dirname dup2 exitfail extensions fcntl-h full-write getdate getopt-gnu gettime git-version-gen gitlog-to-changelog hash ignore-value largefile lchmod linked-list lstat maintainer-makefile malloc manywarnings memchr minmax mkdir progname quotearg readlink realloc rename rmdir setenv signal ssize_t stat-time stdbool stdlib symlink sys_stat tempname time unistd unlink update-copyright utimens verror xalloc xlist
+# Reproduce by: gnulib-tool --import --dir=. --local-dir=gl --lib=libpatch --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --makefile-name=gnulib.mk --no-conditional-dependencies --no-libtool --macro-prefix=gl argmatch backupfile clock-time diffseq dirname dup2 errno exitfail extensions fcntl-h full-write getdate getopt-gnu gettime git-version-gen gitlog-to-changelog hash ignore-value largefile lchmod linked-list lstat maintainer-makefile malloc manywarnings memchr minmax mkdir progname quotearg readlink realloc rename rmdir setenv signal ssize_t stat-time stdbool stdlib symlink sys_stat tempname time unistd unlink update-copyright utimens verror xalloc xlist
 
 
 MOSTLYCLEANFILES += core *.stackdump
@@ -2163,7 +2163,7 @@ libpatch_a_SOURCES += gl_xlist.h gl_xlist.c
 
 ## begin gnulib module xsize
 
-libpatch_a_SOURCES += xsize.h
+libpatch_a_SOURCES += xsize.h xsize.c
 
 ## end   gnulib module xsize
 
index b5ee2d6fef67fce20b600f87f885a7af608265ad..8d16c87a76990d997fdeceffe9466ff2023507cc 100644 (file)
@@ -542,5 +542,12 @@ locale_charset (void)
   if (codeset[0] == '\0')
     codeset = "ASCII";
 
+#ifdef DARWIN7
+  /* Mac OS X sets MB_CUR_MAX to 1 when LC_ALL=C, and "UTF-8"
+     (the default codeset) does not work when MB_CUR_MAX is 1.  */
+  if (strcmp (codeset, "UTF-8") == 0 && MB_CUR_MAX <= 1)
+    codeset = "ASCII";
+#endif
+
   return codeset;
 }
index 0cedf5f633c63dfc4a645198d4e7121a0f62a84a..f06e9e7b46829ff1785181d68c94e25aa2b90aa1 100644 (file)
@@ -42,7 +42,7 @@ extern "C" {
    and a page size can be as small as 4096 bytes.  So we cannot safely
    allocate anything larger than 4096 bytes.  Also care for the possibility
    of a few compiler-allocated temporary stack slots.
-   This must be a macro, not an inline function.  */
+   This must be a macro, not a function.  */
 # define safe_alloca(N) ((N) < 4032 ? alloca (N) : NULL)
 #else
 # define safe_alloca(N) ((void) (N), NULL)
index 67797559836bf4643c420404c38a12f5f55aecfb..ad777d8dd79c84f07dc78b8d81b899765ba5600b 100644 (file)
@@ -22,7 +22,7 @@
 
 /* Return 1 if an array of N objects, each of size S, cannot exist due
    to size arithmetic overflow.  S must be positive and N must be
-   nonnegative.  This is a macro, not an inline function, so that it
+   nonnegative.  This is a macro, not a function, so that it
    works correctly even when SIZE_MAX < N.
 
    By gnulib convention, SIZE_MAX represents overflow in size
diff --git a/lib/xsize.c b/lib/xsize.c
new file mode 100644 (file)
index 0000000..4b4914c
--- /dev/null
@@ -0,0 +1,3 @@
+#include <config.h>
+#define XSIZE_INLINE _GL_EXTERN_INLINE
+#include "xsize.h"
index 515327e97f7517362e60c8f6eb2d54e3a861167d..a2942b95558b7299104795b9d319ae6e53a60f39 100644 (file)
 # include <stdint.h>
 #endif
 
+_GL_INLINE_HEADER_BEGIN
+#ifndef XSIZE_INLINE
+# define XSIZE_INLINE _GL_INLINE
+#endif
+
 /* The size of memory objects is often computed through expressions of
    type size_t. Example:
       void* p = malloc (header_size + n * element_size).
@@ -48,7 +53,7 @@
   ((N) <= SIZE_MAX ? (size_t) (N) : SIZE_MAX)
 
 /* Sum of two sizes, with overflow check.  */
-static inline size_t
+XSIZE_INLINE size_t
 #if __GNUC__ >= 3
 __attribute__ ((__pure__))
 #endif
@@ -59,7 +64,7 @@ xsum (size_t size1, size_t size2)
 }
 
 /* Sum of three sizes, with overflow check.  */
-static inline size_t
+XSIZE_INLINE size_t
 #if __GNUC__ >= 3
 __attribute__ ((__pure__))
 #endif
@@ -69,7 +74,7 @@ xsum3 (size_t size1, size_t size2, size_t size3)
 }
 
 /* Sum of four sizes, with overflow check.  */
-static inline size_t
+XSIZE_INLINE size_t
 #if __GNUC__ >= 3
 __attribute__ ((__pure__))
 #endif
@@ -79,7 +84,7 @@ xsum4 (size_t size1, size_t size2, size_t size3, size_t size4)
 }
 
 /* Maximum of two sizes, with overflow check.  */
-static inline size_t
+XSIZE_INLINE size_t
 #if __GNUC__ >= 3
 __attribute__ ((__pure__))
 #endif
@@ -92,7 +97,7 @@ xmax (size_t size1, size_t size2)
 
 /* Multiplication of a count with an element size, with overflow check.
    The count must be >= 0 and the element size must be > 0.
-   This is a macro, not an inline function, so that it works correctly even
+   This is a macro, not a function, so that it works correctly even
    when N is of a wider type and N > SIZE_MAX.  */
 #define xtimes(N, ELSIZE) \
   ((N) <= SIZE_MAX / (ELSIZE) ? (size_t) (N) * (ELSIZE) : SIZE_MAX)
@@ -104,4 +109,6 @@ xmax (size_t size1, size_t size2)
 #define size_in_bounds_p(SIZE) \
   ((SIZE) != SIZE_MAX)
 
+_GL_INLINE_HEADER_END
+
 #endif /* _XSIZE_H */
index 75f17e2f10a2dba6b566ca48f6d5a952383f1e3d..9e5df45d314dc2a83747789a26640f854852432b 100644 (file)
@@ -1,4 +1,4 @@
-# eealloc.m4 serial 2
+# eealloc.m4 serial 3
 dnl Copyright (C) 2003, 2009-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -8,7 +8,6 @@ AC_DEFUN([gl_EEALLOC],
 [
   AC_REQUIRE([gl_EEMALLOC])
   AC_REQUIRE([gl_EEREALLOC])
-  AC_REQUIRE([AC_C_INLINE])
 ])
 
 AC_DEFUN([gl_EEMALLOC],
index e20555d1b8e0ac7185eeb626dad5862c12ebd6d1..303bf79c4a5664ef175d71a67af66871baad8db4 100644 (file)
@@ -862,6 +862,7 @@ AC_DEFUN([gl_FILE_LIST], [
   lib/xalloc.h
   lib/xasprintf.c
   lib/xmalloc.c
+  lib/xsize.c
   lib/xsize.h
   lib/xstrndup.c
   lib/xstrndup.h
index f45dee1dc4dc35c88c5fdc900244d4f8343ddee2..8af3353ea5108608e167f2b74e3feb362d15b8a5 100644 (file)
@@ -1,4 +1,4 @@
-# sys_stat_h.m4 serial 27   -*- Autoconf -*-
+# sys_stat_h.m4 serial 28   -*- Autoconf -*-
 dnl Copyright (C) 2006-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -11,9 +11,6 @@ AC_DEFUN([gl_HEADER_SYS_STAT_H],
 [
   AC_REQUIRE([gl_SYS_STAT_H_DEFAULTS])
 
-  dnl For the mkdir substitute.
-  AC_REQUIRE([AC_C_INLINE])
-
   dnl Check for broken stat macros.
   AC_REQUIRE([AC_HEADER_STAT])
 
index 7691177844e8cfeffada70fefaa2e8894ad6e0bc..ed268868f8110d1e8142fc2713783b4aa197e081 100644 (file)
@@ -28,9 +28,10 @@ AC_DEFUN([gl_FUNC_XATTR],
       AC_SEARCH_LIBS([attr_copy_file], [attr],
                      [test "$ac_cv_search_attr_copy_file" = "none required" ||
                         LIB_XATTR=$ac_cv_search_attr_copy_file])
-      AC_CHECK_FUNCS([attr_copy_file])
+      AC_CHECK_FUNCS([attr_copy_file attr_copy_action])
       LIBS=$xattr_saved_LIBS
-      if test $ac_cv_func_attr_copy_file = yes; then
+      if test $ac_cv_func_attr_copy_file = yes \
+        && test $ac_cv_func_attr_copy_action = yes; then
         use_xattr=yes
       fi
     fi
index b3b7feebfae3b993cbfad5fdf0c2d1c82a495b6f..d85a5f10f835fd277686939617d645171baf3772 100644 (file)
@@ -1,4 +1,4 @@
-# xsize.m4 serial 4
+# xsize.m4 serial 5
 dnl Copyright (C) 2003-2004, 2008-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -8,6 +8,5 @@ AC_DEFUN([gl_XSIZE],
 [
   dnl Prerequisites of lib/xsize.h.
   AC_REQUIRE([gl_SIZE_MAX])
-  AC_REQUIRE([AC_C_INLINE])
   AC_CHECK_HEADERS([stdint.h])
 ])
index 4627bc53690f36235b148ef14d4e256b9e49197b..e52deb45df8c668a9f6e496572a0cf9e82bcc974 100644 (file)
--- a/maint.mk
+++ b/maint.mk
@@ -28,6 +28,28 @@ ifneq ($(build_aux),)
 set $$(_build-aux) relative to $$(srcdir) instead of $$(build_aux)")
 endif
 
+# Helper variables.
+_empty =
+_sp = $(_empty) $(_empty)
+
+# _equal,S1,S2
+# ------------
+# If S1 == S2, return S1, otherwise the empty string.
+_equal = $(and $(findstring $(1),$(2)),$(findstring $(2),$(1)))
+
+# member-check,VARIABLE,VALID-VALUES
+# ----------------------------------
+# Check that $(VARIABLE) is in the space-separated list of VALID-VALUES, and
+# return it.  Die otherwise.
+member-check =                                                         \
+  $(strip                                                              \
+    $(if $($(1)),                                                      \
+      $(if $(findstring $(_sp),$($(1))),                               \
+          $(error invalid $(1): '$($(1))', expected $(2)),             \
+          $(or $(findstring $(_sp)$($(1))$(_sp),$(_sp)$(2)$(_sp)),     \
+            $(error invalid $(1): '$($(1))', expected $(2)))),         \
+      $(error $(1) undefined)))
+
 # Do not save the original name or timestamp in the .tar.gz file.
 # Use --rsyncable if available.
 gzip_rsyncable := \
@@ -52,9 +74,9 @@ _dot_escaped_srcdir = $(subst .,\.,$(srcdir))
 # Post-process $(VC_LIST) output, prepending $(srcdir)/, but only
 # when $(srcdir) is not ".".
 ifeq ($(srcdir),.)
-_prepend_srcdir_prefix =
+  _prepend_srcdir_prefix =
 else
-_prepend_srcdir_prefix = | sed 's|^|$(srcdir)/|'
+  _prepend_srcdir_prefix = | sed 's|^|$(srcdir)/|'
 endif
 
 # In order to be able to consistently filter "."-relative names,
@@ -78,32 +100,41 @@ VERSION_REGEXP = $(subst .,\.,$(VERSION))
 PREV_VERSION_REGEXP = $(subst .,\.,$(PREV_VERSION))
 
 ifeq ($(VC),$(GIT))
-this-vc-tag = v$(VERSION)
-this-vc-tag-regexp = v$(VERSION_REGEXP)
+  this-vc-tag = v$(VERSION)
+  this-vc-tag-regexp = v$(VERSION_REGEXP)
 else
-tag-package = $(shell echo "$(PACKAGE)" | tr '[:lower:]' '[:upper:]')
-tag-this-version = $(subst .,_,$(VERSION))
-this-vc-tag = $(tag-package)-$(tag-this-version)
-this-vc-tag-regexp = $(this-vc-tag)
+  tag-package = $(shell echo "$(PACKAGE)" | tr '[:lower:]' '[:upper:]')
+  tag-this-version = $(subst .,_,$(VERSION))
+  this-vc-tag = $(tag-package)-$(tag-this-version)
+  this-vc-tag-regexp = $(this-vc-tag)
 endif
 my_distdir = $(PACKAGE)-$(VERSION)
 
 # Old releases are stored here.
 release_archive_dir ?= ../release
 
+# If RELEASE_TYPE is undefined, but RELEASE is, use its second word.
+# But overwrite VERSION.
+ifdef RELEASE
+  VERSION := $(word 1, $(RELEASE))
+  RELEASE_TYPE ?= $(word 2, $(RELEASE))
+endif
+
+# Validate and return $(RELEASE_TYPE), or die.
+RELEASE_TYPES = alpha beta stable
+release-type = $(call member-check,RELEASE_TYPE,$(RELEASE_TYPES))
+
 # Override gnu_rel_host and url_dir_list in cfg.mk if these are not right.
 # Use alpha.gnu.org for alpha and beta releases.
 # Use ftp.gnu.org for stable releases.
 gnu_ftp_host-alpha = alpha.gnu.org
 gnu_ftp_host-beta = alpha.gnu.org
 gnu_ftp_host-stable = ftp.gnu.org
-gnu_rel_host ?= $(gnu_ftp_host-$(RELEASE_TYPE))
+gnu_rel_host ?= $(gnu_ftp_host-$(release-type))
 
-ifeq ($(gnu_rel_host),ftp.gnu.org)
-url_dir_list ?= http://ftpmirror.gnu.org/$(PACKAGE)
-else
-url_dir_list ?= ftp://$(gnu_rel_host)/gnu/$(PACKAGE)
-endif
+url_dir_list ?= $(if $(call _equal,$(gnu_rel_host),ftp.gnu.org),       \
+                     http://ftpmirror.gnu.org/$(PACKAGE),              \
+                     ftp://$(gnu_rel_host)/gnu/$(PACKAGE))
 
 # Override this in cfg.mk if you are using a different format in your
 # NEWS file.
@@ -132,9 +163,9 @@ syntax-check-rules := $(sort $(shell sed -n 's/^\(sc_[a-zA-Z0-9_-]*\):.*/\1/p' \
 .PHONY: $(syntax-check-rules)
 
 ifeq ($(shell $(VC_LIST) >/dev/null 2>&1; echo $$?),0)
-local-checks-available += $(syntax-check-rules)
+  local-checks-available += $(syntax-check-rules)
 else
-local-checks-available += no-vc-detected
+  local-checks-available += no-vc-detected
 no-vc-detected:
        @echo "No version control files detected; skipping syntax check"
 endif
@@ -330,7 +361,7 @@ sc_prohibit_atoi_atof:
 sp_ = strcmp *\(.+\)
 sc_prohibit_strcmp:
        @prohibit='! *strcmp *\(|\<$(sp_) *[!=]=|[!=]= *$(sp_)'         \
-       exclude=':# *define STRN?EQ\('                                  \
+       exclude='# *define STRN?EQ\('                                   \
        halt='replace strcmp calls above with STREQ/STRNEQ'             \
          $(_sc_search_regexp)
 
@@ -354,7 +385,7 @@ sc_prohibit_strncpy:
 #      perl -pi -e 's/(^|[^.])\b(exit ?)\(0\)/$1$2(EXIT_SUCCESS)/'
 sc_prohibit_magic_number_exit:
        @prohibit='(^|[^.])\<(usage|exit|error) ?\(-?[0-9]+[,)]'        \
-       exclude='error ?\((0,|[^,]*)'                                   \
+       exclude='exit \(77\)|error ?\(((0|77),|[^,]*)'                  \
        halt='use EXIT_* values rather than magic number'               \
          $(_sc_search_regexp)
 
@@ -570,8 +601,6 @@ sc_prohibit_c_ctype_without_use:
        @h='c-ctype.h' re='\<c_($(ctype_re)) *\(' \
          $(_sc_header_without_use)
 
-_empty =
-_sp = $(_empty) $(_empty)
 # The following list was generated by running:
 # man signal.h|col -b|perl -ne '/bsd_signal.*;/.../sigwaitinfo.*;/ and print' \
 #   | perl -lne '/^\s+(?:int|void).*?(\w+).*/ and print $1' | fmt
@@ -724,6 +753,7 @@ sc_require_test_exit_idiom:
 sc_trailing_blank:
        @prohibit='[     ]$$'                                           \
        halt='found trailing blank(s)'                                  \
+       exclude='^Binary file .* matches$$'                             \
          $(_sc_search_regexp)
 
 # Match lines like the following, but where there is only one space
@@ -1134,7 +1164,7 @@ sc_makefile_path_separator_check:
 # i.e., when pkg-M.N.tar.xz already exists (either in "." or in ../release)
 # and is read-only.
 writable-files:
-       if test -d $(release_archive_dir); then                         \
+       $(AM_V_GEN)if test -d $(release_archive_dir); then              \
          for file in $(DIST_ARCHIVES); do                              \
            for p in ./ $(release_archive_dir)/; do                     \
              test -e $$p$$file || continue;                            \
@@ -1216,7 +1246,7 @@ sc_Wundef_boolean:
 # not be constant, or might overflow a stack.  In general, use PATH_MAX as
 # a limit, not an array or alloca size.
 sc_prohibit_path_max_allocation:
-       @prohibit='(\balloca *\([^)]*|\[[^]]*)PATH_MAX'                 \
+       @prohibit='(\balloca *\([^)]*|\[[^]]*)\bPATH_MAX'               \
        halt='Avoid stack allocations of size PATH_MAX'                 \
          $(_sc_search_regexp)
 
@@ -1265,23 +1295,28 @@ gpg_key_ID ?=                                                           \
 translation_project_ ?= coordinator@translationproject.org
 
 # Make info-gnu the default only for a stable release.
-ifeq ($(RELEASE_TYPE),stable)
-  announcement_Cc_ ?= $(translation_project_), $(PACKAGE_BUGREPORT)
-  announcement_mail_headers_ ?=                                                \
-    To: info-gnu@gnu.org                                               \
-    Cc: $(announcement_Cc_)                                            \
-    Mail-Followup-To: $(PACKAGE_BUGREPORT)
-else
-  announcement_Cc_ ?= $(translation_project_)
-  announcement_mail_headers_ ?=                                                \
-    To: $(PACKAGE_BUGREPORT)                                           \
-    Cc: $(announcement_Cc_)
-endif
-
+announcement_Cc_stable = $(translation_project_), $(PACKAGE_BUGREPORT)
+announcement_mail_headers_stable =             \
+  To: info-gnu@gnu.org                         \
+  Cc: $(announcement_Cc_)                      \
+  Mail-Followup-To: $(PACKAGE_BUGREPORT)
+
+announcement_Cc_alpha = $(translation_project_)
+announcement_mail_headers_alpha =              \
+  To: $(PACKAGE_BUGREPORT)                     \
+  Cc: $(announcement_Cc_)
+
+announcement_mail_Cc_beta = $(announcement_mail_Cc_alpha)
+announcement_mail_headers_beta = $(announcement_mail_headers_alpha)
+
+announcement_mail_Cc_ ?= $(announcement_mail_Cc_$(release-type))
+announcement_mail_headers_ ?= $(announcement_mail_headers_$(release-type))
 announcement: NEWS ChangeLog $(rel-files)
-       $(AM_V_GEN)$(srcdir)/$(_build-aux)/announce-gen                 \
+# Not $(AM_V_GEN) since the output of this command serves as
+# annoucement message: it would start with " GEN announcement".
+       $(AM_V_at)$(srcdir)/$(_build-aux)/announce-gen                  \
            --mail-headers='$(announcement_mail_headers_)'              \
-           --release-type=$(RELEASE_TYPE)                              \
+           --release-type=$(release-type)                              \
            --package=$(PACKAGE)                                        \
            --prev=$(PREV_VERSION)                                      \
            --curr=$(VERSION)                                           \
@@ -1308,16 +1343,22 @@ ftp-gnu = ftp://ftp.gnu.org/gnu
 www-gnu = http://www.gnu.org
 
 upload_dest_dir_ ?= $(PACKAGE)
+upload_command =                                               \
+  $(srcdir)/$(_build-aux)/gnupload $(GNUPLOADFLAGS)            \
+  --to $(gnu_rel_host):$(upload_dest_dir_)                     \
+  $(rel-files)
 emit_upload_commands:
        @echo =====================================
        @echo =====================================
-       @echo "$(srcdir)/$(_build-aux)/gnupload $(GNUPLOADFLAGS) \\"
-       @echo "    --to $(gnu_rel_host):$(upload_dest_dir_) \\"
-       @echo "  $(rel-files)"
+       @echo '$(upload_command)'
        @echo '# send the ~/announce-$(my_distdir) e-mail'
        @echo =====================================
        @echo =====================================
 
+.PHONY: upload
+upload:
+       $(AM_V_GEN)$(upload_command)
+
 define emit-commit-log
   printf '%s\n' 'maint: post-release administrivia' ''                 \
     '* NEWS: Add header line for next release.'                                \
@@ -1363,7 +1404,7 @@ public-submodule-commit:
 gl_public_submodule_commit ?= public-submodule-commit
 check: $(gl_public_submodule_commit)
 
-.PHONY: alpha beta stable
+.PHONY: alpha beta stable release
 ALL_RECURSIVE_TARGETS += alpha beta stable
 alpha beta stable: $(local-check) writable-files $(submodule-checks)
        $(AM_V_GEN)test $@ = stable                                     \
@@ -1377,15 +1418,16 @@ alpha beta stable: $(local-check) writable-files $(submodule-checks)
        $(AM_V_at)$(MAKE) $(release-prep-hook) RELEASE_TYPE=$@
        $(AM_V_at)$(MAKE) -s emit_upload_commands RELEASE_TYPE=$@
 
+release:
+       $(AM_V_GEN)$(MAKE) $(release-type)
+
 # Override this in cfg.mk if you follow different procedures.
 release-prep-hook ?= release-prep
 
 gl_noteworthy_news_ = * Noteworthy changes in release ?.? (????-??-??) [?]
 .PHONY: release-prep
 release-prep:
-       $(AM_V_GEN)case $$RELEASE_TYPE in alpha|beta|stable) ;; \
-         *) echo "invalid RELEASE_TYPE: $$RELEASE_TYPE" 1>&2; exit 1;; esac
-       $(AM_V_at)$(MAKE) --no-print-directory -s announcement \
+       $(AM_V_GEN)$(MAKE) --no-print-directory -s announcement \
          > ~/announce-$(my_distdir)
        $(AM_V_at)if test -d $(release_archive_dir); then       \
          ln $(rel-files) $(release_archive_dir);               \
@@ -1575,6 +1617,7 @@ _gl_TS_obj_files ?= *.$(OBJEXT)
 # Files in which to search for the one-line style extern declarations.
 # $(_gl_TS_dir)-relative.
 _gl_TS_headers ?= $(noinst_HEADERS)
+_gl_TS_other_headers ?= *.h
 
 .PHONY: _gl_tight_scope
 _gl_tight_scope: $(bin_PROGRAMS)
@@ -1597,7 +1640,8 @@ _gl_tight_scope: $(bin_PROGRAMS)
          && { echo the above functions should have static scope >&2;   \
               exit 1; } || : ;                                         \
        ( printf '^%s$$\n' '__.*' $(_gl_TS_unmarked_extern_vars);       \
-         perl -lne '$(_gl_TS_var_match) and print "^$$1\$$"' $$hdr *.h \
+         perl -lne '$(_gl_TS_var_match) and print "^$$1\$$"'           \
+               $$hdr $(_gl_TS_other_headers)                           \
        ) | sort -u > $$t;                                              \
        nm -e $(_gl_TS_obj_files) | sed -n 's/.* [BCDGRS] //p'          \
             | sort -u | grep -Ev -f $$t                                        \
index b0ee8c10270bc007175653acb66d17d4c463fcd4..c5cc5c4e0b737141e85aa044748e1676298ed07f 100644 (file)
--- a/patch.man
+++ b/patch.man
@@ -314,10 +314,6 @@ and patches should be generated by
 .B "diff\ \*=binary"
 when line endings are significant.)
 .TP
-\fB\*=read\-only=\fP\fIbehavior\fP
-Behave as requested when trying to modify a read-only file: \fBignore\fP the
-potential problem, \fBwarn\fP about it (the default), or \fBfail\fP.
-.TP
 \fB\-c\fP  or  \fB\*=context\fP
 Interpret the patch file as a ordinary context diff.
 .TP
@@ -591,6 +587,10 @@ Luckily, most patches add or change lines rather than delete them, so most
 reversed normal diffs begin with a delete, which fails, triggering
 the heuristic.)
 .TP
+\fB\*=read\-only=\fP\fIbehavior\fP
+Behave as requested when trying to modify a read-only file: \fBignore\fP the
+potential problem, \fBwarn\fP about it (the default), or \fBfail\fP.
+.TP
 \fB\*=reject\-format=\fP\fIformat\fP
 Produce reject files in the specified \fIformat\fP (either \fBcontext\fP or
 \fBunified\fP).  Without this option, rejected hunks come out in unified diff
@@ -600,6 +600,13 @@ diff form.
 \fB\-s\fP  or  \fB\*=silent\fP  or  \fB\*=quiet\fP
 Work silently, unless an error occurs.
 .TP
+\fB\*=follow\-symlinks\fP
+When looking for input files, follow symbolic links.  Replaces the symbolic
+links, instead of modifying the files the symbolic links point to.  Git-style
+patches to symbolic links will no longer apply.  This option exists for
+backwards compatibility with previous versions of patch; its use is
+discouraged.
+.TP
 \fB\-t\fP  or  \fB\*=batch\fP
 Suppress questions like
 .BR \-f ,
index ef5f5bc475973a286caac6645cc9e8d8ea44f608..24f5082b08429c39e8f55a07e726b7ae45947618 100644 (file)
@@ -1,8 +1,9 @@
-# Makefile.in generated by automake 1.12.2 from Makefile.am.
+# Makefile.in generated by automake 1.11.6 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2012 Free Software Foundation, Inc.
-
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+# Foundation, Inc.
 # This Makefile.in 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.
@@ -69,8 +70,7 @@ bin_PROGRAMS = patch$(EXEEXT)
 @ENABLE_MERGE_TRUE@am__append_1 = merge.c
 @ENABLE_MERGE_TRUE@am__append_2 = -DENABLE_MERGE
 subdir = src
-DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
-       $(top_srcdir)/build-aux/depcomp
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \
        $(top_srcdir)/m4/alloca.m4 $(top_srcdir)/m4/backupfile.m4 \
@@ -155,18 +155,6 @@ patch_OBJECTS = $(am_patch_OBJECTS)
 am__DEPENDENCIES_1 =
 patch_DEPENDENCIES = $(top_builddir)/lib/libpatch.a \
        $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
-AM_V_P = $(am__v_P_@AM_V@)
-am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
-am__v_P_0 = false
-am__v_P_1 = :
-AM_V_GEN = $(am__v_GEN_@AM_V@)
-am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
-am__v_GEN_0 = @echo "  GEN     " $@;
-am__v_GEN_1 = 
-AM_V_at = $(am__v_at_@AM_V@)
-am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
-am__v_at_0 = @
-am__v_at_1 = 
 DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
 depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp
 am__depfiles_maybe = depfiles
@@ -175,14 +163,18 @@ COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
        $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
 AM_V_CC = $(am__v_CC_@AM_V@)
 am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
-am__v_CC_0 = @echo "  CC      " $@;
-am__v_CC_1 = 
+am__v_CC_0 = @echo "  CC    " $@;
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
 CCLD = $(CC)
 LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
 AM_V_CCLD = $(am__v_CCLD_@AM_V@)
 am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
-am__v_CCLD_0 = @echo "  CCLD    " $@;
-am__v_CCLD_1 = 
+am__v_CCLD_0 = @echo "  CCLD  " $@;
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo "  GEN   " $@;
 SOURCES = $(patch_SOURCES)
 DIST_SOURCES = $(am__patch_SOURCES_DIST)
 am__can_run_installinfo = \
@@ -1145,20 +1137,6 @@ GTAGS:
          && $(am__cd) $(top_srcdir) \
          && gtags -i $(GTAGS_ARGS) "$$here"
 
-cscopelist:  $(HEADERS) $(SOURCES) $(LISP)
-       list='$(SOURCES) $(HEADERS) $(LISP)'; \
-       case "$(srcdir)" in \
-         [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
-         *) sdir=$(subdir)/$(srcdir) ;; \
-       esac; \
-       for i in $$list; do \
-         if test -f "$$i"; then \
-           echo "$(subdir)/$$i"; \
-         else \
-           echo "$$sdir/$$i"; \
-         fi; \
-       done >> $(top_builddir)/cscope.files
-
 distclean-tags:
        -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
 
@@ -1301,7 +1279,7 @@ uninstall-am: uninstall-binPROGRAMS
 .MAKE: install-am install-strip
 
 .PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
-       clean-generic cscopelist ctags distclean distclean-compile \
+       clean-generic ctags distclean distclean-compile \
        distclean-generic distclean-tags distdir dvi dvi-am html \
        html-am info info-am install install-am install-binPROGRAMS \
        install-data install-data-am install-dvi install-dvi-am \
index b1e6c9e3b6fbd898dc9d51d50616a0fc28ab19bb..a66e55f280ef8f09d7b2a82eb16c4142b28e3784 100644 (file)
@@ -91,9 +91,9 @@ XTERN char const * TMPINNAME;
 XTERN char const * TMPOUTNAME;
 XTERN char const * TMPPATNAME;
 
-XTERN int TMPINNAME_needs_removal;
-XTERN int TMPOUTNAME_needs_removal;
-XTERN int TMPPATNAME_needs_removal;
+XTERN bool TMPINNAME_needs_removal;
+XTERN bool TMPOUTNAME_needs_removal;
+XTERN bool TMPPATNAME_needs_removal;
 
 #ifdef DEBUGGING
 XTERN int debug;
@@ -111,6 +111,7 @@ XTERN bool canonicalize;
 XTERN int patch_get;
 XTERN bool set_time;
 XTERN bool set_utc;
+XTERN bool follow_symlinks;
 
 enum diff
   {
index 63875877dc48bfda8bd2449e03c0996aa7fa2d8c..386dc9e9a69bbbc672972cb0fd4f8d370c906f38 100644 (file)
--- a/src/inp.c
+++ b/src/inp.c
@@ -130,7 +130,7 @@ too_many_lines (char const *filename)
 
 
 bool
-get_input_file (char const *filename, char const *outname, mode_t mode)
+get_input_file (char const *filename, char const *outname, mode_t file_type)
 {
     bool elsewhere = strcmp (filename, outname) != 0;
     char const *cs;
@@ -138,10 +138,10 @@ get_input_file (char const *filename, char const *outname, mode_t mode)
     char *getbuf;
 
     if (inerrno == -1)
-      inerrno = lstat (filename, &instat) == 0 ? 0 : errno;
+      inerrno = stat_file (filename, &instat);
 
     /* Perhaps look for RCS or SCCS versions.  */
-    if (S_ISREG (mode)
+    if (S_ISREG (file_type)
        && patch_get
        && invc != 0
        && (inerrno
@@ -195,12 +195,12 @@ get_input_file (char const *filename, char const *outname, mode_t mode)
        instat.st_mode = S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH;
        instat.st_size = 0;
       }
-    else if (! ((S_ISREG (mode) || S_ISLNK (mode))
-               && (mode & S_IFMT) == (instat.st_mode & S_IFMT)))
+    else if (! ((S_ISREG (file_type) || S_ISLNK (file_type))
+               && (file_type & S_IFMT) == (instat.st_mode & S_IFMT)))
       {
-       say ("File %s is not a %s -- can't patch\n",
+       say ("File %s is not a %s -- refusing to patch\n",
             quotearg (filename),
-            S_ISLNK (mode) ? "symbolic link" : "regular file");
+            S_ISLNK (file_type) ? "symbolic link" : "regular file");
        return false;
       }
     return true;
@@ -356,7 +356,7 @@ plan_b (char const *filename)
     {
       tifd = make_tempfile (&TMPINNAME, 'i', NULL, O_RDWR | O_BINARY,
                            S_IRUSR | S_IWUSR);
-      TMPINNAME_needs_removal = 1;
+      TMPINNAME_needs_removal = true;
     }
   i = 0;
   len = 0;
index febfd42354b248465674d5ebfbcbdbb819ac10e9..828943b9d7b16a46494b50cd859a6c6b4b954b5b 100644 (file)
@@ -38,6 +38,7 @@
 
 static FILE *create_output_file (char const *, int);
 static lin locate_hunk (lin);
+static bool check_line_endings (lin);
 static bool apply_hunk (struct outstate *, lin);
 static bool patch_match (lin, lin, lin, lin);
 static bool spew_output (struct outstate *, struct stat *);
@@ -48,14 +49,14 @@ static void init_output (struct outstate *);
 static FILE *open_outfile (char const *);
 static void init_reject (char const *);
 static void reinitialize_almost_everything (void);
-static void remove_if_needed (char const *, int *);
+static void remove_if_needed (char const *, bool *);
 static void usage (FILE *, int) __attribute__((noreturn));
 
 static void abort_hunk (char const *, bool, bool);
 static void abort_hunk_context (bool, bool);
 static void abort_hunk_unified (bool, bool);
 
-static void output_file (char const *, int *, const struct stat *, char const *,
+static void output_file (char const *, bool *, const struct stat *, char const *,
                         const struct stat *, mode_t, bool);
 
 static void init_files_to_delete (void);
@@ -95,7 +96,7 @@ static FILE *rejfp;  /* reject file pointer */
 static char const *patchname;
 static char *rejname;
 static char const * TMPREJNAME;
-static int TMPREJNAME_needs_removal;
+static bool TMPREJNAME_needs_removal;
 
 static lin maxfuzz = 2;
 
@@ -196,8 +197,12 @@ main (int argc, char **argv)
 
       if (have_git_diff != pch_git_diff ())
        {
+         if (have_git_diff)
+           {
+             output_files (NULL);
+             inerrno = -1;
+           }
          have_git_diff = ! have_git_diff;
-         output_files (NULL);
        }
 
       if (TMPREJNAME_needs_removal)
@@ -251,19 +256,19 @@ main (int argc, char **argv)
          if (! strcmp (inname, outname))
            {
              if (inerrno == -1)
-               inerrno = lstat (inname, &instat) ? errno : 0;
+               inerrno = stat_file (inname, &instat);
              outstat = instat;
              outerrno = inerrno;
            }
          else
-           outerrno = lstat (outname, &outstat) ? errno : 0;
+           outerrno = stat_file (outname, &outstat);
 
          if (! outerrno)
            {
              if (has_queued_output (&outstat))
                {
                  output_files (&outstat);
-                 outerrno = lstat (outname, &outstat) ? errno : 0;
+                 outerrno = stat_file (outname, &outstat);
                  inerrno = -1;
                }
              if (! outerrno)
@@ -297,8 +302,9 @@ main (int argc, char **argv)
 
       tmpoutst.st_size = -1;
       outfd = make_tempfile (&TMPOUTNAME, 'o', outname,
-                            O_WRONLY | binary_transput, instat.st_mode);
-      TMPOUTNAME_needs_removal = 1;
+                            O_WRONLY | binary_transput,
+                            instat.st_mode & S_IRWXUGO);
+      TMPOUTNAME_needs_removal = true;
       if (diff_type == ED_DIFF) {
        outstate.zero_output = false;
        somefailed |= skip_rest_of_patch;
@@ -339,7 +345,8 @@ main (int argc, char **argv)
              {
                bool renamed = strcmp (inname, outname);
 
-               say ("patching %s %s%c",
+               say ("%s %s %s%c",
+                    dry_run ? "checking" : "patching",
                     S_ISLNK (file_type) ? "symbolic link" : "file",
                     quotearg (outname), renamed ? ' ' : '\n');
                if (renamed)
@@ -440,9 +447,11 @@ main (int argc, char **argv)
                failed++;
                if (verbosity == VERBOSE ||
                    (! skip_rest_of_patch && verbosity != SILENT))
-                 say ("Hunk #%d %s at %s.\n", hunk,
+                 say ("Hunk #%d %s at %s%s.\n", hunk,
                       skip_rest_of_patch ? "ignored" : "FAILED",
-                      format_linenum (numbuf, newwhere));
+                      format_linenum (numbuf, newwhere),
+                      ! skip_rest_of_patch && check_line_endings (newwhere)
+                        ?  " (different line endings)" : "");
              }
            else if (! merge &&
                     (verbosity == VERBOSE
@@ -503,12 +512,14 @@ main (int argc, char **argv)
          else
            {
              if (! outstate.zero_output
-                 && pch_says_nonexistent (! reverse)
+                 && pch_says_nonexistent (! reverse) == 2
+                 && (remove_empty_files || ! posixly_correct)
                  && ! (merge && somefailed))
                {
                  mismatch = true;
+                 somefailed = true;
                  if (verbosity != SILENT)
-                   say ("File %s is not empty after patch, as expected\n",
+                   say ("File %s is not empty after patch; not deleting\n",
                         quotearg (outname));
                }
 
@@ -593,9 +604,9 @@ main (int argc, char **argv)
                      rej[len - 1] = '#';
                    simple_backup_suffix = s;
                }
-               say (" -- saving rejects to file %s\n", quotearg (rej));
                if (! dry_run)
                  {
+                   say (" -- saving rejects to file %s\n", quotearg (rej));
                    if (rejname)
                      {
                        if (! written_to_rejname)
@@ -612,7 +623,7 @@ main (int argc, char **argv)
                        struct stat oldst;
                        int olderrno;
 
-                       olderrno = lstat (rej, &oldst) ? errno : 0;
+                       olderrno = stat_file (rej, &oldst);
                        if (olderrno && olderrno != ENOENT)
                          write_fatal ();
                        if (! olderrno && lookup_file_id (&oldst) == CREATED)
@@ -622,6 +633,8 @@ main (int argc, char **argv)
                                     &rejst, rej, S_IFREG | 0666, false);
                      }
                  }
+               else
+                 say ("\n");
                if (!rejname)
                    free (rej);
            } else
@@ -720,6 +733,7 @@ static struct option const longopts[] =
   {"quoting-style", required_argument, NULL, CHAR_MAX + 8},
   {"reject-format", required_argument, NULL, CHAR_MAX + 9},
   {"read-only", required_argument, NULL, CHAR_MAX + 10},
+  {"follow-symlinks", no_argument, NULL, CHAR_MAX + 11},
   {NULL, no_argument, NULL, 0}
 };
 
@@ -1011,6 +1025,9 @@ get_some_switches (void)
                else
                  usage (stderr, 2);
                break;
+           case CHAR_MAX + 11:
+               follow_symlinks = true;
+               break;
            default:
                usage (stderr, 2);
        }
@@ -1556,7 +1573,7 @@ init_reject (char const *outname)
   int fd;
   fd = make_tempfile (&TMPREJNAME, 'r', outname, O_WRONLY | binary_transput,
                      0666);
-  TMPREJNAME_needs_removal = 1;
+  TMPREJNAME_needs_removal = true;
   rejfp = fdopen (fd, binary_transput ? "wb" : "w");
   if (! rejfp)
     pfatal ("Can't open stream for file %s", quotearg (TMPREJNAME));
@@ -1649,6 +1666,33 @@ patch_match (lin base, lin offset, lin prefix_fuzz, lin suffix_fuzz)
     return true;
 }
 
+/* Check if the line endings in the input file and in the patch differ. */
+
+static bool
+check_line_endings (lin where)
+{
+  char const *p;
+  size_t size;
+  bool input_crlf, patch_crlf;
+
+  p = pfetch (1);
+  size = pch_line_len (1);
+  if (! size)
+    return false;
+  patch_crlf = size >= 2 && p[size - 2] == '\r' && p[size - 1] == '\n';
+
+  if (! input_lines)
+    return false;
+  if (where > input_lines)
+    where = input_lines;
+  p = ifetch (where, false, &size);
+  if (! size)
+    return false;
+  input_crlf = size >= 2 && p[size - 2] == '\r' && p[size - 1] == '\n';
+
+  return patch_crlf != input_crlf;
+}
+
 /* Do two lines match with canonicalized white space? */
 
 bool
@@ -1705,7 +1749,7 @@ delete_file_later (const char *name, const struct stat *st, bool backup)
 
   if (! st)
     {
-      if (lstat (name, &st_tmp) != 0)
+      if (stat_file (name, &st_tmp) != 0)
        pfatal ("Can't get file attributes of %s %s", "file", name);
       st = &st_tmp;
     }
@@ -1757,7 +1801,7 @@ struct file_to_output {
 static gl_list_t files_to_output;
 
 static void
-output_file_later (char const *from, int *from_needs_removal, const struct stat *from_st,
+output_file_later (char const *from, bool *from_needs_removal, const struct stat *from_st,
                   char const *to, mode_t mode, bool backup)
 {
   struct file_to_output *file_to_output;
@@ -1770,11 +1814,11 @@ output_file_later (char const *from, int *from_needs_removal, const struct stat
   file_to_output->backup = backup;
   gl_list_add_last (files_to_output, file_to_output);
   if (from_needs_removal)
-    *from_needs_removal = 0;
+    *from_needs_removal = false;
 }
 
 static void
-output_file_now (char const *from, int *from_needs_removal,
+output_file_now (char const *from, bool *from_needs_removal,
                 const struct stat *from_st, char const *to,
                 mode_t mode, bool backup)
 {
@@ -1791,7 +1835,7 @@ output_file_now (char const *from, int *from_needs_removal,
 }
 
 static void
-output_file (char const *from, int *from_needs_removal,
+output_file (char const *from, bool *from_needs_removal,
             const struct stat *from_st, char const *to,
             const struct stat *to_st, mode_t mode, bool backup)
 {
@@ -1858,13 +1902,13 @@ output_files (struct stat const *st)
   while (gl_list_iterator_next (&iter, &elt, NULL))
     {
       const struct file_to_output *file_to_output = elt;
-      int from_needs_removal = 1;
+      bool from_needs_removal = true;
       struct stat const *from_st = &file_to_output->from_st;
 
       output_file_now (file_to_output->from, &from_needs_removal,
                       from_st, file_to_output->to,
                       file_to_output->mode, file_to_output->backup);
-      if (from_needs_removal)
+      if (file_to_output->to && from_needs_removal)
        unlink (file_to_output->from);
 
       if (st && st->st_dev == from_st->st_dev && st->st_ino == from_st->st_ino)
@@ -1915,12 +1959,12 @@ fatal_exit (int sig)
 }
 
 static void
-remove_if_needed (char const *name, int *needs_removal)
+remove_if_needed (char const *name, bool *needs_removal)
 {
   if (*needs_removal)
     {
       unlink (name);
-      *needs_removal = 0;
+      *needs_removal = false;
     }
 }
 
index 9661be254c19eaffbffc874ffc6b2ee62724d951..75a642bc7d48a188e8784d59b7b3d5cf2799b7c7 100644 (file)
--- a/src/pch.c
+++ b/src/pch.c
@@ -138,7 +138,7 @@ open_patch_file (char const *filename)
        size_t charsread;
        int fd = make_tempfile (&TMPPATNAME, 'p', NULL, O_RDWR | O_BINARY, 0);
        FILE *read_pfp = pfp;
-       TMPPATNAME_needs_removal = 1;
+       TMPPATNAME_needs_removal = true;
        pfp = fdopen (fd, "w+b");
        if (! pfp)
          pfatal ("Can't open stream for file %s", quotearg (TMPPATNAME));
@@ -266,7 +266,7 @@ there_is_another_patch (bool need_header, mode_t *file_type)
          say ("(Patch is indented %lu space%s.)\n",
               (unsigned long int) p_indent, p_indent==1?"":"s");
        if (p_strip_trailing_cr)
-         say ("(Stripping trailing CRs from patch.)\n");
+         say ("(Stripping trailing CRs from patch; use --binary to disable.)\n");
        if (! inname)
          {
            char numbuf[LINENUM_LENGTH_BOUND + 1];
@@ -293,18 +293,16 @@ there_is_another_patch (bool need_header, mode_t *file_type)
          {
            inname = savebuf (buf, t - buf);
            inname[t - buf - 1] = 0;
-           if (lstat (inname, &instat) == 0)
-             {
-               inerrno = 0;
-               invc = -1;
-             }
-           else
+           inerrno = stat_file (inname, &instat);
+           if (inerrno)
              {
                perror (inname);
                fflush (stderr);
                free (inname);
                inname = 0;
              }
+           else
+             invc = -1;
          }
        if (!inname) {
            ask ("Skip this patch? [y] ");
@@ -389,6 +387,29 @@ skip_hex_digits (char const *str)
   return s == str ? NULL : s;
 }
 
+/* Check if we are in the root of a particular filesystem namespace ("/" on
+   UNIX or a particular drive's root on DOS-like systems).  */
+static bool
+cwd_is_root (char const *name)
+{
+  unsigned int prefix_len = FILE_SYSTEM_PREFIX_LEN (name);
+  char root[prefix_len + 2];
+  struct stat st;
+  dev_t root_dev;
+  ino_t root_ino;
+
+  memcpy (root, name, prefix_len);
+  root[prefix_len] = '/';
+  root[prefix_len + 1] = 0;
+  if (stat (root, &st))
+    return false;
+  root_dev = st.st_dev;
+  root_ino = st.st_ino;
+  if (stat (".", &st))
+    return false;
+  return root_dev == st.st_dev && root_ino == st.st_ino;
+}
+
 static bool
 name_is_valid (char const *name)
 {
@@ -420,6 +441,10 @@ name_is_valid (char const *name)
          n++;
       }
 
+  /* Allow any filename if we are in the filesystem root.  */
+  if (! is_valid && cwd_is_root (name))
+    is_valid = true;
+
   if (! is_valid)
     {
       say ("Ignoring potentially dangerous file name %s\n", quotearg (name));
@@ -887,15 +912,16 @@ intuit_diff_type (bool need_header, mode_t *p_file_type)
                  if (! stat_errno[i])
                    st[i] = st[i0];
                }
-             else if (lstat (p_name[i], &st[i]) != 0)
-               stat_errno[i] = errno;
-             else if (lookup_file_id (&st[i]) == DELETE_LATER)
-               stat_errno[i] = ENOENT;
              else
                {
-                 stat_errno[i] = 0;
-                 if (posixly_correct && name_is_valid (p_name[i]))
-                   break;
+                 stat_errno[i] = stat_file (p_name[i], &st[i]);
+                 if (! stat_errno[i])
+                   {
+                     if (lookup_file_id (&st[i]) == DELETE_LATER)
+                       stat_errno[i] = ENOENT;
+                     else if (posixly_correct && name_is_valid (p_name[i]))
+                       break;
+                   }
                }
              i0 = i;
            }
@@ -980,7 +1006,7 @@ intuit_diff_type (bool need_header, mode_t *p_file_type)
       {
        if (inname)
          {
-           inerrno = lstat (inname, &instat) == 0 ? 0 : errno;
+           inerrno = stat_file (inname, &instat);
            if (inerrno || (instat.st_mode & S_IFMT) == file_type)
              maybe_reverse (inname, inerrno, inerrno || instat.st_size == 0);
          }
@@ -1015,7 +1041,7 @@ prefix_components (char *filename, bool checkdirs)
          if (checkdirs)
            {
              *f = '\0';
-             stat_result = lstat (filename, &stat_buf);
+             stat_result = stat (filename, &stat_buf);
              *f = '/';
              if (! (stat_result == 0 && S_ISDIR (stat_buf.st_mode)))
                break;
@@ -2350,7 +2376,7 @@ get_ed_command_letter (char const *line)
 
 void
 do_ed_script (char const *inname, char const *outname,
-             int *outname_needs_removal, FILE *ofp)
+             bool *outname_needs_removal, FILE *ofp)
 {
     static char const editor_program[] = EDITOR_PROGRAM;
 
@@ -2361,7 +2387,7 @@ do_ed_script (char const *inname, char const *outname,
     if (! dry_run && ! skip_rest_of_patch) {
        int exclusive = *outname_needs_removal ? 0 : O_EXCL;
        assert (! inerrno);
-       *outname_needs_removal = 1;
+       *outname_needs_removal = true;
        copy_file (inname, outname, 0, exclusive, instat.st_mode, true);
        sprintf (buf, "%s %s%s", editor_program,
                 verbosity == VERBOSE ? "" : "- ",
index e545cb18b6afc2d69e036e68253fbf254a131960..0c7ff62123c3d22f2b77b677dd116fe42e3d3a57 100644 (file)
--- a/src/pch.h
+++ b/src/pch.h
@@ -43,7 +43,7 @@ size_t pch_line_len (lin) _GL_ATTRIBUTE_PURE;
 const char *pch_name(enum nametype) _GL_ATTRIBUTE_PURE;
 bool pch_copy (void) _GL_ATTRIBUTE_PURE;
 bool pch_rename (void) _GL_ATTRIBUTE_PURE;
-void do_ed_script (char const *, char const *, int *, FILE *);
+void do_ed_script (char const *, char const *, bool *, FILE *);
 void open_patch_file (char const *);
 void re_patch (void);
 void set_hunkmax (void);
index e8e2ad4a9ba8729a81a2801287b94b1f6e8949f0..1cc1a683df0e026e2cbd89ddb152498fd284a72c 100644 (file)
@@ -179,10 +179,13 @@ copy_attr_error (struct error_context *ctx, char const *fmt, ...)
   int err = errno;
   va_list ap;
 
-  /* use verror module to print error message */
-  va_start (ap, fmt);
-  verror (0, err, fmt, ap);
-  va_end (ap);
+  if (err != ENOSYS && err != ENOTSUP && err != EPERM)
+    {
+      /* use verror module to print error message */
+      va_start (ap, fmt);
+      verror (0, err, fmt, ap);
+      va_end (ap);
+    }
 }
 
 static char const *
@@ -274,9 +277,9 @@ set_file_attributes (char const *to, enum file_attributes attr,
                quotearg (to));
     }
   if (attr & FA_XATTRS)
-    if (copy_attr (from, to))
+    if (copy_attr (from, to) != 0
+       && errno != ENOSYS && errno != ENOTSUP && errno != EPERM)
       fatal_exit (0);
-  /* FIXME: There may be other attributes to preserve.  */
   if (attr & FA_MODE)
     {
 #if 0 && defined HAVE_LCHMOD
@@ -430,14 +433,14 @@ create_backup (char const *to, const struct stat *to_st, bool leave_original)
    Back up TO if BACKUP is true.  */
 
 void
-move_file (char const *from, int *from_needs_removal,
+move_file (char const *from, bool *from_needs_removal,
           struct stat const *fromst,
           char const *to, mode_t mode, bool backup)
 {
   struct stat to_st;
   int to_errno;
 
-  to_errno = lstat (to, &to_st) == 0 ? 0 : errno;
+  to_errno = stat_file (to, &to_st);
   if (backup)
     create_backup (to, to_errno ? NULL : &to_st, false);
   if (! to_errno)
@@ -525,7 +528,7 @@ move_file (char const *from, int *from_needs_removal,
          if ((0 < to_errno
               || (to_errno == 0 && to_st.st_nlink <= 1))
              && from_needs_removal)
-           *from_needs_removal = 0;
+           *from_needs_removal = false;
        }
     }
   else if (! backup)
@@ -1649,3 +1652,11 @@ make_tempfile (char const **name, char letter, char const *real_name,
       return fd;
     }
 }
+
+int stat_file (char const *filename, struct stat *st)
+{
+  int (*xstat)(char const *, struct stat *) =
+    follow_symlinks ? stat : lstat;
+
+  return xstat (filename, st) == 0 ? 0 : errno;
+}
index d1bf495eb4a512b334dfb753422880e28138e127..9a7946fd4d28e91b2f40243d8d57591b4d92518e 100644 (file)
@@ -58,7 +58,7 @@ void init_backup_hash_table (void);
 void init_time (void);
 void xalloc_die (void) __attribute__ ((noreturn));
 void create_backup (char const *, const struct stat *, bool);
-void move_file (char const *, int *, struct stat const *, char const *, mode_t, bool);
+void move_file (char const *, bool *, struct stat const *, char const *, mode_t, bool);
 void read_fatal (void) __attribute__ ((noreturn));
 void remove_prefix (char *, size_t);
 void removedirs (char const *);
@@ -68,6 +68,7 @@ void insert_file_id (struct stat const *, enum file_id_type);
 enum file_id_type lookup_file_id (struct stat const *);
 void set_queued_output (struct stat const *, bool);
 bool has_queued_output (struct stat const *);
+int stat_file (char const *, struct stat *);
 
 enum file_attributes {
   FA_TIMES = 1,
index f5abab3dead67979a1bf7a1d0a1ec19303f639e7..aa47a0754f509db30aef821cb04af494bebb522b 100644 (file)
@@ -1,8 +1,9 @@
-# Makefile.in generated by automake 1.12.2 from Makefile.am.
+# Makefile.in generated by automake 1.11.6 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2012 Free Software Foundation, Inc.
-
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+# Foundation, Inc.
 # This Makefile.in 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.
@@ -65,8 +66,7 @@ POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
 subdir = tests
-DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
-       $(top_srcdir)/build-aux/test-driver
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \
        $(top_srcdir)/m4/alloca.m4 $(top_srcdir)/m4/backupfile.m4 \
@@ -140,18 +140,12 @@ mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
-AM_V_P = $(am__v_P_@AM_V@)
-am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
-am__v_P_0 = false
-am__v_P_1 = :
 AM_V_GEN = $(am__v_GEN_@AM_V@)
 am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
-am__v_GEN_0 = @echo "  GEN     " $@;
-am__v_GEN_1 = 
+am__v_GEN_0 = @echo "  GEN   " $@;
 AM_V_at = $(am__v_at_@AM_V@)
 am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
 am__v_at_0 = @
-am__v_at_1 = 
 SOURCES =
 DIST_SOURCES =
 am__can_run_installinfo = \
@@ -159,27 +153,20 @@ am__can_run_installinfo = \
     n|no|NO) false;; \
     *) (install-info --version) >/dev/null 2>&1;; \
   esac
-am__tty_colors_dummy = \
-  mgn= red= grn= lgn= blu= brg= std=; \
-  am__color_tests=no
-am__tty_colors = { \
-  $(am__tty_colors_dummy); \
-  if test "X$(AM_COLOR_TESTS)" = Xno; then \
-    am__color_tests=no; \
-  elif test "X$(AM_COLOR_TESTS)" = Xalways; then \
-    am__color_tests=yes; \
-  elif test "X$$TERM" != Xdumb && { test -t 1; } 2>/dev/null; then \
-    am__color_tests=yes; \
-  fi; \
-  if test $$am__color_tests = yes; then \
-    red='\e[0;31m'; \
-    grn='\e[0;32m'; \
-    lgn='\e[1;32m'; \
-    blu='\e[1;34m'; \
-    mgn='\e[0;35m'; \
-    brg='\e[1m'; \
-    std='\e[m'; \
-  fi; \
+# If stdout is a non-dumb tty, use colors.  If test -t is not supported,
+# then this fails; a conservative approach.  Of course do not redirect
+# stdout here, just stderr.
+am__tty_colors = \
+red=; grn=; lgn=; blu=; std=; \
+test "X$(AM_COLOR_TESTS)" != Xno \
+&& test "X$$TERM" != Xdumb \
+&& { test "X$(AM_COLOR_TESTS)" = Xalways || test -t 1 2>/dev/null; } \
+&& { \
+  red='\e[0;31m'; \
+  grn='\e[0;32m'; \
+  lgn='\e[1;32m'; \
+  blu='\e[1;34m'; \
+  std='\e[m'; \
 }
 am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
 am__vpath_adj = case $$p in \
@@ -208,161 +195,91 @@ am__uninstall_files_from_dir = { \
     || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
          $(am__cd) "$$dir" && rm -f $$files; }; \
   }
-am__recheck_rx = ^[    ]*:recheck:[    ]*
-am__global_test_result_rx = ^[         ]*:global-test-result:[         ]*
-am__copy_in_global_log_rx = ^[         ]*:copy-in-global-log:[         ]*
-# A command that, given a newline-separated list of test names on the
-# standard input, print the name of the tests that are to be re-run
-# upon "make recheck".
-am__list_recheck_tests = $(AWK) '{ \
-  recheck = 1; \
-  while ((rc = (getline line < ($$0 ".trs"))) != 0) \
-    { \
-      if (rc < 0) \
-        { \
-          if ((getline line2 < ($$0 ".log")) < 0) \
-           recheck = 0; \
-          break; \
-        } \
-      else if (line ~ /$(am__recheck_rx)[nN][Oo]/) \
-        { \
-          recheck = 0; \
-          break; \
-        } \
-      else if (line ~ /$(am__recheck_rx)[yY][eE][sS]/) \
-        { \
-          break; \
-        } \
-    }; \
-  if (recheck) \
-    print $$0; \
-  close ($$0 ".trs"); \
-  close ($$0 ".log"); \
-}'
-# A command that, given a newline-separated list of test names on the
-# standard input, create the global log from their .trs and .log files.
-am__create_global_log = $(AWK) ' \
-function fatal(msg) \
-{ \
-  print "fatal: making $@: " msg | "cat >&2"; \
-  exit 1; \
-} \
-function rst_section(header) \
-{ \
-  print header; \
-  len = length(header); \
-  for (i = 1; i <= len; i = i + 1) \
-    printf "="; \
-  printf "\n\n"; \
-} \
-{ \
-  copy_in_global_log = 1; \
-  global_test_result = "RUN"; \
-  while ((rc = (getline line < ($$0 ".trs"))) != 0) \
-    { \
-      if (rc < 0) \
-         fatal("failed to read from " $$0 ".trs"); \
-      if (line ~ /$(am__global_test_result_rx)/) \
-        { \
-          sub("$(am__global_test_result_rx)", "", line); \
-          sub("[       ]*$$", "", line); \
-          global_test_result = line; \
-        } \
-      else if (line ~ /$(am__copy_in_global_log_rx)[nN][oO]/) \
-        copy_in_global_log = 0; \
-    }; \
-  if (copy_in_global_log) \
-    { \
-      rst_section(global_test_result ": " $$0); \
-      while ((rc = (getline line < ($$0 ".log"))) != 0) \
-      { \
-        if (rc < 0) \
-          fatal("failed to read from " $$0 ".log"); \
-        print line; \
-      }; \
-      printf "\n"; \
-    }; \
-  close ($$0 ".trs"); \
-  close ($$0 ".log"); \
+# Restructured Text title and section.
+am__rst_title = sed 's/.*/   &   /;h;s/./=/g;p;x;p;g;p;s/.*//'
+am__rst_section = sed 'p;s/./=/g;p;g'
+# Put stdin (possibly several lines separated by ".  ") in a box.
+# Prefix each line by 'col' and terminate each with 'std', for coloring.
+# Multi line coloring is problematic with "less -R", so we really need
+# to color each line individually.
+am__text_box = $(AWK) '{                       \
+  n = split($$0, lines, "\\.  "); max = 0;     \
+  for (i = 1; i <= n; ++i)                     \
+    if (max < length(lines[i]))                        \
+      max = length(lines[i]);                  \
+  for (i = 0; i < max; ++i)                    \
+    line = line "=";                           \
+  print col line std;                          \
+  for (i = 1; i <= n; ++i)                     \
+    if (lines[i])                              \
+      print col lines[i] std;                  \
+  print col line std;                          \
 }'
-# Restructured Text title.
-am__rst_title = { sed 's/.*/   &   /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; }
 # Solaris 10 'make', and several other traditional 'make' implementations,
 # pass "-e" to $(SHELL), and POSIX 2008 even requires this.  Work around it
 # by disabling -e (using the XSI extension "set +e") if it's set.
 am__sh_e_setup = case $$- in *e*) set +e;; esac
-# Default flags passed to test drivers.
-am__common_driver_flags = \
-  --color-tests "$$am__color_tests" \
-  --enable-hard-errors "$$am__enable_hard_errors" \
-  --expect-failure "$$am__expect_failure"
 # To be inserted before the command running the test.  Creates the
 # directory for the log if needed.  Stores in $dir the directory
-# containing $f, in $tst the test, in $log the log.  Executes the
-# developer- defined test setup AM_TESTS_ENVIRONMENT (if any), and
-# passes TESTS_ENVIRONMENT.  Set up options for the wrapper that
-# will run the test scripts (or their associated LOG_COMPILER, if
-# thy have one).
+# containing $f, in $tst the test, in $log the log, and passes
+# TESTS_ENVIRONMENT.  Save and restore TERM around use of
+# TESTS_ENVIRONMENT, in case that unsets it.
 am__check_pre = \
 $(am__sh_e_setup);                                     \
 $(am__vpath_adj_setup) $(am__vpath_adj)                        \
-$(am__tty_colors);                                     \
 srcdir=$(srcdir); export srcdir;                       \
-case "$@" in                                           \
-  */*) am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`;;   \
-    *) am__odir=.;;                                    \
-esac;                                                  \
-test "x$$am__odir" = x"." || test -d "$$am__odir"      \
-  || $(MKDIR_P) "$$am__odir" || exit $$?;              \
+rm -f $@-t;                                            \
+am__trap='rm -f '\''$(abs_builddir)/$@-t'\''; (exit $$st); exit $$st'; \
+trap "st=129; $$am__trap" 1; trap "st=130; $$am__trap" 2;      \
+trap "st=141; $$am__trap" 13; trap "st=143; $$am__trap" 15; \
+am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`;           \
+test "x$$am__odir" = x. || $(MKDIR_P) "$$am__odir" || exit $$?;        \
 if test -f "./$$f"; then dir=./;                       \
 elif test -f "$$f"; then dir=;                         \
 else dir="$(srcdir)/"; fi;                             \
-tst=$$dir$$f; log='$@';                                \
-if test -n '$(DISABLE_HARD_ERRORS)'; then              \
-  am__enable_hard_errors=no;                           \
-else                                                   \
-  am__enable_hard_errors=yes;                          \
-fi;                                                    \
+tst=$$dir$$f; log='$@'; __SAVED_TERM=$$TERM;           \
+$(TESTS_ENVIRONMENT)
+# To be appended to the command running the test.  Handle the stdout
+# and stderr redirection, and catch the exit status.
+am__check_post = \
+>$@-t 2>&1;                                            \
+estatus=$$?;                                           \
+if test -n '$(DISABLE_HARD_ERRORS)'                    \
+   && test $$estatus -eq 99; then                      \
+  estatus=1;                                           \
+fi;                                                    \
+TERM=$$__SAVED_TERM; export TERM;                      \
+$(am__tty_colors);                                     \
+xfailed=PASS;                                          \
 case " $(XFAIL_TESTS) " in                             \
   *[\ \        ]$$f[\ \        ]* | *[\ \      ]$$dir$$f[\ \   ]*) \
-    am__expect_failure=yes;;                           \
-  *)                                                   \
-    am__expect_failure=no;;                            \
-esac;                                                  \
-$(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT)
-# A shell command to get the names of the tests scripts with any registered
-# extension removed (i.e., equivalently, the names of the test logs, with
-# the '.log' extension removed).  The result is saved in the shell variable
-# '$bases'.  This honors runtime overriding of TESTS and TEST_LOGS.  Sadly,
-# we cannot use something simpler, involving e.g., "$(TEST_LOGS:.log=)",
-# since that might cause problem with VPATH rewrites for suffix-less tests.
-# See also 'test-harness-vpath-rewrite.test' and 'test-trs-basic.test'.
-am__set_TESTS_bases = \
-  bases='$(TEST_LOGS)'; \
-  bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \
-  bases=`echo $$bases`
+    xfailed=XFAIL;;                                    \
+esac;                                                  \
+case $$estatus.$$xfailed in                            \
+    0.XFAIL) col=$$red; res=XPASS;;                    \
+    0.*)     col=$$grn; res=PASS ;;                    \
+    77.*)    col=$$blu; res=SKIP ;;                    \
+    99.*)    col=$$red; res=FAIL ;;                    \
+    *.XFAIL) col=$$lgn; res=XFAIL;;                    \
+    *.*)     col=$$red; res=FAIL ;;                    \
+esac;                                                  \
+echo "$${col}$$res$${std}: $$f";                       \
+echo "$$res: $$f (exit: $$estatus)" |                  \
+  $(am__rst_section) >$@;                              \
+cat $@-t >>$@;                                         \
+rm -f $@-t
 RECHECK_LOGS = $(TEST_LOGS)
-AM_RECURSIVE_TARGETS = check recheck
+AM_RECURSIVE_TARGETS = check recheck check-html recheck-html
+TEST_SUITE_HTML = $(TEST_SUITE_LOG:.log=.html)
 TEST_SUITE_LOG = test-suite.log
 TEST_EXTENSIONS = @EXEEXT@ .test
-LOG_DRIVER = $(SHELL) $(top_srcdir)/build-aux/test-driver
 LOG_COMPILE = $(LOG_COMPILER) $(AM_LOG_FLAGS) $(LOG_FLAGS)
-am__set_b = \
-  case '$@' in \
-    */*) \
-      case '$*' in \
-        */*) b='$*';; \
-          *) b=`echo '$@' | sed 's/\.log$$//'`; \
-       esac;; \
-    *) \
-      b='$*';; \
-  esac
 am__test_logs1 = $(TESTS:=.log)
 am__test_logs2 = $(am__test_logs1:@EXEEXT@.log=.log)
 TEST_LOGS = $(am__test_logs2:.test.log=.log)
-TEST_LOG_DRIVER = $(SHELL) $(top_srcdir)/build-aux/test-driver
 TEST_LOG_COMPILE = $(TEST_LOG_COMPILER) $(AM_TEST_LOG_FLAGS) \
        $(TEST_LOG_FLAGS)
+TEST_LOGS_TMP = $(TEST_LOGS:.log=.log-t)
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 pkglibexecdir = @pkglibexecdir@
 ACLOCAL = @ACLOCAL@
@@ -1207,7 +1124,7 @@ LOG_COMPILER = \
 all: all-am
 
 .SUFFIXES:
-.SUFFIXES: .log .test .test$(EXEEXT) .trs
+.SUFFIXES: .html .log .test .test$(EXEEXT)
 $(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
        @for dep in $?; do \
          case '$(am__configure_deps)' in \
@@ -1244,402 +1161,205 @@ TAGS:
 ctags: CTAGS
 CTAGS:
 
-cscope cscopelist:
-
-
-# Recover from deleted '.trs' file; this should ensure that
-# "rm -f foo.log; make foo.trs" re-run 'foo.test', and re-create
-# both 'foo.log' and 'foo.trs'.  Break the recipe in two subshells
-# to avoid problems with "make -n".
-.log.trs:
-       rm -f $< $@
-       $(MAKE) $(AM_MAKEFLAGS) $<
-
-# Leading 'am--fnord' is there to ensure the list of targets does not
-# exand to empty, as could happen e.g. with make check TESTS=''.
-am--fnord $(TEST_LOGS) $(TEST_LOGS:.log=.trs): $(am__force_recheck)
-am--force-recheck:
-       @:
 
 $(TEST_SUITE_LOG): $(TEST_LOGS)
-       @$(am__set_TESTS_bases); \
-       am__f_ok () { test -f "$$1" && test -r "$$1"; }; \
-       redo_bases=`for i in $$bases; do \
-                     am__f_ok $$i.trs && am__f_ok $$i.log || echo $$i; \
-                   done`; \
-       if test -n "$$redo_bases"; then \
-         redo_logs=`for i in $$redo_bases; do echo $$i.log; done`; \
-         redo_results=`for i in $$redo_bases; do echo $$i.trs; done`; \
-         if $(am__make_dryrun); then :; else \
-           rm -f $$redo_logs && rm -f $$redo_results || exit 1; \
-         fi; \
-       fi; \
-       if test -n "$$am__remaking_logs"; then \
-         echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \
-              "recursion detected" >&2; \
-       else \
-         am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \
-       fi; \
-       if $(am__make_dryrun); then :; else \
-         st=0;  \
-         errmsg="fatal: making $(TEST_SUITE_LOG): failed to create"; \
-         for i in $$redo_bases; do \
-           test -f $$i.trs && test -r $$i.trs \
-             || { echo "$$errmsg $$i.trs" >&2; st=1; }; \
-           test -f $$i.log && test -r $$i.log \
-             || { echo "$$errmsg $$i.log" >&2; st=1; }; \
-         done; \
-         test $$st -eq 0 || exit 1; \
-       fi
-       @$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \
-       ws='[   ]'; \
-       results=`for b in $$bases; do echo $$b.trs; done`; \
-       test -n "$$results" || results=/dev/null; \
-       all=`  grep "^$$ws*:test-result:"           $$results | wc -l`; \
-       pass=` grep "^$$ws*:test-result:$$ws*PASS"  $$results | wc -l`; \
-       fail=` grep "^$$ws*:test-result:$$ws*FAIL"  $$results | wc -l`; \
-       skip=` grep "^$$ws*:test-result:$$ws*SKIP"  $$results | wc -l`; \
-       xfail=`grep "^$$ws*:test-result:$$ws*XFAIL" $$results | wc -l`; \
-       xpass=`grep "^$$ws*:test-result:$$ws*XPASS" $$results | wc -l`; \
-       error=`grep "^$$ws*:test-result:$$ws*ERROR" $$results | wc -l`; \
-       if test `expr $$fail + $$xpass + $$error` -eq 0; then \
-         success=true; \
-       else \
-         success=false; \
-       fi; \
-       br='==================='; br=$$br$$br$$br$$br; \
-       result_count () \
-       { \
-           if test x"$$1" = x"--maybe-color"; then \
-             maybe_colorize=yes; \
-           elif test x"$$1" = x"--no-color"; then \
-             maybe_colorize=no; \
-           else \
-             echo "$@: invalid 'result_count' usage" >&2; exit 4; \
-           fi; \
-           shift; \
-           desc=$$1 count=$$2; \
-           if test $$maybe_colorize = yes && test $$count -gt 0; then \
-             color_start=$$3 color_end=$$std; \
-           else \
-             color_start= color_end=; \
-           fi; \
-           echo "$${color_start}# $$desc $$count$${color_end}"; \
-       }; \
-       create_testsuite_report () \
-       { \
-         result_count $$1 "TOTAL:" $$all   "$$brg"; \
-         result_count $$1 "PASS: " $$pass  "$$grn"; \
-         result_count $$1 "SKIP: " $$skip  "$$blu"; \
-         result_count $$1 "XFAIL:" $$xfail "$$lgn"; \
-         result_count $$1 "FAIL: " $$fail  "$$red"; \
-         result_count $$1 "XPASS:" $$xpass "$$red"; \
-         result_count $$1 "ERROR:" $$error "$$mgn"; \
-       }; \
+       @$(am__sh_e_setup);                                             \
+       list='$(TEST_LOGS)';                                            \
+       results=`for f in $$list; do                                    \
+                  test -r $$f && read line < $$f && echo "$$line"      \
+                    || echo FAIL;                                      \
+                done`;                                                 \
+       all=`echo "$$results" | sed '/^$$/d' | wc -l | sed -e 's/^[      ]*//'`; \
+       fail=`echo "$$results" | grep -c '^FAIL'`;                      \
+       pass=`echo "$$results" | grep -c '^PASS'`;                      \
+       skip=`echo "$$results" | grep -c '^SKIP'`;                      \
+       xfail=`echo "$$results" | grep -c '^XFAIL'`;                    \
+       xpass=`echo "$$results" | grep -c '^XPASS'`;                    \
+       failures=`expr $$fail + $$xpass`;                               \
+       all=`expr $$all - $$skip`;                                      \
+       if test "$$all" -eq 1; then tests=test; All=;                   \
+       else tests=tests; All="All "; fi;                               \
+       case fail=$$fail:xpass=$$xpass:xfail=$$xfail in                 \
+         fail=0:xpass=0:xfail=0)                                       \
+           msg="$$All$$all $$tests passed.  ";                         \
+           exit=true;;                                                 \
+         fail=0:xpass=0:xfail=*)                                       \
+           msg="$$All$$all $$tests behaved as expected";               \
+           if test "$$xfail" -eq 1; then xfailures=failure;            \
+           else xfailures=failures; fi;                                \
+           msg="$$msg ($$xfail expected $$xfailures).  ";              \
+           exit=true;;                                                 \
+         fail=*:xpass=0:xfail=*)                                       \
+           msg="$$fail of $$all $$tests failed.  ";                    \
+           exit=false;;                                                \
+         fail=*:xpass=*:xfail=*)                                       \
+           msg="$$failures of $$all $$tests did not behave as expected"; \
+           if test "$$xpass" -eq 1; then xpasses=pass;                 \
+           else xpasses=passes; fi;                                    \
+           msg="$$msg ($$xpass unexpected $$xpasses).  ";              \
+           exit=false;;                                                \
+         *)                                                            \
+           echo >&2 "incorrect case"; exit 4;;                         \
+       esac;                                                           \
+       if test "$$skip" -ne 0; then                                    \
+         if test "$$skip" -eq 1; then                                  \
+           msg="$$msg($$skip test was not run).  ";                    \
+         else                                                          \
+           msg="$$msg($$skip tests were not run).  ";                  \
+         fi;                                                           \
+       fi;                                                             \
        {                                                               \
          echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" |       \
            $(am__rst_title);                                           \
-         create_testsuite_report --no-color;                           \
+         echo "$$msg";                                                 \
          echo;                                                         \
          echo ".. contents:: :depth: 2";                               \
          echo;                                                         \
-         for b in $$bases; do echo $$b; done                           \
-           | $(am__create_global_log);                                 \
-       } >$(TEST_SUITE_LOG).tmp || exit 1;                             \
+         for f in $$list; do                                           \
+           test -r $$f && read line < $$f || line=;                    \
+           case $$line in                                              \
+             PASS:*|XFAIL:*);;                                         \
+             *) echo; cat $$f;;                                        \
+           esac;                                                       \
+         done;                                                         \
+       } >$(TEST_SUITE_LOG).tmp;                                       \
        mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG);                     \
-       if $$success; then                                              \
+       if test "$$failures" -ne 0; then                                \
+         msg="$${msg}See $(subdir)/$(TEST_SUITE_LOG).  ";              \
+         if test -n "$(PACKAGE_BUGREPORT)"; then                       \
+           msg="$${msg}Please report to $(PACKAGE_BUGREPORT).  ";      \
+         fi;                                                           \
+       fi;                                                             \
+       test x"$$VERBOSE" = x || $$exit || cat $(TEST_SUITE_LOG);       \
+       $(am__tty_colors);                                              \
+       if $$exit; then                                                 \
          col="$$grn";                                                  \
         else                                                           \
          col="$$red";                                                  \
-         test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG);               \
        fi;                                                             \
-       echo "$${col}$$br$${std}";                                      \
-       echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}";   \
-       echo "$${col}$$br$${std}";                                      \
-       create_testsuite_report --maybe-color;                          \
-       echo "$$col$$br$$std";                                          \
-       if $$success; then :; else                                      \
-         echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}";         \
-         if test -n "$(PACKAGE_BUGREPORT)"; then                       \
-           echo "$${col}Please report to $(PACKAGE_BUGREPORT)$${std}"; \
+       echo "$$msg" | $(am__text_box) "col=$$col" "std=$$std";         \
+       $$exit || exit 1
+
+check-TESTS recheck:
+       @if test $@ != recheck; then \
+          list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list; \
+        fi
+       @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
+       @list='' list2='$(TEST_LOGS)'; for f in $$list2; do \
+         test .log = $$f && continue; \
+         if test $@ = recheck; then \
+           test -f $$f || continue; \
+           if test -r $$f && read line < $$f; then \
+             case $$line in FAIL*|XPASS*) : ;; *) continue;; esac; \
+           fi; \
+         fi; \
+         if test -z "$$list"; then list=$$f; else list="$$list $$f"; fi; \
+       done; \
+       if test $@ = recheck && test -n "$$list"; then \
+         $(am__make_dryrun) || rm -f $$list || exit 1; \
+       fi; \
+       $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$list"
+recheck: 
+
+am--mostlyclean-test-html:
+       list='$(TEST_LOGS:.log=.html)'; test -z "$$list" || rm -f $$list
+       rm -f $(TEST_SUITE_HTML)
+
+.log.html:
+       @list='$(RST2HTML) $$RST2HTML rst2html rst2html.py';            \
+       for r2h in $$list; do                                           \
+         if ($$r2h --version) >/dev/null 2>&1; then                    \
+           R2H=$$r2h;                                                  \
          fi;                                                           \
-         echo "$$col$$br$$std";                                        \
+       done;                                                           \
+       if test -z "$$R2H"; then                                        \
+         echo >&2 "cannot find rst2html, cannot create $@";            \
+         exit 2;                                                       \
        fi;                                                             \
-       $$success || exit 1
+       $$R2H $< >$@.tmp
+       @mv $@.tmp $@
 
-check-TESTS:
-       @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)
-       @set +e; $(am__set_TESTS_bases); \
-       log_list=`for i in $$bases; do echo $$i.log; done`; \
-       trs_list=`for i in $$bases; do echo $$i.trs; done`; \
-       log_list=`echo $$log_list`; trs_list=`echo $$trs_list`; \
-       $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"; \
-       exit $$?;
-recheck: all 
-       @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 \
-                | $(am__list_recheck_tests)` || exit 1; \
-       log_list=`for i in $$bases; do echo $$i.log; done`; \
-       log_list=`echo $$log_list`; \
-       $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) \
-               am__force_recheck=am--force-recheck \
-               TEST_LOGS="$$log_list"; \
-       exit $$?
+# Be sure to run check first, and then to convert the result.
+# Beware of concurrent executions.  Run "check" not "check-TESTS", as
+# check-SCRIPTS and other dependencies are rebuilt by the former only.
+# And expect check to fail.
+check-html recheck-html:
+       @target=`echo $@ | sed 's/-html$$//'`; \
+       rv=0; $(MAKE) $(AM_MAKEFLAGS) $$target || rv=$$?; \
+       $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_HTML) TEST_LOGS= || exit 4; \
+       exit $$rv
 asymmetric-hunks.log: asymmetric-hunks
-       @p='asymmetric-hunks'; \
-       b='asymmetric-hunks'; \
-       $(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)
+       @p='asymmetric-hunks'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
 backup-prefix-suffix.log: backup-prefix-suffix
-       @p='backup-prefix-suffix'; \
-       b='backup-prefix-suffix'; \
-       $(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)
+       @p='backup-prefix-suffix'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
 bad-filenames.log: bad-filenames
-       @p='bad-filenames'; \
-       b='bad-filenames'; \
-       $(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)
+       @p='bad-filenames'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
 concat-git-diff.log: concat-git-diff
-       @p='concat-git-diff'; \
-       b='concat-git-diff'; \
-       $(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)
+       @p='concat-git-diff'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
 copy-rename.log: copy-rename
-       @p='copy-rename'; \
-       b='copy-rename'; \
-       $(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)
+       @p='copy-rename'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
 corrupt-reject-files.log: corrupt-reject-files
-       @p='corrupt-reject-files'; \
-       b='corrupt-reject-files'; \
-       $(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)
+       @p='corrupt-reject-files'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
 create-delete.log: create-delete
-       @p='create-delete'; \
-       b='create-delete'; \
-       $(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)
+       @p='create-delete'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
 create-directory.log: create-directory
-       @p='create-directory'; \
-       b='create-directory'; \
-       $(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)
+       @p='create-directory'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
 criss-cross.log: criss-cross
-       @p='criss-cross'; \
-       b='criss-cross'; \
-       $(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)
+       @p='criss-cross'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
 crlf-handling.log: crlf-handling
-       @p='crlf-handling'; \
-       b='crlf-handling'; \
-       $(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)
+       @p='crlf-handling'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
 dash-o-append.log: dash-o-append
-       @p='dash-o-append'; \
-       b='dash-o-append'; \
-       $(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)
+       @p='dash-o-append'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
 empty-files.log: empty-files
-       @p='empty-files'; \
-       b='empty-files'; \
-       $(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)
+       @p='empty-files'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
 fifo.log: fifo
-       @p='fifo'; \
-       b='fifo'; \
-       $(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)
+       @p='fifo'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
 file-modes.log: file-modes
-       @p='file-modes'; \
-       b='file-modes'; \
-       $(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)
+       @p='file-modes'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
 filename-choice.log: filename-choice
-       @p='filename-choice'; \
-       b='filename-choice'; \
-       $(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)
+       @p='filename-choice'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
 git-binary-diff.log: git-binary-diff
-       @p='git-binary-diff'; \
-       b='git-binary-diff'; \
-       $(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)
+       @p='git-binary-diff'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
 global-reject-files.log: global-reject-files
-       @p='global-reject-files'; \
-       b='global-reject-files'; \
-       $(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)
+       @p='global-reject-files'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
 inname.log: inname
-       @p='inname'; \
-       b='inname'; \
-       $(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)
+       @p='inname'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
 line-numbers.log: line-numbers
-       @p='line-numbers'; \
-       b='line-numbers'; \
-       $(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)
+       @p='line-numbers'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
 merge.log: merge
-       @p='merge'; \
-       b='merge'; \
-       $(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)
+       @p='merge'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
 mangled-numbers-abort.log: mangled-numbers-abort
-       @p='mangled-numbers-abort'; \
-       b='mangled-numbers-abort'; \
-       $(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)
+       @p='mangled-numbers-abort'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
 mixed-patch-types.log: mixed-patch-types
-       @p='mixed-patch-types'; \
-       b='mixed-patch-types'; \
-       $(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)
+       @p='mixed-patch-types'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
 munged-context-format.log: munged-context-format
-       @p='munged-context-format'; \
-       b='munged-context-format'; \
-       $(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)
+       @p='munged-context-format'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
 need-filename.log: need-filename
-       @p='need-filename'; \
-       b='need-filename'; \
-       $(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)
+       @p='need-filename'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
 no-newline-triggers-assert.log: no-newline-triggers-assert
-       @p='no-newline-triggers-assert'; \
-       b='no-newline-triggers-assert'; \
-       $(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)
+       @p='no-newline-triggers-assert'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
 preserve-c-function-names.log: preserve-c-function-names
-       @p='preserve-c-function-names'; \
-       b='preserve-c-function-names'; \
-       $(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)
+       @p='preserve-c-function-names'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
 preserve-mode-and-timestamp.log: preserve-mode-and-timestamp
-       @p='preserve-mode-and-timestamp'; \
-       b='preserve-mode-and-timestamp'; \
-       $(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)
+       @p='preserve-mode-and-timestamp'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
 quoted-filenames.log: quoted-filenames
-       @p='quoted-filenames'; \
-       b='quoted-filenames'; \
-       $(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)
+       @p='quoted-filenames'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
 read-only-files.log: read-only-files
-       @p='read-only-files'; \
-       b='read-only-files'; \
-       $(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)
+       @p='read-only-files'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
 reject-format.log: reject-format
-       @p='reject-format'; \
-       b='reject-format'; \
-       $(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)
+       @p='reject-format'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
 remember-backup-files.log: remember-backup-files
-       @p='remember-backup-files'; \
-       b='remember-backup-files'; \
-       $(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)
+       @p='remember-backup-files'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
 remember-reject-files.log: remember-reject-files
-       @p='remember-reject-files'; \
-       b='remember-reject-files'; \
-       $(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)
+       @p='remember-reject-files'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
 symlinks.log: symlinks
-       @p='symlinks'; \
-       b='symlinks'; \
-       $(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)
+       @p='symlinks'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
 unmodified-files.log: unmodified-files
-       @p='unmodified-files'; \
-       b='unmodified-files'; \
-       $(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)
+       @p='unmodified-files'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
 .test.log:
-       @p='$<'; \
-       $(am__set_b); \
-       $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \
-       --log-file $$b.log --trs-file $$b.trs \
-       $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \
-       "$$tst" $(AM_TESTS_FD_REDIRECT)
+       @p='$<'; $(am__check_pre) $(TEST_LOG_COMPILE) "$$tst" $(am__check_post)
 @am__EXEEXT_TRUE@.test$(EXEEXT).log:
-@am__EXEEXT_TRUE@      @p='$<'; \
-@am__EXEEXT_TRUE@      $(am__set_b); \
-@am__EXEEXT_TRUE@      $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \
-@am__EXEEXT_TRUE@      --log-file $$b.log --trs-file $$b.trs \
-@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)
+@am__EXEEXT_TRUE@      @p='$<'; $(am__check_pre) $(TEST_LOG_COMPILE) "$$tst" $(am__check_post)
 
 distdir: $(DISTFILES)
        @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
@@ -1697,7 +1417,7 @@ install-strip:
        fi
 mostlyclean-generic:
        -test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS)
-       -test -z "$(TEST_LOGS:.log=.trs)" || rm -f $(TEST_LOGS:.log=.trs)
+       -test -z "$(TEST_LOGS_TMP)" || rm -f $(TEST_LOGS_TMP)
        -test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
 
 clean-generic:
@@ -1763,7 +1483,7 @@ maintainer-clean-am: distclean-am maintainer-clean-generic
 
 mostlyclean: mostlyclean-am
 
-mostlyclean-am: mostlyclean-generic
+mostlyclean-am: am--mostlyclean-test-html mostlyclean-generic
 
 pdf: pdf-am
 
@@ -1775,17 +1495,18 @@ ps-am:
 
 uninstall-am:
 
-.MAKE: check-am install-am install-strip
+.MAKE: check-am check-html install-am install-strip recheck-html
 
-.PHONY: all all-am check check-TESTS check-am clean clean-generic \
-       distclean distclean-generic 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-generic pdf pdf-am ps ps-am recheck \
+.PHONY: all all-am am--mostlyclean-test-html check check-TESTS \
+       check-am check-html clean clean-generic distclean \
+       distclean-generic 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-generic pdf pdf-am ps ps-am recheck recheck-html \
        uninstall uninstall-am
 
 
index 5b4f2054bcc69586b59ffe2013d3eab5f0d580fe..be65ca572af5d78baa6a69bcb1482e05a149f201 100644 (file)
@@ -25,7 +25,7 @@ EOF
 # or that contains a ".." component.
 
 check 'emit_patch ../z | patch -f -p1 --dry-run || echo status: $?' <<EOF
-patching file z
+checking file z
 EOF
 
 check 'emit_patch /absolute/path | patch -f -p0 --dry-run || echo status: $?' <<EOF
@@ -42,6 +42,17 @@ No file to patch.  Skipping patch.
 status: 1
 EOF
 
+for dir in "$TMPDIR" "$TMP" "$TEMP" "/tmp"; do
+    if test -n "$dir"; then
+       filename=$dir/patch-$$-$RANDOM
+       break
+    fi
+done
+
+check 'emit_patch $filename | (cd / && patch -f -p0 --dry-run) || echo status: $?' <<EOF
+checking file $filename
+EOF
+
 check 'emit_patch a/../z | patch -f -p0 --dry-run || echo status: $?' <<EOF
 Ignoring potentially dangerous file name a/../z
 can't find file to patch at input line 3
@@ -107,12 +118,12 @@ EOF
 
 echo 1 > f
 check 'patch -f -p0 --dry-run < d.diff || echo status: $?' <<EOF
-patching file f
+checking file f
 EOF
 
 echo 1 > g
 check 'patch -f -p1 --dry-run < d.diff || echo status: $?' <<EOF
-patching file g
+checking file g
 EOF
 
 mkdir d
index 927eb5abbc52471d8e2fecc87e473207cfc45bd2..c78da531f91ecb707c12c30e8b0b134ed21ede8d 100644 (file)
@@ -56,11 +56,7 @@ check 'cat f' <<EOF
 three
 EOF
 
-cat > f <<EOF
-1
-2
-3
-EOF
+seq 3 > f
 
 cat > concat2.diff <<EOF
 diff --git a/f b/f
@@ -95,3 +91,38 @@ a
 3
 b
 EOF
+
+seq 3 > f
+
+cat > concat3.diff <<EOF
+diff --git a/f b/f
+index 01e79c3..0d0b976 100644
+--- a/f
++++ b/f
+@@ -1,3 +1,4 @@
+ 1
+ 2
+ 3
++b
+diff a/f b/f
+--- a/f
++++ b/f
+@@ -1,3 +1,4 @@
++a
+ 1
+ 2
+ 3
+EOF
+
+check 'patch -p1 < concat3.diff || echo "Status: $?"' <<EOF
+patching file f
+patching file f
+EOF
+
+check 'cat f' <<EOF
+a
+1
+2
+3
+b
+EOF
index 9a6e1bb4606e19e66b82434a397040a638af948b..7c46166f956578bb9af814e9e267a2f5273d1288 100644 (file)
@@ -168,24 +168,126 @@ EOF
 check 'cat f' <<EOF
 f
 EOF
-#
-# ----------------------------------------------------------------
 
-# This test deletes the target file.
+# ================================================================
+# File expected to become empty doesn't become empty
 
-echo data > target
+seq 2 > target
+cat > p.diff <<EOF
+--- target
++++ /dev/null
+@@ -1 +0,0 @@
+-1
+EOF
+
+check 'patch -p0 < p.diff || echo status: $?' <<EOF
+patching file target
+File target is not empty after patch; not deleting
+status: 1
+EOF
+
+check 'cat target' <<EOF
+2
+EOF
+
+# --------------------------------------------------------------
+
+seq 2 > target
+cat > p.diff <<EOF
+--- target     2012-09-25 03:09:15
++++ target     1970-01-01 00:00:00
+@@ -1 +0,0 @@
+-1
+EOF
+
+check 'patch -p0 < p.diff || echo status: $?' <<EOF
+patching file target
+File target is not empty after patch; not deleting
+status: 1
+EOF
+
+check 'cat target' <<EOF
+2
+EOF
+
+# --------------------------------------------------------------
+printf '\0' > target
 cat > p.diff <<EOF
 diff --git a/target b/target
-index 1..0
+deleted file mode 100644
+index f76dd23..0000000
+Binary files a/target and /dev/null differ
 EOF
 
 check 'patch -p1 -b < p.diff || echo status: $?' <<EOF
 patching file target
-File target is not empty after patch, as expected
+File target is not empty after patch; not deleting
+status: 1
+EOF
+
+ncheck 'test -e target'
+
+# Patch creates a backup file even when the original file remains unchanged:
+ncheck 'test -e target.orig'
+
+# ================================================================
+# File not expected to become empty does become empty
+
+echo 1 > target
+cat > p.diff <<EOF
+--- target
++++ target
+@@ -1 +0,0 @@
+-1
+EOF
+
+check 'patch -p0 < p.diff || echo status: $?' <<EOF
+patching file target
+EOF
+
+check 'cat target' <<EOF
+EOF
+
+echo 1 > target
+check 'patch -p0 -E < p.diff || echo status: $?' <<EOF
+patching file target
 EOF
 
 ncheck 'test ! -e target'
 
+# ================================================================
+# File expected to become empty does become empty
+
+echo data > target
+cat > p.diff <<EOF
+diff --git a/target b/target
+deleted file mode 100644
+index 1269488..0000000
+--- a/target
++++ /dev/null
+@@ -1 +0,0 @@
+-data
+EOF
+
+check 'patch -p1 -b -f < p.diff || echo status: $?' <<EOF
+patching file target
+EOF
+
+ncheck 'test ! -e target'
+
+check 'cat target.orig' <<EOF
+data
+EOF
+
+echo data > target
+
+check 'patch -p1 -b --posix -f < p.diff || echo status: $?' <<EOF
+patching file target
+EOF
+
+check 'cat target' <<EOF
+EOF
+
 check 'cat target.orig' <<EOF
 data
 EOF
index 535f0cd243f1e34855aa8b89d3729ef2b2964fa6..b704dc860a72abfe1e965a577d5bcad8f9b8f6e3 100644 (file)
@@ -23,21 +23,21 @@ echo 1b > b
 diff a b | lf2crlf > ab.diff
 echo 1 > c
 check 'patch c < ab.diff' <<EOF
-(Stripping trailing CRs from patch.)
+(Stripping trailing CRs from patch; use --binary to disable.)
 patching file c
 EOF
 
 diff -c a b | lf2crlf > ab.diff
 echo 1 > c
 check 'patch c < ab.diff' <<EOF
-(Stripping trailing CRs from patch.)
+(Stripping trailing CRs from patch; use --binary to disable.)
 patching file c
 EOF
 
 diff -u a b | lf2crlf > ab.diff
 echo 1 > c
 check 'patch c < ab.diff' <<EOF
-(Stripping trailing CRs from patch.)
+(Stripping trailing CRs from patch; use --binary to disable.)
 patching file c
 EOF
 
@@ -109,8 +109,16 @@ echo 1b > b
 
 diff a b | lf2crlf > ab.diff
 cp a c
+
+check 'patch --binary c < ab.diff || echo status: $?' <<EOF
+patching file c
+Hunk #1 FAILED at 1 (different line endings).
+1 out of 1 hunk FAILED -- saving rejects to file c.rej
+status: 1
+EOF
+
 check 'patch c < ab.diff' <<EOF
-(Stripping trailing CRs from patch.)
+(Stripping trailing CRs from patch; use --binary to disable.)
 patching file c
 EOF
 
@@ -132,7 +140,7 @@ EOF
 diff -u a b | lf2crlf > ab.diff
 cp a c
 check 'patch c < ab.diff' <<EOF
-(Stripping trailing CRs from patch.)
+(Stripping trailing CRs from patch; use --binary to disable.)
 patching file c
 EOF
 
@@ -154,7 +162,7 @@ EOF
 diff -c a b | lf2crlf > ab.diff
 cp a c
 check 'patch c < ab.diff' <<EOF
-(Stripping trailing CRs from patch.)
+(Stripping trailing CRs from patch; use --binary to disable.)
 patching file c
 EOF
 
@@ -179,6 +187,10 @@ EOF
 
 # ==============================================================
 
+# Line endings of @@ lines are not used for guessing if a patch needs CR
+# stripping: if the -p / --show-c-function option of GNU diff is used, these
+# lines can have different line endings than the rest of the patch.
+
 echo 1 > a
 echo 2 > b
 diff -u a b | sed -e 's,@@$,@@ context\r,' > ab.diff
index 31198401efe3d3a2e25ac0c70d400477e1c56e7d..163369980c9c9a268aa21f5b7d172a6b820d955c 100644 (file)
@@ -33,8 +33,8 @@ EOF
 echo one > a
 
 check 'patch -o a.new a < a.diff' <<EOF
-patching file a
-patching file a
+patching file a.new (read from a)
+patching file a.new (read from a)
 EOF
 
 check 'cat a.new' <<EOF
index 8b4900337d83199a0e2dd56d46ecb69c009f2db3..9e075581734164a2a610db64947a05ddda1c1c2b 100644 (file)
@@ -22,21 +22,21 @@ cat > f.diff <<EOF
 EOF
 
 check 'patch --dry-run < f.diff' <<EOF
-patching file f
+checking file f
 EOF
 
 check 'patch --dry-run -i f.diff' <<EOF
-patching file f
+checking file f
 EOF
 
 mkfifo fifo
 
 cat f.diff > fifo &
 check 'patch --dry-run < fifo' <<EOF
-patching file f
+checking file f
 EOF
 
 cat f.diff > fifo &
 check 'patch --dry-run -i fifo' <<EOF
-patching file f
+checking file f
 EOF
index abd6031153a16e5bc49d0c26fcb4c2ad8f2d1c8b..da17c757285ec04874c03352ae7d233fcca2a253 100644 (file)
@@ -29,8 +29,8 @@ index 0000000..01058d8
 EOF
 
 check 'patch --dry-run < mixed1.diff || echo "Status: $?"' <<EOF
-patching file f
-patching file g
+checking file f
+checking file g
 EOF
 
 # --------------------------------------------------------------
@@ -51,6 +51,6 @@ diff a/g b/g
 EOF
 
 check 'patch --dry-run < mixed2.diff || echo "Status: $?"' <<EOF
-patching file f
-patching file g
+checking file f
+checking file g
 EOF
index 2f4a7886aac8922a192b6644e0a29659f32fa4e1..be710f5df60aa98a6605d3896553ecf9e858ba92 100644 (file)
@@ -29,6 +29,13 @@ EOF
 sed -e 's/5/5a/' f.orig > f
 diff -p -c -L f.orig -L f f.orig f > f.diff
 
+check 'patch -f -F0 --no-backup-if-mismatch --dry-run f < f.diff || echo "Status: $?"' <<EOF
+checking file f
+Hunk #1 FAILED at 2.
+1 out of 1 hunk FAILED
+Status: 1
+EOF
+
 check 'patch -f -F0 --no-backup-if-mismatch f < f.diff || echo "Status: $?"' <<EOF
 patching file f
 Hunk #1 FAILED at 2.
index 829bcbc907d45630ef024c0b6974a40ec7c0d744..96626b3eaeab1222833dd8aad317a73892d1a2bb 100644 (file)
@@ -22,23 +22,23 @@ cat > create.diff <<EOF
 EOF
 
 rm -f f l
-echo f > f
+echo one > f
 ncheck 'ln -s f l'
 
 check 'patch < create.diff || echo "Status: $?"' <<EOF
-File l is not a regular file -- can't patch
+File l is not a regular file -- refusing to patch
 1 out of 1 hunk ignored -- saving rejects to file l.rej
 Status: 1
 EOF
 
 check 'cat f' <<EOF
-f
+one
 EOF
 
 # --------------------------------------------------------------
 
 rm -f f l
-echo f > f
+echo one > f
 ncheck 'ln -s f l'
 
 cat > modify.diff <<EOF
@@ -50,14 +50,19 @@ cat > modify.diff <<EOF
 EOF
 
 check 'patch < modify.diff || echo "Status: $?"' <<EOF
-File l is not a regular file -- can't patch
+File l is not a regular file -- refusing to patch
 1 out of 1 hunk ignored -- saving rejects to file l.rej
 Status: 1
 EOF
+
+check 'patch --follow-symlinks < modify.diff || echo "Status: $?"' <<EOF
+patching file l
+EOF
+
 # --------------------------------------------------------------
 
 rm -f f l
-echo f > f
+echo one > f
 ncheck 'ln -s f l'
 
 cat > delete.diff <<EOF
@@ -68,7 +73,7 @@ cat > delete.diff <<EOF
 EOF
 
 check 'patch < delete.diff || echo "Status: $?"' <<EOF
-File l is not a regular file -- can't patch
+File l is not a regular file -- refusing to patch
 1 out of 1 hunk ignored -- saving rejects to file l.rej
 Status: 1
 EOF