Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion eglib/configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ if test "x$have_iso_varargs" = "xyes"; then
fi
AC_SUBST(G_HAVE_ISO_VARARGS)

AC_CHECK_HEADERS(getopt.h sys/time.h sys/wait.h pwd.h langinfo.h iconv.h)
AC_CHECK_HEADERS(getopt.h sys/time.h sys/wait.h pwd.h iconv.h localcharset.h)

if test $ac_cv_sizeof_void_p != $ac_cv_sizeof_int; then
GPOINTER_TO_INT="((gint)(long) (ptr))"
Expand Down
7 changes: 5 additions & 2 deletions eglib/src/gunicode.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@
# ifdef HAVE_ICONV_H
# include <iconv.h>
# endif
# ifdef HAVE_LOCALCHARSET_H
# include <localcharset.h>
# endif
#endif

static char *my_charset;
Expand Down Expand Up @@ -305,8 +308,8 @@ g_get_charset (G_CONST_RETURN char **charset)
#else
if (my_charset == NULL){
/* These shouldn't be heap allocated */
#if HAVE_LANGINFO_H
my_charset = nl_langinfo (CODESET);
#if HAVE_LOCALCHARSET_H
my_charset = locale_charset ();
#else
my_charset = "UTF-8";
#endif
Expand Down