Up to [DragonFly] / src / lib / libc / stdio
Request diff between arbitrary revisions
Keyword substitution: kv
Default branch: MAIN
MFC rev 1.9 The char dummy must be dummy to accomodate a nul terminator when dealing with a degenerate buffer size.
The char dummy must be dummy to accomodate a nul terminator when dealing with a degenerate buffer size. Submitted-by: Johannes Hofmann <Johannes.Hofmann@gmx.de> Taken-from: FreeBSD
MFC asprintf.c, rev 1.8; findfp.c, rev 1.11; snprintf.c, rev 1.7; sprintf.c, rev 1.7; sscanf.c, rev 1.9; vasprintf.c, rev 1.8; vfprintf.c, rev 1.15; vfwprintf.c, rev 1.3; vsnprintf.c, rev 1.7; vsprintf.c, rev 1.8; vsscanf.c, rev 1.10; vswprintf.c, rev 1.2; vswscanf.c, rev 1.3 Fix initialisation of wide char part in FILE.
Fix initialisation of wide char support in FILE. Problem reported on #dragonflybsd.
Merge __sFILEX into __FILE. Let __fpending handle the ungetc buffer correctly.
First step to cleaning up stdio. This breaks the libc ABI, all programs have to be recompiled. Make FILE an opaque type for normal operation (anything outside libc). This means programs have to use the exported interface, they can neither make static instances on the heap or access fields of their own. Introduce a new type __FILE_public, which contains the fields accessed by the various macros. It is placed first in the real FILE and the macros cast the given FILE * to __FILE_public for access. To allow better argument checks, all macros have been converted to inline functions instead. Merge the various stdio helper headers into a single priv_stdio.h. The license from the original files has been kept, the third clause is gone as part of the UCB copyright addendum. They haven't been changed in FreeBSD at all. Add two new helper functions, fcookie and __fpending to read parts of the hidden state. The former is handy for funopen users, the latter exists on other systems as well. Cleanup some minor warnings on the way and hide some local functions with static. Adept libftpio and CVS to the chanced API.
Add locking for FILE. Obtained from: FreeBSD
Remove _THREAD_SAFE depenendancies. Create weakly associated stubs for posix threading calls used by libc and weak associations for procedures that a threading library would otherwise have to override. This allows a program to be linked with libc, or linked with libc + a threading library. libc_r will be deprecated over time. Traditionally libc_r had to be linked against a threading library rather then libc. Linux, FreeBSD, and other UNIXes have moved either t oa thread-safe libc or a thread-capable libc. The threading capability is accomplished by making the appropriate thread locking calls and providing weakly referenced dummy stub functions for the case where a threading library is not linked in. Certain third party software, namely XFree/XOrg, also assume threading stubs in libc. This is precursor work to a port of David Xu's 1:1 threading library and is also intended as a basis to allow DragonFly to support multiple threading libraries. Ported-by: David Rhodus <firstname.lastname@example.org> Primarily-ported-from: FreeBSD Testing and bug fixes by David Xu and Matt Dillon
Core integer types header file reorganization stage 2/2: Adjust main source files to reflect stdint.h and other changes. Primarily this means getting rid of the _BSD_XXX type useage but in some cases, such as for tar, it means getting rid of #define overrides for intmax_t and uintmax_t.
Add the DragonFly cvs id and perform general cleanups on cvs/rcs/sccs ids. Most ids have been removed from !lint sections and moved into comment sections.
import from FreeBSD RELENG_4 22.214.171.124