summaryrefslogtreecommitdiff
path: root/games/xblast/patches/patch-ab
diff options
context:
space:
mode:
authordsainty <dsainty@pkgsrc.org>2006-05-07 03:16:48 +0000
committerdsainty <dsainty@pkgsrc.org>2006-05-07 03:16:48 +0000
commit70a40993ea6e638fdab7c1744c4a428204b26ef3 (patch)
treea3651b4a9a6b005988d077831bacf66e7a19177f /games/xblast/patches/patch-ab
parent3c2a093790515d7c8effcfec89b7dd0dad869e69 (diff)
downloadpkgsrc-70a40993ea6e638fdab7c1744c4a428204b26ef3.tar.gz
Update from version 2.6 to version 2.10.2. Includes new UDP networked game support and music, but still the same great bombs.
Diffstat (limited to 'games/xblast/patches/patch-ab')
-rw-r--r--games/xblast/patches/patch-ab59
1 files changed, 47 insertions, 12 deletions
diff --git a/games/xblast/patches/patch-ab b/games/xblast/patches/patch-ab
index ab095cad022..0381cc131bf 100644
--- a/games/xblast/patches/patch-ab
+++ b/games/xblast/patches/patch-ab
@@ -1,17 +1,52 @@
-$NetBSD: patch-ab,v 1.2 2006/01/12 23:49:59 joerg Exp $
+$NetBSD: patch-ab,v 1.3 2006/05/07 03:16:48 dsainty Exp $
---- xbsndsrv.c.orig 1997-10-16 08:48:27.000000000 +0000
-+++ xbsndsrv.c
-@@ -100,7 +100,11 @@
- #include <sys/stat.h>
+Purge the unnecessary complication of PID_FORMAT, and add NetBSD support. Use
+OSS for sound for NetBSD, because the Sun support is a bit too Sun-centric.
+
+--- xbsndsrv.c.orig 2005-03-09 06:27:15.000000000 +1300
++++ xbsndsrv.c 2006-05-06 19:09:29.000000000 +1200
+@@ -44,9 +44,7 @@
#include <sys/ioctl.h>
#include <sys/time.h>
--#include <linux/soundcard.h>
-+#if defined(__DragonFly__) || defined(__FreeBSD__)
+
+-#ifdef __sun__
+-/* format for pids on sun */
+-#define PID_FORMAT "%lu"
++#if defined(__sun__)
+ /* needed for bzero(), open()*/
+ #include <strings.h>
+ #include <fcntl.h>
+@@ -58,8 +56,6 @@
+ #include <sys/stropts.h>
+ #endif
+ #else
+-/* format for pids, non-sun */
+-#define PID_FORMAT "%u"
+ /* non-sun audio includes */
+-#ifdef __FreeBSD__
+-#include <machine/soundcard.h>
++#if defined(__DragonFly__) || defined(__FreeBSD__) || defined(__NetBSD__)
+#include <sys/soundcard.h>
-+#else
-+#include <soundcard.h>
-+#endif
- #include <signal.h>
- #include "sound.h"
+@@ -499,18 +495,18 @@
+ ptr=fopen(userPath ,"r+");
+ if(ptr==NULL){
+ ptr=fopen(userPath ,"w+");
+- sprintf(tmp, PID_FORMAT, getpid());
++ sprintf(tmp, "%u", (unsigned int)getpid());
+ fwrite(tmp,1,strlen(tmp),ptr);
+ fclose(ptr);
+ return 0;
+ }
+- fscanf(ptr, PID_FORMAT, &pid);
+- fprintf(stderr," "PID_FORMAT" \n",pid);
++ fscanf(ptr, "%u", &pid);
++ fprintf(stderr," %u \n", pid);
+ if(kill(pid,0)==-1 || pid<=0)
+ {
+ fseek(ptr,0,SEEK_SET);
+- sprintf(tmp, PID_FORMAT, getpid());
++ sprintf(tmp, "%u", (unsigned int)getpid());
+ fwrite(tmp,1,strlen(tmp),ptr);
+ fclose(ptr);
+ return 0;