summaryrefslogtreecommitdiff
path: root/lib/fts.c
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2006-07-09 16:59:05 +0000
committerPaul Eggert <eggert@cs.ucla.edu>2006-07-09 16:59:05 +0000
commitcb052e4f6cc723bc408f32963e921705f3286c94 (patch)
treed6f6172f7cff8f5c44f9ae557a525e4b1baf277b /lib/fts.c
parent28edf6a75ef4f95e18da5b506bdcf122a53ca3ec (diff)
downloadcoreutils-cb052e4f6cc723bc408f32963e921705f3286c94.tar.xz
Update from gnulib.
Diffstat (limited to 'lib/fts.c')
-rw-r--r--lib/fts.c25
1 files changed, 8 insertions, 17 deletions
diff --git a/lib/fts.c b/lib/fts.c
index 5ea139700..3b577a867 100644
--- a/lib/fts.c
+++ b/lib/fts.c
@@ -78,26 +78,17 @@ static char sccsid[] = "@(#)fts.c 8.6 (Berkeley) 8/14/94";
# include "unistd--.h"
#endif
-#if defined _LIBC
+#if HAVE_DIRENT_H || _LIBC
# include <dirent.h>
-# define NAMLEN(dirent) _D_EXACT_NAMLEN (dirent)
-#else
-# if HAVE_DIRENT_H
-# include <dirent.h>
-# define NAMLEN(dirent) strlen ((dirent)->d_name)
+# ifdef _D_EXACT_NAMLEN
+# define NAMLEN(dirent) _D_EXACT_NAMLEN (dirent)
# else
-# define dirent direct
-# define NAMLEN(dirent) (dirent)->d_namlen
-# if HAVE_SYS_NDIR_H
-# include <sys/ndir.h>
-# endif
-# if HAVE_SYS_DIR_H
-# include <sys/dir.h>
-# endif
-# if HAVE_NDIR_H
-# include <ndir.h>
-# endif
+# define NAMLEN(dirent) strlen ((dirent)->d_name)
# endif
+#else
+# define dirent direct
+# define NAMLEN(dirent) (dirent)->d_namlen
+# include <ndir.h>
#endif
#ifdef _LIBC