summaryrefslogtreecommitdiff
path: root/fakesdio.h
diff options
context:
space:
mode:
authorNick Ing-Simmons <nik@tiuk.ti.com>2003-01-20 15:09:08 +0000
committerNick Ing-Simmons <nik@tiuk.ti.com>2003-01-20 15:09:08 +0000
commitf2b1176c042dd0d792a0f916f759bd848210d4d8 (patch)
treefb7bca914e5dba8507fc44fd26d061bbdd2620bf /fakesdio.h
parenta211c3f8af40d0495c2f1a036a923353d5ad7a30 (diff)
downloadperl-f2b1176c042dd0d792a0f916f759bd848210d4d8.tar.gz
Move #define printf out of perl.h into appropriate
PerlIO files. p4raw-id: //depot/perlio@18520
Diffstat (limited to 'fakesdio.h')
-rw-r--r--fakesdio.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/fakesdio.h b/fakesdio.h
index 8ef89e9ca5..8be514f180 100644
--- a/fakesdio.h
+++ b/fakesdio.h
@@ -55,6 +55,18 @@
#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
+#endif
+
#define fprintf PerlIO_printf
#define stdin PerlIO_stdin()
#define stdout PerlIO_stdout()