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:
@@ -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
@@ -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));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user