From 125daea16a92af46b0e68c9583511a5f25f4d850 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sat, 29 Nov 2014 23:35:49 +0100 Subject: fs/Charset: add macro HAVE_FS_CHARSET --- src/fs/AllocatedPath.cxx | 2 +- src/fs/Charset.cxx | 2 +- src/fs/Charset.hxx | 4 ++++ src/fs/Config.cxx | 2 +- 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 +#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); -- cgit v1.2.3