r8746: replace opendir/readdir/telldir/seekdir/closedir on systems where they
authorAndrew Tridgell <tridge@samba.org>
Mon, 25 Jul 2005 04:03:01 +0000 (04:03 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:30:01 +0000 (13:30 -0500)
commite1bf7c4279fbc03a52497d24cea375e75059cba1
treef7f73e35996fe80d94e08ba99d9a618d76ba4ba2
parent3a1c6a176ed37b4d696dab52b2f2e8ce5b681ff5
r8746: replace opendir/readdir/telldir/seekdir/closedir on systems where they
are broken (apparently all BSD systems). This breakage leads to unlink
on files in an open directory causing a later seekdir to miss
files. The bug happens due to a block boundary bug in the BSD libc
implementation of these calls.

This replacement code also fixes a severe memory usage problem with
telldir that can cause closedir() to take an arbitrary amount of time.

I have reported the bug in readdir to Greg Lehey (a FreeBSD maintainer)
source/build/tests/os2_delete.c [new file with mode: 0644]
source/configure.in
source/lib/replace/config.mk
source/lib/replace/repdir/config.m4 [new file with mode: 0644]
source/lib/replace/repdir/repdir.c [new file with mode: 0644]