This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[patch] Avoid multiple symbols from locale_charset (revised)


The following patch implements Bruno Haible's <bruno@clisp.org>
recommendation on how to properly eliminate the duplicate 
symbols for locale_charset on Darwin...

>If you really want to get rid of the warning, IMO the way to go is to
>rename locale_charset to gcc_locale_charset in all files (at least
>dcigettext.c and localcharset.c, maybe more).

The libintl 0.12.1 we have has local_charset used in
the following files but not dcigettext.c. This patch
has been tested on powerpc-apple-darwin8 without
regressions. Okay for trunk.
               Jack

2006-09-23  Jack Howarth  <howarth@bromo.med.uc.edu>

        * intl/localecharset.c (get_charset_aliases)
        Rename locale_charset as gcc_locale_charset.
	* intl/localcharset.h Likewise.
	* intl/localename.c Likewise.
	* intl/loadmsgcat.c Likewise.

Index: intl/localcharset.c
===================================================================
--- intl/localcharset.c	(revision 117147)
+++ intl/localcharset.c	(working copy)
@@ -268,7 +268,7 @@ get_charset_aliases ()
 STATIC
 #endif
 const char *
-locale_charset ()
+gcc_locale_charset ()
 {
   const char *codeset;
   const char *aliases;
Index: intl/localcharset.h
===================================================================
--- intl/localcharset.h	(revision 117147)
+++ intl/localcharset.h	(working copy)
@@ -31,7 +31,7 @@ extern "C" {
    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 * gcc_locale_charset (void);
 
 
 #ifdef __cplusplus
Index: intl/localename.c
===================================================================
--- intl/localename.c	(revision 117147)
+++ intl/localename.c	(working copy)
@@ -376,7 +376,7 @@
 
 /* Determine the current locale's name, and canonicalize it into XPG syntax
      language[_territory[.codeset]][@modifier]
-   The codeset part in the result is not reliable; the locale_charset()
+   The codeset part in the result is not reliable; the gcc_locale_charset()
    should be used for codeset information instead.
    The result must not be freed; it is statically allocated.  */
 
Index: intl/loadmsgcat.c
===================================================================
--- intl/loadmsgcat.c	(revision 117147)
+++ intl/loadmsgcat.c	(working copy)
@@ -829,8 +829,8 @@ _nl_init_domain_conv (domain_file, domai
 		  outcharset = _NL_CURRENT (LC_CTYPE, CODESET);
 # else
 #  if HAVE_ICONV
-		  extern const char *locale_charset PARAMS ((void));
-		  outcharset = locale_charset ();
+		  extern const char *gcc_locale_charset PARAMS ((void));
+		  outcharset = gcc_locale_charset ();
 #  endif
 # endif
 		}


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]