about summary refs log tree commit diff
path: root/include
Commit message (Collapse)AuthorAgeFilesLines
* dladdr support for dynamic linker (nonstandard extension)Rich Felker2012-08-261-0/+10
| | | | | | | | | 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.
* implement "low hanging fruit" from C11Rich Felker2012-08-253-0/+18
| | | | | | | | 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
* 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 featuresRich Felker2012-08-152-13/+22
| | | | | | | | | 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.
* add missing xattr functionsRich Felker2012-08-151-0/+3
| | | | not sure why these were originally omitted..
* math: fix _BSD_SOURCE namespace in math.hnsz2012-08-131-25/+26
|
* remove significandlRich Felker2012-08-131-1/+0
| | | | | | | 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...
* 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 functionRich Felker2012-08-111-0/+4
| | | | | optimized to avoid allocation and return lines directly out of the stream buffer whenever possible.
* fix socket.h on mipsRich Felker2012-08-051-0/+3
| | | | | why does mips have to be gratuitously incompatible in every possible imaginable way?
* add ioperm/iopl syscallsRich Felker2012-07-231-0/+13
| | | | | | | | | | | | | | | 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...
* add splice and vmsplice syscallsRich Felker2012-07-231-0/+12
| | | | based on patches by orc and Isaac Dunham.
* add extended attributes syscallsRich Felker2012-07-231-0/+27
| | | | based on patch by orc and Isaac Dunham, with some fixes.
* add pipe2 syscallRich Felker2012-07-231-0/+1
| | | | based on patch by orc and Isaac Dunham, with some details fixed.
* fix namespace issue in prototypes in math.hRich Felker2012-07-221-2/+2
|
* fix wrong size for sigjmp_buf signal set arrayRich Felker2012-07-221-1/+1
| | | | 128 is the size in bytes, not longs.
* fix typo in aio.hRich Felker2012-07-191-1/+1
|
* workaround another sendmsg kernel bug on 64-bit machinesRich Felker2012-07-121-7/+0
| | | | | | | | | 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.
* fix redef of sigprocmask constants on mipsRich Felker2012-07-121-2/+0
| | | | this fix is easier than trying to reorder the header stuff
* more mips bits-header fixesRich Felker2012-07-121-0/+2
| | | | signal handling was very broken because of this
* add prototypes for getw/putwRich Felker2012-07-041-0/+2
|
* jmp_buf overhaul fixing several issuesRich Felker2012-07-031-1/+5
| | | | | | | | | | | | | 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.
* replace old and ugly crypt implementationRich Felker2012-06-291-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | the new version is largely the work of Solar Designer, with minor changes for integration with musl. compared to the old code, text size is reduced by about 7k, stack space usage by about 70k, and performance is greatly improved by avoiding expensive calculation of constant tables on each run. this version also adds support for extended des-based password hashes, which allow for unlimited key (password) length and configurable iteration counts. i've also published the interface for crypt_r in a new crypt.h header. especially since this is not a standard interface, i did not feel compelled to match the glibc abi for the crypt_data structure. the glibc structure is way too big to allocate on the stack; in fact it's so big that the first usage may cause the main thread to exceed its pre-committed stack size of 128k and thus could cause the program to crash even on systems with overcommit disabled. the only legitimate use of crypt_data for crypt_r is to store the hash string to return, so i've reserved 256 bytes, which should be more than sufficient (longest known password hashes are ~60 characters, and beyond that is possibly even exceeding some implementations' passwd file field size limit).
* add process_vm_readv and process_vm_writev syscall wrappersRich Felker2012-06-231-0/+9
| | | | based on a patch submitted by Kristian L. <email@thexception.net>
* proper error handling for fcntl F_GETOWN on modern kernelsRich Felker2012-06-201-0/+11
| | | | | | on old kernels, there's no way to detect errors; we must assume negative syscall return values are pgrp ids. but if the F_GETOWN_EX fcntl works, we can get a reliable answer.
* include declarations for new stdio_ext functions (gnulib support)Rich Felker2012-06-191-0/+5
|
* header file fixes: multiple include guard consistency and correctnessRich Felker2012-06-1510-18/+18
| | | | | | | one file was reusing another file's macro name, and many had inconsistent underscores and application of SYS prefix, etc. patch by Szabolcs Nagy (nsz)
* revert one change in time.h; no evidence BSD_SOURCE should expose these..Rich Felker2012-06-131-1/+1
|
* fix feature test macros in time.hRich Felker2012-06-131-5/+2
| | | | | stime is not _XOPEN_SOURCE, and some functions were missing with _BSD_SOURCE..
* add timegm function (inverse of gmtime), nonstandardRich Felker2012-06-131-0/+3
|
* add (currently stubbed due to stubbed strverscmp) versionsort functionRich Felker2012-06-131-0/+5
| | | | | | | | | | | based on patch by Emil Renner Berthing, with minor changes to dirent.h for LFS64 and organization of declarations this code should work unmodified once a real strverscmp is added, but I've been hesitant to add it because the GNU strverscmp behavior is harmful in a lot of cases (for instance if you have numeric filenames in hex). at some point I plan on trying to design a variant of the algorithm that behaves better on a mix of filename styles.
* fix signedness errors in stdint.h constant macrosRich Felker2012-06-081-2/+2
| | | | | the types of these expressions must match the integer promotions. unsigned 8- and 16-bit values promote to signed int, not unsigned int.
* fix sysinfo, try 2. it seems to work this time.Rich Felker2012-06-071-10/+10
|
* sysinfo struct was utter nonsense; no idea where it came from.Rich Felker2012-06-071-4/+3
| | | | | this broke the busybox "free" utility (memory reporting) and possibly other things like uptime.
* _GNU_SOURCE is supposed to imply _LARGEFILE64_SOURCERich Felker2012-06-0415-15/+15
| | | | | | | | | this is ugly and stupid, but now that the *64 symbol names exist, a lot of broken GNU software detects them in configure, then either breaks during build due to missing off64_t definition, or attempts to compile without function declarations/prototypes. "fixing" it here is easier than telling everyone to add yet another feature test macro to their builds.
* declare environ in unistd.h when _GNU_SOURCE feature test macro is usedRich Felker2012-06-021-0/+1
| | | | | lots of broken programs expect this, and it's gotten to the point of being a troubleshooting FAQ topic. best to just fix it.
* there is no such GNU function fpurge, only __fpurge.Rich Felker2012-05-281-1/+0
| | | | no idea where I got the idea fpurge should exist...
* add prototype for BSD/GNU stdio *_unlocked extension functionsRich Felker2012-05-281-2/+12
| | | | also fix up distinction of what is GNU-only and what's GNU+BSD
* remove duplicate lfs64 cruft in stdio.hRich Felker2012-05-281-2/+0
|
* math: fix nextafter definition in tgmath.hnsz2012-05-281-1/+1
|
* debloat jmp_buf in _GNU_SOURCE modeRich Felker2012-05-231-3/+0
| | | | | | | | i originally made it the same size as the bloated GNU version, which contains space for saved signal mask, but this makes some structures containing jmp_buf become much larger for no benefit. we will never use the signal mask field with plain setjmp; sigsetjmp serves that purpose.
* remove everything related to forkallRich Felker2012-05-221-1/+0
| | | | | | | | | | i made a best attempt, but the intended semantics of this function are fundamentally contradictory. there is no consistent way to handle ownership of locks when forking a multi-threaded process. the code could have worked by accident for programs that only used normal mutexes and nothing else (since they don't actually store or care about their owner), but that's about it. broken-by-design interfaces that aren't even in glibc (only solaris) don't belong in musl.
* some feature test fixes for unistd.hRich Felker2012-05-221-16/+16
|
* _GNU_SOURCE implies all BSD features except ones GNU rejectsRich Felker2012-05-221-1/+1
|
* various header cleanups, some related to _BSD_SOURCE additionRich Felker2012-05-223-17/+9
| | | | | | there is no reason to avoid multiple identical macro definitions; this is perfectly legal C, and even with the maximal warning options enabled, gcc does not issue any warning for it.