about summary refs log tree commit diff
path: root/include
Commit message (Collapse)AuthorAgeFilesLines
* add bits/hwcap.h and include it in sys/auxv.hSzabolcs Nagy2016-10-201-0/+1
| | | | | | | | | aarch64, arm, mips, mips64, mipsn32, powerpc, powerpc64 and sh have cpu feature bits defined in linux for AT_HWCAP auxv entry, so expose those in sys/auxv.h it seems the mips hwcaps were never exposed to userspace neither by linux nor by glibc, but that's most likely an oversight.
* elf.h: update EM_ elf machine defines and add R_BPF_ definesSzabolcs Nagy2016-10-201-1/+101
| | | | | | | | sync with gabi: http://www.sco.com/developers/gabi/latest/ch4.eheader.html EM_BPF is new in linux v4.8 and officially assigned: https://lists.iovisor.org/pipermail/iovisor-dev/2016-June/000266.html added related relocs too.
* add ETH_P_NCSI to netinet/if_ether.h from linux v4.8Szabolcs Nagy2016-10-201-0/+1
| | | | see linux commit 6389eaa7fa9c3ee6c7d39f6087b86660d17236ac
* fix undefined behavior in sched.h cpu_set_t usageRich Felker2016-09-191-3/+3
| | | | | | | | | | | since cpu sets can be dynamically allocated and have variable size, accessing their contents via ->__bits is not valid; performing pointer arithmetic outside the range of the size of the declared __bits array results in undefined beahavior. instead, only use cpu_set_t for fixed-size cpu set objects (instantiated by the caller) and as an abstract pointer type for dynamically allocated ones. perform all accesses simply by casting the abstract pointer type cpuset_t * back to unsigned long *.
* add missing *_unlocked and wcsftime_l prototypes to wchar.hDaniel Sabogal2016-09-161-0/+15
| | | | these functions had been implemented, but prototypes were not made available
* fix ifru_data and ifcu_buf types in net/if.hDaniel Sabogal2016-09-161-2/+2
| | | | | glibc, freebsd, and openbsd use character pointers (caddr_t) for these fields. only linux uses void pointer for the ifru_data type.
* restore _Noreturn to __assert_failRich Felker2016-08-301-1/+1
| | | | | | | | | | | | this reverts commit 2c1f8fd5da3306fd7c8a2267467e44eb61f12dd4. without the _Noreturn attribute, the compiler cannot use asserts to perform reachability/range analysis. this leads to missed optimizations and spurious warnings. the original backtrace problem that prompted the removal of _Noreturn was not clearly documented at the time, but it seems to happen only when libc was built without -g, which also breaks many other backtracing cases.
* fix FFSYNC by changing it to O_SYNCDuncan Overbruck2016-08-301-1/+1
| | | | O_FSYNC was never defined and is legacy/wrong, nothing seems to use it.
* add SS_AUTODISARM sigaltstack ss_flags from linux v4.7 to signal.hSzabolcs Nagy2016-08-301-0/+2
| | | | | only matters if swapcontext is used in a signal handler running on an altstack, new in linux commit 2a74213838104a41588d86fd5e8d344972891ace
* add UDP_ENCAP_GTP0, UDP_ENCAP_GTP1U from linux v4.7 to netinet/udp.hSzabolcs Nagy2016-08-301-0/+2
| | | | | for GPRS tunneling protocol, new in linux commit 459aa660eb1d8ce67080da1983bb81d716aa5a69
* add PF_QIPCRTR, AF_QIPCRTR from linux v4.7 to sys/socket.hSzabolcs Nagy2016-08-301-1/+3
| | | | | macros for qualcom ip router protocol, new in linux commit bdabad3e363d825ddf9679dd431cca0b2c30f881
* add stdc-predef.h for library-level predefined macrosRich Felker2016-07-031-0/+10
| | | | | | | | | | | modern compilers (for gcc, versions 4.8 and later) automatically pre-include <stdc-predef.h> to obtain the values of certain predefined macros specified by ISO C but which reflect properties of the library implementation, not just the compiler. provide values indicating that wchar_t is Unicode-encoded and that Annex F (IEEE floating point) is supported unless the compiler indicates otherwise. based on patch by Masanori Ogino.
* make brace placement in public header typedef'd structs consistentRich Felker2016-07-033-16/+8
| | | | | | commit befa5866ee30d09c0c96e88af2eabff5911342ea performed this change for struct definitions that did not also involve typedef, but omitted the latter.
* add EF_SH_ sh specific macros to elf.hSzabolcs Nagy2016-07-031-1/+22
| | | | | last time elf.h was thoroughly updated sh was not yet supported so these processor specific e_flags were missing.
* add NT_ARM_SYSTEM_CALL to elf.hSzabolcs Nagy2016-07-031-0/+1
| | | | new regset in linux v3.18 for ptrace.
* add missing x86 relocs to elf.hSzabolcs Nagy2016-07-031-2/+5
| | | | | see https://sourceware.org/ml/libc-alpha/2016-01/msg00822.html
* add DT_MIPS_RLD_MAP_REL to elf.hSzabolcs Nagy2016-07-031-1/+2
| | | | marks different RLD_MAP for debugging PIE binaries.
* add SHF_COMPRESSED section flag to elf.hSzabolcs Nagy2016-07-031-0/+23
| | | | | following http://www.sco.com/developers/gabi/latest/ch4.sheader.html
* add powerpc tls optimization related definitions to elf.hSzabolcs Nagy2016-07-031-2/+6
| | | | | see https://sourceware.org/ml/libc-alpha/2015-03/msg00580.html
* add nios2 definitions to elf.hSzabolcs Nagy2016-07-031-0/+50
|
* update elf.h with mips abi flags supportSzabolcs Nagy2016-07-031-1/+70
| | | | | following https://sourceware.org/ml/libc-alpha/2014-05/msg00332.html
* update elf.h with new aarch64 relocsSzabolcs Nagy2016-07-031-1/+13
| | | | | add ilp32 related relocs and alternative names for a few macros following https://sourceware.org/ml/libc-alpha/2014-11/msg00455.html
* update elf.h with powerpc64 elfv2 abi related macrosSzabolcs Nagy2016-07-031-2/+8
| | | | | | see https://sourceware.org/ml/libc-alpha/2013-11/msg00315.html https://sourceware.org/ml/libc-alpha/2013-11/msg00314.html
* add new powerpc64 relocations to elf.hSzabolcs Nagy2016-07-031-0/+9
| | | | | following the corresponding binutils and glibc changes https://sourceware.org/ml/binutils/2013-10/msg00372.html
* add EM_OPENRISC again to elf.hSzabolcs Nagy2016-07-031-0/+1
| | | | | | | | | it was changed to EM_OR1K in 200d15479c0bc48471ee7b8e538ce33af990f82e as that was meant to be the official name, but glibc and the latest gabi spec still uses the EM_OPENRISC name: http://www.sco.com/developers/gabi/latest/ch4.eheader.html binutils defines both macros so we should do the same for backward compatibility.
* make brace placement in public header struct definitions consistentRich Felker2016-07-0324-92/+46
| | | | | | | | | | | | | | placing the opening brace on the same line as the struct keyword/tag is the style I prefer and seems to be the prevailing practice in more recent additions. these changes were generated by the command: find include/ arch/*/bits -name '*.h' \ -exec sed -i '/^struct [^;{]*$/{N;s/\n/ /;}' {} + and subsequently checked by hand to ensure that the regex did not pick up any false positives.
* fix misplaced indention in sys/procfs.hRich Felker2016-07-031-1/+1
|
* pthread: implement try/timed join variantsBobby Bingham2016-06-301-0/+2
|
* add RUSAGE_THREAD (Linux extension) definition to sys/resource.hRich Felker2016-06-291-0/+1
|
* fix incorrect definition of RUSAGE_CHILDREN in sys/resource.hRich Felker2016-06-291-1/+1
| | | | | | the kernel ABI value for RUSAGE_CHILDREN is -1, not 1. the latter is actually interpreted as RUSAGE_THREAD, to obtain values for just the calling thread and not the whole process.
* avoid padding gaps in struct sockaddr_storageRich Felker2016-06-091-1/+1
| | | | | | | | | | | | | | | | | compilers are free not to copy, or in some cases to clobber, padding bytes in a structure. while it's an aliasing violation, and thus undefined behavior, to copy or manipulate other sockaddr types using sockaddr_storage, it seems likely that traditional code attempts to do so, and the original intent of the sockaddr_storage structure was probably to allow such usage. in the interest of avoiding silent and potentially dangerous breakage, ensure that there are no actual padding bytes in sockaddr_storage by moving and adjusting the size of the __ss_padding member so that it fits exactly. this change also removes a silent assumption that the alignment of long is equal to its size.
* update sys/socket.h to linux v4.6Szabolcs Nagy2016-06-091-1/+19
| | | | | | | | | | | | kernel connection multiplexor macros AF_KCM, PF_KCM, SOL_KCM were added in linux commit ab7ac4eb9832e32a09f4e8042705484d2fb0aad3 MSG_BATCH sendmsg flag for performance optimization was added in linux commit f092276d85b82504e8a07498f4e9e0c51f06745c SOL_* macros are now synced with linux socket.h which is not a uapi header and glibc did not have the macros either, but that has changed http://sourceware.org/ml/libc-alpha/2016-05/msg00322.html
* add new tcp_info fields from linux v4.6Szabolcs Nagy2016-06-091-0/+4
| | | | | | new fields and associated linux commit: tcpi_notsent_bytes, tcpi_min_rtt cd9b266095f422267bddbec88f9098b48ea548fc tcpi_data_segs_in, tcpi_data_segs_out a44d6eacdaf56f74fad699af7f4925a5f5ac0e7f
* add CLONE_NEWCGROUP clone flag, new in linux v4.6Szabolcs Nagy2016-06-091-0/+1
| | | | | flag for new cgroup namespace, added in linux commit 5e2bec7c2248ae27c5b16cd97215ae05c1d39179
* update siginfo struct for linux v4.6Szabolcs Nagy2016-06-091-6/+11
| | | | | x86 protection key faults are reported in the si_pkey field, added in linux commit cd0ea35ff5511cde299a61c21a95889b4a71464e
* add ETH_P_MACSEC netinet/if_ether.h, new in linux v4.6Szabolcs Nagy2016-06-091-0/+1
| | | | | ethertype for macsec added in linux commit dece8d2b78d19df7fe5e4e965f1f0d1a3e188d1b
* add SO_CNX_ADVICE to sys/socket.h, new in linux v4.6Szabolcs Nagy2016-06-091-0/+1
| | | | | | new socket option so application can give advice about routing path quality of connected udp sockets, added in linux commit a87cb3e48ee86d29868d3f59cfb9ce1a8fa63314
* fix undefined pointer arithmetic in CMSG_NXTHDR macroRich Felker2016-05-221-3/+3
| | | | | | | | previously, the only way the stopping condition could be met with correct lengths in the headers invoked undefined behavior, adding sizeof(struct cmsghdr) beyond the end of the cmsg buffer. instead, compute and compare sizes rather than pointers.
* add MADV_FREE madvise command from linux v4.5Szabolcs Nagy2016-03-191-0/+1
| | | | | | allows the os to free the marked pages lazily on memory pressure. expected to increase malloc performance. new in linux commit 854e9ed09dedf0c19ac8640e91bcc74bc3f9e5c9
* add EPOLLEXCLUSIVE epoll flag from linux v4.5Szabolcs Nagy2016-03-191-0/+1
| | | | | | new flag for exclusive wakeup mode when an event source fd is attached to multiple epoll fds but they should not all receive the events. new in linux commit df0108c5da561c66c333bb46bfe3c1fc65905898
* add SO_ATTACH_REUSEPORT_[CE]BPF socket options from linux v4.5Szabolcs Nagy2016-03-191-1/+2
| | | | | | new socket options for setting classic or extended BPF program for sockets in a SO_REUSEPORT group. added in linux commit 538950a1b7527a0a52ccd9337e3fcd304f027f13
* add IPV6_HDRINCL socket option from linux v4.5Szabolcs Nagy2016-03-191-0/+1
| | | | | new in linux commit 715f504b118998c41a2079a17e16bf5a8a114885 same as IP_HDRINCL but for SOL_IPV6 sockets.
* deduplicate bits/mman.hSzabolcs Nagy2016-03-181-0/+59
| | | | | | | | | | | currently five targets use the same mman.h constants and the rest share most constants too, so move them to sys/mman.h before the bits/mman.h include where the differences can be corrected by redefinition of the macros. this fixes two minor bugs: POSIX_MADV_DONTNEED was wrong on most targets (it should be the same as MADV_DONTNEED), and sh defined the x86-only MAP_32BIT mmap flag.
* add sched_getcpuNathan Zadoks2016-03-021-0/+1
| | | | | This is a GNU extension, but a fairly minor one, for a system call that otherwise has no libc wrapper.
* do not define static_assert macro for pre-C11 compilersRich Felker2016-02-121-1/+1
| | | | | | some software simply uses static_assert if the macro is defined, and this breaks if the compiler does not recognize the _Static_assert keyword used to define it.
* add declarations for utmpname/utmpxname to appropriate headersRich Felker2016-02-122-1/+2
| | | | | | | commit 378f8cb5222b63e4f8532c757ce54e4074567e1f added these functions (as stubs) but left them without declarations. this broke some autoconf based software that detected linkability of the symbols but didn't check for a declaration.
* fix siginfo_t for mipsSzabolcs Nagy2016-01-261-0/+4
| | | | | | | | si_errno and si_code are swapped in mips siginfo_t compared to other archs and some si_code values are different. This fix is required for POSIX timers to work. based on patch by Dmitry Ivanov.
* move bits/signal.h include close to the top of signal.hSzabolcs Nagy2016-01-261-6/+12
| | | | | | | | only have code above the bits/signal.h include that is necessary. (some types are used for the ucontext struct and mips has to override a few macro definitions) this way mips bits/signal.h will be able to affect siginfo_t.
* add new PTRACE_SECCOMP_GET_FILTER ptrace commandSzabolcs Nagy2016-01-261-0/+1
| | | | | allows the tracer to dump the bpf seccomp filters of the tracee, new in linux v4.4, commit f8e529ed941ba2bbcbf310b575d968159ce7e895
* add MCL_ONFAULT and MLOCK_ONFAULT mlockall and mlock2 flagsSzabolcs Nagy2016-01-261-0/+1
| | | | | | | | they lock faulted pages into memory (useful when a small part of a large mapped file needs efficient access), new in linux v4.4, commit b0f205c2a3082dd9081f9a94e50658c5fa906ff1 MLOCK_* is not in the POSIX reserved namespace for sys/mman.h