| Age | Commit message (Collapse) | Author |
|
|
|
by introducing a hidden compat_foo() function, using that internally in
libc, and exposing foo as a strong alias to compat_foo(). I am open for
better ideas.
|
|
|
|
snprintf and sprintf with simple wrappers around the corresponding
va_list functions to reduce code duplication.
|
|
- add funopen2() which provides access to flush() and the wider calls.
- make use of the new flush call in fmemopen()
|
|
|
|
|
|
state of the stream. Change argument of the seek function to funopen() from
fpos_t to off_t. Make f{g,s}etpos() use the new fpos_t struct, while providing
backwards compatible entry points. Approved by releng@
|
|
sys/stdarg.h and expect compiler to provide proper builtins, defaulting
to the GCC interface. lint still has a special fallback.
Reduce abuse of _BSD_VA_LIST_ by defining __va_list by default and
derive va_list as required by standards.
|
|
__fpos_overflow() that doesn't cause any lint warnings.
|
|
|
|
|
|
|
|
|
|
buffer for fgetln and fgetwln. Simplifies code by dropping the INT_MAX
related logic. Drop conditionals around FREELB, free(NULL) is valid.
|
|
Callers are now required to FLOCKFILE so they can operate on fp as well.
|
|
fgetstr now works with strings up to SSIZE_MAX as a result, but may
reallocate buffers needlessly just like it used to when the buffer size
exceeds INT_MAX.
fgetstr converts errno EOVERFLOW to EINVAL on getdelim error.
|
|
getdelim works on strings up to SSIZE_MAX and returns -1 on EOF.
__fgetstr is now just a wrapper around __getdelim and ensures that
the buffer doesn't overflow the one provided by FILE.
__slbexpand is now static in fgetwln as it is the only consumer of that func.
|
|
XXX: long double support is missing until we get gdtoa, and add the
necessary wide functions.
|
|
* Make vfprintf_unlocked() an internal function, c.f. __svfscanf_unlocked().
* Add internal names for arc4random(), endnetpath(), fhstatvfs(),
fstatvfs(), mkstemp(), shquote(), statvfs(), taddr2uaddr(), uaddr2taddr(),
uuid_create_nil(), uuid_is_nil(), and wcwidth().
* Include namespace.h where supposed to.
|
|
Its API in inherently non-threadsafe (and it depends on certain properties
of the underlying stdio implementation), so it shouldn't be a first-class
function for general use, polluting the application namespace.
Also remove the FLOCKFILE() code from it - this is under control of the
calling function now.
(XXX I'm not sure whether the FLOCKFILE() should be kept in fgetln(),
this function cannot be used in multiple threads anyway. It doesn't
hurt much, and it might prevent corruption of internal FILE structures.)
|
|
Patches provided by Joel Baker in PR 22280, verified by myself.
|
|
takes an additional argument indicating whether this is an internal caller
taking the lock or an external (application) caller. When making an internal
lock, save the current thread cancellation state and disable cancellation
until the matching unlock. This should prevent canccelled threads from exiting
inside of stdio while holding a file lock and potentially leaving other
parts of the FILE structure in an inconsistent state.
|
|
Note: fgetws.c, fgetws.3, fputws.c and fputws.3 are obtained from FreeBSD,
and fitted by sigsegv@infoseek.jp and me.
|
|
trouble is caused by the memory allocation in the mutex initialization,
and uncontested mutexes and condition variables have become faster in the
meantime.
|
|
our own with normal mutexes and condition variables.
|
|
|
|
* Add prototype for vfscanf to <stdio.h>.
* Remove #define of vfscanf to __svfscanf from <stdio.h>.
* Include local.h in libc files which need __svfscanf.
* Add vfscanf weak alias to __svfscanf.
Fixes standards/16997.
NOTE: libc minor not bumped -- ride on the bump to 12.84 made by
itojun today.
|
|
- add fputwc, fgetwc, fwide and related functions.
- add hooks needed to maintain the orientation of file stream.
|
|
|
|
|
|
|
|
Fix gcc warnings.
Add prototypes for functions that were declared in more than one place
to local.h or extern.h and use that instead.
|
|
Changed to conform to NetBSD's new RCS Id convention.
|
|
|
|
|
|
|
|
|