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
This commit is contained in:
@@ -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>
|
||||
|
||||
|
@@ -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)
|
||||
{
|
||||
|
@@ -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 */
|
||||
|
@@ -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)
|
||||
|
@@ -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 */
|
||||
|
||||
|
@@ -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 */
|
||||
|
@@ -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
|
||||
|
||||
|
@@ -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)
|
||||
|
@@ -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;
|
||||
|
@@ -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)
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user