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