summaryrefslogtreecommitdiff
path: root/lang
diff options
context:
space:
mode:
authoris <is@pkgsrc.org>2005-03-12 10:22:08 +0000
committeris <is@pkgsrc.org>2005-03-12 10:22:08 +0000
commit8e081ec8d1fe5ac3aca185d473b3adc107c60801 (patch)
treeb7eb127b238a779389bc3d1b9b6b8a1a8931267e /lang
parent43a0c904638f135bd4a8cba69724085ab4b06ec9 (diff)
downloadpkgsrc-8e081ec8d1fe5ac3aca185d473b3adc107c60801.tar.gz
sr-2.3.3nb4 --- Replace sr_ptrval() by code that:
- works per the specification and - works on LP64 machines as well as ILP32 machines. Designed to work anywhere where sizeof(L) >= sizeof(P). Cannot use %p, as we want to feed back the patch to the SR people, who maintain SR also on some very old systems.
Diffstat (limited to 'lang')
-rw-r--r--lang/sr/Makefile4
-rw-r--r--lang/sr/patches/patch-bg39
-rw-r--r--lang/sr/patches/patch-bh9
3 files changed, 50 insertions, 2 deletions
diff --git a/lang/sr/Makefile b/lang/sr/Makefile
index 4c0530509c0..92eaa2bd2d4 100644
--- a/lang/sr/Makefile
+++ b/lang/sr/Makefile
@@ -1,9 +1,9 @@
-# $NetBSD: Makefile,v 1.7 2005/03/11 23:24:13 is Exp $
+# $NetBSD: Makefile,v 1.8 2005/03/12 10:22:08 is Exp $
#
DISTNAME= sr233
PKGNAME= sr-2.3.3
-PKGREVISION= 3
+PKGREVISION= 4
CATEGORIES= lang parallel
MASTER_SITES= ftp://ftp.cs.arizona.edu/sr/
EXTRACT_SUFX= .tar.Z
diff --git a/lang/sr/patches/patch-bg b/lang/sr/patches/patch-bg
new file mode 100644
index 00000000000..5e177780b94
--- /dev/null
+++ b/lang/sr/patches/patch-bg
@@ -0,0 +1,39 @@
+$NetBSD: patch-bg,v 1.1 2005/03/12 10:22:08 is Exp $
+
+--- rts/conv.c.orig 1999-07-28 22:42:24.000000000 +0200
++++ rts/conv.c
+@@ -219,11 +219,30 @@ sr_ptrval (locn, s)
+ char *locn;
+ String *s;
+ {
++ unsigned long ul;
++ char c[2], d[2];
++ int t;
++
+ sr_check_stk (CUR_STACK);
+- if (s->length == 8 && strncmp (DATA (s), "==null==", 8) == 0)
+- return 0;
+- else
+- return (Ptr) sr_intval (locn, s);
++
++ if (s->length == 8 && strncmp (DATA (s), "==null==", 8) == 0) {
++ return (Ptr)0;
++ }
++ /* implicit else */
++
++ c[0] = '\0';
++ DATA (s) [s->length] = '\0';
++
++ t = sscanf (DATA (s), "%lx%1s%1s", &ul, c, d);
++
++ if ( t != 1 &&
++ (t != 2 || (c[0] != 'x' && c[0] != 'X'))) {
++
++ sr_runerr (locn, E_PCNV, s);
++ }
++
++ return (Ptr) ul;
++
+ }
+
+
diff --git a/lang/sr/patches/patch-bh b/lang/sr/patches/patch-bh
new file mode 100644
index 00000000000..ca85ed51d7e
--- /dev/null
+++ b/lang/sr/patches/patch-bh
@@ -0,0 +1,9 @@
+$NetBSD: patch-bh,v 1.1 2005/03/12 10:22:08 is Exp $
+
+--- runerr.h.orig 2005-03-11 09:28:59.000000000 +0100
++++ runerr.h
+@@ -40,3 +40,4 @@ RUNERR(E_CCNV,41,"illegal conversion: ch
+ RUNERR(E_BCNV,42,"illegal conversion: bool(\"%S\")")
+ RUNERR(E_ICNV,43,"illegal conversion: int(\"%S\")")
+ RUNERR(E_RCNV,44,"illegal conversion: real(\"%S\")")
++RUNERR(E_PCNV,45,"illegal conversion: pointer(\"%S\")")