X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=fakesdio.h;h=614438096e0bd5423809cfd2a6fcf41bb9d26f59;hb=434477a5e20cf332e549a03f5cfa9d6f98829ecc;hp=479123242f6285ab90656136507263dbc2297fc4;hpb=766a733e849204725c27391cf2992d649af4aba6;p=p5sagit%2Fp5-mst-13.2.git diff --git a/fakesdio.h b/fakesdio.h index 4791232..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. @@ -46,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() @@ -102,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: + */