xref: /haiku/src/system/libroot/posix/wchar/mbstowcs.c (revision 47a21c5c89fc9fd155a3929e5a8f6056b92a2053)
1 /*
2 ** Copyright 2011, Oliver Tappe, zooey@hirschkaefer.de. All rights reserved.
3 ** Distributed under the terms of the MIT License.
4 */
5 
6 #include <wchar_private.h>
7 
8 
9 size_t
__mbstowcs(wchar_t * pwc,const char * s,size_t n)10 __mbstowcs(wchar_t* pwc, const char* s, size_t n)
11 {
12 	static mbstate_t internalMbState;
13 
14 	return __mbsrtowcs(pwc, &s, n, &internalMbState);
15 }
16 
17 
18 B_DEFINE_WEAK_ALIAS(__mbstowcs, mbstowcs);
19