#
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. Keep those. Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D42385
|
#
1d386b48 |
|
16-Aug-2023 |
Warner Losh <imp@FreeBSD.org> |
Remove $FreeBSD$: one-line .c pattern Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
|
#
4d846d26 |
|
10-May-2023 |
Warner Losh <imp@FreeBSD.org> |
spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch up to that fact and revert to their recommended match of BSD-2-Clause. Discussed with: pfg MFC After: 3 days Sponsored by: Netflix
|
#
5b5fa75a |
|
04-Aug-2022 |
Ed Maste <emaste@FreeBSD.org> |
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
|
#
d915a14e |
|
25-Nov-2017 |
Pedro F. Giffuni <pfg@FreeBSD.org> |
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.
|
#
fda0a14f |
|
29-Jun-2017 |
Konstantin Belousov <kib@FreeBSD.org> |
Make stdio deferred cancel-safe. If used with fopen(3)/fdopen(3)-ed FILEs, stdio accurately uses non-cancellable internal versions of the functions, i.e. it seems to be fine with regard to cancellation. But if the funopen(3) and f{r,w}open(3) functions were used to open the FILE, and corresponding user functions create cancellation points (they typically have no other choice), then stdio code at least leaks FILE' lock. The change installs cleanup handler which unlocks FILE. Some minimal restructuring of the code was required to make it use common return place to satisfy hand-rolled pthread_cleanup_pop() requirements. Noted by: eugen Reviewed by: eugen, vangyzen Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Differential revision: https://reviews.freebsd.org/D11246
|
#
88eb1553 |
|
01-Sep-2016 |
Andrey A. Chernov <ache@FreeBSD.org> |
If error happens, don't overwrite original errno comes from __mbrtowc() and __srefill(). MFC after: 3 days
|
#
d34d90a8 |
|
22-Aug-2016 |
Andrey A. Chernov <ache@FreeBSD.org> |
1) Back out r304607 case 2). fgetwln() as its pair fgetln() supposed to return partial line on any errors. See the comment in fgetln.c. Add corresponding comment to fgetwln() too. 2) Rewrite r304607 case 1). 3) Remove "Fast path" from __fgetwc_mbs() since it can't detect encoding errors and ignores them all. PR: 212033 MFC after: 7 days
|
#
d7af8cf1 |
|
29-Apr-2012 |
David Schultz <das@FreeBSD.org> |
Previously, vfscanf()'s wide character processing functions were reading wide characters manually. With this change, they now use fgetwc(). To make this work, we use an internal version of fgetwc() with a few extensions: it takes an mbstate * because non-wide streams don't have a built-in mbstate, and it indicates the number of bytes read. vfscanf() now resembles vfwscanf() more closely. Minor functional improvements include working xlocale support in vfscanf(), setting the stream error indicator on encoding errors, and proper handling of shift-based encodings. (Actually, making shift-based encodings work with non-wide streams is hopeless, but the implementation now matches the broken specification.)
|
#
3c87aa1d |
|
20-Nov-2011 |
David Chisnall <theraven@FreeBSD.org> |
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)
|
#
a7d5f7eb |
|
19-Oct-2010 |
Jamie Gritton <jamie@FreeBSD.org> |
A new jail(8) with a configuration file, to replace the work currently done by /etc/rc.d/jail.
|
#
fe0506d7 |
|
09-Mar-2010 |
Marcel Moolenaar <marcel@FreeBSD.org> |
Create the altix project branch. The altix project will add support for the SGI Altix 350 to FreeBSD/ia64. The hardware used for porting is a two-module system, consisting of a base compute module and a CPU expansion module. SGI's NUMAFlex architecture can be an excellent platform to test CPU affinity and NUMA-aware features in FreeBSD.
|
#
d7f03759 |
|
19-Oct-2008 |
Ulf Lilleengen <lulf@FreeBSD.org> |
- Import the HEAD csup code which is the basis for the cvsmode work.
|
#
1e98f887 |
|
17-Apr-2008 |
John Baldwin <jhb@FreeBSD.org> |
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
|
#
f9ceea9b |
|
20-Jul-2004 |
Tim J. Robbins <tjr@FreeBSD.org> |
Call __mbrtowc() and __wcrtomb() directly instead of taking detours through mbrtowc() and wcrtomb().
|
#
fcc51917 |
|
09-Jul-2004 |
Tim J. Robbins <tjr@FreeBSD.org> |
Slightly reorganize and simplify.
|
#
d6ed810a |
|
22-May-2004 |
Tim J. Robbins <tjr@FreeBSD.org> |
Perform conversions straight from the stream buffer instead of scanning through byte by byte with mbrtowc(). In the usual case (buffer is big enough to contain the multibyte character, character does not straddle buffer boundary) this results in only one call to mbrtowc() for each wide character read.
|
#
87275e43 |
|
22-May-2004 |
Tim J. Robbins <tjr@FreeBSD.org> |
Associate a multibyte conversion state object with each stream. Reset it to the initial state when a stream is opened or seeked upon. Use the stream's conversion state object instead of a freshly-zeroed one in fgetwc(), fputwc() and ungetwc(). This is only a performance improvement for now, but it would also be required in order to support state-dependent encodings.
|
#
93996f6d |
|
07-Apr-2004 |
Tim J. Robbins <tjr@FreeBSD.org> |
Prepare to handle trivial state-dependent encodings. Full support for state-dependent encodings with locking shifts will come later if there is demand for it.
|
#
a27a4b36 |
|
04-Nov-2003 |
Tim J. Robbins <tjr@FreeBSD.org> |
Pass mbrtowc() and wcrtomb() NULL instead of a pointer to a freshly zeroed mbstate_t object that they ignore. The zeroing is fairly expensive, and it will never be necessary in these functions; when we support state-dependent encodings, we will pass in a pointer to the file's mbstate_t object, and only zero it at the time the file gets opened.
|
#
6180233f |
|
15-Oct-2002 |
Tim J. Robbins <tjr@FreeBSD.org> |
Set the error bit on the stream if an encoding error occurs. Improve handling of multibyte sequences representing null wide characters.
|
#
8f030a44 |
|
20-Sep-2002 |
Tim J. Robbins <tjr@FreeBSD.org> |
Introduce unlocked versions of fputwc() and fgetwc() called __fputwc() and __fgetwc() which can be used when we know the file is locked.
|
#
0b7bc802 |
|
17-Sep-2002 |
Tim J. Robbins <tjr@FreeBSD.org> |
Optimise the common case where no special encoding is in use (LC_CTYPE is "C" or "POSIX", other European locales). Use __sgetc() and __sputc() where possible to avoid a wasteful lock and unlock for each byte and to avoid function call overhead.
|
#
bddc6280 |
|
18-Sep-2002 |
Tim J. Robbins <tjr@FreeBSD.org> |
Logic error in previous: don't exit the loop when an incomplete multibyte sequence is detected.
|
#
24990dfa |
|
17-Sep-2002 |
Tim J. Robbins <tjr@FreeBSD.org> |
Reimplement the functionality of fgetrune(), fputrune(), and fungetrune() here in terms of mbrtowc(), wcrtomb(), and the single-byte I/O functions. The rune I/O functions are about to become deprecated in favour of the ones provided by ISO C90 Amd. 1 and C99.
|
#
e74101e4 |
|
13-Aug-2002 |
Tim J. Robbins <tjr@FreeBSD.org> |
Basic support for wide character I/O: getwc(), fgetwc(), getwchar(), putwc(), fputwc(), putwchar(), ungetwc(), fwide().
|