aboutsummaryrefslogtreecommitdiff
path: root/include (follow)
Commit message (Expand)AuthorAgeFilesLines
* fix argument types for legacy function inet_makeaddr•••the type int was taken from seemingly erroneous man pages. glibc uses in_addr_t (uint32_t), and semantically, the arguments should be unsigned. Rich Felker2014-01-061-1/+1
* const-qualify the address argument to dladdr•••this agrees with implementation practice on glibc and BSD systems, and is the const-correct way to do things; it eliminates warnings from passing pointers to const. the prototype without const came from seemingly erroneous man pages. Rich Felker2014-01-061-1/+1
* add some missing LFS64 aliases for fadvise/fallocate functionsRich Felker2014-01-061-0/+1
* add fanotify syscall wrapper and headerrofl0r2014-01-021-0/+73
* fix struct signalfd_siginfo•••ssi_ptr is really 64-bit in kernel, so fix that. assuming sizeof(void*) for it also caused incorrect padding for 32-bits, as the following 64-bits are aligned to 64-bits (and the padding was not taken into account), so fix the padding as well. add addr_lsb field while there. Timo Teräs2013-12-291-2/+3
* implement legacy function herror•••based on patch by Timo Teräs; greatly simplified to use fprintf. Rich Felker2013-12-201-0/+1
* add sys/quota.h and quotactl syscall wrapper•••based on patch by Timo Teräs. Rich Felker2013-12-201-0/+104
* add netinet/igmp.h and multicast groups to netinet/in.h•••based on patch by Timo Teräs. Rich Felker2013-12-202-0/+50
* add TCP_INFO and TCP_MD5SIG socket option related structuresTimo Teräs2013-12-201-0/+58
* add posix_close, accepted for inclusion in the next issue of POSIX•••this is purely a wrapper for close since Linux does not support EINTR semantics for the close syscall. Rich Felker2013-12-061-0/+3
* move struct ucred under _GNU_SOURCE in sys/socket.h for clean posix namespaceSzabolcs Nagy2013-12-041-0/+2
* fix SHUT_WR typo in sys/socket.h and duplicate definitions of SHUT_*Szabolcs Nagy2013-12-041-5/+1
* fix res_mkquery and res_send prototypes in resolv.h•••historically these functions appeared in BSD 4.3 without prototypes, then in the bind project prototypes were added to resolv.h, but those were incompatible with the definitions of the implementation. the bind resolv.h became the defacto api most systems use now, but the old internal definitions found their way into the linux manuals and thus into musl. Szabolcs Nagy2013-12-041-4/+2
* remove duplicate definition of _PATH_LASTLOG in paths.hRich Felker2013-12-031-1/+0
* remove now-unnecessary features.h inclusion from fnmatch.hRich Felker2013-12-021-2/+0
* expose FNM_* extensions in fnmatch.h without _GNU_SOURCE•••at least a couple of these are used on BSD too, and the FNM_* namespace is reserved in fnmatch.h anyway. Rich Felker2013-12-021-3/+0
* increase TTY_NAME_MAX limit to 32•••the old value of 20 was reported by Laurent Bercot as being insufficient for a reasonable real-world usage case. actual problem was the internal buffer used by ttyname(), but the implementation of ttyname uses TTY_NAME_MAX, and for consistency it's best to increase both. the new value is aligned with glibc. Rich Felker2013-11-291-1/+1
* adjust fallback INFINITY definition for FLT_EVAL_METHOD==2 case•••on archs with excess precision, the floating point constant 1e40f may be evaluated such that it does not actually produce an infinity. 1e5000f is sufficiently large to produce an infinity for all supported floating point formats. note that this definition of INFINITY is only used for old or non-GNUC compilers anyway; despite being a portable, conforming definition, it leads to erroneous warnings on many compilers and thus using the builtin is preferred. Rich Felker2013-11-261-1/+1
* restore type of NULL to void * except when used in C++ programs•••unfortunately this eliminates the ability of the compiler to diagnose some dangerous/incorrect usage, but POSIX requires (as an extension to the C language, i.e. CX shaded) that NULL have type void *. plain C allows it to be defined as any null pointer constant. the definition 0L is preserved for C++ rather than reverting to plain 0 to avoid dangerous behavior in non-conforming programs which use NULL as a variadic sentinel. (it's impossible to use (void *)0 for C++ since C++ lacks the proper implicit pointer conversions, and other popular alternatives like the GCC __null extension seem non-conforming to the standard's requirements.) Rich Felker2013-11-248-0/+33
* Fix dn_comp prototype and add stub•••This function is used by ping6 from iputils. Michael Forney2013-11-241-1/+1
* use 0 instead of NULL in headers where NULL is not defined•••some macros in sys/mtio.h and syslog.h used NULL without defining it Szabolcs Nagy2013-11-242-3/+3
* add TCP_NOTSENT_LOWAT tcp socket option, new in linux v3.12Szabolcs Nagy2013-11-231-0/+1
* add linux tcp state enumsTimo Teräs2013-11-231-0/+12
* add multicast structures from RFC 3678 to netinet/in.h•••and use _GNU_SOURCE || _BSD_SOURCE guards for all of the RFC 3678 namespace polluting things like glibc/uclibc does. Timo Teräs2013-11-231-1/+42
* timeradd/timersub: cast result to void to get rid of warnings•••previously: timersub(&now, t, &diff); warning: value computed is not used [-Wunused-value] rofl0r2013-11-231-2/+2
* add legacy getloadavg apiSzabolcs Nagy2013-11-211-0/+1
* math: add (obsolete) bsd drem and finite functionsSzabolcs Nagy2013-11-211-0/+6
* write floating point limit constants to 21 significant decimal places•••this is enough to produce the correct value even if the constant is interpreted as 80-bit extended precision, which matters on archs with excess precision (FLT_EVAL_METHOD==2) under at least some interpretations of the C standard. the shorter representations, while correct if converted to the nominal precision at translation time, could produce an incorrect value at extended precision, yielding results such as (double)DBL_MAX != DBL_MAX. Rich Felker2013-11-202-10/+10
* adjust sys/wait.h not to produde errors in strict ISO C feature profile•••siginfo_t is not available from signal.h when the strict ISO C feature profile (e.g. passing -std=c99 to gcc without defining any other feature test macros) is used, but the type is needed to declare waitid. using sys/wait.h (or any POSIX headers) in strict ISO C mode is an application bug, but in the interest of compatibility, it's best to avoid producing gratuitous errors. the simplest fix I could find is suppressing the declaration of waitid (and also signal.h inclusion, since it's not needed for anything else) in this case, while still exposing everything else in sys/wait.h Rich Felker2013-11-091-3/+7
* fix inttypes.h PRI and SCN macros for [u]intptr_t types•••while using "l" unconditionally gave the right behavior due to matching sizes/representations, it was technically UB and produced compiler warnings with format string checking. Rich Felker2013-10-301-11/+13
* POSIX conformance fix: define struct entry in search.hSzabolcs Nagy2013-10-291-1/+1
* add legacy ftime function and sys/timeb.h•••despite being marked legacy, this was specified by SUSv3 as part of the XSI option; only the most recent version of the standard dropped it. reportedly there's actual code using it. Rich Felker2013-10-251-0/+22
* fix multiple minor namespace issues in headers•••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. Rich Felker2013-10-204-7/+15
* 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!=0•••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) Szabolcs Nagy2013-09-271-10/+10
* sys/resource.h: add PRIO_MIN and PRIO_MAX for getpriority and setpriority•••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) Szabolcs Nagy2013-09-161-0/+3
* update include/elf.h following glibc changes•••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 Szabolcs Nagy2013-09-161-27/+143
* sys/socket.h: add new SO_BUSY_POLL socket option•••low latency busy poll sockets are new in linux v3.11 Szabolcs Nagy2013-09-151-0/+1
* ptrace.h: add new ptrace requests to get/set sigmask•••PTRACE_GETSIGMASK and PTRACE_SETSIGMASK were added in linux v3.11 and used by checkpoint/restore tools Szabolcs Nagy2013-09-151-0/+2
* net/if_arp.h: add missing ARP hardware identifiers from linux uapi headers•••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. Szabolcs Nagy2013-09-151-1/+7
* 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 microblaze•••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. Szabolcs Nagy2013-09-151-0/+2
* add workaround header for wait.h remapping to sys/wait.hRich Felker2013-09-011-0/+2
* only expose struct tcphdr under _GNU_SOURCE•••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. Rich Felker2013-08-301-1/+3
* add struct tcphdr in netinet/tcp.hRich Felker2013-08-301-0/+33
* stdbool.h should define __bool_true_false_are_defined even for C++•••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. Rich Felker2013-08-281-2/+2
* add SUN_LEN macro to sys/un.h under appropriate feature tests•••this is ugly and useless, but it seems to be the least-ugly way to provide it... Rich Felker2013-08-211-0/+19
* de-duplicate dn_expand, fix return value and signature, clean up•••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. Rich Felker2013-08-141-1/+1