summaryrefslogtreecommitdiff
path: root/lib/libc/gen/readdir.c
Commit message (Collapse)AuthorAgeFilesLines
* use _GENERIC_DIRSIZ(dp) to avoid copying too much of the dirent overAlfred Perlstein2002-02-261-2/+2
| | | | | | | | the user supplied buffer. this can be a problem when the user doesn't supply a full dirent and we corrupt their memory. Notes: svn path=/head/; revision=91330
* Fix SCM ID's.David E. O'Brien2002-02-011-3/+2
| | | | Notes: svn path=/head/; revision=90039
* Remove _THREAD_SAFE and make libc thread-safe by default byDaniel Eischen2001-01-241-24/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | adding (weak definitions to) stubs for some of the pthread functions. If the threads library is linked in, the real pthread functions will pulled in. Use the following convention for system calls wrapped by the threads library: __sys_foo - actual system call _foo - weak definition to __sys_foo foo - weak definition to __sys_foo Change all libc uses of system calls wrapped by the threads library from foo to _foo. In order to define the prototypes for _foo(), we introduce namespace.h and un-namespace.h (suggested by bde). All files that need to reference these system calls, should include namespace.h before any standard includes, then include un-namespace.h after the standard includes and before any local includes. <db.h> is an exception and shouldn't be included in between namespace.h and un-namespace.h namespace.h will define foo to _foo, and un-namespace.h will undefine foo. Try to eliminate some of the recursive calls to MT-safe functions in libc/stdio in preparation for adding a mutex to FILE. We have recursive mutexes, but would like to avoid using them if possible. Remove uneeded includes of <errno.h> from a few files. Add $FreeBSD$ to a few files in order to pass commitprep. Approved by: -arch Notes: svn path=/head/; revision=71579
* #endif should not have a non-comment token after it.David E. O'Brien2000-12-131-1/+1
| | | | | | | GCC 2.97 (snapshot) complains about this. Notes: svn path=/head/; revision=69968
* Cleanup XXXdir functions to eliminate global hash table ofDaniel Eischen2000-12-061-4/+5
| | | | | | | | | | | | | | | | | | | telldir positions. This will allow (future) locking on a per-DIR basis (for MT-safety). For now, this change does the following: o Remove the hash table from telldir.c. Recode to use queue macros. o Remove 'const' from 'telldir(const DIR *)'. o Remove 'register' variables as suggested in a recent thread. No response from: -current Notes: svn path=/head/; revision=69656
* #include <string.h> for memcpy() prototypeKris Kennaway2000-06-031-0/+1
| | | | | | | Obtained from: OpenBSD Notes: svn path=/head/; revision=61193
* style fixes, remove extra braces.Alfred Perlstein1999-11-291-17/+20
| | | | | | | | | | | | | | | readdir_r is not POSIX according to POSIX_SOURCE, bruce says: > readdir_r() is in the _POSIX_SOURCE section, but is not a POSIX.1-1990 > function. It's POSIX.1-1996 so it should be under a different feature > test which we don't support yet. make sure errno is saved so that its contents are cleared unless necessary. Submitted by: bde Notes: svn path=/head/; revision=53892
* Provide a man page for Alfreds lovely readdir_r function. AlsoWes Peters1999-11-291-5/+8
| | | | | | | | fixed a minor indentation nit and added a few {}s to make readdir_r easier on old eyes. Notes: svn path=/head/; revision=53872
* add pthread_cancel, obtained from OpenBSD.Alfred Perlstein1999-11-281-0/+44
| | | | | | | | | | | | | | | | | eischen (Daniel Eischen) added wrappers to protect against cancled threads orphaning internal resources. the cancelability code is still a bit fuzzy but works for test programs of my own, OpenBSD's and some examples from ORA's books. add readdir_r to both libc and libc_r add some 'const' attributes to function parameters Reviewed by: eischen, jasone Notes: svn path=/head/; revision=53812
* Fix a bogus cast for a bogus pointer check. This only checks if theJohn Birrell1998-02-201-1/+1
| | | | | | | | pointer is 4-byte aligned. On a 64-bit machine it probably should check that the pointer is 8-byte aligned (eh, Bruce?) 8-) Notes: svn path=/head/; revision=33665
* Import CSRG 4.4BSD-Lite2 lib/libc onto vendor branchPeter Wemm1997-03-111-0/+75
Notes: svn path=/vendor/CSRG/dist/; revision=23658