musl/arch/x86_64/bits
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
..
alltypes.h.in refactor headers, especially alltypes.h, and improve C++ ABI compat 2013-07-22 11:22:36 -04:00
endian.h Port musl to x86-64. One giant commit! 2011-02-15 07:32:09 -05:00
errno.h add missing EHWPOISON to bits/errno.h 2013-01-12 19:42:39 +01:00
fcntl.h add missing F_GETOWNER_UIDS flag to bits/fcntl.h 2013-01-12 19:42:39 +01:00
fenv.h Port musl to x86-64. One giant commit! 2011-02-15 07:32:09 -05:00
float.h add FLT_TRUE_MIN, etc. macros from C11 2013-05-17 18:38:42 -04:00
io.h fix breakage from introducing bits header for sys/io.h 2012-11-18 19:58:15 -05:00
ioctl.h fix ioctl _IOR, _IOW, etc macros to avoid signed overflow (2<<30) 2013-05-26 15:49:08 +00:00
ipc.h fix IPC_64 in msgctl too 2012-09-22 08:04:17 -04:00
limits.h fix missing _BSD_SOURCE support in bits/*.h 2012-05-22 22:12:10 -04:00
mman.h add missing mmap options and madvices to bits/mman.h based on linux headers 2013-01-12 19:42:39 +01:00
msg.h numerous fixes to sysv ipc 2011-04-13 16:45:43 -04:00
posix.h typo in macro definitions for x86_64 2011-08-14 15:19:17 -04:00
reg.h Port musl to x86-64. One giant commit! 2011-02-15 07:32:09 -05:00
setjmp.h jmp_buf overhaul fixing several issues 2012-07-03 20:07:33 -04:00
shm.h numerous fixes to sysv ipc 2011-04-13 16:45:43 -04:00
signal.h add deprecated SIGIOT alias for SIGABRT 2013-03-23 20:02:31 -04:00
socket.h workaround another sendmsg kernel bug on 64-bit machines 2012-07-12 21:37:54 -04:00
stat.h Update x86_64 bits to mirror (modulo platform differences) the latest changes 2011-02-15 08:02:33 -05:00
statfs.h fix the definition of struct statvfs to match lsb abi 2011-09-19 23:35:48 -04:00
stdarg.h use compiler builtins for variadic macros when available 2011-04-27 23:41:48 -04:00
stdint.h refactor headers, especially alltypes.h, and improve C++ ABI compat 2013-07-22 11:22:36 -04:00
syscall.h add syscall numbers for the new kcmp and finit_module syscalls 2013-04-01 18:02:32 +00:00
termios.h add missing EXTPROC flag to bits/termios.h 2013-01-12 19:42:39 +01:00
user.h make sys/procfs.h mostly work on most archs 2012-11-25 22:28:18 -05:00