X-Git-Url: https://perl5.git.perl.org/perl5.git/blobdiff_plain/cf677677a1a817dcdfc679372e08232bc54af9cb..e1aae8e422ead7f20e21203fb7fb1e8ad7387c2b:/fakesdio.h diff --git a/fakesdio.h b/fakesdio.h index e07fd60..6144380 100644 --- a/fakesdio.h +++ b/fakesdio.h @@ -1,3 +1,12 @@ +/* fakestdio.h + * + * Copyright (C) 2000, 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. + * + */ + /* * This is "source level" stdio compatibility mode. * We try and #define stdio functions in terms of PerlIO. @@ -15,6 +24,7 @@ #undef fgetpos #undef fgets #undef fileno +#undef flockfile #undef fopen #undef fprintf #undef fputc @@ -25,6 +35,8 @@ #undef fseek #undef fsetpos #undef ftell +#undef ftrylockfile +#undef funlockfile #undef fwrite #undef getc #undef getc_unlocked @@ -43,6 +55,17 @@ #undef tmpfile #undef ungetc #undef vfprintf +#undef printf + +/* printf used to live in perl.h like this - more sophisticated + than the rest + */ +#if defined(__GNUC__) && !defined(__STRICT_ANSI__) && !defined(PERL_GCC_PEDANTIC) +#define printf(fmt,args...) PerlIO_stdoutf(fmt,##args) +#else +#define printf PerlIO_stdoutf +#endif + #define fprintf PerlIO_printf #define stdin PerlIO_stdin() #define stdout PerlIO_stdout() @@ -68,9 +91,7 @@ #define fread(b,s,c,f) _CANNOT fread #define fwrite(b,s,c,f) _CANNOT fwrite #endif -#define fgetpos(f,p) PerlIO_getpos(f,p) #define fseek(f,o,w) PerlIO_seek(f,o,w) -#define fsetpos(f,p) PerlIO_setpos(f,p) #define ftell(f) PerlIO_tell(f) #define rewind(f) PerlIO_rewind(f) #define clearerr(f) PerlIO_clearerr(f) @@ -81,6 +102,9 @@ #define popen(c,m) my_popen(c,m) #define pclose(f) my_pclose(f) +#define fsetpos(f,p) _CANNOT _fsetpos_ +#define fgetpos(f,p) _CANNOT _fgetpos_ + #define __filbuf(f) _CANNOT __filbuf_ #define _filbuf(f) _CANNOT _filbuf_ #define __flsbuf(c,f) _CANNOT __flsbuf_ @@ -98,3 +122,12 @@ #define fscanf _CANNOT _fscanf_ #define fgets(s,n,f) _CANNOT _fgets_ +/* + * Local variables: + * c-indentation-style: bsd + * c-basic-offset: 4 + * indent-tabs-mode: t + * End: + * + * ex: set ts=8 sts=4 sw=4 noet: + */