4
0
mirror of git://sourceware.org/git/newlib-cygwin.git synced 2025-01-16 11:31:00 +08:00
Christopher Faylor 576593dd72 * libc/stdlib/mbrlen.c: Change include order to prevent compiler errors when
defining _mbrtowc.
* libc/stdlib/mbsinit.c: Ditto.
* libc/stdlib/mbsrtowcs.c: Ditto.
* libc/stdlib/wcrtomb.c: Ditto.
* libc/stdlib/wcsrtombs.c: Ditto.
* libc/stdlib/wctob.c: Ditto.
* libc/stdlib/mbrlen.c: Change include order to prevent compiler errors when
defining _mbrtowc.
* libc/stdlib/mbsinit.c: Ditto.
* libc/stdlib/mbsrtowcs.c: Ditto.
2003-12-05 06:13:44 +00:00

20 lines
321 B
C

#include <reent.h>
#include <wchar.h>
#include <stdlib.h>
#include <stdio.h>
#include <errno.h>
size_t
mbrlen(const char *s, size_t n, mbstate_t *ps)
{
#ifdef MB_CAPABLE
if (ps == NULL)
{
_REENT_CHECK_MISC(_REENT);
ps = &(_REENT_MBRLEN_STATE(_REENT));
}
#endif
return mbrtowc(NULL, s, n, ps);
}