summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorOndrej Holy <oholy@redhat.com>2014-03-20 16:44:44 +0100
committerOndrej Holy <oholy@redhat.com>2014-03-27 13:55:33 +0100
commita77cdbac08ca1ff17aeba2323a610a61101387db (patch)
tree8cc463e5f70a8c93bcf6458380caedd54cf36ad3 /common
parent58b39924ccbcfb2809186432dc1c63a3d040bab5 (diff)
downloadgvfs-a77cdbac08ca1ff17aeba2323a610a61101387db.tar.gz
common: use nl_langinfo constants conditionally
The _NL_ADDRESS_LANG_TERM and _NL_ADDRESS_COUNTRY_AB3 aren't portable. https://bugzilla.gnome.org/show_bug.cgi?id=726707
Diffstat (limited to 'common')
-rw-r--r--common/gvfsmountinfo.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/common/gvfsmountinfo.c b/common/gvfsmountinfo.c
index 054af574..d206b918 100644
--- a/common/gvfsmountinfo.c
+++ b/common/gvfsmountinfo.c
@@ -429,15 +429,19 @@ GIcon *g_vfs_mount_info_query_xdg_volume_info_finish (GFile *directory,
static const char *
get_iso_639_3_for_locale (void)
{
- const char *lang;
+ const char *lang = NULL;
+#ifdef HAVE_NL_ADDRESS_LANG_TERM
lang = nl_langinfo (_NL_ADDRESS_LANG_TERM);
if (lang == NULL || *lang == '\0')
{
+#ifdef HAVE_NL_ADDRESS_COUNTRY_AB3
lang = nl_langinfo (_NL_ADDRESS_COUNTRY_AB3);
if (lang == NULL || *lang == '\0')
+#endif
return NULL;
}
+#endif
return lang;
}