summaryrefslogtreecommitdiff
path: root/fonts
diff options
context:
space:
mode:
authorminskim <minskim@pkgsrc.org>2012-04-26 15:18:55 +0000
committerminskim <minskim@pkgsrc.org>2012-04-26 15:18:55 +0000
commita2816bfc150ed83a09cf6670b7a7d429339eca83 (patch)
tree64ff420d645633167fa0a2829ee1b519fd610b9e /fonts
parentf588aa7be9e5d98c9ac715157236242a796ff269 (diff)
downloadpkgsrc-a2816bfc150ed83a09cf6670b7a7d429339eca83.tar.gz
Make ps2pkm build with clang.
Patch from Jan Danielsson.
Diffstat (limited to 'fonts')
-rw-r--r--fonts/ps2pkm/distinfo3
-rw-r--r--fonts/ps2pkm/patches/patch-type1.c29
2 files changed, 31 insertions, 1 deletions
diff --git a/fonts/ps2pkm/distinfo b/fonts/ps2pkm/distinfo
index 923c14af28a..454c09b0185 100644
--- a/fonts/ps2pkm/distinfo
+++ b/fonts/ps2pkm/distinfo
@@ -1,5 +1,6 @@
-$NetBSD: distinfo,v 1.5 2011/07/28 04:53:03 minskim Exp $
+$NetBSD: distinfo,v 1.6 2012/04/26 15:18:55 minskim Exp $
SHA1 (texlive-20110705-source.tar.xz) = 7a47cfe847801c86c98da8ade181baf97339f6e4
RMD160 (texlive-20110705-source.tar.xz) = fbcad494cc4717a0238ab2624f259270fce9332b
Size (texlive-20110705-source.tar.xz) = 131207904 bytes
+SHA1 (patch-type1.c) = bb51988a641764440cb66b14d1e68c748e83e572
diff --git a/fonts/ps2pkm/patches/patch-type1.c b/fonts/ps2pkm/patches/patch-type1.c
new file mode 100644
index 00000000000..cbdc7d54db5
--- /dev/null
+++ b/fonts/ps2pkm/patches/patch-type1.c
@@ -0,0 +1,29 @@
+$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*/
+ }
+