32 Commits

Author SHA1 Message Date
Andreas Gruenbacher
709458d9d9 Use gnulib faccessat module
* bootstrap.conf (gnulib_modules): Add faccessat.
2015-02-01 15:45:24 +01:00
Andreas Gruenbacher
b72e3be5c8 Update list of gnulib modules used
* bootstrap.conf (gnulib_modules): Remove lchmod, lstat, mkdir, readlink,
rename, mkdir, symlink, unlink, utimens. Add fchownat, fchmodat, fstatat,
mkdirat, openat, readlinkat, renameat, symlinkat, unlinkat, utimensat.
* src/util.h: Don't include <utimens.h> anymore.
2015-01-31 22:14:01 +01:00
Andreas Gruenbacher
3fd4144ae9 build: update gnulib submodule to latest
* src/merge.c (compute_changes): The TOO_EXPENSIVE heuristic in diffseq has
been removed, including compareseq's find_minimal parameter and the context's
too_expensive limit.  Adjust.
2014-11-30 15:35:31 +01:00
Andreas Gruenbacher
1ea53aae17 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.
2012-09-17 17:04:20 +02:00
Andreas Gruenbacher
543906f1a4 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-14 11:39:02 +02:00
Andreas Gruenbacher
e4b9ff4cfe maint: update gnulib submodule 2012-09-12 11:35:03 +02:00
Andreas Gruenbacher
386ae15bce maint: update bootstrap and gnulib submodule
* bootstrap: Update from gnulib.
2012-08-01 04:50:00 +02:00
Andreas Gruenbacher
3b4824fb33 Do not delete files immediately
Fixes the bug that more than one numbered backup would be created when a patch
file deletes and recreates a file.
* bootstrap.conf (gnulib_modules): Add linked-list and xlist modules.
* src/util.h (file_id_type): Add DELETE_LATER and OVERWRITTEN types.
(create_backup, set_file_attributes): Update prototype.
(insert_file_id): Add prototype.
* src/util.c (insert_file_id): Export.
(set_file_attributes, create_backup_copy): Make the st argument const.
(create_backup): Pass in to_st instead of returning it from create_backup().
This obsoletes the to_errno argument.
(move_file): Determine to_st here and pass it to create_backup().  Remember
when a file is overwritten.
* src/patch.c (output_file): Add to_st parameter.  Remember files to delete
instead of deleting them immediately.  Pass from-st to create_backup().
(file_to_delete): New struct.
(init_files_to_delete, delete_file_later, delete_files): New functions.
(main): Use init_files_to_delete() and delete_files().  Pass to_st to
output_file() where we already have it.
* src/pch.c (intuit_diff_type): Assume that files which are marked for deletion
don't exist.
2012-04-17 16:48:19 +02:00
Jim Meyering
f4accb062b build: update gnulib submodule to latest 2012-02-25 20:28:56 +01:00
Jim Meyering
2d38b11799 maint: update all copyright year number ranges
Run "make update-copyright".
2012-01-01 10:26:02 +01:00
Jim Meyering
5cb38ce390 build: update to latest gnulib and adapt
Mark functions as pure of const, per recommendations enabled by
new gcc -W options.  Apply _GL_ATTRIBUTE_PURE and _GL_ATTRIBUTE_CONST.
* src/common.h: Apply new function attributes.
* src/pch.c: Likewise.
* src/pch.h: Likewise.
* src/util.c: Likewise.
* src/util.h: Likewise.
* configure.ac: Use -Wno-format-nonliteral.
* m4/.gitignore: Update.
* gnulib: Update to latest.
* cfg.mk: Exempt src/util.c from two tests, to avoid new
"make syntax-check" failures.
2011-12-14 16:34:45 +01:00
Jim Meyering
46ad06707c build: use largefile module and update to latest gnulib
* configure.ac: Remove AC_SYS_LARGEFILE, subsumed by ...
* bootstrap.conf (gnulib_modules): ...this.  Use largefile module.
* gnulib: Update to latest.
This is useful to Mac OS X 10.5 users if/when configure
is generated using autoconf prior to v2.68-80-gdb2f2e0.
2011-08-11 14:18:57 +02:00
Jim Meyering
aa85679b9a maint: ignore more build artifacts 2011-03-27 09:19:55 +02:00
Jim Meyering
4a7efc3791 maint: update bootstrap and gnulib submodule
* bootstrap: Update from gnulib.
* cfg.mk (local-checks-to-skip): Remove (thus, enable)
sc_copyright_check, now that the gnulib submodule is up to date.
2011-03-27 09:16:46 +02:00
Jim Meyering
db2fb7cdba maint: update copyright date year ranges to include 2011
* bootstrap.conf (gnulib_modules): Add update-copyright.
Run "make update-copyright".
2011-03-27 09:16:46 +02:00
Jim Meyering
7db2653124 build: accept new configure-time option --enable-gcc-warnings
* configure.ac: Enable many options.
* bootstrap.conf (gnulib_modules): Add manywarnings.
* src/Makefile.am (AM_CFLAGS): Use $(WARN_CFLAGS) and $(WERROR_CFLAGS).
2011-03-26 14:20:28 +01:00
Jim Meyering
8d6290df9f maint: add some m4 quoting
* m4/setmode.m4 (AC_FUNC_SETMODE_DOS): Use proper M4 quoting.
2011-03-26 14:20:28 +01:00
Jim Meyering
d96503d66a build: update gnulib submodule to latest 2011-03-21 18:26:46 +01:00
Andreas Gruenbacher
76d0e43140 Preserve extended attributes of patched files when possible
* src/patch.c (main): Set all file attributes of the temporary output
file before renaming it over the final output file (possibly replacing
the input file).  Pass the input file name to set_file_attributes().
* src/util.c (set_file_attributes): When enabled (USE_XATTR), also
copy extended attributes including attributes which define
permissions.
(copy_attr_error, copy_attr_quote, copy_attr_free, copy_attr_check,
copy_attr): Helper functions for copying extended attributes.
* m4/xattr.m4 (gl_FUNC_XATTR): Import from coreutils.
* src/Makefile.am (patch_LDADD): Add $(LIB_XATTR) here.
* bootstrap.conf: Use the gnulib verror module.
2010-10-27 02:53:42 +02:00
Andreas Gruenbacher
a78d3c405b Use the gnulib mkdir module
* bootstrap.conf: Use the gnulib mkdir module.
* m4/mkdir.m4: Delete.
2010-05-05 01:00:39 +02:00
Andreas Gruenbacher
cfe068672d Remove leftovers from when patch was still using utimbuf()
* configure.ac (gl_CHECK_TYPE_STRUCT_UTIMBUF), m4/utimbuf.m4: Remove;
utimbuf is no longer used.
2010-04-27 12:38:16 +02:00
Andreas Gruenbacher
7fa8417c05 Convert to automake and use a git submodule for gnulib
* configure.ac: Add automake and gnulib macros, replace several
obsolete macros.
* Makefile.am, lib/Makefile.am, src/Makefile.am, tests/Makefile.am:
Add for automake.
* autogen.sh, INSTALL, Makefile.in, mkinstalldirs, update-version.sh:
Obsolete; remove.
* README-hacking: Import from diffutils, replace cvs with git.
* build-aux: Move gnulib auxiliary files here from the top-level
directory.
* gnulib: Add gnulib git submodule.
* bootstrap, bootstrap.conf: Import from gnulib and adjust.
* gl/lib: Remove gnulib files from the repository; they are now
imported into lib/ from gnulib as needed.
* tests/test-lib.sh: Use $abs_top_builddir exported from
tests/Makefile.am here instead of $PWD.
* m4/utimbuf.m4: This macro has been removed from gnulib. Add it here
for now; this will be replaced by gnulib's utimens module soon.
2010-04-12 16:27:55 +02:00
Andreas Gruenbacher
a03f22893c Copyright notice updates 2009-04-05 21:12:30 +02:00
Andreas Gruenbacher
c3eec27d08 Remove m4/st_mtim.m4 (obsolete since 2009-03-28) 2009-04-05 08:13:07 +02:00
Andreas Gruenbacher
f3a61e5f3e Move all Gnulib files into gl/ 2009-04-05 08:13:07 +02:00
Andreas Gruenbacher
e36194e346 No longer remember file timestamps 2009-03-28 16:18:14 +01:00
Andreas Gruenbacher
48a9e9afb9 Various changes lumped together
(Imported from working tree by Andreas Gruenbacher)
2009-03-21 17:40:30 +01:00
Manu B
adf5a43517 Trivial change to port to mingw
(Imported from working tree by Andreas Gruenbacher)
2009-03-20 21:46:59 +01:00
Paul Eggert
7a5222a06d Sync with gnulib
(Imported from RCS by Andreas Gruenbacher)
2009-03-20 21:46:59 +01:00
Andreas Gruenbacher
e930d168ad Import of patch-2.5.9.tar.gz 2009-03-17 21:46:21 +01:00
Andreas Gruenbacher
712cce6fdd Import of patch-2.5.7.tar.gz 2009-03-17 21:43:20 +01:00
Andreas Gruenbacher
79159942f1 Import of patch-2.5.4.tar.gz 2009-03-12 15:17:49 +01:00