Revision tags: release/14.0.0 |
|
#
559a218c |
| 01-Nov-2023 |
Warner Losh <imp@FreeBSD.org> |
libc: Purge unneeded cdefs.h
These sys/cdefs.h are not needed. Purge them. They are mostly left-over from the $FreeBSD$ removal. A few in libc are still required for macros that cdefs.h defines. Kee
libc: Purge unneeded cdefs.h
These sys/cdefs.h are not needed. Purge them. They are mostly left-over from the $FreeBSD$ removal. A few in libc are still required for macros that cdefs.h defines. Keep those.
Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D42385
show more ...
|
#
1d386b48 |
| 16-Aug-2023 |
Warner Losh <imp@FreeBSD.org> |
Remove $FreeBSD$: one-line .c pattern
Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
|
Revision tags: release/13.2.0, release/12.4.0, release/13.1.0, release/12.3.0, release/13.0.0, release/12.2.0, release/11.4.0, release/12.1.0, release/11.3.0, release/12.0.0, release/11.2.0, release/10.4.0, release/11.1.0 |
|
#
2828dafc |
| 10-Nov-2016 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r308227 through r308490.
|
#
34168b28 |
| 03-Nov-2016 |
Ed Schouten <ed@FreeBSD.org> |
Replace basename(3) by a thread-safe implementation.
Now that the changes to the dirname(3) function had some time to settle, let's go ahead and use the same approach for replacing basename(3) by a
Replace basename(3) by a thread-safe implementation.
Now that the changes to the dirname(3) function had some time to settle, let's go ahead and use the same approach for replacing basename(3) by a simple implementation that modifies the input string, thereby making it thread-safe and guaranteed to succeed.
Unlike dirname(3), this function already had a thread-safe variant basename_r(3). This function had its own set of problems, like having an upper bound on the pathname length. Keep this function around for compatibility, but remove most references from the man page. Make the man page more similar to that of dirname(3).
As the basename_r(3) function is only provided by FreeBSD (and Bionic), depending on its use is even more implementation defined than assuming that basename(3) is thread-safe.
Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D8382
show more ...
|
Revision tags: release/11.0.1, release/11.0.0 |
|
#
27067774 |
| 16-Aug-2016 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r303250 through r304235.
|
#
938809f9 |
| 28-Jul-2016 |
Ed Schouten <ed@FreeBSD.org> |
Fix up prototypes of basename(3) and dirname(3) to comply to POSIX.
POSIX allows these functions to be implemented in a way that the resulting string is stored in the input buffer. Though some may f
Fix up prototypes of basename(3) and dirname(3) to comply to POSIX.
POSIX allows these functions to be implemented in a way that the resulting string is stored in the input buffer. Though some may find this annoying, this has the advantage that it makes it possible to implement this function in a thread-safe way. It also means that they can be implemented in a way that they work for paths of arbitrary length, as the output string of these functions is never longer than max(1, len(input)).
Portable code already needs to be written with this in mind, so in my opinion it makes very little sense to allow the existing behaviour. Prevent the base system from falling back to this by switching over to POSIX prototypes.
I'm not going to bump the __FreeBSD_version for this. The reason is that it's possible to account for this change in a portable way, without depending on a specific version of FreeBSD. An exp-run was done some time ago. As far as I know, all regressions as a result of this have already been fixed.
I'll give this change some time to settle. In the long run I want to replace our copies by ones that are thread-safe and don't depend on PATH_MAX/MAXPATHLEN.
show more ...
|
Revision tags: release/10.3.0, release/10.2.0, release/10.1.0, release/9.3.0, release/10.0.0, release/9.2.0, release/8.4.0, release/9.1.0, release/8.3.0_cvs, release/8.3.0, release/9.0.0 |
|
#
935205e2 |
| 17-Jul-2011 |
Justin T. Gibbs <gibbs@FreeBSD.org> |
Integrate from Head into ZFSD feature branch as of revision r224141.
|
#
a5615c90 |
| 28-Jun-2011 |
Peter Grehan <grehan@FreeBSD.org> |
IFC @ r222830
|
#
5519971c |
| 19-Jun-2011 |
Attilio Rao <attilio@FreeBSD.org> |
MFC
|
#
488d6e0c |
| 18-Jun-2011 |
Xin LI <delphij@FreeBSD.org> |
Sync with OpenBSD, primarily make the code easier to read, and a license change to standard OpenBSD ISC license.
Obtained from: OpenBSD MFC after: 2 weeks
|
Revision tags: release/7.4.0_cvs, release/8.2.0_cvs, release/7.4.0, release/8.2.0, release/8.1.0_cvs, release/8.1.0, release/7.3.0_cvs, release/7.3.0 |
|
#
1a0fda2b |
| 04-Mar-2010 |
Dag-Erling Smørgrav <des@FreeBSD.org> |
IFH@204581
|
Revision tags: release/8.0.0_cvs, release/8.0.0 |
|
#
874108ae |
| 12-Nov-2009 |
Oleksandr Tymoshenko <gonzo@FreeBSD.org> |
MFC @199204
|
#
a502a84d |
| 06-Oct-2009 |
Robert Watson <rwatson@FreeBSD.org> |
Add basename_r(3) to complement basename(3). basename_r(3) which accepts a caller-allocated buffer of at least MAXPATHLEN, rather than using a global buffer.
MFC after: 1 month Sponsored by: Google
|
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, 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, 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, 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 |
|
#
2bc46a64 |
| 30-Dec-2002 |
Marcel Moolenaar <marcel@FreeBSD.org> |
Fix LP64 architectures and especially ia64. Functions that return a pointer and lack a prototype will have the return value (assumed to be an integer) zero-extended to a pointer. On ia64 this is unco
Fix LP64 architectures and especially ia64. Functions that return a pointer and lack a prototype will have the return value (assumed to be an integer) zero-extended to a pointer. On ia64 this is unconditionally fatal as it zeroes-out the region bits, forming an invalid pointer. Fix the sigsegv by including <stdlib.h>.
Pointy hat: bbraun
show more ...
|
#
5fb691be |
| 21-Dec-2002 |
Rob Braun <bbraun@FreeBSD.org> |
Reduce libc.so's memory footprint by lazily allocating memory used internally by basename() and dirname(). Reviewed by: eric
|
Revision tags: release/4.7.0_cvs, 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.
|
#
56bcbf00 |
| 31-Jan-2002 |
Bruce Evans <bde@FreeBSD.org> |
Fixed world breakage due to missing include of <sys/cdefs.h> in previous commit.
Fixed related style bugs: basename.c: misplaced '#if 0' dirname.c: misplaced '#if 0' getgrent.c: missing '#if 0', and
Fixed world breakage due to missing include of <sys/cdefs.h> in previous commit.
Fixed related style bugs: basename.c: misplaced '#if 0' dirname.c: misplaced '#if 0' getgrent.c: missing '#if 0', and tab lossage in vendor id (the previous commit fixed the complete corruption of the vendor id but lost a tab) getpwent.c: missing '#if 0'
show more ...
|
#
135b57f9 |
| 30-Jan-2002 |
David E. O'Brien <obrien@FreeBSD.org> |
Fix FreeBSD IDs.
|
#
ff5f0dbc |
| 28-Jun-2001 |
Dima Dorfman <dd@FreeBSD.org> |
Fix a one-byte overrun.
PR: 28472 Submitted by: David Xu <davidx@viasoft.com.cn> Obtained from: OpenBSD
|
Revision tags: release/4.3.0_cvs, release/4.3.0, release/4.2.0, release/4.1.1_cvs |
|
#
1250db81 |
| 31-Aug-2000 |
Dag-Erling Smørgrav <des@FreeBSD.org> |
Import XPG4-compliant basename(3) and dirname(3) from OpenBSD. The man pages need some adjustments.
PR: 12960, 12962 Submitted by: James Howard <howardjp@wam.umd.edu> Obtained from: OpenBSD
|
Revision tags: release/8.0.0_cvs, release/8.0.0 |
|
#
874108ae |
| 12-Nov-2009 |
Oleksandr Tymoshenko <gonzo@FreeBSD.org> |
MFC @199204
|
#
a502a84d |
| 06-Oct-2009 |
Robert Watson <rwatson@FreeBSD.org> |
Add basename_r(3) to complement basename(3). basename_r(3) which accepts a caller-allocated buffer of at least MAXPATHLEN, rather than using a global buffer.
MFC after: 1 month Sponsored by: Google
|
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, 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, 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, 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 |
|
#
2bc46a64 |
| 30-Dec-2002 |
Marcel Moolenaar <marcel@FreeBSD.org> |
Fix LP64 architectures and especially ia64. Functions that return a pointer and lack a prototype will have the return value (assumed to be an integer) zero-extended to a pointer. On ia64 this is unco
Fix LP64 architectures and especially ia64. Functions that return a pointer and lack a prototype will have the return value (assumed to be an integer) zero-extended to a pointer. On ia64 this is unconditionally fatal as it zeroes-out the region bits, forming an invalid pointer. Fix the sigsegv by including <stdlib.h>.
Pointy hat: bbraun
show more ...
|
#
5fb691be |
| 21-Dec-2002 |
Rob Braun <bbraun@FreeBSD.org> |
Reduce libc.so's memory footprint by lazily allocating memory used internally by basename() and dirname(). Reviewed by: eric
|
Revision tags: release/4.7.0_cvs, 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.
|