Blob Blame History Raw
# 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
 }