Commit d1bcdea7 authored by Tim-Philipp Müller's avatar Tim-Philipp Müller
Browse files

pbutils: don't assume LC_MESSAGES is always defined, also check for ENABLE_NLS

Should fix build with mingw32 build bot again.
parent cd758cdb
......@@ -412,9 +412,23 @@ serialize_stream_profiles (GKeyFile * out, GstEncodingProfile * sprof,
static gchar *
get_locale (void)
const char *loc = setlocale (LC_MESSAGES, NULL);
const char *loc = NULL;
gchar *ret;
#if defined(LC_MESSAGES)
loc = setlocale (LC_MESSAGES, NULL);
#elif defined(LC_ALL)
loc = setlocale (LC_ALL, NULL);
GST_LOG ("LC_ALL: %s", GST_STR_NULL (loc));
GST_LOG ("Neither LC_ALL nor LC_MESSAGES defined");
#else /* !ENABLE_NLS */
GST_LOG ("i18n disabled");
if (loc == NULL || g_ascii_strncasecmp (loc, "en", 2) == 0)
return NULL;
Supports Markdown
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