glib/glib/libcharset/libcharset-glib.patch
Behdad Esfahbod 64e1b6d84f Bug 501651 – Update glib/libcharset
2008-05-20  Behdad Esfahbod  <behdad@gnome.org>

        Bug 501651 – Update glib/libcharset

        * configure.in:
        * glib/libcharset/Makefile.am:
        * glib/libcharset/README:
        * glib/libcharset/codeset.m4:
        * glib/libcharset/config.charset:
        * glib/libcharset/glibc21.m4:
        * glib/libcharset/libcharset-glib.patch:
        * glib/libcharset/libcharset.h:
        * glib/libcharset/localcharset.c (_g_locale_get_charset_aliases),
        (_g_locale_charset_raw):
        * glib/libcharset/localcharset.h:
        * glib/libcharset/make-patch.sh:
        * glib/libcharset/ref-add.sin:
        * glib/libcharset/ref-del.sin:
        * glib/libcharset/update.sh:
        Update libcharset to the one shipped with libiconv-0.12.


svn path=/trunk/; revision=6921
2008-05-20 22:49:16 +00:00

78 lines
2.1 KiB
Diff

# Patch against libcharset version 1.4
--- libiconv-1.12/libcharset//lib/localcharset.c 2006-10-18 07:55:49.000000000 -0400
+++ localcharset.c 2008-05-20 18:36:24.000000000 -0400
@@ -103,8 +103,8 @@
static const char * volatile charset_aliases;
/* Return a pointer to the contents of the charset.alias file. */
-static const char *
-get_charset_aliases (void)
+const char *
+_g_locale_get_charset_aliases (void)
{
const char *cp;
@@ -280,14 +280,10 @@
If the canonical name cannot be determined, the result is a non-canonical
name. */
-#ifdef STATIC
-STATIC
-#endif
const char *
-locale_charset (void)
+_g_locale_charset_raw (void)
{
const char *codeset;
- const char *aliases;
#if !(defined WIN32_NATIVE || defined OS2)
@@ -436,12 +432,20 @@
#endif
+ return codeset;
+}
+
+const char *
+_g_locale_charset_unalias (const char *codeset)
+{
+ const char *aliases;
+
if (codeset == NULL)
/* The canonical name cannot be determined. */
codeset = "";
/* Resolve alias. */
- for (aliases = get_charset_aliases ();
+ for (aliases = _g_locale_get_charset_aliases ();
*aliases != '\0';
aliases += strlen (aliases) + 1, aliases += strlen (aliases) + 1)
if (strcmp (codeset, aliases) == 0
--- libiconv-1.12/libcharset//include/libcharset.h.in 2005-05-19 13:14:56.000000000 -0400
+++ libcharset.h 2008-05-20 18:39:44.000000000 -0400
@@ -19,7 +19,7 @@
#ifndef _LIBCHARSET_H
#define _LIBCHARSET_H
-#include <localcharset.h>
+#include "localcharset.h"
#ifdef __cplusplus
--- libiconv-1.12/libcharset//include/localcharset.h.in 2005-05-19 13:14:57.000000000 -0400
+++ localcharset.h 2008-05-20 18:36:24.000000000 -0400
@@ -31,8 +31,9 @@
The result must not be freed; it is statically allocated.
If the canonical name cannot be determined, the result is a non-canonical
name. */
-extern const char * locale_charset (void);
-
+extern const char * _g_locale_charset_raw (void);
+extern const char * _g_locale_charset_unalias (const char *codeset);
+extern const char * _g_locale_get_charset_aliases (void);
#ifdef __cplusplus
}