diff options
author | ben <ben@pkgsrc.org> | 2004-04-15 21:17:08 +0000 |
---|---|---|
committer | ben <ben@pkgsrc.org> | 2004-04-15 21:17:08 +0000 |
commit | 87b9f4ffd0386cf187eca275747e41c3c8933147 (patch) | |
tree | 2b2430998d617e8fb2840898ba5cd197ee4a5aa2 /games | |
parent | a388f2e0b88f2154ec4c5508db3ba9c3b4cb6a9a (diff) | |
download | pkgsrc-87b9f4ffd0386cf187eca275747e41c3c8933147.tar.gz |
Make ularn build and run in Linux.
Diffstat (limited to 'games')
-rw-r--r-- | games/ularn/Makefile | 12 | ||||
-rw-r--r-- | games/ularn/distinfo | 12 | ||||
-rw-r--r-- | games/ularn/patches/patch-aa | 53 | ||||
-rw-r--r-- | games/ularn/patches/patch-al | 11 | ||||
-rw-r--r-- | games/ularn/patches/patch-aw | 46 | ||||
-rw-r--r-- | games/ularn/patches/patch-az | 51 | ||||
-rw-r--r-- | games/ularn/patches/patch-bc | 31 |
7 files changed, 150 insertions, 66 deletions
diff --git a/games/ularn/Makefile b/games/ularn/Makefile index 1de940b092d..3b4e86d1765 100644 --- a/games/ularn/Makefile +++ b/games/ularn/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.13 2004/01/20 12:15:41 agc Exp $ +# $NetBSD: Makefile,v 1.14 2004/04/15 21:17:08 ben Exp $ DISTNAME= ularn PKGNAME= ularn-6.12.92 @@ -16,6 +16,16 @@ CONFIGURE_ENV+= PREFIX=${LOCALBASE} CONFIGURE_SCRIPT= ./Configure CONFIGURE_ARGS+= -d +.include "../../mk/bsd.prefs.mk" + +.if ${OPSYS} == "NetBSD" +SUBST_CLASSES+= termlib +SUBST_MESSAGE.termlib= "Adding -lcompat dependency." +SUBST_STAGE.termlib= post-patch +SUBST_FILES.termlib= Configure +SUBST_SED.termlib= -e 's,^termlib=..termlib,& -lcompat,' +.endif + pre-configure: ${MV} ${WRKSRC}/Configure ${WRKSRC}/Configure.template ${SED} 's:XXXLIBDIRXXX:${LOCALBASE}/share/Ularn:;\ diff --git a/games/ularn/distinfo b/games/ularn/distinfo index d2f2122ae4f..c80dad09196 100644 --- a/games/ularn/distinfo +++ b/games/ularn/distinfo @@ -1,8 +1,8 @@ -$NetBSD: distinfo,v 1.3 2003/12/06 19:28:22 ben Exp $ +$NetBSD: distinfo,v 1.4 2004/04/15 21:17:08 ben Exp $ SHA1 (ularn.tar.gz) = abc5bbecca65968e9ddaf2a8d07ac5141009459d Size (ularn.tar.gz) = 142790 bytes -SHA1 (patch-aa) = 729fbce5942d1a8867ffcdb79a1bbfd516535106 +SHA1 (patch-aa) = 1ce8bbbc05f275a832814b08c38bc6df066fe7b0 SHA1 (patch-ab) = a45fec8456da7b2b1985dc2332ede80082b2dab4 SHA1 (patch-ac) = 859fb4ae3782658d2f2cf29d11da67a901499e61 SHA1 (patch-ad) = ecf9b099ac8df2b86a9c45c0cf76c7caf194f64b @@ -13,7 +13,7 @@ SHA1 (patch-ah) = b56861b88f5abd7da2e2b0f5de4dc1f7261ff235 SHA1 (patch-ai) = 43b9a2fb45a2a52347f0a83efca5ba70c3c58989 SHA1 (patch-aj) = 09b5d87673103739c6bf7dfbf44c6fb8808fbd28 SHA1 (patch-ak) = d2cb3bda3c2e95868362a0d0dcf4bb584d6df987 -SHA1 (patch-al) = ce8015f7f4b767549ba9d790f369bcfe8fdac287 +SHA1 (patch-al) = 051ac587d3181df8a1161fd45cbd7eff4877e2e0 SHA1 (patch-am) = 1df190db775f3d2278275894f18246e4897738e0 SHA1 (patch-an) = 8c669a56795a8b4a2a6e24fd2fb121aa0699c01a SHA1 (patch-ao) = 42a184fea3408fc935f3dcc62b7a127e81b71085 @@ -24,11 +24,11 @@ SHA1 (patch-as) = faec3ca3cd3d0ded4f0cf0740fd856dbecbd0841 SHA1 (patch-at) = f0fd98ce48e779e63122a8311d4a4223cda5a751 SHA1 (patch-au) = 09f12532f42d39b59381d12c115842d5c7b8c7f3 SHA1 (patch-av) = 028b49f03ca8e63f1adee5eb82460de2855aa6cb -SHA1 (patch-aw) = fac054bd83a12048a33991cf2be181aab44d0294 +SHA1 (patch-aw) = 2ca6c7fdb63548a40613aa1a726d162aa8629014 SHA1 (patch-ax) = 31f39079aeb8ccf490cc7fbbd1d3c70d9f0737ed SHA1 (patch-ay) = 72bc4da5ec2006f3b1b4f29afec085e13f94ed11 -SHA1 (patch-az) = a2fbfbfacc77f297f77322ce66f30bf25bddbbfd +SHA1 (patch-az) = 0de2f5a8312bc7ff508dd40f254dcc61c0127f1a SHA1 (patch-ba) = be841fd37db8b8f0b588076f032c213d3eecb2f5 SHA1 (patch-bb) = 5500e86403adc57c8315c4df66a13b851e74ef1c -SHA1 (patch-bc) = b2a894056c94cf6b21c614b000fb9de0744f0268 +SHA1 (patch-bc) = fbe69ff9e69146e75180727fa65c1f767411e1ca SHA1 (patch-bd) = 54063f569eb03349b888d0dfaf02b7dcf15f7321 diff --git a/games/ularn/patches/patch-aa b/games/ularn/patches/patch-aa index fb8021c7b4d..964e7b29019 100644 --- a/games/ularn/patches/patch-aa +++ b/games/ularn/patches/patch-aa @@ -1,6 +1,6 @@ -$NetBSD: patch-aa,v 1.2 2002/01/03 13:06:51 wiz Exp $ +$NetBSD: patch-aa,v 1.3 2004/04/15 21:17:08 ben Exp $ ---- Configure.orig Wed Jan 18 20:41:26 1995 +--- Configure.orig 2004-04-15 13:55:44.000000000 -0700 +++ Configure @@ -18,11 +18,6 @@ PATH='.:/bin:/usr/bin:/usr/local/bin:/usr/ucb:/usr/local:/usr/lbin:/etc:/usr/new:/usr/new/bin:/usr/nbin:/usr/bin/X11:/usr/X11/bin:/usr/openwin/bin:/usr/ccs/bin' @@ -14,7 +14,7 @@ $NetBSD: patch-aa,v 1.2 2002/01/03 13:06:51 wiz Exp $ (alias) >/dev/null 2>&1 && \ echo "(I see you are using the Korn shell. Some ksh's blow up on Configure," && \ echo "especially on exotic machines. If yours does, try the Bourne shell instead.)" -@@ -58,7 +53,7 @@ +@@ -58,7 +53,7 @@ small='' medium='' large='' huge='' @@ -23,7 +23,7 @@ $NetBSD: patch-aa,v 1.2 2002/01/03 13:06:51 wiz Exp $ ldflags='' cc='' n='' -@@ -98,7 +93,7 @@ +@@ -98,7 +93,7 @@ compress='' uncompress='' imake='' xmkmf='' @@ -32,7 +32,7 @@ $NetBSD: patch-aa,v 1.2 2002/01/03 13:06:51 wiz Exp $ d_drand48='' d_havetlib='' termlib='' -@@ -107,7 +102,7 @@ +@@ -107,7 +102,7 @@ d_systime='' d_random='' defcomp='' imaketmpl='' @@ -41,7 +41,7 @@ $NetBSD: patch-aa,v 1.2 2002/01/03 13:06:51 wiz Exp $ mycompress='' myuncompress='' CONFIG='' -@@ -187,7 +182,7 @@ +@@ -187,7 +182,7 @@ EOM c='\c' fi echo $n "Type carriage return to continue. Your cursor should be here-->$c" @@ -50,16 +50,7 @@ $NetBSD: patch-aa,v 1.2 2002/01/03 13:06:51 wiz Exp $ rm -f .echotmp : now set up to do reads with possible shell escape and default assignment -@@ -1361,6 +1356,8 @@ - ;; - esac - -+termlib="$termlib -lcompat" -+ - echo " " - echo "End of configuration questions." - echo " " -@@ -1520,7 +1517,7 @@ +@@ -1520,7 +1515,7 @@ fastread='' echo "If you didn't make any mistakes, then just type a carriage return here." rp="If you need to edit config.sh, do it as a shell escape here:" $echo $n "$rp $c" @@ -68,3 +59,33 @@ $NetBSD: patch-aa,v 1.2 2002/01/03 13:06:51 wiz Exp $ case "$ans" in '') ;; *) : in case they cannot read +@@ -1571,7 +1566,8 @@ case "$xmkmf" in + *) dflt="y" + rp="How about using "imake" to build your Makefile? [$dflt]" + $echo $n "$rp $c" +- . UU/myread ++# . UU/myread ++ ans=n + case "$ans" in + y*) rm -f Makefile + $imake -DUseInstalled -I$imakedir -f Imakefile -s Makefile 2>/dev/null +@@ -1602,7 +1598,8 @@ case "$xmkmf" in + *) dflt="y" + rp="How about using "xmkmf" to build your Makefile? [$dflt]" + $echo $n "$rp $c" +- . UU/myread ++# . UU/myread ++ ans=n + case "$ans" in + y*) echo "OK..." + $xmkmf +@@ -1621,7 +1618,8 @@ case "$xmkmf" in + *) dflt="y" + rp="No? Ok, how about "imake"? [$dflt]" + $echo $n "$rp $c" +- . UU/myread ++# . UU/myread ++ ans=n + case "$ans" in + y*) rm -f Makefile + $imake -DUseInstalled -I$imakedir -f Imakefile -s Makefile 2>/dev/null diff --git a/games/ularn/patches/patch-al b/games/ularn/patches/patch-al index 7a5ca78ac9f..cde32307790 100644 --- a/games/ularn/patches/patch-al +++ b/games/ularn/patches/patch-al @@ -1,8 +1,8 @@ -$NetBSD: patch-al,v 1.2 2003/12/06 19:28:22 ben Exp $ +$NetBSD: patch-al,v 1.3 2004/04/15 21:17:08 ben Exp $ --- io.c.orig 1995-01-18 11:48:27.000000000 -0800 +++ io.c -@@ -47,6 +47,12 @@ +@@ -47,12 +47,18 @@ * * Note: ** entries are available only in termcap mode. */ @@ -11,10 +11,17 @@ $NetBSD: patch-al,v 1.2 2003/12/06 19:28:22 ben Exp $ +#include <sys/uio.h> +#include <stdlib.h> +#include <termcap.h> ++#include <time.h> +#include <unistd.h> #include "header.h" #include "extern.h" + #define LINBUFSIZE 128 /* size of the lgetw() and lgetl() buffer */ + +-extern short ospeed; + static int lfd; /* output file numbers */ + static int fd; /* input file numbers */ + int ipoint=BUFSIZ,iepoint=BUFSIZ; /* input buffering pointers */ @@ -61,13 +67,13 @@ static char lgetwbuf[LINBUFSIZE]; /* get /* * getcharacter() Routine to read in one character from the terminal diff --git a/games/ularn/patches/patch-aw b/games/ularn/patches/patch-aw index de533f59b37..88c59c6efdb 100644 --- a/games/ularn/patches/patch-aw +++ b/games/ularn/patches/patch-aw @@ -1,18 +1,22 @@ -$NetBSD: patch-aw,v 1.2 2003/12/06 19:28:22 ben Exp $ +$NetBSD: patch-aw,v 1.3 2004/04/15 21:17:08 ben Exp $ --- savelev.c.orig 1992-06-19 13:55:34.000000000 -0700 +++ savelev.c -@@ -1,4 +1,6 @@ +@@ -1,4 +1,7 @@ /* savelev.c */ ++#include <errno.h> +#include <stdlib.h> +#include <unistd.h> #include "header.h" #include "sphere.h" #include "player.h" -@@ -9,9 +11,7 @@ - extern char *sys_errlist[]; - extern int errno; +@@ -6,12 +9,7 @@ + #include "monst.h" + #include "extern.h" +-extern char *sys_errlist[]; +-extern int errno; +- -typedef char Char_Ary[MAXX][MAXY]; -typedef short Short_Ary[MAXX][MAXY]; -typedef long Long_Ary[MAXX][MAXY]; @@ -20,7 +24,7 @@ $NetBSD: patch-aw,v 1.2 2003/12/06 19:28:22 ben Exp $ typedef struct_mitem Mitem_Ary[MAXX][MAXY]; static int w = 0; -@@ -19,11 +19,11 @@ static int r = 0; +@@ -19,11 +17,11 @@ static int r = 0; /* this is the structure that holds the entire dungeon specifications */ typedef struct save_lev_str { @@ -36,7 +40,7 @@ $NetBSD: patch-aw,v 1.2 2003/12/06 19:28:22 ben Exp $ } Saved_Level; static Saved_Level *saved_levels[NLEVELS]; -@@ -33,15 +33,15 @@ static unsigned int FileSum; +@@ -33,15 +31,15 @@ static unsigned int FileSum; /* * routine to save the present level into storage */ @@ -57,7 +61,7 @@ $NetBSD: patch-aw,v 1.2 2003/12/06 19:28:22 ben Exp $ level_sums[level] = sum((unsigned char *)storage, sizeof(Saved_Level)); } -@@ -49,17 +49,17 @@ savelevel() +@@ -49,17 +47,17 @@ savelevel() /* * routine to restore a level from storage */ @@ -80,7 +84,7 @@ $NetBSD: patch-aw,v 1.2 2003/12/06 19:28:22 ben Exp $ if (level_sums[level] > 0) { if ((i = sum((unsigned char *)storage,sizeof(Saved_Level))) -@@ -82,7 +82,7 @@ getlevel() +@@ -82,7 +80,7 @@ getlevel() /* * to save the game in a file */ @@ -89,7 +93,7 @@ $NetBSD: patch-aw,v 1.2 2003/12/06 19:28:22 ben Exp $ char *fname; { int i; -@@ -145,10 +145,10 @@ char *fname; +@@ -145,10 +143,10 @@ char *fname; bwrite(fd,(char * )char_class, 20 * sizeof(char)); for (i=0; i<MAXSCROLL; i++) @@ -102,7 +106,7 @@ $NetBSD: patch-aw,v 1.2 2003/12/06 19:28:22 ben Exp $ bwrite(fd,(char *)spelknow, sizeof(char) * SPNUM); bwrite(fd,(char *)&wizard, sizeof(wizard)); -@@ -192,18 +192,22 @@ char *fname; +@@ -192,18 +190,22 @@ char *fname; } @@ -128,7 +132,7 @@ $NetBSD: patch-aw,v 1.2 2003/12/06 19:28:22 ben Exp $ fprintf(stderr,"Can't create temp file to restore game\n"); perror("mktemp"); nosignal=0; -@@ -221,15 +225,18 @@ char *fname; +@@ -221,15 +223,18 @@ char *fname; sleep(4); c[GOLD] = c[BANKACCOUNT] = 0; died(-265); @@ -148,7 +152,7 @@ $NetBSD: patch-aw,v 1.2 2003/12/06 19:28:22 ben Exp $ return; } } else { -@@ -273,10 +280,10 @@ char *fname; +@@ -273,10 +278,10 @@ char *fname; bread(fd,(char * )char_class, sizeof(char) * 20); for (i=0; i<MAXSCROLL; i++) @@ -161,7 +165,7 @@ $NetBSD: patch-aw,v 1.2 2003/12/06 19:28:22 ben Exp $ bread(fd,(char * )spelknow, sizeof(char) * SPNUM); -@@ -350,7 +357,7 @@ char *fname; +@@ -350,7 +355,7 @@ char *fname; /* subroutine to not allow greedy cheaters */ @@ -170,7 +174,7 @@ $NetBSD: patch-aw,v 1.2 2003/12/06 19:28:22 ben Exp $ { if (wizard) return; -@@ -370,7 +377,7 @@ lprcat("In that you are GREEDY as well a +@@ -370,7 +375,7 @@ lprcat("In that you are GREEDY as well a subroutine to not allow altered save files and terminate the attempted restart */ @@ -179,7 +183,7 @@ $NetBSD: patch-aw,v 1.2 2003/12/06 19:28:22 ben Exp $ { if (cheat) return; -@@ -385,7 +392,7 @@ fsorry() +@@ -385,7 +390,7 @@ fsorry() /* subroutine to not allow game if save file can't be deleted */ @@ -188,7 +192,7 @@ $NetBSD: patch-aw,v 1.2 2003/12/06 19:28:22 ben Exp $ { if (wizard) return; -@@ -403,7 +410,7 @@ lprcat("is in. Since this is unfair to +@@ -403,7 +408,7 @@ lprcat("is in. Since this is unfair to } @@ -197,7 +201,7 @@ $NetBSD: patch-aw,v 1.2 2003/12/06 19:28:22 ben Exp $ { int i; -@@ -415,18 +422,20 @@ init_cells() +@@ -415,18 +420,20 @@ init_cells() } @@ -220,7 +224,7 @@ $NetBSD: patch-aw,v 1.2 2003/12/06 19:28:22 ben Exp $ fprintf(stderr, " Wrote %d bytes so far\n", w); fprintf(stderr, " Call: %d\n", ncalls); abort(); -@@ -437,7 +446,7 @@ long num; +@@ -437,7 +444,7 @@ long num; w += nwrote; if (nwrote != num) { fprintf(stderr, "Error writing to save file\n"); @@ -229,7 +233,7 @@ $NetBSD: patch-aw,v 1.2 2003/12/06 19:28:22 ben Exp $ fprintf(stderr, " Wrote %d bytes so far\n", w); fprintf(stderr, " Call: %d\n", ncalls); sleep(4); -@@ -446,18 +455,20 @@ long num; +@@ -446,18 +453,20 @@ long num; FileSum += sum((unsigned char *)buf, num); } @@ -252,7 +256,7 @@ $NetBSD: patch-aw,v 1.2 2003/12/06 19:28:22 ben Exp $ fprintf(stderr, " Read %d bytes so far\n", w); fprintf(stderr, " Call: %d\n", ncalls); perror("read"); -@@ -467,7 +478,7 @@ long num; +@@ -467,7 +476,7 @@ long num; r += nread; if (nread != num) { fprintf(stderr, "Error reading save file\n"); diff --git a/games/ularn/patches/patch-az b/games/ularn/patches/patch-az index 39e2693602e..016d8bfd046 100644 --- a/games/ularn/patches/patch-az +++ b/games/ularn/patches/patch-az @@ -1,10 +1,11 @@ -$NetBSD: patch-az,v 1.1.1.1 2001/04/27 15:27:31 agc Exp $ +$NetBSD: patch-az,v 1.2 2004/04/15 21:17:08 ben Exp $ ---- signal.c.orig Fri Jun 19 13:55:37 1992 -+++ signal.c Sat Jan 13 21:03:53 2001 -@@ -1,8 +1,10 @@ +--- signal.c.orig 1992-06-19 13:55:37.000000000 -0700 ++++ signal.c +@@ -1,8 +1,11 @@ /* signal.c */ +#include <sys/types.h> ++#include <signal.h> +#include <unistd.h> #include "header.h" #include "extern.h" @@ -14,7 +15,7 @@ $NetBSD: patch-az,v 1.1.1.1 2001/04/27 15:27:31 agc Exp $ { cursor(1,24); lprcat("Press "); -@@ -14,7 +16,8 @@ +@@ -14,7 +17,8 @@ s2choose() /* text to be displayed if ^C } SIGTYPE @@ -24,7 +25,7 @@ $NetBSD: patch-az,v 1.1.1.1 2001/04/27 15:27:31 agc Exp $ { if (nosignal) { signal(SIGINT, cntlc); -@@ -37,7 +40,8 @@ +@@ -37,7 +41,8 @@ cntlc() /* what to do for an interrupt * * subroutine to save the game if a hangup signal */ SIGTYPE @@ -34,7 +35,7 @@ $NetBSD: patch-az,v 1.1.1.1 2001/04/27 15:27:31 agc Exp $ { if (ckpflag) { if (fork() == 0) { -@@ -86,10 +90,10 @@ +@@ -86,10 +91,10 @@ int sig; ** sigsave called before a shell escape ** sigreset called after a shell escape */ @@ -48,7 +49,17 @@ $NetBSD: patch-az,v 1.1.1.1 2001/04/27 15:27:31 agc Exp $ { SIGTYPE tstop(); signal(SIGHUP, sgam); -@@ -110,7 +114,7 @@ +@@ -98,7 +103,9 @@ sigsetup() + signal(SIGILL, sigpanic); + signal(SIGTRAP, sigpanic); + signal(SIGIOT, sigpanic); ++#ifdef SIGEMT + signal(SIGEMT, sigpanic); ++#endif + signal(SIGFPE, sigpanic); + signal(SIGBUS, sigpanic); + signal(SIGSEGV, sigpanic); +@@ -110,7 +117,7 @@ sigsetup() #endif /* SIGTSTP */ } @@ -57,7 +68,17 @@ $NetBSD: patch-az,v 1.1.1.1 2001/04/27 15:27:31 agc Exp $ { signal(SIGHUP, SIG_DFL); intsave = signal(SIGINT, SIG_DFL); -@@ -130,7 +134,7 @@ +@@ -118,7 +125,9 @@ sigsave() + signal(SIGILL, SIG_DFL); + signal(SIGTRAP, SIG_DFL); + signal(SIGIOT, SIG_DFL); ++#ifdef SIGEMT + signal(SIGEMT, SIG_DFL); ++#endif + signal(SIGFPE, SIG_DFL); + signal(SIGBUS, SIG_DFL); + signal(SIGSEGV, SIG_DFL); +@@ -130,7 +139,7 @@ sigsave() #endif /* SIGTSTP */ } @@ -66,7 +87,17 @@ $NetBSD: patch-az,v 1.1.1.1 2001/04/27 15:27:31 agc Exp $ { signal(SIGHUP, sgam); signal(SIGINT, intsave); -@@ -177,6 +181,7 @@ +@@ -138,7 +147,9 @@ sigreset() + signal(SIGILL, sigpanic); + signal(SIGTRAP, sigpanic); + signal(SIGIOT, sigpanic); ++#ifdef SIGEMT + signal(SIGEMT, sigpanic); ++#endif + signal(SIGFPE, sigpanic); + signal(SIGBUS, sigpanic); + signal(SIGSEGV, sigpanic); +@@ -177,6 +188,7 @@ static char *signame[NSIG] = { /* * routine to process a fatal error signal */ diff --git a/games/ularn/patches/patch-bc b/games/ularn/patches/patch-bc index ba56bb95c38..57bd7e3d4df 100644 --- a/games/ularn/patches/patch-bc +++ b/games/ularn/patches/patch-bc @@ -1,7 +1,7 @@ -$NetBSD: patch-bc,v 1.1.1.1 2001/04/27 15:27:31 agc Exp $ +$NetBSD: patch-bc,v 1.2 2004/04/15 21:17:08 ben Exp $ ---- tok.c.orig Fri Jun 19 13:55:30 1992 -+++ tok.c Sat Jan 13 21:56:42 2001 +--- tok.c.orig 1992-06-19 13:55:30.000000000 -0700 ++++ tok.c @@ -1,4 +1,7 @@ /* tok.c */ +#include <sys/types.h> @@ -10,7 +10,7 @@ $NetBSD: patch-bc,v 1.1.1.1 2001/04/27 15:27:31 agc Exp $ #include "header.h" #include "player.h" #include "monst.h" -@@ -12,12 +15,12 @@ +@@ -12,12 +15,12 @@ static char lastok=0; int yrepcount=0; static char usermonster[MAXUM][MAXMNAME]; @@ -25,12 +25,12 @@ $NetBSD: patch-bc,v 1.1.1.1 2001/04/27 15:27:31 agc Exp $ { int cc, ic; char *sh, *getenv(); -@@ -61,14 +64,14 @@ +@@ -61,21 +64,25 @@ yylex () /* shell escape */ if (cc == '!') { int pgrp; -#ifdef USG -+#if defined(USG) || defined(__NetBSD__) ++#if defined(USG) || defined(__NetBSD__) || defined(__linux__) pgrp = getpgrp(); #else pgrp = getpgrp(getpid()); @@ -42,7 +42,18 @@ $NetBSD: patch-bc,v 1.1.1.1 2001/04/27 15:27:31 agc Exp $ cl_dn(0,0); lflush(); if ((ic=fork())==0) { -@@ -116,7 +119,7 @@ + settty(); + setuid(geteuid()); + setgid(getegid()); ++#if defined(__linux__) ++ setpgrp(); ++#else + setpgrp(getpid(), pgrp); ++#endif + if ((sh = getenv("SHELL")) != (char *)NULL) { + execl(sh, sh, (char *)0); + if (!strcmp(sh, "/bin/sh")) { +@@ -116,7 +123,7 @@ yylex () /* * flushall() Function to flush all type-ahead in the input buffer */ @@ -51,7 +62,7 @@ $NetBSD: patch-bc,v 1.1.1.1 2001/04/27 15:27:31 agc Exp $ { #ifdef TCFLSH ioctl(0, TCFLSH, 0); /* standard ioctl to flush buffer */ -@@ -143,7 +146,7 @@ +@@ -143,7 +150,7 @@ flushall() function to set the desired hardness enter with hard= -1 for default hardness, else any desired hardness */ @@ -60,7 +71,7 @@ $NetBSD: patch-bc,v 1.1.1.1 2001/04/27 15:27:31 agc Exp $ int hard; { int j,k,i; -@@ -157,7 +160,8 @@ +@@ -157,7 +164,8 @@ int hard; c[HARDGAME] = hard; } @@ -70,7 +81,7 @@ $NetBSD: patch-bc,v 1.1.1.1 2001/04/27 15:27:31 agc Exp $ for (j=0; j<=MAXMONST+8; j++) { i = ((6+k)*monster[j].hitpoints+1)/6; monster[j].hitpoints = (i > 32767) ? 32767 : i; -@@ -175,7 +179,7 @@ +@@ -175,7 +183,7 @@ int hard; /* * function to read and process the larn options file */ |