When these functions where added to stdio.h 1.72 on 2008-08-04, the
conditional included _NETBSD_SOURCE.
The additional condition was removed in stdio.h 1.99 from 2020-03-20,
but the comment was not updated.
In stdio.h 1.1 from 1993-03-21, the struct had a member named _ub for
the ungetc buffer. That member was repurposed in stdio.h 1.42 from
2001-12-07 in order to support wide characters.
Remove the reference to the 'WARNING above' since there is no such
warning and even when this comment was added in stdio.h 1.20 from
1998-02-02, there was none.
The 'fairly grotesque' from 1994-04-03 referred to the conditional
definition of the type fpos_t, using two different integer types that
both happened to be 64-bit.
When stdio was changed on 2012-01-22 to keep track of the mbstate, the
conditional type definition was removed and the comment no longer made
sense.
the main effect of this is to make GCC and other libiberty using
tools use /tmp instead of /var/tmp for compiler temp files,
which can be a bottleneck on larger systems.
a survey of other platforms shows only OSX also uses /var/tmp,
everyone else has switched to /tmp long ago.
cons: some smaller systems may have a smaller /tmp than /var/tmp,
and this may cause builds to fail with out of space earlier.
point the build to /var/tmp using TMPDIR in this case.
one can argue that setting TMPDIR would work around this, but we
want to have the effect for all users without having special setup.
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.
builtin attributes for (for symmetry and consistency). In the future this
might change to use compiler-neutral macros. On the other hand I don't
know of any other compiler that provides other macros with similar
functionality, so why bother?
EMFILE. We treat _file as an unsigned short to double our range, with a
special case for -1 (closed). Make a note of what we should do about stdio
if we ever bump libc. We could change _file in the future compatibly to an
int by putting it in the extension space but for now we don't bother.
include path: the normal header files now include the "SSP" ones (which one
should note are not really named right: SSP and FORTIFY_SOURCE are independent
features).
Disable USE_SSP on targets where the compiler doesn't support it at all
(mips, alpha) or it's known broken (sh3). But enable FORTIFY_SOURCE,
without SSP, on those platforms -- tested on mipsel.
- add __SAFE flag, to indicate that we want async-signal-safe functionality
only.
- add snprintf_ss, and vsnprintf_ss; these are undocumented on purpose.
file is POSIX visible and the usage isn't #ifdef _KERNEL)
Discussed with core. I may need to go farther than this but for now
compilations done with gcc -ansi (i.e. firefox) will be okay.
* 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.