Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F157766289
D44916.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D44916.diff
View Options
diff --git a/lib/libc/include/libc_private.h b/lib/libc/include/libc_private.h
--- a/lib/libc/include/libc_private.h
+++ b/lib/libc/include/libc_private.h
@@ -374,5 +374,7 @@
struct _xlocale;
struct __nl_cat_d *__catopen_l(const char *name, int type,
struct _xlocale *locale);
+int __strerror_rl(int errnum, char *strerrbuf, size_t buflen,
+ struct _xlocale *locale);
#endif /* _LIBC_PRIVATE_H_ */
diff --git a/lib/libc/string/strerror.c b/lib/libc/string/strerror.c
--- a/lib/libc/string/strerror.c
+++ b/lib/libc/string/strerror.c
@@ -74,8 +74,8 @@
strlcat(buf, t, len);
}
-static int
-strerror_rl(int errnum, char *strerrbuf, size_t buflen, locale_t locale)
+int
+__strerror_rl(int errnum, char *strerrbuf, size_t buflen, locale_t locale)
{
int retval = 0;
#if defined(NLS)
@@ -116,7 +116,7 @@
int
strerror_r(int errnum, char *strerrbuf, size_t buflen)
{
- return (strerror_rl(errnum, strerrbuf, buflen, __get_locale()));
+ return (__strerror_rl(errnum, strerrbuf, buflen, __get_locale()));
}
char *
@@ -124,7 +124,7 @@
{
static _Thread_local char ebuf[NL_TEXTMAX];
- if (strerror_rl(num, ebuf, sizeof(ebuf), locale) != 0)
+ if (__strerror_rl(num, ebuf, sizeof(ebuf), locale) != 0)
errno = EINVAL;
return (ebuf);
}
@@ -134,7 +134,7 @@
{
static char ebuf[NL_TEXTMAX];
- if (strerror_rl(num, ebuf, sizeof(ebuf), __get_locale()) != 0)
+ if (__strerror_rl(num, ebuf, sizeof(ebuf), __get_locale()) != 0)
errno = EINVAL;
return (ebuf);
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, May 25, 11:27 PM (2 h, 58 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
33518953
Default Alt Text
D44916.diff (1 KB)
Attached To
Mode
D44916: Stop using strerror() in printf*() guts
Attached
Detach File
Event Timeline
Log In to Comment