Commit 125daea1 authored by Max Kellermann's avatar Max Kellermann

fs/Charset: add macro HAVE_FS_CHARSET

parent fd2c6b8a
......@@ -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();
......
......@@ -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";
......
......@@ -25,6 +25,10 @@
#include <string>
#ifdef HAVE_GLIB
#define HAVE_FS_CHARSET
#endif
class Error;
/**
......
......@@ -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);
......
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