aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2014-11-29 23:35:49 +0100
committerMax Kellermann <max@duempel.org>2014-11-29 23:36:44 +0100
commit125daea16a92af46b0e68c9583511a5f25f4d850 (patch)
treebaf1b696bc2d69dfdd2054d0147f3ac62b23b210 /src
parentfd2c6b8a4b059bd810ca8511fa8f66001843284c (diff)
downloadmpd-125daea16a92af46b0e68c9583511a5f25f4d850.tar.gz
mpd-125daea16a92af46b0e68c9583511a5f25f4d850.tar.xz
mpd-125daea16a92af46b0e68c9583511a5f25f4d850.zip
fs/Charset: add macro HAVE_FS_CHARSET
Diffstat (limited to '')
-rw-r--r--src/fs/AllocatedPath.cxx2
-rw-r--r--src/fs/Charset.cxx2
-rw-r--r--src/fs/Charset.hxx4
-rw-r--r--src/fs/Config.cxx2
4 files changed, 7 insertions, 3 deletions
diff --git a/src/fs/AllocatedPath.cxx b/src/fs/AllocatedPath.cxx
index 0f394dd6e..65dcff56f 100644
--- a/src/fs/AllocatedPath.cxx
+++ b/src/fs/AllocatedPath.cxx
@@ -45,7 +45,7 @@ AllocatedPath::~AllocatedPath() {}
AllocatedPath
AllocatedPath::FromUTF8(const char *path_utf8)
{
-#ifdef HAVE_GLIB
+#ifdef HAVE_FS_CHARSET
char *path = ::PathFromUTF8(path_utf8);
if (path == nullptr)
return AllocatedPath::Null();
diff --git a/src/fs/Charset.cxx b/src/fs/Charset.cxx
index 113f04cc8..9471d97f8 100644
--- a/src/fs/Charset.cxx
+++ b/src/fs/Charset.cxx
@@ -91,7 +91,7 @@ SetFSCharset(const char *charset, Error &error)
const char *
GetFSCharset()
{
-#ifdef HAVE_GLIB
+#ifdef HAVE_FS_CHARSET
return fs_charset.empty() ? "UTF-8" : fs_charset.c_str();
#else
return "UTF-8";
diff --git a/src/fs/Charset.hxx b/src/fs/Charset.hxx
index 5a24e8d4b..102fa2536 100644
--- a/src/fs/Charset.hxx
+++ b/src/fs/Charset.hxx
@@ -25,6 +25,10 @@
#include <string>
+#ifdef HAVE_GLIB
+#define HAVE_FS_CHARSET
+#endif
+
class Error;
/**
diff --git a/src/fs/Config.cxx b/src/fs/Config.cxx
index cf789fcb7..972365289 100644
--- a/src/fs/Config.cxx
+++ b/src/fs/Config.cxx
@@ -32,7 +32,7 @@
bool
ConfigureFS(Error &error)
{
-#ifdef HAVE_GLIB
+#ifdef HAVE_FS_CHARSET
const char *charset = nullptr;
charset = config_get_string(CONF_FS_CHARSET, nullptr);