summaryrefslogtreecommitdiff
path: root/src/errno/strerror.c
AgeCommit message (Collapse)AuthorLines
2020-03-14improve strerror speedTimo Teräs-15/+26
change the current O(n) lookup to O(1) based on the machinery described in "How To Write Shared Libraries" (Appendix B).
2018-09-12reduce spurious inclusion of libc.hRich Felker-1/+0
libc.h was intended to be a header for access to global libc state and related interfaces, but ended up included all over the place because it was the way to get the weak_alias macro. most of the inclusions removed here are places where weak_alias was needed. a few were recently introduced for hidden. some go all the way back to when libc.h defined CANCELPT_BEGIN and _END, and all (wrongly implemented) cancellation points had to include it. remaining spurious users are mostly callers of the LOCK/UNLOCK macros and files that use the LFS64 macro to define the awful *64 aliases. in a few places, new inclusion of libc.h is added because several internal headers no longer implicitly include libc.h. declarations for __lockfile and __unlockfile are moved from libc.h to stdio_impl.h so that the latter does not need libc.h. putting them in libc.h made no sense at all, since the macros in stdio_impl.h are needed to use them correctly anyway.
2014-07-26add support for LC_TIME and LC_MESSAGES translationsRich Felker-2/+11
for LC_MESSAGES, translation of strerror and similar literal message functions is supported. for messages in other places (particularly the dynamic linker) that use format strings, translation is not yet supported. in order to make it possible and safe, such messages will need to be refactored to separate the textual content from the format. for LC_TIME, the day and month names and strftime-style format strings provided by nl_langinfo are supported for translation. however there may be limitations, as some of the original C-locale nl_langinfo strings are non-unique and thus perhaps non-suitable as keys. overall, the locale support activated by this commit should not be seen as complete and polished but as a basis for beginning to test locale functionality and implement locales.
2014-03-05fix strerror on mips: one error code is out of the 8-bit table rangeRich Felker-1/+7
if we ever encounter other targets where error codes don't fit in the 8-bit range, the table should probably just be bumped to 16-bit, but for now I don't want to increase the table size on all archs just because of a bug in the mips abi.
2011-02-12initial check-in, version 0.5.0v0.5.0Rich Felker-0/+22