musl/include
Rich Felker 9448b0513e refactor headers, especially alltypes.h, and improve C++ ABI compat
the arch-specific bits/alltypes.h.sh has been replaced with a generic
alltypes.h.in and minimal arch-specific bits/alltypes.h.in.

this commit is intended to have no functional changes except:
- exposing additional symbols that POSIX allows but does not require
- changing the C++ name mangling for some types
- fixing the signedness of blksize_t on powerpc (POSIX requires signed)
- fixing the limit macros for sig_atomic_t on x86_64
- making dev_t an unsigned type (ABI matching goal, and more logical)

in addition, some types that were wrongly defined with long on 32-bit
archs were changed to int, and vice versa; this change is
non-functional except for the possibility of making pointer types
mismatch, and only affects programs that were using them incorrectly,
and only at build-time, not runtime.

the following changes were made in the interest of moving
non-arch-specific types out of the alltypes system and into the
headers they're associated with, and also will tend to improve
application compatibility:
- netdb.h now includes netinet/in.h (for socklen_t and uint32_t)
- netinet/in.h now includes sys/socket.h and inttypes.h
- sys/resource.h now includes sys/time.h (for struct timeval)
- sys/wait.h now includes signal.h (for siginfo_t)
- langinfo.h now includes nl_types.h (for nl_item)

for the types in stdint.h:
- types which are of no interest to other headers were moved out of
  the alltypes system.
- fast types for 8- and 64-bit are hard-coded (at least for now); only
  the 16- and 32-bit ones have reason to vary by arch.

and the following types have been changed for C++ ABI purposes;
- mbstate_t now has a struct tag, __mbstate_t
- FILE's struct tag has been changed to _IO_FILE
- DIR's struct tag has been changed to __dirstream
- locale_t's struct tag has been changed to __locale_struct
- pthread_t is defined as unsigned long in C++ mode only
- fpos_t now has a struct tag, _G_fpos64_t
- fsid_t's struct tag has been changed to __fsid_t
- idtype_t has been made an enum type (also required by POSIX)
- nl_catd has been changed from long to void *
- siginfo_t's struct tag has been removed
- sigset_t's has been given a struct tag, __sigset_t
- stack_t has been given a struct tag, sigaltstack
- suseconds_t has been changed to long on 32-bit archs
- [u]intptr_t have been changed from long to int rank on 32-bit archs
- dev_t has been made unsigned

summary of tests that have been performed against these changes:
- nsz's libc-test (diff -u before and after)
- C++ ABI check symbol dump (diff -u before, after, glibc)
- grepped for __NEED, made sure types needed are still in alltypes
- built gcc 3.4.6
2013-07-22 11:22:36 -04:00
..
arpa refactor headers, especially alltypes.h, and improve C++ ABI compat 2013-07-22 11:22:36 -04:00
net net/if.h: add some missing IFF_ constants 2013-04-05 19:26:23 +02:00
netinet refactor headers, especially alltypes.h, and improve C++ ABI compat 2013-07-22 11:22:36 -04:00
netpacket
scsi add legacy scsi/scsi_ioctl.h header 2013-07-03 18:07:50 +02:00
sys refactor headers, especially alltypes.h, and improve C++ ABI compat 2013-07-22 11:22:36 -04:00
aio.h default features: make musl usable without feature test macros 2012-09-07 23:13:55 -04:00
alloca.h
alltypes.h.in refactor headers, especially alltypes.h, and improve C++ ABI compat 2013-07-22 11:22:36 -04:00
ar.h
assert.h __assert_fail(): remove _Noreturn, to get proper stacktraces 2013-01-04 20:36:34 +01:00
byteswap.h remove all remaining redundant __restrict/__inline/_Noreturn defs 2012-09-08 17:14:52 -04:00
complex.h make CMPLX macros available in complex.h in non-c11 mode as well 2012-12-11 22:44:36 +01:00
cpio.h
crypt.h
ctype.h default features: make musl usable without feature test macros 2012-09-07 23:13:55 -04:00
dirent.h refactor headers, especially alltypes.h, and improve C++ ABI compat 2013-07-22 11:22:36 -04:00
dlfcn.h implement minimal dlinfo function 2013-06-29 12:46:46 -04:00
elf.h microblaze TLS relocation support, completely untested 2012-10-15 21:01:48 -04:00
endian.h default features: make musl usable without feature test macros 2012-09-07 23:13:55 -04:00
err.h fix redundant _Noreturn def in err.h 2012-09-08 18:16:33 -04:00
errno.h add support for program_invocation[_short]_name 2013-04-06 17:50:37 -04:00
fcntl.h fix F_DUPFD_CLOEXEC being defined twice 2012-12-06 22:45:56 +01:00
features.h add _ALL_SOURCE as an alias for _GNU_SOURCE/enable-everything 2012-12-03 17:02:56 -05:00
fenv.h
float.h add FLT_TRUE_MIN, etc. macros from C11 2013-05-17 18:38:42 -04:00
fnmatch.h default features: make musl usable without feature test macros 2012-09-07 23:13:55 -04:00
ftw.h remove unneeded judgemental commentary from ftw.h 2012-09-07 23:55:11 -04:00
getopt.h add getopt reset support 2012-09-30 20:00:38 -04:00
glob.h default features: make musl usable without feature test macros 2012-09-07 23:13:55 -04:00
grp.h add put*ent functions for passwd/group files and similar for shadow 2013-04-04 19:23:47 -04:00
iconv.h remove all remaining redundant __restrict/__inline/_Noreturn defs 2012-09-08 17:14:52 -04:00
ifaddrs.h make ifaddrs.h expose sys/socket.h 2013-04-10 22:38:46 -04:00
inttypes.h remove the __STDC_FORMAT_MACROS nonsense from inttypes.h 2013-05-17 14:23:41 -04:00
iso646.h
langinfo.h refactor headers, especially alltypes.h, and improve C++ ABI compat 2013-07-22 11:22:36 -04:00
lastlog.h
libgen.h
libintl.h
limits.h eliminate gcc dependency for testing char signedness in limits.h 2013-04-04 19:50:55 -04:00
link.h link.h: expose glibc/svr4 dynlinker debugging glue 2012-12-19 05:08:13 +01:00
locale.h use a common definition of NULL as 0L for C and C++ 2013-01-18 20:35:26 -05:00
malloc.h
math.h refactor headers, especially alltypes.h, and improve C++ ABI compat 2013-07-22 11:22:36 -04:00
memory.h
mntent.h
monetary.h remove all remaining redundant __restrict/__inline/_Noreturn defs 2012-09-08 17:14:52 -04:00
mqueue.h remove all remaining redundant __restrict/__inline/_Noreturn defs 2012-09-08 17:14:52 -04:00
netdb.h refactor headers, especially alltypes.h, and improve C++ ABI compat 2013-07-22 11:22:36 -04:00
nl_types.h refactor headers, especially alltypes.h, and improve C++ ABI compat 2013-07-22 11:22:36 -04:00
paths.h paths.h: remove cruft 2013-07-03 18:07:50 +02:00
poll.h add linux extension POLLRDHUP to poll.h 2012-12-26 16:55:49 -05:00
pthread.h provide prototype for pthread_getattr_np 2013-03-31 23:27:57 -04:00
pty.h
pwd.h add put*ent functions for passwd/group files and similar for shadow 2013-04-04 19:23:47 -04:00
regex.h fix some obscure header type size/alignment issues 2013-03-04 17:05:45 -05:00
resolv.h add prototype for dn_skipname 2013-04-04 22:36:49 -04:00
sched.h add support for thread scheduling (POSIX TPS option) 2012-11-11 15:38:04 -05:00
search.h default features: make musl usable without feature test macros 2012-09-07 23:13:55 -04:00
semaphore.h remove all remaining redundant __restrict/__inline/_Noreturn defs 2012-09-08 17:14:52 -04:00
setjmp.h setjmp.h: add struct tag for sigjmp_buf (GCC C++ compatibility) 2013-01-04 20:36:34 +01:00
shadow.h
signal.h refactor headers, especially alltypes.h, and improve C++ ABI compat 2013-07-22 11:22:36 -04:00
spawn.h fix some restrict-qualifier mismatches in newly added interfaces 2012-11-27 09:44:30 -05:00
stdalign.h
stdarg.h
stdbool.h
stddef.h use a common definition of NULL as 0L for C and C++ 2013-01-18 20:35:26 -05:00
stdint.h refactor headers, especially alltypes.h, and improve C++ ABI compat 2013-07-22 11:22:36 -04:00
stdio.h refactor headers, especially alltypes.h, and improve C++ ABI compat 2013-07-22 11:22:36 -04:00
stdio_ext.h
stdlib.h add mkostemp, mkstemps, and mkostemps functions and reorganize temp internals 2013-02-20 22:43:23 -05:00
stdnoreturn.h add stdnoreturn.h (C11) 2012-09-08 00:14:25 -04:00
string.h use a common definition of NULL as 0L for C and C++ 2013-01-18 20:35:26 -05:00
strings.h namespace conformance to latest standards in strings.h 2013-02-26 01:30:36 -05:00
stropts.h
syscall.h
sysexits.h
syslog.h default features: make musl usable without feature test macros 2012-09-07 23:13:55 -04:00
tar.h
termios.h default features: make musl usable without feature test macros 2012-09-07 23:13:55 -04:00
tgmath.h math: more correct tgmath.h type cast logic 2012-12-19 10:57:54 +01:00
time.h add clock id macros for a number of new(ish) Linux-specific clocks 2013-06-08 11:42:52 -04:00
ucontext.h fixup mcontext stuff to expost gregset_t/fpregset_t as appropriate 2012-11-25 23:04:23 -05:00
ulimit.h
unistd.h document in sysconf and unistd.h that per-thread cpu clocks exist 2013-06-26 19:43:24 -04:00
utime.h
utmp.h minor compatibility fixes in utmp.h and fixing mismatch with paths.h 2013-06-27 20:00:29 -04:00
utmpx.h refactor headers, especially alltypes.h, and improve C++ ABI compat 2013-07-22 11:22:36 -04:00
values.h add legacy header values.h 2013-01-04 20:36:34 +01:00
wchar.h refactor headers, especially alltypes.h, and improve C++ ABI compat 2013-07-22 11:22:36 -04:00
wctype.h refactor headers, especially alltypes.h, and improve C++ ABI compat 2013-07-22 11:22:36 -04:00
wordexp.h remove all remaining redundant __restrict/__inline/_Noreturn defs 2012-09-08 17:14:52 -04:00