Explain <isc/strerr.h> a little more

I tried to delete it, but it isn't as crufty as it appeared to be.
This commit is contained in:
Tony Finch
2022-12-16 14:13:47 +00:00
committed by Tony Finch
parent d421a55af1
commit dfbac62505
2 changed files with 12 additions and 5 deletions
+4
View File
@@ -26,4 +26,8 @@
#if defined(strerror_r)
#undef strerror_r
#endif /* if defined(strerror_r) */
/*
* Ensure we use a consistent implementation of strerror_r()
*/
#define strerror_r isc_string_strerror_r
+8 -5
View File
@@ -55,6 +55,14 @@
#include <isc/string.h> /* IWYU pragma: keep */
/*
* We undef _GNU_SOURCE above to get the POSIX strerror_r()
*/
int
isc_string_strerror_r(int errnum, char *buf, size_t buflen) {
return (strerror_r(errnum, buf, buflen));
}
#if !defined(HAVE_STRLCPY)
size_t
strlcpy(char *dst, const char *src, size_t size) {
@@ -136,8 +144,3 @@ strnstr(const char *s, const char *find, size_t slen) {
return ((char *)s);
}
#endif
int
isc_string_strerror_r(int errnum, char *buf, size_t buflen) {
return (strerror_r(errnum, buf, buflen));
}