summaryrefslogtreecommitdiff
path: root/modules/opendirat
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2018-10-23 19:10:21 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2018-10-23 19:11:12 -0700
commit1b01fe40918401a965651499b0ba37ff53be86a9 (patch)
tree7bff60c2b8856e06669fbe0580cf2ce506a45ca4 /modules/opendirat
parent0f0ee4a910a71e7d53d6e05b2bc8bc45afff96ac (diff)
downloadgnulib-1b01fe40918401a965651499b0ba37ff53be86a9.tar.gz
backupfile: new dir_fd args
New module opendirat with code taken from fts. Use this module to let backupfile use a directory file descriptor. * NEWS: Document the incompatible change. * lib/backup-find.c (find_backup_file_name): * lib/backup-rename.c (backup_file_rename): New arg DIR_FD. * lib/backupfile.c: Include stdint.h, for SIZE_MAX. (SIZE_MAX): Remove. Include opendirat.h rather than dirent--.h. (check_extension): New args DIR_FD and BASE_MAX. All callers changed. (numbered_backup): New args DIR_FD and PNEW_FD. All callers changed. (backupfile_internal): New arg DIR_FD. All callers changed. * lib/fts.c: Include opendirat.h. (opendirat): Move to opendirat.c. * lib/opendirat.c, lib/opendirat.h, modules/opendirat: New files. * modules/backupfile (Depends-on): Remove dirfd, opendir. Add opendirat. * modules/fts (Depends-on): Remove fdopendir, openat-safer. Add opendirat.
Diffstat (limited to 'modules/opendirat')
-rw-r--r--modules/opendirat26
1 files changed, 26 insertions, 0 deletions
diff --git a/modules/opendirat b/modules/opendirat
new file mode 100644
index 0000000000..2e1798f637
--- /dev/null
+++ b/modules/opendirat
@@ -0,0 +1,26 @@
+Description:
+Open a directory relative to another directory.
+
+Files:
+lib/opendirat.c
+lib/opendirat.h
+
+Depends-on:
+dirent
+fcntl-h
+fdopendir
+openat-safer
+
+configure.ac:
+
+Makefile.am:
+lib_SOURCES += opendirat.c
+
+Include:
+"opendirat.h"
+
+License:
+GPL
+
+Maintainer:
+all