Reinstate LIBCHARSET_ALIAS_DIR support which got lost at some point.

2004-04-23  Matthias Clasen  <mclasen@redhat.com>

	* glib/libcharset/localcharset.c (_g_locale_get_charset_aliases):
	Reinstate LIBCHARSET_ALIAS_DIR support which got lost at some
	point.  (#139134, Piotr Klaban)
This commit is contained in:
Matthias Clasen 2004-04-23 14:47:44 +00:00 committed by Matthias Clasen
parent b26e8861c1
commit f5eb6acc72
9 changed files with 43 additions and 1 deletions

View File

@ -1,5 +1,9 @@
2004-04-23 Matthias Clasen <mclasen@redhat.com>
* glib/libcharset/localcharset.c (_g_locale_get_charset_aliases):
Reinstate LIBCHARSET_ALIAS_DIR support which got lost at some
point. (#139134, Piotr Klaban)
* glib/gconvert.c (open_converter): Don't call g_strerror() here,
since it can lead to infinite recursion. (#139133, Piotr Klaban)

View File

@ -1,5 +1,9 @@
2004-04-23 Matthias Clasen <mclasen@redhat.com>
* glib/libcharset/localcharset.c (_g_locale_get_charset_aliases):
Reinstate LIBCHARSET_ALIAS_DIR support which got lost at some
point. (#139134, Piotr Klaban)
* glib/gconvert.c (open_converter): Don't call g_strerror() here,
since it can lead to infinite recursion. (#139133, Piotr Klaban)

View File

@ -1,5 +1,9 @@
2004-04-23 Matthias Clasen <mclasen@redhat.com>
* glib/libcharset/localcharset.c (_g_locale_get_charset_aliases):
Reinstate LIBCHARSET_ALIAS_DIR support which got lost at some
point. (#139134, Piotr Klaban)
* glib/gconvert.c (open_converter): Don't call g_strerror() here,
since it can lead to infinite recursion. (#139133, Piotr Klaban)

View File

@ -1,5 +1,9 @@
2004-04-23 Matthias Clasen <mclasen@redhat.com>
* glib/libcharset/localcharset.c (_g_locale_get_charset_aliases):
Reinstate LIBCHARSET_ALIAS_DIR support which got lost at some
point. (#139134, Piotr Klaban)
* glib/gconvert.c (open_converter): Don't call g_strerror() here,
since it can lead to infinite recursion. (#139133, Piotr Klaban)

View File

@ -1,5 +1,9 @@
2004-04-23 Matthias Clasen <mclasen@redhat.com>
* glib/libcharset/localcharset.c (_g_locale_get_charset_aliases):
Reinstate LIBCHARSET_ALIAS_DIR support which got lost at some
point. (#139134, Piotr Klaban)
* glib/gconvert.c (open_converter): Don't call g_strerror() here,
since it can lead to infinite recursion. (#139133, Piotr Klaban)

View File

@ -1,5 +1,9 @@
2004-04-23 Matthias Clasen <mclasen@redhat.com>
* glib/libcharset/localcharset.c (_g_locale_get_charset_aliases):
Reinstate LIBCHARSET_ALIAS_DIR support which got lost at some
point. (#139134, Piotr Klaban)
* glib/gconvert.c (open_converter): Don't call g_strerror() here,
since it can lead to infinite recursion. (#139133, Piotr Klaban)

View File

@ -1,3 +1,7 @@
2004-04-23 Matthias Clasen <mclasen@redhat.com>
* glib/running.sgml: Document LIBCHARSET_ALIAS_DIR.
2004-04-15 Matthias Clasen <mclasen@redhat.com>
* glib/tmpl/types.sgml: Correct the description of the

View File

@ -86,6 +86,17 @@ variables like <envar>LANG</envar>, <envar>PATH</envar> or <envar>HOME</envar>.
</para>
</formalpara>
<formalpara>
<title><envar>LIBCHARSET_ALIAS_DIR</envar></title>
<para>
Allows to specify a nonstandard location for the
<filename>charset.aliases</filename> file that is used by the
character set conversion routines. The default location is the
<replaceable>libdir</replaceable> specified at compilation time.
</para>
</formalpara>
</refsect2>
<refsect2>

View File

@ -119,10 +119,13 @@ _g_locale_get_charset_aliases ()
{
#if !defined WIN32
FILE *fp;
const char *dir = LIBDIR;
const char *dir = getenv ("LIBCHARSET_ALIAS_DIR");
const char *base = "charset.alias";
char *file_name;
if (dir == NULL)
dir = LIBDIR;
/* Concatenate dir and base into freshly allocated file_name. */
{
size_t dir_len = strlen (dir);