X-Git-Url: https://perl5.git.perl.org/perl5.git/blobdiff_plain/76ced9add7b621dfc9d4ecb534aeea8e131a418a..a7a22abc1654ce1bee21c7bb8657a3b7c07ae25a:/nostdio.h diff --git a/nostdio.h b/nostdio.h index 31befc8..c815fd8 100644 --- a/nostdio.h +++ b/nostdio.h @@ -1,12 +1,22 @@ +/* nostdio.h + * + * Copyright (C) 1996, 2000, 2001, 2005, by Larry Wall and others + * + * You may distribute under the terms of either the GNU General Public + * License or the Artistic License, as specified in the README file. + * + */ + /* * Strong denial of stdio - make all stdio calls (we can think of) errors */ -/* This is an 1st attempt to stop other include files pulling +/* This is a 1st attempt to stop other include files pulling in real . A more ambitious set of possible symbols can be found in sfio.h (inside an _cplusplus gard). It is completely pointless as we have already included it ourselves. */ + #if !defined(_STDIO_H) && !defined(FILE) && !defined(_STDIO_INCLUDED) && !defined(__STDIO_LOADED) #define _STDIO_H #define _STDIO_INCLUDED @@ -15,52 +25,61 @@ struct _FILE; #define FILE struct _FILE #endif +#ifndef EBCDIC + #define _CANNOT "CANNOT" -#undef stdin -#undef stdout -#undef stderr -#undef getc -#undef putc #undef clearerr -#undef fflush +#undef fclose +#undef fdopen #undef feof #undef ferror +#undef fflush +#undef fgetc +#undef fgetpos +#undef fgets #undef fileno - -#undef fprintf -#undef tmpfile -#undef fclose +#undef flockfile #undef fopen -#undef vfprintf -#undef fgetc +#undef fprintf #undef fputc #undef fputs -#undef ungetc #undef fread -#undef fwrite -#undef fgetpos +#undef freopen +#undef fscanf #undef fseek #undef fsetpos #undef ftell -#undef rewind -#undef fdopen -#undef popen -#undef pclose +#undef ftrylockfile +#undef funlockfile +#undef fwrite +#undef getc +#undef getc_unlocked #undef getw +#undef pclose +#undef popen +#undef putc +#undef putc_unlocked #undef putw -#undef freopen +#undef rewind #undef setbuf #undef setvbuf -#undef fscanf -#undef fgets -#undef getc_unlocked -#undef putc_unlocked +#undef stderr +#undef stdin +#undef stdout +#undef tmpfile +#undef ungetc +#undef vfprintf +#undef printf + #define fprintf _CANNOT _fprintf_ +#define printf _CANNOT _printf_ #define stdin _CANNOT _stdin_ #define stdout _CANNOT _stdout_ #define stderr _CANNOT _stderr_ +#ifndef OS2 #define tmpfile() _CANNOT _tmpfile_ +#endif #define fclose(f) _CANNOT _fclose_ #define fflush(f) _CANNOT _fflush_ #define fopen(p,m) _CANNOT _fopen_ @@ -75,7 +94,9 @@ struct _FILE; #define fputs(s,f) _CANNOT _fputs_ #define getc(f) _CANNOT _getc_ #define putc(c,f) _CANNOT _putc_ +#ifndef OS2 #define ungetc(c,f) _CANNOT _ungetc_ +#endif #define fread(b,s,c,f) _CANNOT _fread_ #define fwrite(b,s,c,f) _CANNOT _fwrite_ #define fgetpos(f,p) _CANNOT _fgetpos_ @@ -92,7 +113,7 @@ struct _FILE; #define _flsbuf(c,f) _CANNOT _flsbuf_ #define fdopen(fd,p) _CANNOT _fdopen_ #define fileno(f) _CANNOT _fileno_ -#if SFIO_VERSION < 20000101L +#if defined(SFIO_VERSION) && SFIO_VERSION < 20000101L #define flockfile(f) _CANNOT _flockfile_ #define ftrylockfile(f) _CANNOT _ftrylockfile_ #define funlockfile(f) _CANNOT _funlockfile_ @@ -102,7 +123,18 @@ struct _FILE; #define popen(c,m) _CANNOT _popen_ #define getw(f) _CANNOT _getw_ #define putw(v,f) _CANNOT _putw_ +#ifndef OS2 #define pclose(f) _CANNOT _pclose_ +#endif +#endif /*not define EBCDIC */ - +/* + * Local variables: + * c-indentation-style: bsd + * c-basic-offset: 4 + * indent-tabs-mode: nil + * End: + * + * ex: set ts=8 sts=4 sw=4 et: + */