source: trunk/third/perl/nostdio.h @ 18450

Revision 18450, 3.1 KB checked in by zacheiss, 21 years ago (diff)
This commit was generated by cvs2svn to compensate for changes in r18449, which included commits to RCS files with non-trunk default branches.
Line 
1/*    nostdio.h
2 *
3 *    Copyright (c) 1987-2002, Larry Wall
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 * Strong denial of stdio - make all stdio calls (we can think of) errors
12 */
13/* This is a 1st attempt to stop other include files pulling
14   in real <stdio.h>.
15   A more ambitious set of possible symbols can be found in
16   sfio.h (inside an _cplusplus gard).
17   It is completely pointless as we have already included it ourselves.
18*/
19
20#if !defined(_STDIO_H) && !defined(FILE) && !defined(_STDIO_INCLUDED) && !defined(__STDIO_LOADED)
21#define _STDIO_H
22#define _STDIO_INCLUDED
23#define __STDIO_LOADED
24struct _FILE;
25#define FILE struct _FILE
26#endif
27
28#define _CANNOT "CANNOT"
29
30#undef clearerr
31#undef fclose
32#undef fdopen
33#undef feof
34#undef ferror
35#undef fflush
36#undef fgetc
37#undef fgetpos
38#undef fgets
39#undef fileno
40#undef flockfile
41#undef fopen
42#undef fprintf
43#undef fputc
44#undef fputs
45#undef fread
46#undef freopen
47#undef fscanf
48#undef fseek
49#undef fsetpos
50#undef ftell
51#undef ftrylockfile
52#undef funlockfile
53#undef fwrite
54#undef getc
55#undef getc_unlocked
56#undef getw
57#undef pclose
58#undef popen
59#undef putc
60#undef putc_unlocked
61#undef putw
62#undef rewind
63#undef setbuf
64#undef setvbuf
65#undef stderr
66#undef stdin
67#undef stdout
68#undef tmpfile
69#undef ungetc
70#undef vfprintf
71
72#define fprintf    _CANNOT _fprintf_
73#define stdin      _CANNOT _stdin_
74#define stdout     _CANNOT _stdout_
75#define stderr     _CANNOT _stderr_
76#ifndef OS2
77#define tmpfile()  _CANNOT _tmpfile_
78#endif
79#define fclose(f)  _CANNOT _fclose_
80#define fflush(f)  _CANNOT _fflush_
81#define fopen(p,m)  _CANNOT _fopen_
82#define freopen(p,m,f)  _CANNOT _freopen_
83#define setbuf(f,b)  _CANNOT _setbuf_
84#define setvbuf(f,b,x,s)  _CANNOT _setvbuf_
85#define fscanf  _CANNOT _fscanf_
86#define vfprintf(f,fmt,a)  _CANNOT _vfprintf_
87#define fgetc(f)  _CANNOT _fgetc_
88#define fgets(s,n,f)  _CANNOT _fgets_
89#define fputc(c,f)  _CANNOT _fputc_
90#define fputs(s,f)  _CANNOT _fputs_
91#define getc(f)  _CANNOT _getc_
92#define putc(c,f)  _CANNOT _putc_
93#ifndef OS2
94#define ungetc(c,f)  _CANNOT _ungetc_
95#endif
96#define fread(b,s,c,f)  _CANNOT _fread_
97#define fwrite(b,s,c,f)  _CANNOT _fwrite_
98#define fgetpos(f,p)  _CANNOT _fgetpos_
99#define fseek(f,o,w)  _CANNOT _fseek_
100#define fsetpos(f,p)  _CANNOT _fsetpos_
101#define ftell(f)  _CANNOT _ftell_
102#define rewind(f)  _CANNOT _rewind_
103#define clearerr(f)  _CANNOT _clearerr_
104#define feof(f)  _CANNOT _feof_
105#define ferror(f)  _CANNOT _ferror_
106#define __filbuf(f)  _CANNOT __filbuf_
107#define __flsbuf(c,f)  _CANNOT __flsbuf_
108#define _filbuf(f)  _CANNOT _filbuf_
109#define _flsbuf(c,f)  _CANNOT _flsbuf_
110#define fdopen(fd,p)  _CANNOT _fdopen_
111#define fileno(f)  _CANNOT _fileno_
112#if SFIO_VERSION < 20000101L
113#define flockfile(f)  _CANNOT _flockfile_
114#define ftrylockfile(f)  _CANNOT _ftrylockfile_
115#define funlockfile(f)  _CANNOT _funlockfile_
116#endif
117#define getc_unlocked(f)  _CANNOT _getc_unlocked_
118#define putc_unlocked(c,f)  _CANNOT _putc_unlocked_
119#define popen(c,m)  _CANNOT _popen_
120#define getw(f)  _CANNOT _getw_
121#define putw(v,f)  _CANNOT _putw_
122#ifndef OS2
123#define pclose(f)  _CANNOT _pclose_
124#endif
Note: See TracBrowser for help on using the repository browser.