summaryrefslogtreecommitdiffstats
path: root/lib/libc/gen/scandir.c
Commit message (Collapse)AuthorAgeFilesLines
* * Remove __P and convert to ANSI prototypes.obrien2002-02-011-6/+6
| | | | | * Remove 'register'. (some functions had 7+ register functions...) * Fix SCM ID's.
* Remove _THREAD_SAFE and make libc thread-safe by default bydeischen2001-01-241-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Fix a memory leakjulian1998-10-071-15/+25
| | | | | | | | | | | PR: 7923 Submitted by: Archie Cobbs <archie@whistle.com> The scandir() function returns -1 if it fails. In many cases when this happens, it does not free the memory that it allocated, resulting in a memory leak, or close the directory opened with opendir(). BAD DOG, BAD!
* Replace memory leaking instances of realloc with non-leaking reallocf.imp1998-09-161-1/+1
| | | | | | | | | | | In some cases replace if (a == null) a = malloc(x); else a = realloc(a, x); with simple reallocf(a, x). Per ANSI-C, this is guaranteed to be the same thing. I've been running these on my system here w/o ill effects for some time. However, the CTM-express is at part 6 of 34 for the CAM changes, so I've not been able to do a build world with the CAM in the tree with these changes. Shouldn't impact anything, but...
* Remove trailing whitespace.rgrimes1995-05-301-1/+1
|
* scandir(3) didn't transfer d_type, and d_ino is called d_fileno now.phk1995-03-251-1/+2
|
* BSD 4.4 Lite Lib Sourcesrgrimes1994-05-271-0/+135
OpenPOWER on IntegriCloud