fix uninitialized variable in lio (aio) code
fix invalid access in aio notification

issue found and patch provided by Jens Gustedt. after the atomic store
to the error code field of the aiocb, the application is permitted to
free or reuse the storage, so further access is invalid. instead, use
the local copy that was already made.
fix major scanf breakage with unbuffered streams, fmemopen, etc.

the shgetc api, used internally in scanf and int/float scanning code
to handle field width limiting and pushback, was designed assuming
that pushback could be achieved via a simple decrement on the file
buffer pointer. this only worked by chance for regular FILE streams,
due to the linux readv bug workaround in __stdio_read which moves the
last requested byte through the buffer rather than directly back to
the caller. for unbuffered streams and streams not using __stdio_read
but some other underlying read function, the first character read
could be completely lost, and replaced by whatever junk happened to be
in the unget buffer.

to fix this, simply have shgetc, when it performs an underlying read
operation on the stream, store the character read at the -1 offset
from the read buffer pointer. this is valid even for unbuffered
streams, as they have an unget buffer located just below the start of
the zero-length buffer. the check to avoid storing the character when
it is already there is to handle the possibility of read-only buffers.
no application-exposed FILE types are allowed to use read-only
buffers, but sscanf and strto* may use them internally when calling
functions which use the shgetc api.
fix scanf %c conversion wrongly storing a terminating null byte

this seems to have been a regression from the refactoring which added
the 'm' modifier.
add ether_aton[_r] and ether_ntoa[_r] functions

based on patch by Strake with minor stylistic changes, and combined
into a single file. this patch remained open for a long time due to
some question as to whether ether_aton would be better implemented in
terms of sscanf, and it's time something was committed, so here it is.
implement inet_lnaof, inet_netof, and inet_makeaddr

also move all legacy inet_* functions into a single file to avoid
wasting object file and compile time overhead on them.

the added functions are legacy interfaces for working with classful
ipv4 network addresses. they have no modern usefulness whatsoever, but
some programs unconditionally use them anyway, and they're tiny.
make newline-delimited dynamic linker path file actually work

apparently the original commit was never tested properly, since
getline was only ever reading one line. the intent was to read the
entire file, so use getdelim with the null byte as delimiter as a
cheap way to read a whole file into memory.
respect iso c namespace in stdio.h and wchar.h regarding va_list

despite declaring functions that take arguments of type va_list, these
headers are not permitted by the c standard to expose the definition
of va_list, so an alias for the type must be used. the name
__isoc_va_list was chosen to convey that the purpose of this alternate
name is for iso c conformance, and to avoid the multitude of names
which gcc mangles with its hideous "fixincludes" monstrosity, leading
to serious header breakage if these "fixes" are run.
fix dynamic linker handling of empty path file or error reading path file

previously, the path string was being used despite being invalid. with
this change, empty path file or error reading the path file is treated
as an empty path. this is preferable to falling back to a default
path, so that attacks to prevent reading of the path file could not
result in loading incorrect and possibly dangerous (outdated or
mismatching ABI) libraries from.

the code to strip the final newline has also been removed; now that
newline is accepted as a delimiter, it's harmless to leave it in
place.
remove useless conditional before free from dynamic linker path code
fix iconv conversion to legacy 8bit codepages

this seems to have been a simple copy-and-paste error from the code
for converting from legacy codepages.
document in sysconf and unistd.h that per-thread cpu clocks exist
fix failure of pthread_setschedparam to pass correct param to kernel

the address of the pointer, rather than the pointer, was being passed.
this was probably a copy-and-paste error from corresponding get code.
in sem_open, don't leak vm mapping if fstat fails

fstat should not fail under normal circumstances, so this fix is
mostly theoretical.
fix bug whereby sem_open leaked its own internal slots on failure
fix temp file leak in sem_open on successful creation of new semaphore
fix syscall argument bug in pthread_getschedparam

the address of the pointer to the sched param, rather than the
pointer, was being passed to the kernel.