Merge pull request #1870 from saper/langinfo_h
authorRodrigo Kumpera <kumpera@gmail.com>
Mon, 17 Aug 2015 13:39:49 +0000 (09:39 -0400)
committerRodrigo Kumpera <kumpera@gmail.com>
Mon, 17 Aug 2015 13:39:49 +0000 (09:39 -0400)
[eglib] Prefer <langinfo.h> to <localcharset.h>

eglib/src/gunicode.c

index c3a9000f8d225839522e6dfad8a9d8d4e08f82a1..e6f4b925b61c0eeb2b063a5c686ca7941fd0d0d5 100644 (file)
@@ -219,10 +219,10 @@ g_get_charset (G_CONST_RETURN char **charset)
                is_utf8 = FALSE;
 #else
                /* These shouldn't be heap allocated */
-#if HAVE_LOCALCHARSET_H
-               my_charset = locale_charset ();
-#elif defined(HAVE_LANGINFO_H)
+#if defined(HAVE_LANGINFO_H)
                my_charset = nl_langinfo (CODESET);
+#elif defined(HAVE_LOCALCHARSET_H)
+               my_charset = locale_charset ();
 #else
                my_charset = "UTF-8";
 #endif