xref: /titanic_51/usr/src/cmd/ast/libast/amd64/FEATURE/wchar (revision b4dd7d09880f14016feece03929a224eca1cf39a)
1*b4dd7d09SAndy Fiddaman
2*b4dd7d09SAndy Fiddaman/* : : generated by proto : : */
3*b4dd7d09SAndy Fiddaman/* : : generated from contrib/ast/src/lib/libast/features/wchar by iffe version 2012-07-17 : : */
4*b4dd7d09SAndy Fiddaman
5*b4dd7d09SAndy Fiddaman
6*b4dd7d09SAndy Fiddaman#if !defined(__PROTO__)
7*b4dd7d09SAndy Fiddaman#  if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
8*b4dd7d09SAndy Fiddaman#    if defined(__cplusplus)
9*b4dd7d09SAndy Fiddaman#      define __LINKAGE__	"C"
10*b4dd7d09SAndy Fiddaman#    else
11*b4dd7d09SAndy Fiddaman#      define __LINKAGE__
12*b4dd7d09SAndy Fiddaman#    endif
13*b4dd7d09SAndy Fiddaman#    define __STDARG__
14*b4dd7d09SAndy Fiddaman#    define __PROTO__(x)	x
15*b4dd7d09SAndy Fiddaman#    define __OTORP__(x)
16*b4dd7d09SAndy Fiddaman#    define __PARAM__(n,o)	n
17*b4dd7d09SAndy Fiddaman#    if !defined(__STDC__) && !defined(__cplusplus)
18*b4dd7d09SAndy Fiddaman#      if !defined(c_plusplus)
19*b4dd7d09SAndy Fiddaman#      	define const
20*b4dd7d09SAndy Fiddaman#      endif
21*b4dd7d09SAndy Fiddaman#      define signed
22*b4dd7d09SAndy Fiddaman#      define void		int
23*b4dd7d09SAndy Fiddaman#      define volatile
24*b4dd7d09SAndy Fiddaman#      define __V_		char
25*b4dd7d09SAndy Fiddaman#    else
26*b4dd7d09SAndy Fiddaman#      define __V_		void
27*b4dd7d09SAndy Fiddaman#    endif
28*b4dd7d09SAndy Fiddaman#  else
29*b4dd7d09SAndy Fiddaman#    define __PROTO__(x)	()
30*b4dd7d09SAndy Fiddaman#    define __OTORP__(x)	x
31*b4dd7d09SAndy Fiddaman#    define __PARAM__(n,o)	o
32*b4dd7d09SAndy Fiddaman#    define __LINKAGE__
33*b4dd7d09SAndy Fiddaman#    define __V_		char
34*b4dd7d09SAndy Fiddaman#    define const
35*b4dd7d09SAndy Fiddaman#    define signed
36*b4dd7d09SAndy Fiddaman#    define void		int
37*b4dd7d09SAndy Fiddaman#    define volatile
38*b4dd7d09SAndy Fiddaman#  endif
39*b4dd7d09SAndy Fiddaman#  define __MANGLE__	__LINKAGE__
40*b4dd7d09SAndy Fiddaman#  if defined(__cplusplus) || defined(c_plusplus)
41*b4dd7d09SAndy Fiddaman#    define __VARARG__	...
42*b4dd7d09SAndy Fiddaman#  else
43*b4dd7d09SAndy Fiddaman#    define __VARARG__
44*b4dd7d09SAndy Fiddaman#  endif
45*b4dd7d09SAndy Fiddaman#  if defined(__STDARG__)
46*b4dd7d09SAndy Fiddaman#    define __VA_START__(p,a)	va_start(p,a)
47*b4dd7d09SAndy Fiddaman#  else
48*b4dd7d09SAndy Fiddaman#    define __VA_START__(p,a)	va_start(p)
49*b4dd7d09SAndy Fiddaman#  endif
50*b4dd7d09SAndy Fiddaman#  if !defined(__INLINE__)
51*b4dd7d09SAndy Fiddaman#    if defined(__cplusplus)
52*b4dd7d09SAndy Fiddaman#      define __INLINE__	extern __MANGLE__ inline
53*b4dd7d09SAndy Fiddaman#    else
54*b4dd7d09SAndy Fiddaman#      if defined(_WIN32) && !defined(__GNUC__)
55*b4dd7d09SAndy Fiddaman#      	define __INLINE__	__inline
56*b4dd7d09SAndy Fiddaman#      endif
57*b4dd7d09SAndy Fiddaman#    endif
58*b4dd7d09SAndy Fiddaman#  endif
59*b4dd7d09SAndy Fiddaman#endif
60*b4dd7d09SAndy Fiddaman#if !defined(__LINKAGE__)
61*b4dd7d09SAndy Fiddaman#define __LINKAGE__		/* 2004-08-11 transition */
62*b4dd7d09SAndy Fiddaman#endif
63*b4dd7d09SAndy Fiddaman#define _sys_types	1	/* #include <sys/types.h> ok */
64*b4dd7d09SAndy Fiddaman#ifndef _AST_WCHAR_H
65*b4dd7d09SAndy Fiddaman#define _AST_WCHAR_H	1
66*b4dd7d09SAndy Fiddaman
67*b4dd7d09SAndy Fiddaman#define _hdr_stdlib	1	/* #include <stdlib.h> ok */
68*b4dd7d09SAndy Fiddaman#define _hdr_stdio	1	/* #include <stdio.h> ok */
69*b4dd7d09SAndy Fiddaman#define _hdr_wchar	1	/* #include <wchar.h> ok */
70*b4dd7d09SAndy Fiddaman#define _lib_mbstowcs	1	/* mbstowcs() in default lib(s) */
71*b4dd7d09SAndy Fiddaman#define _lib_wctomb	1	/* wctomb() in default lib(s) */
72*b4dd7d09SAndy Fiddaman#define _lib_wcrtomb	1	/* wcrtomb() in default lib(s) */
73*b4dd7d09SAndy Fiddaman#define _lib_wcslen	1	/* wcslen() in default lib(s) */
74*b4dd7d09SAndy Fiddaman#define _lib_wcstombs	1	/* wcstombs() in default lib(s) */
75*b4dd7d09SAndy Fiddaman#define _lib_wcwidth	1	/* wcwidth() in default lib(s) */
76*b4dd7d09SAndy Fiddaman#define _lib_towlower	1	/* towlower() in default lib(s) */
77*b4dd7d09SAndy Fiddaman#define _lib_towupper	1	/* towupper() in default lib(s) */
78*b4dd7d09SAndy Fiddaman#define _hdr_time	1	/* #include <time.h> ok */
79*b4dd7d09SAndy Fiddaman#define _sys_time	1	/* #include <sys/time.h> ok */
80*b4dd7d09SAndy Fiddaman#define _sys_times	1	/* #include <sys/times.h> ok */
81*b4dd7d09SAndy Fiddaman#define _hdr_stddef	1	/* #include <stddef.h> ok */
82*b4dd7d09SAndy Fiddaman#define _typ_mbstate_t	1	/* mbstate_t is a type */
83*b4dd7d09SAndy Fiddaman#define _nxt_wchar <../include/wchar.h>	/* include path for the native <wchar.h> */
84*b4dd7d09SAndy Fiddaman#define _nxt_wchar_str "../include/wchar.h"	/* include string for the native <wchar.h> */
85*b4dd7d09SAndy Fiddaman#ifndef _SFSTDIO_H
86*b4dd7d09SAndy Fiddaman#include <ast_common.h>
87*b4dd7d09SAndy Fiddaman#include <stdio.h>
88*b4dd7d09SAndy Fiddaman#endif
89*b4dd7d09SAndy Fiddaman
90*b4dd7d09SAndy Fiddaman#define _hdr_unistd	1	/* #include <unistd.h> ok */
91*b4dd7d09SAndy Fiddaman#include <wctype.h> /* <wchar.h> includes <wctype.h> */
92*b4dd7d09SAndy Fiddaman
93*b4dd7d09SAndy Fiddaman#if _hdr_wchar && defined(_nxt_wchar)
94*b4dd7d09SAndy Fiddaman#include <../include/wchar.h>	/* the native wchar.h */
95*b4dd7d09SAndy Fiddaman#endif
96*b4dd7d09SAndy Fiddaman
97*b4dd7d09SAndy Fiddaman#ifndef WEOF
98*b4dd7d09SAndy Fiddaman#define WEOF		(-1)
99*b4dd7d09SAndy Fiddaman#endif
100*b4dd7d09SAndy Fiddaman
101*b4dd7d09SAndy Fiddaman#undef	fgetwc
102*b4dd7d09SAndy Fiddaman#undef	fgetws
103*b4dd7d09SAndy Fiddaman#undef	fputwc
104*b4dd7d09SAndy Fiddaman#undef	fputws
105*b4dd7d09SAndy Fiddaman#undef	getwc
106*b4dd7d09SAndy Fiddaman#undef	getwchar
107*b4dd7d09SAndy Fiddaman#undef	getws
108*b4dd7d09SAndy Fiddaman#undef	putwc
109*b4dd7d09SAndy Fiddaman#undef	putwchar
110*b4dd7d09SAndy Fiddaman#undef	ungetwc
111*b4dd7d09SAndy Fiddaman
112*b4dd7d09SAndy Fiddaman#define fgetwc		_ast_fgetwc
113*b4dd7d09SAndy Fiddaman#define fgetws		_ast_fgetws
114*b4dd7d09SAndy Fiddaman#define fputwc		_ast_fputwc
115*b4dd7d09SAndy Fiddaman#define fputws		_ast_fputws
116*b4dd7d09SAndy Fiddaman#define fwide		_ast_fwide
117*b4dd7d09SAndy Fiddaman#define fwprintf	_ast_fwprintf
118*b4dd7d09SAndy Fiddaman#define fwscanf		_ast_fwscanf
119*b4dd7d09SAndy Fiddaman#define getwc		_ast_getwc
120*b4dd7d09SAndy Fiddaman#define getwchar	_ast_getwchar
121*b4dd7d09SAndy Fiddaman#define getws		_ast_getws
122*b4dd7d09SAndy Fiddaman#define putwc		_ast_putwc
123*b4dd7d09SAndy Fiddaman#define putwchar	_ast_putwchar
124*b4dd7d09SAndy Fiddaman#define swprintf	_ast_swprintf
125*b4dd7d09SAndy Fiddaman#define swscanf		_ast_swscanf
126*b4dd7d09SAndy Fiddaman#define ungetwc		_ast_ungetwc
127*b4dd7d09SAndy Fiddaman#define vfwprintf	_ast_vfwprintf
128*b4dd7d09SAndy Fiddaman#define vfwscanf	_ast_vfwscanf
129*b4dd7d09SAndy Fiddaman#define vswprintf	_ast_vswprintf
130*b4dd7d09SAndy Fiddaman#define vswscanf	_ast_vswscanf
131*b4dd7d09SAndy Fiddaman#define vwprintf	_ast_vwprintf
132*b4dd7d09SAndy Fiddaman#define vwscanf		_ast_vwscanf
133*b4dd7d09SAndy Fiddaman#define wprintf		_ast_wprintf
134*b4dd7d09SAndy Fiddaman#define wscanf		_ast_wscanf
135*b4dd7d09SAndy Fiddaman
136*b4dd7d09SAndy Fiddaman#if !_typ_mbstate_t
137*b4dd7d09SAndy Fiddaman#undef	_typ_mbstate_t
138*b4dd7d09SAndy Fiddaman#define _typ_mbstate_t	1
139*b4dd7d09SAndy Fiddamantypedef char mbstate_t;
140*b4dd7d09SAndy Fiddaman#endif
141*b4dd7d09SAndy Fiddaman
142*b4dd7d09SAndy Fiddaman#if _BLD_ast && defined(__EXPORT__)
143*b4dd7d09SAndy Fiddaman#undef __MANGLE__
144*b4dd7d09SAndy Fiddaman#define __MANGLE__ __LINKAGE__		__EXPORT__
145*b4dd7d09SAndy Fiddaman#endif
146*b4dd7d09SAndy Fiddaman
147*b4dd7d09SAndy Fiddaman#if !_lib_mbstowcs
148*b4dd7d09SAndy Fiddamanextern __MANGLE__ size_t		mbstowcs __PROTO__((wchar_t*, const char*, size_t));
149*b4dd7d09SAndy Fiddaman#endif
150*b4dd7d09SAndy Fiddaman#if !_lib_wctomb
151*b4dd7d09SAndy Fiddamanextern __MANGLE__ int		wctomb __PROTO__((char*, wchar_t));
152*b4dd7d09SAndy Fiddaman#endif
153*b4dd7d09SAndy Fiddaman#if !_lib_wcrtomb
154*b4dd7d09SAndy Fiddamanextern __MANGLE__ size_t		wcrtomb __PROTO__((char*, wchar_t, mbstate_t*));
155*b4dd7d09SAndy Fiddaman#endif
156*b4dd7d09SAndy Fiddaman#if !_lib_wcslen
157*b4dd7d09SAndy Fiddamanextern __MANGLE__ size_t		wcslen __PROTO__((const wchar_t*));
158*b4dd7d09SAndy Fiddaman#endif
159*b4dd7d09SAndy Fiddaman#if !_lib_wcstombs
160*b4dd7d09SAndy Fiddamanextern __MANGLE__ size_t		wcstombs __PROTO__((char*, const wchar_t*, size_t));
161*b4dd7d09SAndy Fiddaman#endif
162*b4dd7d09SAndy Fiddaman
163*b4dd7d09SAndy Fiddamanextern __MANGLE__ int		fwprintf __PROTO__((FILE*, const wchar_t*, ...));
164*b4dd7d09SAndy Fiddamanextern __MANGLE__ int		fwscanf __PROTO__((FILE*, const wchar_t*, ...));
165*b4dd7d09SAndy Fiddamanextern __MANGLE__ wint_t		fgetwc __PROTO__((FILE*));
166*b4dd7d09SAndy Fiddamanextern __MANGLE__ wchar_t*		fgetws __PROTO__((wchar_t*, int, FILE*));
167*b4dd7d09SAndy Fiddamanextern __MANGLE__ wint_t		fputwc __PROTO__((wchar_t, FILE*));
168*b4dd7d09SAndy Fiddamanextern __MANGLE__ int		fputws __PROTO__((const wchar_t*, FILE*));
169*b4dd7d09SAndy Fiddamanextern __MANGLE__ int		fwide __PROTO__((FILE*, int));
170*b4dd7d09SAndy Fiddamanextern __MANGLE__ wint_t		getwc __PROTO__((FILE*));
171*b4dd7d09SAndy Fiddamanextern __MANGLE__ wint_t		getwchar __PROTO__((void));
172*b4dd7d09SAndy Fiddamanextern __MANGLE__ wchar_t*		getws __PROTO__((wchar_t*));
173*b4dd7d09SAndy Fiddamanextern __MANGLE__ wint_t		putwc __PROTO__((wchar_t, FILE*));
174*b4dd7d09SAndy Fiddamanextern __MANGLE__ wint_t		putwchar __PROTO__((wchar_t));
175*b4dd7d09SAndy Fiddamanextern __MANGLE__ int		swprintf __PROTO__((wchar_t*, size_t, const wchar_t*, ...));
176*b4dd7d09SAndy Fiddamanextern __MANGLE__ int		swscanf __PROTO__((const wchar_t*, const wchar_t*, ...));
177*b4dd7d09SAndy Fiddamanextern __MANGLE__ wint_t		ungetwc __PROTO__((wint_t, FILE*));
178*b4dd7d09SAndy Fiddamanextern __MANGLE__ int		vfwprintf __PROTO__((FILE*, const wchar_t*, va_list));
179*b4dd7d09SAndy Fiddamanextern __MANGLE__ int		vfwscanf __PROTO__((FILE*, const wchar_t*, va_list));
180*b4dd7d09SAndy Fiddamanextern __MANGLE__ int		vwprintf __PROTO__((const wchar_t*, va_list));
181*b4dd7d09SAndy Fiddamanextern __MANGLE__ int		vwscanf __PROTO__((const wchar_t*, va_list));
182*b4dd7d09SAndy Fiddamanextern __MANGLE__ int		vswprintf __PROTO__((wchar_t*, size_t, const wchar_t*, va_list));
183*b4dd7d09SAndy Fiddamanextern __MANGLE__ int		vswscanf __PROTO__((const wchar_t*, const wchar_t*, va_list));
184*b4dd7d09SAndy Fiddamanextern __MANGLE__ int		wprintf __PROTO__((const wchar_t*, ...));
185*b4dd7d09SAndy Fiddamanextern __MANGLE__ int		wscanf __PROTO__((const wchar_t*, ...));
186*b4dd7d09SAndy Fiddaman
187*b4dd7d09SAndy Fiddaman#undef __MANGLE__
188*b4dd7d09SAndy Fiddaman#define __MANGLE__ __LINKAGE__
189*b4dd7d09SAndy Fiddaman
190*b4dd7d09SAndy Fiddaman#else
191*b4dd7d09SAndy Fiddaman
192*b4dd7d09SAndy Fiddaman/* on some systems <wchar.h> is included multiple times with multiple effects */
193*b4dd7d09SAndy Fiddaman
194*b4dd7d09SAndy Fiddaman#if _hdr_wchar && defined(_nxt_wchar)
195*b4dd7d09SAndy Fiddaman#include <../include/wchar.h>	/* the native wchar.h */
196*b4dd7d09SAndy Fiddaman#endif
197*b4dd7d09SAndy Fiddaman
198*b4dd7d09SAndy Fiddaman#endif
199