KJK::Hyperion is proud to present "dllimport purity", another landmark commit that...
[reactos.git] / reactos / include / crt / stdio.h
1 /*
2 * stdio.h
3 * This file has no copyright assigned and is placed in the Public Domain.
4 * This file is a part of the mingw-runtime package.
5 * No warranty is given; refer to the file DISCLAIMER within the package.
6 *
7 * Definitions of types and prototypes of functions for standard input and
8 * output.
9 *
10 * NOTE: The file manipulation functions provided by Microsoft seem to
11 * work with either slash (/) or backslash (\) as the directory separator.
12 *
13 */
14
15 #ifndef _STDIO_H_
16 #define _STDIO_H_
17
18 /* All the headers include this file. */
19 #include <_mingw.h>
20
21 #ifndef RC_INVOKED
22 #define __need_size_t
23 #define __need_NULL
24 #define __need_wchar_t
25 #define __need_wint_t
26 #include <stddef.h>
27 #define __need___va_list
28 #include <stdarg.h>
29 #endif /* Not RC_INVOKED */
30
31
32 /* Flags for the iobuf structure */
33 #define _IOREAD 0x0001 /* currently reading */
34 #define _IOWRT 0x0002 /* currently writing */
35 #define _IOMYBUF 0x0008 /* stdio malloc()'d buffer */
36 #define _IOEOF 0x0010 /* EOF reached on read */
37 #define _IOERR 0x0020 /* I/O error from system */
38 #define _IOSTRG 0x0040 /* Strange or no file descriptor */
39 #define _IORW 0x0080 /* opened as "r+w" */
40 #ifdef _POSIX_SOURCE
41 # define _IOAPPEND 0x0200
42 #endif
43
44
45 /*
46 * The three standard file pointers provided by the run time library.
47 * NOTE: These will go to the bit-bucket silently in GUI applications!
48 */
49 #define STDIN_FILENO 0
50 #define STDOUT_FILENO 1
51 #define STDERR_FILENO 2
52
53 /* Returned by various functions on end of file condition or error. */
54 #define EOF (-1)
55
56 /*
57 * The maximum length of a file name. You should use GetVolumeInformation
58 * instead of this constant. But hey, this works.
59 * Also defined in io.h.
60 */
61 #ifndef FILENAME_MAX
62 #define FILENAME_MAX (260)
63 #endif
64
65 /*
66 * The maximum number of files that may be open at once. I have set this to
67 * a conservative number. The actual value may be higher.
68 */
69 #define FOPEN_MAX (20)
70
71 /* After creating this many names, tmpnam and tmpfile return NULL */
72 #define TMP_MAX 32767
73 /*
74 * Tmpnam, tmpfile and, sometimes, _tempnam try to create
75 * temp files in the root directory of the current drive
76 * (not in pwd, as suggested by some older MS doc's).
77 * Redefining these macros does not effect the CRT functions.
78 */
79 #define _P_tmpdir "\\"
80 #ifndef __STRICT_ANSI__
81 #define P_tmpdir _P_tmpdir
82 #endif
83 #define _wP_tmpdir L"\\"
84
85 /*
86 * The maximum size of name (including NUL) that will be put in the user
87 * supplied buffer caName for tmpnam.
88 * Inferred from the size of the static buffer returned by tmpnam
89 * when passed a NULL argument. May actually be smaller.
90 */
91 #define L_tmpnam (16)
92
93 #define _IOFBF 0x0000 /* full buffered */
94 #define _IOLBF 0x0040 /* line buffered */
95 #define _IONBF 0x0004 /* not buffered */
96
97 /*
98 * The buffer size as used by setbuf such that it is equivalent to
99 * (void) setvbuf(fileSetBuffer, caBuffer, _IOFBF, BUFSIZ).
100 */
101 #define BUFSIZ 512
102
103 /* Constants for nOrigin indicating the position relative to which fseek
104 * sets the file position. Defined unconditionally since ISO and POSIX
105 * say they are defined here. */
106 #define SEEK_SET 0
107 #define SEEK_CUR 1
108 #define SEEK_END 2
109
110 #ifndef RC_INVOKED
111
112 #ifndef __VALIST
113 #ifdef __GNUC__
114 #define __VALIST __gnuc_va_list
115 #else
116 #define __VALIST char*
117 #endif
118 #endif /* defined __VALIST */
119
120 /*
121 * The structure underlying the FILE type.
122 *
123 * Some believe that nobody in their right mind should make use of the
124 * internals of this structure. Provided by Pedro A. Aranda Gutiirrez
125 * <paag@tid.es>.
126 */
127 #ifndef _FILE_DEFINED
128 #define _FILE_DEFINED
129 typedef struct _iobuf
130 {
131 char* _ptr;
132 int _cnt;
133 char* _base;
134 int _flag;
135 int _file;
136 int _charbuf;
137 int _bufsiz;
138 char* _tmpfname;
139 } FILE;
140 #endif /* Not _FILE_DEFINED */
141
142
143 /*
144 * The standard file handles
145 */
146 #ifndef __DECLSPEC_SUPPORTED
147
148 extern FILE (*_imp___iob)[]; /* A pointer to an array of FILE */
149
150 #define _iob (*_imp___iob) /* An array of FILE */
151
152 #else /* __DECLSPEC_SUPPORTED */
153
154 __MINGW_IMPORT FILE _iob[]; /* An array of FILE imported from DLL. */
155
156 #endif /* __DECLSPEC_SUPPORTED */
157
158 #define stdin (&_iob[STDIN_FILENO])
159 #define stdout (&_iob[STDOUT_FILENO])
160 #define stderr (&_iob[STDERR_FILENO])
161
162 #ifdef __cplusplus
163 extern "C" {
164 #endif
165
166 /*
167 * File Operations
168 */
169 _CRTIMP FILE* __cdecl __MINGW_NOTHROW fopen (const char*, const char*);
170 _CRTIMP FILE* __cdecl __MINGW_NOTHROW freopen (const char*, const char*, FILE*);
171 _CRTIMP int __cdecl __MINGW_NOTHROW fflush (FILE*);
172 _CRTIMP int __cdecl __MINGW_NOTHROW fclose (FILE*);
173 /* MS puts remove & rename (but not wide versions) in io.h also */
174 _CRTIMP int __cdecl __MINGW_NOTHROW remove (const char*);
175 _CRTIMP int __cdecl __MINGW_NOTHROW rename (const char*, const char*);
176 _CRTIMP FILE* __cdecl __MINGW_NOTHROW tmpfile (void);
177 _CRTIMP char* __cdecl __MINGW_NOTHROW tmpnam (char*);
178
179 #ifndef __STRICT_ANSI__
180 _CRTIMP char* __cdecl __MINGW_NOTHROW _tempnam (const char*, const char*);
181 _CRTIMP int __cdecl __MINGW_NOTHROW _rmtmp(void);
182 _CRTIMP int __cdecl __MINGW_NOTHROW _unlink (const char*);
183
184 #ifndef NO_OLDNAMES
185 _CRTIMP char* __cdecl __MINGW_NOTHROW tempnam (const char*, const char*);
186 _CRTIMP int __cdecl __MINGW_NOTHROW rmtmp(void);
187 _CRTIMP int __cdecl __MINGW_NOTHROW unlink (const char*);
188 #endif
189 #endif /* __STRICT_ANSI__ */
190
191 _CRTIMP int __cdecl __MINGW_NOTHROW setvbuf (FILE*, char*, int, size_t);
192
193 _CRTIMP void __cdecl __MINGW_NOTHROW setbuf (FILE*, char*);
194
195 /*
196 * Formatted Output
197 */
198
199 _CRTIMP int __cdecl __MINGW_NOTHROW fprintf (FILE*, const char*, ...);
200 _CRTIMP int __cdecl __MINGW_NOTHROW printf (const char*, ...);
201 _CRTIMP int __cdecl __MINGW_NOTHROW sprintf (char*, const char*, ...);
202 _CRTIMP int __cdecl __MINGW_NOTHROW _snprintf (char*, size_t, const char*, ...);
203 _CRTIMP int __cdecl __MINGW_NOTHROW vfprintf (FILE*, const char*, __VALIST);
204 _CRTIMP int __cdecl __MINGW_NOTHROW vprintf (const char*, __VALIST);
205 _CRTIMP int __cdecl __MINGW_NOTHROW vsprintf (char*, const char*, __VALIST);
206 _CRTIMP int __cdecl __MINGW_NOTHROW _vsnprintf (char*, size_t, const char*, __VALIST);
207
208 #ifndef __NO_ISOCEXT
209 __CRT_INLINE int __cdecl __MINGW_NOTHROW snprintf(char * s, size_t n, const char * f, ...)
210 {
211 int r;
212 __VALIST a;
213 __mingw_va_start(a, f);
214 r = _vsnprintf (s, n, f, a);
215 __mingw_va_end(a);
216 return r;
217 }
218
219 __CRT_INLINE int __cdecl __MINGW_NOTHROW vsnprintf (char * s, size_t n, const char * f, __VALIST a)
220 {
221 return _vsnprintf (s, n, f, a);
222 }
223
224 int __cdecl __MINGW_NOTHROW vscanf (const char * __restrict__ f, __VALIST a);
225 int __cdecl __MINGW_NOTHROW vfscanf (FILE * __restrict__ o, const char * __restrict__ f,
226 __VALIST a);
227 int __cdecl __MINGW_NOTHROW vsscanf (const char * __restrict__ s,
228 const char * __restrict__ f, __VALIST a);
229 #endif
230
231 /*
232 * Formatted Input
233 */
234
235 _CRTIMP int __cdecl __MINGW_NOTHROW fscanf (FILE*, const char*, ...);
236 _CRTIMP int __cdecl __MINGW_NOTHROW scanf (const char*, ...);
237 _CRTIMP int __cdecl __MINGW_NOTHROW sscanf (const char*, const char*, ...);
238 /*
239 * Character Input and Output Functions
240 */
241
242 _CRTIMP int __cdecl __MINGW_NOTHROW fgetc (FILE*);
243 _CRTIMP char* __cdecl __MINGW_NOTHROW fgets (char*, int, FILE*);
244 _CRTIMP int __cdecl __MINGW_NOTHROW fputc (int, FILE*);
245 _CRTIMP int __cdecl __MINGW_NOTHROW fputs (const char*, FILE*);
246 _CRTIMP char* __cdecl __MINGW_NOTHROW gets (char*);
247 _CRTIMP int __cdecl __MINGW_NOTHROW puts (const char*);
248 _CRTIMP int __cdecl __MINGW_NOTHROW ungetc (int, FILE*);
249
250 /* Traditionally, getc and putc are defined as macros. but the
251 standard doesn't say that they must be macros.
252 We use inline functions here to allow the fast versions
253 to be used in C++ with namespace qualification, eg., ::getc.
254
255 _filbuf and _flsbuf are not thread-safe. */
256 _CRTIMP int __cdecl __MINGW_NOTHROW _filbuf (FILE*);
257 _CRTIMP int __cdecl __MINGW_NOTHROW _flsbuf (int, FILE*);
258
259 #if !defined _MT
260
261 __CRT_INLINE int __cdecl __MINGW_NOTHROW getc (FILE* __F)
262 {
263 return (--__F->_cnt >= 0)
264 ? (int) (unsigned char) *__F->_ptr++
265 : _filbuf (__F);
266 }
267
268 __CRT_INLINE int __cdecl __MINGW_NOTHROW putc (int __c, FILE* __F)
269 {
270 return (--__F->_cnt >= 0)
271 ? (int) (unsigned char) (*__F->_ptr++ = (char)__c)
272 : _flsbuf (__c, __F);
273 }
274
275 __CRT_INLINE int __cdecl __MINGW_NOTHROW getchar (void)
276 {
277 return (--stdin->_cnt >= 0)
278 ? (int) (unsigned char) *stdin->_ptr++
279 : _filbuf (stdin);
280 }
281
282 __CRT_INLINE int __cdecl __MINGW_NOTHROW putchar(int __c)
283 {
284 return (--stdout->_cnt >= 0)
285 ? (int) (unsigned char) (*stdout->_ptr++ = (char)__c)
286 : _flsbuf (__c, stdout);}
287
288 #else /* Use library functions. */
289
290 _CRTIMP int __cdecl __MINGW_NOTHROW getc (FILE*);
291 _CRTIMP int __cdecl __MINGW_NOTHROW putc (int, FILE*);
292 _CRTIMP int __cdecl __MINGW_NOTHROW getchar (void);
293 _CRTIMP int __cdecl __MINGW_NOTHROW putchar (int);
294
295 #endif
296
297 /*
298 * Direct Input and Output Functions
299 */
300
301 _CRTIMP size_t __cdecl __MINGW_NOTHROW fread (void*, size_t, size_t, FILE*);
302 _CRTIMP size_t __cdecl __MINGW_NOTHROW fwrite (const void*, size_t, size_t, FILE*);
303
304 /*
305 * File Positioning Functions
306 */
307
308 _CRTIMP int __cdecl __MINGW_NOTHROW fseek (FILE*, long, int);
309 _CRTIMP long __cdecl __MINGW_NOTHROW ftell (FILE*);
310 _CRTIMP void __cdecl __MINGW_NOTHROW rewind (FILE*);
311
312 #if __MSVCRT_VERSION__ >= 0x800
313 _CRTIMP int __cdecl __MINGW_NOTHROW _fseek_nolock (FILE*, long, int);
314 _CRTIMP long __cdecl __MINGW_NOTHROW _ftell_nolock (FILE*);
315
316 _CRTIMP int __cdecl __MINGW_NOTHROW _fseeki64 (FILE*, __int64, int);
317 _CRTIMP __int64 __cdecl __MINGW_NOTHROW _ftelli64 (FILE*);
318 _CRTIMP int __cdecl __MINGW_NOTHROW _fseeki64_nolock (FILE*, __int64, int);
319 _CRTIMP __int64 __cdecl __MINGW_NOTHROW _ftelli64_nolock (FILE*);
320 #endif
321
322 #ifdef __USE_MINGW_FSEEK /* These are in libmingwex.a */
323 /*
324 * Workaround for limitations on win9x where a file contents are
325 * not zero'd out if you seek past the end and then write.
326 */
327
328 int __cdecl __MINGW_NOTHROW __mingw_fseek (FILE *, long, int);
329 size_t __cdecl __MINGW_NOTHROW __mingw_fwrite (const void*, size_t, size_t, FILE*);
330 #define fseek(fp, offset, whence) __mingw_fseek(fp, offset, whence)
331 #define fwrite(buffer, size, count, fp) __mingw_fwrite(buffer, size, count, fp)
332 #endif /* __USE_MINGW_FSEEK */
333
334 /*
335 * An opaque data type used for storing file positions... The contents of
336 * this type are unknown, but we (the compiler) need to know the size
337 * because the programmer using fgetpos and fsetpos will be setting aside
338 * storage for fpos_t structres. Actually I tested using a byte array and
339 * it is fairly evident that the fpos_t type is a long (in CRTDLL.DLL).
340 * Perhaps an unsigned long? TODO? It's definitely a 64-bit number in
341 * MSVCRT however, and for now `long long' will do.
342 */
343 #ifdef __MSVCRT__
344 typedef long long fpos_t;
345 #else
346 typedef long fpos_t;
347 #endif
348
349 _CRTIMP int __cdecl __MINGW_NOTHROW fgetpos (FILE*, fpos_t*);
350 _CRTIMP int __cdecl __MINGW_NOTHROW fsetpos (FILE*, const fpos_t*);
351
352 /*
353 * Error Functions
354 */
355
356 _CRTIMP int __cdecl __MINGW_NOTHROW feof (FILE*);
357 _CRTIMP int __cdecl __MINGW_NOTHROW ferror (FILE*);
358
359 #ifdef __cplusplus
360 inline int __cdecl __MINGW_NOTHROW feof (FILE* __F)
361 { return __F->_flag & _IOEOF; }
362 inline int __cdecl __MINGW_NOTHROW ferror (FILE* __F)
363 { return __F->_flag & _IOERR; }
364 #else
365 #define feof(__F) ((__F)->_flag & _IOEOF)
366 #define ferror(__F) ((__F)->_flag & _IOERR)
367 #endif
368
369 _CRTIMP void __cdecl __MINGW_NOTHROW clearerr (FILE*);
370 _CRTIMP void __cdecl __MINGW_NOTHROW perror (const char*);
371
372
373 #ifndef __STRICT_ANSI__
374 /*
375 * Pipes
376 */
377 _CRTIMP FILE* __cdecl __MINGW_NOTHROW _popen (const char*, const char*);
378 _CRTIMP int __cdecl __MINGW_NOTHROW _pclose (FILE*);
379
380 #ifndef NO_OLDNAMES
381 _CRTIMP FILE* __cdecl __MINGW_NOTHROW popen (const char*, const char*);
382 _CRTIMP int __cdecl __MINGW_NOTHROW pclose (FILE*);
383 #endif
384
385 /*
386 * Other Non ANSI functions
387 */
388 _CRTIMP int __cdecl __MINGW_NOTHROW _flushall (void);
389 _CRTIMP int __cdecl __MINGW_NOTHROW _fgetchar (void);
390 _CRTIMP int __cdecl __MINGW_NOTHROW _fputchar (int);
391 _CRTIMP FILE* __cdecl __MINGW_NOTHROW _fdopen (int, const char*);
392 _CRTIMP int __cdecl __MINGW_NOTHROW _fileno (FILE*);
393 _CRTIMP int __cdecl __MINGW_NOTHROW _fcloseall(void);
394 _CRTIMP FILE* __cdecl __MINGW_NOTHROW _fsopen(const char*, const char*, int);
395 #ifdef __MSVCRT__
396 _CRTIMP int __cdecl __MINGW_NOTHROW _getmaxstdio(void);
397 _CRTIMP int __cdecl __MINGW_NOTHROW _setmaxstdio(int);
398 #endif
399
400 #if __MSVCRT_VERSION__ >= 0x800
401 _CRTIMP int __cdecl __MINGW_NOTHROW _set_printf_count_output(int);
402 _CRTIMP int __cdecl __MINGW_NOTHROW _get_printf_count_output(void);
403 #endif
404
405 #ifndef _NO_OLDNAMES
406 _CRTIMP int __cdecl __MINGW_NOTHROW fgetchar (void);
407 _CRTIMP int __cdecl __MINGW_NOTHROW fputchar (int);
408 _CRTIMP FILE* __cdecl __MINGW_NOTHROW fdopen (int, const char*);
409 _CRTIMP int __cdecl __MINGW_NOTHROW fileno (FILE*);
410 #endif /* Not _NO_OLDNAMES */
411
412 #define _fileno(__F) ((__F)->_file)
413 #ifndef _NO_OLDNAMES
414 #define fileno(__F) ((__F)->_file)
415 #endif
416
417 #if defined (__MSVCRT__) && !defined (__NO_MINGW_LFS)
418 #include <sys/types.h>
419 __CRT_INLINE FILE* __cdecl __MINGW_NOTHROW fopen64 (const char* filename, const char* mode)
420 {
421 return fopen (filename, mode);
422 }
423
424 int __cdecl __MINGW_NOTHROW fseeko64 (FILE*, off64_t, int);
425
426 #ifdef __USE_MINGW_FSEEK
427 int __cdecl __MINGW_NOTHROW __mingw_fseeko64 (FILE *, off64_t, int);
428 #define fseeko64(fp, offset, whence) __mingw_fseeko64(fp, offset, whence)
429 #endif
430
431 __CRT_INLINE off64_t __cdecl __MINGW_NOTHROW ftello64 (FILE * stream)
432 {
433 fpos_t pos;
434 if (fgetpos(stream, &pos))
435 return -1LL;
436 else
437 return ((off64_t) pos);
438 }
439 #endif /* __NO_MINGW_LFS */
440
441 #endif /* Not __STRICT_ANSI__ */
442
443 /* Wide versions */
444
445 #ifndef _WSTDIO_DEFINED
446 /* also in wchar.h - keep in sync */
447 _CRTIMP int __cdecl __MINGW_NOTHROW fwprintf (FILE*, const wchar_t*, ...);
448 _CRTIMP int __cdecl __MINGW_NOTHROW wprintf (const wchar_t*, ...);
449 _CRTIMP int __cdecl __MINGW_NOTHROW swprintf (wchar_t*, const wchar_t*, ...);
450 _CRTIMP int __cdecl __MINGW_NOTHROW _snwprintf (wchar_t*, size_t, const wchar_t*, ...);
451 _CRTIMP int __cdecl __MINGW_NOTHROW vfwprintf (FILE*, const wchar_t*, __VALIST);
452 _CRTIMP int __cdecl __MINGW_NOTHROW vwprintf (const wchar_t*, __VALIST);
453 _CRTIMP int __cdecl __MINGW_NOTHROW vswprintf (wchar_t*, const wchar_t*, __VALIST);
454 _CRTIMP int __cdecl __MINGW_NOTHROW _vsnwprintf (wchar_t*, size_t, const wchar_t*, __VALIST);
455 _CRTIMP int __cdecl __MINGW_NOTHROW fwscanf (FILE*, const wchar_t*, ...);
456 _CRTIMP int __cdecl __MINGW_NOTHROW wscanf (const wchar_t*, ...);
457 _CRTIMP int __cdecl __MINGW_NOTHROW swscanf (const wchar_t*, const wchar_t*, ...);
458 _CRTIMP wint_t __cdecl __MINGW_NOTHROW fgetwc (FILE*);
459 _CRTIMP wint_t __cdecl __MINGW_NOTHROW fputwc (wchar_t, FILE*);
460 _CRTIMP wint_t __cdecl __MINGW_NOTHROW ungetwc (wchar_t, FILE*);
461
462 #ifdef __MSVCRT__
463 _CRTIMP wchar_t* __cdecl __MINGW_NOTHROW fgetws (wchar_t*, int, FILE*);
464 _CRTIMP int __cdecl __MINGW_NOTHROW fputws (const wchar_t*, FILE*);
465 _CRTIMP wint_t __cdecl __MINGW_NOTHROW getwc (FILE*);
466 _CRTIMP wint_t __cdecl __MINGW_NOTHROW getwchar (void);
467 _CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _getws (wchar_t*);
468 _CRTIMP wint_t __cdecl __MINGW_NOTHROW putwc (wint_t, FILE*);
469 _CRTIMP int __cdecl __MINGW_NOTHROW _putws (const wchar_t*);
470 _CRTIMP wint_t __cdecl __MINGW_NOTHROW putwchar (wint_t);
471 _CRTIMP FILE* __cdecl __MINGW_NOTHROW _wfdopen(int, const wchar_t *);
472 _CRTIMP FILE* __cdecl __MINGW_NOTHROW _wfopen (const wchar_t*, const wchar_t*);
473 _CRTIMP FILE* __cdecl __MINGW_NOTHROW _wfreopen (const wchar_t*, const wchar_t*, FILE*);
474 _CRTIMP FILE* __cdecl __MINGW_NOTHROW _wfsopen (const wchar_t*, const wchar_t*, int);
475 _CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wtmpnam (wchar_t*);
476 _CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wtempnam (const wchar_t*, const wchar_t*);
477 _CRTIMP int __cdecl __MINGW_NOTHROW _wrename (const wchar_t*, const wchar_t*);
478 _CRTIMP int __cdecl __MINGW_NOTHROW _wremove (const wchar_t*);
479 _CRTIMP void __cdecl __MINGW_NOTHROW _wperror (const wchar_t*);
480 _CRTIMP FILE* __cdecl __MINGW_NOTHROW _wpopen (const wchar_t*, const wchar_t*);
481 #endif /* __MSVCRT__ */
482
483 #ifndef __NO_ISOCEXT /* externs in libmingwex.a */
484 int __cdecl __MINGW_NOTHROW snwprintf (wchar_t* s, size_t n, const wchar_t* format, ...);
485 __CRT_INLINE int __cdecl __MINGW_NOTHROW
486 vsnwprintf (wchar_t* s, size_t n, const wchar_t* format, __VALIST arg)
487 { return _vsnwprintf ( s, n, format, arg);}
488 int __cdecl __MINGW_NOTHROW vwscanf (const wchar_t * __restrict__, __VALIST);
489 int __cdecl __MINGW_NOTHROW vfwscanf (FILE * __restrict__,
490 const wchar_t * __restrict__, __VALIST);
491 int __cdecl __MINGW_NOTHROW vswscanf (const wchar_t * __restrict__,
492 const wchar_t * __restrict__, __VALIST);
493 #endif
494
495 #define _WSTDIO_DEFINED
496 #endif /* _WSTDIO_DEFINED */
497
498 #ifndef __STRICT_ANSI__
499 #ifdef __MSVCRT__
500 #ifndef NO_OLDNAMES
501 _CRTIMP FILE* __cdecl __MINGW_NOTHROW wpopen (const wchar_t*, const wchar_t*);
502 #endif /* not NO_OLDNAMES */
503 #endif /* MSVCRT runtime */
504
505 /*
506 * Other Non ANSI wide functions
507 */
508 _CRTIMP wint_t __cdecl __MINGW_NOTHROW _fgetwchar (void);
509 _CRTIMP wint_t __cdecl __MINGW_NOTHROW _fputwchar (wint_t);
510 _CRTIMP int __cdecl __MINGW_NOTHROW _getw (FILE*);
511 _CRTIMP int __cdecl __MINGW_NOTHROW _putw (int, FILE*);
512
513 #ifndef _NO_OLDNAMES
514 _CRTIMP wint_t __cdecl __MINGW_NOTHROW fgetwchar (void);
515 _CRTIMP wint_t __cdecl __MINGW_NOTHROW fputwchar (wint_t);
516 _CRTIMP int __cdecl __MINGW_NOTHROW getw (FILE*);
517 _CRTIMP int __cdecl __MINGW_NOTHROW putw (int, FILE*);
518 #endif /* Not _NO_OLDNAMES */
519
520 #endif /* __STRICT_ANSI */
521
522 #ifdef __cplusplus
523 }
524 #endif
525
526 #endif /* Not RC_INVOKED */
527
528 #endif /* _STDIO_H_ */