diff options
author | Eric Blake <ebb9@byu.net> | 2008-10-01 20:52:16 -0600 |
---|---|---|
committer | Jim Meyering <meyering@redhat.com> | 2008-10-02 13:17:48 +0200 |
commit | 0628b73f355d9d584ddbd383dddf99f15c088729 (patch) | |
tree | fa0b8af84caf5073d1152c4ce9b661cc4b797dff /src | |
parent | dafbd407bc65e989a831482f444228427f14bb70 (diff) | |
download | coreutils-0628b73f355d9d584ddbd383dddf99f15c088729.tar.xz |
remove.c: allow compilation on cygwin
* src/remove.c (dirent_inode_sort_may_be_useful)
[!HAVE_STRUCT_DIRENT_D_TYPE]: Elide definition when there is no point
in trying to use it.
Diffstat (limited to 'src')
-rw-r--r-- | src/remove.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/remove.c b/src/remove.c index 30931b0f7..9bcd6f7c2 100644 --- a/src/remove.c +++ b/src/remove.c @@ -1275,11 +1275,10 @@ dirent_count (struct stat const *st) { return st->st_size / 16; } -#endif /* HAVE_STRUCT_DIRENT_D_TYPE */ -#if defined HAVE_SYS_VFS_H && HAVE_FSTATFS && HAVE_STRUCT_STATFS_F_TYPE -# include <sys/statfs.h> -# include "fs.h" +# if HAVE_SYS_VFS_H && HAVE_FSTATFS && HAVE_STRUCT_STATFS_F_TYPE +# include <sys/vfs.h> +# include "fs.h" /* Return false if it is easy to determine the file system type of the directory on which DIR_FD is open, and sorting dirents on @@ -1313,9 +1312,10 @@ dirent_inode_sort_may_be_useful (int dir_fd) return true; } } -#else +# else /* !HAVE_STRUCT_STATFS_F_TYPE */ static bool dirent_inode_sort_may_be_useful (int dir_fd) { return true; } -#endif +# endif /* !HAVE_STRUCT_STATFS_F_TYPE */ +#endif /* HAVE_STRUCT_DIRENT_D_TYPE */ /* When a directory contains very many entries, operating on N entries in readdir order can be very seek-intensive (be it to unlink or even to |