source: vendor/perl/5.8.8/fakesdio.h@ 3186

Last change on this file since 3186 was 3181, checked in by bird, 19 years ago

perl 5.8.8

File size: 3.1 KB
RevLine 
[3181]1/* fakestdio.h
2 *
3 * Copyright (C) 2000, by Larry Wall and others
4 *
5 * You may distribute under the terms of either the GNU General Public
6 * License or the Artistic License, as specified in the README file.
7 *
8 */
9
10/*
11 * This is "source level" stdio compatibility mode.
12 * We try and #define stdio functions in terms of PerlIO.
13 */
14#define _CANNOT "CANNOT"
15#undef FILE
16#define FILE PerlIO
17#undef clearerr
18#undef fclose
19#undef fdopen
20#undef feof
21#undef ferror
22#undef fflush
23#undef fgetc
24#undef fgetpos
25#undef fgets
26#undef fileno
27#undef flockfile
28#undef fopen
29#undef fprintf
30#undef fputc
31#undef fputs
32#undef fread
33#undef freopen
34#undef fscanf
35#undef fseek
36#undef fsetpos
37#undef ftell
38#undef ftrylockfile
39#undef funlockfile
40#undef fwrite
41#undef getc
42#undef getc_unlocked
43#undef getw
44#undef pclose
45#undef popen
46#undef putc
47#undef putc_unlocked
48#undef putw
49#undef rewind
50#undef setbuf
51#undef setvbuf
52#undef stderr
53#undef stdin
54#undef stdout
55#undef tmpfile
56#undef ungetc
57#undef vfprintf
58#undef printf
59
60/* printf used to live in perl.h like this - more sophisticated
61 than the rest
62 */
63#if defined(__GNUC__) && !defined(__STRICT_ANSI__) && !defined(PERL_GCC_PEDANTIC)
64#define printf(fmt,args...) PerlIO_stdoutf(fmt,##args)
65#else
66#define printf PerlIO_stdoutf
67#endif
68#endif
69
70#define fprintf PerlIO_printf
71#define stdin PerlIO_stdin()
72#define stdout PerlIO_stdout()
73#define stderr PerlIO_stderr()