From fc270aab7973d70841134fe8ad511312cc33de4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= Date: Sat, 10 Dec 2005 14:57:48 +0000 Subject: [PATCH] configure.ac: Update comment in OSS includes check. Original commit message from CVS: * configure.ac: Update comment in OSS includes check. * sys/oss/gstossdmabuffer.c: * sys/oss/gstosshelper.c: * sys/oss/gstossmixer.c: * sys/oss/gstossmixertrack.c: * sys/oss/gstosssink.c: * sys/oss/gstosssrc.c: * sys/oss/oss_probe.c: Don't assume the OSS soundcard.h include is always in the sys/ directory. Instead, use the existing defines from config.h to include the right file. Fixes compilation on OpenBSD 3.8 (#323718). --- ChangeLog | 17 +++++++++++++++++ configure.ac | 2 +- sys/oss/gstossdmabuffer.c | 16 +++++++++++++++- sys/oss/gstosshelper.c | 38 +++++++++++++------------------------- sys/oss/gstossmixer.c | 15 ++++++++++++++- sys/oss/gstossmixertrack.c | 15 ++++++++++++++- sys/oss/gstosssink.c | 14 +++++++++++++- sys/oss/gstosssrc.c | 16 +++++++++++++++- sys/oss/oss_probe.c | 21 +++++++++++---------- 9 files changed, 113 insertions(+), 41 deletions(-) diff --git a/ChangeLog b/ChangeLog index f5fe9d5ab4..e73a99e047 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,20 @@ +2005-12-10 Tim-Philipp Müller + + * configure.ac: + Update comment in OSS includes check. + + * sys/oss/gstossdmabuffer.c: + * sys/oss/gstosshelper.c: + * sys/oss/gstossmixer.c: + * sys/oss/gstossmixertrack.c: + * sys/oss/gstosssink.c: + * sys/oss/gstosssrc.c: + * sys/oss/oss_probe.c: + Don't assume the OSS soundcard.h include is always in + the sys/ directory. Instead, use the existing defines + from config.h to include the right file. Fixes + compilation on OpenBSD 3.8 (#323718). + 2005-12-09 Thomas Vander Stichele * docs/plugins/gst-plugins-good-plugins-sections.txt: diff --git a/configure.ac b/configure.ac index d793569388..a7d069fac6 100644 --- a/configure.ac +++ b/configure.ac @@ -259,7 +259,7 @@ dnl Linux and newer BSD versions : AC_CHECK_HEADER(sys/soundcard.h, [ AC_DEFINE(HAVE_OSS_INCLUDE_IN_SYS,, [Define if OSS includes are in /sys/]) ] , [ -dnl Some old BSD versions : +dnl Some old BSD versions and also newer OpenBSD versions : AC_CHECK_HEADER(soundcard.h, [ AC_DEFINE(HAVE_OSS_INCLUDE_IN_ROOT,, [Define if OSS includes are in /]) ], [ diff --git a/sys/oss/gstossdmabuffer.c b/sys/oss/gstossdmabuffer.c index 5db584654f..5078d3c411 100644 --- a/sys/oss/gstossdmabuffer.c +++ b/sys/oss/gstossdmabuffer.c @@ -27,7 +27,21 @@ #include #include #include -#include + +#ifdef HAVE_OSS_INCLUDE_IN_SYS +# include +#else +# ifdef HAVE_OSS_INCLUDE_IN_ROOT +# include +# else +# ifdef HAVE_OSS_INCLUDE_IN_MACHINE +# include +# else +# error "What to include?" +# endif /* HAVE_OSS_INCLUDE_IN_MACHINE */ +# endif /* HAVE_OSS_INCLUDE_IN_ROOT */ +#endif /* HAVE_OSS_INCLUDE_IN_SYS */ + #include #include #include diff --git a/sys/oss/gstosshelper.c b/sys/oss/gstosshelper.c index 931d72c061..192a206893 100644 --- a/sys/oss/gstosshelper.c +++ b/sys/oss/gstosshelper.c @@ -33,7 +33,19 @@ #include #include -#include +#ifdef HAVE_OSS_INCLUDE_IN_SYS +# include +#else +# ifdef HAVE_OSS_INCLUDE_IN_ROOT +# include +# else +# ifdef HAVE_OSS_INCLUDE_IN_MACHINE +# include +# else +# error "What to include?" +# endif /* HAVE_OSS_INCLUDE_IN_MACHINE */ +# endif /* HAVE_OSS_INCLUDE_IN_ROOT */ +#endif /* HAVE_OSS_INCLUDE_IN_SYS */ #include @@ -43,30 +55,6 @@ GST_DEBUG_CATEGORY_EXTERN (oss_debug); #define GST_CAT_DEFAULT oss_debug -#if 0 - -#ifdef HAVE_OSS_INCLUDE_IN_SYS -#include -#else - -#ifdef HAVE_OSS_INCLUDE_IN_ROOT -#include -#else - -#include - -#endif /* HAVE_OSS_INCLUDE_IN_ROOT */ - -#endif /* HAVE_OSS_INCLUDE_IN_SYS */ - -#include -#include -#include -#include -#include -#include -#endif /* 0 */ - typedef struct _GstOssProbe GstOssProbe; struct _GstOssProbe { diff --git a/sys/oss/gstossmixer.c b/sys/oss/gstossmixer.c index b1758d657f..a5c8a35b94 100644 --- a/sys/oss/gstossmixer.c +++ b/sys/oss/gstossmixer.c @@ -30,7 +30,20 @@ #include #include #include -#include + +#ifdef HAVE_OSS_INCLUDE_IN_SYS +# include +#else +# ifdef HAVE_OSS_INCLUDE_IN_ROOT +# include +# else +# ifdef HAVE_OSS_INCLUDE_IN_MACHINE +# include +# else +# error "What to include?" +# endif /* HAVE_OSS_INCLUDE_IN_MACHINE */ +# endif /* HAVE_OSS_INCLUDE_IN_ROOT */ +#endif /* HAVE_OSS_INCLUDE_IN_SYS */ #include diff --git a/sys/oss/gstossmixertrack.c b/sys/oss/gstossmixertrack.c index d98f345aa6..b8333864e9 100644 --- a/sys/oss/gstossmixertrack.c +++ b/sys/oss/gstossmixertrack.c @@ -30,7 +30,20 @@ #include #include #include -#include + +#ifdef HAVE_OSS_INCLUDE_IN_SYS +# include +#else +# ifdef HAVE_OSS_INCLUDE_IN_ROOT +# include +# else +# ifdef HAVE_OSS_INCLUDE_IN_MACHINE +# include +# else +# error "What to include?" +# endif /* HAVE_OSS_INCLUDE_IN_MACHINE */ +# endif /* HAVE_OSS_INCLUDE_IN_ROOT */ +#endif /* HAVE_OSS_INCLUDE_IN_SYS */ #include diff --git a/sys/oss/gstosssink.c b/sys/oss/gstosssink.c index 206de4c0df..f44961b30c 100644 --- a/sys/oss/gstosssink.c +++ b/sys/oss/gstosssink.c @@ -28,8 +28,20 @@ #include #include #include -#include +#ifdef HAVE_OSS_INCLUDE_IN_SYS +# include +#else +# ifdef HAVE_OSS_INCLUDE_IN_ROOT +# include +# else +# ifdef HAVE_OSS_INCLUDE_IN_MACHINE +# include +# else +# error "What to include?" +# endif /* HAVE_OSS_INCLUDE_IN_MACHINE */ +# endif /* HAVE_OSS_INCLUDE_IN_ROOT */ +#endif /* HAVE_OSS_INCLUDE_IN_SYS */ #include "gstosssink.h" diff --git a/sys/oss/gstosssrc.c b/sys/oss/gstosssrc.c index b0db3279d4..4ad6a63e29 100644 --- a/sys/oss/gstosssrc.c +++ b/sys/oss/gstosssrc.c @@ -23,12 +23,26 @@ #ifdef HAVE_CONFIG_H #include "config.h" #endif + #include #include #include #include #include -#include + +#ifdef HAVE_OSS_INCLUDE_IN_SYS +# include +#else +# ifdef HAVE_OSS_INCLUDE_IN_ROOT +# include +# else +# ifdef HAVE_OSS_INCLUDE_IN_MACHINE +# include +# else +# error "What to include?" +# endif /* HAVE_OSS_INCLUDE_IN_MACHINE */ +# endif /* HAVE_OSS_INCLUDE_IN_ROOT */ +#endif /* HAVE_OSS_INCLUDE_IN_SYS */ #include "gstosssrc.h" diff --git a/sys/oss/oss_probe.c b/sys/oss/oss_probe.c index 5b0d12845b..af624fa5be 100644 --- a/sys/oss/oss_probe.c +++ b/sys/oss/oss_probe.c @@ -3,6 +3,7 @@ #include "config.h" #endif + #include #include #include @@ -11,17 +12,17 @@ #include #ifdef HAVE_OSS_INCLUDE_IN_SYS -#include +# include #else - -#ifdef HAVE_OSS_INCLUDE_IN_ROOT -#include -#else - -#include - -#endif /* HAVE_OSS_INCLUDE_IN_ROOT */ - +# ifdef HAVE_OSS_INCLUDE_IN_ROOT +# include +# else +# ifdef HAVE_OSS_INCLUDE_IN_MACHINE +# include +# else +# error "What to include?" +# endif /* HAVE_OSS_INCLUDE_IN_MACHINE */ +# endif /* HAVE_OSS_INCLUDE_IN_ROOT */ #endif /* HAVE_OSS_INCLUDE_IN_SYS */ typedef struct _Probe Probe;