Thu Apr 26 15:18:55 2012 UTC ()
Make ps2pkm build with clang.
Patch from Jan Danielsson.
(minskim)
diff -r1.5 -r1.6 pkgsrc/fonts/ps2pkm/distinfo
diff -r0 -r1.1 pkgsrc/fonts/ps2pkm/patches/patch-type1.c
--- pkgsrc/fonts/ps2pkm/distinfo 2011/07/28 04:53:03 1.5
+++ pkgsrc/fonts/ps2pkm/distinfo 2012/04/26 15:18:55 1.6
| @@ -1,5 +1,6 @@ | | | @@ -1,5 +1,6 @@ |
1 | $NetBSD: distinfo,v 1.5 2011/07/28 04:53:03 minskim Exp $ | | 1 | $NetBSD: distinfo,v 1.6 2012/04/26 15:18:55 minskim Exp $ |
2 | | | 2 | |
3 | SHA1 (texlive-20110705-source.tar.xz) = 7a47cfe847801c86c98da8ade181baf97339f6e4 | | 3 | SHA1 (texlive-20110705-source.tar.xz) = 7a47cfe847801c86c98da8ade181baf97339f6e4 |
4 | RMD160 (texlive-20110705-source.tar.xz) = fbcad494cc4717a0238ab2624f259270fce9332b | | 4 | RMD160 (texlive-20110705-source.tar.xz) = fbcad494cc4717a0238ab2624f259270fce9332b |
5 | Size (texlive-20110705-source.tar.xz) = 131207904 bytes | | 5 | Size (texlive-20110705-source.tar.xz) = 131207904 bytes |
| | | 6 | SHA1 (patch-type1.c) = bb51988a641764440cb66b14d1e68c748e83e572 |
$NetBSD: patch-type1.c,v 1.1 2012/04/26 15:18:55 minskim Exp $
The Error macro doesn't return a value, but PSFakePop() should return
a DOUBLE. gcc seems to accept this, clang does not.
--- type1.c.orig 2012-04-26 13:37:31.000000000 +0000
+++ type1.c
@@ -125,8 +125,12 @@ int currentchar = -1; /* for error repor
#define CC IfTrace1(TRUE, "'%03o ", currentchar)
#define Error {errflag = TRUE; return;}
+
+#define Error_rd {errflag = TRUE; return 0.0;}
#define Error0(errmsg) { CC; IfTrace0(TRUE, errmsg); Error;}
+
+#define Error0_rd(errmsg) { CC; IfTrace0(TRUE, errmsg); Error_rd;}
#define Error1(errmsg,arg) { CC; IfTrace1(TRUE, errmsg, arg); Error;}
@@ -780,7 +784,7 @@ static void PSFakePush(Num)
static DOUBLE PSFakePop ()
{
if (PSFakeTop >= 0) return(PSFakeStack[PSFakeTop--]);
- else Error0("PSFakePop : Stack empty\n");
+ else Error0_rd("PSFakePop : Stack empty\n");
/*NOTREACHED*/
}