Change 18524 by jhi@lyta on 2003/01/20 17:51:10
Integrate from perlio:
[ 18520]
Move #define printf out of perl.h into appropriate
PerlIO files.
Affected files ...
... //depot/perl/fakesdio.h#6 integrate
... //depot/perl/nostdio.h#11 integrate
... //depot/perl/perl.h#482 integrate
Differences ...
==== //depot/perl/fakesdio.h#6 (text) ====
Index: perl/fakesdio.h
--- perl/fakesdio.h#5~14400~ Wed Jan 23 18:49:05 2002
+++ perl/fakesdio.h Mon Jan 20 09:51:10 2003
@@ -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()
==== //depot/perl/nostdio.h#11 (text) ====
Index: perl/nostdio.h
--- perl/nostdio.h#10~14400~ Wed Jan 23 18:49:05 2002
+++ perl/nostdio.h Mon Jan 20 09:51:10 2003
@@ -68,8 +68,10 @@
#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_
==== //depot/perl/perl.h#482 (text) ====
Index: perl/perl.h
--- perl/perl.h#481~18312~ Mon Dec 16 17:43:28 2002
+++ perl/perl.h Mon Jan 20 09:51:10 2003
@@ -3820,17 +3820,6 @@
# define Atoul(s) Strtoul(s, (char **)NULL, 10)
#endif
-#if !defined(PERLIO_IS_STDIO)
-/*
- * Remap printf
- */
-#undef printf
-#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
/* if these never got defined, they need defaults */
#ifndef PERL_SET_CONTEXT
End of Patch.