From be2951b45fe071ae7e4957414c7b23e72fbac07a Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 15 Oct 2013 09:21:13 +0200 Subject: gcc.h: rename to Compiler.h --- src/AudioFormat.hxx | 2 +- src/AudioParser.cxx | 2 +- src/Client.hxx | 2 +- src/ClientMessage.cxx | 2 +- src/ClientMessage.hxx | 2 +- src/ClientSubscribe.hxx | 2 +- src/Compiler.h | 174 ++++++++++++++++++++++++++++++++++++++ src/ConfigData.hxx | 2 +- src/ConfigGlobal.hxx | 2 +- src/ConfigOption.hxx | 2 +- src/DatabaseGlue.hxx | 2 +- src/DatabaseHelpers.hxx | 2 +- src/DatabaseLock.cxx | 2 +- src/DatabaseLock.hxx | 2 +- src/DatabasePlaylist.hxx | 2 +- src/DatabasePlugin.hxx | 2 +- src/DatabasePrint.hxx | 2 +- src/DatabaseRegistry.hxx | 2 +- src/DatabaseSelection.hxx | 2 +- src/DatabaseSimple.hxx | 2 +- src/Directory.hxx | 2 +- src/ExcludeList.hxx | 2 +- src/GlobalEvents.cxx | 2 +- src/IOThread.hxx | 2 +- src/IdTable.hxx | 2 +- src/InotifyQueue.hxx | 2 +- src/InotifySource.hxx | 2 +- src/InputStream.hxx | 2 +- src/Log.hxx | 2 +- src/Mapper.hxx | 2 +- src/MusicPipe.hxx | 2 +- src/OutputAll.hxx | 2 +- src/OutputPlugin.hxx | 2 +- src/OutputThread.cxx | 2 +- src/PlaylistInfo.hxx | 2 +- src/PlaylistVector.hxx | 2 +- src/Queue.hxx | 2 +- src/Song.hxx | 2 +- src/SongFilter.hxx | 2 +- src/StateFile.hxx | 2 +- src/TextFile.hxx | 2 +- src/UpdateArchive.hxx | 2 +- src/Win32Main.cxx | 2 +- src/ZeroconfBonjour.cxx | 2 +- src/ZeroconfGlue.cxx | 2 +- src/cue/CueParser.hxx | 2 +- src/db/ProxyDatabasePlugin.cxx | 2 +- src/db/SimpleDatabasePlugin.hxx | 2 +- src/decoder/FlacIOHandle.cxx | 2 +- src/decoder/FlacIOHandle.hxx | 2 +- src/decoder/FlacInput.cxx | 2 +- src/decoder/FlacMetadata.hxx | 2 +- src/encoder/NullEncoderPlugin.cxx | 2 +- src/event/BufferedSocket.hxx | 2 +- src/event/Call.cxx | 2 +- src/event/DeferredMonitor.hxx | 2 +- src/event/FullyBufferedSocket.hxx | 2 +- src/event/Loop.hxx | 2 +- src/event/MultiSocketMonitor.cxx | 2 +- src/event/MultiSocketMonitor.hxx | 2 +- src/event/SocketMonitor.cxx | 2 +- src/filter/NullFilterPlugin.cxx | 2 +- src/fs/Path.cxx | 2 +- src/fs/Path.hxx | 2 +- src/gcc.h | 174 -------------------------------------- src/output/HttpdClient.hxx | 2 +- src/output/WinmmOutputPlugin.hxx | 2 +- src/pcm/PcmBuffer.hxx | 2 +- src/pcm/PcmMix.hxx | 2 +- src/pcm/PcmUtils.hxx | 2 +- src/protocol/Result.hxx | 2 +- src/system/EventFD.cxx | 2 +- src/system/EventPipe.cxx | 2 +- src/system/FatalError.hxx | 2 +- src/system/Resolver.hxx | 2 +- src/system/SocketError.hxx | 2 +- src/system/clock.h | 2 +- src/tag/Tag.hxx | 2 +- src/tag/TagBuilder.hxx | 2 +- src/tag/TagId3.hxx | 2 +- src/tag/TagItem.hxx | 2 +- src/tag/TagString.hxx | 2 +- src/tag/TagTable.hxx | 2 +- src/thread/Id.hxx | 2 +- src/util/Error.hxx | 2 +- src/util/HugeAllocator.hxx | 2 +- src/util/Manual.hxx | 2 +- src/util/PeakBuffer.hxx | 2 +- src/util/ReusableArray.hxx | 2 +- src/util/SliceBuffer.hxx | 2 +- src/util/StringUtil.hxx | 2 +- src/util/UriUtil.hxx | 2 +- src/util/bit_reverse.h | 2 +- 93 files changed, 265 insertions(+), 265 deletions(-) create mode 100644 src/Compiler.h delete mode 100644 src/gcc.h (limited to 'src') diff --git a/src/AudioFormat.hxx b/src/AudioFormat.hxx index eb3f9b062..5b0686031 100644 --- a/src/AudioFormat.hxx +++ b/src/AudioFormat.hxx @@ -20,7 +20,7 @@ #ifndef MPD_AUDIO_FORMAT_HXX #define MPD_AUDIO_FORMAT_HXX -#include "gcc.h" +#include "Compiler.h" #include #include diff --git a/src/AudioParser.cxx b/src/AudioParser.cxx index db6d1d8e8..b5646130f 100644 --- a/src/AudioParser.cxx +++ b/src/AudioParser.cxx @@ -27,7 +27,7 @@ #include "AudioFormat.hxx" #include "CheckAudioFormat.hxx" #include "util/Error.hxx" -#include "gcc.h" +#include "Compiler.h" #include #include diff --git a/src/Client.hxx b/src/Client.hxx index 36767e9fc..a2e17e533 100644 --- a/src/Client.hxx +++ b/src/Client.hxx @@ -20,7 +20,7 @@ #ifndef MPD_CLIENT_H #define MPD_CLIENT_H -#include "gcc.h" +#include "Compiler.h" #include #include diff --git a/src/ClientMessage.cxx b/src/ClientMessage.cxx index 5a4ee6f01..f98dc70ce 100644 --- a/src/ClientMessage.cxx +++ b/src/ClientMessage.cxx @@ -18,7 +18,7 @@ */ #include "ClientMessage.hxx" -#include "gcc.h" +#include "Compiler.h" #include diff --git a/src/ClientMessage.hxx b/src/ClientMessage.hxx index 2a929d445..2d32b8cdd 100644 --- a/src/ClientMessage.hxx +++ b/src/ClientMessage.hxx @@ -20,7 +20,7 @@ #ifndef MPD_CLIENT_MESSAGE_H #define MPD_CLIENT_MESSAGE_H -#include "gcc.h" +#include "Compiler.h" #include diff --git a/src/ClientSubscribe.hxx b/src/ClientSubscribe.hxx index 83c234db6..83319b465 100644 --- a/src/ClientSubscribe.hxx +++ b/src/ClientSubscribe.hxx @@ -20,7 +20,7 @@ #ifndef MPD_CLIENT_SUBSCRIBE_HXX #define MPD_CLIENT_SUBSCRIBE_HXX -#include "gcc.h" +#include "Compiler.h" class Client; class ClientMessage; diff --git a/src/Compiler.h b/src/Compiler.h new file mode 100644 index 000000000..94abdcff3 --- /dev/null +++ b/src/Compiler.h @@ -0,0 +1,174 @@ +/* + * Copyright (C) 2003-2013 The Music Player Daemon Project + * 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., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + +#ifndef COMPILER_H +#define COMPILER_H + +#define GCC_CHECK_VERSION(major, minor) \ + (defined(__GNUC__) && \ + (__GNUC__ > (major) || (__GNUC__ == (major) && __GNUC_MINOR__ >= (minor)))) + +#ifdef __GNUC__ +#define GCC_VERSION (__GNUC__ * 10000 \ + + __GNUC_MINOR__ * 100 \ + + __GNUC_PATCHLEVEL__) +#else +#define GCC_VERSION 0 +#endif + +#ifdef __clang__ +# define CLANG_VERSION (__clang_major__ * 10000 \ + + __clang_minor__ * 100 \ + + __clang_patchlevel__) +# if __clang_major__ < 3 +# error Sorry, your clang version is too old. You need at least version 3.1. +# endif +#elif defined(__GNUC__) +# if !GCC_CHECK_VERSION(4,6) +# error Sorry, your gcc version is too old. You need at least version 4.6. +# endif +#else +# warning Untested compiler. Use at your own risk! +#endif + +#if GCC_CHECK_VERSION(4,0) + +/* GCC 4.x */ + +#define gcc_const __attribute__((const)) +#define gcc_deprecated __attribute__((deprecated)) +#define gcc_may_alias __attribute__((may_alias)) +#define gcc_malloc __attribute__((malloc)) +#define gcc_noreturn __attribute__((noreturn)) +#define gcc_packed __attribute__((packed)) +#define gcc_printf(a,b) __attribute__((format(printf, a, b))) +#define gcc_pure __attribute__((pure)) +#define gcc_sentinel __attribute__((sentinel)) +#define gcc_unused __attribute__((unused)) +#define gcc_warn_unused_result __attribute__((warn_unused_result)) + +#define gcc_nonnull(...) __attribute__((nonnull(__VA_ARGS__))) +#define gcc_nonnull_all __attribute__((nonnull)) + +#define gcc_likely(x) __builtin_expect (!!(x), 1) +#define gcc_unlikely(x) __builtin_expect (!!(x), 0) + +#define gcc_aligned(n) __attribute__((aligned(n))) + +#define gcc_visibility_hidden __attribute__((visibility("hidden"))) +#define gcc_visibility_default __attribute__((visibility("default"))) + +#define gcc_always_inline __attribute__((always_inline)) + +#else + +/* generic C compiler */ + +#define gcc_const +#define gcc_deprecated +#define gcc_may_alias +#define gcc_malloc +#define gcc_noreturn +#define gcc_packed +#define gcc_printf(a,b) +#define gcc_pure +#define gcc_sentinel +#define gcc_unused +#define gcc_warn_unused_result + +#define gcc_nonnull(...) +#define gcc_nonnull_all + +#define gcc_likely(x) (x) +#define gcc_unlikely(x) (x) + +#define gcc_aligned(n) + +#define gcc_visibility_hidden +#define gcc_visibility_default + +#define gcc_always_inline inline + +#endif + +#if GCC_CHECK_VERSION(4,3) + +#define gcc_hot __attribute__((hot)) +#define gcc_cold __attribute__((cold)) + +#else /* ! GCC_UNUSED >= 40300 */ + +#define gcc_hot +#define gcc_cold + +#endif /* ! GCC_UNUSED >= 40300 */ + +#if GCC_CHECK_VERSION(4,6) && !defined(__clang__) +#define gcc_flatten __attribute__((flatten)) +#else +#define gcc_flatten +#endif + +#ifndef __cplusplus +/* plain C99 has "restrict" */ +#define gcc_restrict restrict +#elif GCC_CHECK_VERSION(4,0) +/* "__restrict__" is a GCC extension for C++ */ +#define gcc_restrict __restrict__ +#else +/* disable it on other compilers */ +#define gcc_restrict +#endif + +/* C++11 features */ + +#if defined(__cplusplus) + +/* support for C++11 "override" was added in gcc 4.7 */ +#if !defined(__clang__) && !GCC_CHECK_VERSION(4,7) +#define override +#define final +#endif + +#if defined(__clang__) || GCC_CHECK_VERSION(4,8) +#define gcc_alignas(T, fallback) alignas(T) +#else +#define gcc_alignas(T, fallback) gcc_aligned(fallback) +#endif + +#endif + +#ifndef __has_feature + // define dummy macro for non-clang compilers + #define __has_feature(x) 0 +#endif + +#if __has_feature(attribute_unused_on_fields) +#define gcc_unused_field gcc_unused +#else +#define gcc_unused_field +#endif + +#if defined(__GNUC__) || defined(__clang__) +#define gcc_unreachable() __builtin_unreachable() +#else +#define gcc_unreachable() +#endif + +#endif diff --git a/src/ConfigData.hxx b/src/ConfigData.hxx index 19613c610..85806fb05 100644 --- a/src/ConfigData.hxx +++ b/src/ConfigData.hxx @@ -21,7 +21,7 @@ #define MPD_CONFIG_DATA_HXX #include "ConfigOption.hxx" -#include "gcc.h" +#include "Compiler.h" #include #include diff --git a/src/ConfigGlobal.hxx b/src/ConfigGlobal.hxx index 76b237153..2beb2cb5b 100644 --- a/src/ConfigGlobal.hxx +++ b/src/ConfigGlobal.hxx @@ -21,7 +21,7 @@ #define MPD_CONFIG_GLOBAL_HXX #include "ConfigOption.hxx" -#include "gcc.h" +#include "Compiler.h" class Error; class Path; diff --git a/src/ConfigOption.hxx b/src/ConfigOption.hxx index 21a3a02e4..e8a2a86c8 100644 --- a/src/ConfigOption.hxx +++ b/src/ConfigOption.hxx @@ -20,7 +20,7 @@ #ifndef MPD_CONFIG_OPTION_HXX #define MPD_CONFIG_OPTION_HXX -#include "gcc.h" +#include "Compiler.h" enum ConfigOption { CONF_MUSIC_DIR, diff --git a/src/DatabaseGlue.hxx b/src/DatabaseGlue.hxx index 5e23a8c35..202881382 100644 --- a/src/DatabaseGlue.hxx +++ b/src/DatabaseGlue.hxx @@ -20,7 +20,7 @@ #ifndef MPD_DATABASE_GLUE_HXX #define MPD_DATABASE_GLUE_HXX -#include "gcc.h" +#include "Compiler.h" struct config_param; class Database; diff --git a/src/DatabaseHelpers.hxx b/src/DatabaseHelpers.hxx index e666278f2..70e3e54fb 100644 --- a/src/DatabaseHelpers.hxx +++ b/src/DatabaseHelpers.hxx @@ -22,7 +22,7 @@ #include "DatabaseVisitor.hxx" #include "tag/TagType.h" -#include "gcc.h" +#include "Compiler.h" class Error; class Database; diff --git a/src/DatabaseLock.cxx b/src/DatabaseLock.cxx index de67012e7..d85f72d3b 100644 --- a/src/DatabaseLock.cxx +++ b/src/DatabaseLock.cxx @@ -19,7 +19,7 @@ #include "config.h" #include "DatabaseLock.hxx" -#include "gcc.h" +#include "Compiler.h" Mutex db_mutex; diff --git a/src/DatabaseLock.hxx b/src/DatabaseLock.hxx index 005835549..1bd5cbe61 100644 --- a/src/DatabaseLock.hxx +++ b/src/DatabaseLock.hxx @@ -28,7 +28,7 @@ #include "check.h" #include "thread/Mutex.hxx" -#include "gcc.h" +#include "Compiler.h" #include diff --git a/src/DatabasePlaylist.hxx b/src/DatabasePlaylist.hxx index d91fe13be..98bc57b79 100644 --- a/src/DatabasePlaylist.hxx +++ b/src/DatabasePlaylist.hxx @@ -20,7 +20,7 @@ #ifndef MPD_DATABASE_PLAYLIST_HXX #define MPD_DATABASE_PLAYLIST_HXX -#include "gcc.h" +#include "Compiler.h" class SongFilter; class Error; diff --git a/src/DatabasePlugin.hxx b/src/DatabasePlugin.hxx index 9bcbf49fd..0477d5d88 100644 --- a/src/DatabasePlugin.hxx +++ b/src/DatabasePlugin.hxx @@ -28,7 +28,7 @@ #include "DatabaseVisitor.hxx" #include "tag/TagType.h" -#include "gcc.h" +#include "Compiler.h" struct config_param; struct DatabaseSelection; diff --git a/src/DatabasePrint.hxx b/src/DatabasePrint.hxx index 042d0458e..cebed15a8 100644 --- a/src/DatabasePrint.hxx +++ b/src/DatabasePrint.hxx @@ -20,7 +20,7 @@ #ifndef MPD_DB_PRINT_H #define MPD_DB_PRINT_H -#include "gcc.h" +#include "Compiler.h" class SongFilter; struct DatabaseSelection; diff --git a/src/DatabaseRegistry.hxx b/src/DatabaseRegistry.hxx index 4be581573..f93ddce89 100644 --- a/src/DatabaseRegistry.hxx +++ b/src/DatabaseRegistry.hxx @@ -20,7 +20,7 @@ #ifndef MPD_DATABASE_REGISTRY_HXX #define MPD_DATABASE_REGISTRY_HXX -#include "gcc.h" +#include "Compiler.h" struct DatabasePlugin; diff --git a/src/DatabaseSelection.hxx b/src/DatabaseSelection.hxx index 8ca04a3fc..7fab2d303 100644 --- a/src/DatabaseSelection.hxx +++ b/src/DatabaseSelection.hxx @@ -20,7 +20,7 @@ #ifndef MPD_DATABASE_SELECTION_HXX #define MPD_DATABASE_SELECTION_HXX -#include "gcc.h" +#include "Compiler.h" #include #include diff --git a/src/DatabaseSimple.hxx b/src/DatabaseSimple.hxx index f0223bce2..124d78a30 100644 --- a/src/DatabaseSimple.hxx +++ b/src/DatabaseSimple.hxx @@ -20,7 +20,7 @@ #ifndef MPD_DATABASE_SIMPLE_HXX #define MPD_DATABASE_SIMPLE_HXX -#include "gcc.h" +#include "Compiler.h" #include diff --git a/src/Directory.hxx b/src/Directory.hxx index 928f04163..d7eec3c97 100644 --- a/src/Directory.hxx +++ b/src/Directory.hxx @@ -22,7 +22,7 @@ #include "check.h" #include "util/list.h" -#include "gcc.h" +#include "Compiler.h" #include "DatabaseVisitor.hxx" #include "PlaylistVector.hxx" diff --git a/src/ExcludeList.hxx b/src/ExcludeList.hxx index 7111465a3..03513ef8b 100644 --- a/src/ExcludeList.hxx +++ b/src/ExcludeList.hxx @@ -25,7 +25,7 @@ #ifndef MPD_EXCLUDE_H #define MPD_EXCLUDE_H -#include "gcc.h" +#include "Compiler.h" #include diff --git a/src/GlobalEvents.cxx b/src/GlobalEvents.cxx index 2f8569750..9e0509d40 100644 --- a/src/GlobalEvents.cxx +++ b/src/GlobalEvents.cxx @@ -21,7 +21,7 @@ #include "GlobalEvents.hxx" #include "util/Manual.hxx" #include "event/DeferredMonitor.hxx" -#include "gcc.h" +#include "Compiler.h" #include diff --git a/src/IOThread.hxx b/src/IOThread.hxx index cfa34a494..3384a09e0 100644 --- a/src/IOThread.hxx +++ b/src/IOThread.hxx @@ -20,7 +20,7 @@ #ifndef MPD_IO_THREAD_HXX #define MPD_IO_THREAD_HXX -#include "gcc.h" +#include "Compiler.h" class EventLoop; diff --git a/src/IdTable.hxx b/src/IdTable.hxx index fa93f1f38..ab021e48f 100644 --- a/src/IdTable.hxx +++ b/src/IdTable.hxx @@ -20,7 +20,7 @@ #ifndef MPD_ID_TABLE_HXX #define MPD_ID_TABLE_HXX -#include "gcc.h" +#include "Compiler.h" #include diff --git a/src/InotifyQueue.hxx b/src/InotifyQueue.hxx index 818621ef8..ce79748a0 100644 --- a/src/InotifyQueue.hxx +++ b/src/InotifyQueue.hxx @@ -21,7 +21,7 @@ #define MPD_INOTIFY_QUEUE_HXX #include "event/TimeoutMonitor.hxx" -#include "gcc.h" +#include "Compiler.h" #include #include diff --git a/src/InotifySource.hxx b/src/InotifySource.hxx index 2f686d3b1..1fe840c12 100644 --- a/src/InotifySource.hxx +++ b/src/InotifySource.hxx @@ -21,7 +21,7 @@ #define MPD_INOTIFY_SOURCE_HXX #include "event/SocketMonitor.hxx" -#include "gcc.h" +#include "Compiler.h" class Error; diff --git a/src/InputStream.hxx b/src/InputStream.hxx index eac7b0806..2addd1a09 100644 --- a/src/InputStream.hxx +++ b/src/InputStream.hxx @@ -23,7 +23,7 @@ #include "check.h" #include "thread/Mutex.hxx" #include "thread/Cond.hxx" -#include "gcc.h" +#include "Compiler.h" #include diff --git a/src/Log.hxx b/src/Log.hxx index f7803ceb6..f04406dc3 100644 --- a/src/Log.hxx +++ b/src/Log.hxx @@ -20,7 +20,7 @@ #ifndef MPD_LOG_HXX #define MPD_LOG_HXX -#include "gcc.h" +#include "Compiler.h" #ifdef WIN32 #include diff --git a/src/Mapper.hxx b/src/Mapper.hxx index 76c1a6dac..0688d5dd3 100644 --- a/src/Mapper.hxx +++ b/src/Mapper.hxx @@ -26,7 +26,7 @@ #include -#include "gcc.h" +#include "Compiler.h" #define PLAYLIST_FILE_SUFFIX ".m3u" diff --git a/src/MusicPipe.hxx b/src/MusicPipe.hxx index 2133bc086..33ab822ad 100644 --- a/src/MusicPipe.hxx +++ b/src/MusicPipe.hxx @@ -21,7 +21,7 @@ #define MPD_PIPE_H #include "thread/Mutex.hxx" -#include "gcc.h" +#include "Compiler.h" #ifndef NDEBUG #include "AudioFormat.hxx" diff --git a/src/OutputAll.hxx b/src/OutputAll.hxx index 7053c0580..5b555e5a1 100644 --- a/src/OutputAll.hxx +++ b/src/OutputAll.hxx @@ -27,7 +27,7 @@ #define OUTPUT_ALL_H #include "ReplayGainInfo.hxx" -#include "gcc.h" +#include "Compiler.h" struct AudioFormat; class MusicBuffer; diff --git a/src/OutputPlugin.hxx b/src/OutputPlugin.hxx index 20fd74453..4a2fb52bb 100644 --- a/src/OutputPlugin.hxx +++ b/src/OutputPlugin.hxx @@ -20,7 +20,7 @@ #ifndef MPD_OUTPUT_PLUGIN_HXX #define MPD_OUTPUT_PLUGIN_HXX -#include "gcc.h" +#include "Compiler.h" #include diff --git a/src/OutputThread.cxx b/src/OutputThread.cxx index b1c670afc..a3a842df4 100644 --- a/src/OutputThread.cxx +++ b/src/OutputThread.cxx @@ -33,7 +33,7 @@ #include "system/FatalError.hxx" #include "util/Error.hxx" #include "Log.hxx" -#include "gcc.h" +#include "Compiler.h" #include diff --git a/src/PlaylistInfo.hxx b/src/PlaylistInfo.hxx index 96e4f6db9..2c5b9ae1a 100644 --- a/src/PlaylistInfo.hxx +++ b/src/PlaylistInfo.hxx @@ -21,7 +21,7 @@ #define MPD_PLAYLIST_INFO_HXX #include "check.h" -#include "gcc.h" +#include "Compiler.h" #include diff --git a/src/PlaylistVector.hxx b/src/PlaylistVector.hxx index d10c90fda..8ef8e44c7 100644 --- a/src/PlaylistVector.hxx +++ b/src/PlaylistVector.hxx @@ -21,7 +21,7 @@ #define MPD_PLAYLIST_VECTOR_HXX #include "PlaylistInfo.hxx" -#include "gcc.h" +#include "Compiler.h" #include diff --git a/src/Queue.hxx b/src/Queue.hxx index d8eeb271e..ae9b0b829 100644 --- a/src/Queue.hxx +++ b/src/Queue.hxx @@ -20,7 +20,7 @@ #ifndef MPD_QUEUE_HXX #define MPD_QUEUE_HXX -#include "gcc.h" +#include "Compiler.h" #include "IdTable.hxx" #include "util/LazyRandomEngine.hxx" diff --git a/src/Song.hxx b/src/Song.hxx index c1122f43b..e5bb28008 100644 --- a/src/Song.hxx +++ b/src/Song.hxx @@ -21,7 +21,7 @@ #define MPD_SONG_HXX #include "util/list.h" -#include "gcc.h" +#include "Compiler.h" #include #include diff --git a/src/SongFilter.hxx b/src/SongFilter.hxx index 88378d710..380ab097e 100644 --- a/src/SongFilter.hxx +++ b/src/SongFilter.hxx @@ -20,7 +20,7 @@ #ifndef MPD_SONG_FILTER_HXX #define MPD_SONG_FILTER_HXX -#include "gcc.h" +#include "Compiler.h" #include diff --git a/src/StateFile.hxx b/src/StateFile.hxx index 041650d14..5052aa1e9 100644 --- a/src/StateFile.hxx +++ b/src/StateFile.hxx @@ -22,7 +22,7 @@ #include "event/TimeoutMonitor.hxx" #include "fs/Path.hxx" -#include "gcc.h" +#include "Compiler.h" #include diff --git a/src/TextFile.hxx b/src/TextFile.hxx index 6aff4ca70..3d031a1f6 100644 --- a/src/TextFile.hxx +++ b/src/TextFile.hxx @@ -20,7 +20,7 @@ #ifndef MPD_TEXT_FILE_HXX #define MPD_TEXT_FILE_HXX -#include "gcc.h" +#include "Compiler.h" #include diff --git a/src/UpdateArchive.hxx b/src/UpdateArchive.hxx index 73b363d27..8e9c4f8cb 100644 --- a/src/UpdateArchive.hxx +++ b/src/UpdateArchive.hxx @@ -21,7 +21,7 @@ #define MPD_UPDATE_ARCHIVE_HXX #include "check.h" -#include "gcc.h" +#include "Compiler.h" #include diff --git a/src/Win32Main.cxx b/src/Win32Main.cxx index 03be38db6..3e5ee67cd 100644 --- a/src/Win32Main.cxx +++ b/src/Win32Main.cxx @@ -22,7 +22,7 @@ #ifdef WIN32 -#include "gcc.h" +#include "Compiler.h" #include "GlobalEvents.hxx" #include "system/FatalError.hxx" diff --git a/src/ZeroconfBonjour.cxx b/src/ZeroconfBonjour.cxx index 215391b76..4c3efe5b5 100644 --- a/src/ZeroconfBonjour.cxx +++ b/src/ZeroconfBonjour.cxx @@ -24,7 +24,7 @@ #include "event/SocketMonitor.hxx" #include "util/Domain.hxx" #include "Log.hxx" -#include "gcc.h" +#include "Compiler.h" #include diff --git a/src/ZeroconfGlue.cxx b/src/ZeroconfGlue.cxx index 44c257872..05b96b203 100644 --- a/src/ZeroconfGlue.cxx +++ b/src/ZeroconfGlue.cxx @@ -26,7 +26,7 @@ #include "Listen.hxx" #include "util/Domain.hxx" #include "Log.hxx" -#include "gcc.h" +#include "Compiler.h" static constexpr Domain zeroconf_domain("zeroconf"); diff --git a/src/cue/CueParser.hxx b/src/cue/CueParser.hxx index 5cb51200f..f259b885c 100644 --- a/src/cue/CueParser.hxx +++ b/src/cue/CueParser.hxx @@ -21,7 +21,7 @@ #define MPD_CUE_PARSER_HXX #include "check.h" -#include "gcc.h" +#include "Compiler.h" struct Song; struct Tag; diff --git a/src/db/ProxyDatabasePlugin.cxx b/src/db/ProxyDatabasePlugin.cxx index 2b8850f26..0cde8bef9 100644 --- a/src/db/ProxyDatabasePlugin.cxx +++ b/src/db/ProxyDatabasePlugin.cxx @@ -25,7 +25,7 @@ #include "PlaylistVector.hxx" #include "Directory.hxx" #include "Song.hxx" -#include "gcc.h" +#include "Compiler.h" #include "ConfigData.hxx" #include "tag/TagBuilder.hxx" #include "util/Error.hxx" diff --git a/src/db/SimpleDatabasePlugin.hxx b/src/db/SimpleDatabasePlugin.hxx index 5de52cdeb..6ebaacdf3 100644 --- a/src/db/SimpleDatabasePlugin.hxx +++ b/src/db/SimpleDatabasePlugin.hxx @@ -22,7 +22,7 @@ #include "DatabasePlugin.hxx" #include "fs/Path.hxx" -#include "gcc.h" +#include "Compiler.h" #include diff --git a/src/decoder/FlacIOHandle.cxx b/src/decoder/FlacIOHandle.cxx index 77da864e5..28ef60006 100644 --- a/src/decoder/FlacIOHandle.cxx +++ b/src/decoder/FlacIOHandle.cxx @@ -20,7 +20,7 @@ #include "config.h" #include "FlacIOHandle.hxx" #include "util/Error.hxx" -#include "gcc.h" +#include "Compiler.h" #include diff --git a/src/decoder/FlacIOHandle.hxx b/src/decoder/FlacIOHandle.hxx index 3216dafa4..996f0d96b 100644 --- a/src/decoder/FlacIOHandle.hxx +++ b/src/decoder/FlacIOHandle.hxx @@ -20,7 +20,7 @@ #ifndef MPD_FLAC_IO_HANDLE_HXX #define MPD_FLAC_IO_HANDLE_HXX -#include "gcc.h" +#include "Compiler.h" #include "InputStream.hxx" #include diff --git a/src/decoder/FlacInput.cxx b/src/decoder/FlacInput.cxx index 88b942971..399e78905 100644 --- a/src/decoder/FlacInput.cxx +++ b/src/decoder/FlacInput.cxx @@ -24,7 +24,7 @@ #include "InputStream.hxx" #include "util/Error.hxx" #include "Log.hxx" -#include "gcc.h" +#include "Compiler.h" FLAC__StreamDecoderReadStatus FlacInput::Read(FLAC__byte buffer[], size_t *bytes) diff --git a/src/decoder/FlacMetadata.hxx b/src/decoder/FlacMetadata.hxx index 57769672f..5159a1a41 100644 --- a/src/decoder/FlacMetadata.hxx +++ b/src/decoder/FlacMetadata.hxx @@ -20,7 +20,7 @@ #ifndef MPD_FLAC_METADATA_H #define MPD_FLAC_METADATA_H -#include "gcc.h" +#include "Compiler.h" #include "FlacIOHandle.hxx" #include diff --git a/src/encoder/NullEncoderPlugin.cxx b/src/encoder/NullEncoderPlugin.cxx index 38bc5cbe3..3b1aae5e2 100644 --- a/src/encoder/NullEncoderPlugin.cxx +++ b/src/encoder/NullEncoderPlugin.cxx @@ -24,7 +24,7 @@ extern "C" { #include "util/growing_fifo.h" } -#include "gcc.h" +#include "Compiler.h" #include #include diff --git a/src/event/BufferedSocket.hxx b/src/event/BufferedSocket.hxx index cc763c164..578000961 100644 --- a/src/event/BufferedSocket.hxx +++ b/src/event/BufferedSocket.hxx @@ -22,7 +22,7 @@ #include "check.h" #include "SocketMonitor.hxx" -#include "gcc.h" +#include "Compiler.h" struct fifo_buffer; class Error; diff --git a/src/event/Call.cxx b/src/event/Call.cxx index e7d963ac3..ab1d5ffbd 100644 --- a/src/event/Call.cxx +++ b/src/event/Call.cxx @@ -23,7 +23,7 @@ #include "DeferredMonitor.hxx" #include "thread/Mutex.hxx" #include "thread/Cond.hxx" -#include "gcc.h" +#include "Compiler.h" #include diff --git a/src/event/DeferredMonitor.hxx b/src/event/DeferredMonitor.hxx index 988dce2d8..2380fb66f 100644 --- a/src/event/DeferredMonitor.hxx +++ b/src/event/DeferredMonitor.hxx @@ -21,7 +21,7 @@ #define MPD_SOCKET_DEFERRED_MONITOR_HXX #include "check.h" -#include "gcc.h" +#include "Compiler.h" #ifdef USE_EPOLL #include "SocketMonitor.hxx" diff --git a/src/event/FullyBufferedSocket.hxx b/src/event/FullyBufferedSocket.hxx index c67c2c78d..29a6ae64b 100644 --- a/src/event/FullyBufferedSocket.hxx +++ b/src/event/FullyBufferedSocket.hxx @@ -23,7 +23,7 @@ #include "check.h" #include "BufferedSocket.hxx" #include "util/PeakBuffer.hxx" -#include "gcc.h" +#include "Compiler.h" /** * A #BufferedSocket specialization that adds an output buffer. diff --git a/src/event/Loop.hxx b/src/event/Loop.hxx index ec90cdacf..859ce2733 100644 --- a/src/event/Loop.hxx +++ b/src/event/Loop.hxx @@ -22,7 +22,7 @@ #include "check.h" #include "thread/Id.hxx" -#include "gcc.h" +#include "Compiler.h" #ifdef USE_EPOLL #include "system/EPollFD.hxx" diff --git a/src/event/MultiSocketMonitor.cxx b/src/event/MultiSocketMonitor.cxx index 2ebad02e5..bd1aa6fef 100644 --- a/src/event/MultiSocketMonitor.cxx +++ b/src/event/MultiSocketMonitor.cxx @@ -21,7 +21,7 @@ #include "MultiSocketMonitor.hxx" #include "Loop.hxx" #include "system/fd_util.h" -#include "gcc.h" +#include "Compiler.h" #include diff --git a/src/event/MultiSocketMonitor.hxx b/src/event/MultiSocketMonitor.hxx index fe74206a3..da675d98f 100644 --- a/src/event/MultiSocketMonitor.hxx +++ b/src/event/MultiSocketMonitor.hxx @@ -21,7 +21,7 @@ #define MPD_MULTI_SOCKET_MONITOR_HXX #include "check.h" -#include "gcc.h" +#include "Compiler.h" #ifdef USE_EPOLL #include "IdleMonitor.hxx" diff --git a/src/event/SocketMonitor.cxx b/src/event/SocketMonitor.cxx index 76dab9346..7c118cfd6 100644 --- a/src/event/SocketMonitor.cxx +++ b/src/event/SocketMonitor.cxx @@ -21,7 +21,7 @@ #include "SocketMonitor.hxx" #include "Loop.hxx" #include "system/fd_util.h" -#include "gcc.h" +#include "Compiler.h" #include diff --git a/src/filter/NullFilterPlugin.cxx b/src/filter/NullFilterPlugin.cxx index ad585d4b6..c762592f6 100644 --- a/src/filter/NullFilterPlugin.cxx +++ b/src/filter/NullFilterPlugin.cxx @@ -29,7 +29,7 @@ #include "FilterInternal.hxx" #include "FilterRegistry.hxx" #include "AudioFormat.hxx" -#include "gcc.h" +#include "Compiler.h" class NullFilter final : public Filter { public: diff --git a/src/fs/Path.cxx b/src/fs/Path.cxx index e983c5c82..688b78515 100644 --- a/src/fs/Path.cxx +++ b/src/fs/Path.cxx @@ -24,7 +24,7 @@ #include "util/Error.hxx" #include "util/Domain.hxx" #include "Log.hxx" -#include "gcc.h" +#include "Compiler.h" #include diff --git a/src/fs/Path.hxx b/src/fs/Path.hxx index a5215c2d6..3cd25e71c 100644 --- a/src/fs/Path.hxx +++ b/src/fs/Path.hxx @@ -21,7 +21,7 @@ #define MPD_FS_PATH_HXX #include "check.h" -#include "gcc.h" +#include "Compiler.h" #ifdef WIN32 #include diff --git a/src/gcc.h b/src/gcc.h deleted file mode 100644 index 2946eae0d..000000000 --- a/src/gcc.h +++ /dev/null @@ -1,174 +0,0 @@ -/* - * Copyright (C) 2003-2013 The Music Player Daemon Project - * 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., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ - -#ifndef MPD_GCC_H -#define MPD_GCC_H - -#define GCC_CHECK_VERSION(major, minor) \ - (defined(__GNUC__) && \ - (__GNUC__ > (major) || (__GNUC__ == (major) && __GNUC_MINOR__ >= (minor)))) - -#ifdef __GNUC__ -#define GCC_VERSION (__GNUC__ * 10000 \ - + __GNUC_MINOR__ * 100 \ - + __GNUC_PATCHLEVEL__) -#else -#define GCC_VERSION 0 -#endif - -#ifdef __clang__ -# define CLANG_VERSION (__clang_major__ * 10000 \ - + __clang_minor__ * 100 \ - + __clang_patchlevel__) -# if __clang_major__ < 3 -# error Sorry, your clang version is too old. You need at least version 3.1. -# endif -#elif defined(__GNUC__) -# if !GCC_CHECK_VERSION(4,6) -# error Sorry, your gcc version is too old. You need at least version 4.6. -# endif -#else -# warning Untested compiler. Use at your own risk! -#endif - -#if GCC_CHECK_VERSION(4,0) - -/* GCC 4.x */ - -#define gcc_const __attribute__((const)) -#define gcc_deprecated __attribute__((deprecated)) -#define gcc_may_alias __attribute__((may_alias)) -#define gcc_malloc __attribute__((malloc)) -#define gcc_noreturn __attribute__((noreturn)) -#define gcc_packed __attribute__((packed)) -#define gcc_printf(a,b) __attribute__((format(printf, a, b))) -#define gcc_pure __attribute__((pure)) -#define gcc_sentinel __attribute__((sentinel)) -#define gcc_unused __attribute__((unused)) -#define gcc_warn_unused_result __attribute__((warn_unused_result)) - -#define gcc_nonnull(...) __attribute__((nonnull(__VA_ARGS__))) -#define gcc_nonnull_all __attribute__((nonnull)) - -#define gcc_likely(x) __builtin_expect (!!(x), 1) -#define gcc_unlikely(x) __builtin_expect (!!(x), 0) - -#define gcc_aligned(n) __attribute__((aligned(n))) - -#define gcc_visibility_hidden __attribute__((visibility("hidden"))) -#define gcc_visibility_default __attribute__((visibility("default"))) - -#define gcc_always_inline __attribute__((always_inline)) - -#else - -/* generic C compiler */ - -#define gcc_const -#define gcc_deprecated -#define gcc_may_alias -#define gcc_malloc -#define gcc_noreturn -#define gcc_packed -#define gcc_printf(a,b) -#define gcc_pure -#define gcc_sentinel -#define gcc_unused -#define gcc_warn_unused_result - -#define gcc_nonnull(...) -#define gcc_nonnull_all - -#define gcc_likely(x) (x) -#define gcc_unlikely(x) (x) - -#define gcc_aligned(n) - -#define gcc_visibility_hidden -#define gcc_visibility_default - -#define gcc_always_inline inline - -#endif - -#if GCC_CHECK_VERSION(4,3) - -#define gcc_hot __attribute__((hot)) -#define gcc_cold __attribute__((cold)) - -#else /* ! GCC_UNUSED >= 40300 */ - -#define gcc_hot -#define gcc_cold - -#endif /* ! GCC_UNUSED >= 40300 */ - -#if GCC_CHECK_VERSION(4,6) && !defined(__clang__) -#define gcc_flatten __attribute__((flatten)) -#else -#define gcc_flatten -#endif - -#ifndef __cplusplus -/* plain C99 has "restrict" */ -#define gcc_restrict restrict -#elif GCC_CHECK_VERSION(4,0) -/* "__restrict__" is a GCC extension for C++ */ -#define gcc_restrict __restrict__ -#else -/* disable it on other compilers */ -#define gcc_restrict -#endif - -/* C++11 features */ - -#if defined(__cplusplus) - -/* support for C++11 "override" was added in gcc 4.7 */ -#if !defined(__clang__) && !GCC_CHECK_VERSION(4,7) -#define override -#define final -#endif - -#if defined(__clang__) || GCC_CHECK_VERSION(4,8) -#define gcc_alignas(T, fallback) alignas(T) -#else -#define gcc_alignas(T, fallback) gcc_aligned(fallback) -#endif - -#endif - -#ifndef __has_feature - // define dummy macro for non-clang compilers - #define __has_feature(x) 0 -#endif - -#if __has_feature(attribute_unused_on_fields) -#define gcc_unused_field gcc_unused -#else -#define gcc_unused_field -#endif - -#if defined(__GNUC__) || defined(__clang__) -#define gcc_unreachable() __builtin_unreachable() -#else -#define gcc_unreachable() -#endif - -#endif diff --git a/src/output/HttpdClient.hxx b/src/output/HttpdClient.hxx index a596814ee..d481898a2 100644 --- a/src/output/HttpdClient.hxx +++ b/src/output/HttpdClient.hxx @@ -21,7 +21,7 @@ #define MPD_OUTPUT_HTTPD_CLIENT_HXX #include "event/BufferedSocket.hxx" -#include "gcc.h" +#include "Compiler.h" #include diff --git a/src/output/WinmmOutputPlugin.hxx b/src/output/WinmmOutputPlugin.hxx index e8688782e..a6b7733ec 100644 --- a/src/output/WinmmOutputPlugin.hxx +++ b/src/output/WinmmOutputPlugin.hxx @@ -24,7 +24,7 @@ #ifdef ENABLE_WINMM_OUTPUT -#include "gcc.h" +#include "Compiler.h" #include #include diff --git a/src/pcm/PcmBuffer.hxx b/src/pcm/PcmBuffer.hxx index 2eddfb7f9..fa89d7f20 100644 --- a/src/pcm/PcmBuffer.hxx +++ b/src/pcm/PcmBuffer.hxx @@ -21,7 +21,7 @@ #define PCM_BUFFER_HXX #include "util/ReusableArray.hxx" -#include "gcc.h" +#include "Compiler.h" #include diff --git a/src/pcm/PcmMix.hxx b/src/pcm/PcmMix.hxx index b50a163fd..86d279fc1 100644 --- a/src/pcm/PcmMix.hxx +++ b/src/pcm/PcmMix.hxx @@ -21,7 +21,7 @@ #define MPD_PCM_MIX_HXX #include "AudioFormat.hxx" -#include "gcc.h" +#include "Compiler.h" #include diff --git a/src/pcm/PcmUtils.hxx b/src/pcm/PcmUtils.hxx index d77c4194a..543ac57a6 100644 --- a/src/pcm/PcmUtils.hxx +++ b/src/pcm/PcmUtils.hxx @@ -20,7 +20,7 @@ #ifndef MPD_PCM_UTILS_H #define MPD_PCM_UTILS_H -#include "gcc.h" +#include "Compiler.h" #include diff --git a/src/protocol/Result.hxx b/src/protocol/Result.hxx index 659e515bb..541b00327 100644 --- a/src/protocol/Result.hxx +++ b/src/protocol/Result.hxx @@ -21,7 +21,7 @@ #define MPD_PROTOCOL_RESULT_HXX #include "check.h" -#include "gcc.h" +#include "Compiler.h" #include "Ack.hxx" #include diff --git a/src/system/EventFD.cxx b/src/system/EventFD.cxx index 716ff80ae..3560bf8c3 100644 --- a/src/system/EventFD.cxx +++ b/src/system/EventFD.cxx @@ -22,7 +22,7 @@ #include "EventFD.hxx" #include "system/fd_util.h" #include "system/FatalError.hxx" -#include "gcc.h" +#include "Compiler.h" #include #include diff --git a/src/system/EventPipe.cxx b/src/system/EventPipe.cxx index e1a38c503..b49d1d0f0 100644 --- a/src/system/EventPipe.cxx +++ b/src/system/EventPipe.cxx @@ -21,7 +21,7 @@ #include "EventPipe.hxx" #include "system/fd_util.h" #include "system/FatalError.hxx" -#include "gcc.h" +#include "Compiler.h" #include #include diff --git a/src/system/FatalError.hxx b/src/system/FatalError.hxx index 03baf66c4..22f3b5f8f 100644 --- a/src/system/FatalError.hxx +++ b/src/system/FatalError.hxx @@ -22,7 +22,7 @@ #include "check.h" #include "gerror.h" -#include "gcc.h" +#include "Compiler.h" class Error; diff --git a/src/system/Resolver.hxx b/src/system/Resolver.hxx index 38803dcd1..62ef455a1 100644 --- a/src/system/Resolver.hxx +++ b/src/system/Resolver.hxx @@ -20,7 +20,7 @@ #ifndef MPD_RESOLVER_HXX #define MPD_RESOLVER_HXX -#include "gcc.h" +#include "Compiler.h" #include diff --git a/src/system/SocketError.hxx b/src/system/SocketError.hxx index 2b8332715..22fbd2441 100644 --- a/src/system/SocketError.hxx +++ b/src/system/SocketError.hxx @@ -20,7 +20,7 @@ #ifndef MPD_SOCKET_ERROR_HXX #define MPD_SOCKET_ERROR_HXX -#include "gcc.h" +#include "Compiler.h" #include "util/Error.hxx" #ifdef WIN32 diff --git a/src/system/clock.h b/src/system/clock.h index c98b9a652..ae774ff85 100644 --- a/src/system/clock.h +++ b/src/system/clock.h @@ -20,7 +20,7 @@ #ifndef MPD_CLOCK_H #define MPD_CLOCK_H -#include "gcc.h" +#include "Compiler.h" #include diff --git a/src/tag/Tag.hxx b/src/tag/Tag.hxx index 395780cde..4a1b16b39 100644 --- a/src/tag/Tag.hxx +++ b/src/tag/Tag.hxx @@ -22,7 +22,7 @@ #include "TagType.h" #include "TagItem.hxx" -#include "gcc.h" +#include "Compiler.h" #include diff --git a/src/tag/TagBuilder.hxx b/src/tag/TagBuilder.hxx index 63a14a946..d737f2b2e 100644 --- a/src/tag/TagBuilder.hxx +++ b/src/tag/TagBuilder.hxx @@ -21,7 +21,7 @@ #define MPD_TAG_BUILDER_HXX #include "TagType.h" -#include "gcc.h" +#include "Compiler.h" #include diff --git a/src/tag/TagId3.hxx b/src/tag/TagId3.hxx index ca288754b..e453ffb55 100644 --- a/src/tag/TagId3.hxx +++ b/src/tag/TagId3.hxx @@ -21,7 +21,7 @@ #define MPD_TAG_ID3_HXX #include "check.h" -#include "gcc.h" +#include "Compiler.h" struct tag_handler; struct Tag; diff --git a/src/tag/TagItem.hxx b/src/tag/TagItem.hxx index a2924f2af..5db9a2116 100644 --- a/src/tag/TagItem.hxx +++ b/src/tag/TagItem.hxx @@ -21,7 +21,7 @@ #define MPD_TAG_ITEM_HXX #include "TagType.h" -#include "gcc.h" +#include "Compiler.h" /** * One tag value. It is a mapping of #tag_type to am arbitrary string diff --git a/src/tag/TagString.hxx b/src/tag/TagString.hxx index 21ea139bf..79255dcd3 100644 --- a/src/tag/TagString.hxx +++ b/src/tag/TagString.hxx @@ -21,7 +21,7 @@ #define MPD_TAG_STRING_HXX #include "check.h" -#include "gcc.h" +#include "Compiler.h" #include diff --git a/src/tag/TagTable.hxx b/src/tag/TagTable.hxx index 88bf5b028..553415a86 100644 --- a/src/tag/TagTable.hxx +++ b/src/tag/TagTable.hxx @@ -21,7 +21,7 @@ #define MPD_TAG_TABLE_HXX #include "TagType.h" -#include "gcc.h" +#include "Compiler.h" struct tag_table { const char *name; diff --git a/src/thread/Id.hxx b/src/thread/Id.hxx index 3d0dfe311..fa1cf2cab 100644 --- a/src/thread/Id.hxx +++ b/src/thread/Id.hxx @@ -20,7 +20,7 @@ #ifndef MPD_THREAD_ID_HXX #define MPD_THREAD_ID_HXX -#include "gcc.h" +#include "Compiler.h" #ifdef WIN32 #include diff --git a/src/util/Error.hxx b/src/util/Error.hxx index 1fcf46061..a37211538 100644 --- a/src/util/Error.hxx +++ b/src/util/Error.hxx @@ -21,7 +21,7 @@ #define MPD_ERROR_HXX #include "check.h" -#include "gcc.h" +#include "Compiler.h" #include diff --git a/src/util/HugeAllocator.hxx b/src/util/HugeAllocator.hxx index 01c92cd43..f44a6e3b8 100644 --- a/src/util/HugeAllocator.hxx +++ b/src/util/HugeAllocator.hxx @@ -20,7 +20,7 @@ #ifndef MPD_HUGE_ALLOCATOR_HXX #define MPD_HUGE_ALLOCATOR_HXX -#include "gcc.h" +#include "Compiler.h" #include diff --git a/src/util/Manual.hxx b/src/util/Manual.hxx index 802695224..baab0a555 100644 --- a/src/util/Manual.hxx +++ b/src/util/Manual.hxx @@ -30,7 +30,7 @@ #ifndef MPD_MANUAL_HXX #define MPD_MANUAL_HXX -#include "gcc.h" +#include "Compiler.h" #include #include diff --git a/src/util/PeakBuffer.hxx b/src/util/PeakBuffer.hxx index 0fbba8d77..a3f385e3e 100644 --- a/src/util/PeakBuffer.hxx +++ b/src/util/PeakBuffer.hxx @@ -20,7 +20,7 @@ #ifndef MPD_PEAK_BUFFER_HXX #define MPD_PEAK_BUFFER_HXX -#include "gcc.h" +#include "Compiler.h" #include diff --git a/src/util/ReusableArray.hxx b/src/util/ReusableArray.hxx index 30b1a9cd9..60d323695 100644 --- a/src/util/ReusableArray.hxx +++ b/src/util/ReusableArray.hxx @@ -32,7 +32,7 @@ #include -#include "gcc.h" +#include "Compiler.h" /** * Manager for a temporary array which grows as needed. This attempts diff --git a/src/util/SliceBuffer.hxx b/src/util/SliceBuffer.hxx index c61f164f4..6cde75f34 100644 --- a/src/util/SliceBuffer.hxx +++ b/src/util/SliceBuffer.hxx @@ -21,7 +21,7 @@ #define MPD_SLICE_BUFFER_HXX #include "HugeAllocator.hxx" -#include "gcc.h" +#include "Compiler.h" #include #include diff --git a/src/util/StringUtil.hxx b/src/util/StringUtil.hxx index 6eeca893d..dc3e101b3 100644 --- a/src/util/StringUtil.hxx +++ b/src/util/StringUtil.hxx @@ -20,7 +20,7 @@ #ifndef MPD_STRING_UTIL_HXX #define MPD_STRING_UTIL_HXX -#include "gcc.h" +#include "Compiler.h" /** * Returns a pointer to the first non-whitespace character in the diff --git a/src/util/UriUtil.hxx b/src/util/UriUtil.hxx index 1d288ca1d..753f6dedb 100644 --- a/src/util/UriUtil.hxx +++ b/src/util/UriUtil.hxx @@ -20,7 +20,7 @@ #ifndef MPD_URI_UTIL_HXX #define MPD_URI_UTIL_HXX -#include "gcc.h" +#include "Compiler.h" /** * Checks whether the specified URI has a scheme in the form diff --git a/src/util/bit_reverse.h b/src/util/bit_reverse.h index 54cb789bb..a02f01b3f 100644 --- a/src/util/bit_reverse.h +++ b/src/util/bit_reverse.h @@ -20,7 +20,7 @@ #ifndef MPD_BIT_REVERSE_H #define MPD_BIT_REVERSE_H -#include "gcc.h" +#include "Compiler.h" #include -- cgit v1.2.3