summaryrefslogtreecommitdiff
path: root/lib/ftw.c
AgeCommit message (Collapse)Author
2003-05-05(struct dummy): Ensure that at least the number ofJim Meyering
initializers matches the number of members in the corresponding enum.
2003-05-05Avoid array overrun.Jim Meyering
(nftw_arr): Update to reflect complete list of members. (ftw_arr): Likewise
2003-03-19DJGPP doesn't have S_ISLNK, so provide a replacement.Jim Meyering
(S_IFMT): Define, if necessary. [STAT_MACROS_BROKEN]: Undefine S_ISLNK. (S_ISLNK): Define, if necessary.
2003-03-17(FTW_STAT): Rename from `STAT', to avoid conflictJim Meyering
with STAT definition from <sys/dir.h> on AIX 5.1.
2003-03-09Include "save-cwd.h".Jim Meyering
(ftw_startup): Avoid use of getcwd, if possible. Instead, use fopen/fchdir via save_cwd/restore_cwd.
2003-03-06Fix a bug that causes du to dump core on 64-bit systems.Jim Meyering
(ftw_startup): Declare `func' parameter to be of type NFTW_FUNC_T, not void* which may be smaller on 64-bit systems. Remove now-unnecessary cast. (FTW_NAME): Cast func argument to type `NFTW_FUNC_T'.
2003-02-28(ftw_startup): Return -1 if alloca fails.Jim Meyering
2003-02-21Include <sys/types.h> before <dirent.h>.Jim Meyering
This is required for Apple Darwin 6.3 (MacOS 10.2.3).
2003-02-12tweak commentJim Meyering
2003-02-08(ftw_startup): Don't shadow outer declaration of save_err.Jim Meyering
Merge inconsequential changes from libc.
2003-02-08(ftw_startup): When using FTW_CHDIR, always rememberJim Meyering
the current directory, not just when DIR contains a slash.
2003-02-07Merge inconsequential changes from libc.Jim Meyering
Include limits.h earlier. Move PATH_MAX definition `down' a little; add comment. Rename local, saved_errno to save_err.
2003-02-05(ftw_startup): When using FTW_DEPTH, call `func', theJim Meyering
user-supplied callback, once for the current directory before calling ftw_dir, in case that part of the hierarchy should be pruned. `func' does that by setting `data->skip'.
2003-02-05Include <limits.h>.Jim Meyering
(PATH_MAX): Define to 1024, if not already defined. (process_entry): Allocate enough space to hold the resulting file name. Don't presume that 2*dirbufsize is enough. (ftw_startup): Always use PATH_MAX to compute buffer size, now that it is guaranteed to be defined.
2003-02-05(process_entry): When using FTW_DEPTH, call `func',Jim Meyering
the user-supplied callback, once before any of its entries, in case that part of the hierarchy should be pruned. `func' does that by setting `data->skip'.
2003-02-02(lstat) [LSTAT_FOLLOWS_SLASHED_SYMLINK]: Define to rpl_lstat.Jim Meyering
2003-01-25[_LIBC] (ISSLASH, FILESYSTEM_PREFIX_LEN): Define.Jim Meyering
(base_name): New function. (ftw_startup): Don't strip trailing slashes. Use base_name to find the offset of the basename.
2003-01-25(object_compare): Compare inode numbers before device numbers.Jim Meyering
The former is much more likely to differ for any two given file objects.
2003-01-23Add autoconf-recommended block of alloca-related code.Jim Meyering
[!_LIBC] (__getcwd): Define to xgetcwd and declare xgetcwd.
2003-01-22(find_object): Don't use c99-style struct initializer.Jim Meyering
2003-01-22(process_entry): Handle FTW_DCHP.Jim Meyering
(ftw_dir): Handle FTW_DCH.
2003-01-22Include autoconf-recommended block of dirent/NAMELENJim Meyering
related definitions and includes. Use NAMELEN throughout, rather than _D_EXACT_NAMLEN. [_LIBC]: Define NAMELEN to _D_EXACT_NAMLEN. (stpcpy): Declare, if necessary. (mempcpy): Define, if necessary. [!_LIBC] (__stpcpy, __mempcpy): Define. [!_LIBC] (LXSTAT, XSTAT): Define.
2003-01-14Merge in Ulrich's and my changes from libc.Jim Meyering
2003-01-12tweak commentsJim Meyering
2003-01-12Also work on systems that have `struct direct', using autoconf's ↵Jim Meyering
AC_HEADER_DIRENT.
2003-01-12(ftw_startup): Rename local-shadowing local to pacify gcc.Jim Meyering
2003-01-12New file, from glibc/io.Jim Meyering