Quick temporary fix for 20001114.008 as suggested by Nick Ing-Simmons.
[p5sagit/p5-mst-13.2.git] / nostdio.h
1 /*
2  * Strong denial of stdio - make all stdio calls (we can think of) errors
3  */
4 /* This is an 1st attempt to stop other include files pulling
5    in real <stdio.h>.
6    A more ambitious set of possible symbols can be found in
7    sfio.h (inside an _cplusplus gard).
8    It is completely pointless as we have already included it ourselves.
9 */
10
11 #if !defined(_STDIO_H) && !defined(FILE) && !defined(_STDIO_INCLUDED) && !defined(__STDIO_LOADED)
12 #define _STDIO_H
13 #define _STDIO_INCLUDED
14 #define __STDIO_LOADED
15 struct _FILE;
16 #define FILE struct _FILE
17 #endif
18
19 #define _CANNOT "CANNOT"
20
21 #undef clearerr
22 #undef fclose
23 #undef fdopen
24 #undef feof
25 #undef ferror
26 #undef fflush
27 #undef fgetc
28 #undef fgetpos
29 #undef fgets
30 #undef fileno
31 #undef fopen
32 #undef fprintf
33 #undef fputc
34 #undef fputs
35 #undef fread
36 #undef freopen
37 #undef fscanf
38 #undef fseek
39 #undef fsetpos
40 #undef ftell
41 #undef fwrite
42 #undef getc
43 #undef getc_unlocked
44 #undef getw
45 #undef pclose
46 #undef popen
47 #undef putc
48 #undef putc_unlocked
49 #undef putw
50 #undef rewind
51 #undef setbuf
52 #undef setvbuf
53 #undef stderr
54 #undef stdin
55 #undef stdout
56 #undef tmpfile
57 #undef ungetc
58 #undef vfprintf
59
60 #define fprintf    _CANNOT _fprintf_
61 #define stdin      _CANNOT _stdin_
62 #define stdout     _CANNOT _stdout_
63 #define stderr     _CANNOT _stderr_
64 #ifndef OS2
65 #define tmpfile()  _CANNOT _tmpfile_
66 #endif
67 #define fclose(f)  _CANNOT _fclose_
68 #define fflush(f)  _CANNOT _fflush_
69 #define fopen(p,m)  _CANNOT _fopen_
70 #define freopen(p,m,f)  _CANNOT _freopen_
71 #define setbuf(f,b)  _CANNOT _setbuf_
72 #define setvbuf(f,b,x,s)  _CANNOT _setvbuf_
73 #define fscanf  _CANNOT _fscanf_
74 #define vfprintf(f,fmt,a)  _CANNOT _vfprintf_
75 #define fgetc(f)  _CANNOT _fgetc_
76 #define fgets(s,n,f)  _CANNOT _fgets_
77 #define fputc(c,f)  _CANNOT _fputc_
78 #define fputs(s,f)  _CANNOT _fputs_
79 #define getc(f)  _CANNOT _getc_
80 #define putc(c,f)  _CANNOT _putc_
81 #ifndef OS2
82 #define ungetc(c,f)  _CANNOT _ungetc_
83 #endif
84 #define fread(b,s,c,f)  _CANNOT _fread_
85 #define fwrite(b,s,c,f)  _CANNOT _fwrite_
86 #define fgetpos(f,p)  _CANNOT _fgetpos_
87 #define fseek(f,o,w)  _CANNOT _fseek_
88 #define fsetpos(f,p)  _CANNOT _fsetpos_
89 #define ftell(f)  _CANNOT _ftell_
90 #define rewind(f)  _CANNOT _rewind_
91 #define clearerr(f)  _CANNOT _clearerr_
92 #define feof(f)  _CANNOT _feof_
93 #define ferror(f)  _CANNOT _ferror_
94 #define __filbuf(f)  _CANNOT __filbuf_
95 #define __flsbuf(c,f)  _CANNOT __flsbuf_
96 #define _filbuf(f)  _CANNOT _filbuf_
97 #define _flsbuf(c,f)  _CANNOT _flsbuf_
98 #define fdopen(fd,p)  _CANNOT _fdopen_
99 #define fileno(f)  _CANNOT _fileno_
100 #if SFIO_VERSION < 20000101L
101 #define flockfile(f)  _CANNOT _flockfile_
102 #define ftrylockfile(f)  _CANNOT _ftrylockfile_
103 #define funlockfile(f)  _CANNOT _funlockfile_
104 #endif
105 #define getc_unlocked(f)  _CANNOT _getc_unlocked_
106 #define putc_unlocked(c,f)  _CANNOT _putc_unlocked_
107 #define popen(c,m)  _CANNOT _popen_
108 #define getw(f)  _CANNOT _getw_
109 #define putw(v,f)  _CANNOT _putw_
110 #ifndef OS2
111 #define pclose(f)  _CANNOT _pclose_
112 #endif