summaryrefslogtreecommitdiff
path: root/include
AgeCommit message (Collapse)AuthorLines
2014-01-08fix namespace violation in sys/shm.hRich Felker-6/+8
in fixing this, I've changed the logic from ugly #if/#else blocks inside the struct shm_info definition to a fixed struct definition and optional macros to rename the elements. this will be helpful if we need to move shm_info to a bits header in the future, as it will keep the feature test logic out of bits.
2014-01-08fix namespace violations in utmpx.hRich Felker-5/+12
2014-01-08fix remaining known namespace violations for netinet/in.hRich Felker-22/+18
the imr_, imsf_, ip6_, ip6m_, ipi_, ipi6_, SCM_, and SOL_ prefixes are not in the reserved namespace for this header. thus the constants and structures using them need to be protected under appropriate feature test macros. this also affects some headers which are permitted to include netinet/in.h, particularly netdb.h and arpa/inet.h. the SOL_ macros are moved to sys/socket.h where they are in the reserved namespace (SO*). they are still accessible via netinet/in.h since it includes sys/socket.h implicitly (which is permitted). the SCM_SRCRT macro is simply removed, since the definition used for it, IPV6_RXSRCRT is not defined anywhere. it could be re-added, this time in sys/socket.h, if the appropriate value can be determined; however, given that the erroneous definition was not caught, it is unlikely that any software actually attempts to use SCM_SRCRT.
2014-01-07fix const-correctness of argument to stimeRich Felker-1/+1
it's unclear what the historical signature for this function was, but semantically, the argument should be a pointer to const, and this is what glibc uses. correct programs should not be using this function anyway, so it's unlikely to matter.
2014-01-07fix signedness of pgoff argument to remap_file_pagesRich Felker-1/+1
both the kernel and glibc agree that this argument is unsigned; the incorrect type ssize_t came from erroneous man pages.
2014-01-07fix const-correctness in sigandset/sigorset argumentsRich Felker-2/+2
this change is consistent with the corresponding glibc functions and is semantically const-correct. the incorrect argument types without const seem to have been taken from erroneous man pages.
2014-01-07remove sys/sysctl.hRich Felker-17/+0
this functionality has essentially always been deprecated in linux, and was never supported by musl. the presence of the header was reported to cause some software to attempt to use the nonexistant function, so removing the header is the cleanest solution.
2014-01-07fix incorrect type for wd argument of inotify_rm_watchRich Felker-1/+1
this was wrong since the original commit adding inotify, and I don't see any explanation for it. not even the man pages have it wrong. it was most likely a copy-and-paste error.
2014-01-06fix argument types for legacy function inet_makeaddrRich Felker-1/+1
the type int was taken from seemingly erroneous man pages. glibc uses in_addr_t (uint32_t), and semantically, the arguments should be unsigned.
2014-01-06const-qualify the address argument to dladdrRich Felker-1/+1
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.
2014-01-06add some missing LFS64 aliases for fadvise/fallocate functionsRich Felker-0/+1
2014-01-02add fanotify syscall wrapper and headerrofl0r-0/+73
2013-12-29fix struct signalfd_siginfoTimo Teräs-2/+3
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.
2013-12-20implement legacy function herrorRich Felker-0/+1
based on patch by Timo Teräs; greatly simplified to use fprintf.
2013-12-20add sys/quota.h and quotactl syscall wrapperRich Felker-0/+104
based on patch by Timo Teräs.
2013-12-20add netinet/igmp.h and multicast groups to netinet/in.hRich Felker-0/+50
based on patch by Timo Teräs.
2013-12-20add TCP_INFO and TCP_MD5SIG socket option related structuresTimo Teräs-0/+58
2013-12-06add posix_close, accepted for inclusion in the next issue of POSIXRich Felker-0/+3
this is purely a wrapper for close since Linux does not support EINTR semantics for the close syscall.
2013-12-04move struct ucred under _GNU_SOURCE in sys/socket.h for clean posix namespaceSzabolcs Nagy-0/+2
2013-12-04fix SHUT_WR typo in sys/socket.h and duplicate definitions of SHUT_*Szabolcs Nagy-5/+1
2013-12-04fix res_mkquery and res_send prototypes in resolv.hSzabolcs Nagy-4/+2
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.
2013-12-03remove duplicate definition of _PATH_LASTLOG in paths.hRich Felker-1/+0
2013-12-02remove now-unnecessary features.h inclusion from fnmatch.hRich Felker-2/+0
2013-12-02expose FNM_* extensions in fnmatch.h without _GNU_SOURCERich Felker-3/+0
at least a couple of these are used on BSD too, and the FNM_* namespace is reserved in fnmatch.h anyway.
2013-11-29increase TTY_NAME_MAX limit to 32Rich Felker-1/+1
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.
2013-11-26adjust fallback INFINITY definition for FLT_EVAL_METHOD==2 caseRich Felker-1/+1
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.
2013-11-24restore type of NULL to void * except when used in C++ programsRich Felker-0/+33
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.)
2013-11-24Fix dn_comp prototype and add stubMichael Forney-1/+1
This function is used by ping6 from iputils.
2013-11-24use 0 instead of NULL in headers where NULL is not definedSzabolcs Nagy-3/+3
some macros in sys/mtio.h and syslog.h used NULL without defining it
2013-11-23add TCP_NOTSENT_LOWAT tcp socket option, new in linux v3.12Szabolcs Nagy-0/+1
2013-11-23add linux tcp state enumsTimo Teräs-0/+12
2013-11-23add multicast structures from RFC 3678 to netinet/in.hTimo Teräs-1/+42
and use _GNU_SOURCE || _BSD_SOURCE guards for all of the RFC 3678 namespace polluting things like glibc/uclibc does.
2013-11-23timeradd/timersub: cast result to void to get rid of warningsrofl0r-2/+2
previously: timersub(&now, t, &diff); warning: value computed is not used [-Wunused-value]
2013-11-21add legacy getloadavg apiSzabolcs Nagy-0/+1
2013-11-21math: add (obsolete) bsd drem and finite functionsSzabolcs Nagy-0/+6
2013-11-20write floating point limit constants to 21 significant decimal placesRich Felker-10/+10
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.
2013-11-09adjust sys/wait.h not to produde errors in strict ISO C feature profileRich Felker-3/+7
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
2013-10-30fix inttypes.h PRI and SCN macros for [u]intptr_t typesRich Felker-11/+13
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.
2013-10-29POSIX conformance fix: define struct entry in search.hSzabolcs Nagy-1/+1
2013-10-25add legacy ftime function and sys/timeb.hRich Felker-0/+22
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.
2013-10-20fix multiple minor namespace issues in headersRich Felker-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.
2013-10-18use consistent include guard name in arpa/ftp.hSzabolcs Nagy-2/+2
2013-10-18fix typo in socket.h (wrong macro name)Szabolcs Nagy-1/+1
2013-10-07fix clockid macro names in time.h, reported by Paul SchutteSzabolcs Nagy-2/+2
2013-09-27math: fix comparision macros (isless etc) when FLT_EVAL_METHOD!=0Szabolcs Nagy-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)
2013-09-16sys/resource.h: add PRIO_MIN and PRIO_MAX for getpriority and setprioritySzabolcs Nagy-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)
2013-09-16update include/elf.h following glibc changesSzabolcs Nagy-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
2013-09-15sys/socket.h: add new SO_BUSY_POLL socket optionSzabolcs Nagy-0/+1
low latency busy poll sockets are new in linux v3.11
2013-09-15ptrace.h: add new ptrace requests to get/set sigmaskSzabolcs Nagy-0/+2
PTRACE_GETSIGMASK and PTRACE_SETSIGMASK were added in linux v3.11 and used by checkpoint/restore tools
2013-09-15net/if_arp.h: add missing ARP hardware identifiers from linux uapi headersSzabolcs Nagy-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.