aboutsummaryrefslogtreecommitdiffstats
path: root/src/inputPlugins
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/inputPlugins
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/inputPlugins')
-rw-r--r--src/inputPlugins/_flac_common.c4
-rw-r--r--src/inputPlugins/_ogg_common.c3
-rw-r--r--src/inputPlugins/aac_plugin.c5
-rw-r--r--src/inputPlugins/audiofile_plugin.c8
-rw-r--r--src/inputPlugins/flac_plugin.c6
-rw-r--r--src/inputPlugins/mod_plugin.c8
-rw-r--r--src/inputPlugins/mp3_plugin.c8
-rw-r--r--src/inputPlugins/mp4_plugin.c6
-rw-r--r--src/inputPlugins/mpc_plugin.c7
-rw-r--r--src/inputPlugins/oggflac_plugin.c5
-rw-r--r--src/inputPlugins/oggvorbis_plugin.c8
-rw-r--r--src/inputPlugins/wavpack_plugin.c8
12 files changed, 12 insertions, 64 deletions
diff --git a/src/inputPlugins/_flac_common.c b/src/inputPlugins/_flac_common.c
index 11126cd1b..9a415f4b6 100644
--- a/src/inputPlugins/_flac_common.c
+++ b/src/inputPlugins/_flac_common.c
@@ -31,10 +31,8 @@
#include "../outputBuffer.h"
#include "../decode.h"
#include "../replayGain.h"
+#include "../os_compat.h"
-#include <stdio.h>
-#include <string.h>
-#include <unistd.h>
#include <FLAC/format.h>
#include <FLAC/metadata.h>
diff --git a/src/inputPlugins/_ogg_common.c b/src/inputPlugins/_ogg_common.c
index ca68ae4f1..3ec227a66 100644
--- a/src/inputPlugins/_ogg_common.c
+++ b/src/inputPlugins/_ogg_common.c
@@ -28,8 +28,7 @@
(defined(FLAC_API_VERSION_CURRENT) && FLAC_API_VERSION_CURRENT > 7)
#include "../utils.h"
-
-#include <string.h>
+#include "../os_compat.h"
ogg_stream_type ogg_stream_type_detect(InputStream * inStream)
{
diff --git a/src/inputPlugins/aac_plugin.c b/src/inputPlugins/aac_plugin.c
index 0cbb4c97a..0091b396e 100644
--- a/src/inputPlugins/aac_plugin.c
+++ b/src/inputPlugins/aac_plugin.c
@@ -27,11 +27,8 @@
#include "../log.h"
#include "../inputStream.h"
#include "../outputBuffer.h"
+#include "../os_compat.h"
-#include <stdio.h>
-#include <unistd.h>
-#include <stdlib.h>
-#include <string.h>
#include <faad.h>
/* all code here is either based on or copied from FAAD2's frontend code */
diff --git a/src/inputPlugins/audiofile_plugin.c b/src/inputPlugins/audiofile_plugin.c
index 68a87022a..8527a47a9 100644
--- a/src/inputPlugins/audiofile_plugin.c
+++ b/src/inputPlugins/audiofile_plugin.c
@@ -27,14 +27,8 @@
#include "../log.h"
#include "../pcm_utils.h"
#include "../playerData.h"
+#include "../os_compat.h"
-#include <stdio.h>
-#include <unistd.h>
-#include <stdlib.h>
-#include <string.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <unistd.h>
#include <audiofile.h>
static int getAudiofileTotalTime(char *file)
diff --git a/src/inputPlugins/flac_plugin.c b/src/inputPlugins/flac_plugin.c
index 920e71947..c906314f3 100644
--- a/src/inputPlugins/flac_plugin.c
+++ b/src/inputPlugins/flac_plugin.c
@@ -27,11 +27,7 @@
#include "../outputBuffer.h"
#include "../replayGain.h"
#include "../audio.h"
-
-#include <stdio.h>
-#include <string.h>
-#include <unistd.h>
-#include <assert.h>
+#include "../os_compat.h"
/* this code was based on flac123, from flac-tools */
diff --git a/src/inputPlugins/mod_plugin.c b/src/inputPlugins/mod_plugin.c
index 0b20690e4..0c01caadb 100644
--- a/src/inputPlugins/mod_plugin.c
+++ b/src/inputPlugins/mod_plugin.c
@@ -25,14 +25,8 @@
#include "../log.h"
#include "../pcm_utils.h"
#include "../playerData.h"
+#include "../os_compat.h"
-#include <stdio.h>
-#include <unistd.h>
-#include <stdlib.h>
-#include <string.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <unistd.h>
#include <mikmod.h>
/* this is largely copied from alsaplayer */
diff --git a/src/inputPlugins/mp3_plugin.c b/src/inputPlugins/mp3_plugin.c
index 8a9dfad5c..9bb3f2f4b 100644
--- a/src/inputPlugins/mp3_plugin.c
+++ b/src/inputPlugins/mp3_plugin.c
@@ -33,13 +33,7 @@
#include "../tag.h"
#include "../conf.h"
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <unistd.h>
-#include <errno.h>
+#include "../os_compat.h"
#define FRAMES_CUSHION 2000
diff --git a/src/inputPlugins/mp4_plugin.c b/src/inputPlugins/mp4_plugin.c
index 5261580fc..2e3dd18ae 100644
--- a/src/inputPlugins/mp4_plugin.c
+++ b/src/inputPlugins/mp4_plugin.c
@@ -27,15 +27,11 @@
#include "../inputStream.h"
#include "../outputBuffer.h"
#include "../decode.h"
+#include "../os_compat.h"
#include "../mp4ff/mp4ff.h"
-#include <stdio.h>
-#include <unistd.h>
-#include <stdlib.h>
-#include <string.h>
#include <faad.h>
-
/* all code here is either based on or copied from FAAD2's frontend code */
static int mp4_getAACTrack(mp4ff_t * infile)
diff --git a/src/inputPlugins/mpc_plugin.c b/src/inputPlugins/mpc_plugin.c
index 60fd6fde6..0d18c113a 100644
--- a/src/inputPlugins/mpc_plugin.c
+++ b/src/inputPlugins/mpc_plugin.c
@@ -27,14 +27,9 @@
#include "../inputStream.h"
#include "../outputBuffer.h"
#include "../replayGain.h"
+#include "../os_compat.h"
-#include <stdio.h>
-#include <unistd.h>
-#include <stdlib.h>
-#include <string.h>
#include <mpcdec/mpcdec.h>
-#include <errno.h>
-#include <math.h>
typedef struct _MpcCallbackData {
InputStream *inStream;
diff --git a/src/inputPlugins/oggflac_plugin.c b/src/inputPlugins/oggflac_plugin.c
index 50636274a..e980a04b2 100644
--- a/src/inputPlugins/oggflac_plugin.c
+++ b/src/inputPlugins/oggflac_plugin.c
@@ -32,10 +32,7 @@
#include "../outputBuffer.h"
#include "../replayGain.h"
#include "../audio.h"
-
-#include <stdio.h>
-#include <string.h>
-#include <unistd.h>
+#include "../os_compat.h"
static void oggflac_cleanup(FlacData * data,
OggFLAC__SeekableStreamDecoder * decoder)
diff --git a/src/inputPlugins/oggvorbis_plugin.c b/src/inputPlugins/oggvorbis_plugin.c
index 05c665386..2e9342526 100644
--- a/src/inputPlugins/oggvorbis_plugin.c
+++ b/src/inputPlugins/oggvorbis_plugin.c
@@ -31,11 +31,7 @@
#include "../inputStream.h"
#include "../outputBuffer.h"
#include "../replayGain.h"
-
-#include <stdio.h>
-#include <unistd.h>
-#include <stdlib.h>
-#include <string.h>
+#include "../os_compat.h"
#ifndef HAVE_TREMOR
#include <vorbis/vorbisfile.h>
@@ -52,8 +48,6 @@
#define ov_time_seek_page(VF, S) (ov_time_seek_page(VF, (S)*1000))
#endif /* HAVE_TREMOR */
-#include <errno.h>
-
#ifdef WORDS_BIGENDIAN
#define OGG_DECODE_USE_BIGENDIAN 1
#else
diff --git a/src/inputPlugins/wavpack_plugin.c b/src/inputPlugins/wavpack_plugin.c
index 97fbc37f9..b6a3ee6ed 100644
--- a/src/inputPlugins/wavpack_plugin.c
+++ b/src/inputPlugins/wavpack_plugin.c
@@ -28,15 +28,9 @@
#include "../pcm_utils.h"
#include "../playerData.h"
#include "../outputBuffer.h"
+#include "../os_compat.h"
-#include <stdio.h>
-#include <unistd.h>
-#include <stdlib.h>
-#include <string.h>
-#include <sys/types.h>
-#include <sys/stat.h>
#include <wavpack/wavpack.h>
-#include <math.h>
#define ERRORLEN 80