From 162845cc6d87cf77e3a6c3d54de084a1be6e8c02 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 24 Apr 2019 14:24:54 +0200 Subject: [PATCH] fs/Charset: move HAVE_FS_CHARSET to Features.hxx --- src/fs/AllocatedPath.cxx | 1 + src/fs/Charset.cxx | 3 ++- src/fs/Charset.hxx | 7 +------ src/fs/Config.cxx | 3 ++- src/fs/Features.hxx | 29 +++++++++++++++++++++++++++++ 5 files changed, 35 insertions(+), 8 deletions(-) create mode 100644 src/fs/Features.hxx diff --git a/src/fs/AllocatedPath.cxx b/src/fs/AllocatedPath.cxx index 862c68a3b..b2632ac04 100644 --- a/src/fs/AllocatedPath.cxx +++ b/src/fs/AllocatedPath.cxx @@ -20,6 +20,7 @@ #include "AllocatedPath.hxx" #include "Domain.hxx" #include "Charset.hxx" +#include "Features.hxx" #include "util/Compiler.h" #include "config.h" diff --git a/src/fs/Charset.cxx b/src/fs/Charset.cxx index cf3d134ba..799b883c4 100644 --- a/src/fs/Charset.cxx +++ b/src/fs/Charset.cxx @@ -1,5 +1,5 @@ /* - * Copyright 2003-2018 The Music Player Daemon Project + * Copyright 2003-2019 The Music Player Daemon Project * http://www.musicpd.org * * This program is free software; you can redistribute it and/or modify @@ -18,6 +18,7 @@ */ #include "Charset.hxx" +#include "Features.hxx" #include "Domain.hxx" #include "Log.hxx" #include "lib/icu/Converter.hxx" diff --git a/src/fs/Charset.hxx b/src/fs/Charset.hxx index c9e2c4d88..8c6ac9efe 100644 --- a/src/fs/Charset.hxx +++ b/src/fs/Charset.hxx @@ -1,5 +1,5 @@ /* - * Copyright 2003-2018 The Music Player Daemon Project + * Copyright 2003-2019 The Music Player Daemon Project * http://www.musicpd.org * * This program is free software; you can redistribute it and/or modify @@ -22,11 +22,6 @@ #include "util/Compiler.h" #include "Traits.hxx" -#include "config.h" - -#if (defined(HAVE_ICU) || defined(HAVE_ICONV)) && !defined(_WIN32) -#define HAVE_FS_CHARSET -#endif /** * Gets file system character set name. diff --git a/src/fs/Config.cxx b/src/fs/Config.cxx index f2a9716e1..0c06cd6a7 100644 --- a/src/fs/Config.cxx +++ b/src/fs/Config.cxx @@ -1,5 +1,5 @@ /* - * Copyright 2003-2018 The Music Player Daemon Project + * Copyright 2003-2019 The Music Player Daemon Project * http://www.musicpd.org * * This program is free software; you can redistribute it and/or modify @@ -19,6 +19,7 @@ #include "Config.hxx" #include "Charset.hxx" +#include "Features.hxx" #include "config/Data.hxx" #include "config.h" diff --git a/src/fs/Features.hxx b/src/fs/Features.hxx new file mode 100644 index 000000000..eb298bc09 --- /dev/null +++ b/src/fs/Features.hxx @@ -0,0 +1,29 @@ +/* + * Copyright 2003-2019 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_FS_FEATURES_HXX +#define MPD_FS_FEATURES_HXX + +#include "config.h" + +#if (defined(HAVE_ICU) || defined(HAVE_ICONV)) && !defined(_WIN32) +#define HAVE_FS_CHARSET +#endif + +#endif