about summary refs log tree commit diff
path: root/include
Commit message (Collapse)AuthorAgeFilesLines
* fix multiple minor namespace issues in headersRich Felker2013-10-204-7/+15
| | | | | | | | | | | | | fcntl.h: AT_* is not a reserved namespace so extensions cannot be exposed by default. langinfo.h: YESSTR and NOSTR were removed from the standard. limits.h: NL_NMAX was removed from the standard. signal.h: the conditional for NSIG was wrongly checking _XOPEN_SOURCE rather than _BSD_SOURCE. this was purely a mistake; it doesn't even match the commit message from the commit that added it.
* use consistent include guard name in arpa/ftp.hSzabolcs Nagy2013-10-181-2/+2
|
* fix typo in socket.h (wrong macro name)Szabolcs Nagy2013-10-181-1/+1
|
* fix clockid macro names in time.h, reported by Paul SchutteSzabolcs Nagy2013-10-071-2/+2
|
* math: fix comparision macros (isless etc) when FLT_EVAL_METHOD!=0Szabolcs Nagy2013-09-271-10/+10
| | | | | | | This is a change in ISO C11 annex F (F.10.11p1), comparision macros can't round their arguments to their semantic type when the evaluation format has wider range and precision. (ie. they must be consistent with the builtin relational operators)
* sys/resource.h: add PRIO_MIN and PRIO_MAX for getpriority and setprioritySzabolcs Nagy2013-09-161-0/+3
| | | | | | | These constants are not specified by POSIX, but they are in the reserved namespace, glibc and bsd systems seem to provide them as well. (Note that POSIX specifies -NZERO and NZERO-1 to be the limits, but PRIO_MAX equals NZERO)
* update include/elf.h following glibc changesSzabolcs Nagy2013-09-161-27/+143
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | the changes were verified using various sources: linux: include/uapi/linux/elf.h binutils: include/elf/common.h glibc: elf/elf.h sysv gabi: http://www.sco.com/developers/gabi/latest/contents.html sun linker docs: http://docs.oracle.com/cd/E18752_01/pdf/817-1984.pdf and platform specific docs - fixed: EF_MIPS_* E_MIPS_* e_flags: fixed accoding to glibc and binutils - added: ELFOSABI_GNU for EI_OSABI entry: glibc, binutils and sysv gabi EM_* e_machine values: updated according to linux and glibc PN_XNUM e_phnum value: from glibc and linux, see oracle docs NT_* note types: updated according to linux and glibc DF_1_* flags for DT_FLAGS_1 entry: following glibc and oracle docs AT_HWCAP2 auxv entry for more hwcap bits accoding to linux and glibc R_386_SIZE32 relocation according to glibc and binutils EF_ARM_ABI_FLOAT_* e_flags: added following glibc and binutils R_AARCH64_* relocs: added following glibc and aarch64 elf specs R_ARM_* relocs: according to glibc, binutils and arm elf specs R_X86_64_* relocs: added missing relocs following glibc - removed: HWCAP_SPARC_* flags were moved to arch specific header in glibc R_ARM_SWI24 reloc is marked as obsolete in glibc, not present in binutils not specified in arm elf spec, R_ARM_TLS_DESC reused its number see http://www.codesourcery.com/publications/RFC-TLSDESC-ARM.txt - glibc changes not pulled in: ELFOSABI_ARM_AEABI (bare-metal system, binutils and glibc disagrees about the name) R_68K_* relocs for unsupported platform R_SPARC_* ditto EF_SH* ditto (e_flags) EF_S390* ditto (e_flags) R_390* ditto R_MN10300* ditto R_TILE* ditto
* sys/socket.h: add new SO_BUSY_POLL socket optionSzabolcs Nagy2013-09-151-0/+1
| | | | low latency busy poll sockets are new in linux v3.11
* ptrace.h: add new ptrace requests to get/set sigmaskSzabolcs Nagy2013-09-151-0/+2
| | | | | PTRACE_GETSIGMASK and PTRACE_SETSIGMASK were added in linux v3.11 and used by checkpoint/restore tools
* net/if_arp.h: add missing ARP hardware identifiers from linux uapi headersSzabolcs Nagy2013-09-151-1/+7
| | | | | | the removed ARPHRD_IEEE802154_PHY was only present in the kernel api in v2.6.31 (by accident), but it got into the glibc headers (in 2009) and remained there since this header was not updated since then.
* netinet/in.h: add missing IP protocol numbers from the linux uapi headersSzabolcs Nagy2013-09-151-0/+2
|
* support configurable page size on mips, powerpc and microblazeSzabolcs Nagy2013-09-151-0/+2
| | | | | | | | | | | | | | | | PAGE_SIZE was hardcoded to 4096, which is historically what most systems use, but on several archs it is a kernel config parameter, user space can only know it at execution time from the aux vector. PAGE_SIZE and PAGESIZE are not defined on archs where page size is a runtime parameter, applications should use sysconf(_SC_PAGE_SIZE) to query it. Internally libc code defines PAGE_SIZE to libc.page_size, which is set to aux[AT_PAGESZ] in __init_libc and early in __dynlink as well. (Note that libc.page_size can be accessed without GOT, ie. before relocations are done) Some fpathconf settings are hardcoded to 4096, these should be actually queried from the filesystem using statfs.
* add workaround header for wait.h remapping to sys/wait.hRich Felker2013-09-011-0/+2
|
* only expose struct tcphdr under _GNU_SOURCERich Felker2013-08-301-1/+3
| | | | | | | | the BSD and GNU versions of this structure differ, so exposing it in the default _BSD_SOURCE profile is possibly problematic. both versions could be simultaneously supported with anonymous unions if needed in the future, but for now, just omitting it except under _GNU_SOURCE should be safe.
* add struct tcphdr in netinet/tcp.hRich Felker2013-08-301-0/+33
|
* stdbool.h should define __bool_true_false_are_defined even for C++Rich Felker2013-08-281-2/+2
| | | | | | | | while the incorporation of this requirement from C99 into C++11 was likely an accident, some software expects it to be defined, and it doesn't hurt. if the requirement is removed, then presumably __bool_true_false_are_defined would just be in the implementation namespace and thus defining it would still be legal.
* add SUN_LEN macro to sys/un.h under appropriate feature testsRich Felker2013-08-211-0/+19
| | | | | this is ugly and useless, but it seems to be the least-ugly way to provide it...
* de-duplicate dn_expand, fix return value and signature, clean upRich Felker2013-08-141-1/+1
| | | | | | | | | | | | | | | | | the duplicate code in dn_expand and its incorrect return values are both results of the history of the code: the version in __dns.c was originally written with no awareness of the legacy resolver API, and was later copy-and-paste duplicated to provide the legacy API. this commit is the first of a series that will restructure the internal dns code to share as much code as possible with the legacy resolver API functions. I have also removed the loop detection logic, since the output buffer length limit naturally prevents loops. in order to avoid long runtime when encountering a loop if the caller provided a ridiculously long buffer, the caller-provided length is clamped at the maximum dns name length.
* add missing MSG_EXCEPT in sys/msg.hRich Felker2013-08-141-0/+1
|
* provide declarations for strtod_l and familyRich Felker2013-08-131-0/+4
| | | | | | | | these aliases were originally intended to be for ABI compatibility only, but their presence caused regressions in broken gnulib-based software whose configure scripts detect the existing of these functions then use them without declarations, resulting in bogus return values.
* fix definitions of WIFSTOPPED and WIFSIGNALED to support up to signal 127Rich Felker2013-08-102-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | mips has signal numbers up to 127 (formerly, up to 128, but the last one never worked right and caused kernel panic when used), so 127 in the "signal number" field of the wait status is insufficient for determining that the process was stopped. in addition, a nonzero value in the upper bits must be present, indicating the signal number which caused the process to be stopped. details on this issue can be seen in the email with message id CAAG0J9-d4BfEhbQovFqUAJ3QoOuXScrpsY1y95PrEPxA5DWedQ@mail.gmail.com on the linux-mips mailing list, archived at: http://www.linux-mips.org/archives/linux-mips/2013-06/msg00552.html and in the associated thread about fixing the mips kernel bug. commit 4a96b948687166da26a6c327e6c6733ad2336c5c fixed the corresponding issue in uClibc, but introduced a multiple-evaluation issue for the WIFSTOPPED macro. for the most part, none of these issues affected pure musl systems, since musl has up until now (incorrectly) defined SIGRTMAX as 64 on all archs, even mips. however, interpreting status of non-musl programs on mips may have caused problems. with this change, the full range of signal numbers can be made available on mips.
* add pthread_setaffinity_np and pthread_getaffinity_np functionsRich Felker2013-08-101-0/+3
|
* add cpu affinity interfacesRich Felker2013-08-101-0/+61
| | | | | | | this first commit just includes the CPU_* and sched_* interfaces, not the pthread_* interfaces, which may be added later. simple sanity-check testing has been done for the basic interfaces, but most of the macros have not yet been tested.
* sys/personality.h: add missing C++ compatrofl0r2013-08-081-0/+7
|
* sys/personality.h: add missing macrosrofl0r2013-08-081-0/+33
|
* add some new linux AT_* flagsRich Felker2013-08-031-0/+2
|
* add prototypes for euidaccess/eaccessRich Felker2013-08-031-0/+2
|
* fix feature test macro logic for _BSD_SOURCERich Felker2013-08-023-7/+7
| | | | | | in several places, _BSD_SOURCE was not even implying POSIX, resulting in it being subtractive rather than additive (compared to the default features).
* add missing c++ extern "C" wrapping to link.hRich Felker2013-08-021-0/+8
|
* provide useless 64-bit fcntl macros with _LARGEFILE64_SOURCERich Felker2013-08-021-0/+3
| | | | | this is all useless but part of the API, which is part of the _GNU_SOURCE API, so something may need them.
* add macros for new(ish) prctl commandsRich Felker2013-07-301-0/+37
|
* fix some prctl macros that were incorrectly copied into this fileRich Felker2013-07-301-3/+3
|
* add wrapper headers, with warnings, for various incorrect names under sysRich Felker2013-07-276-0/+11
| | | | | | | also add a warning to the existing sys/poll.h. the warning is absent from sys/dir.h because it is actually providing a slightly different API to the program, and thus just replacing the #include directive is not a valid fix to programs using this one.
* a few more fixes for unistd/sysconf feature reportingRich Felker2013-07-271-0/+1
|
* report presence of ADV and MSG options in unistd.h and sysconfRich Felker2013-07-261-0/+2
|
* report that posix_spawn is supported in unistd.h and sysconfRich Felker2013-07-261-0/+1
|
* fix incorrect type for new si_call_addr in siginfo_tRich Felker2013-07-241-3/+3
| | | | | | | | | | apparently the original kernel commit's i386 version of siginfo.h defined this field as unsigned int, but the asm-generic file always had void *. unsigned int is obviously not a suitable type for an address, in a non-arch-specific file, and glibc also has void * here, so I think void * is the right type for it. also fix redundant type specifiers.
* add protocol families PF_IB and PF_VSOCK to socket.hSzabolcs Nagy2013-07-251-1/+5
| | | | | | | | linux commit 8d36eb01da5d371feffa280e501377b5c450f5a5 (2013-05-29) added PF_IB for InfiniBand linux commit d021c344051af91f42c5ba9fdedc176740cbd238 (2013-02-06) added PF_VSOCK for VMware sockets
* update siginfo according to linux headersSzabolcs Nagy2013-07-241-1/+13
| | | | | | | | linux commit a0727e8ce513fe6890416da960181ceb10fbfae6 (2012-04-12) added siginfo fields for SIGSYS (seccomp uses it) linux commit ad5fa913991e9e0f122b021e882b0d50051fbdbc (2009-09-16) added siginfo field and si_code values for SIGBUS (hwpoison signal)
* add PTRACE_PEEKSIGINFO to ptrace.hSzabolcs Nagy2013-07-241-0/+11
| | | | | added in linux-v3.10 commit 84c751bd4aebbaae995fe32279d3dba48327bad4 using stdint.h types for the new ptrace_peeksiginfo_args struct
* add if_ether.h constants ETH_P_802_3_MIN and ETH_P_BATMANSzabolcs Nagy2013-07-241-0/+3
| | | | | see linux commits 4f99ad51292078cc47343c17d3870764588cff73 and e5c5d22e8dcf7c2d430336cbf8e180bd38e8daf1
* add CLOCK_TAI (and CLOCK_SGI_CYCLE) clock ids to time.hSzabolcs Nagy2013-07-241-0/+2
| | | | added in linux-v3.10 commit 1ff3c9677bff7e468e0c487d0ffefe4e901d33f4
* remove TCP_COOKIE_TRANSACTIONS from tcp.hSzabolcs Nagy2013-07-241-1/+0
| | | | removed in linux-v3.10 in commit 1a2c6181c4a1922021b4d7df373bba612c3e5f04
* add SO_SELECT_ERR_QUEUE to socket.hSzabolcs Nagy2013-07-241-0/+1
| | | | introduced in linux-v3.10 commit 7d4c04fc170087119727119074e72445f2bb192b
* change jmp_buf to share an underlying type and struct tag with sigjmp_bufRich Felker2013-07-241-7/+6
| | | | | | | | | | this is necessary to meet the C++ ABI target. alternatives were considered to avoid the size increase for non-sig jmp_buf objects, but they seemed to have worse properties. moreover, the relative size increase is only extreme on x86[_64]; one way of interpreting this is that, if the size increase from this patch makes jmp_buf use too much memory, then the program was already using too much memory when built for non-x86 archs.
* undefine internal-use type macros at the end of alltypes.hRich Felker2013-07-221-0/+4
| | | | | | | | | | | | | | | | | this patch is something of a compromise for a compatibility regression discovered after the header refactoring: libtiff uses _Int64 for its own use. this is absolutely wrong, invalid C, and should not be supported, but it's also frustrating for users when code that used to work suddenly breaks. rather than leave the breakage in place or change musl internals to accommodate broken software, I've found a change that makes the problem go away and improves musl. by undefining these macros at the end of alltypes.h, the temptation to use them in other headers is removed. (for example, I almost used _Int64 in sys/types.h to define u_int64_t rather than adding it back to alltypes.h.) by confining use of these macros to alltypes.h, we keep it easy to go back and change the implementation of alltypes later, if needed.
* move register_t and u_int64_t (back) to alltypesRich Felker2013-07-222-2/+7
| | | | | | | | during the header refactoring, I had moved u_int64_t out of alltypes under the assumption that we could just use long long everywhere. however, it seems some broken applications make inconsistent mixed use of u_int64_t and uint64_t, resulting in build errors when the underlying type differs.
* fix regression in size of nlink_t (broken stat struct) on x86_64Rich Felker2013-07-221-1/+1
| | | | | | | | rather than moving nlink_t back to the arch-specific file, I've added a macro _Reg defined to the canonical type for register-size values on the arch. this is not the same as _Addr for (not-yet-supported) 32-on-64 pseudo-archs like x32 and mips n32, so a new macro was needed.
* make regoff_t and regex_t match C++ ABIRich Felker2013-07-222-3/+3
| | | | | | for regoff_t, it's impossible to match on 64-bit archs because glibc defined the type in a non-conforming way. however this change makes the type match on 32-bit archs.
* make pthread_key_t unsigned to match ABIRich Felker2013-07-221-1/+1
|