Hash :
5f4d15e6
Author :
Date :
2023-08-13T09:46:47
fts: improve memory-allocation errno handling * lib/fts.c (fts_read, fts_build): When enter_dir or setup_dir fails, report its errno value back to the user. (internal_function): Preserve errno. * modules/fts (Depends-on): Add calloc-posix, free-posix, malloc-posix, and realloc-posix, for better errno handling on allocation failures.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58
Description:
Traverse a file hierarchy.
Files:
lib/fts_.h
lib/fts.c
lib/fts-cycle.c
m4/fts.m4
Depends-on:
alignasof
attribute
c99
calloc-posix
closedir
cycle-check
d-ino
d-type
fchdir
fcntl
fcntl-h
flexmember
free-posix
fstat
hash
i-ring
lstat
malloc-posix
memmove
open
openat-h
opendir
opendirat
readdir
realloc-posix
stdbool
stddef
stdint
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.
gl_CONDITIONAL([GL_COND_OBJ_FTS], [true])
Makefile.am:
if GL_COND_OBJ_FTS
lib_SOURCES += fts.c
endif
Include:
"fts_.h"
License:
GPL
Maintainer:
Jim Meyering