diff options
Diffstat (limited to 'newlib/libc/stdlib/mbrlen.c')
-rw-r--r-- | newlib/libc/stdlib/mbrlen.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/newlib/libc/stdlib/mbrlen.c b/newlib/libc/stdlib/mbrlen.c new file mode 100644 index 000000000..8f0c648b9 --- /dev/null +++ b/newlib/libc/stdlib/mbrlen.c @@ -0,0 +1,13 @@ +#include <wchar.h> +#include <stdlib.h> +#include <stdio.h> +#include <reent.h> +#include <errno.h> + +size_t +mbrlen(const char *s, size_t n, mbstate_t *ps) +{ + mbstate_t internal; + + return mbrtowc(NULL, s, n, ps != NULL ? ps : &internal); +} |