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 /src/mpd_types.h | |
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.
Diffstat (limited to '')
-rw-r--r-- | src/mpd_types.h | 68 |
1 files changed, 0 insertions, 68 deletions
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 |