check.h: remove obsolete header

Since we switched from autotools to Meson in commit
94592c1406, we don't need to include
`config.h` early to properly enable large file support.  Meson passes
the required macros on the compiler command line instead of defining
them in `config.h`.

This means we can include `config.h` at any time, whenever we want to
check its macros, and there are no ordering constraints.
This commit is contained in:
Max Kellermann
2018-11-19 12:49:45 +01:00
parent 2e450bbf95
commit ce49d99c2f
725 changed files with 68 additions and 888 deletions

View File

@@ -17,11 +17,11 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include "config.h"
#include "AllocatedPath.hxx"
#include "Domain.hxx"
#include "Charset.hxx"
#include "util/Compiler.h"
#include "config.h"
#include <exception>

View File

@@ -20,7 +20,6 @@
#ifndef MPD_FS_ALLOCATED_PATH_HXX
#define MPD_FS_ALLOCATED_PATH_HXX
#include "check.h"
#include "util/Compiler.h"
#include "Traits.hxx"
#include "Path.hxx"

View File

@@ -17,12 +17,12 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include "config.h"
#include "Charset.hxx"
#include "Domain.hxx"
#include "Log.hxx"
#include "lib/icu/Converter.hxx"
#include "util/AllocatedString.hxx"
#include "config.h"
#ifdef _WIN32
#include "lib/icu/Win32.hxx"

View File

@@ -20,9 +20,9 @@
#ifndef MPD_FS_CHARSET_HXX
#define MPD_FS_CHARSET_HXX
#include "check.h"
#include "util/Compiler.h"
#include "Traits.hxx"
#include "config.h"
#if (defined(HAVE_ICU) || defined(HAVE_ICONV)) && !defined(_WIN32)
#define HAVE_FS_CHARSET

View File

@@ -17,7 +17,6 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include "config.h"
#include "CheckFile.hxx"
#include "Log.hxx"
#include "config/Domain.hxx"

View File

@@ -20,8 +20,6 @@
#ifndef MPD_FS_CHECK_FILE_HXX
#define MPD_FS_CHECK_FILE_HXX
#include "check.h"
class Path;
/**

View File

@@ -17,10 +17,10 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include "config.h"
#include "Config.hxx"
#include "Charset.hxx"
#include "config/Data.hxx"
#include "config.h"
void
ConfigureFS(const ConfigData &config)

View File

@@ -20,8 +20,6 @@
#ifndef MPD_FS_CONFIG_HXX
#define MPD_FS_CONFIG_HXX
#include "check.h"
struct ConfigData;
/**

View File

@@ -17,7 +17,6 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include "config.h"
#include "DirectoryReader.hxx"
#include "system/Error.hxx"

View File

@@ -20,7 +20,6 @@
#ifndef MPD_FS_DIRECTORY_READER_HXX
#define MPD_FS_DIRECTORY_READER_HXX
#include "check.h"
#include "Path.hxx"
#ifdef _WIN32

View File

@@ -17,7 +17,6 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include "config.h"
#include "Domain.hxx"
#include "util/Domain.hxx"

View File

@@ -20,7 +20,6 @@
#ifndef MPD_FS_FILE_INFO_HXX
#define MPD_FS_FILE_INFO_HXX
#include "check.h"
#include "Path.hxx"
#include "system/Error.hxx"

View File

@@ -17,7 +17,6 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include "config.h"
#include "FileSystem.hxx"
#include "AllocatedPath.hxx"
#include "Limits.hxx"

View File

@@ -20,7 +20,6 @@
#ifndef MPD_FS_FILESYSTEM_HXX
#define MPD_FS_FILESYSTEM_HXX
#include "check.h"
#include "Traits.hxx"
#include "Path.hxx"
#include "system/UniqueFileDescriptor.hxx"

View File

@@ -20,7 +20,7 @@
#ifndef MPD_FS_GLOB_XX
#define MPD_FS_GLOB_XX
#include "check.h"
#include "config.h"
#ifdef HAVE_FNMATCH
#define HAVE_CLASS_GLOB

View File

@@ -20,8 +20,6 @@
#ifndef MPD_FS_LIMITS_HXX
#define MPD_FS_LIMITS_HXX
#include "check.h"
#include <stddef.h>
#include <limits.h>

View File

@@ -17,7 +17,6 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include "config.h"
#include "List.hxx"
#include "AllocatedPath.hxx"
#include "Glob.hxx"

View File

@@ -20,8 +20,6 @@
#ifndef MPD_FS_LIST_XX
#define MPD_FS_LIST_XX
#include "check.h"
#include <forward_list>
class Path;

View File

@@ -20,7 +20,6 @@
#ifndef MPD_FS_NARROW_PATH_HXX
#define MPD_FS_NARROW_PATH_HXX
#include "check.h"
#include "Path.hxx"
#include "util/Macros.hxx"

View File

@@ -17,7 +17,6 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include "config.h"
#include "Path.hxx"
#include "Charset.hxx"

View File

@@ -20,7 +20,6 @@
#ifndef MPD_FS_PATH_HXX
#define MPD_FS_PATH_HXX
#include "check.h"
#include "util/Compiler.h"
#include "Traits.hxx"

View File

@@ -17,7 +17,6 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include "config.h"
#include "Path.hxx"
#include "AllocatedPath.hxx"

View File

@@ -17,10 +17,10 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include "config.h"
#include "StandardDirectory.hxx"
#include "FileSystem.hxx"
#include "XDG.hxx"
#include "config.h"
#include <array>

View File

@@ -20,7 +20,6 @@
#ifndef MPD_FS_STANDARD_DIRECTORY_HXX
#define MPD_FS_STANDARD_DIRECTORY_HXX
#include "check.h"
#include "AllocatedPath.hxx"
/**

View File

@@ -17,7 +17,6 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include "config.h"
#include "Traits.hxx"
#include "util/StringCompare.hxx"

View File

@@ -20,7 +20,6 @@
#ifndef MPD_FS_TRAITS_HXX
#define MPD_FS_TRAITS_HXX
#include "check.h"
#include "util/Compiler.h"
#include "util/StringPointer.hxx"
#include "util/StringAPI.hxx"

View File

@@ -17,7 +17,6 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include "config.h"
#include "AutoGunzipReader.hxx"
#include "GunzipReader.hxx"

View File

@@ -20,7 +20,6 @@
#ifndef MPD_AUTO_GUNZIP_READER_HXX
#define MPD_AUTO_GUNZIP_READER_HXX
#include "check.h"
#include "PeekReader.hxx"
#include "util/Compiler.h"

View File

@@ -27,7 +27,6 @@
* OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "config.h"
#include "BufferedOutputStream.hxx"
#include "OutputStream.hxx"

View File

@@ -30,7 +30,6 @@
#ifndef BUFFERED_OUTPUT_STREAM_HXX
#define BUFFERED_OUTPUT_STREAM_HXX
#include "check.h"
#include "util/Compiler.h"
#include "util/DynamicFifoBuffer.hxx"

View File

@@ -17,7 +17,6 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include "config.h"
#include "BufferedReader.hxx"
#include "Reader.hxx"
#include "util/TextFile.hxx"

View File

@@ -20,7 +20,6 @@
#ifndef MPD_BUFFERED_READER_HXX
#define MPD_BUFFERED_READER_HXX
#include "check.h"
#include "util/Compiler.h"
#include "util/DynamicFifoBuffer.hxx"

View File

@@ -27,7 +27,6 @@
* OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "config.h"
#include "FileOutputStream.hxx"
#include "system/Error.hxx"
#include "util/StringFormat.hxx"

View File

@@ -30,7 +30,6 @@
#ifndef FILE_OUTPUT_STREAM_HXX
#define FILE_OUTPUT_STREAM_HXX
#include "check.h"
#include "OutputStream.hxx"
#include "fs/AllocatedPath.hxx"
#include "util/Compiler.h"

View File

@@ -17,7 +17,6 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include "config.h"
#include "FileReader.hxx"
#include "fs/FileInfo.hxx"
#include "system/Error.hxx"

View File

@@ -20,7 +20,6 @@
#ifndef MPD_FILE_READER_HXX
#define MPD_FILE_READER_HXX
#include "check.h"
#include "Reader.hxx"
#include "fs/AllocatedPath.hxx"
#include "util/Compiler.h"

View File

@@ -17,7 +17,6 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include "config.h"
#include "GunzipReader.hxx"
#include "lib/zlib/Error.hxx"

View File

@@ -20,7 +20,6 @@
#ifndef MPD_GUNZIP_READER_HXX
#define MPD_GUNZIP_READER_HXX
#include "check.h"
#include "Reader.hxx"
#include "util/StaticFifoBuffer.hxx"
#include "util/Compiler.h"

View File

@@ -27,7 +27,6 @@
* OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "config.h"
#include "GzipOutputStream.hxx"
#include "lib/zlib/Error.hxx"

View File

@@ -30,7 +30,6 @@
#ifndef GZIP_OUTPUT_STREAM_HXX
#define GZIP_OUTPUT_STREAM_HXX
#include "check.h"
#include "OutputStream.hxx"
#include "util/Compiler.h"

View File

@@ -30,8 +30,6 @@
#ifndef MPD_OUTPUT_STREAM_HXX
#define MPD_OUTPUT_STREAM_HXX
#include "check.h"
#include <stddef.h>
class OutputStream {

View File

@@ -17,7 +17,6 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include "config.h"
#include "PeekReader.hxx"
#include <algorithm>

View File

@@ -20,7 +20,6 @@
#ifndef MPD_PEEK_READER_HXX
#define MPD_PEEK_READER_HXX
#include "check.h"
#include "Reader.hxx"
#include "util/Compiler.h"

View File

@@ -20,7 +20,6 @@
#ifndef MPD_READER_HXX
#define MPD_READER_HXX
#include "check.h"
#include "util/Compiler.h"
#include <stddef.h>

View File

@@ -30,7 +30,6 @@
#ifndef STDIO_OUTPUT_STREAM_HXX
#define STDIO_OUTPUT_STREAM_HXX
#include "check.h"
#include "OutputStream.hxx"
#include "util/Compiler.h"

View File

@@ -17,7 +17,6 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include "config.h"
#include "TextFile.hxx"
#include "FileReader.hxx"
#include "AutoGunzipReader.hxx"

View File

@@ -20,8 +20,8 @@
#ifndef MPD_TEXT_FILE_HXX
#define MPD_TEXT_FILE_HXX
#include "check.h"
#include "util/Compiler.h"
#include "config.h"
class Path;
class FileReader;