[MPlayer-dev-eng] [PATCH] Remove OSS support for OpenBSD

Brad Smith brad at comstyle.com
Mon Feb 7 03:43:05 EET 2022


Garbage collect the OSS bits for OpenBSD support. OpenBSD has not
used OSS for a long time.


Index: configure
===================================================================
--- configure	(revision 38331)
+++ configure	(working copy)
@@ -4438,19 +4438,12 @@
 
 echocheck "soundcard.h"
 _soundcard_h=no
-def_soundcard_h='#undef HAVE_SOUNDCARD_H'
 def_sys_soundcard_h='#undef HAVE_SYS_SOUNDCARD_H'
-for _soundcard_header in "sys/soundcard.h" "soundcard.h"; do
-  header_check $_soundcard_header && _soundcard_h=yes &&
-    res_comment="$_soundcard_header" && break
-done
+header_check sys/soundcard.h && _soundcard_h=yes &&
+  res_comment="sys/soundcard.h"
 
 if test "$_soundcard_h" = yes ; then
-  if test $_soundcard_header = "sys/soundcard.h"; then
-    def_sys_soundcard_h='#define HAVE_SYS_SOUNDCARD_H 1'
-  else
-    def_soundcard_h='#define HAVE_SOUNDCARD_H 1'
-  fi
+  def_sys_soundcard_h='#define HAVE_SYS_SOUNDCARD_H 1'
 fi
 echores "$_soundcard_h"
 
@@ -6113,17 +6106,17 @@
 echocheck "OSS Audio"
 if test "$_ossaudio" = auto ; then
   _ossaudio=no
-  return_check $_soundcard_header SNDCTL_DSP_SETFRAGMENT && _ossaudio=yes
+  return_check sys/soundcard.h SNDCTL_DSP_SETFRAGMENT && _ossaudio=yes
 fi
 if test "$_ossaudio" = yes ; then
   def_ossaudio='#define CONFIG_OSS_AUDIO 1'
   aomodules="oss $aomodules"
   _real_ossaudio=no
-  cpp_condition_check "$_soundcard_header" OPEN_SOUND_SYSTEM &&
+  cpp_condition_check "sys/soundcard.h" OPEN_SOUND_SYSTEM &&
       _real_ossaudio=yes
   if test "$_real_ossaudio" = yes; then
       def_ossaudio_devdsp='#define PATH_DEV_DSP "/dev/dsp"'
-  elif netbsd || openbsd ; then
+  elif netbsd ; then
       def_ossaudio_devdsp='#define PATH_DEV_DSP "/dev/sound"'
       extra_ldflags="$extra_ldflags -lossaudio"
   else
@@ -9213,7 +9206,6 @@
 $def_malloc_h
 $def_mman_h
 $def_mman_has_map_failed
-$def_soundcard_h
 $def_sys_soundcard_h
 $def_sys_sysinfo_h
 $def_sys_videoio_h
Index: libao2/ao_oss.c
===================================================================
--- libao2/ao_oss.c	(revision 38331)
+++ libao2/ao_oss.c	(working copy)
@@ -38,11 +38,7 @@
 
 #ifdef HAVE_SYS_SOUNDCARD_H
 #include <sys/soundcard.h>
-#else
-#ifdef HAVE_SOUNDCARD_H
-#include <soundcard.h>
 #endif
-#endif
 
 #include "libaf/af_format.h"
 
Index: stream/ai_oss.c
===================================================================
--- stream/ai_oss.c	(revision 38331)
+++ stream/ai_oss.c	(working copy)
@@ -29,12 +29,8 @@
 #ifdef HAVE_SYS_SOUNDCARD_H
 #include <sys/soundcard.h>
 #else
-#ifdef HAVE_SOUNDCARD_H
-#include <soundcard.h>
-#else
 #include <linux/soundcard.h>
 #endif
-#endif
 
 #include "audio_in.h"
 #include "mp_msg.h"
Index: stream/stream_radio.c
===================================================================
--- stream/stream_radio.c	(revision 38331)
+++ stream/stream_radio.c	(working copy)
@@ -71,12 +71,8 @@
 #ifdef HAVE_SYS_SOUNDCARD_H
 #include <sys/soundcard.h>
 #else
-#ifdef HAVE_SOUNDCARD_H
-#include <soundcard.h>
-#else
 #include <linux/soundcard.h>
 #endif
-#endif
 
 #endif
 
Index: stream/tvi_bsdbt848.c
===================================================================
--- stream/tvi_bsdbt848.c	(revision 38331)
+++ stream/tvi_bsdbt848.c	(working copy)
@@ -70,12 +70,8 @@
 #ifdef HAVE_SYS_SOUNDCARD_H
 #include <sys/soundcard.h>
 #else
-#ifdef HAVE_SOUNDCARD_H
-#include <soundcard.h>
-#else
 #include <machine/soundcard.h>
 #endif
-#endif
 
 #include "libaf/af_format.h"
 #include "libmpcodecs/img_format.h"


More information about the MPlayer-dev-eng mailing list