musl/include
Rich Felker 9b2921bea1 adjust struct timespec definition to be time64-ready
for time64 support on 32-bit archs, the kernel interfaces use a
timespec layout padded to match the representation of a pair of 64-bit
values, which requires endian-specific padding.

use of an ordinary, non-bitfield, named member for the padding is
undesirable because, on big endian archs, it would alter the
interpretation of traditional (non-designated) initializers of the
form {s,ns}, initializing the padding instead of the tv_nsec member.
unnamed bitfield members solve this problem by not taking part in
initialization, and were the expected solution when the kernel
interfaces were designed. however, they also have further advantages
which we take advantage of here:

positioning of the padding could be controlled by having a
preprocessor conditional with separate definitions of struct timespec
for little and big endian, but whether padding should appear at all is
a function of whether time_t is larger than long. this condition is
not something the preprocessor can determine unless we were to define
a new macro specifically for that purpose.

by using unnamed bitfield members instead of ordinary named members,
we can arrange for the size of the padding to collapse to zero when it
should not be present, just by using sizeof(time_t) and sizeof(long)
in the bitfield width expression, which can be any integer constant
expression.
2019-10-20 03:27:58 -04:00
..
arpa remove indirect use of endian.h from public headers 2019-10-17 16:03:42 -04:00
net net/if_arp.h: add ARPHRD_RAWIP from linux v4.14 2018-02-22 18:47:49 -05:00
netinet remove indirect use of endian.h from public headers 2019-10-17 16:03:42 -04:00
netpacket add PACKET_IGNORE_OUTGOING sockopt from linux v4.20 2019-03-13 12:32:19 -04:00
scsi
sys remove indirect use of endian.h from public headers 2019-10-17 16:03:42 -04:00
aio.h make all objects used with atomic operations volatile 2015-03-03 22:50:02 -05:00
alloca.h
alltypes.h.in adjust struct timespec definition to be time64-ready 2019-10-20 03:27:58 -04:00
ar.h
assert.h restore _Noreturn to __assert_fail 2016-08-30 16:39:54 -04:00
byteswap.h
complex.h fix mismatched parens in CMPLX def for annex-g-conforming compilers 2015-11-02 21:44:57 -05:00
cpio.h
crypt.h
ctype.h add macro version of ctype.h isascii function 2015-06-06 18:16:22 +00:00
dirent.h add _DIRENT_HAVE_D_* macros to dirent.h 2018-01-12 14:26:59 -05:00
dlfcn.h
elf.h elf.h: add NT_ARM_PAC{A,G}_KEYS from linux v5.1 2019-07-01 14:16:49 -04:00
endian.h make endian.h expose unprefixed macros, functions in standard profile 2019-10-17 16:26:22 -04:00
err.h
errno.h restore attribute((const)) to pthread_self and errno location decls 2018-10-16 14:10:27 -04:00
fcntl.h fcntl.h: add AT_RECURSIVE from linux v5.2 2019-09-11 10:40:31 -04:00
features.h in public headers, don't assume pre-C99 compilers have __inline keyword 2016-12-16 23:12:32 -05:00
fenv.h
float.h fix FLT_ROUNDS regression in C++ applications 2015-03-23 11:26:51 -04:00
fmtmsg.h
fnmatch.h
ftw.h make brace placement in public header struct definitions consistent 2016-07-03 15:02:25 -04:00
getopt.h make brace placement in public header struct definitions consistent 2016-07-03 15:02:25 -04:00
glob.h glob: implement GLOB_TILDE and GLOB_TILDE_CHECK 2019-08-06 14:03:31 -04:00
grp.h fix various header namespace issues under feature-test-macro control 2016-10-20 17:20:01 -04:00
iconv.h
ifaddrs.h remove parameter names from public headers 2016-10-20 17:04:37 -04:00
inttypes.h
iso646.h
langinfo.h add _NL_LOCALE_NAME extension to nl_langinfo 2017-07-31 23:08:27 -04:00
lastlog.h
libgen.h
libintl.h add format argument attributes to gettext function prototypes 2015-09-15 20:30:36 +00:00
limits.h define LONG_MAX via arch alltypes.h, strip down bits/limits.h 2019-10-17 19:23:39 -04:00
link.h generalize ELF hash table types not to assume 32-bit entries 2016-11-11 12:46:06 -05:00
locale.h
malloc.h
math.h define FP_FAST_FMA* when fma* can be inlined 2019-04-17 13:02:47 -04:00
memory.h
mntent.h make brace placement in public header struct definitions consistent 2016-07-03 15:02:25 -04:00
monetary.h
mqueue.h
netdb.h restore attribute((const)) to pthread_self and errno location decls 2018-10-16 14:10:27 -04:00
nl_types.h
paths.h
poll.h make brace placement in public header struct definitions consistent 2016-07-03 15:02:25 -04:00
pthread.h restore attribute((const)) to pthread_self and errno location decls 2018-10-16 14:10:27 -04:00
pty.h
pwd.h fix various header namespace issues under feature-test-macro control 2016-10-20 17:20:01 -04:00
regex.h
resolv.h don't claim support for resolv.h APIs that aren't supported 2016-11-07 11:55:53 -05:00
sched.h sched.h: add CLONE_PIDFD from linux v5.2 2019-09-11 10:40:04 -04:00
search.h
semaphore.h make all objects used with atomic operations volatile 2015-03-03 22:50:02 -05:00
setjmp.h remove macro definition of longjmp from setjmp.h 2015-04-01 20:35:03 -04:00
shadow.h
signal.h add TRAP_UNK si_code to signal.h from linux v4.18 2018-12-09 22:29:07 -05:00
spawn.h add posix_spawn [f]chdir file actions 2019-08-30 16:21:36 -04:00
stdalign.h
stdarg.h remove legacy i386 fallback stdarg implementation and framework 2016-12-15 12:18:24 -05:00
stdbool.h
stdc-predef.h add stdc-predef.h for library-level predefined macros 2016-07-03 20:03:30 -04:00
stddef.h
stdint.h fix signedness of UINT32_MAX and UINT64_MAX at the preprocessor level 2014-12-21 02:30:29 -05:00
stdio.h make FILE a complete type for pre-C11 standard profiles 2019-03-12 15:24:00 -04:00
stdio_ext.h
stdlib.h add secure_getenv function 2019-08-08 11:33:18 -04:00
stdnoreturn.h
string.h add explicit_bzero implementation 2018-06-26 16:59:12 -04:00
strings.h
stropts.h
syscall.h
sysexits.h
syslog.h
tar.h expose TSVTX unconditionally in tar.h 2019-03-13 10:42:57 -04:00
termios.h
tgmath.h
threads.h remove parameter names from public headers 2016-10-20 17:04:37 -04:00
time.h fix various header namespace issues under feature-test-macro control 2016-10-20 17:20:01 -04:00
uchar.h uchar.h: define char16_t and char32_t for old c++ 2018-07-17 22:24:03 -04:00
ucontext.h fix signature of function accepted by makecontext 2019-04-05 17:29:00 -04:00
ulimit.h
unistd.h add public declaration for optreset under appropriate feature profiles 2019-08-30 17:48:47 -04:00
utime.h make brace placement in public header struct definitions consistent 2016-07-03 15:02:25 -04:00
utmp.h add declarations for utmpname/utmpxname to appropriate headers 2016-02-12 09:58:50 -05:00
utmpx.h fix typo in utmpx.h 2016-10-20 16:55:32 -04:00
values.h
wait.h
wchar.h make FILE a complete type for pre-C11 standard profiles 2019-03-12 15:24:00 -04:00
wctype.h improve iswdigit macro to diagnose errors 2015-05-02 21:19:08 -04:00
wordexp.h make brace placement in public header typedef'd structs consistent 2016-07-03 16:19:28 -04:00