This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
debugger test could hang if run with umask 0002
[perl5.git] / warnings.pl
index 853a04a..8d89134 100644 (file)
@@ -282,6 +282,9 @@ print WARN <<'EOM' ;
 
 #define specialWARN(x)         ((x) == pWARN_STD || (x) == pWARN_ALL ||        \
                                 (x) == pWARN_NONE)
+
+/* if PL_warnhook is set to this value, then warnings die */
+#define PERL_WARNHOOK_FATAL    (((SV*)0) + 1)
 EOM
 
 my $offset = 0 ;
@@ -329,8 +332,8 @@ print WARN <<'EOM';
 #define isWARNf_on(c,x)        (IsSet((U8 *)(c + 1), 2*(x)+1))
 
 #define DUP_WARNINGS(p)                \
-    specialWARN(p) ? (p)       \
-    : CopyD(p, PerlMemShared_malloc(sizeof(*p)+*p), sizeof(*p)+*p, char)
+    (STRLEN*)(specialWARN(p) ? (p)     \
+    : CopyD(p, PerlMemShared_malloc(sizeof(*p)+*p), sizeof(*p)+*p, char))
 
 #define ckWARN(w)              Perl_ckwarn(aTHX_ packWARN(w))
 #define ckWARN2(w1,w2)         Perl_ckwarn(aTHX_ packWARN2(w1,w2))