[BACK]Return to patch-ah CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / pkgsrc / games / xdoom / patches

File: [cvs.NetBSD.org] / pkgsrc / games / xdoom / patches / patch-ah (download)

Revision 1.5, Mon Feb 22 21:58:47 2010 UTC (10 years, 9 months ago) by wiz
Branch: MAIN
CVS Tags: pkgsrc-2020Q3-base, pkgsrc-2020Q3, pkgsrc-2020Q2-base, pkgsrc-2020Q2, pkgsrc-2020Q1-base, pkgsrc-2020Q1, pkgsrc-2019Q4-base, pkgsrc-2019Q4, pkgsrc-2019Q3-base, pkgsrc-2019Q3, pkgsrc-2019Q2-base, pkgsrc-2019Q2, pkgsrc-2019Q1-base, pkgsrc-2019Q1, pkgsrc-2018Q4-base, pkgsrc-2018Q4, pkgsrc-2018Q3-base, pkgsrc-2018Q3, pkgsrc-2018Q2-base, pkgsrc-2018Q2, pkgsrc-2018Q1-base, pkgsrc-2018Q1, pkgsrc-2017Q4-base, pkgsrc-2017Q4, pkgsrc-2017Q3-base, pkgsrc-2017Q3, pkgsrc-2017Q2-base, pkgsrc-2017Q2, pkgsrc-2017Q1-base, pkgsrc-2017Q1, pkgsrc-2016Q4-base, pkgsrc-2016Q4, pkgsrc-2016Q3-base, pkgsrc-2016Q3, pkgsrc-2016Q2-base, pkgsrc-2016Q2, pkgsrc-2016Q1-base, pkgsrc-2016Q1, pkgsrc-2015Q4-base, pkgsrc-2015Q4, pkgsrc-2015Q3-base, pkgsrc-2015Q3, pkgsrc-2015Q2-base, pkgsrc-2015Q2, pkgsrc-2015Q1-base, pkgsrc-2015Q1, pkgsrc-2014Q4-base, pkgsrc-2014Q4, pkgsrc-2014Q3-base, pkgsrc-2014Q3, pkgsrc-2014Q2-base, pkgsrc-2014Q2, pkgsrc-2014Q1-base, pkgsrc-2014Q1, pkgsrc-2013Q4-base, pkgsrc-2013Q4, pkgsrc-2013Q3-base, pkgsrc-2013Q3, pkgsrc-2013Q2-base, pkgsrc-2013Q2, pkgsrc-2013Q1-base, pkgsrc-2013Q1, pkgsrc-2012Q4-base, pkgsrc-2012Q4, pkgsrc-2012Q3-base, pkgsrc-2012Q3, pkgsrc-2012Q2-base, pkgsrc-2012Q2, pkgsrc-2012Q1-base, pkgsrc-2012Q1, pkgsrc-2011Q4-base, pkgsrc-2011Q4, pkgsrc-2011Q3-base, pkgsrc-2011Q3, pkgsrc-2011Q2-base, pkgsrc-2011Q2, pkgsrc-2011Q1-base, pkgsrc-2011Q1, pkgsrc-2010Q4-base, pkgsrc-2010Q4, pkgsrc-2010Q3-base, pkgsrc-2010Q3, pkgsrc-2010Q2-base, pkgsrc-2010Q2, pkgsrc-2010Q1-base, pkgsrc-2010Q1, HEAD
Changes since 1.4: +0 -0 lines

Re-add xdoom, requested by drochner.
Address PR 24024 by marking it as not-for-lp64platforms.

$NetBSD: patch-ah,v 1.5 2010/02/22 21:58:47 wiz Exp $

--- linuxdoom-1.10/i_sound.c.orig	Mon Dec 22 19:57:15 1997
+++ linuxdoom-1.10/i_sound.c	Thu Feb  3 02:56:08 2000
@@ -26,2 +26,3 @@ rcsid[] = "$Id: i_unix.c,v 1.5 1997/02/0
 
+#include <errno.h>
 #include <stdio.h>
@@ -43,4 +44,7 @@ rcsid[] = "$Id: i_unix.c,v 1.5 1997/02/0
 
+#ifdef LINUX
 // Linux voxware output.
 #include <linux/soundcard.h>
+#endif
+
 
@@ -165,3 +169,2 @@ myioctl
     int		rc;
-    extern int	errno;
     
@@ -484,4 +487,8 @@ I_StartSound
     {
-	fprintf(sndserver, "p%2.2x%2.2x%2.2x%2.2x\n", id, pitch, vol, sep);
-	fflush(sndserver);
+	if (fprintf(sndserver, "p%2.2x%2.2x%2.2x%2.2x\n", id, pitch, vol, sep)
+			    <= 0 || fflush(sndserver) )
+	{
+	fprintf(stderr, "Unable to write to sndserver - closing\n");
+	sndserver = 0;
+	}
     }
@@ -747,6 +754,16 @@ I_InitSound()
   else
-    sprintf(buffer, "%s", sndserver_filename);
+#ifdef INSTALL_PREFIX
+    {
+    sprintf(buffer, INSTALL_PREFIX"/bin/%s", sndserver_filename);
+    /* sndserver won't find its wadfile if DOMMWADDIR isn't set - HF */
+    if(!getenv("DOOMWADDIR"))
+      setenv("DOOMWADDIR", INSTALL_PREFIX"/share/doom", 1);
+    }
+#else
+    strcpy(buffer, sndserver_filename);
+#endif
+
   
   // start sound process
-  if ( !access(buffer, X_OK) )
+  if (!access(buffer, X_OK) )
   {
@@ -754,2 +771,4 @@ I_InitSound()
     sndserver = popen(buffer, "w");
+    /* Don't die with SIGPIPE if the sndserver has problems */
+    signal(SIGPIPE, (void (*)(int)) SIG_IGN);
   }