diff options
author | Max Kellermann <max@duempel.org> | 2008-09-29 15:53:53 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2008-09-29 15:53:53 +0200 |
commit | a7651b9d307efe2473bd68510aa9a6225e7a0b64 (patch) | |
tree | 55b9fc39383e9d8e84f985c2b72ae07960a1bbba | |
parent | 35d519625d1748e00f05fa66252c938c1cd2c5d8 (diff) | |
download | mpd-a7651b9d307efe2473bd68510aa9a6225e7a0b64.tar.gz mpd-a7651b9d307efe2473bd68510aa9a6225e7a0b64.tar.xz mpd-a7651b9d307efe2473bd68510aa9a6225e7a0b64.zip |
assume stdint.h and stddef.h are available
Since we use a C99 compiler now, we can assert that the C99 standard
headers are available, no need for complicated compile time checks.
Kill mpd_types.h.
-rw-r--r-- | src/Makefile.am | 1 | ||||
-rw-r--r-- | src/audio_format.h | 2 | ||||
-rw-r--r-- | src/charConv.c | 1 | ||||
-rw-r--r-- | src/mpd_types.h | 68 | ||||
-rw-r--r-- | src/os_compat.h | 4 | ||||
-rw-r--r-- | src/pcm_utils.c | 2 | ||||
-rw-r--r-- | src/pcm_utils.h | 4 | ||||
-rw-r--r-- | src/player_control.h | 1 | ||||
-rw-r--r-- | src/replayGain.c | 1 | ||||
-rw-r--r-- | src/song.h | 1 | ||||
-rw-r--r-- | src/tag.h | 1 |
11 files changed, 4 insertions, 82 deletions
diff --git a/src/Makefile.am b/src/Makefile.am index d0ef815d2..0e5256a3e 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -69,7 +69,6 @@ mpd_headers = \ log.h \ ls.h \ main_notify.h \ - mpd_types.h \ normalize.h \ compress.h \ os_compat.h \ diff --git a/src/audio_format.h b/src/audio_format.h index 3bbca3734..1c9caee7d 100644 --- a/src/audio_format.h +++ b/src/audio_format.h @@ -19,7 +19,7 @@ #ifndef AUDIO_FORMAT_H #define AUDIO_FORMAT_H -#include "mpd_types.h" +#include <stdint.h> struct audio_format { uint32_t sampleRate; diff --git a/src/charConv.c b/src/charConv.c index 7d25fbffc..ba1ea50dd 100644 --- a/src/charConv.c +++ b/src/charConv.c @@ -17,7 +17,6 @@ */ #include "charConv.h" -#include "mpd_types.h" #include "utf8.h" #include "utils.h" #include "path.h" diff --git a/src/mpd_types.h b/src/mpd_types.h deleted file mode 100644 index bc8c35119..000000000 --- a/src/mpd_types.h +++ /dev/null @@ -1,68 +0,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 MPD_TYPES_H -#define MPD_TYPES_H - -#include "../config.h" - -#if defined(HAVE_INTTYPES_H) - /* - * inttypes.h pulls in stdint.h on C99 systems, needed for older systems - * that didn't provide stdint.h but still defined equivalent types. - */ -# include <inttypes.h> -#elif defined(HAVE_STDINT_H) -# include <stdint.h> -#elif defined(HAVE_SYS_INTTYPES_H) -# include <sys/inttypes.h> /* some ancient systems had this, untested */ -#endif /* C99-ish type headers */ - -#include <sys/types.h> - -#if (!defined(HAVE_STDINT_H) && !defined(HAVE_INTTYPES_H)) - -/* - * this only includes a partial subset of what is expected in a C99 - * stdint.h or inttypes.h; but includes enough of what is needed for mpd - * to function on older platforms - * (especially Linux ones still using gcc 2.95) - */ - -typedef unsigned char uint8_t; -typedef signed char int8_t; - -#if SIZEOF_SHORT == 2 -typedef unsigned short uint16_t; -typedef signed short int16_t; -#elif SIZEOF_INT == 2 -typedef unsigned int uint16_t; -typedef signed int int16_t; -#endif /* (u)int_16_t */ - -#if SIZEOF_INT == 4 -typedef unsigned int uint32_t; -typedef signed int int32_t; -#elif SIZEOF_LONG == 4 -typedef unsigned long uint32_t; -typedef signed long int32_t; -#endif /* (u)int_32 */ - -#endif /* !HAVE_STDINT_H && !HAVE_INTTYPES_H */ - -#endif diff --git a/src/os_compat.h b/src/os_compat.h index c3aede51c..772ba4957 100644 --- a/src/os_compat.h +++ b/src/os_compat.h @@ -31,11 +31,9 @@ * 2) optional features in core (libsamplerate, avahi, ...) */ -#include "mpd_types.h" - -#define _XOPEN_SOURCE 600 /* for posix_fadvise, won't hurt if not available */ #include <fcntl.h> +#include <stdint.h> #include <stdio.h> #include <sys/uio.h> #include <sys/stat.h> diff --git a/src/pcm_utils.c b/src/pcm_utils.c index 705f14990..ee0c94d45 100644 --- a/src/pcm_utils.c +++ b/src/pcm_utils.c @@ -17,8 +17,6 @@ */ #include "pcm_utils.h" - -#include "mpd_types.h" #include "log.h" #include "utils.h" #include "conf.h" diff --git a/src/pcm_utils.h b/src/pcm_utils.h index 98589ce42..d3dfcaf2d 100644 --- a/src/pcm_utils.h +++ b/src/pcm_utils.h @@ -21,8 +21,8 @@ #include "../config.h" -#include "mpd_types.h" -#include "os_compat.h" +#include <stdint.h> +#include <stddef.h> #ifdef HAVE_LIBSAMPLERATE #include <samplerate.h> diff --git a/src/player_control.h b/src/player_control.h index ccc98d9d3..375b2f3c1 100644 --- a/src/player_control.h +++ b/src/player_control.h @@ -20,7 +20,6 @@ #define PLAYER_H #include "notify.h" -#include "mpd_types.h" #include "song.h" #include "os_compat.h" diff --git a/src/replayGain.c b/src/replayGain.c index 80a102c0a..af3d33553 100644 --- a/src/replayGain.c +++ b/src/replayGain.c @@ -23,7 +23,6 @@ #include "log.h" #include "conf.h" #include "audio_format.h" -#include "mpd_types.h" #include "os_compat.h" /* Added 4/14/2004 by AliasMrJones */ diff --git a/src/song.h b/src/song.h index 5b1be84c0..0b55a0f3f 100644 --- a/src/song.h +++ b/src/song.h @@ -20,7 +20,6 @@ #define SONG_H #include "os_compat.h" -#include "mpd_types.h" #define SONG_BEGIN "songList begin" #define SONG_END "songList end" @@ -19,7 +19,6 @@ #ifndef TAG_H #define TAG_H -#include "mpd_types.h" #include "os_compat.h" #include "gcc.h" |