Commit 6987f2ba authored by Max Kellermann's avatar Max Kellermann

fs/Charset: use macro HAVE_FS_CHARSET internally

parent 563db580
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
#include <assert.h> #include <assert.h>
#include <string.h> #include <string.h>
#ifdef HAVE_GLIB #ifdef HAVE_FS_CHARSET
static constexpr Domain convert_domain("convert"); static constexpr Domain convert_domain("convert");
...@@ -121,13 +121,13 @@ PathToUTF8(const char *path_fs) ...@@ -121,13 +121,13 @@ PathToUTF8(const char *path_fs)
{ {
assert(path_fs != nullptr); assert(path_fs != nullptr);
#ifdef HAVE_GLIB #ifdef HAVE_FS_CHARSET
if (fs_charset.empty()) { if (fs_charset.empty()) {
#endif #endif
auto result = std::string(path_fs); auto result = std::string(path_fs);
FixSeparators(result); FixSeparators(result);
return result; return result;
#ifdef HAVE_GLIB #ifdef HAVE_FS_CHARSET
} }
GIConv conv = g_iconv_open("utf-8", fs_charset.c_str()); GIConv conv = g_iconv_open("utf-8", fs_charset.c_str());
...@@ -155,7 +155,7 @@ PathToUTF8(const char *path_fs) ...@@ -155,7 +155,7 @@ PathToUTF8(const char *path_fs)
#endif #endif
} }
#ifdef HAVE_GLIB #ifdef HAVE_FS_CHARSET
char * char *
PathFromUTF8(const char *path_utf8) PathFromUTF8(const char *path_utf8)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment