#
680db495 |
| 13-Oct-2009 |
Jilles Tjoelker <jilles@FreeBSD.org> |
Make getcwd(3) faster, simpler and more compliant using *at syscalls.
It is no longer necessary to construct long paths consisting of repeated "../" which may be slow to process and may exceed PATH_
Make getcwd(3) faster, simpler and more compliant using *at syscalls.
It is no longer necessary to construct long paths consisting of repeated "../" which may be slow to process and may exceed PATH_MAX.
show more ...
|
Revision tags: release/7.2.0_cvs, release/7.2.0, release/7.1.0_cvs, release/7.1.0, release/6.4.0_cvs, release/6.4.0, release/7.0.0_cvs, release/7.0.0, release/6.3.0_cvs, release/6.3.0, release/6.2.0_cvs, release/6.2.0 |
|
#
c879ae35 |
| 09-Jan-2007 |
Warner Losh <imp@FreeBSD.org> |
Per Regents of the University of Calfornia letter, remove advertising clause.
# If I've done so improperly on a file, please let me know.
|
Revision tags: release/5.5.0_cvs, release/5.5.0, release/6.1.0_cvs, release/6.1.0, release/6.0.0_cvs, release/6.0.0 |
|
#
323d07b4 |
| 18-Sep-2005 |
Andrey A. Chernov <ache@FreeBSD.org> |
Just by allocating size*2 bytes we can't be sure that new size will be enough, so change two if (size not enough) { reallocf(size*2); } into while (size not enough) { reallocf(size*2); }
|
#
b9fb13f5 |
| 15-Sep-2005 |
Andrey A. Chernov <ache@FreeBSD.org> |
Cosmetic fixes to prev. commit. Change first MAXPATHLEN to more standard PATH_MAX Change second MAXPATHLEN to 1024 (it is temp buffer not related) Change comment to reflect that.
Suggested by: bde
|
#
dedaf3ca |
| 14-Sep-2005 |
Andrey A. Chernov <ache@FreeBSD.org> |
Remove any hardcoded assumptions about malloc's way of allocating, just use MAXPATHLEN. It prevents potential buffer overflow with other malloc implementations. (this change based on submitted patch)
Remove any hardcoded assumptions about malloc's way of allocating, just use MAXPATHLEN. It prevents potential buffer overflow with other malloc implementations. (this change based on submitted patch)
PR: 86135 Submitted by: Trevor Blackwell <tlb@tlb.org>
show more ...
|
Revision tags: release/5.4.0_cvs, release/5.4.0, release/4.11.0_cvs, release/4.11.0, release/5.3.0_cvs, release/5.3.0, release/4.10.0_cvs, release/4.10.0, release/5.2.1_cvs, release/5.2.1, release/5.2.0_cvs, release/5.2.0 |
|
#
4539e95a |
| 29-Oct-2003 |
Tim J. Robbins <tjr@FreeBSD.org> |
Remove incomplete support for running FreeBSD userland on old NetBSD kernels lacking the issetugid() and utrace() syscalls.
|
Revision tags: release/4.9.0_cvs, release/4.9.0, release/5.1.0_cvs, release/5.1.0, release/4.8.0_cvs, release/4.8.0, release/5.0.0_cvs, release/5.0.0 |
|
#
098b8611 |
| 10-Jan-2003 |
Tim J. Robbins <tjr@FreeBSD.org> |
Avoid a memory leak by using reallocf() instead of realloc().
|
#
73e8989d |
| 10-Jan-2003 |
Tim J. Robbins <tjr@FreeBSD.org> |
Prototype __getcwd() to avoid a warning.
|
Revision tags: release/4.7.0_cvs |
|
#
a10a751f |
| 19-Aug-2002 |
Juli Mallett <jmallett@FreeBSD.org> |
s/trailing NULL/trailing NUL/
|
Revision tags: release/4.6.2_cvs, release/4.6.2, release/4.6.1, release/4.6.0_cvs, release/4.5.0_cvs, release/4.4.0_cvs |
|
#
22626efa |
| 01-Feb-2002 |
David E. O'Brien <obrien@FreeBSD.org> |
* Remove 'register'. (some functions had 7+ register functions...) * Fix SCM ID's.
|
Revision tags: release/4.3.0_cvs, release/4.3.0 |
|
#
d201fe46 |
| 24-Jan-2001 |
Daniel Eischen <deischen@FreeBSD.org> |
Remove _THREAD_SAFE and make libc thread-safe by default by adding (weak definitions to) stubs for some of the pthread functions. If the threads library is linked in, the real pthread functions will
Remove _THREAD_SAFE and make libc thread-safe by default by 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
show more ...
|
Revision tags: release/4.2.0, release/4.1.1_cvs |
|
#
7aa1d9cd |
| 05-Sep-2000 |
Peter Wemm <peter@FreeBSD.org> |
Remove the SIGSYS handler and wrapper around the __getcwd() syscall. It was kinda silly since the sigaction() syscall that it used to setup the handler is more recent than __getcwd(), therefore it wa
Remove the SIGSYS handler and wrapper around the __getcwd() syscall. It was kinda silly since the sigaction() syscall that it used to setup the handler is more recent than __getcwd(), therefore it was useless as the wrapper would have died before even getting as far as __getcwd(2).
Reminded by: bde
show more ...
|
Revision tags: release/4.1.0, release/3.5.0_cvs, release/4.0.0_cvs, release/3.4.0_cvs |
|
#
4c9d9fc6 |
| 28-Sep-1999 |
Marcel Moolenaar <marcel@FreeBSD.org> |
Explicitly use sigemptyset to clear a sigset_t. Explicit initialization of sa_flags allows us to lose the bzero.
$FreeBSD$ tag added.
|
Revision tags: release/3.3.0_cvs, release/3.2.0, release/3.1.0, release/3.0.0, release/2.2.8 |
|
#
e8420087 |
| 16-Sep-1998 |
Warner Losh <imp@FreeBSD.org> |
Replace memory leaking instances of realloc with non-leaking reallocf. 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 gua
Replace memory leaking instances of realloc with non-leaking reallocf. 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...
show more ...
|
Revision tags: release/2.2.7 |
|
#
efda3710 |
| 15-May-1998 |
John Birrell <jb@FreeBSD.org> |
NetBSD doesn't have a __getcwd syscall, so set have__getcwd to `no' when building libc with NetBSD syscalls.
|
Revision tags: release/2.2.6 |
|
#
4773010d |
| 15-Jan-1998 |
Stephen McKay <mckay@FreeBSD.org> |
Return the correct errno from getcwd() even if free() or closedir() overwrites it. This actually showed up when running under an old kernel when free() called the madvise() stub which set errno, cau
Return the correct errno from getcwd() even if free() or closedir() overwrites it. This actually showed up when running under an old kernel when free() called the madvise() stub which set errno, causing getcwd() to return EOPNOTSUPP instead of ERANGE.
show more ...
|
Revision tags: release/2.2.5_cvs |
|
#
b7ecb08a |
| 16-Sep-1997 |
Peter Wemm <peter@FreeBSD.org> |
Put a system call not present checking wrapper around the call to __getcwd(). I've got this libc code running on one of my machines at the moment without the __getcwd() syscall being present.
|
#
36dff600 |
| 15-Sep-1997 |
Poul-Henning Kamp <phk@FreeBSD.org> |
Fix yet a minor stylistic nit from Bruce (Doesn't he have more important things to do ?? :-)
Prepare for the likely case of a change in kernel algorithm.
|
#
9c2d6fcf |
| 15-Sep-1997 |
Poul-Henning Kamp <phk@FreeBSD.org> |
Fix a buglet and a couple of stylistic nits from Bruce.
|
#
27262cac |
| 14-Sep-1997 |
Poul-Henning Kamp <phk@FreeBSD.org> |
Add __getcwd() syscall, and have getcwd() take a shot at it. If your kernel doesn't support __getcwd() or if __getcwd() cannot deliver because of cache expiry, it does the canonical thing.
|
#
f5f31fba |
| 15-Aug-1997 |
David Greenman <dg@FreeBSD.org> |
Fixed file descriptor leak that occurs after certain types of failures.
PR: 3516 Submitted by: Matthew Flatt <mflatt@cs.rice.edu>
|
Revision tags: release/2.2.2_cvs, release/2.2.1_cvs, release/2.2.0 |
|
#
098f04f5 |
| 13-Mar-1997 |
Peter Wemm <peter@FreeBSD.org> |
Back out a dubious Lite2 change to "optimise" getcwd() to look at $PWD because it's potentially dangerous (think: symlink races). Move realpath() back to it's original location, and remove getcwd_ph
Back out a dubious Lite2 change to "optimise" getcwd() to look at $PWD because it's potentially dangerous (think: symlink races). Move realpath() back to it's original location, and remove getcwd_physical() by renaming it back to getcwd() and zapping the original getcwd wrapper.
Noticed by: bde
show more ...
|
#
9dc11641 |
| 11-Mar-1997 |
Peter Wemm <peter@FreeBSD.org> |
merge from Lite2 - realpath() now shares a lot of code with getcwd() and is now in the same file.
|
#
662909a7 |
| 11-Mar-1997 |
Peter Wemm <peter@FreeBSD.org> |
Import CSRG 4.4BSD-Lite2 lib/libc onto vendor branch
|
Revision tags: release/2.1.7_cvs, release/2.1.6_cvs, release/2.1.6.1 |
|
#
0d4453d3 |
| 17-Oct-1996 |
Peter Wemm <peter@FreeBSD.org> |
Corrently null-terminate the path being passed to the opendir() calls, malloc() does is not defined to return a zeroed buffer leading to "strange" problems.
Submitted by: Karl Denninger <karl@mcs.co
Corrently null-terminate the path being passed to the opendir() calls, malloc() does is not defined to return a zeroed buffer leading to "strange" problems.
Submitted by: Karl Denninger <karl@mcs.com>, PR#1826
show more ...
|