about summary refs log tree commit diff
path: root/include
Commit message (Collapse)AuthorAgeFilesLines
* add sched_{get,set}attr syscall numbers and SCHED_DEADLINE macroSzabolcs Nagy2014-05-301-0/+1
| | | | | | | | | | | | linux 3.14 introduced sched_getattr and sched_setattr syscalls in commit d50dde5a10f305253cbc3855307f608f8a3c5f73 and the related SCHED_DEADLINE scheduling policy in commit aab03e05e8f7e26f51dee792beddcb5cca9215a5 but struct sched_attr "extended scheduling parameters data structure" is not yet exported to userspace (necessary for using the syscalls) so related uapi definitions are not added yet.
* overhaul siginfo_t definition in signal.hRich Felker2014-05-241-23/+28
| | | | | | | | | | | | | | | | | | the main motivation for this change is that, with the previous definition, it was arguably illegal, in standard C, to initialize both si_value and si_pid/si_uid with designated initializers, due to the rule that only one member of a union can have an initializer. whether or not this affected real-world application code, it affected some internal code, and clang was producing warnings (and possibly generating incorrect code). the new definition uses a more complex hierarchy of structs and unions to avoid the need to initialize more than one member of a single union in usage cases that make sense. further work would be needed to eliminate even the ones with no practical applications. at the same time, some fixes are made to the exposed names for nonstandard fields, to match what software using them expects.
* remove unsupported nonstandard sysconf macros and their table entriesRich Felker2014-05-191-60/+0
| | | | | | | | | | | | | | | | | | | | | | some of these may have been from ancient (pre-SUSv2) POSIX versions; more likely, they were from POSIX drafts or glibc interpretations of what ancient versions of POSIX should have added (instead they made they described functionality mandatory and/or dropped it completely). others are purely glibc-isms, many of them ill-thought-out, like providing ways to lookup the min/max values of types at runtime (despite the impossibility of them changing at runtime and the impossibility of representing ULONG_MAX in a return value of type long). since our sysconf implementation does not support or return meaningful values for any of these, it's harmful to have the macros around; applications' build scripts may detect and attempt to use them, only to get -1/EINVAL as a result. if removing them does break some applications, and it's determined that the usage was reasonable, some of these could be added back on an as-needed basis, but they should return actual meaningful values, not junk like they were returning before.
* expose public execvpe interfaceM Farkas-Dyck2014-04-201-0/+1
|
* fix RLIMIT_ constants for mipsSzabolcs Nagy2014-04-151-2/+5
| | | | | | | The mips arch is special in that it uses different RLIMIT_ numbers than other archs, so allow bits/resource.h to override the default RLIMIT_ numbers (empty on all archs except mips). Reported by orc.
* add getauxval functionRich Felker2014-04-071-0/+16
| | | | | | | in a sense this implementation is incomplete since it doesn't provide the HWCAP_* macros for use with AT_HWCAP, which is perhaps the most important intended usage case for getauxval. they will be added at a later time.
* implement hcreate_r, hdestroy_r and hsearch_rsin2014-04-021-0/+12
| | | | | | | | | | the size and alignment of struct hsearch_data are matched to the glibc definition for binary compatibility. the members of the structure do not match, which should not be a problem as long as applications correctly treat the structure as opaque. unlike the glibc implementation, this version of hcreate_r does not require the caller to zero-fill the structure before use.
* fix signal.h breakage from moving stack_t to arch-specific bitsRich Felker2014-03-181-0/+2
| | | | | | in the previous changes, I missed the fact that both the prototype of the sigaltstack function and the definition of ucontext_t depend on stack_t.
* move signal.h definition of stack_t to arch-specific bitsRich Felker2014-03-181-6/+0
| | | | | it's different at least on mips. mips version will be fixed in a separate commit to show the change.
* move struct semid_ds to from shared sys/sem.h to bitsRich Felker2014-03-111-16/+1
| | | | | | | | | | | | the definition was found to be incorrect at least for powerpc, and fixing this cleanly requires making the definition arch-specific. this will allow cleaning up the definition for other archs to make it more specific, and reversing some of the ugliness (time_t hacks) introduced with the x32 port. this first commit simply copies the existing definition to each arch without any changes. this is intentional, to make it easier to review changes made on a per-arch basis.
* math.h: make __FLOAT_BITS and __DOUBLE_BITS C89Szabolcs Nagy2014-03-091-2/+4
| | | | | Remove non-constant aggregate initializer. (Still using long long, but that is supported by ancient compilers without __extension__ anyway).
* in sys/procfs.h, avoid using __WORDSIZE macroRich Felker2014-03-081-1/+1
| | | | | | | this was problematic because several archs don't define __WORDSIZE. we could add it, but I would rather phase this macro out in the long term. in our version of the headers, UINTPTR_MAX is available here, so just use it instead.
* in.h: new IP_MTU_DISCOVER mode IP_PMTUDISC_INTERFACESzabolcs Nagy2014-02-251-0/+1
| | | | | introduced in linux v3.13, 482fc6094afad572a4ea1fd722e7b11ca72022a0 to mitigate dns cache poisoning via fragmentation
* if_ether.h: new ethernet protocol typeSzabolcs Nagy2014-02-251-0/+1
| | | | | for High-availability Seamless Redundancy (HSR) specified in IEC 62439-3 new in linux v3.13, f421436a591d34fa5279b54a96ac07d70250cc8d
* sys/socket.h: add the SO_MAX_PACING_RATE SOL_SOCKET optionSzabolcs Nagy2014-02-251-0/+1
| | | | introduced in linux v3.13, 62748f32d501f5d3712a7c372bbb92abc7c62bc7
* elf.h: add aarch64 relocationsSzabolcs Nagy2014-02-251-0/+111
|
* elf.h: new elf header flag to mark 2008-NaN vs legacy-NaN on mipsSzabolcs Nagy2014-02-251-0/+1
| | | | see glibc commit 9c21573c02446b3d5cf6a34b67c8545e5be6a600
* sys/shm.h: move arch specific structs to bits/rofl0r2014-02-231-16/+7
|
* sys/sem.h: cheat and make all longs use time_t insteadrofl0r2014-02-221-8/+8
| | | | | most of the members should be time_t anyway, and time_t has the correct semantics for "syscall_long", so it works on all archs, even x32.
* add flock64 alias for (struct) flock in fcntl.hRich Felker2014-02-181-0/+1
| | | | | this was a missing part of the LFS64 API; it's "needed" for use with fcntl and the corresponding lock commands.
* add parens when bit and arith ops are mixed in macros in public headersSzabolcs Nagy2014-02-112-2/+2
| | | | | another commit to silence gcc warnings (-Wparentheses) for standard headers. changed macros: LOG_UPTO, IN6_ARE_ADDR_EQUAL
* fix signed and unsigned comparision in macros in public headersSzabolcs Nagy2014-02-113-3/+3
| | | | | | gcc -Wsign-compare warns about expanded macros that were defined in standard headers (before gcc 4.8) which can make builds fail that use -Werror. changed macros: WIFSIGNALED, __CPU_op_S
* reduce namespace pollution in netinet/udp.hRich Felker2014-02-051-7/+10
| | | | | | | | | | | the affected part of the header is responsible for providing both GNU and BSD versions of the udphdr structure. previously, the namespace-polluting GNU names were always used for the actual struct members, and the BSD names, which are named in a manner resembling a sane namespace, were always macros defined to expand to the GNU names. now, unless _GNU_SOURCE is defined, the BSD names are used as the actual structure members, and the macros and GNU names only come into play when the application requests them.
* fix use of legacy u_intN_t types in netinet/tcp.hRich Felker2014-02-051-73/+74
| | | | | | policy is to avoid using these types except where they are needed for namespace conformance. C99-style stdint.h types should be used instead.
* add support for BSD struct tcphdr in netinet/tcp.hRich Felker2014-02-051-4/+41
| | | | | | | | | | | | | there are two versions of this structure: the BSD version and the GNU version. previously only the GNU version was supported. the only way to support both simultaneously is with an anonymous union, which was a nonstandard extension prior to C11, so some effort is made to avoid breakage with compilers which do not support anonymous unions. this commit is based on a patch by Timo Teräs, but with some changes. in particular, the GNU version of the structure is not exposed unless _GNU_SOURCE is defined; this both avoids namespace pollution and dependency on anonymous unions in the default feature profile.
* add nonstandard timespec/timeval conversion macros in sys/time.hRich Felker2014-02-051-0/+11
| | | | | | | | these are poorly designed (illogical argument order) and even poorly implemented (brace issues) on glibc, but unfortunately some software is using them. we could consider removing them again in the future at some point if they're documented as deprecated, but for now the simplest thing to do is just to provide them under _GNU_SOURCE.
* add NO_ADDRESS macro to netdb.h as an alias for NO_DATATimo Teräs2014-02-051-0/+1
| | | | | | | | some applications expect it to be defined, despite the standard making it impossible for it to ever be returned as a value distinct from NO_DATA. since these macros are outside the scope of the current standards, no special effort is made to hide NO_ADDRESS under conditions where the others are exposed.
* fix namespace violation in sys/shm.hRich Felker2014-01-081-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.
* fix namespace violations in utmpx.hRich Felker2014-01-082-5/+12
|
* fix remaining known namespace violations for netinet/in.hRich Felker2014-01-082-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.
* fix const-correctness of argument to stimeRich Felker2014-01-071-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.
* fix signedness of pgoff argument to remap_file_pagesRich Felker2014-01-071-1/+1
| | | | | both the kernel and glibc agree that this argument is unsigned; the incorrect type ssize_t came from erroneous man pages.
* fix const-correctness in sigandset/sigorset argumentsRich Felker2014-01-071-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.
* remove sys/sysctl.hRich Felker2014-01-071-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.
* fix incorrect type for wd argument of inotify_rm_watchRich Felker2014-01-071-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.
* fix argument types for legacy function inet_makeaddrRich Felker2014-01-061-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.
* const-qualify the address argument to dladdrRich Felker2014-01-061-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.
* 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_siginfoTimo Teräs2013-12-291-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.
* implement legacy function herrorRich Felker2013-12-201-0/+1
| | | | based on patch by Timo Teräs; greatly simplified to use fprintf.
* add sys/quota.h and quotactl syscall wrapperRich Felker2013-12-201-0/+104
| | | | based on patch by Timo Teräs.
* add netinet/igmp.h and multicast groups to netinet/in.hRich Felker2013-12-202-0/+50
| | | | based on patch by Timo Teräs.
* 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 POSIXRich Felker2013-12-061-0/+3
| | | | | this is purely a wrapper for close since Linux does not support EINTR semantics for the close syscall.
* 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.hSzabolcs Nagy2013-12-041-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.
* 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
|