xref: /titanic_51/usr/src/cmd/ast/libast/sparc/FEATURE/stdio (revision b4dd7d09880f14016feece03929a224eca1cf39a)
1*b4dd7d09SAndy Fiddaman
2*b4dd7d09SAndy Fiddaman/* : : generated by proto : : */
3*b4dd7d09SAndy Fiddaman/* : : generated from contrib/ast/src/lib/libast/features/stdio by iffe version 2012-07-17 : : */
4*b4dd7d09SAndy Fiddaman
5*b4dd7d09SAndy Fiddaman#ifndef _SFSTDIO_H
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
64*b4dd7d09SAndy Fiddaman#define _SFSTDIO_H	1
65*b4dd7d09SAndy Fiddaman#define _sys_types	1	/* #include <sys/types.h> ok */
66*b4dd7d09SAndy Fiddaman#define __FILE_typedef	1
67*b4dd7d09SAndy Fiddaman#define _FILE_DEFINED	1
68*b4dd7d09SAndy Fiddaman#define _FILE_defined	1
69*b4dd7d09SAndy Fiddaman#define _FILEDEFED	1
70*b4dd7d09SAndy Fiddaman
71*b4dd7d09SAndy Fiddaman#ifndef __FILE_TAG
72*b4dd7d09SAndy Fiddaman#define __FILE_TAG	_sfio_s
73*b4dd7d09SAndy Fiddaman#endif
74*b4dd7d09SAndy Fiddaman
75*b4dd7d09SAndy Fiddaman#undef	FILE
76*b4dd7d09SAndy Fiddaman#undef	_FILE
77*b4dd7d09SAndy Fiddaman#undef	fpos_t
78*b4dd7d09SAndy Fiddaman#undef	fpos64_t
79*b4dd7d09SAndy Fiddaman
80*b4dd7d09SAndy Fiddamantypedef struct _sfio_s _sfio_FILE;
81*b4dd7d09SAndy Fiddaman
82*b4dd7d09SAndy Fiddaman#define FILE		_sfio_FILE
83*b4dd7d09SAndy Fiddaman#define _FILE		FILE
84*b4dd7d09SAndy Fiddaman
85*b4dd7d09SAndy Fiddaman#if !defined(__FILE) && !__CYGWIN__
86*b4dd7d09SAndy Fiddaman#undef	__FILE
87*b4dd7d09SAndy Fiddaman#define __FILE		FILE
88*b4dd7d09SAndy Fiddaman#endif
89*b4dd7d09SAndy Fiddaman
90*b4dd7d09SAndy Fiddaman#if defined(_AST_H) || defined(_SFIO_H)
91*b4dd7d09SAndy Fiddaman
92*b4dd7d09SAndy Fiddaman#define BUFSIZ		SF_BUFSIZE
93*b4dd7d09SAndy Fiddaman
94*b4dd7d09SAndy Fiddaman#else
95*b4dd7d09SAndy Fiddaman
96*b4dd7d09SAndy Fiddaman#ifndef BUFSIZ
97*b4dd7d09SAndy Fiddaman#define BUFSIZ		8192
98*b4dd7d09SAndy Fiddaman#endif
99*b4dd7d09SAndy Fiddaman
100*b4dd7d09SAndy Fiddaman#ifndef EOF
101*b4dd7d09SAndy Fiddaman#define EOF		(-1)
102*b4dd7d09SAndy Fiddaman#endif
103*b4dd7d09SAndy Fiddaman
104*b4dd7d09SAndy Fiddaman#ifndef NULL
105*b4dd7d09SAndy Fiddaman#define NULL		0
106*b4dd7d09SAndy Fiddaman#endif
107*b4dd7d09SAndy Fiddaman
108*b4dd7d09SAndy Fiddaman#ifndef SEEK_SET
109*b4dd7d09SAndy Fiddaman#define SEEK_SET	0
110*b4dd7d09SAndy Fiddaman#define SEEK_CUR	1
111*b4dd7d09SAndy Fiddaman#define SEEK_END	2
112*b4dd7d09SAndy Fiddaman#endif
113*b4dd7d09SAndy Fiddaman
114*b4dd7d09SAndy Fiddaman#include <ast_std.h>
115*b4dd7d09SAndy Fiddaman
116*b4dd7d09SAndy Fiddaman#include <sfio_s.h>
117*b4dd7d09SAndy Fiddaman
118*b4dd7d09SAndy Fiddaman#if __cplusplus
119*b4dd7d09SAndy Fiddaman#define _sf_(f)		(f)
120*b4dd7d09SAndy Fiddaman#else
121*b4dd7d09SAndy Fiddaman#define _sf_(f)		((struct _sfio_s*)(f))
122*b4dd7d09SAndy Fiddaman#endif
123*b4dd7d09SAndy Fiddaman
124*b4dd7d09SAndy Fiddaman#define _SF_EOF		0000200
125*b4dd7d09SAndy Fiddaman#define _SF_ERROR	0000400
126*b4dd7d09SAndy Fiddaman
127*b4dd7d09SAndy Fiddaman#endif
128*b4dd7d09SAndy Fiddaman
129*b4dd7d09SAndy Fiddaman#ifdef _NO_LARGEFILE64_SOURCE
130*b4dd7d09SAndy Fiddaman#undef _LARGEFILE64_SOURCE
131*b4dd7d09SAndy Fiddaman#endif
132*b4dd7d09SAndy Fiddaman
133*b4dd7d09SAndy Fiddaman#ifdef _LARGEFILE64_SOURCE
134*b4dd7d09SAndy Fiddaman#undef	off_t
135*b4dd7d09SAndy Fiddaman#endif
136*b4dd7d09SAndy Fiddaman
137*b4dd7d09SAndy Fiddaman#define fpos_t		_ast_fpos_t
138*b4dd7d09SAndy Fiddaman#if _typ_int64_t
139*b4dd7d09SAndy Fiddaman#define fpos64_t	_ast_fpos_t
140*b4dd7d09SAndy Fiddaman#endif
141*b4dd7d09SAndy Fiddaman
142*b4dd7d09SAndy Fiddamantypedef struct _ast_fpos_s
143*b4dd7d09SAndy Fiddaman{
144*b4dd7d09SAndy Fiddaman	intmax_t	_sf_offset;
145*b4dd7d09SAndy Fiddaman	unsigned char	_sf_state[64 - sizeof(intmax_t)];
146*b4dd7d09SAndy Fiddaman} _ast_fpos_t;
147*b4dd7d09SAndy Fiddaman
148*b4dd7d09SAndy Fiddaman#define _base		_data
149*b4dd7d09SAndy Fiddaman#define _ptr		_next
150*b4dd7d09SAndy Fiddaman#define _IOFBF		0
151*b4dd7d09SAndy Fiddaman#define _IONBF		1
152*b4dd7d09SAndy Fiddaman#define _IOLBF		2
153*b4dd7d09SAndy Fiddaman
154*b4dd7d09SAndy Fiddaman#if defined(__cplusplus) && defined(__THROW) && !defined(_UWIN)
155*b4dd7d09SAndy Fiddaman
156*b4dd7d09SAndy Fiddaman#undef	FILE
157*b4dd7d09SAndy Fiddaman#define FILE            FILE
158*b4dd7d09SAndy Fiddamantypedef struct _sfio_s FILE;
159*b4dd7d09SAndy Fiddaman
160*b4dd7d09SAndy Fiddaman#undef	strerror
161*b4dd7d09SAndy Fiddamanextern __MANGLE__ char*	strerror(int) __THROW;
162*b4dd7d09SAndy Fiddaman
163*b4dd7d09SAndy Fiddamanextern __MANGLE__ int	_doprnt __PROTO__((const char*, va_list, FILE*));
164*b4dd7d09SAndy Fiddamanextern __MANGLE__ int	_doscan __PROTO__((FILE*, const char*, va_list));
165*b4dd7d09SAndy Fiddamanextern __MANGLE__ int	asprintf __PROTO__((char**, const char*, ...));
166*b4dd7d09SAndy Fiddamanextern __MANGLE__ int	clearerr __PROTO__((FILE*));
167*b4dd7d09SAndy Fiddamanextern __MANGLE__ int	fclose __PROTO__((FILE*));
168*b4dd7d09SAndy Fiddamanextern __MANGLE__ FILE*	fdopen __PROTO__((int, const char*));
169*b4dd7d09SAndy Fiddamanextern __MANGLE__ int	feof __PROTO__((FILE*));
170*b4dd7d09SAndy Fiddamanextern __MANGLE__ int	ferror __PROTO__((FILE*));
171*b4dd7d09SAndy Fiddamanextern __MANGLE__ int	fflush __PROTO__((FILE*));
172*b4dd7d09SAndy Fiddamanextern __MANGLE__ int	fgetc __PROTO__((FILE*));
173*b4dd7d09SAndy Fiddamanextern __MANGLE__ int	fgetpos __PROTO__((FILE*, fpos_t*));
174*b4dd7d09SAndy Fiddamanextern __MANGLE__ char*	fgets __PROTO__((char*, int, FILE*));
175*b4dd7d09SAndy Fiddamanextern __MANGLE__ int	fileno __PROTO__((FILE*));
176*b4dd7d09SAndy Fiddamanextern __MANGLE__ FILE*	fopen __PROTO__((const char*, const char*));
177*b4dd7d09SAndy Fiddamanextern __MANGLE__ int	fprintf __PROTO__((FILE*, const char*, ...));
178*b4dd7d09SAndy Fiddamanextern __MANGLE__ int	fpurge __PROTO__((FILE*));
179*b4dd7d09SAndy Fiddamanextern __MANGLE__ int	fputc __PROTO__((int, FILE*));
180*b4dd7d09SAndy Fiddamanextern __MANGLE__ int	fputs __PROTO__((const char*, FILE*));
181*b4dd7d09SAndy Fiddamanextern __MANGLE__ size_t	fread __PROTO__((__V_*, size_t, size_t, FILE*));
182*b4dd7d09SAndy Fiddamanextern __MANGLE__ FILE*	freopen __PROTO__((const char*, const char*, FILE*));
183*b4dd7d09SAndy Fiddamanextern __MANGLE__ int	fscanf __PROTO__((FILE*, const char*, ...));
184*b4dd7d09SAndy Fiddamanextern __MANGLE__ int	fseek __PROTO__((FILE*, long, int));
185*b4dd7d09SAndy Fiddamanextern __MANGLE__ int	fseeko __PROTO__((FILE*, off_t, int));
186*b4dd7d09SAndy Fiddamanextern __MANGLE__ int	fsetpos __PROTO__((FILE*, const fpos_t*));
187*b4dd7d09SAndy Fiddamanextern __MANGLE__ long	ftell __PROTO__((FILE*));
188*b4dd7d09SAndy Fiddamanextern __MANGLE__ off_t	ftello __PROTO__((FILE*));
189*b4dd7d09SAndy Fiddamanextern __MANGLE__ size_t	fwrite __PROTO__((const __V_*, size_t, size_t, FILE*));
190*b4dd7d09SAndy Fiddamanextern __MANGLE__ int	getc __PROTO__((FILE*));
191*b4dd7d09SAndy Fiddamanextern __MANGLE__ int	getchar __PROTO__((void));
192*b4dd7d09SAndy Fiddamanextern __MANGLE__ char*	gets __PROTO__((char*));
193*b4dd7d09SAndy Fiddamanextern __MANGLE__ int	getw __PROTO__((FILE*));
194*b4dd7d09SAndy Fiddamanextern __MANGLE__ int	pclose __PROTO__((FILE*));
195*b4dd7d09SAndy Fiddamanextern __MANGLE__ FILE*	popen __PROTO__((const char*, const char*));
196*b4dd7d09SAndy Fiddamanextern __MANGLE__ int	printf __PROTO__((const char*, ...));
197*b4dd7d09SAndy Fiddamanextern __MANGLE__ int	putc __PROTO__((int, FILE*));
198*b4dd7d09SAndy Fiddamanextern __MANGLE__ int	putchar __PROTO__((int));
199*b4dd7d09SAndy Fiddamanextern __MANGLE__ int	puts __PROTO__((const char*));
200*b4dd7d09SAndy Fiddamanextern __MANGLE__ int	putw __PROTO__((int, FILE*));
201*b4dd7d09SAndy Fiddamanextern __MANGLE__ void	rewind __PROTO__((FILE*));
202*b4dd7d09SAndy Fiddamanextern __MANGLE__ int	scanf __PROTO__((const char*, ...));
203*b4dd7d09SAndy Fiddamanextern __MANGLE__ void	setbuf __PROTO__((FILE*, char*));
204*b4dd7d09SAndy Fiddamanextern __MANGLE__ int	setbuffer __PROTO__((FILE*, char*, int));
205*b4dd7d09SAndy Fiddamanextern __MANGLE__ int	setlinebuf __PROTO__((FILE*));
206*b4dd7d09SAndy Fiddamanextern __MANGLE__ int	setvbuf __PROTO__((FILE*, char*, int, size_t));
207*b4dd7d09SAndy Fiddamanextern __MANGLE__ int	snprintf __PROTO__((char*, int, const char*, ...));
208*b4dd7d09SAndy Fiddamanextern __MANGLE__ int	sprintf __PROTO__((char*, const char*, ...));
209*b4dd7d09SAndy Fiddamanextern __MANGLE__ int	sscanf __PROTO__((const char*, const char*, ...));
210*b4dd7d09SAndy Fiddamanextern __MANGLE__ FILE*	tmpfile __PROTO__((void));
211*b4dd7d09SAndy Fiddamanextern __MANGLE__ int	ungetc __PROTO__((int, FILE*));
212*b4dd7d09SAndy Fiddamanextern __MANGLE__ int	vasprintf __PROTO__((char**, const char*, va_list));
213*b4dd7d09SAndy Fiddamanextern __MANGLE__ int	vfprintf __PROTO__((FILE*, const char*, va_list));
214*b4dd7d09SAndy Fiddamanextern __MANGLE__ int	vfscanf __PROTO__((FILE*, const char*, va_list));
215*b4dd7d09SAndy Fiddamanextern __MANGLE__ int	vprintf __PROTO__((const char*, va_list));
216*b4dd7d09SAndy Fiddamanextern __MANGLE__ int	vscanf __PROTO__((const char*, va_list));
217*b4dd7d09SAndy Fiddamanextern __MANGLE__ int	vsnprintf __PROTO__((char*, int, const char*, va_list));
218*b4dd7d09SAndy Fiddamanextern __MANGLE__ int	vsprintf __PROTO__((char*, const char*, va_list));
219*b4dd7d09SAndy Fiddamanextern __MANGLE__ int	vsscanf __PROTO__((const char*, const char*, va_list));
220*b4dd7d09SAndy Fiddaman
221*b4dd7d09SAndy Fiddaman#if _typ_int64_t
222*b4dd7d09SAndy Fiddaman
223*b4dd7d09SAndy Fiddamanextern __MANGLE__ int		fgetpos64 __PROTO__((FILE*, fpos64_t*));
224*b4dd7d09SAndy Fiddamanextern __MANGLE__ int		fsetpos64 __PROTO__((FILE*, const fpos64_t*));
225*b4dd7d09SAndy Fiddamanextern __MANGLE__ int		fseek64 __PROTO__((FILE*, int64_t, int));
226*b4dd7d09SAndy Fiddamanextern __MANGLE__ int		fseeko64 __PROTO__((FILE*, int64_t, int));
227*b4dd7d09SAndy Fiddamanextern __MANGLE__ int64_t		ftell64 __PROTO__((FILE*));
228*b4dd7d09SAndy Fiddamanextern __MANGLE__ int64_t		ftello64 __PROTO__((FILE*));
229*b4dd7d09SAndy Fiddaman
230*b4dd7d09SAndy Fiddaman#endif
231*b4dd7d09SAndy Fiddaman
232*b4dd7d09SAndy Fiddamanextern __MANGLE__ void	clearerr_unlocked __PROTO__((FILE*));
233*b4dd7d09SAndy Fiddamanextern __MANGLE__ int	feof_unlocked __PROTO__((FILE*));
234*b4dd7d09SAndy Fiddamanextern __MANGLE__ int	ferror_unlocked __PROTO__((FILE*));
235*b4dd7d09SAndy Fiddamanextern __MANGLE__ int	fflush_unlocked __PROTO__((FILE*));
236*b4dd7d09SAndy Fiddamanextern __MANGLE__ int	fgetc_unlocked __PROTO__((FILE*));
237*b4dd7d09SAndy Fiddamanextern __MANGLE__ char*	fgets_unlocked __PROTO__((char*, int, FILE*));
238*b4dd7d09SAndy Fiddamanextern __MANGLE__ int	fileno_unlocked __PROTO__((FILE*));
239*b4dd7d09SAndy Fiddamanextern __MANGLE__ int	fputc_unlocked __PROTO__((int, FILE*));
240*b4dd7d09SAndy Fiddamanextern __MANGLE__ int	fputs_unlocked __PROTO__((char*, FILE*));
241*b4dd7d09SAndy Fiddamanextern __MANGLE__ size_t	fread_unlocked __PROTO__((__V_*, size_t, size_t, FILE*));
242*b4dd7d09SAndy Fiddamanextern __MANGLE__ size_t	fwrite_unlocked __PROTO__((__V_*, size_t, size_t, FILE*));
243*b4dd7d09SAndy Fiddamanextern __MANGLE__ int	getc_unlocked __PROTO__((FILE*));
244*b4dd7d09SAndy Fiddamanextern __MANGLE__ int	getchar_unlocked __PROTO__((void));
245*b4dd7d09SAndy Fiddamanextern __MANGLE__ int	putc_unlocked __PROTO__((int, FILE*));
246*b4dd7d09SAndy Fiddamanextern __MANGLE__ int	putchar_unlocked __PROTO__((int));
247*b4dd7d09SAndy Fiddaman
248*b4dd7d09SAndy Fiddamanextern __MANGLE__ void	flockfile __PROTO__((FILE*));
249*b4dd7d09SAndy Fiddamanextern __MANGLE__ int	ftrylockfile __PROTO__((FILE*));
250*b4dd7d09SAndy Fiddamanextern __MANGLE__ void	funlockfile __PROTO__((FILE*));
251*b4dd7d09SAndy Fiddaman
252*b4dd7d09SAndy Fiddaman#ifdef _USE_GNU
253*b4dd7d09SAndy Fiddaman
254*b4dd7d09SAndy Fiddamanextern __MANGLE__ int	fcloseall __PROTO__((void));
255*b4dd7d09SAndy Fiddamanextern __MANGLE__ FILE*	fmemopen __PROTO__((__V_*, size_t, const char*));
256*b4dd7d09SAndy Fiddamanextern __MANGLE__ ssize_t	__getdelim __PROTO__((char**, size_t*, int, FILE*));
257*b4dd7d09SAndy Fiddamanextern __MANGLE__ ssize_t	getdelim __PROTO__((char**, size_t*, int, FILE*));
258*b4dd7d09SAndy Fiddamanextern __MANGLE__ ssize_t	getline __PROTO__((char**, size_t*, FILE*));
259*b4dd7d09SAndy Fiddaman
260*b4dd7d09SAndy Fiddaman#endif
261*b4dd7d09SAndy Fiddaman
262*b4dd7d09SAndy Fiddaman#endif
263*b4dd7d09SAndy Fiddaman
264*b4dd7d09SAndy Fiddaman#ifndef FILENAME_MAX
265*b4dd7d09SAndy Fiddaman#define FILENAME_MAX	1024
266*b4dd7d09SAndy Fiddaman#endif
267*b4dd7d09SAndy Fiddaman#ifndef FOPEN_MAX
268*b4dd7d09SAndy Fiddaman#define FOPEN_MAX	20
269*b4dd7d09SAndy Fiddaman#endif
270*b4dd7d09SAndy Fiddaman#ifndef TMP_MAX
271*b4dd7d09SAndy Fiddaman#define TMP_MAX		17576
272*b4dd7d09SAndy Fiddaman#endif
273*b4dd7d09SAndy Fiddaman
274*b4dd7d09SAndy Fiddaman#define _doprnt		_ast_doprnt
275*b4dd7d09SAndy Fiddaman#define _doscan		_ast_doscan
276*b4dd7d09SAndy Fiddaman#define asprintf	_ast_asprintf
277*b4dd7d09SAndy Fiddaman#define clearerr	_ast_clearerr
278*b4dd7d09SAndy Fiddaman#define fclose		_ast_fclose
279*b4dd7d09SAndy Fiddaman#define fdopen		_ast_fdopen
280*b4dd7d09SAndy Fiddaman#define fflush		_ast_fflush
281*b4dd7d09SAndy Fiddaman#define fgetc		_ast_fgetc
282*b4dd7d09SAndy Fiddaman#define fgetpos		_ast_fgetpos
283*b4dd7d09SAndy Fiddaman#define fgetpos64	_ast_fgetpos64
284*b4dd7d09SAndy Fiddaman#define fgets		_ast_fgets
285*b4dd7d09SAndy Fiddaman#define fopen		_ast_fopen
286*b4dd7d09SAndy Fiddaman#define fprintf		_ast_fprintf
287*b4dd7d09SAndy Fiddaman#define fpurge		_ast_fpurge
288*b4dd7d09SAndy Fiddaman#define fputs		_ast_fputs
289*b4dd7d09SAndy Fiddaman#define fread		_ast_fread
290*b4dd7d09SAndy Fiddaman#define freopen		_ast_freopen
291*b4dd7d09SAndy Fiddaman#define fscanf		_ast_fscanf
292*b4dd7d09SAndy Fiddaman#define fseek		_ast_fseek
293*b4dd7d09SAndy Fiddaman#define fseek64		_ast_fseek64
294*b4dd7d09SAndy Fiddaman#define fseeko		_ast_fseeko
295*b4dd7d09SAndy Fiddaman#define fseeko64	_ast_fseeko64
296*b4dd7d09SAndy Fiddaman#define fsetpos		_ast_fsetpos
297*b4dd7d09SAndy Fiddaman#define fsetpos64	_ast_fsetpos64
298*b4dd7d09SAndy Fiddaman#define ftell		_ast_ftell
299*b4dd7d09SAndy Fiddaman#define ftell64		_ast_ftell64
300*b4dd7d09SAndy Fiddaman#define ftello		_ast_ftello
301*b4dd7d09SAndy Fiddaman#define ftello64	_ast_ftello64
302*b4dd7d09SAndy Fiddaman#define fwrite		_ast_fwrite
303*b4dd7d09SAndy Fiddaman#define gets		_ast_gets
304*b4dd7d09SAndy Fiddaman#define getw		_ast_getw
305*b4dd7d09SAndy Fiddaman#define pclose		_ast_pclose
306*b4dd7d09SAndy Fiddaman#define popen		_ast_popen
307*b4dd7d09SAndy Fiddaman#define printf		_ast_printf
308*b4dd7d09SAndy Fiddaman#define puts		_ast_puts
309*b4dd7d09SAndy Fiddaman#define putw		_ast_putw
310*b4dd7d09SAndy Fiddaman#define rewind		_ast_rewind
311*b4dd7d09SAndy Fiddaman#define scanf		_ast_scanf
312*b4dd7d09SAndy Fiddaman#define setbuf		_ast_setbuf
313*b4dd7d09SAndy Fiddaman#undef	setbuffer
314*b4dd7d09SAndy Fiddaman#define setbuffer	_ast_setbuffer
315*b4dd7d09SAndy Fiddaman#define setlinebuf	_ast_setlinebuf
316*b4dd7d09SAndy Fiddaman#define setvbuf		_ast_setvbuf
317*b4dd7d09SAndy Fiddaman#define snprintf	_ast_snprintf
318*b4dd7d09SAndy Fiddaman#define sprintf		_ast_sprintf
319*b4dd7d09SAndy Fiddaman#define sscanf		_ast_sscanf
320*b4dd7d09SAndy Fiddaman#define tmpfile		_ast_tmpfile
321*b4dd7d09SAndy Fiddaman#define ungetc		_ast_ungetc
322*b4dd7d09SAndy Fiddaman#define vasprintf	_ast_vasprintf
323*b4dd7d09SAndy Fiddaman#define vfprintf	_ast_vfprintf
324*b4dd7d09SAndy Fiddaman#define vfscanf		_ast_vfscanf
325*b4dd7d09SAndy Fiddaman#define vprintf		_ast_vprintf
326*b4dd7d09SAndy Fiddaman#define vscanf		_ast_vscanf
327*b4dd7d09SAndy Fiddaman#define vsnprintf	_ast_vsnprintf
328*b4dd7d09SAndy Fiddaman#define vsprintf	_ast_vsprintf
329*b4dd7d09SAndy Fiddaman#define vsscanf		_ast_vsscanf
330*b4dd7d09SAndy Fiddaman#define fcloseall	_ast_fcloseall
331*b4dd7d09SAndy Fiddaman#define _filbuf		_ast__filbuf
332*b4dd7d09SAndy Fiddaman#define fmemopen	_ast_fmemopen
333*b4dd7d09SAndy Fiddaman#define __getdelim	_ast___getdelim
334*b4dd7d09SAndy Fiddaman#define getdelim	_ast_getdelim
335*b4dd7d09SAndy Fiddaman#define getline		_ast_getline
336*b4dd7d09SAndy Fiddaman#define clearerr_unlocked _ast_clearerr_unlocked
337*b4dd7d09SAndy Fiddaman#define feof_unlocked	_ast_feof_unlocked
338*b4dd7d09SAndy Fiddaman#define ferror_unlocked	_ast_ferror_unlocked
339*b4dd7d09SAndy Fiddaman#define fflush_unlocked	_ast_fflush_unlocked
340*b4dd7d09SAndy Fiddaman#define fgetc_unlocked	_ast_fgetc_unlocked
341*b4dd7d09SAndy Fiddaman#define fgets_unlocked	_ast_fgets_unlocked
342*b4dd7d09SAndy Fiddaman#define fileno_unlocked	_ast_fileno_unlocked
343*b4dd7d09SAndy Fiddaman#define fputc_unlocked	_ast_fputc_unlocked
344*b4dd7d09SAndy Fiddaman#define fputs_unlocked	_ast_fputs_unlocked
345*b4dd7d09SAndy Fiddaman#define fread_unlocked	_ast_fread_unlocked
346*b4dd7d09SAndy Fiddaman#define fwrite_unlocked	_ast_fwrite_unlocked
347*b4dd7d09SAndy Fiddaman#define getc_unlocked	_ast_getc_unlocked
348*b4dd7d09SAndy Fiddaman#define getchar_unlocked _ast_getchar_unlocked
349*b4dd7d09SAndy Fiddaman#define putc_unlocked	_ast_putc_unlocked
350*b4dd7d09SAndy Fiddaman#define putchar_unlocked _ast_putchar_unlocked
351*b4dd7d09SAndy Fiddaman#define flockfile	_ast_flockfile
352*b4dd7d09SAndy Fiddaman#define ftrylockfile	_ast_ftrylockfile
353*b4dd7d09SAndy Fiddaman#define funlockfile	_ast_funlockfile
354*b4dd7d09SAndy Fiddaman
355*b4dd7d09SAndy Fiddaman#if defined(__STDPP__directive) && defined(__STDPP__initial)
356*b4dd7d09SAndy Fiddaman__STDPP__directive pragma pp:initial
357*b4dd7d09SAndy Fiddaman#endif
358*b4dd7d09SAndy Fiddaman#ifndef P_tmpdir
359*b4dd7d09SAndy Fiddaman#define P_tmpdir "/var/tmp/" /*NOCATLITERAL*/
360*b4dd7d09SAndy Fiddaman#endif
361*b4dd7d09SAndy Fiddaman#ifndef L_ctermid
362*b4dd7d09SAndy Fiddaman#define L_ctermid 9
363*b4dd7d09SAndy Fiddaman#endif
364*b4dd7d09SAndy Fiddaman#ifndef L_tmpnam
365*b4dd7d09SAndy Fiddaman#define L_tmpnam 25
366*b4dd7d09SAndy Fiddaman#endif
367*b4dd7d09SAndy Fiddaman#if defined(__STDPP__directive) && defined(__STDPP__initial)
368*b4dd7d09SAndy Fiddaman__STDPP__directive pragma pp:noinitial
369*b4dd7d09SAndy Fiddaman#endif
370*b4dd7d09SAndy Fiddaman#if defined(__cplusplus) && defined(__THROW)
371*b4dd7d09SAndy Fiddamanextern __MANGLE__ char*	ctermid(char*) __THROW;
372*b4dd7d09SAndy Fiddaman#else
373*b4dd7d09SAndy Fiddamanextern __MANGLE__ char*	ctermid __PROTO__((char*));
374*b4dd7d09SAndy Fiddaman#endif
375*b4dd7d09SAndy Fiddamanextern __MANGLE__ char*	tmpnam __PROTO__((char*));
376*b4dd7d09SAndy Fiddamanextern __MANGLE__ char*	tempnam __PROTO__((const char*, const char*));
377*b4dd7d09SAndy Fiddamanextern __MANGLE__ void	perror __PROTO__((const char*));
378*b4dd7d09SAndy Fiddaman#ifndef _AST_STD_H
379*b4dd7d09SAndy Fiddaman#ifndef remove
380*b4dd7d09SAndy Fiddamanextern __MANGLE__ int	remove __PROTO__((const char*));
381*b4dd7d09SAndy Fiddaman#endif
382*b4dd7d09SAndy Fiddaman#ifndef rename
383*b4dd7d09SAndy Fiddamanextern __MANGLE__ int	rename __PROTO__((const char*, const char*));
384*b4dd7d09SAndy Fiddaman#endif
385*b4dd7d09SAndy Fiddaman#endif
386*b4dd7d09SAndy Fiddaman
387*b4dd7d09SAndy Fiddaman#undef __MANGLE__
388*b4dd7d09SAndy Fiddaman#define __MANGLE__ __LINKAGE__
389*b4dd7d09SAndy Fiddaman
390*b4dd7d09SAndy Fiddaman#if _BLD_ast && defined(__EXPORT__)
391*b4dd7d09SAndy Fiddaman#undef __MANGLE__
392*b4dd7d09SAndy Fiddaman#define __MANGLE__ __LINKAGE__		__EXPORT__
393*b4dd7d09SAndy Fiddaman#endif
394*b4dd7d09SAndy Fiddaman
395*b4dd7d09SAndy Fiddamanextern __MANGLE__ int	_doprnt __PROTO__((const char*, va_list, FILE*));
396*b4dd7d09SAndy Fiddamanextern __MANGLE__ int	_doscan __PROTO__((FILE*, const char*, va_list));
397*b4dd7d09SAndy Fiddamanextern __MANGLE__ int	asprintf __PROTO__((char**, const char*, ...));
398*b4dd7d09SAndy Fiddamanextern __MANGLE__ int	clearerr __PROTO__((FILE*));
399*b4dd7d09SAndy Fiddamanextern __MANGLE__ int	fclose __PROTO__((FILE*));
400*b4dd7d09SAndy Fiddamanextern __MANGLE__ FILE*	fdopen __PROTO__((int, const char*));
401*b4dd7d09SAndy Fiddamanextern __MANGLE__ int	feof __PROTO__((FILE*));
402*b4dd7d09SAndy Fiddamanextern __MANGLE__ int	ferror __PROTO__((FILE*));
403*b4dd7d09SAndy Fiddamanextern __MANGLE__ int	fflush __PROTO__((FILE*));
404*b4dd7d09SAndy Fiddamanextern __MANGLE__ int	fgetc __PROTO__((FILE*));
405*b4dd7d09SAndy Fiddamanextern __MANGLE__ int	fgetpos __PROTO__((FILE*, fpos_t*));
406*b4dd7d09SAndy Fiddamanextern __MANGLE__ char*	fgets __PROTO__((char*, int, FILE*));
407*b4dd7d09SAndy Fiddamanextern __MANGLE__ int	fileno __PROTO__((FILE*));
408*b4dd7d09SAndy Fiddamanextern __MANGLE__ FILE*	fopen __PROTO__((const char*, const char*));
409*b4dd7d09SAndy Fiddamanextern __MANGLE__ int	fprintf __PROTO__((FILE*, const char*, ...));
410*b4dd7d09SAndy Fiddamanextern __MANGLE__ int	fpurge __PROTO__((FILE*));
411*b4dd7d09SAndy Fiddamanextern __MANGLE__ int	fputc __PROTO__((int, FILE*));
412*b4dd7d09SAndy Fiddamanextern __MANGLE__ int	fputs __PROTO__((const char*, FILE*));
413*b4dd7d09SAndy Fiddamanextern __MANGLE__ size_t	fread __PROTO__((__V_*, size_t, size_t, FILE*));
414*b4dd7d09SAndy Fiddamanextern __MANGLE__ FILE*	freopen __PROTO__((const char*, const char*, FILE*));
415*b4dd7d09SAndy Fiddamanextern __MANGLE__ int	fscanf __PROTO__((FILE*, const char*, ...));
416*b4dd7d09SAndy Fiddamanextern __MANGLE__ int	fseek __PROTO__((FILE*, long, int));
417*b4dd7d09SAndy Fiddamanextern __MANGLE__ int	fseeko __PROTO__((FILE*, off_t, int));
418*b4dd7d09SAndy Fiddamanextern __MANGLE__ int	fsetpos __PROTO__((FILE*, const fpos_t*));
419*b4dd7d09SAndy Fiddamanextern __MANGLE__ long	ftell __PROTO__((FILE*));
420*b4dd7d09SAndy Fiddamanextern __MANGLE__ off_t	ftello __PROTO__((FILE*));
421*b4dd7d09SAndy Fiddamanextern __MANGLE__ size_t	fwrite __PROTO__((const __V_*, size_t, size_t, FILE*));
422*b4dd7d09SAndy Fiddamanextern __MANGLE__ int	getc __PROTO__((FILE*));
423*b4dd7d09SAndy Fiddamanextern __MANGLE__ int	getchar __PROTO__((void));
424*b4dd7d09SAndy Fiddamanextern __MANGLE__ char*	gets __PROTO__((char*));
425*b4dd7d09SAndy Fiddamanextern __MANGLE__ int	getw __PROTO__((FILE*));
426*b4dd7d09SAndy Fiddamanextern __MANGLE__ int	pclose __PROTO__((FILE*));
427*b4dd7d09SAndy Fiddamanextern __MANGLE__ FILE*	popen __PROTO__((const char*, const char*));
428*b4dd7d09SAndy Fiddamanextern __MANGLE__ int	printf __PROTO__((const char*, ...));
429*b4dd7d09SAndy Fiddamanextern __MANGLE__ int	putc __PROTO__((int, FILE*));
430*b4dd7d09SAndy Fiddamanextern __MANGLE__ int	putchar __PROTO__((int));
431*b4dd7d09SAndy Fiddamanextern __MANGLE__ int	puts __PROTO__((const char*));
432*b4dd7d09SAndy Fiddamanextern __MANGLE__ int	putw __PROTO__((int, FILE*));
433*b4dd7d09SAndy Fiddamanextern __MANGLE__ void	rewind __PROTO__((FILE*));
434*b4dd7d09SAndy Fiddamanextern __MANGLE__ int	scanf __PROTO__((const char*, ...));
435*b4dd7d09SAndy Fiddamanextern __MANGLE__ void	setbuf __PROTO__((FILE*, char*));
436*b4dd7d09SAndy Fiddamanextern __MANGLE__ int	setbuffer __PROTO__((FILE*, char*, int));
437*b4dd7d09SAndy Fiddamanextern __MANGLE__ int	setlinebuf __PROTO__((FILE*));
438*b4dd7d09SAndy Fiddamanextern __MANGLE__ int	setvbuf __PROTO__((FILE*, char*, int, size_t));
439*b4dd7d09SAndy Fiddamanextern __MANGLE__ int	snprintf __PROTO__((char*, int, const char*, ...));
440*b4dd7d09SAndy Fiddamanextern __MANGLE__ int	sprintf __PROTO__((char*, const char*, ...));
441*b4dd7d09SAndy Fiddamanextern __MANGLE__ int	sscanf __PROTO__((const char*, const char*, ...));
442*b4dd7d09SAndy Fiddamanextern __MANGLE__ FILE*	tmpfile __PROTO__((void));
443*b4dd7d09SAndy Fiddamanextern __MANGLE__ int	ungetc __PROTO__((int, FILE*));
444*b4dd7d09SAndy Fiddamanextern __MANGLE__ int	vasprintf __PROTO__((char**, const char*, va_list));
445*b4dd7d09SAndy Fiddamanextern __MANGLE__ int	vfprintf __PROTO__((FILE*, const char*, va_list));
446*b4dd7d09SAndy Fiddamanextern __MANGLE__ int	vfscanf __PROTO__((FILE*, const char*, va_list));
447*b4dd7d09SAndy Fiddamanextern __MANGLE__ int	vprintf __PROTO__((const char*, va_list));
448*b4dd7d09SAndy Fiddamanextern __MANGLE__ int	vscanf __PROTO__((const char*, va_list));
449*b4dd7d09SAndy Fiddamanextern __MANGLE__ int	vsnprintf __PROTO__((char*, int, const char*, va_list));
450*b4dd7d09SAndy Fiddamanextern __MANGLE__ int	vsprintf __PROTO__((char*, const char*, va_list));
451*b4dd7d09SAndy Fiddamanextern __MANGLE__ int	vsscanf __PROTO__((const char*, const char*, va_list));
452*b4dd7d09SAndy Fiddaman
453*b4dd7d09SAndy Fiddaman#if _typ_int64_t
454*b4dd7d09SAndy Fiddaman
455*b4dd7d09SAndy Fiddamanextern __MANGLE__ int		fgetpos64 __PROTO__((FILE*, fpos64_t*));
456*b4dd7d09SAndy Fiddamanextern __MANGLE__ int		fsetpos64 __PROTO__((FILE*, const fpos64_t*));
457*b4dd7d09SAndy Fiddamanextern __MANGLE__ int		fseek64 __PROTO__((FILE*, int64_t, int));
458*b4dd7d09SAndy Fiddamanextern __MANGLE__ int		fseeko64 __PROTO__((FILE*, int64_t, int));
459*b4dd7d09SAndy Fiddamanextern __MANGLE__ int64_t		ftell64 __PROTO__((FILE*));
460*b4dd7d09SAndy Fiddamanextern __MANGLE__ int64_t		ftello64 __PROTO__((FILE*));
461*b4dd7d09SAndy Fiddaman
462*b4dd7d09SAndy Fiddaman#ifdef _LARGEFILE64_SOURCE
463*b4dd7d09SAndy Fiddaman
464*b4dd7d09SAndy Fiddaman#undef	fpos_t
465*b4dd7d09SAndy Fiddaman#undef	off_t
466*b4dd7d09SAndy Fiddaman#undef	fgetpos
467*b4dd7d09SAndy Fiddaman#undef	fsetpos
468*b4dd7d09SAndy Fiddaman#undef	fseek
469*b4dd7d09SAndy Fiddaman#undef	fseeko
470*b4dd7d09SAndy Fiddaman#undef	ftell
471*b4dd7d09SAndy Fiddaman#undef	ftello
472*b4dd7d09SAndy Fiddaman
473*b4dd7d09SAndy Fiddaman#define	fpos_t		fpos64_t
474*b4dd7d09SAndy Fiddaman#if _typ_off64_t
475*b4dd7d09SAndy Fiddaman#define	off_t		off64_t
476*b4dd7d09SAndy Fiddaman#else
477*b4dd7d09SAndy Fiddaman#define	off_t		int64_t
478*b4dd7d09SAndy Fiddaman#endif
479*b4dd7d09SAndy Fiddaman
480*b4dd7d09SAndy Fiddaman#define fgetpos		fgetpos64
481*b4dd7d09SAndy Fiddaman#define fsetpos		fsetpos64
482*b4dd7d09SAndy Fiddaman#define	fseek		fseek64
483*b4dd7d09SAndy Fiddaman#define	fseeko		fseeko64
484*b4dd7d09SAndy Fiddaman#define ftell		ftell64
485*b4dd7d09SAndy Fiddaman#define ftello		ftello64
486*b4dd7d09SAndy Fiddaman
487*b4dd7d09SAndy Fiddaman#endif
488*b4dd7d09SAndy Fiddaman
489*b4dd7d09SAndy Fiddaman#endif
490*b4dd7d09SAndy Fiddaman
491*b4dd7d09SAndy Fiddamanextern __MANGLE__ void	clearerr_unlocked __PROTO__((FILE*));
492*b4dd7d09SAndy Fiddamanextern __MANGLE__ int	feof_unlocked __PROTO__((FILE*));
493*b4dd7d09SAndy Fiddamanextern __MANGLE__ int	ferror_unlocked __PROTO__((FILE*));
494*b4dd7d09SAndy Fiddamanextern __MANGLE__ int	fflush_unlocked __PROTO__((FILE*));
495*b4dd7d09SAndy Fiddamanextern __MANGLE__ int	fgetc_unlocked __PROTO__((FILE*));
496*b4dd7d09SAndy Fiddamanextern __MANGLE__ char*	fgets_unlocked __PROTO__((char*, int, FILE*));
497*b4dd7d09SAndy Fiddamanextern __MANGLE__ int	fileno_unlocked __PROTO__((FILE*));
498*b4dd7d09SAndy Fiddamanextern __MANGLE__ int	fputc_unlocked __PROTO__((int, FILE*));
499*b4dd7d09SAndy Fiddamanextern __MANGLE__ int	fputs_unlocked __PROTO__((char*, FILE*));
500*b4dd7d09SAndy Fiddamanextern __MANGLE__ size_t	fread_unlocked __PROTO__((__V_*, size_t, size_t, FILE*));
501*b4dd7d09SAndy Fiddamanextern __MANGLE__ size_t	fwrite_unlocked __PROTO__((__V_*, size_t, size_t, FILE*));
502*b4dd7d09SAndy Fiddamanextern __MANGLE__ int	getc_unlocked __PROTO__((FILE*));
503*b4dd7d09SAndy Fiddamanextern __MANGLE__ int	getchar_unlocked __PROTO__((void));
504*b4dd7d09SAndy Fiddamanextern __MANGLE__ int	putc_unlocked __PROTO__((int, FILE*));
505*b4dd7d09SAndy Fiddamanextern __MANGLE__ int	putchar_unlocked __PROTO__((int));
506*b4dd7d09SAndy Fiddaman
507*b4dd7d09SAndy Fiddaman#ifdef _USE_GNU
508*b4dd7d09SAndy Fiddaman
509*b4dd7d09SAndy Fiddamanextern __MANGLE__ int	fcloseall __PROTO__((void));
510*b4dd7d09SAndy Fiddamanextern __MANGLE__ FILE*	fmemopen __PROTO__((__V_*, size_t, const char*));
511*b4dd7d09SAndy Fiddamanextern __MANGLE__ ssize_t	__getdelim __PROTO__((char**, size_t*, int, FILE*));
512*b4dd7d09SAndy Fiddamanextern __MANGLE__ ssize_t	getdelim __PROTO__((char**, size_t*, int, FILE*));
513*b4dd7d09SAndy Fiddamanextern __MANGLE__ ssize_t	getline __PROTO__((char**, size_t*, FILE*));
514*b4dd7d09SAndy Fiddaman
515*b4dd7d09SAndy Fiddaman#endif
516*b4dd7d09SAndy Fiddaman
517*b4dd7d09SAndy Fiddaman#undef __MANGLE__
518*b4dd7d09SAndy Fiddaman#define __MANGLE__ __LINKAGE__
519*b4dd7d09SAndy Fiddaman
520*b4dd7d09SAndy Fiddaman#if _BLD_DLL && _DLL_INDIRECT_DATA
521*b4dd7d09SAndy Fiddaman
522*b4dd7d09SAndy Fiddaman#define stdin		((FILE*)_ast_dll->_ast_stdin)
523*b4dd7d09SAndy Fiddaman#define stdout		((FILE*)_ast_dll->_ast_stdout)
524*b4dd7d09SAndy Fiddaman#define stderr		((FILE*)_ast_dll->_ast_stderr)
525*b4dd7d09SAndy Fiddaman
526*b4dd7d09SAndy Fiddaman#else
527*b4dd7d09SAndy Fiddaman
528*b4dd7d09SAndy Fiddaman#define	stdin		(&_Sfstdin)
529*b4dd7d09SAndy Fiddaman#define	stdout		(&_Sfstdout)
530*b4dd7d09SAndy Fiddaman#define	stderr		(&_Sfstderr)
531*b4dd7d09SAndy Fiddaman
532*b4dd7d09SAndy Fiddaman#endif
533*b4dd7d09SAndy Fiddaman
534*b4dd7d09SAndy Fiddaman#if defined(_AST_H) || defined(_SFIO_H)
535*b4dd7d09SAndy Fiddaman
536*b4dd7d09SAndy Fiddaman#define feof(f)		sfeof(f)
537*b4dd7d09SAndy Fiddaman#define ferror(f)	sferror(f)
538*b4dd7d09SAndy Fiddaman#define fileno(f)	sffileno(f)
539*b4dd7d09SAndy Fiddaman#define fputc(c,f)	sfputc(f,c)
540*b4dd7d09SAndy Fiddaman#define getc(f)		sfgetc(f)
541*b4dd7d09SAndy Fiddaman#define getchar()	sfgetc(sfstdin)
542*b4dd7d09SAndy Fiddaman#define putc(c,f)	sfputc(f,c)
543*b4dd7d09SAndy Fiddaman#define putchar(c)	sfputc(sfstdout,c)
544*b4dd7d09SAndy Fiddaman
545*b4dd7d09SAndy Fiddaman#else
546*b4dd7d09SAndy Fiddaman
547*b4dd7d09SAndy Fiddaman#if !_UWIN
548*b4dd7d09SAndy Fiddaman#if _BLD_ast && defined(__EXPORT__)
549*b4dd7d09SAndy Fiddaman#undef __MANGLE__
550*b4dd7d09SAndy Fiddaman#define __MANGLE__ __LINKAGE__ __EXPORT__
551*b4dd7d09SAndy Fiddaman#endif
552*b4dd7d09SAndy Fiddaman#if !_BLD_ast && defined(__IMPORT__)
553*b4dd7d09SAndy Fiddaman#undef __MANGLE__
554*b4dd7d09SAndy Fiddaman#define __MANGLE__ __LINKAGE__ __IMPORT__
555*b4dd7d09SAndy Fiddaman#endif
556*b4dd7d09SAndy Fiddaman#endif
557*b4dd7d09SAndy Fiddaman
558*b4dd7d09SAndy Fiddamanextern __MANGLE__ FILE	_Sfstdin;
559*b4dd7d09SAndy Fiddamanextern __MANGLE__ FILE	_Sfstdout;
560*b4dd7d09SAndy Fiddamanextern __MANGLE__ FILE	_Sfstderr;
561*b4dd7d09SAndy Fiddaman
562*b4dd7d09SAndy Fiddaman#undef __MANGLE__
563*b4dd7d09SAndy Fiddaman#define __MANGLE__ __LINKAGE__
564*b4dd7d09SAndy Fiddaman
565*b4dd7d09SAndy Fiddaman#define feof(f)		(_sf_(f)->_flags&_SF_EOF)
566*b4dd7d09SAndy Fiddaman#define ferror(f)	(_sf_(f)->_flags&_SF_ERROR)
567*b4dd7d09SAndy Fiddaman#define fileno(f)	(_sf_(f)->_file)
568*b4dd7d09SAndy Fiddaman#define fputc(c,f)	(_sf_(f)->_next>=_sf_(f)->_endw?_sfflsbuf(_sf_(f),(int)((unsigned char)(c))):(int)(*_sf_(f)->_next++=(unsigned char)(c)))
569*b4dd7d09SAndy Fiddaman#define getc(f)		(_sf_(f)->_next>=_sf_(f)->_endr?_sffilbuf(_sf_(f),0):(int)(*_sf_(f)->_next++))
570*b4dd7d09SAndy Fiddaman#define getchar()	getc(stdin)
571*b4dd7d09SAndy Fiddaman#define putc(c,f)	fputc(c,f)
572*b4dd7d09SAndy Fiddaman#define putchar(c)	fputc(c,stdout)
573*b4dd7d09SAndy Fiddaman
574*b4dd7d09SAndy Fiddaman#if _BLD_ast && defined(__EXPORT__)
575*b4dd7d09SAndy Fiddaman#undef __MANGLE__
576*b4dd7d09SAndy Fiddaman#define __MANGLE__ __LINKAGE__		__EXPORT__
577*b4dd7d09SAndy Fiddaman#endif
578*b4dd7d09SAndy Fiddaman
579*b4dd7d09SAndy Fiddamanextern __MANGLE__ int		_sffilbuf __PROTO__((FILE*, int));
580*b4dd7d09SAndy Fiddamanextern __MANGLE__ int		_sfflsbuf __PROTO__((FILE*, int));
581*b4dd7d09SAndy Fiddaman
582*b4dd7d09SAndy Fiddaman#undef __MANGLE__
583*b4dd7d09SAndy Fiddaman#define __MANGLE__ __LINKAGE__
584*b4dd7d09SAndy Fiddaman
585*b4dd7d09SAndy Fiddaman#endif
586*b4dd7d09SAndy Fiddaman
587*b4dd7d09SAndy Fiddaman#endif
588