From c93488d7dab1e45e7c14aafe40c63e2152b4101f Mon Sep 17 00:00:00 2001 From: is Date: Sat, 12 Mar 2005 10:22:08 +0000 Subject: 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. --- lang/sr/Makefile | 4 ++-- lang/sr/patches/patch-bg | 39 +++++++++++++++++++++++++++++++++++++++ lang/sr/patches/patch-bh | 9 +++++++++ 3 files changed, 50 insertions(+), 2 deletions(-) create mode 100644 lang/sr/patches/patch-bg create mode 100644 lang/sr/patches/patch-bh (limited to 'lang') 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\")") -- cgit v1.2.3