summaryrefslogtreecommitdiff
path: root/libgcompat
AgeCommit message (Collapse)AuthorFilesLines
2018-01-15pwd: Fully implement fgetpwent_r/getpwent_rSamuel Holland1-45/+74
These functions require a deep copy of the structure into the caller-provided buffer. Also make sure to store NULL in result on error. Use the stream to differentiate the two functions and avoid duplication. Signed-off-by: Samuel Holland <samuel@sholland.org>
2018-01-14pthread: Clean up, fix prototypeSamuel Holland1-6/+17
* Add the missing parameter to __register_atfork. * Sort and document functions. __pthread_register_cancel and __pthread_unregister_cancel should be implemented at some point, or else pthread_cleanup_pop(true) will not work properly and could cause deadlocks in programs that use it. Signed-off-by: Samuel Holland <samuel@sholland.org>
2018-01-14math: Clean up, add additional functionsSamuel Holland1-11/+80
* Add finite() variants, needed by some applications. * Add remaining long double variants of existing functions. * Sort and document existing functions, including where referenced in the LSB standard. Signed-off-by: Samuel Holland <samuel@sholland.org>
2018-01-14malloc: Sort functions by nameSamuel Holland1-16/+18
Signed-off-by: Samuel Holland <samuel@sholland.org>
2018-01-14dlfcn: Combine functions for the same header into one fileSamuel Holland3-27/+25
Changes to existing code: * Make explicit comparison against NULL. * Adjust debug message for readability. Signed-off-by: Samuel Holland <samuel@sholland.org>
2018-01-14execinfo: Clean up, implement backtrace_symbols_fdSamuel Holland2-51/+97
Rename the file to match the header it implements functions from. Changes to existing code: * Fix the return value from backtrace (off by one). * Use __builtin_extract_return_addr as recommended in gcc documentation. * Document header usage. * Document where the functions are referenced in the LSB standard. Signed-off-by: Samuel Holland <samuel@sholland.org>
2018-01-14libgcompat: Add and use a macro for defining symbol aliasesSamuel Holland6-28/+34
* Prefer providing the underscore-prefixed symbol as the strong definition. * Do not use a weak alias if the alias is also underscore-prefixed. * Make libgcompat objects depend on the new header. [NOTE: I originally took the weak_alias macro from musl's libc.h, but it's trivial and the same pattern already in use. If desired, I can add the musl copyright notice.] Signed-off-by: Samuel Holland <samuel@sholland.org>
2018-01-14global: Format the code consistentlySamuel Holland16-122/+141
* Apply clang-format. * Change all comments to the same style. * Add braces as dictated by the coding style guidelines. Signed-off-by: Samuel Holland <samuel@sholland.org>
2018-01-14backtrace: Add semicolons after call to function-like macrosSamuel Holland1-10/+10
This duplicates the semicolon at the end of the macro, but it prevents clang-format from getting confused. This is only temporary until the macro is updated in a later commit. Signed-off-by: Samuel Holland <samuel@sholland.org>
2017-10-26sysctl: clean headers, ensure SYS__sysctl is def'dA. Wilcox1-3/+5
Linux/aarch64 does not define SYS__sysctl. This caused build errors in Alpine[1] and Void[2]. While I'm in here, fix up headers since we don't need errno or strings. [1]: https://git.alpinelinux.org/cgit/aports/commit/?id=400a9d40 [2]: https://github.com/voidlinux/void-packages/commit/a7aa924e
2017-10-15ucontext: new moduleA. Wilcox1-0/+7
2017-10-15resolv: new moduleA. Wilcox1-0/+32
2017-10-15string: add strto[u?]ll_l 'locale-aware' methodsA. Wilcox1-0/+12
2017-10-15malloc: add __libc_memalignA. Wilcox1-0/+6
__memalign is not necessary as musl already provides it.
2017-10-15malloc: add __libc_{m,c,re}alloc and __libc_free aliasesA. Wilcox1-0/+27
2017-10-15math: Add weak aliases for non-__ prefix is{inf,nan}{,f}A. Wilcox1-0/+5
2017-07-28libgcompat: add getpwent_r() and fgetpwent_r() stubsWilliam Pitcock1-0/+55
2017-06-14add sysctl()William Pitcock1-0/+28
2017-06-14pthread: add __pthread_[un]register_cancel stubs, not relevant to musl ↵William Pitcock1-0/+8
pthread implementation
2017-06-14pthread: add __register_atfork() stubWilliam Pitcock1-0/+7
2017-06-14recent musl has pthread_setname_np().William Pitcock1-31/+0
2017-06-14move all compatibility library stuff into libgcompat/William Pitcock13-0/+465