1 /* wchar.h: Extra wchar defs
3 Copyright 2007, 2009, 2010 Red Hat, Inc.
5 This file is part of Cygwin.
7 This software is a copyrighted work licensed under the terms of the
8 Cygwin license. Please consult the file "CYGWIN_LICENSE" for
11 #ifndef _CYGWIN_WCHAR_H
12 #define _CYGWIN_WCHAR_H
14 #include_next <wchar.h>
16 #define ENCODING_LEN 31
22 typedef int mbtowc_f (struct _reent *, wchar_t *, const char *, size_t,
23 const char *, mbstate_t *);
24 typedef mbtowc_f *mbtowc_p;
26 extern mbtowc_p __mbtowc;
27 extern mbtowc_f __ascii_mbtowc;
28 extern mbtowc_f __utf8_mbtowc;
29 extern mbtowc_f __iso_mbtowc;
30 extern mbtowc_f __cp_mbtowc;
31 extern mbtowc_f __sjis_mbtowc;
32 extern mbtowc_f __eucjp_mbtowc;
33 extern mbtowc_f __gbk_mbtowc;
34 extern mbtowc_f __kr_mbtowc;
35 extern mbtowc_f __big5_mbtowc;
37 typedef int wctomb_f (struct _reent *, char *, wchar_t, const char *,
39 typedef wctomb_f *wctomb_p;
41 extern wctomb_p __wctomb;
42 extern wctomb_f __ascii_wctomb;
43 extern wctomb_f __utf8_wctomb;
45 extern char *__locale_charset ();
51 #ifdef __INSIDE_CYGWIN__
52 size_t __stdcall sys_cp_wcstombs (wctomb_p, const char *, char *, size_t,
53 const wchar_t *, size_t = (size_t) -1)
54 __attribute__ ((regparm(3)));
55 size_t __stdcall sys_wcstombs (char *dst, size_t len, const wchar_t * src,
56 size_t nwc = (size_t) -1)
57 __attribute__ ((regparm(3)));
58 size_t __stdcall sys_wcstombs_alloc (char **, int, const wchar_t *,
60 __attribute__ ((regparm(3)));
62 size_t __stdcall sys_cp_mbstowcs (mbtowc_p, const char *, wchar_t *, size_t,
63 const char *, size_t = (size_t) -1)
64 __attribute__ ((regparm(3)));
65 size_t __stdcall sys_mbstowcs (wchar_t * dst, size_t dlen, const char *src,
66 size_t nms = (size_t) -1)
67 __attribute__ ((regparm(3)));
68 size_t __stdcall sys_mbstowcs_alloc (wchar_t **, int, const char *,
70 __attribute__ ((regparm(3)));
71 #endif /* __INSIDE_CYGWIN__ */
73 #endif /* _CYGWIN_WCHAR_H */