view modules/fts @ 39948:c01fb99adfe2

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.
author Paul Eggert <eggert@cs.ucla.edu>
date Tue, 23 Oct 2018 19:10:21 -0700
parents f448a881990c
children
line wrap: on
line source

Description:
Traverse a file hierarchy.

Files:
lib/fts_.h
lib/fts.c
lib/fts-cycle.c
m4/fts.m4

Depends-on:
closedir
cycle-check
d-ino
d-type
fchdir
fcntl
fcntl-h
flexmember
fstat
hash
i-ring
lstat
memmove
openat-h
opendir
opendirat
readdir
stdalign
stdbool
stddef

configure.ac:
gl_FUNC_FTS
dnl Use this version of fts unconditionally, since the GNU libc and
dnl NetBSD versions have bugs and/or unnecessary limitations.
AC_LIBOBJ([fts])

Makefile.am:

Include:
"fts_.h"

License:
GPL

Maintainer:
Jim Meyering