summaryrefslogtreecommitdiff
path: root/src/remove.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2006-09-29 15:58:04 +0000
committerJim Meyering <jim@meyering.net>2006-09-29 15:58:04 +0000
commit31c77a2fde27888aead246cde6eb88724450e5e1 (patch)
treec1416ea548d77f30a1744696cbdf061afd2fb830 /src/remove.c
parentaf46184a80169c95bd0f8115a758d293836aa444 (diff)
downloadcoreutils-31c77a2fde27888aead246cde6eb88724450e5e1.tar.xz
[ChangeLog]
Since any system may be affected by the Darwin readdir bug, perform the extra rewinddir unconditionally. The performance impact of rewinding a directory is negligible. * src/remove.c (NEED_REWIND): Define to use CONSECUTIVE_READDIR_UNLINK_THRESHOLD unconditionally. [m4/ChangeLog] * readdir.m4: Remove file once again. * jm-macros.m4: Remove reference to gl_FUNC_READDIR.
Diffstat (limited to 'src/remove.c')
-rw-r--r--src/remove.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/remove.c b/src/remove.c
index 1ea7773f7..1fcf79ff3 100644
--- a/src/remove.c
+++ b/src/remove.c
@@ -64,12 +64,11 @@ enum
CONSECUTIVE_READDIR_UNLINK_THRESHOLD = 10
};
-#ifdef HAVE_WORKING_READDIR
-# define NEED_REWIND(readdir_unlink_count) 0
-#else
-# define NEED_REWIND(readdir_unlink_count) \
+/* FIXME: in 2009, or whenever Darwin 7.9.0 (aka MacOS X 10.3.9) is no
+ longer relevant, remove this work-around code. Then, there will be
+ no need to perform the extra rewinddir call, ever. */
+#define NEED_REWIND(readdir_unlink_count) \
(CONSECUTIVE_READDIR_UNLINK_THRESHOLD <= (readdir_unlink_count))
-#endif
enum Ternary
{