Solaris was happy, but change 28247 removed the wrong dTHX as far as
Nicholas Clark [Sat, 20 May 2006 10:27:23 +0000 (10:27 +0000)]
some other operating systems were concerned.

p4raw-id: //depot/perl@28249

perlio.c

index d2c96ad..f883fe9 100644 (file)
--- a/perlio.c
+++ b/perlio.c
@@ -5142,10 +5142,10 @@ vfprintf(FILE *fd, char *pat, char *args)
 int
 PerlIO_vsprintf(char *s, int n, const char *fmt, va_list ap)
 {
+    dTHX; 
     const int val = my_vsnprintf(s, n > 0 ? n : 0, fmt, ap);
 #ifndef PERL_MY_VSNPRINTF_GUARDED
     if (val < 0 || (n > 0 ? val >= n : 0)) {
-       dTHX;
        Perl_croak(aTHX_ "panic: my_vsnprintf overflow in PerlIO_vsprintf\n");
     }
 #endif