pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/lang/sr



Module Name:    pkgsrc
Committed By:   he
Date:           Wed Apr 18 08:42:16 UTC 2018

Modified Files:
        pkgsrc/lang/sr: Makefile distinfo
Added Files:
        pkgsrc/lang/sr/patches: patch-csw_netbsd.c patch-gen.h
Removed Files:
        pkgsrc/lang/sr/patches: patch-au patch-bl

Log Message:
Modernize this so that it builds again (after SSP), and
do the context-shifting in a non-MI manner so it may work
on other ports than i386.
Bump PKGREVISION.


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 pkgsrc/lang/sr/Makefile
cvs rdiff -u -r1.22 -r1.23 pkgsrc/lang/sr/distinfo
cvs rdiff -u -r1.3 -r0 pkgsrc/lang/sr/patches/patch-au
cvs rdiff -u -r1.1 -r0 pkgsrc/lang/sr/patches/patch-bl
cvs rdiff -u -r0 -r1.1 pkgsrc/lang/sr/patches/patch-csw_netbsd.c \
    pkgsrc/lang/sr/patches/patch-gen.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/lang/sr/Makefile
diff -u pkgsrc/lang/sr/Makefile:1.24 pkgsrc/lang/sr/Makefile:1.25
--- pkgsrc/lang/sr/Makefile:1.24        Sun Oct 21 20:56:54 2012
+++ pkgsrc/lang/sr/Makefile     Wed Apr 18 08:42:16 2018
@@ -1,9 +1,9 @@
-# $NetBSD: Makefile,v 1.24 2012/10/21 20:56:54 cheusov Exp $
+# $NetBSD: Makefile,v 1.25 2018/04/18 08:42:16 he Exp $
 #
 
 DISTNAME=              sr233
 PKGNAME=               sr-2.3.3
-PKGREVISION=           9
+PKGREVISION=           10
 CATEGORIES=            lang parallel
 MASTER_SITES=          ftp://ftp.cs.arizona.edu/sr/
 EXTRACT_SUFX=          .tar.Z

Index: pkgsrc/lang/sr/distinfo
diff -u pkgsrc/lang/sr/distinfo:1.22 pkgsrc/lang/sr/distinfo:1.23
--- pkgsrc/lang/sr/distinfo:1.22        Tue Nov  3 22:50:45 2015
+++ pkgsrc/lang/sr/distinfo     Wed Apr 18 08:42:16 2018
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.22 2015/11/03 22:50:45 agc Exp $
+$NetBSD: distinfo,v 1.23 2018/04/18 08:42:16 he Exp $
 
 SHA1 (sr233.tar.Z) = 0354987527ed1e84c32d3b1fc6bacb65d647f337
 RMD160 (sr233.tar.Z) = 58c90c06abede7a15ca8a68f53b6fdfa575c79df
@@ -10,7 +10,6 @@ SHA1 (patch-ad) = 7fc00d7f52a16dc7b814c9
 SHA1 (patch-ar) = 9a331cdb90959d0cc7475d2fc203d2c302d4bf5c
 SHA1 (patch-as) = db45b9cbc7adf8fccc207e91041a544e427c7a2a
 SHA1 (patch-at) = 989ea8ecf79a9f5d0567c53a2c9580b4ecc634c9
-SHA1 (patch-au) = 701c53883b3661c578dc5b192a9779e7fdc503f5
 SHA1 (patch-av) = 1beabb719e6f4a1d1872bd66c73d0d1169686770
 SHA1 (patch-aw) = 1bf4f69379229c7493b057a0445959b16cc36ca7
 SHA1 (patch-ax) = a834a65f2574be388bb420fdf883a9ac74f00ec9
@@ -27,8 +26,9 @@ SHA1 (patch-bh) = c880064e871297a411e229
 SHA1 (patch-bi) = ad6706295ff164fe6df257d325a06f9b157175d1
 SHA1 (patch-bj) = cd46d268fc173fe02efa8338ebf3f664ff2e5b94
 SHA1 (patch-bk) = 7ec4207ea173377fd6de9dc6272ab20e48ef0780
-SHA1 (patch-bl) = 7386a25df3223892fb841af3fa13eee3a17505b3
 SHA1 (patch-bm) = 52ebd86cda2d354bf5d580c0f2cf25f80350cd2c
 SHA1 (patch-bn) = fb8ebeb57956c094aee652c183a2fe1abbc45bb1
 SHA1 (patch-bo) = 55dcc14458fcb817c605eb7b8c4240e87e1cd25a
 SHA1 (patch-bp) = e0b553628fc2711ba2abe2b01999a0f84a5fbb7b
+SHA1 (patch-csw_netbsd.c) = e6a1dfe43a2c64317287cc4676d264b195fc29b5
+SHA1 (patch-gen.h) = cf024274a1c7866e103bcaf3355f5565a1612e2d

Added files:

Index: pkgsrc/lang/sr/patches/patch-csw_netbsd.c
diff -u /dev/null pkgsrc/lang/sr/patches/patch-csw_netbsd.c:1.1
--- /dev/null   Wed Apr 18 08:42:16 2018
+++ pkgsrc/lang/sr/patches/patch-csw_netbsd.c   Wed Apr 18 08:42:16 2018
@@ -0,0 +1,106 @@
+$NetBSD: patch-csw_netbsd.c,v 1.1 2018/04/18 08:42:16 he Exp $
+
+Implement context switching for NetBSD.
+
+--- csw/netbsd.c.orig  2018-04-18 07:36:39.000000000 +0000
++++ csw/netbsd.c
+@@ -0,0 +1,99 @@
++/*
++ *  netbsd.c -- context switch code for NetBSD 2.
++ *
++ *  Some Makefile changes are needed to use this code.
++ */
++
++#include <ucontext.h>
++
++void sr_stk_underflow(void);
++void sr_stk_corrupted(void);
++
++static void startup(void (*)(void), unsigned long, unsigned long, unsigned long, unsigned long);
++
++static void sr_setcontext_u(ucontext_t *);
++static void sr_swapcontext_u(ucontext_t *, ucontext_t *);
++
++static void
++sr_setcontext_u(ucontext_t *uc) {
++      setcontext(uc);
++}
++
++static void
++sr_swapcontext_u(ucontext_t *oldc, ucontext_t *newc) {
++      swapcontext(oldc, newc);
++}
++
++
++/*
++ *  sr_build_context (func, buf, bufsize, arg1, arg2, arg3, arg4)
++ *
++ *  Build a context that will call func(arg1,arg2,arg3,arg4) when activated
++ *  and will catch an underflow error if func returns.  We use an intermediary
++ *  in order to catch that return.
++ */
++void
++sr_build_context (func, buf, bufsize, arg1, arg2, arg3, arg4)
++void (*func)();
++char *buf;
++int bufsize;
++unsigned long arg1, arg2, arg3, arg4;
++{
++    ucontext_t *uc = (ucontext_t *) buf;      /* put header at front of buf */
++
++    if (0 != getcontext(uc)) {                        /* initialize context */
++      sr_stk_corrupted();
++    }
++
++    uc->uc_stack.ss_sp = buf + sizeof (ucontext_t);
++    uc->uc_stack.ss_size = bufsize - sizeof (ucontext_t);
++
++    makecontext (uc, startup, 5, func, arg1, arg2, arg3, arg4);
++    uc->uc_stack.ss_flags = 0;
++}
++
++/*
++ *  startup (func, a,b,c,d) -- intermediary for startup and underflow detection.
++ */
++static void
++startup (func, arg1, arg2, arg3, arg4)
++void (*func)();
++unsigned long arg1, arg2, arg3, arg4;
++{
++    (*func) (arg1, arg2, arg3, arg4);
++    sr_stk_underflow();
++}
++
++
++
++/*
++ *  sr_chg_context (newctx, oldctx) -- change contexts.
++ */
++void
++sr_chg_context (new, old)
++char *new, *old;
++{
++    ucontext_t *oldu, *newu;
++    newu = (ucontext_t *)new;
++
++    if (old) {
++      oldu = (ucontext_t *)old;
++      swapcontext(oldu, newu);
++    } else {
++      setcontext(newu);
++    }
++}
++
++
++
++/*
++ *  sr_check_stk (stk) -- check for stack overflow.
++ *
++ *  We have no idea of how to do that, so we do nothing.
++ */
++void
++sr_check_stk(stk)
++char *stk;
++{
++    /* nothing */
++}
Index: pkgsrc/lang/sr/patches/patch-gen.h
diff -u /dev/null pkgsrc/lang/sr/patches/patch-gen.h:1.1
--- /dev/null   Wed Apr 18 08:42:16 2018
+++ pkgsrc/lang/sr/patches/patch-gen.h  Wed Apr 18 08:42:16 2018
@@ -0,0 +1,35 @@
+$NetBSD: patch-gen.h,v 1.1 2018/04/18 08:42:16 he Exp $
+
+If using modern C compiler, use header files instead of
+attempting to predeclare C library functions.
+
+--- gen.h.orig 1999-07-28 20:42:21.000000000 +0000
++++ gen.h
+@@ -32,9 +32,15 @@
+  *  Don't use protoypes here; increases conflicts with system include files.
+  */
+ 
++#if defined(__STDC__) || defined(__sgi) || defined(_AIX) || defined(__alpha)
++#include <stdlib.h>
++#include <unistd.h>
++#include <string.h>
++#else
+ char *getenv(), *getcwd();
+ char *strcat(), *strncat(), *strchr(), *strrchr(), *strcpy(), *strncpy();
+ void exit();
++#endif
+ 
+ /* int functions are not explicitly defined -- use implicit definitions */
+ /* This avoids conflicts on Solaris (at least) where strlen is a size_t fn */
+@@ -43,8 +49,9 @@ void exit();
+ double fmod();        /* not in Sequent <math.h> */
+ 
+ #if defined(__STDC__) || defined(__sgi) || defined(_AIX) || defined(__alpha)
+-void *malloc(), *realloc();
+-void *memset(), *memcpy();
++#include <unistd.h>
++#include <string.h>
++#include <stdlib.h>
+ #else
+ char *malloc(), *realloc();
+ char *memset(), *memcpy();



Home | Main Index | Thread Index | Old Index