summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--embed.h3
-rwxr-xr-xembed.pl11
-rw-r--r--global.sym1
-rw-r--r--globals.c9
-rw-r--r--iperlsys.h6
-rw-r--r--objXSUB.h4
-rw-r--r--perlapi.c12
-rw-r--r--proto.h5
8 files changed, 48 insertions, 3 deletions
diff --git a/embed.h b/embed.h
index 44ff2fd786..83afb92c1b 100644
--- a/embed.h
+++ b/embed.h
@@ -131,6 +131,7 @@
#define sv_catpvf_mg_nocontext Perl_sv_catpvf_mg_nocontext
#define sv_setpvf_mg_nocontext Perl_sv_setpvf_mg_nocontext
#define fprintf_nocontext Perl_fprintf_nocontext
+#define printf_nocontext Perl_printf_nocontext
#endif
#define cv_ckproto Perl_cv_ckproto
#define cv_clone Perl_cv_clone
@@ -3188,6 +3189,8 @@
#define sv_setpvf_mg_nocontext Perl_sv_setpvf_mg_nocontext
#define Perl_fprintf_nocontext CPerlObj::Perl_fprintf_nocontext
#define fprintf_nocontext Perl_fprintf_nocontext
+#define Perl_printf_nocontext CPerlObj::Perl_printf_nocontext
+#define printf_nocontext Perl_printf_nocontext
#endif
#define Perl_cv_ckproto CPerlObj::Perl_cv_ckproto
#define cv_ckproto Perl_cv_ckproto
diff --git a/embed.pl b/embed.pl
index 4cd8acab26..bd46b1c29e 100755
--- a/embed.pl
+++ b/embed.pl
@@ -1073,6 +1073,16 @@ Perl_fprintf_nocontext(PerlIO *stream, const char *format, ...)
return (*PL_StdIO->pVprintf)(PL_StdIO, stream, format, arglist);
}
+#undef Perl_printf_nocontext
+int
+Perl_printf_nocontext(const char *format, ...)
+{
+ dTHXo;
+ va_list(arglist);
+ va_start(arglist, format);
+ return (*PL_StdIO->pVprintf)(PL_StdIO, PerlIO_stdout(), format, arglist);
+}
+
END_EXTERN_C
#endif /* PERL_OBJECT */
@@ -1445,6 +1455,7 @@ Afnp |void |sv_setpvf_nocontext|SV* sv|const char* pat|...
Afnp |void |sv_catpvf_mg_nocontext|SV* sv|const char* pat|...
Afnp |void |sv_setpvf_mg_nocontext|SV* sv|const char* pat|...
Afnp |int |fprintf_nocontext|PerlIO* stream|const char* fmt|...
+Afnp |int |printf_nocontext|const char* fmt|...
#endif
p |void |cv_ckproto |CV* cv|GV* gv|char* p
p |CV* |cv_clone |CV* proto
diff --git a/global.sym b/global.sym
index 870fccfa3d..49d4e858d5 100644
--- a/global.sym
+++ b/global.sym
@@ -68,6 +68,7 @@ Perl_sv_setpvf_nocontext
Perl_sv_catpvf_mg_nocontext
Perl_sv_setpvf_mg_nocontext
Perl_fprintf_nocontext
+Perl_printf_nocontext
Perl_cv_const_sv
Perl_cv_undef
Perl_cx_dump
diff --git a/globals.c b/globals.c
index 0782eba226..5bf4aeabcb 100644
--- a/globals.c
+++ b/globals.c
@@ -79,4 +79,13 @@ Perl_fprintf_nocontext(PerlIO *stream, const char *format, ...)
return PerlIO_vprintf(stream, format, arglist);
}
+int
+Perl_printf_nocontext(const char *format, ...)
+{
+ dTHX;
+ va_list(arglist);
+ va_start(arglist, format);
+ return PerlIO_vprintf(PerlIO_stdout(), format, arglist);
+}
+
#include "perlapi.h" /* bring in PL_force_link_funcs */
diff --git a/iperlsys.h b/iperlsys.h
index fe03f5c53b..fdbd12a6fc 100644
--- a/iperlsys.h
+++ b/iperlsys.h
@@ -251,9 +251,9 @@ struct IPerlStdIOInfo
#define PerlSIO_setlinebuf(f) \
(*PL_StdIO->pSetlinebuf)(PL_StdIO, (f))
#define PerlSIO_printf Perl_fprintf_nocontext
-#define PerlSIO_stdoutf *PL_StdIO->pPrintf
-#define PerlSIO_vprintf(f,fmt,a) \
- (*PL_StdIO->pVprintf)(PL_StdIO, (f),(fmt),a)
+#define PerlSIO_stdoutf Perl_printf_nocontext
+#define PerlSIO_vprintf(f,fmt,a) \
+ (*PL_StdIO->pVprintf)(PL_StdIO, (f),(fmt),a)
#define PerlSIO_ftell(f) \
(*PL_StdIO->pTell)(PL_StdIO, (f))
#define PerlSIO_fseek(f,o,w) \
diff --git a/objXSUB.h b/objXSUB.h
index 7bba68a9dc..cce7f6f3b0 100644
--- a/objXSUB.h
+++ b/objXSUB.h
@@ -228,6 +228,10 @@
#define Perl_fprintf_nocontext pPerl->Perl_fprintf_nocontext
#undef fprintf_nocontext
#define fprintf_nocontext Perl_fprintf_nocontext
+#undef Perl_printf_nocontext
+#define Perl_printf_nocontext pPerl->Perl_printf_nocontext
+#undef printf_nocontext
+#define printf_nocontext Perl_printf_nocontext
#endif
#undef Perl_cv_const_sv
#define Perl_cv_const_sv pPerl->Perl_cv_const_sv
diff --git a/perlapi.c b/perlapi.c
index 4f427e025c..9de87259d9 100644
--- a/perlapi.c
+++ b/perlapi.c
@@ -480,6 +480,8 @@ Perl_sv_setpvf_mg_nocontext(SV* sv, const char* pat, ...)
}
#undef Perl_fprintf_nocontext
+
+#undef Perl_printf_nocontext
#endif
#undef Perl_cv_const_sv
@@ -4199,6 +4201,16 @@ Perl_fprintf_nocontext(PerlIO *stream, const char *format, ...)
return (*PL_StdIO->pVprintf)(PL_StdIO, stream, format, arglist);
}
+#undef Perl_printf_nocontext
+int
+Perl_printf_nocontext(const char *format, ...)
+{
+ dTHXo;
+ va_list(arglist);
+ va_start(arglist, format);
+ return (*PL_StdIO->pVprintf)(PL_StdIO, PerlIO_stdout(), format, arglist);
+}
+
END_EXTERN_C
#endif /* PERL_OBJECT */
diff --git a/proto.h b/proto.h
index 4e8abe016d..1201e64156 100644
--- a/proto.h
+++ b/proto.h
@@ -177,6 +177,11 @@ PERL_CALLCONV int Perl_fprintf_nocontext(PerlIO* stream, const char* fmt, ...)
__attribute__((format(printf,2,3)))
#endif
;
+PERL_CALLCONV int Perl_printf_nocontext(const char* fmt, ...)
+#ifdef CHECK_FORMAT
+ __attribute__((format(printf,1,2)))
+#endif
+;
#endif
PERL_CALLCONV void Perl_cv_ckproto(pTHX_ CV* cv, GV* gv, char* p);
PERL_CALLCONV CV* Perl_cv_clone(pTHX_ CV* proto);