In perl.git, the branch blead has been updated <https://perl5.git.perl.org/perl.git/commitdiff/048eef38d279ddf78457ab69d37b9f2cdd096c2a?hp=9d3dfe483399b257dc3160af2acd0f8a715070a5>
- Log ----------------------------------------------------------------- commit 048eef38d279ddf78457ab69d37b9f2cdd096c2a Author: Tony Cook <t...@develop-help.com> Date: Thu Sep 13 11:45:14 2018 +1000 (perl #133510) can't use my_vsnprintf() on quadmath/threaded builds Since anything with quadmath should be recent enough to have vsnprintf() I've fallen back to that. Calls to PerlIO_debug() in core don't include floating point values and I expect it to be unlikely outside of core - if it is needed they'll just have to use double formatting/types. ----------------------------------------------------------------------- Summary of changes: perlio.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/perlio.c b/perlio.c index f5eb4851b6..3a2f9120d3 100644 --- a/perlio.c +++ b/perlio.c @@ -371,7 +371,19 @@ PerlIO_debug(const char *fmt, ...) /* Use fixed buffer as sv_catpvf etc. needs SVs */ char buffer[1024]; const STRLEN len1 = my_snprintf(buffer, sizeof(buffer), "%.40s:%" IVdf " ", s ? s : "(none)", (IV) CopLINE(PL_curcop)); +# ifdef USE_QUADMATH +# ifdef HAS_VSNPRINTF + /* my_vsnprintf() isn't available with quadmath, but the native vsnprintf() + should be, otherwise the system isn't likely to support quadmath. + Nothing should be calling PerlIO_debug() with floating point anyway. + */ + const STRLEN len2 = vsnprintf(buffer + len1, sizeof(buffer) - len1, fmt, ap); +# else + STATIC_ASSERT_STMT(0); +# endif +# else const STRLEN len2 = my_vsnprintf(buffer + len1, sizeof(buffer) - len1, fmt, ap); +# endif PERL_UNUSED_RESULT(PerlLIO_write(PL_perlio_debug_fd, buffer, len1 + len2)); #else const char *s = CopFILE(PL_curcop); -- Perl5 Master Repository