| Age | Commit message (Collapse) | Author |
|
The C standard seems to be inconsistent about dash vs. space. Old
text uses dash, Annex K uses space. I'll let wizd(8) to sort that
out.
|
|
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.
|
|
|
|
Fixes PR bin/42183.
|
|
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.
|
|
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.)
|
|
and implement fgetln on top of that.
|