diff options
Diffstat (limited to 'newlib/libc/include/wchar.h')
-rw-r--r-- | newlib/libc/include/wchar.h | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/newlib/libc/include/wchar.h b/newlib/libc/include/wchar.h new file mode 100644 index 000000000..41b8fdc1b --- /dev/null +++ b/newlib/libc/include/wchar.h @@ -0,0 +1,30 @@ +#ifndef _WCHAR_H_ +#define _WCHAR_H_ + +#define __need_size_t +#define __need_wchar_t +#define __need_wint_t +#include <stddef.h> + +/* For _mbstate_t definition. */ +#include <sys/_types.h> + +#ifndef WEOF +# define WEOF (0xffffffffu) +#endif + +#ifndef MBSTATE_T +#define MBSTATE_T +typedef _mbstate_t mbstate_t; +#endif /* MBSTATE_T */ + +wint_t btowc (int c); +int wctob (wint_t c); +int mbsinit(const mbstate_t *ps); +size_t mbrlen(const char *s, size_t n, mbstate_t *ps); +size_t mbrtowc(wchar_t *pwc, const char *s, size_t n, mbstate_t *ps); +size_t wcrtomb(char *s, wchar_t wc, mbstate_t *ps); +size_t mbsrtowcs(wchar_t *dst, const char **src, size_t len, mbstate_t *ps); +size_t wcsrtombs(char *dst, const wchar_t **src, size_t len, mbstate_t *ps); + +#endif /* _WCHAR_H_ */ |