summaryrefslogtreecommitdiff
path: root/bootstrap.conf
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2016-02-27 14:12:46 -0800
committerPaul Eggert <eggert@cs.ucla.edu>2016-02-28 00:02:57 -0800
commit5ef892a9248e02dac13840f0acefe0fe72605dfa (patch)
tree1d5658a8d1f0db3b997d8d06e6edece44ef0e658 /bootstrap.conf
parent22aac8f8a616a72dbbe0e4119db8ddda0f076c04 (diff)
downloadgzip-5ef892a9248e02dac13840f0acefe0fe72605dfa.tar.gz
gzip: fdatasync output dir before unlinking
This follows up on the earlier patch to avoid data loss near the system crashes. See: http://bugs.gnu.org/22768 * bootstrap.conf (gnulib_modules): Add dirname-lgpl, fdatasync, openat-safer, unistd-safer, unlinkat. * gzip.c: Include stddef.h, dirname.h. Include fcntl--.h instead of fcntl-safer.h. (RW_USER): Remove; no longer needed. (dfname, dfd): New static vars. (dot): New static const. (atdir_eq, atdir_set): New functions. (treat_file): Also fdatasync the output directory, if !keep. (treat_file, create_outfile, open_and_stat): Use dir fd for unlinkat and openat, if possible. (open_and_stat): Omit mode argument, since it was always the same. All callers changed. * lib/.gitignore, m4/.gitignore: Add new gnulib files. * tailor.h (PROTO, NO_STDIN_FSTAT, OPEN): Remove. Remove MACOS section, as this stuff would not work anyway now, and circa 2001 Apple stopped supporting Mac OS 9 and earlier. * zip.c: Do not include unistd.h and fcntl.h, as this file does not directly use any symbols defined by those headers.
Diffstat (limited to 'bootstrap.conf')
-rw-r--r--bootstrap.conf5
1 files changed, 5 insertions, 0 deletions
diff --git a/bootstrap.conf b/bootstrap.conf
index b15caa3..308dc5e 100644
--- a/bootstrap.conf
+++ b/bootstrap.conf
@@ -25,10 +25,12 @@ announce-gen
calloc
close
closein
+dirname-lgpl
fclose
fcntl
fcntl-safer
fdl
+fdatasync
fdopendir
fprintf-posix
fsync
@@ -47,6 +49,7 @@ lstat
maintainer-makefile
malloc-gnu
manywarnings
+openat-safer
perror
printf-posix
readme-release
@@ -55,6 +58,8 @@ savedir
stat-time
sys_stat
time
+unistd-safer
+unlinkat
update-copyright
utimens
xalloc