1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 02:47:35 +00:00

LibC: Implement strerror_r()

This implements the XSI-compliant version of strerror_r() - as opposed
to the GNU-specific variant.

The function explicitly saves errno so as to not accidentally change it
with one of the calls to other functions.
This commit is contained in:
Gunnar Beutner 2021-05-24 16:43:12 +02:00 committed by Andreas Kling
parent 3526fbbc5f
commit c81b3e1ee3
4 changed files with 40 additions and 0 deletions

View file

@ -43,6 +43,7 @@ char* strncat(char* dest, const char* src, size_t);
size_t strspn(const char*, const char* accept);
size_t strcspn(const char*, const char* reject);
int strerror_r(int, char*, size_t);
char* strerror(int errnum);
char* strsignal(int signum);
char* strpbrk(const char*, const char* accept);