summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorAndreas Gruenbacher <agruen@suse.de>2010-10-27 02:53:42 +0200
committerAndreas Gruenbacher <agruen@suse.de>2010-10-27 02:53:42 +0200
commit76d0e43140e83602ecca0073f2ee5515c3a9613b (patch)
treed00898bcd03371cde4b75d3f3b9a150e37efd973 /configure.ac
parent28113637f563534c5b4e1a462c39069b837d31d9 (diff)
downloadpatch-76d0e43140e83602ecca0073f2ee5515c3a9613b.tar.gz
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.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac2
1 files changed, 2 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 8912210..82e0a52 100644
--- a/configure.ac
+++ b/configure.ac
@@ -49,6 +49,8 @@ gl_INIT
AC_TYPE_MODE_T
AC_TYPE_OFF_T
+gl_FUNC_XATTR
+
AC_CHECK_FUNCS(geteuid getuid raise sigaction sigprocmask sigsetmask)
AC_FUNC_SETMODE_DOS