summaryrefslogtreecommitdiffstats
path: root/lib/libc/gen/readdir.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Make DIR a private type within libc, give it the same underlyingmatthew2012-03-221-1/+2
| | | | | | typedef regardless of __BSD_VISIBLE, and eliminate the dirfd() macro. ok guenther@
* If the internal consistency check fails, set errno so that it doesn'tguenther2012-02-041-5/+8
| | | | | | just look like end-of-directory. ok krw@ otto@ miod@
* More shrinkage, a bit for ramdisks but mostly for static binaries:guenther2009-11-181-25/+1
| | | | | | | | | | | | | | | | | - wrap with #ifndef NO_LOG_BAD_DNS_RESPONSES libc code that uses p_class() and p_type() for diagnostics, then add that define to libstub to avoid pulling in res_debug_syms.o - split rcmd() and ruserok() into separate files, as nothing uses both - split readdir_r() to its own file - split syslog_r() from syslog(), as the latter needs localtime(); many binaries no longer need to pull in all the time code after this; switch from usleep() to nanosleep() while we're at it (The profit of analysis of -Wl,-M,--cref output) Chops 888kB from /bin and /sbin on i386 ok deraadt@, miod@
* Be carefull not to read away the target entry when encounteringotto2008-05-011-5/+11
| | | | | deleted files after a seekdir(); testcase produced by mbalmer@; fix with and ok mbalmer; ok millert@
* alter internal _readdir_unlocked() api to be less confusing, so thatokan2008-04-041-15/+18
| | | | | | | | | callers may respond accordingly and correctly. this fixes an issue where readdir_r() could not decipher the difference between an error or no more entires. feedback and ok kurt@, ok millert@
* _FD_LOCK/UNLOCK() is libpthread specific and not needed for librthread, sokurt2007-06-051-13/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | isolate its usage to libpthread only and replace with generic non-static mutex support in the one place it is needed: - remove _FD_LOCK/UNLOCK from lseek and ftruncate in libc and make the functions weak so that libpthread can override with its own new versions that do the locking. - remove _thread_fd_lock/unlock() weak functions from libc and adjust libpthread for the change. - add generic _thread_mutex_lock/unlock/destroy() weak functions in libc to support non-static mutexes in libc and add libpthread and librthread implementations for them. libc can utilize non-static mutexes via the new _MUTEX_LOCK/UNLOCK/DESTROY() macros. Actually these new macros can support both static and non-static mutexes but currently only using them for non-static. - make opendir/closedir/readdir/readdir_r/seekdir/telldir() thread-safe for both thread libraries by using a non-static mutex in the struct _dirdesc (typedef DIR), utilizing it in the *dir functions and remove remaining and incorrect _FD_LOCK/UNLOCK() use in libc. - add comments to both thread libraries to indicate libc depends on the current implementation of static mutex initialization. suggested by marc@ - major bump libc and libpthread due to function removal, structure change and weak symbol conversions. okay marc@, tedu@
* g/c __DTF_READALL. It was a flag to the internal __opendir2() butmillert2007-02-081-4/+2
| | | | | is never set now that the unionfs support has been removed from readdir(). OK pedro@
* zap remaining rcsid.espie2005-08-081-4/+1
| | | | | | Kill old files that are no longer compiled. okay theo
* bye bye whiteoutsmillert2005-06-161-3/+1
|
* deregister (and deauto!). ok millert@ marco@otto2005-03-251-2/+2
|
* ansify function definitions and zap some `register'jfb2004-05-181-7/+3
| | | | ok millert@
* Remove the advertising clause in the UCB license which Berkeleymillert2003-06-021-6/+2
| | | | rescinded 22 July 1999. Proofed by myself and Theo.
* don't copy past end of record in readdir_r (ok by art)rees2001-05-171-2/+2
|
* string.h for memcpy protoderaadt1999-09-011-1/+2
|
* Add thread-safety to libc, so that libc_r will build (on i386 at least).d1998-11-201-1/+33
| | | | | | | | | | | | | All POSIX libc api now there (to P1003.1c/D10) (more md stuff is needed for other libc/arch/*) (setlogin is no longer a special syscall) Add -pthread option to gcc (that makes it use -lc_r and -D_POSIX_THREADS). Doc some re-entrant routines Add libc_r to intro(3) dig() uses some libc srcs and an extra -I was needed there. Add more md stuff to libc_r. Update includes for the pthreads api Update libc_r TODO
* Fix RCS idstholo1996-08-191-7/+1
| | | | Make sure everything uses {SYS,}LIBC_SCCS properly
* initial import of NetBSD treederaadt1995-10-181-0/+81