From: DongHun Kwak Date: Thu, 20 Jan 2022 05:17:41 +0000 (+0900) Subject: Imported Upstream version 2.7.1 X-Git-Tag: upstream/2.7.1^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2c4d43d79f1f6767132cd2247feae90d015a7e0d;p=platform%2Fupstream%2Fpatch.git Imported Upstream version 2.7.1 --- diff --git a/.tarball-version b/.tarball-version index 1effb00..860487c 100644 --- a/.tarball-version +++ b/.tarball-version @@ -1 +1 @@ -2.7 +2.7.1 diff --git a/.version b/.version index 1effb00..860487c 100644 --- a/.version +++ b/.version @@ -1 +1 @@ -2.7 +2.7.1 diff --git a/ChangeLog b/ChangeLog index bac2632..cffe383 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,166 @@ +2012-09-28 Andreas Gruenbacher + + 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 + + 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 + + Only expect files to become empty if the patch says so + Test cases based on patches from Dmitry V. Levin . + * 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 + + 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 + + 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 + + Add a missing explanation in the tests/crlf-handling test case + * tests/crlf-handling: Add explanation. + +2012-09-19 Andreas Gruenbacher + + 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 + + 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 + + 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 + + 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 + + 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 Version 2.7 diff --git a/Makefile.in b/Makefile.in index 478dd40..17de20f 100644 --- a/Makefile.in +++ b/Makefile.in @@ -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 997a726..28d0e91 100644 --- 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 9da2bcd..c206370 100644 --- 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 . diff --git a/aclocal.m4 b/aclocal.m4 index cbe2e8b..c623680 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -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: -# -# -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 diff --git a/build-aux/config.guess b/build-aux/config.guess index 137bedf..872b96a 100755 --- a/build-aux/config.guess +++ b/build-aux/config.guess @@ -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 index aba4d1d..0000000 --- a/build-aux/test-driver +++ /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 . - -# 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 or send patches to -# . - -# 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 <$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: diff --git a/build-aux/texinfo.tex b/build-aux/texinfo.tex index 9a2439c..f3093d0 100644 --- a/build-aux/texinfo.tex +++ b/build-aux/texinfo.tex @@ -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 diff --git a/config.hin b/config.hin index 6cf5c66..e7d2bde 100644 --- a/config.hin +++ b/config.hin @@ -234,6 +234,9 @@ */ #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 diff --git a/configure b/configure index 6f7c4db..be62e60 100755 --- 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 . # @@ -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: -# -# -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" || diff --git a/configure.ac b/configure.ac index 9943f03..dc837d6 100644 --- a/configure.ac +++ b/configure.ac @@ -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" diff --git a/lib/Makefile.in b/lib/Makefile.in index 4a40b7e..1195b46 100644 --- a/lib/Makefile.in +++ b/lib/Makefile.in @@ -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 \ diff --git a/lib/gnulib.mk b/lib/gnulib.mk index 6b5d688..5580ce9 100644 --- a/lib/gnulib.mk +++ b/lib/gnulib.mk @@ -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 diff --git a/lib/localcharset.c b/lib/localcharset.c index b5ee2d6..8d16c87 100644 --- a/lib/localcharset.c +++ b/lib/localcharset.c @@ -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; } diff --git a/lib/malloca.h b/lib/malloca.h index 0cedf5f..f06e9e7 100644 --- a/lib/malloca.h +++ b/lib/malloca.h @@ -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) diff --git a/lib/xalloc-oversized.h b/lib/xalloc-oversized.h index 6779755..ad777d8 100644 --- a/lib/xalloc-oversized.h +++ b/lib/xalloc-oversized.h @@ -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 index 0000000..4b4914c --- /dev/null +++ b/lib/xsize.c @@ -0,0 +1,3 @@ +#include +#define XSIZE_INLINE _GL_EXTERN_INLINE +#include "xsize.h" diff --git a/lib/xsize.h b/lib/xsize.h index 515327e..a2942b9 100644 --- a/lib/xsize.h +++ b/lib/xsize.h @@ -27,6 +27,11 @@ # include #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 */ diff --git a/m4/eealloc.m4 b/m4/eealloc.m4 index 75f17e2..9e5df45 100644 --- a/m4/eealloc.m4 +++ b/m4/eealloc.m4 @@ -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], diff --git a/m4/gnulib-comp.m4 b/m4/gnulib-comp.m4 index e20555d..303bf79 100644 --- a/m4/gnulib-comp.m4 +++ b/m4/gnulib-comp.m4 @@ -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 diff --git a/m4/sys_stat_h.m4 b/m4/sys_stat_h.m4 index f45dee1..8af3353 100644 --- a/m4/sys_stat_h.m4 +++ b/m4/sys_stat_h.m4 @@ -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]) diff --git a/m4/xattr.m4 b/m4/xattr.m4 index 7691177..ed26886 100644 --- a/m4/xattr.m4 +++ b/m4/xattr.m4 @@ -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 diff --git a/m4/xsize.m4 b/m4/xsize.m4 index b3b7fee..d85a5f1 100644 --- a/m4/xsize.m4 +++ b/m4/xsize.m4 @@ -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]) ]) diff --git a/maint.mk b/maint.mk index 4627bc5..e52deb4 100644 --- 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='\&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 \ diff --git a/patch.man b/patch.man index b0ee8c1..c5cc5c4 100644 --- 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 , diff --git a/src/Makefile.in b/src/Makefile.in index ef5f5bc..24f5082 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -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 \ diff --git a/src/common.h b/src/common.h index b1e6c9e..a66e55f 100644 --- a/src/common.h +++ b/src/common.h @@ -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 { diff --git a/src/inp.c b/src/inp.c index 6387587..386dc9e 100644 --- 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; diff --git a/src/patch.c b/src/patch.c index febfd42..828943b 100644 --- a/src/patch.c +++ b/src/patch.c @@ -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; } } diff --git a/src/pch.c b/src/pch.c index 9661be2..75a642b 100644 --- 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 ? "" : "- ", diff --git a/src/pch.h b/src/pch.h index e545cb1..0c7ff62 100644 --- 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); diff --git a/src/util.c b/src/util.c index e8e2ad4..1cc1a68 100644 --- a/src/util.c +++ b/src/util.c @@ -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; +} diff --git a/src/util.h b/src/util.h index d1bf495..9a7946f 100644 --- a/src/util.h +++ b/src/util.h @@ -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, diff --git a/tests/Makefile.in b/tests/Makefile.in index f5abab3..aa47a07 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -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=''; \ - grn=''; \ - lgn=''; \ - blu=''; \ - mgn=''; \ - brg=''; \ - std=''; \ - 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=''; \ + grn=''; \ + lgn=''; \ + blu=''; \ + std=''; \ } 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 diff --git a/tests/bad-filenames b/tests/bad-filenames index 5b4f205..be65ca5 100644 --- a/tests/bad-filenames +++ b/tests/bad-filenames @@ -25,7 +25,7 @@ EOF # or that contains a ".." component. check 'emit_patch ../z | patch -f -p1 --dry-run || echo status: $?' < f check 'patch -f -p0 --dry-run < d.diff || echo status: $?' < g check 'patch -f -p1 --dry-run < d.diff || echo status: $?' < f < f cat > concat2.diff < f + +cat > concat3.diff < target +seq 2 > target +cat > p.diff < target +cat > p.diff < target cat > p.diff < target +cat > p.diff < target +check 'patch -p0 -E < p.diff || echo status: $?' < target +cat > p.diff < target + +check 'patch -p1 -b --posix -f < p.diff || echo status: $?' < b diff a b | lf2crlf > ab.diff echo 1 > c check 'patch c < ab.diff' < ab.diff echo 1 > c check 'patch c < ab.diff' < ab.diff echo 1 > c check 'patch c < ab.diff' < b diff a b | lf2crlf > ab.diff cp a c + +check 'patch --binary c < ab.diff || echo status: $?' < ab.diff cp a c check 'patch c < ab.diff' < ab.diff cp a c check 'patch c < ab.diff' < a echo 2 > b diff -u a b | sed -e 's,@@$,@@ context\r,' > ab.diff diff --git a/tests/dash-o-append b/tests/dash-o-append index 3119840..1633699 100644 --- a/tests/dash-o-append +++ b/tests/dash-o-append @@ -33,8 +33,8 @@ EOF echo one > a check 'patch -o a.new a < a.diff' < f.diff < fifo & check 'patch --dry-run < fifo' < fifo & check 'patch --dry-run -i fifo' < 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: $?"' < create.diff < f +echo one > f ncheck 'ln -s f l' check 'patch < create.diff || echo "Status: $?"' < f +echo one > f ncheck 'ln -s f l' cat > modify.diff < modify.diff < f +echo one > f ncheck 'ln -s f l' cat > delete.diff < delete.diff <