summaryrefslogtreecommitdiffstats
path: root/lib/libc/locale/wctomb.c
diff options
context:
space:
mode:
authortjr <tjr@FreeBSD.org>2004-05-12 14:26:54 +0000
committertjr <tjr@FreeBSD.org>2004-05-12 14:26:54 +0000
commit5ad27cd64f958bb973cd2fe0e8c9169e69168e05 (patch)
treea4b3d33fdc70e217fd81cdb660a70bd2e6e3af51 /lib/libc/locale/wctomb.c
parente3f042f4aff04f73fd65f7788919c29bd71cfd1e (diff)
downloadFreeBSD-src-5ad27cd64f958bb973cd2fe0e8c9169e69168e05.zip
FreeBSD-src-5ad27cd64f958bb973cd2fe0e8c9169e69168e05.tar.gz
Reduce overhead by calling internal versions of the multibyte conversion
functions directly wherever possible.
Diffstat (limited to 'lib/libc/locale/wctomb.c')
-rw-r--r--lib/libc/locale/wctomb.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/libc/locale/wctomb.c b/lib/libc/locale/wctomb.c
index 9e6f183..6616a66 100644
--- a/lib/libc/locale/wctomb.c
+++ b/lib/libc/locale/wctomb.c
@@ -32,6 +32,7 @@ __FBSDID("$FreeBSD$");
#include <stdlib.h>
#include <string.h>
#include <wchar.h>
+#include "mblocal.h"
int
wctomb(char *s, wchar_t wchar)
@@ -45,7 +46,7 @@ wctomb(char *s, wchar_t wchar)
mbs = initial;
return (0);
}
- if ((rval = wcrtomb(s, wchar, &mbs)) == (size_t)-1)
+ if ((rval = __wcrtomb(s, wchar, &mbs)) == (size_t)-1)
return (-1);
if (rval > INT_MAX) {
errno = ERANGE;
OpenPOWER on IntegriCloud