summaryrefslogtreecommitdiffstats
path: root/lib/libc/gen/fts-compat.c
Commit message (Collapse)AuthorAgeFilesLines
* Remove an unused variable: `sb' in fts_read().tjr2003-01-031-1/+0
|
* Make the threatened fts(3) ABI fix. FTSENT now avoids the use of the structwollman2002-09-211-13/+67
| | | | | | | | | | | | | | | | hack, thereby allowing future extensions to the structure (e.g., for extended attributes) without rebreaking the ABI. FTSENT now contains a pointer to the parent stream, which fts_compar() can then take advantage of, avoiding the undefined behavior previously warned about. As a consequence of this change, the prototype of the comparison function passed to fts_open() has changed to reflect the required amount of constness for its use. All callers in the tree are updated to use the correct prototype. Comparison functions can now make use of the new parent pointer to access the new stream-specific private data pointer, which is intended to assist creation of reentrant library routines which use fts(3) internally. Not objected to in spirit by: -arch
* * Remove __P and convert to ANSI prototypes.obrien2002-02-011-43/+41
| | | | | * Remove 'register'. (some functions had 7+ register functions...) * Fix SCM ID's.
* Removed duplicate VCS ID tags, as per style(9).ru2001-08-131-2/+0
|
* Fix another unprotected instance of chdir() by extending thekris2001-06-011-24/+12
| | | | | | | fts_safe_changedir() function and using that instead for both of the chdir()s. Partially submitted by: Todd Miller <millert@OpenBSD.org>, bde
* When doing the chdir("..") in the !FTS_NOCHDIR case, stat() after we getkris2001-05-301-2/+16
| | | | | | | there and compare the inode and device numbers to the values we remember, to guard against the directory having been moved around in the meantime. Reported by: Nick Cleaton <nick@cleaton.net>
* Remove _THREAD_SAFE and make libc thread-safe by default bydeischen2001-01-241-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 style bugs (including ones introduced from OpenBSD).green2000-08-161-29/+16
|
* Simplify sytem call renaming. Instead of _foo() <-- _libc_foo <-- foo(),jasone2000-01-271-12/+11
| | | | | | | | | | | | | | | | | just use _foo() <-- foo(). In the case of a libpthread that doesn't do call conversion (such as linuxthreads and our upcoming libpthread), this is adequate. In the case of libc_r, we still need three names, which are now _thread_sys_foo() <-- _foo() <-- foo(). Convert all internal libc usage of: aio_suspend(), close(), fsync(), msync(), nanosleep(), open(), fcntl(), read(), and write() to _foo() instead of foo(). Remove all internal libc usage of: creat(), pause(), sleep(), system(), tcdrain(), wait(), and waitpid(). Make thread cancellation fully POSIX-compliant. Suggested by: deischen
* Add three-tier symbol naming in support of POSIX thread cancellationjasone2000-01-121-11/+14
| | | | | | points. For library functions, the pattern is __sleep() <-- _libc_sleep() <-- sleep(). The arrows represent weak aliases. For system calls, the pattern is _read() <-- _libc_read() <-- read().
* Switch over to the OpenBSD fts.c, fixing lots of things.green1999-12-181-71/+125
| | | | Obtained from: OpenBSD
* Fix the root cause of the fts buffer overflow. This is a temporaryimp1999-09-021-5/+23
| | | | | | | | | patch to stop the core dumps while others come up with a better reviewed patch which may also fix other problems. We do illegal pointer arithmetic, but it should be OK since FreeBSD only supports machines with flat address spaces. Submitted by: bde
* Reverted to revision 1.8 as previous fix causes fts_open with with apho1999-08-151-1/+1
| | | | | | path name argument with a trailing '/' to fail. Reviewed by: phk
* Reviewed by: phkpho1999-08-141-1/+1
| | | | | | | When fts_open is used with option FTS_NOCHDIR the full path entry of type FTS_DP is returned with a trailing '/' if the final directory is empty. This fix coresponds to netbsd's __fts13.c v. 1.16
* Replace memory leaking instances of realloc with non-leaking reallocf.imp1998-09-161-2/+2
| | | | | | | | | | | 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...
* fts_close calls free(sp), the ISSET(FTS_NOCHDIR) which is a macro thatphk1998-07-031-3/+4
| | | | | | | | references sp. The free needs to follow ISSET PR: 7148 Reviewed by: phk Submitted by: Ken Mayer <kmayer@freegate.com>
* Apply fts() fix from PR#4593peter1997-09-221-1/+1
| | | | Submitted by: Dmitrij Tejblum <dima@tejblum.dnttm.rssi.ru>
* Merge in the safe chdir changes from Todd Miller's mods to the OpenBSDimp1997-08-291-20/+64
| | | | | | | | | | | tree. Also merge in fix to NetBSD PR #1495. These represent 1.3-1.9 in the OpenBSD tree. Make minor KNF changes to new code (which is in the OpenBSD as 1.10). This avoids the symlink race problems. These patches should go into 2.2.5 before the ship if they don't break anything in -current. Reviewed by: Bruce Evans Obtained from: OpenBSD
* Merge from Lite2:peter1997-03-111-3/+27
| | | | | filesystem include updates, duplicate group suppression, cleanups, filesystem whiteout support (unionfs), bidir popen().
* General -Wall warning cleanup, part I.jkh1996-07-121-7/+7
| | | | Submitted-By: Kent Vander Velden <graphix@iastate.edu>
* Remove trailing whitespace.rgrimes1995-05-301-6/+6
|
* BSD 4.4 Lite Lib Sourcesrgrimes1994-05-271-0/+971
OpenPOWER on IntegriCloud