[libc] add strerror_r function
authorMichael Jones <michaelrj@google.com>
Tue, 4 Oct 2022 23:47:24 +0000 (16:47 -0700)
committerMichael Jones <michaelrj@google.com>
Fri, 7 Oct 2022 18:07:06 +0000 (11:07 -0700)
commita9f95b769efe4fa4d4dc4a01b5bbfc4e3571a389
treee9cd67f4d68a4701807321f3767f2496e255c437
parent6a6f10fd23b2730e2c01051541c5a83f5df9131b
[libc] add strerror_r function

I've implemente the gnu variant of strerror_r since that seems to be the
one more relevant to what we're trying to do.

Differential Revision: https://reviews.llvm.org/D135227
libc/config/linux/x86_64/entrypoints.txt
libc/spec/gnu_ext.td
libc/src/__support/error_to_string.cpp
libc/src/__support/error_to_string.h
libc/src/string/CMakeLists.txt
libc/src/string/strerror.cpp
libc/src/string/strerror_r.cpp [new file with mode: 0644]
libc/src/string/strerror_r.h [new file with mode: 0644]
libc/test/src/string/CMakeLists.txt
libc/test/src/string/strerror_r_test.cpp [new file with mode: 0644]