fix timezone parser code crashing on 64bit sys

if sizeof(time_t) == 8, this code path was missing the correct
offset into the zoneinfo file, using the header magic to do
offset calculations.
the 6 32bit fields to be read start at offset 20.
timezone parser: fix offset to transition table in 64bit code path

we need to skip to the second TZif header, which starts at
skip+44, and then skip another header (20 bytes) plus the following
6 32bit values.
timezone parser: fix iteration over search dir paths

try+l points to \0, so only one iteration was ever tried.
Add wmempcpy

This function is used by elfutils and optionally by tar.
Implement qsort_r

Also write qsort in terms of qsort_r
Fix dn_comp prototype and add stub

This function is used by ping6 from iputils.
Fix dn_expand pointer following
getifaddrs: Simplify list creation
getifaddrs: Use sysfs to query *all* network interfaces
getifaddrs: Just use strcpy

The destination size is the same as the source size.
getifaddrs: Add AF_PACKET interface addrs
openlog: Support SOCK_STREAM
shadow: Move spent parsing to internal function
shadow: Implement sgetspent
getopt_long: Support abbreviated option matching

From the getopt_long manpage:

    Long option names may be abbreviated if the abbreviation is unique
    or is an exact match for some defined option
strcmp: Remove unnecessary check for *r

If *l == *r && *l, then by transitivity, *r.
putgrent: Stop writing output on first failure

This way, if an fprintf fails, we get an incomplete group entry rather
than a corrupted one.
putgrent: Add missing newline
shadow: Implement putspent
Add logwtmp stub