Update Changes.
[p5sagit/p5-mst-13.2.git] / perl.h
diff --git a/perl.h b/perl.h
index c92e4db..2b66473 100644 (file)
--- a/perl.h
+++ b/perl.h
@@ -2146,9 +2146,11 @@ Gid_t getegid (void);
 #  if defined(PERL_OBJECT)
 #    define DEBUG_m(a) if (PL_debug & 128)     a
 #  else
+     /* Temporarily turn off memory debugging in case the a
+      * does memory allocation, either directly or indirectly. */
 #    define DEBUG_m(a)  \
     STMT_START {                                                       \
-       if (PERL_GET_INTERP) { dTHX; if (PL_debug & 128) { a; } }       \
+        if (PERL_GET_INTERP) { dTHX; if (PL_debug & 128) {PL_debug&=~128; a; PL_debug|=128;} } \
     } STMT_END
 #  endif
 #define DEBUG_f(a) if (PL_debug & 256) a
@@ -2207,7 +2209,7 @@ struct ufuncs {
 /* In pre-5.7-Perls the 'U' magic didn't get the thread context.
  * XS code wanting to be backward compatible can do something
  * like the following:
+
 #ifndef PERL_MG_UFUNC
 #define PERL_MG_UFUNC(name,ix,sv) I32 name(IV ix, SV *sv)
 #endif
@@ -3330,8 +3332,12 @@ typedef struct am_table_short AMTS;
  * Remap printf
  */
 #undef printf
+#ifdef __GNUC__
+#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