summaryrefslogtreecommitdiff
path: root/lib/libc/gen/readdir.c
AgeCommit message (Collapse)Author
2012-06-25Update old-style definitions to ANSI, remove a couple of registerabs
definitions along the way. Fixed gcc 4.1 build (thank you vax)
2010-09-16- remove a wrong _DIAGASSERTyamt
- update comments - whitespace
2008-05-04Fix a bug in the implementation of seekdir(). If the first entry intonnerre
a block has been unlinked, seekdir() may overshoot by one entry. Thus, _readdir_unlinked() must not skip deleted entries when being called from seekdir(). Christos agreed.
2006-05-17PR/24324: Arne H Juul: Re-implement seekdir/telldir using a pointer ofchristos
locations per directory instead of a global hash table to avoid memory leak issues, and incorrect results.
2006-01-24rename __func to _func_unlocked, and add their prototypes in extern.hchristos
instead of exposing them in dirent.h. More locking consistency fixes.
2006-01-24PR/32609: Tanaka Akira: seekdir blocks if pthread is linkedchristos
Do locking consistently to avoid recursive locks (like the bug reported in this pr), and to avoid leaking locks on errors.
2005-09-13compat core reorg.christos
2005-08-1964 bit inode changeschristos
2003-08-07Move UCB-licensed code from 4-clause to 3-clause licence.agc
Patches provided by Joel Baker in PR 22280, verified by myself.
2003-05-28Need <string.h> for memcpy().kleink
2003-05-28add mutex locking for directories and readdir_r(3). Influenced by FreeBSD.christos
2000-01-22Delint.mycroft
Remove trailing ; from uses of __weak_alias(). The macro inserts this if needed.
1999-09-20back out the #ifdef _DIAGNOSTIC argument checks; too many people complained.lukem
_DIAGASSERT() is still retained.
1999-09-16* use _DIAGASSERT() to check pointer arguments against NULL and filelukem
descriptors against -1 (as appropriate). * add actual checks which to detect stuff that would trigger_DIAGASSERT(), and attempt to return a sane error condition. * knf some code * remove some `register' decls. the first two items result in the addition of code similar to the following in various functions: _DIAGASSERT(path != NULL) #ifdef _DIAGNOSTIC if (path == NULL) { errno = EFAULT; return (-1); } #endif
1998-11-13delintchristos
1998-02-27trivial changes to quiet lint.perry
1998-02-03remove obsolete register declarationsperry
1997-10-10Fix another getdents() botch. I must've had a Makefile withoutfvdl
warnings on.
1997-10-10Use getdents(). Read NFS directories in one go (just as union dirs, butfvdl
without removing double entries). This makes sure that we get a consistent snapshot of the directory, and protects against any 'bad cookie' errors.
1997-07-21If port provides __weak_alias(), provide an Standard C and POSIX purejtc
identifier namespace by renaming non standard functions and variables such that they have a leading underscore. The library will use those names internally. Weak aliases are used to provide the original names to the API. This is only the first part of this change. It is most of the functions which are implemented in C for all NetBSD ports. Subsequent changes are to add the same support to the remaining C files, to assembly files, and to the automagically generated assembly source used for system calls. When all of the above is done, ports with weak alias support should add a definition for __weak_alias to <sys/cdefs.h>.
1997-07-13Fix RCSID'schristos
1995-02-25clean up Id's on files previously imported...cgd
1994-12-28Mostly sync with CSRG.mycroft
1994-10-19beware cast type.cgd
1994-07-27Add RCS Id'sjtc
1994-07-27opendir() & friends from 4.4lite.jtc
1993-03-21initial import of 386bsd-0.1 sourcescgd