Submitted By: Matthew Burgess <matthew@linuxfromscratch.org>
Date: 2005-07-15
Initial Package Version: 2.3.5
Upstream Status: From Upstream
Origin: Ryan Oliver, courtesy of Dan Kegel's crosstool
        (http://kegel.com/crosstool/)
Description: Fixes a compilation problem with gcc-4.0.x that results in:
             ../string/strcoll.c:39: error: '__EI_strcoll' aliased to undefined
             symbol '__GI_strcoll'

diff -Naur glibc-2.3.5.orig/include/wchar.h glibc-2.3.5/include/wchar.h
--- glibc-2.3.5.orig/include/wchar.h	2004-03-14 20:45:10.000000000 +0000
+++ glibc-2.3.5/include/wchar.h	2005-07-15 18:17:51.206515632 +0000
@@ -56,7 +56,6 @@
 extern int __wcsncasecmp (__const wchar_t *__s1, __const wchar_t *__s2,
 			  size_t __n)
      __attribute_pure__;
-extern int __wcscoll (__const wchar_t *__s1, __const wchar_t *__s2);
 extern size_t __wcslen (__const wchar_t *__s) __attribute_pure__;
 extern size_t __wcsnlen (__const wchar_t *__s, size_t __maxlen)
      __attribute_pure__;
diff -Naur glibc-2.3.5.orig/string/strcoll.c glibc-2.3.5/string/strcoll.c
--- glibc-2.3.5.orig/string/strcoll.c	2004-03-14 20:51:30.000000000 +0000
+++ glibc-2.3.5/string/strcoll.c	2005-07-15 18:17:51.205515784 +0000
@@ -23,6 +23,7 @@
 # define STRING_TYPE char
 # define STRCOLL strcoll
 # define STRCOLL_L __strcoll_l
+# define USE_HIDDEN_DEF
 #endif
 
 #include "../locale/localeinfo.h"
@@ -35,6 +36,7 @@
 {
   return STRCOLL_L (s1, s2, _NL_CURRENT_LOCALE);
 }
-#if !defined WIDE_CHAR_VERSION
-libc_hidden_def (strcoll)
+
+#ifdef USE_HIDDEN_DEF
+libc_hidden_def (STRCOLL)
 #endif
diff -Naur glibc-2.3.5.orig/wcsmbs/wcscoll.c glibc-2.3.5/wcsmbs/wcscoll.c
--- glibc-2.3.5.orig/wcsmbs/wcscoll.c	2004-03-14 21:05:48.000000000 +0000
+++ glibc-2.3.5/wcsmbs/wcscoll.c	2005-07-15 18:17:51.206515632 +0000
@@ -22,12 +22,11 @@
 
 #define STRING_TYPE wchar_t
 #define USTRING_TYPE wint_t
-#define STRCOLL __wcscoll
+#define STRCOLL wcscoll
 #define STRCOLL_L __wcscoll_l
 
 #include "../string/strcoll.c"
 
 #ifndef USE_IN_EXTENDED_LOCALE_MODEL
-weak_alias (__wcscoll, wcscoll)
 libc_hidden_weak (wcscoll)
 #endif
