|
Revision tags: release/13.4.0-p5, release/13.5.0-p1, release/14.2.0-p3, release/13.5.0, release/14.2.0-p2, release/14.1.0-p8, release/13.4.0-p4, release/14.1.0-p7, release/14.2.0-p1, release/13.4.0-p3, release/14.2.0 |
|
| #
2403e6d5 |
| 20-Sep-2024 |
Dag-Erling Smørgrav <[email protected]> |
printf(): Save errno earlier.
The manual page says %m is replaced with “the string representation of the error code stored in the errno variable at the beginning of the call”. However, we don't act
printf(): Save errno earlier.
The manual page says %m is replaced with “the string representation of the error code stored in the errno variable at the beginning of the call”. However, we don't actually save `errno` until fairly late in `__vfprintf()`. Make sure it is saved before we do anything that might perturb `errno`.
MFC after: 1 week Reviewed by: kevans Differential Revision: https://reviews.freebsd.org/D46718
(cherry picked from commit 74f1007fcc838501c74a633792c3f01833bf65e1)
show more ...
|
|
Revision tags: release/13.4.0, release/14.1.0, release/13.3.0, release/14.0.0 |
|
| #
4025b5b5 |
| 01-Nov-2023 |
Warner Losh <[email protected]> |
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
(cherry picked from commit 559a218c9b257775fb249b67945fe4a05b7a6b9f)
show more ...
|
| #
1d386b48 |
| 16-Aug-2023 |
Warner Losh <[email protected]> |
Remove $FreeBSD$: one-line .c pattern
Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
|
|
Revision tags: release/13.2.0, release/12.4.0 |
|
| #
5b5fa75a |
| 04-Aug-2022 |
Ed Maste <[email protected]> |
libc: drop "All rights reserved" from Foundation copyrights
This has already been done for most files that have the Foundation as the only listed copyright holder. Do it now for files that list mul
libc: drop "All rights reserved" from Foundation copyrights
This has already been done for most files that have the Foundation as the only listed copyright holder. Do it now for files that list multiple copyright holders, but have the Foundation copyright in its own section.
Sponsored by: The FreeBSD Foundation
show more ...
|
|
Revision tags: 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 |
|
| #
d915a14e |
| 25-Nov-2017 |
Pedro F. Giffuni <[email protected]> |
libc: further adoption of SPDX licensing ID tags.
Mainly focus on files that use BSD 2-Clause license, however the tool I was using mis-identified many licenses so this was mostly a manual - error p
libc: further adoption of SPDX licensing ID tags.
Mainly focus on files that use BSD 2-Clause license, however the tool I was using mis-identified many licenses so this was mostly a manual - error prone - task.
The Software Package Data Exchange (SPDX) group provides a specification to make it easier for automated tools to detect and summarize well known opensource licenses. We are gradually adopting the specification, noting that the tags are considered only advisory and do not, in any way, superceed or replace the license texts.
show more ...
|
|
Revision tags: release/10.4.0, release/11.1.0, release/11.0.1, release/11.0.0, 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 |
|
| #
3c87aa1d |
| 20-Nov-2011 |
David Chisnall <[email protected]> |
Implement xlocale APIs from Darwin, mainly for use by libc++. This adds a load of _l suffixed versions of various standard library functions that use the global locale, making them take an explicit
Implement xlocale APIs from Darwin, mainly for use by libc++. This adds a load of _l suffixed versions of various standard library functions that use the global locale, making them take an explicit locale parameter. Also adds support for per-thread locales. This work was funded by the FreeBSD Foundation.
Please test any code you have that uses the C standard locale functions!
Reviewed by: das (gdtoa changes) Approved by: dim (mentor)
show more ...
|
|
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 |
|
| #
6a18a772 |
| 05-Apr-2010 |
David E. O'Brien <[email protected]> |
I feel this wording of the history is more clear. ANSIfy vasprintf() while I'm here.
|
|
Revision tags: release/7.3.0_cvs, release/7.3.0 |
|
| #
1b0181df |
| 11-Mar-2010 |
John Baldwin <[email protected]> |
- Use an initializer macro to initialize fields in 'fake' FILE objects used by *sprintf(), etc. - Explicitly initialize _fl_mutex to PTHREAD_MUTEX_INITIALIZER for all FILE objects. This is curre
- Use an initializer macro to initialize fields in 'fake' FILE objects used by *sprintf(), etc. - Explicitly initialize _fl_mutex to PTHREAD_MUTEX_INITIALIZER for all FILE objects. This is currently a nop on FreeBSD, but is import for other platforms (or in the future) where PTHREAD_MUTEX_INITIALIZER is not simply zero.
PR: threads/141198 Reported by: Jeremy Huddleston @ Apple MFC after: 2 weeks
show more ...
|
|
Revision tags: release/8.0.0_cvs, release/8.0.0, 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 |
|
| #
1e98f887 |
| 17-Apr-2008 |
John Baldwin <[email protected]> |
Next stage of stdio cleanup: Retire __sFILEX and merge the fields back into __sFILE. This was supposed to be done in 6.0. Some notes: - Where possible I restored the various lines to their pre-__sF
Next stage of stdio cleanup: Retire __sFILEX and merge the fields back into __sFILE. This was supposed to be done in 6.0. Some notes: - Where possible I restored the various lines to their pre-__sFILEX state. - Retire INITEXTRA() and just initialize the wchar bits (orientation and mbstate) explicitly instead. The various places that used INITEXTRA didn't need the locking fields or _up initialized. (Some places needed _up to exist and not be off the end of a NULL or garbage pointer, but they didn't require it to be initialized to a specific value.) - For now, stdio.h "knows" that pthread_t is a 'struct pthread *' to avoid namespace pollution of including all the pthread types in stdio.h. Once we remove all the inlines and make __sFILE private it can go back to using pthread_t, etc. - This does not remove any of the inlines currently and does not change any of the public ABI of 'FILE'.
MFC after: 1 month Reviewed by: peter
show more ...
|
|
Revision tags: 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, release/4.7.0_cvs |
|
| #
27a29543 |
| 26-Sep-2002 |
Tim J. Robbins <[email protected]> |
Back out previous, free the buffer when __vfprintf() fails and don't bother trying to shrink the buffer with realloc() before returning it.
|
| #
3383deca |
| 26-Sep-2002 |
Tim J. Robbins <[email protected]> |
Sync with OpenBSD: avoid memory leak when __vfprintf() fails because it runs out of memory, always call va_end.
|
| #
abbd8902 |
| 21-Aug-2002 |
Mike Barcroft <[email protected]> |
o Merge <machine/ansi.h> and <machine/types.h> into a new header called <machine/_types.h>. o <machine/ansi.h> will continue to live so it can define MD clock macros, which are only MD because of
o Merge <machine/ansi.h> and <machine/types.h> into a new header called <machine/_types.h>. o <machine/ansi.h> will continue to live so it can define MD clock macros, which are only MD because of gratuitous differences between architectures. o Change all headers to make use of this. This mainly involves changing: #ifdef _BSD_FOO_T_ typedef _BSD_FOO_T_ foo_t; #undef _BSD_FOO_T_ #endif to: #ifndef _FOO_T_DECLARED typedef __foo_t foo_t; #define _FOO_T_DECLARED #endif
Concept by: bde Reviewed by: jake, obrien
show more ...
|
| #
6879bea8 |
| 19-Aug-2002 |
Juli Mallett <[email protected]> |
Leave room for a trailing NUL not a NULL, that's not an ASCII character.
|
|
Revision tags: release/4.6.2_cvs, release/4.6.2 |
|
| #
e74101e4 |
| 13-Aug-2002 |
Tim J. Robbins <[email protected]> |
Basic support for wide character I/O: getwc(), fgetwc(), getwchar(), putwc(), fputwc(), putwchar(), ungetwc(), fwide().
|
|
Revision tags: release/4.6.1, release/4.6.0_cvs |
|
| #
333fc21e |
| 22-Mar-2002 |
David E. O'Brien <[email protected]> |
Fix the style of the SCM ID's. I believe have made all of libc .c's as consistent as possible.
|
|
Revision tags: release/4.5.0_cvs, release/4.4.0_cvs, release/4.3.0_cvs, release/4.3.0 |
|
| #
d201fe46 |
| 24-Jan-2001 |
Daniel Eischen <[email protected]> |
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, release/4.1.0, release/3.5.0_cvs, release/4.0.0_cvs, release/3.4.0_cvs, release/3.3.0_cvs |
|
| #
7f3dea24 |
| 28-Aug-1999 |
Peter Wemm <[email protected]> |
$Id$ -> $FreeBSD$
|
|
Revision tags: release/3.2.0, release/3.1.0, release/3.0.0, release/2.2.8 |
|
| #
e8420087 |
| 16-Sep-1998 |
Warner Losh <[email protected]> |
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 |
|
| #
64a965e7 |
| 08-Jul-1998 |
Peter Wemm <[email protected]> |
Replace my original asprintf() and vasprintf() hacks with something more cleanly integrated with stdio. This should be faster and cleaner since it doesn't memcpy() the data into a seperate buffer.
Replace my original asprintf() and vasprintf() hacks with something more cleanly integrated with stdio. This should be faster and cleaner since it doesn't memcpy() the data into a seperate buffer. This lets stdio allocate and manage the buffer and then hand it over to the user.
Obtained from: Todd Miller <[email protected]> via OpenBSD
show more ...
|
|
Revision tags: release/2.2.6 |
|
| #
e7b6782c |
| 09-Mar-1998 |
John Birrell <[email protected]> |
Added #include <string.h> to get prototypes.
|
|
Revision tags: release/2.2.5_cvs |
|
| #
e48f3cfb |
| 06-Jul-1997 |
Peter Wemm <[email protected]> |
Rework previous commit.. I was confused by the number of diffs in the PR and forgot what I was trying to do originally and accidently zapped a feature. :-] The problem is that we are converting a c
Rework previous commit.. I was confused by the number of diffs in the PR and forgot what I was trying to do originally and accidently zapped a feature. :-] The problem is that we are converting a counted buffer in a malloc pool into a null terminated C-style string. I was calling realloc originally to shrink the buffer to the desired size. If realloc failed, we still returned the valid buffer - the only thing wrong was it was a tad too large. The previous commit disabled this.
This commit now handles the three cases.. 1: the buffer is exactly right for the null byte to terminate the string (we don't call realloc). 2: it's got h.left = 0, so we must expand it to make room. If realloc fails here, it's fatal. 3: if there's too much room, we realloc to shrink it - a failed realloc is not fatal, we use the original buffer which is still valid.
show more ...
|
| #
3c55a3f2 |
| 06-Jul-1997 |
Peter Wemm <[email protected]> |
Fix off-by-one error
PR: 3451 Submitted by: Tim Vanderhoek <[email protected]>
|
|
Revision tags: release/2.2.2_cvs, release/2.2.1_cvs, release/2.2.0, release/2.1.7_cvs |
|
| #
7e546392 |
| 22-Feb-1997 |
Peter Wemm <[email protected]> |
Revert $FreeBSD$ to $Id$
|
|
Revision tags: release/2.1.6_cvs, release/2.1.6.1 |
|
| #
1130b656 |
| 14-Jan-1997 |
Jordan K. Hubbard <[email protected]> |
Make the long-awaited change from $Id$ to $FreeBSD$
This will make a number of things easier in the future, as well as (finally!) avoiding the Id-smashing problem which has plagued developers for so
Make the long-awaited change from $Id$ to $FreeBSD$
This will make a number of things easier in the future, as well as (finally!) avoiding the Id-smashing problem which has plagued developers for so long.
Boy, I'm glad we're not using sup anymore. This update would have been insane otherwise.
show more ...
|
|
Revision tags: release/2.1.5_cvs |
|
| #
ef1c2ba1 |
| 28-Jul-1996 |
Peter Wemm <[email protected]> |
Fix some of the problems that bde pointed out to me some time ago. - buffer expansions were not working right due to a return code botch. - signed types instead of size_t's meant somebody else went
Fix some of the problems that bde pointed out to me some time ago. - buffer expansions were not working right due to a return code botch. - signed types instead of size_t's meant somebody else went and put casts in, I've changed the types to what they should have been.
show more ...
|