summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorRobin Barker <RMBarker@cpan.org>2005-07-28 14:57:31 +0100
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2005-07-28 12:59:55 +0000
commite91e3b10e63de8f75d881ff2701d550f199a5a25 (patch)
tree0e22bef5697a788842f8129d02f7031f7a26c13c /ext
parente24bffee9086641f77b10c82b8a314dbe095fbbe (diff)
downloadperl-e91e3b10e63de8f75d881ff2701d550f199a5a25.tar.gz
silence compiler warning in mg.c POSIX.xs
Message-ID: <533D273D4014D411AB1D00062938C4D90849C75B@hotel.npl.co.uk> p4raw-id: //depot/perl@25236
Diffstat (limited to 'ext')
-rw-r--r--ext/POSIX/POSIX.xs12
1 files changed, 9 insertions, 3 deletions
diff --git a/ext/POSIX/POSIX.xs b/ext/POSIX/POSIX.xs
index 26d5e20695..79aa58d1a5 100644
--- a/ext/POSIX/POSIX.xs
+++ b/ext/POSIX/POSIX.xs
@@ -1347,7 +1347,9 @@ sigaction(sig, optaction, oldaction = 0)
/* Get back whether the old handler used safe signals. */
svp = hv_fetch(oldaction, "SAFE", 4, TRUE);
- sv_setiv(*svp, oact.sa_handler == PL_csighandlerp);
+ sv_setiv(*svp,
+ /* compare incompatible pointers by casting to integer */
+ PTR2nat(oact.sa_handler) == PTR2nat(PL_csighandlerp));
}
if (action) {
@@ -1355,8 +1357,12 @@ sigaction(sig, optaction, oldaction = 0)
PL_sighandlerp pointer when it's safe to do so.
(BTW, "csighandler" is very different from "sighandler".) */
svp = hv_fetch(action, "SAFE", 4, FALSE);
- act.sa_handler = (*svp && SvTRUE(*svp))
- ? PL_csighandlerp : PL_sighandlerp;
+ act.sa_handler =
+ DPTR2FPTR(
+ void (*)(),
+ (*svp && SvTRUE(*svp))
+ ? PL_csighandlerp : PL_sighandlerp
+ );
/* Vector new Perl handler through %SIG.
(The core signal handlers read %SIG to dispatch.) */