Change 11941 by jhi@alpha on 2001/09/07 20:28:24
Subject: [PATCH perl.h mg.c pp_sys.c] Silence the remaing format warning
From: Robin Barker <[EMAIL PROTECTED]>
Date: Fri, 7 Sep 2001 18:28:23 +0100 (BST)
Message-Id: <[EMAIL PROTECTED]>
Affected files ...
... //depot/perl/Porting/pumpkin.pod#29 edit
... //depot/perl/mg.c#196 edit
... //depot/perl/perl.h#390 edit
... //depot/perl/pp_sys.c#254 edit
Differences ...
==== //depot/perl/Porting/pumpkin.pod#29 (text) ====
Index: perl/Porting/pumpkin.pod
--- perl/Porting/pumpkin.pod.~1~ Fri Sep 7 14:45:06 2001
+++ perl/Porting/pumpkin.pod Fri Sep 7 14:45:06 2001
@@ -729,15 +729,33 @@
A more accurate approach is the following commands:
- sh Configure -des -Dccflags=-Wformat ...
- make miniperl # without -DCHECK_FORMAT
- perl -i.orig -pwe 's/-Wformat/-DCHECK_FORMAT $&/' config.sh
- sh Configure -S
- make >& make.log # build from correct miniperl
+=over 4
+
+=item *
+
+build miniperl with -DCHECK_FORMAT
+
+ make clean
+ make miniperl OPTIMIZE=-DCHECK_FORMAT >& mini.log
+
+=item *
+
+build a clean miniperl,
+and build everything else from that with -DCHECK_FORMAT
+
make clean
- make miniperl >& mini.log # build miniperl with -DCHECK_FORMAT
- perl -nwe 'print if /^\S+:/ and not /^make\b/' mini.log make.log
+ make miniperl
+ make all OPTIMIZE=-DCHECK_FORMAT >& make.log
+
+=item *
+
+clean up, and print warnings from the log files
+
make clean
+ perl -nwe 'print if /^\S+:/ and not /^make\b/' \
+ mini.log make.log
+
+=back
(-Wformat support by Robin Barker.)
==== //depot/perl/mg.c#196 (text) ====
Index: perl/mg.c
--- perl/mg.c.~1~ Fri Sep 7 14:45:06 2001
+++ perl/mg.c Fri Sep 7 14:45:06 2001
@@ -2317,7 +2317,7 @@
(void)rsignal(sig, &Perl_csighandler);
#endif
#endif /* !PERL_MICRO */
- Perl_die(aTHX_ Nullch);
+ Perl_die(aTHX_ Nullformat);
}
cleanup:
if (flags & 1)
==== //depot/perl/perl.h#390 (text) ====
Index: perl/perl.h
--- perl/perl.h.~1~ Fri Sep 7 14:45:06 2001
+++ perl/perl.h Fri Sep 7 14:45:06 2001
@@ -2020,6 +2020,14 @@
# endif
#endif
+#ifndef Nullformat
+# ifdef CHECK_FORMAT
+# define Nullformat "%s",""
+# else
+# define Nullformat Nullch
+# endif
+#endif
+
/* Some unistd.h's give a prototype for pause() even though
HAS_PAUSE ends up undefined. This causes the #define
below to be rejected by the compiler. Sigh.
==== //depot/perl/pp_sys.c#254 (text) ====
Index: perl/pp_sys.c
--- perl/pp_sys.c.~1~ Fri Sep 7 14:45:06 2001
+++ perl/pp_sys.c Fri Sep 7 14:45:06 2001
@@ -468,7 +468,7 @@
sv_setsv(error,*PL_stack_sp--);
}
}
- DIE(aTHX_ Nullch);
+ DIE(aTHX_ Nullformat);
}
else {
if (SvPOK(error) && SvCUR(error))
End of Patch.