aboutsummaryrefslogtreecommitdiff
path: root/include (follow)
Commit message (Expand)AuthorAgeFilesLines
* syscall organization overhaul•••now public syscall.h only exposes __NR_* and SYS_* constants and the variadic syscall function. no macros or inline functions, no __syscall_ret or other internal details, no 16-/32-bit legacy syscall renaming, etc. this logic has all been moved to src/internal/syscall.h with the arch-specific parts in arch/$(ARCH)/syscall_arch.h, and the amount of arch-specific stuff has been reduced to a minimum. changes still need to be reviewed/double-checked. minimal testing on i386 and mips has already been performed. Rich Felker2012-09-081-18/+0
* add acct, accept4, setns, and dup3 syscalls (linux extensions)•••based on patch by Justin Cormack Rich Felker2012-09-084-0/+82
* add IPPROTO_HOPOPTS to in.hRich Felker2012-09-081-0/+1
* add IPPROTO_MAX to in.hRich Felker2012-09-081-0/+1
* fix redundant _Noreturn def in err.h•••not sure why this was missed in the earlier commit. Rich Felker2012-09-081-7/+1
* remove all remaining redundant __restrict/__inline/_Noreturn defsRich Felker2012-09-0814-76/+14
* sysmacros major/minor: result should have type unsigned int, not dev_tRich Felker2012-09-081-2/+2
* add linux tee syscallRich Felker2012-09-081-0/+1
* add linux sync_file_range syscallRich Felker2012-09-081-0/+4
* add linux readahead syscallRich Felker2012-09-081-0/+1
* add fallocate (nonstandardized) function•••this is equivalent to posix_fallocate except that it has an extra mode/flags argument to control its behavior, and stores the error in errno rather than returning an error code. Rich Felker2012-09-081-0/+3
* add timerfd interfaces (untested)Rich Felker2012-09-081-0/+18
* add stdnoreturn.h (C11)•••features.h contains the fallback logic for pre-C11 compilers Rich Felker2012-09-081-0/+5
* TCP_* is in the reserved namespace for tcp.h; make use of thatRich Felker2012-09-071-3/+4
* remove unneeded judgemental commentary from ftw.hRich Felker2012-09-071-4/+0
* default features: make musl usable without feature test macros•••the old behavior of exposing nothing except plain ISO C can be obtained by defining __STRICT_ANSI__ or using a compiler option (such as -std=c99) that predefines it. the new default featureset is POSIX with XSI plus _BSD_SOURCE. any explicit feature test macros will inhibit the default. installation docs have also been updated to reflect this change. Rich Felker2012-09-0747-116/+100
* provide loff_t for splice syscall•••so far, this is the only actual use of loff_t i've found. some software, including glib, assumes loff_t must exist if splice exists; this is a reasonable assumption since the official prototype for splice uses loff_t, as it always works with 64-bit offsets regardless of the selected libc off_t size. i'm using #define for now rather than a typedef to make it easy to define in other headers if necessary (like the LFS64 ugliness), but it may be necessary to add it to alltypes.h eventually if other functions end up needing it. Rich Felker2012-09-061-0/+1
* further use of _Noreturn, for non-plain-C functions•••note that POSIX does not specify these functions as _Noreturn, because POSIX is aligned with C99, not the new C11 standard. when POSIX is eventually updated to C11, it will almost surely give these functions the _Noreturn attribute. for now, the actual _Noreturn keyword is not used anyway when compiling with a c99 compiler, which is what POSIX requires; the GCC __attribute__ is used instead if it's available, however. in a few places, I've added infinite for loops at the end of _Noreturn functions to silence compiler warnings. presumably __buildin_unreachable could achieve the same thing, but it would only work on newer GCCs and would not be portable. the loops should have near-zero code size cost anyway. like the previous _Noreturn commit, this one is based on patches contributed by philomath. Rich Felker2012-09-065-9/+37
* add _Noreturn function attribute, with fallback for pre-C11 GNUCRich Felker2012-09-062-5/+19
* dladdr should be available under _BSD_SOURCE as well as _GNU_SOURCERich Felker2012-09-061-1/+1
* use restrict everywhere it's required by c99 and/or posix 2008•••to deal with the fact that the public headers may be used with pre-c99 compilers, __restrict is used in place of restrict, and defined appropriately for any supported compiler. we also avoid the form [restrict] since older versions of gcc rejected it due to a bug in the original c99 standard, and instead use the form *restrict. Rich Felker2012-09-0628-184/+353
* avoid "inline" in public headers for strict c89 compatibility•••while musl itself requires a c99 compiler, some applications insist on being compiled with c89 compilers, and use of "inline" in the headers was breaking them. much of this had been avoided already by just skipping the inline keyword in pre-c99 compilers or modes, but this new unified solution is cleaner and may/should result in better code generation in the default gcc configuration. Rich Felker2012-09-024-27/+22
* fix wrong type for poll.h nfds_t•••this should not break anything since the type should never be used except as the argument type for poll. Rich Felker2012-09-011-1/+1
* dladdr support for dynamic linker (nonstandard extension)•••based on patches submitted by boris brezillon. this commit also fixes the issue whereby the main application and libc don't have the address ranges of their mappings stored, which was theoretically a problem for RTLD_NEXT support in dlsym; it didn't actually matter because libc never calls dlsym, and it seemed to be doing the right thing (by chance) for symbols in the main program as well. Rich Felker2012-08-261-0/+10
* implement "low hanging fruit" from C11•••based on Gregor's patch sent to the list. includes: - stdalign.h - removing gets in C11 mode - adding aligned_alloc and adjusting other functions to use it - adding 'x' flag to fopen for exclusive mode Rich Felker2012-08-253-0/+18
* add c11 quick_exit and at_quick_exit functionsRich Felker2012-08-251-0/+2
* type exposure fixes in sys/sem.hRich Felker2012-08-241-2/+5
* stdio_ext.h needs to include stdio.h, at least to get FILE...Rich Felker2012-08-241-0/+2
* fix missing uintXX_t in nameser.hRich Felker2012-08-241-0/+2
* fix dirent.h with _BSD_SOURCERich Felker2012-08-241-0/+3
* improve headers to better deal with removed-in-posix-2008 features•••with this patch, setting _POSIX_SOURCE, or setting _POSIX_C_SOURCE or _XOPEN_SOURCE to an old version, will bring back the interfaces that were removed in POSIX 2008 - at least the ones i've covered so far, which are gethostby*, usleep, and ualarm. if there are other functions still in widespread use that were removed for which similar changes would be beneficial, they can be added just like this. Rich Felker2012-08-152-13/+22
* add missing xattr functions•••not sure why these were originally omitted.. Rich Felker2012-08-151-0/+3
* math: fix _BSD_SOURCE namespace in math.hnsz2012-08-131-25/+26
* remove significandl•••this function never existed historically; since the float/double functions it's based on are nonstandard and deprecated, there's really no justification for its existence except that glibc has it. it can be added back if there's ever really a need... Rich Felker2012-08-131-1/+0
* add significand[fl] math functionsRich Felker2012-08-131-0/+4
* publicly expose getdents api under _BSD_SOURCERich Felker2012-08-131-0/+7
* add bsd fgetln function•••optimized to avoid allocation and return lines directly out of the stream buffer whenever possible. Rich Felker2012-08-111-0/+4
* fix socket.h on mips•••why does mips have to be gratuitously incompatible in every possible imaginable way? Rich Felker2012-08-051-0/+3
* add ioperm/iopl syscalls•••based on patches by orc and Isaac Dunham, with some fixes. sys/io.h exists and contains prototypes for these functions regardless of whether the target arch has them; this is a bit unorthodox but I don't think it will break anything. the function definitions do not exist unless the appropriate SYS_* syscall number macro is defined, which should make sure configure scripts looking for these functions don't find them on other systems. presently, sys/io.h does not have the inb/outb/etc. port io macros/functions. I'd be surprised if ioperm/iopl are useful without them, so they probably need to be added at some point in appropriate bits/io.h files... Rich Felker2012-07-231-0/+13
* add splice and vmsplice syscalls•••based on patches by orc and Isaac Dunham. Rich Felker2012-07-231-0/+12
* add extended attributes syscalls•••based on patch by orc and Isaac Dunham, with some fixes. Rich Felker2012-07-231-0/+27
* add pipe2 syscall•••based on patch by orc and Isaac Dunham, with some details fixed. Rich Felker2012-07-231-0/+1
* fix namespace issue in prototypes in math.hRich Felker2012-07-221-2/+2
* fix wrong size for sigjmp_buf signal set array•••128 is the size in bytes, not longs. Rich Felker2012-07-221-1/+1
* fix typo in aio.hRich Felker2012-07-191-1/+1
* workaround another sendmsg kernel bug on 64-bit machines•••the kernel wrongly expects the cmsg length field to be size_t instead of socklen_t. in order to work around the issue, we have to impose a length limit and copy to a local buffer. the length limit should be more than sufficient for any real-world use; these headers are only used for passing file descriptors and permissions between processes over unix sockets. Rich Felker2012-07-121-7/+0
* fix redef of sigprocmask constants on mips•••this fix is easier than trying to reorder the header stuff Rich Felker2012-07-121-2/+0
* more mips bits-header fixes•••signal handling was very broken because of this Rich Felker2012-07-121-0/+2
* add prototypes for getw/putwRich Felker2012-07-041-0/+2
* jmp_buf overhaul fixing several issues•••on arm, the location of the saved-signal-mask flag and mask were off by one between sigsetjmp and siglongjmp, causing incorrect behavior restoring the signal mask. this is because the siglongjmp code assumed an extra slot was in the non-sig jmp_buf for the flag, but arm did not have this. now, the extra slot is removed for all archs since it was useless. also, arm eabi requires jmp_buf to have 8-byte alignment. we achieve that using long long as the type rather than with non-portable gcc attribute tags. Rich Felker2012-07-031-1/+5