aboutsummaryrefslogtreecommitdiffstats
path: root/src/audioOutputs
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2008-01-03 07:29:49 +0000
committerEric Wong <normalperson@yhbt.net>2008-01-03 07:29:49 +0000
commitcb8f1af3bd5056109bfbe75faf568430a5121bda (patch)
tree86d812b051bca48fd6b4f32706d506a3d77a3989 /src/audioOutputs
parent790e70cf25ade17e7412b153c440ef4999fe72fd (diff)
downloadmpd-cb8f1af3bd5056109bfbe75faf568430a5121bda.tar.gz
mpd-cb8f1af3bd5056109bfbe75faf568430a5121bda.tar.xz
mpd-cb8f1af3bd5056109bfbe75faf568430a5121bda.zip
Cleanup #includes of standard system headers and put them in one place
This will make refactoring features easier, especially now that pthreads support and larger refactorings are on the horizon. Hopefully, this will make porting to other platforms (even non-UNIX-like ones for masochists) easier, too. os_compat.h will house all the #includes for system headers considered to be the "core" of MPD. Headers for optional features will be left to individual source files. git-svn-id: https://svn.musicpd.org/mpd/trunk@7130 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to 'src/audioOutputs')
-rw-r--r--src/audioOutputs/audioOutput_alsa.c5
-rw-r--r--src/audioOutputs/audioOutput_ao.c5
-rw-r--r--src/audioOutputs/audioOutput_fifo.c10
-rw-r--r--src/audioOutputs/audioOutput_jack.c13
-rw-r--r--src/audioOutputs/audioOutput_mvp.c12
-rw-r--r--src/audioOutputs/audioOutput_oss.c12
-rw-r--r--src/audioOutputs/audioOutput_osx.c4
-rw-r--r--src/audioOutputs/audioOutput_pulse.c6
-rw-r--r--src/audioOutputs/audioOutput_shout.c5
9 files changed, 12 insertions, 60 deletions
diff --git a/src/audioOutputs/audioOutput_alsa.c b/src/audioOutputs/audioOutput_alsa.c
index 1122eb5bf..1f90c6ee0 100644
--- a/src/audioOutputs/audioOutput_alsa.c
+++ b/src/audioOutputs/audioOutput_alsa.c
@@ -18,8 +18,6 @@
#include "../audioOutput.h"
-#include <stdlib.h>
-
#ifdef HAVE_ALSA
#define ALSA_PCM_NEW_HW_PARAMS_API
@@ -34,8 +32,7 @@
#include "../conf.h"
#include "../log.h"
-
-#include <string.h>
+#include "../os_compat.h"
#include <alsa/asoundlib.h>
diff --git a/src/audioOutputs/audioOutput_ao.c b/src/audioOutputs/audioOutput_ao.c
index a7f437ef4..e7f3dcd6b 100644
--- a/src/audioOutputs/audioOutput_ao.c
+++ b/src/audioOutputs/audioOutput_ao.c
@@ -22,8 +22,7 @@
#include "../conf.h"
#include "../log.h"
-
-#include <string.h>
+#include "../os_compat.h"
#include <ao/ao.h>
@@ -240,7 +239,5 @@ AudioOutputPlugin aoPlugin = {
#else
-#include <stdio.h>
-
DISABLED_AUDIO_OUTPUT_PLUGIN(aoPlugin)
#endif
diff --git a/src/audioOutputs/audioOutput_fifo.c b/src/audioOutputs/audioOutput_fifo.c
index 66c54dd7f..b01f37f67 100644
--- a/src/audioOutputs/audioOutput_fifo.c
+++ b/src/audioOutputs/audioOutput_fifo.c
@@ -17,8 +17,7 @@
*/
#include "../audioOutput.h"
-
-#include <stdlib.h>
+#include "../os_compat.h"
#ifdef HAVE_FIFO
@@ -27,13 +26,6 @@
#include "../utils.h"
#include "../timer.h"
-#include <errno.h>
-#include <fcntl.h>
-#include <string.h>
-#include <unistd.h>
-#include <sys/stat.h>
-#include <sys/types.h>
-
#define FIFO_BUFFER_SIZE 65536 /* pipe capacity on Linux >= 2.6.11 */
typedef struct _FifoData {
diff --git a/src/audioOutputs/audioOutput_jack.c b/src/audioOutputs/audioOutput_jack.c
index d38f00bad..253da2159 100644
--- a/src/audioOutputs/audioOutput_jack.c
+++ b/src/audioOutputs/audioOutput_jack.c
@@ -19,15 +19,10 @@
#ifdef HAVE_JACK
-#include <stdlib.h>
-#include <errno.h>
-
+#include "../os_compat.h"
#include "../conf.h"
#include "../log.h"
-#include <string.h>
-#include <pthread.h>
-
#include <jack/jack.h>
#include <jack/types.h>
#include <jack/ringbuffer.h>
@@ -37,7 +32,11 @@ pthread_cond_t play_audio = PTHREAD_COND_INITIALIZER;
/*#include "dmalloc.h"*/
-#define MIN(a, b) ((a) < (b) ? (a) : (b))
+#ifdef MIN
+# undef MIN
+# define MIN(a, b) ((a) < (b) ? (a) : (b))
+#endif
+
/*#define SAMPLE_SIZE sizeof(jack_default_audio_sample_t);*/
diff --git a/src/audioOutputs/audioOutput_mvp.c b/src/audioOutputs/audioOutput_mvp.c
index ea365c657..c633bb96b 100644
--- a/src/audioOutputs/audioOutput_mvp.c
+++ b/src/audioOutputs/audioOutput_mvp.c
@@ -20,23 +20,13 @@
*/
#include "../audioOutput.h"
-
-#include <stdlib.h>
+#include "../os_compat.h"
#ifdef HAVE_MVP
#include "../conf.h"
#include "../log.h"
-#include <string.h>
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/ioctl.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include <errno.h>
-
typedef struct {
unsigned long dsp_status;
unsigned long stream_decode_type;
diff --git a/src/audioOutputs/audioOutput_oss.c b/src/audioOutputs/audioOutput_oss.c
index 74c62ce96..68c82bf30 100644
--- a/src/audioOutputs/audioOutput_oss.c
+++ b/src/audioOutputs/audioOutput_oss.c
@@ -20,23 +20,13 @@
*/
#include "../audioOutput.h"
-
-#include <stdlib.h>
+#include "../os_compat.h"
#ifdef HAVE_OSS
#include "../conf.h"
#include "../log.h"
-#include <string.h>
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/ioctl.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include <errno.h>
-
#if defined(__OpenBSD__) || defined(__NetBSD__)
# include <soundcard.h>
#else /* !(defined(__OpenBSD__) || defined(__NetBSD__) */
diff --git a/src/audioOutputs/audioOutput_osx.c b/src/audioOutputs/audioOutput_osx.c
index 1caebade5..4a6e8ccf1 100644
--- a/src/audioOutputs/audioOutput_osx.c
+++ b/src/audioOutputs/audioOutput_osx.c
@@ -21,8 +21,6 @@
#ifdef HAVE_OSX
#include <AudioUnit/AudioUnit.h>
-#include <stdlib.h>
-#include <pthread.h>
#include "../log.h"
@@ -368,7 +366,5 @@ AudioOutputPlugin osxPlugin = {
#else
-#include <stdio.h>
-
DISABLED_AUDIO_OUTPUT_PLUGIN(osxPlugin)
#endif
diff --git a/src/audioOutputs/audioOutput_pulse.c b/src/audioOutputs/audioOutput_pulse.c
index 8948e0263..69566444b 100644
--- a/src/audioOutputs/audioOutput_pulse.c
+++ b/src/audioOutputs/audioOutput_pulse.c
@@ -18,15 +18,11 @@
#include "../audioOutput.h"
-#include <stdlib.h>
-
#ifdef HAVE_PULSE
#include "../conf.h"
#include "../log.h"
-
-#include <string.h>
-#include <time.h>
+#include "../os_compat.h"
#include <pulse/simple.h>
#include <pulse/error.h>
diff --git a/src/audioOutputs/audioOutput_shout.c b/src/audioOutputs/audioOutput_shout.c
index 455a635f6..e4ee4916d 100644
--- a/src/audioOutputs/audioOutput_shout.c
+++ b/src/audioOutputs/audioOutput_shout.c
@@ -18,8 +18,6 @@
#include "../audioOutput.h"
-#include <stdlib.h>
-
#ifdef HAVE_SHOUT
#include "../conf.h"
@@ -27,9 +25,6 @@
#include "../pcm_utils.h"
#include "../timer.h"
-#include <string.h>
-#include <time.h>
-
#include <shout/shout.h>
#include <vorbis/vorbisenc.h>