shithub: sox

Download patch

ref: d365f98fa5311c8f55b939d36a3d6b6d26e87657
parent: 94408e30ff6589dd99d2237d1452e68e109b9e2d
author: cbagwell <cbagwell>
date: Fri Oct 15 21:57:32 EDT 2004

manpage fixes and openbsd sunaudio patches.

--- a/Changelog
+++ b/Changelog
@@ -4,6 +4,11 @@
 This file contains a list of all changes starting after the release of
 sox-11gamma.
 
+sox-12.17.7
+-----------
+  o Christian Weisgerber sent patches to man page fixes
+    and patches for sunaudio driver on openbsd.
+
 sox-12.17.6
 -----------
   o Changed comment code to always use copies of strings to
--- a/Makefile.in
+++ b/Makefile.in
@@ -27,12 +27,15 @@
 	nroff -man $(srcdir)/soxexam.1 | col -b > soxexam.txt
 	nroff -man $(srcdir)/libst.3 | col -b > libst.txt
 
+PLAY_INSTALL_0 =
+PLAY_INSTALL_1  = install-play
+
 install: $(PLAY_INSTALL_$(PLAY_SUPPORT))
 	cd src && $(MAKE) $@
 	$(srcdir)/mkinstalldirs $(mandir)/man1
 	$(INSTALL) -c -m 644 $(srcdir)/sox.1 $(mandir)/man1
 	if [ -f $(mandir)/man1/soxmix.1 ] ; then $(RM) $(mandir)/man1/soxmix.1; fi
-	$(LN_S) $(mandir)/man1/sox.1 $(mandir)/man1/soxmix.1
+	cd $(mandir)/man && $(LN_S) sox.1 soxmix.1
 	$(INSTALL) -c -m 644 $(srcdir)/soxexam.1 $(mandir)/man1
 
 install-play:
@@ -39,7 +42,7 @@
 	if [ -f $(mandir)/man1/rec.1 ]; then $(RM) $(mandir)/man1/rec.1; fi
 	$(srcdir)/mkinstalldirs $(mandir)/man1
 	$(INSTALL) -c -m 644 $(srcdir)/play.1 $(mandir)/man1
-	$(LN_S) $(mandir)/man1/play.1 $(mandir)/man1/rec.1
+	cd $(mandir)/man1 && $(LN_S) play.1 rec.1
 
 install-lib:
 	cd src && $(MAKE) $@
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -110,7 +110,7 @@
 	if [ -f $(bindir)/rec ] ; then $(RM) $(bindir)/rec; fi
 	$(top_srcdir)/mkinstalldirs $(bindir)
 	$(INSTALL) -c -m 755 play $(bindir)
-	$(LN_S) $(bindir)/play $(bindir)/rec
+	cd $(bindir) && $(LN_S) play rec
 
 install-lib: libst.a
 	$(top_srcdir)/mkinstalldirs $(libdir)
--- a/src/play.in
+++ b/src/play.in
@@ -187,7 +187,7 @@
 	device="/dev/dsp"
     fi
     ;;
-  NetBSD)
+  NetBSD|OpenBSD)
     arch_defines="-t sunau"
     if [ -z "$device" ]; then
         device="/dev/audio"
--- a/src/sunaudio.c
+++ b/src/sunaudio.c
@@ -20,8 +20,8 @@
 #if     defined(HAVE_SUNAUDIO)
 
 #include <sys/ioctl.h>
-#if defined(__SVR4) || defined(__NetBSD__)
-#ifdef __NetBSD__
+#if defined(__SVR4) || defined(__NetBSD__) || defined(__OpenBSD__)
+#if defined(__NetBSD__) || defined(__OpenBSD__)
 #include <sys/types.h>  /* This should be in audioio.h itself but its not */
 #endif
 #include <sys/audioio.h>
@@ -31,10 +31,12 @@
 #ifdef HAVE_ERRNO_H
 #include <errno.h>
 #endif
-#ifndef __NetBSD__
+#if !defined(__NetBSD__) && !defined(__OpenBSD__)
 #include <stropts.h>
 #endif
+#ifdef _HAVE_MALLOC_H
 #include <malloc.h>
+#endif
 #include <unistd.h>
 #include <stdlib.h>
 #include <fcntl.h>
@@ -172,7 +174,7 @@
         return(ST_EOF);
     }
     /* Flush any data in the buffers - its probably in the wrong format */
-#ifdef __NetBSD__
+#if defined(__NetBSD__) || defined(__OpenBSD__)
     ioctl(fileno(ft->fp), AUDIO_FLUSH);
 #else
     ioctl(fileno(ft->fp), I_FLUSH, FLUSHR);