From 31c77a2fde27888aead246cde6eb88724450e5e1 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Fri, 29 Sep 2006 15:58:04 +0000 Subject: [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. --- src/remove.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src/remove.c') 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 { -- cgit v1.2.3-54-g00ecf