summaryrefslogtreecommitdiff
path: root/arch/x86_64/bits/alltypes.h.sh
AgeCommit message (Collapse)AuthorLines
2013-07-22refactor headers, especially alltypes.h, and improve C++ ABI compatRich Felker-127/+0
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-19change uid_t, gid_t, and id_t to unsigned typesRich Felker-3/+3
this change is both to fix one of the remaining type (and thus C++ ABI) mismatches with glibc/LSB and to allow use of the full range of uid and gid values, if so desired. passwd/group access functions were not prepared to deal with unsigned values, so they too have been fixed with this commit.
2013-07-17make spacing in x86_64 alltypes.h.sh more uniform with other archsRich Felker-0/+1
patch by Luka Perkov, who noted that all other archs have a newline.
2013-06-25respect iso c namespace in stdio.h and wchar.h regarding va_listRich Felker-0/+1
despite declaring functions that take arguments of type va_list, these headers are not permitted by the c standard to expose the definition of va_list, so an alias for the type must be used. the name __isoc_va_list was chosen to convey that the purpose of this alternate name is for iso c conformance, and to avoid the multitude of names which gcc mangles with its hideous "fixincludes" monstrosity, leading to serious header breakage if these "fixes" are run.
2013-05-26on x86_64 use long instead of long long for 64bit posix typesSzabolcs Nagy-4/+4
following glibc use the lowest rank 64bit integer type for ino_t etc. this is eg. useful for printf format compatibility
2013-04-04fix type issues in stdint.h so underlying types of 64-bit types match ABIRich Felker-0/+3
2013-04-02re-add useconds_trofl0r-0/+1
this type was removed back in 5243e5f1606a9c6fcf01414e , because it was removed from the XSI specs. however some apps use it. since it's in the POSIX reserved namespace, we can expose it unconditionally.
2013-03-04fix types for wctype_t and wctrans_tRich Felker-2/+2
wctype_t was incorrectly "int" rather than "long" on x86_64. not only is this an ABI incompatibility; it's also a major design flaw if we ever wanted wctype_t to be implemented as a pointer, which would be necessary if locales support custom character classes, since int is too small to store a converted pointer. this commit fixes wctype_t to be unsigned long on all archs, matching the LSB ABI; this change does not matter for C code, but for C++ it affects mangling. the same issue applied to wctrans_t. glibc/LSB defines this type as const __int32_t *, but since no such definition is visible, I've just expanded the definition, int, everywhere. it would be nice if these types (which don't vary by arch) could be in wctype.h, but the OB XSI requirement in POSIX that wchar.h expose some types and functions from wctype.h precludes doing so. glibc works around this with some hideous hacks, but trying to duplicate that would go against the intent of musl's headers.
2013-02-26fix wrong float_t on x86_64Rich Felker-1/+1
x86_64 does not have excess precision, at all
2012-04-24use signed char rather than plain char for int8_tRich Felker-4/+4
otherwise this BADLY breaks if -funsigned-char is passed to gcc
2012-02-15add float_t and double_t to math.hRich Felker-0/+3
2011-10-15don't define wchar_t on c++Rich Felker-0/+2
it's a keyword in c++ (wtf). i'm not sure this is the cleanest solution; it might be better to avoid ever defining __NEED_wchar_t on c++. but in any case, this works for now.
2011-04-13fix and cleanup suseconds_t/timeval stuff (broken on 64-bit)Rich Felker-1/+1
trash in the upper 32 bits was making the kernel sleep forever in select on 64-bit systems.
2011-04-11more types cleanupRich Felker-3/+0
the basic idea is that the only things in alltypes.h should be types that either vary from system to system (in practice, not just in theoretical la-la land - this is the implementation so we choose what constraints we want to impose on ports) or which are needed by multiple system headers.
2011-04-11cleanup types stuff in headers, fix missing u_int*_t in sys/types.hRich Felker-11/+0
2011-04-01remove obsolete and useless useconds_t typeRich Felker-1/+0
2011-04-01somehow timespec tv_nsec had the wrong type on x86_64... fixedRich Felker-1/+1
2011-03-30avoid all malloc/free in timer creation/destructionRich Felker-1/+1
instead of allocating a userspace structure for signal-based timers, simply use the kernel timer id. we use the fact that thread pointers will always be zero in the low bit (actually more) to encode integer timerid values as pointers. also, this change ensures that the timer_destroy syscall has completed before the library timer_destroy function returns, in case it matters.
2011-03-29some preliminaries for adding POSIX timersRich Felker-1/+1
2011-03-11match dimensions so we can use all slots without invoking OOB-array-accessRich Felker-5/+5
2011-02-17reorganize pthread data structures and move the definitions to alltypes.hRich Felker-0/+15
this allows sys/types.h to provide the pthread types, as required by POSIX. this design also facilitates forcing ABI-compatible sizes in the arch-specific alltypes.h, while eliminating the need for developers changing the internals of the pthread types to poke around with arch-specific headers they may not be able to test.
2011-02-15fix some type leakage (timer_t) from x86_64 commitRich Felker-1/+1
2011-02-15Update x86_64 bits to mirror (modulo platform differences) the latest changesNicholas J. Kain-4/+4
to i386.
2011-02-15Port musl to x86-64. One giant commit!Nicholas J. Kain-0/+116