math: remove an unused variable from modfl
minor vfprintf and vfwprintf changes to please static code analyzers

add missing va_end and remove some unnecessary code.
add missing va_end in execl* for correcness and static code analyzers
fix allocation sizes in regcomp

sizeof had incorrect argument in a few places, the size was always
large enough so the issue was not critical.
remove errno setting from setenv, malloc sets it correctly on oom
fix clockid macro names in time.h, reported by Paul Schutte
math: use sqrtl if FLT_EVAL_METHOD==2 in acosh and acoshf

this makes acosh slightly more precise around 1.0 on i386
math: fix rare underflow issue in fma

the issue is described in commits 1e5eb73545ca6cfe8b918798835aaf6e07af5beb
and ffd8ac2dd50f99c3c83d7d9d845df9874ec3e7d5
fix errno value for getcwd when size argument is zero

based on patch by Michael Forney. at the same time, I've changed the
if branch to be more clear, avoiding the comma operator.

the underlying issue is that Linux always returns ERANGE when size is
too short, even when it's zero, rather than returning EINVAL for the
special case of zero as required by POSIX.
fix uid/gid-setting error in faccessat with AT_EACCESS flag

this fixes an issue reported by Daniel Thau whereby faccessat with the
AT_EACCESS flag did not work in cases where the process is running
suid or sgid but without root privileges. per POSIX, when the process
does not have "appropriate privileges", setuid changes the euid, not
the real uid, and the target uid must be equal to the current real or
saved uid; if this condition is not met, EPERM results. this caused
the faccessat child process to fail.

using the setreuid syscall rather than setuid works. POSIX leaves it
unspecified whether setreuid can set the real user id to the effective
user id on processes without "appropriate privileges", but Linux
allows this; if it's not allowed, there would be no way for this
function to work.
in faccessat slow path, add close-on-exec to pipe fds

as usual, this is needed to avoid fd leaks. as a better solution, the
use of fds could possibly be replaced with mmap and a futex.
fix typo in socket.h (wrong macro name)
use consistent include guard name in arpa/ftp.h
fix return value for inet_pton in ipv6 failure cases

in the case of input that does not match the expected form, the
correct return value is 0, not -1.
fix multiple minor namespace issues in headers

fcntl.h: AT_* is not a reserved namespace so extensions cannot be
exposed by default.

langinfo.h: YESSTR and NOSTR were removed from the standard.

limits.h: NL_NMAX was removed from the standard.

signal.h: the conditional for NSIG was wrongly checking _XOPEN_SOURCE
rather than _BSD_SOURCE. this was purely a mistake; it doesn't even
match the commit message from the commit that added it.
split inet_addr and inet_ntoa back into their own files

despite being practically deprecated, these functions are still part
of the standard and thus cannot reside in a file that also contains
namespace pollution. this reverts some of the changes made in commit
e40f48a421a9176e3e298b5bac75f0355b219e58.
fix inet_aton to accept the generic "numbers-and-dots" IPv4 address format
fix __ipparse to parse the generic numbers-and-dots IPv4 format correctly

* allow at most 4 parts
* bounds check the parts correctly
* disallow leading whitespace and sign
* check the address family before falling back to IPv6
fix inet_pton

* parse IPv4 dotted-decimal correctly (without strtoul, no leading zeros)
* disallow single leading ':' in IPv6 address
* allow at most 4 hex digits in IPv6 address (according to RFC 2373)
* have enough hex fields in IPv4 mapped IPv6 address
* disallow leading zeros in IPv4 mapped IPv6 address
add legacy ftime function and sys/timeb.h

despite being marked legacy, this was specified by SUSv3 as part of
the XSI option; only the most recent version of the standard dropped
it. reportedly there's actual code using it.