diff options
author | Eric Blake <eblake@redhat.com> | 2014-04-09 10:20:08 -0600 |
---|---|---|
committer | Eric Blake <eblake@redhat.com> | 2014-04-09 10:20:08 -0600 |
commit | f4eba3ef124442a0e8c60cf70ca7d9962a1540a8 (patch) | |
tree | 9ed54db2e5a81cd2d1ff123fa6c3a402bb86cebe /lib/fts.c | |
parent | df86f1c3641eeb60d605ca9f38166d18397e86c0 (diff) | |
download | gnulib-f4eba3ef124442a0e8c60cf70ca7d9962a1540a8.tar.gz |
fts: avoid unnecessary strlen calls
Not all platforms have _D_EXACT_NAMLEN.
* lib/fts.c (_D_EXACT_NAMLEN): Restore definition when needed.
Signed-off-by: Eric Blake <eblake@redhat.com>
Diffstat (limited to 'lib/fts.c')
-rw-r--r-- | lib/fts.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -79,6 +79,9 @@ static char sccsid[] = "@(#)fts.c 8.6 (Berkeley) 8/14/94"; #endif #include <dirent.h> +#ifndef _D_EXACT_NAMLEN +# define _D_EXACT_NAMLEN(dirent) strlen ((dirent)->d_name) +#endif #if HAVE_STRUCT_DIRENT_D_TYPE /* True if the type of the directory entry D is known. */ |