Age | Commit message (Collapse) | Author |
|
it's easier for legacy applications designed for the version
of fts in glibc or BSD to convert to this more robust version.
Add a new mode, FTS_CWDFD, by which to enable the improved
(openat- based -- aka no-chdir) semantics.
* fts_.h (FTS_CWDFD): Define. Callers must use this fts_open
option to enable the more robust behavior.
(FTS_OPTIONMASK): Widen accordingly.
* fts.c: Restore removed code, reverting the default behavior.
|
|
[struct FTS] (fts_rft): Remove now-unused member.
[struct FTS] (fts_cycle.state): Improve comment.
|
|
|
|
in comments or local variable names.
|
|
(FTS): New member fts_cycle, that is a union that contains the
old active_dir_ht and cycle_state. All uses changed to mention
fts_cycle.ht and fts_cycle.state.
|
|
(FTS): Use struct hash_table * instead of Hash_table, so that
we no longer need to include hash.h here.
|
|
|
|
(FTSENT): New member fts_fts. Remove members fts_ino, fts_dev,
fts_nlink; no longer needed now that fts_statp is always there.
All uses changed to use fts_statp instead.
|
|
|
|
Include stddef.h, for ptrdiff_t.
(FTS.fts_nitems): Now size_t, not int, for hosts that allow more
than INT_MAX entries in a directory.
(FTS_ROOTPARENTLEVEL): Parenthesize properly.
(FTSENT.fts_level): Now ptrdiff_t, not int, to allow recursing more
than INT_MAX levels deep on 64-bit hosts.
(FTSENT.fts_namelen): Now size_t, not u_short, to support hosts like
the Hurd that don't have arbitrary limits on directory entry lengths.
(FTSENT.fts_statp): Now an array, not a pointer, so that we don't
have to play unportable games with pointer arithmetic. Keep it array
for the benefit of user code that assumes it is a pointer.
|
|
(FTS_TIGHT_CYCLE_CHECK): New value.
(FTS_OPTIONMASK): Adjust to include the new value.
(FTS_NAMEONLY, FTS_STOP): Increase to allow room for new value.
(struct FTS) [active_dir_ht]: New member. Replaces fts_dir_signatures.
(struct FTS) [cycle_state]: New member.
|
|
|
|
|
|
[!_LIBC]: Define-away __THROW, __BEGIN_DECLS, __END_DECLS.
|
|
encountered in a traversal fit in an `unsigned short',
and fix some portability bugs (don't depend on gcc).
[FTS] (fts_pathlen): Change type from int to size_t.
[FTSENT] (fts_pathlen): Change type from u_short to size_t.
(fts_level): Change type from u_short to int.
|
|
|
|
|
|
|
|
|
|
|