Commit cb8f1af3 authored by Eric Wong's avatar Eric Wong

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
parent 790e70cf
......@@ -25,15 +25,7 @@
#include "playerData.h"
#include "utils.h"
#include "state_file.h"
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include <signal.h>
#include <sys/stat.h>
#include <sys/param.h>
#include <errno.h>
#include <unistd.h>
#include "os_compat.h"
#define AUDIO_DEVICE_STATE "audio_device_state:"
#define AUDIO_DEVICE_STATE_LEN 19 /* strlen(AUDIO_DEVICE_STATE) */
......
......@@ -23,8 +23,7 @@
#include "mpd_types.h"
#include "tag.h"
#include <stdio.h>
#include "os_compat.h"
#define AUDIO_AO_DRIVER_DEFAULT "default"
......
......@@ -21,8 +21,7 @@
#include "list.h"
#include "log.h"
#include "pcm_utils.h"
#include <string.h>
#include "os_compat.h"
#define AUDIO_OUTPUT_TYPE "type"
#define AUDIO_OUTPUT_NAME "name"
......
......@@ -27,6 +27,7 @@
#include "tag.h"
#include "conf.h"
#include "utils.h"
#include "os_compat.h"
#define DISABLED_AUDIO_OUTPUT_PLUGIN(plugin) AudioOutputPlugin plugin;
......
......@@ -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>
......
......@@ -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
......@@ -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 {
......
......@@ -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);*/
......
......@@ -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;
......
......@@ -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__) */
......
......@@ -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
......@@ -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>
......
......@@ -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>
......
......@@ -17,12 +17,7 @@
*/
#include "buffer2array.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include "os_compat.h"
static inline
int
......
......@@ -21,10 +21,7 @@
#include "utf8.h"
#include "utils.h"
#include "path.h"
#include <stdlib.h>
#include <errno.h>
#include <string.h>
#include "os_compat.h"
#ifdef HAVE_ICONV
#include <iconv.h>
......
......@@ -31,12 +31,7 @@
#include "tag.h"
#include "utils.h"
#include "storedPlaylist.h"
#include <assert.h>
#include <stdarg.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include "os_compat.h"
#define COMMAND_PLAY "play"
#define COMMAND_PLAYID "playid"
......
......@@ -26,9 +26,7 @@
#include "log.h"
#include "ack.h"
#include "sllist.h"
#include <unistd.h>
#include <stdio.h>
#include "os_compat.h"
#define COMMAND_RETURN_KILL 10
#define COMMAND_RETURN_CLOSE 20
......
......@@ -20,11 +20,7 @@
*
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include "os_compat.h"
#include "compress.h"
#include "utils.h"
......
......@@ -23,16 +23,8 @@
#include "utils.h"
#include "buffer2array.h"
#include "list.h"
#include <sys/param.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <sys/types.h>
#include <pwd.h>
#include <errno.h>
#include "path.h"
#include "os_compat.h"
#define MAX_STRING_SIZE MPD_PATH_MAX+80
......
......@@ -19,7 +19,7 @@
#ifndef DB_UTILS_H
#define DB_UTILS_H
#include <stdio.h>
#include "os_compat.h"
#include "locate.h"
......
......@@ -28,14 +28,7 @@
#include "sig_handlers.h"
#include "ls.h"
#include "utf8.h"
#include <signal.h>
#include <sys/types.h>
#include <sys/time.h>
#include <sys/resource.h>
#include <sys/wait.h>
#include <unistd.h>
#include <string.h>
#include "os_compat.h"
static int decode_pid;
......
......@@ -26,9 +26,7 @@
#include "mpd_types.h"
#include "audio.h"
#include <stdio.h>
#include <sys/param.h>
#include <signal.h>
#include "os_compat.h"
#define DECODE_TYPE_FILE 0
#define DECODE_TYPE_URL 1
......
......@@ -37,11 +37,6 @@
#include "volume.h"
#include "ls.h"
#include <sys/wait.h>
#include <dirent.h>
#include <errno.h>
#include <assert.h>
#define DIRECTORY_DIR "directory: "
#define DIRECTORY_MTIME "mtime: "
#define DIRECTORY_BEGIN "begin: "
......
......@@ -20,9 +20,7 @@
#include "list.h"
#include "myfprintf.h"
#include <stdlib.h>
#include <string.h>
#include "os_compat.h"
static List *inputPlugin_list;
......
......@@ -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
......
......@@ -21,9 +21,7 @@
#include "inputStream_file.h"
#include "inputStream_http.h"
#include <stdio.h>
#include <sys/types.h>
#include <unistd.h>
#include "os_compat.h"
void initInputStream(void)
{
......
......@@ -19,7 +19,7 @@
#ifndef INPUT_STREAM_H
#define INPUT_STREAM_H
#include <stdlib.h>
#include "os_compat.h"
typedef struct _InputStream InputStream;
......
......@@ -19,14 +19,7 @@
#include "inputStream_file.h"
#include "log.h"
#include <stdio.h>
#include <string.h>
#include <sys/types.h>
#include <unistd.h>
#include <errno.h>
#define _XOPEN_SOURCE 600
#include <fcntl.h>
#include "os_compat.h"
void inputStream_initFile(void)
{
......
......@@ -21,20 +21,7 @@
#include "utils.h"
#include "log.h"
#include "conf.h"
#include <stdio.h>
#include <sys/time.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netdb.h>
#include <sys/param.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <unistd.h>
#include <errno.h>
#include <stdlib.h>
#include <string.h>
#include <fcntl.h>
#include "os_compat.h"
#define HTTP_CONN_STATE_CLOSED 0
#define HTTP_CONN_STATE_INIT 1
......
......@@ -27,21 +27,7 @@
#include "sllist.h"
#include "utils.h"
#include "ioops.h"
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include <sys/select.h>
#include <sys/time.h>
#include <sys/types.h>
#include <unistd.h>
#include <sys/param.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <string.h>
#include <fcntl.h>
#include <errno.h>
#include <signal.h>
#include "os_compat.h"
#define GREETING "OK MPD " PROTOCOL_VERSION "\n"
......
......@@ -20,11 +20,7 @@
#define INTERFACE_H
#include "../config.h"
#include <stdio.h>
#include <time.h>
#include <sys/types.h>
#include <sys/socket.h>
#include "os_compat.h"
void initInterfaces(void);
void openAInterface(int fd, struct sockaddr *addr);
......
......@@ -19,7 +19,7 @@
#ifndef IOOPS_H
#define IOOPS_H
#include <sys/select.h>
#include "os_compat.h"
struct ioOps {
struct ioOps *prev, *next;
......
......@@ -18,12 +18,7 @@
#include "list.h"
#include "utils.h"
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include <time.h>
#include <stdio.h>
#include "os_compat.h"
static void makeListNodesArray(List * list)
{
......
......@@ -20,8 +20,7 @@
#define LIST_H
#include "../config.h"
#include <stdlib.h>
#include "os_compat.h"
/* used to make a list where free() will be used to free data in list */
#define DEFAULT_FREE_DATA_FUNC free
......
......@@ -21,18 +21,7 @@
#include "conf.h"
#include "log.h"
#include "utils.h"
#include <stdio.h>
#include <stdlib.h>
#include <sys/socket.h>
#include <sys/stat.h>
#include <sys/param.h>
#include <netinet/in.h>
#include <netdb.h>
#include <string.h>
#include <errno.h>
#include <resolv.h>
#include <fcntl.h>
#include "os_compat.h"
#define MAXHOSTNAME 1024
......
......@@ -20,11 +20,7 @@
#define LISTEN_H
#include "../config.h"
#include <sys/time.h>
#include <sys/types.h>
#include <unistd.h>
#include <sys/select.h>
#include "os_compat.h"
extern int boundPort;
......
......@@ -21,12 +21,7 @@
#include "conf.h"
#include "myfprintf.h"
#include "utils.h"
#include <assert.h>
#include <stdlib.h>
#include <string.h>
#include <stdarg.h>
#include <time.h>
#include "os_compat.h"
#define LOG_DATE_BUF_SIZE 16
#define LOG_DATE_LEN (LOG_DATE_BUF_SIZE - 1)
......
......@@ -21,8 +21,7 @@
#include "../config.h"
#include "gcc.h"
#include <unistd.h>
#include "os_compat.h"
#define LOG_LEVEL_LOW 0
#define LOG_LEVEL_SECURE 1
......
......@@ -23,10 +23,7 @@
#include "log.h"
#include "utf8.h"
#include "utils.h"
#include <dirent.h>
#include <stdio.h>
#include <errno.h>
#include "os_compat.h"
static char *remoteUrlPrefixes[] = {
"http://",
......
......@@ -22,12 +22,7 @@
#include "../config.h"
#include "inputPlugin.h"
#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <time.h>
#include "os_compat.h"
int lsPlaylists(int fd, char *utf8path);
......
......@@ -43,20 +43,7 @@
#include "utils.h"
#include "normalize.h"
#include "zeroconf.h"
#include <stdio.h>
#include <sys/select.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <sys/stat.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include <fcntl.h>
#include <pwd.h>
#include <grp.h>
#include <time.h>
#include <unistd.h>
#include "os_compat.h"
#define SYSTEM_CONFIG_FILE_LOCATION "/etc/mpd.conf"
#define USER_CONFIG_FILE_LOCATION "/.mpdconf"
......
......@@ -18,8 +18,7 @@
#include "metadataChunk.h"
#include "gcc.h"
#include <string.h>
#include "os_compat.h"
static void initMetadataChunk(MetadataChunk * chunk)
{
......
......@@ -20,16 +20,7 @@
#define MPD_TYPES_H
#include "../config.h"
#if defined(HAVE_STDINT_H)
#include <stdint.h>
#elif defined(HAVE_INTTYPES_H)
#include <inttypes.h>
#elif defined(HAVE_SYS_INTTYPES_H)
#include <sys/inttypes.h>
#elif defined(HAVE_SYS_TYPES_H)
#include <sys/types.h>
#endif
#include "os_compat.h"
typedef unsigned char mpd_uint8;
typedef signed char mpd_sint8;
......
......@@ -22,14 +22,7 @@
#include "log.h"
#include "conf.h"
#include "utils.h"
#include <stdarg.h>
#include <sys/param.h>
#include <unistd.h>
#include <sys/select.h>
#include <fcntl.h>
#include <string.h>
#include <errno.h>
#include "os_compat.h"
#define BUFFER_LENGTH MPD_PATH_MAX+1024
......
......@@ -21,9 +21,7 @@
#include "../config.h"
#include "gcc.h"
#include <stdarg.h>
#include <stdio.h>
#include "os_compat.h"
mpd_fprintf void fdprintf(const int fd, const char *fmt, ...);
void vfdprintf(const int fd, const char *fmt, va_list arglist);
......
......@@ -19,8 +19,7 @@
#include "compress.h"
#include "conf.h"
#include "normalize.h"
#include <stdlib.h>
#include "os_compat.h"
#define DEFAULT_VOLUME_NORMALIZATION 0
......
/* the Music Player Daemon (MPD)
* Copyright (C) 2003-2007 by Warren Dukes (warren.dukes@gmail.com)
* This project's homepage is: http://www.musicpd.org
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef OS_COMPAT_H
#define OS_COMPAT_H
/*
* This includes OS-wide headers that can be expected to be available
* on any machine that mpd can be compiled on for any UNIX-like OS.
*
* This does not include headers for optional dependencies such as
* those for:
* 1) input/output plugins
* 2) optional features in core (libsamplerate, avahi, ...)
*/
#if defined(HAVE_STDINT_H)
#include <stdint.h>
#elif defined(HAVE_INTTYPES_H)
#include <inttypes.h>
#elif defined(HAVE_SYS_INTTYPES_H)
#include <sys/inttypes.h>
#endif
#include <sys/types.h>
#define _XOPEN_SOURCE 600 /* for posix_fadvise, won't hurt if not available */
#include <fcntl.h>
#include <stdio.h>
#include <sys/stat.h>
#include <unistd.h>
#include <time.h>
#include <sys/time.h>
#include <sys/wait.h>
#include <sys/socket.h>
#include <stdlib.h>
#include <signal.h>
#include <string.h>
#include <errno.h>
#include <assert.h>
#include <sys/param.h>
#include <pthread.h>
#include <sys/ioctl.h>
#include <ctype.h>
#include <stdarg.h>
#include <dirent.h>
#include <math.h>
#include <sys/select.h>
#include <netdb.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <pwd.h>
#include <grp.h>
#include <limits.h>
#include <stddef.h> /* needed? this defines NULL + offsetof() */
#include <resolv.h>
/* remove when we switch to pthreads: */
#include <sys/ipc.h>
#include <sys/shm.h>
#endif /* OS_COMPAT_H */
......@@ -24,11 +24,9 @@
#include "log.h"
#include "normalize.h"
#include "conf.h"
#include <string.h>
#include "os_compat.h"
static mpd_sint16 currentChunk = -1;
static mpd_sint8 currentMetaChunk = -1;
static mpd_sint8 sendMetaChunk;
......
......@@ -23,14 +23,7 @@
#include "utf8.h"
#include "utils.h"
#include "playlist.h"
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <errno.h>
#include <dirent.h>
#include "os_compat.h"
#ifdef HAVE_LOCALE
#ifdef HAVE_LANGINFO_CODESET
......
......@@ -20,9 +20,7 @@
#define PATH_H
#include "../config.h"
#include <sys/param.h>
#include <limits.h>
#include "os_compat.h"
#if !defined(MPD_PATH_MAX)
# if defined(MAXPATHLEN)
......
......@@ -22,10 +22,7 @@
#include "log.h"
#include "utils.h"
#include "conf.h"
#include <string.h>
#include <math.h>
#include <assert.h>
#include "os_compat.h"
void pcm_volumeChange(char *buffer, int bufferSize, AudioFormat * format,
int volume)
......
......@@ -22,8 +22,7 @@
#include "../config.h"
#include "audio.h"
#include <stdlib.h>
#include "os_compat.h"
#ifdef HAVE_LIBSAMPLERATE
#include <samplerate.h>
......
......@@ -22,8 +22,7 @@
#include "list.h"
#include "log.h"
#include "utils.h"
#include <string.h>
#include "os_compat.h"
#define PERMISSION_PASSWORD_CHAR "@"
#define PERMISSION_SEPERATOR ","
......
......@@ -31,18 +31,7 @@
#include "playerData.h"
#include "permission.h"
#include "sig_handlers.h"
#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <sys/time.h>
#include <sys/wait.h>
#include <stdlib.h>
#include <signal.h>
#include <string.h>
#include <errno.h>
#include <fcntl.h>
#include "os_compat.h"
static void playerCloseAudio(void);
......
......@@ -25,9 +25,7 @@
#include "mpd_types.h"
#include "song.h"
#include "metadataChunk.h"
#include <stdio.h>
#include <sys/param.h>
#include "os_compat.h"
#define PLAYER_STATE_STOP 0
#define PLAYER_STATE_PAUSE 1
......
......@@ -19,14 +19,7 @@
#include "playerData.h"
#include "conf.h"
#include "log.h"
#include <sys/types.h>
#include <sys/wait.h>
#include <sys/ipc.h>
#include <sys/shm.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "os_compat.h"
int buffered_before_play;
int buffered_chunks;
......
......@@ -29,14 +29,7 @@
#include "sig_handlers.h"
#include "state_file.h"
#include "storedPlaylist.h"
#include <string.h>
#include <stdlib.h>
#include <sys/stat.h>
#include <sys/param.h>
#include <errno.h>
#include <unistd.h>
#include <time.h>
#include "os_compat.h"
#define PLAYLIST_STATE_STOP 0
#define PLAYLIST_STATE_PLAY 1
......
......@@ -22,10 +22,7 @@
#include "../config.h"
#include "dbUtils.h"
#include <stdio.h>
#include <sys/param.h>
#include <time.h>
#include "os_compat.h"
#define PLAYLIST_FILE_SUFFIX "m3u"
#define PLAYLIST_COMMENT '#'
......
......@@ -22,10 +22,7 @@
#include "log.h"
#include "conf.h"
#include <string.h>
#include <math.h>
#include <stdlib.h>
#include "os_compat.h"
/* Added 4/14/2004 by AliasMrJones */
int replayGainState = REPLAYGAIN_OFF;
......
......@@ -27,14 +27,7 @@
#include "log.h"
#include "player.h"
#include "decode.h"
#include <signal.h>
#include <sys/types.h>
#include <sys/time.h>
#include <sys/resource.h>
#include <sys/wait.h>
#include <errno.h>
#include <unistd.h>
#include "os_compat.h"
int handlePendingSignals(void)
{
......
......@@ -18,9 +18,7 @@
*/
#include "signal_check.h"
#include <errno.h>
#include <stddef.h>
#include "os_compat.h"
static volatile sig_atomic_t __caught_signals[NSIG];
......
......@@ -20,7 +20,7 @@
#ifndef SIGNAL_CHECK_H
#define SIGNAL_CHECK_H
#include <signal.h>
#include "os_compat.h"
void signal_handle(int sig);
void signal_unhandle(int sig);
......
......@@ -18,7 +18,7 @@
/* a very simple singly-linked-list structure for queues/buffers */
#include <string.h>
#include "os_compat.h"
#include "sllist.h"
#include "utils.h"
......
......@@ -21,8 +21,6 @@
#ifndef SLLIST_H
#define SLLIST_H
#include <stddef.h>
/* just free the entire structure if it's free-able, the 'data' member
* should _NEVER_ be explicitly freed
*
......
......@@ -30,9 +30,7 @@
#define SONG_KEY "key: "
#define SONG_MTIME "mtime: "
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include "os_compat.h"
Song *newNullSong(void)
{
......
......@@ -20,10 +20,7 @@
#define SONG_H
#include "../config.h"
#include <sys/param.h>
#include <time.h>
#include "os_compat.h"
#include "tag.h"
#include "list.h"
......
......@@ -25,12 +25,7 @@
#include "playlist.h"
#include "utils.h"
#include "volume.h"
#include <errno.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
#include "os_compat.h"
static struct _sf_cb {
void (*reader)(FILE *);
......
......@@ -21,8 +21,6 @@
#include "gcc.h"
#include <stdio.h>
void write_state_file(void);
void read_state_file(void);
void mpd_noreturn state_file_fatal(void);
......
......@@ -23,8 +23,7 @@
#include "player.h"
#include "tag.h"
#include "tagTracker.h"
#include <time.h>
#include "os_compat.h"
Stats stats;
......
......@@ -21,8 +21,6 @@
#include "../config.h"
#include <stdio.h>
typedef struct _Stats {
unsigned long daemonStart;
int numberOfSongs;
......
......@@ -25,9 +25,7 @@
#include "command.h"
#include "ls.h"
#include "directory.h"
#include <string.h>
#include <errno.h>
#include "os_compat.h"
static ListNode *nodeOfStoredPlaylist(List *list, int index)
{
......
......@@ -29,13 +29,7 @@
#include "mpd_types.h"
#include "gcc.h"
#include "song.h"
#include <sys/stat.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <assert.h>
#include <errno.h>
#include "os_compat.h"
#ifdef HAVE_ID3TAG
# define isId3v1(tag) (id3_tag_options(tag, 0, 0) & ID3_TAG_OPTION_ID3V1)
......
......@@ -23,9 +23,6 @@
#include "mpd_types.h"
#include <string.h>
#include <stdio.h>
#ifdef HAVE_ID3TAG
#include <id3tag.h>
#endif
......
......@@ -22,9 +22,7 @@
#include "log.h"
#include "utils.h"
#include "myfprintf.h"
#include <assert.h>
#include <stdlib.h>
#include "os_compat.h"
static Tree *tagTrees[TAG_NUM_OF_ITEM_TYPES];
......
......@@ -18,10 +18,7 @@
#include "timer.h"
#include "utils.h"
#include <assert.h>
#include <limits.h>
#include <sys/time.h>
#include "os_compat.h"
static uint64_t now(void)
{
......
......@@ -18,10 +18,7 @@
#include "tree.h"
#include "utils.h"
#include <assert.h>
#include <stdlib.h>
#include <string.h>
#include "os_compat.h"
#ifndef CHILDREN_PER_NODE
#define CHILDREN_PER_NODE 25
......
......@@ -18,10 +18,7 @@
#include "utf8.h"
#include "utils.h"
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include "os_compat.h"
char *latin1_to_utf8(char *dest, char *in_latin1)
{
......
......@@ -19,19 +19,7 @@
#include "utils.h"
#include "log.h"
#include "conf.h"
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/select.h>
#include <sys/time.h>
#include <unistd.h>
#include <assert.h>
#include <pwd.h>
#include <signal.h>
#include <sys/param.h>
#include "os_compat.h"
char *myFgets(char *buffer, int bufferSize, FILE * fp)
{
......
......@@ -21,14 +21,7 @@
#include "../config.h"
#include "gcc.h"
#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
#include <errno.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include "os_compat.h"
#define ARRAY_SIZE(x) (sizeof(x)/sizeof(x[0]))
......
......@@ -24,14 +24,8 @@
#include "state_file.h"
#include "gcc.h"
#include "utils.h"
#include "os_compat.h"
#include <math.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <sys/ioctl.h>
#include <fcntl.h>
#include <errno.h>
#ifdef HAVE_OSS
#include <sys/soundcard.h>
#endif
......
......@@ -20,8 +20,7 @@
#define VOLUME_H
#include "../config.h"
#include <stdio.h>
#include "os_compat.h"
#define VOLUME_MIXER_OSS "oss"
#define VOLUME_MIXER_ALSA "alsa"
......
......@@ -16,11 +16,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include <stdlib.h>
#include <assert.h>
#include <string.h>
#include <arpa/inet.h>
#include "os_compat.h"
#include "zeroconf.h"
#include "conf.h"
#include "log.h"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment