fix build with perl 5.17.7; from upstream

this could use an update..
This commit is contained in:
jasper 2014-03-21 13:07:34 +00:00
parent fc328f04ff
commit 7d3084ab53
3 changed files with 45 additions and 2 deletions

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.48 2013/04/19 21:32:37 sthen Exp $
# $OpenBSD: Makefile,v 1.49 2014/03/21 13:07:34 jasper Exp $
SHARED_ONLY= Yes
@ -7,7 +7,7 @@ COMMENT-demo= demonstrate the features of ptk
MODULES= cpan
VERSION= 804.030
REVISION= 0
REVISION= 1
DISTNAME= Tk-${VERSION}
PKGNAME-main= p5-Tk-${VERSION}
PKGNAME-demo= p5-Tk-demo-${VERSION}

View File

@ -0,0 +1,22 @@
$OpenBSD: patch-IO_IO_xs,v 1.1 2014/03/21 13:07:34 jasper Exp $
From 2333fa35c99aae1db1cb8d3ebce31fc21bc66e0a Mon Sep 17 00:00:00 2001
From: Slaven Rezic <slaven@rezic.de>
Date: Sat, 23 Mar 2013 14:00:58 +0100
Subject: [PATCH] * fix for 5.17.7 and newer: SvUPGRADE() is no longer an expression
--- IO/IO.xs.orig Fri Mar 21 14:00:03 2014
+++ IO/IO.xs Fri Mar 21 14:03:56 2014
@@ -207,11 +207,7 @@ int offset
info.count = 0;
info.error = 0;
info.eof = 0;
- if (!SvUPGRADE(buf, SVt_PV))
- {
- RETVAL = &PL_sv_undef;
- return;
- }
+ (void)SvUPGRADE(buf, SVt_PV);
SvPOK_only(buf); /* validate pointer */
Tcl_CreateFileHandler(fd, TCL_READABLE, read_handler, (ClientData) &info);
do

View File

@ -0,0 +1,21 @@
$OpenBSD: patch-tkGlue_c,v 1.1 2014/03/21 13:07:34 jasper Exp $
From 2333fa35c99aae1db1cb8d3ebce31fc21bc66e0a Mon Sep 17 00:00:00 2001
From: Slaven Rezic <slaven@rezic.de>
Date: Sat, 23 Mar 2013 14:00:58 +0100
Subject: [PATCH] * fix for 5.17.7 and newer: SvUPGRADE() is no longer an expression
--- tkGlue.c.orig Fri Mar 21 13:57:53 2014
+++ tkGlue.c Fri Mar 21 14:01:36 2014
@@ -3830,10 +3830,7 @@ ClientData clientData;
return EXPIRE((interp, "Cannot trace readonly variable"));
}
}
- if (!SvUPGRADE(sv, SVt_PVMG))
- {
- return EXPIRE((interp, "Trace SvUPGRADE failed"));
- }
+ (void)SvUPGRADE(sv, SVt_PVMG);
if (SvTYPE(sv) == SVt_PVAV)
{