summaryrefslogtreecommitdiffstats
path: root/newlib/libc/include/wchar.h
diff options
context:
space:
mode:
authorThomas Fitzsimmons <fitzsim@redhat.com>2002-08-23 01:56:05 +0000
committerThomas Fitzsimmons <fitzsim@redhat.com>2002-08-23 01:56:05 +0000
commit8d9112f2f3ac7c0aa656ceb8da7b4248df228833 (patch)
tree237c3983e83fb5bd0ccbfff91a30844b7906afd3 /newlib/libc/include/wchar.h
parent1c5dcf3b0a42efcc8a7fcac148e2714d9766b871 (diff)
downloadcygnal-8d9112f2f3ac7c0aa656ceb8da7b4248df228833.tar.gz
cygnal-8d9112f2f3ac7c0aa656ceb8da7b4248df228833.tar.bz2
cygnal-8d9112f2f3ac7c0aa656ceb8da7b4248df228833.zip
* libc/include/langinfo.h: New file.
* libc/include/wchar.h: Likewise. * libc/include/sys/syslimits.h: Likewise. * libc/locale/fix_grouping.c: Likewise. * libc/locale/ldpart.c: Likewise. * libc/locale/ldpart.h: Likewise. * libc/locale/lmessages.c: Likewise. * libc/locale/lmessages.h: Likewise. * libc/locale/lmonetary.c: Likewise. * libc/locale/lmonetary.h: Likewise. * libc/locale/lnumeric.c: Likewise. * libc/locale/lnumeric.h: Likewise. * libc/locale/nl_langinfo.3: Likewise. * libc/locale/nl_langinfo.c: Likewise. * libc/locale/timelocal.c: Likewise. * libc/locale/timelocal.h: Likewise. * libc/stdlib/btowc.c: Likewise. * libc/stdlib/mbrlen.c: Likewise. * libc/stdlib/mbrtowc.c: Likewise. * libc/stdlib/mbsinit.c: Likewise. * libc/stdlib/mbsrtowcs.c: Likewise. * libc/stdlib/wcrtomb.c: Likewise. * libc/stdlib/wcsrtombs.c: Likewise. * libc/stdlib/wctob.c: Likewise. * libc/sys/linux/prof-freq.c: Likewise. * libc/sys/linux/profile.c: Likewise. * libc/sys/linux/machine/i386/dl-procinfo.c: Likewise. * libc/sys/linux/machine/i386/dl-procinfo.h: Likewise. * libc/include/stdlib.h: Change re-entrant functions to take mbstate_t pointers. * libc/include/sys/_types.h: Define _mbstate_t. * libc/include/sys/config.h (MB_LEN_MAX): New macro. * libc/include/sys/errno.h (EILSEQ): New error code. * libc/include/sys/reent.h: Include wchar.h. Change reentrant structure to use mbstate_t. * libc/locale/Makefile.am (LIB_SOURCES): Add new files. * libc/machine/powerpc/vfprintf.c: Use mbstate_t. * libc/machine/powerpc/vfscanf.c: Likewise. * libc/stdio/getdelim.c: Reallocate buffer only when necessary. * libc/stdio/vfprintf.c: Likewise. * libc/stdio/vfscanf.c: Likewise. * libc/stdlib/Makefile.am (LIB_SOURCES): Add new files. * libc/stdlib/mblen.c: Use mbstate_t. * libc/stdlib/mblen_r.c: Likewise. * libc/stdlib/mbstowcs.c: Likewise. * libc/stdlib/mbstowcs_r.c: Likewise. * libc/stdlib/mbtowc.c: Likewise. * libc/stdlib/mbtowc_r.c: Likewise. * libc/stdlib/wcstombs.c: Likewise. * libc/stdlib/wcstombs_r.c: Likewise. * libc/stdlib/wctomb_r.c: Likewise. * libc/sys/linux/Makefile.am (LIB_SOURCES): Add prof-freq.c and profile.c. * libc/sys/linux/machine/i386/Makefile.am (LIB_SOURCES): Add dl-procinfo.c. * libc/sys/linux/sys/errno.h (EILSEQ): New error code. * libc/sys/linux/sys/types.h (off_t): Define type. * testsuite/newlib.locale/UTF-8.c: Change locale name from UTF-8 to C-UTF-8. * testsuite/newlib.locale/UTF-8.exp: Likewise.
Diffstat (limited to 'newlib/libc/include/wchar.h')
-rw-r--r--newlib/libc/include/wchar.h30
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_ */