diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2006-07-09 16:59:05 +0000 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2006-07-09 16:59:05 +0000 |
commit | cb052e4f6cc723bc408f32963e921705f3286c94 (patch) | |
tree | d6f6172f7cff8f5c44f9ae557a525e4b1baf277b /lib/getcwd.c | |
parent | 28edf6a75ef4f95e18da5b506bdcf122a53ca3ec (diff) | |
download | coreutils-cb052e4f6cc723bc408f32963e921705f3286c94.tar.xz |
Update from gnulib.
Diffstat (limited to 'lib/getcwd.c')
-rw-r--r-- | lib/getcwd.c | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/lib/getcwd.c b/lib/getcwd.c index ba226799d..a67dc0c07 100644 --- a/lib/getcwd.c +++ b/lib/getcwd.c @@ -38,23 +38,13 @@ #if HAVE_DIRENT_H || _LIBC # include <dirent.h> -# ifndef _D_EXACT_NAMLEN -# define _D_EXACT_NAMLEN(d) strlen ((d)->d_name) -# endif #else # define dirent direct -# 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 _D_EXACT_NAMLEN(d) (d)->d_namlen +# include <ndir.h> #endif #ifndef _D_EXACT_NAMLEN -# define _D_EXACT_NAMLEN(d) ((d)->d_namlen) +# define _D_EXACT_NAMLEN(d) strlen ((d)->d_name) #endif #ifndef _D_ALLOC_NAMLEN # define _D_ALLOC_NAMLEN(d) (_D_EXACT_NAMLEN (d) + 1) |