1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/patches/gcc/4.3.1/550-203-uclibc-locale-no__x.patch Wed Jun 25 08:34:47 2008 +0000
1.3 @@ -0,0 +1,224 @@
1.4 +Original patch from gentoo: gentoo/src/patchsets/gcc/4.3.1/uclibc/90_all_203-uclibc-locale-no__x.patch
1.5 +diff -durN gcc-4.3.1.orig/libstdc++-v3/config/locale/uclibc/c++locale_internal.h gcc-4.3.1/libstdc++-v3/config/locale/uclibc/c++locale_internal.h
1.6 +--- gcc-4.3.1.orig/libstdc++-v3/config/locale/uclibc/c++locale_internal.h 2008-06-10 14:58:43.000000000 +0200
1.7 ++++ gcc-4.3.1/libstdc++-v3/config/locale/uclibc/c++locale_internal.h 2008-06-10 14:58:43.000000000 +0200
1.8 +@@ -60,4 +60,49 @@
1.9 + extern "C" __typeof(wctype_l) __wctype_l;
1.10 + #endif
1.11 +
1.12 ++# define __nl_langinfo_l nl_langinfo_l
1.13 ++# define __strcoll_l strcoll_l
1.14 ++# define __strftime_l strftime_l
1.15 ++# define __strtod_l strtod_l
1.16 ++# define __strtof_l strtof_l
1.17 ++# define __strtold_l strtold_l
1.18 ++# define __strxfrm_l strxfrm_l
1.19 ++# define __newlocale newlocale
1.20 ++# define __freelocale freelocale
1.21 ++# define __duplocale duplocale
1.22 ++# define __uselocale uselocale
1.23 ++
1.24 ++# ifdef _GLIBCXX_USE_WCHAR_T
1.25 ++# define __iswctype_l iswctype_l
1.26 ++# define __towlower_l towlower_l
1.27 ++# define __towupper_l towupper_l
1.28 ++# define __wcscoll_l wcscoll_l
1.29 ++# define __wcsftime_l wcsftime_l
1.30 ++# define __wcsxfrm_l wcsxfrm_l
1.31 ++# define __wctype_l wctype_l
1.32 ++# endif
1.33 ++
1.34 ++#else
1.35 ++# define __nl_langinfo_l(N, L) nl_langinfo((N))
1.36 ++# define __strcoll_l(S1, S2, L) strcoll((S1), (S2))
1.37 ++# define __strtod_l(S, E, L) strtod((S), (E))
1.38 ++# define __strtof_l(S, E, L) strtof((S), (E))
1.39 ++# define __strtold_l(S, E, L) strtold((S), (E))
1.40 ++# define __strxfrm_l(S1, S2, N, L) strxfrm((S1), (S2), (N))
1.41 ++# warning should dummy __newlocale check for C|POSIX ?
1.42 ++# define __newlocale(a, b, c) NULL
1.43 ++# define __freelocale(a) ((void)0)
1.44 ++# define __duplocale(a) __c_locale()
1.45 ++//# define __uselocale ?
1.46 ++//
1.47 ++# ifdef _GLIBCXX_USE_WCHAR_T
1.48 ++# define __iswctype_l(C, M, L) iswctype((C), (M))
1.49 ++# define __towlower_l(C, L) towlower((C))
1.50 ++# define __towupper_l(C, L) towupper((C))
1.51 ++# define __wcscoll_l(S1, S2, L) wcscoll((S1), (S2))
1.52 ++//# define __wcsftime_l(S, M, F, T, L) wcsftime((S), (M), (F), (T))
1.53 ++# define __wcsxfrm_l(S1, S2, N, L) wcsxfrm((S1), (S2), (N))
1.54 ++# define __wctype_l(S, L) wctype((S))
1.55 ++# endif
1.56 ++
1.57 + #endif // GLIBC 2.3 and later
1.58 +diff -durN gcc-4.3.1.orig/libstdc++-v3/config/locale/uclibc/c_locale.cc gcc-4.3.1/libstdc++-v3/config/locale/uclibc/c_locale.cc
1.59 +--- gcc-4.3.1.orig/libstdc++-v3/config/locale/uclibc/c_locale.cc 2008-06-10 14:58:43.000000000 +0200
1.60 ++++ gcc-4.3.1/libstdc++-v3/config/locale/uclibc/c_locale.cc 2008-06-10 14:58:43.000000000 +0200
1.61 +@@ -39,20 +39,6 @@
1.62 + #include <langinfo.h>
1.63 + #include <bits/c++locale_internal.h>
1.64 +
1.65 +-#ifndef __UCLIBC_HAS_XLOCALE__
1.66 +-#define __strtol_l(S, E, B, L) strtol((S), (E), (B))
1.67 +-#define __strtoul_l(S, E, B, L) strtoul((S), (E), (B))
1.68 +-#define __strtoll_l(S, E, B, L) strtoll((S), (E), (B))
1.69 +-#define __strtoull_l(S, E, B, L) strtoull((S), (E), (B))
1.70 +-#define __strtof_l(S, E, L) strtof((S), (E))
1.71 +-#define __strtod_l(S, E, L) strtod((S), (E))
1.72 +-#define __strtold_l(S, E, L) strtold((S), (E))
1.73 +-#warning should dummy __newlocale check for C|POSIX ?
1.74 +-#define __newlocale(a, b, c) NULL
1.75 +-#define __freelocale(a) ((void)0)
1.76 +-#define __duplocale(a) __c_locale()
1.77 +-#endif
1.78 +-
1.79 + namespace std
1.80 + {
1.81 + template<>
1.82 +diff -durN gcc-4.3.1.orig/libstdc++-v3/config/locale/uclibc/c_locale.h gcc-4.3.1/libstdc++-v3/config/locale/uclibc/c_locale.h
1.83 +--- gcc-4.3.1.orig/libstdc++-v3/config/locale/uclibc/c_locale.h 2008-06-10 14:58:43.000000000 +0200
1.84 ++++ gcc-4.3.1/libstdc++-v3/config/locale/uclibc/c_locale.h 2008-06-10 14:58:43.000000000 +0200
1.85 +@@ -68,6 +68,7 @@
1.86 + {
1.87 + extern "C" __typeof(uselocale) __uselocale;
1.88 + }
1.89 ++#define __uselocale uselocale
1.90 + #endif
1.91 +
1.92 + namespace std
1.93 +diff -durN gcc-4.3.1.orig/libstdc++-v3/config/locale/uclibc/collate_members.cc gcc-4.3.1/libstdc++-v3/config/locale/uclibc/collate_members.cc
1.94 +--- gcc-4.3.1.orig/libstdc++-v3/config/locale/uclibc/collate_members.cc 2008-06-10 14:58:43.000000000 +0200
1.95 ++++ gcc-4.3.1/libstdc++-v3/config/locale/uclibc/collate_members.cc 2008-06-10 14:58:43.000000000 +0200
1.96 +@@ -36,13 +36,6 @@
1.97 + #include <locale>
1.98 + #include <bits/c++locale_internal.h>
1.99 +
1.100 +-#ifndef __UCLIBC_HAS_XLOCALE__
1.101 +-#define __strcoll_l(S1, S2, L) strcoll((S1), (S2))
1.102 +-#define __strxfrm_l(S1, S2, N, L) strxfrm((S1), (S2), (N))
1.103 +-#define __wcscoll_l(S1, S2, L) wcscoll((S1), (S2))
1.104 +-#define __wcsxfrm_l(S1, S2, N, L) wcsxfrm((S1), (S2), (N))
1.105 +-#endif
1.106 +-
1.107 + namespace std
1.108 + {
1.109 + // These are basically extensions to char_traits, and perhaps should
1.110 +diff -durN gcc-4.3.1.orig/libstdc++-v3/config/locale/uclibc/ctype_members.cc gcc-4.3.1/libstdc++-v3/config/locale/uclibc/ctype_members.cc
1.111 +--- gcc-4.3.1.orig/libstdc++-v3/config/locale/uclibc/ctype_members.cc 2008-06-10 14:58:43.000000000 +0200
1.112 ++++ gcc-4.3.1/libstdc++-v3/config/locale/uclibc/ctype_members.cc 2008-06-10 14:58:43.000000000 +0200
1.113 +@@ -38,13 +38,6 @@
1.114 + #undef _LIBC
1.115 + #include <bits/c++locale_internal.h>
1.116 +
1.117 +-#ifndef __UCLIBC_HAS_XLOCALE__
1.118 +-#define __wctype_l(S, L) wctype((S))
1.119 +-#define __towupper_l(C, L) towupper((C))
1.120 +-#define __towlower_l(C, L) towlower((C))
1.121 +-#define __iswctype_l(C, M, L) iswctype((C), (M))
1.122 +-#endif
1.123 +-
1.124 + namespace std
1.125 + {
1.126 + // NB: The other ctype<char> specializations are in src/locale.cc and
1.127 +diff -durN gcc-4.3.1.orig/libstdc++-v3/config/locale/uclibc/messages_members.cc gcc-4.3.1/libstdc++-v3/config/locale/uclibc/messages_members.cc
1.128 +--- gcc-4.3.1.orig/libstdc++-v3/config/locale/uclibc/messages_members.cc 2008-06-10 14:58:43.000000000 +0200
1.129 ++++ gcc-4.3.1/libstdc++-v3/config/locale/uclibc/messages_members.cc 2008-06-10 14:58:43.000000000 +0200
1.130 +@@ -39,13 +39,10 @@
1.131 + #ifdef __UCLIBC_MJN3_ONLY__
1.132 + #warning fix gettext stuff
1.133 + #endif
1.134 +-#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
1.135 +-extern "C" char *__dcgettext(const char *domainname,
1.136 +- const char *msgid, int category);
1.137 + #undef gettext
1.138 +-#define gettext(msgid) __dcgettext(NULL, msgid, LC_MESSAGES)
1.139 ++#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
1.140 ++#define gettext(msgid) dcgettext(NULL, msgid, LC_MESSAGES)
1.141 + #else
1.142 +-#undef gettext
1.143 + #define gettext(msgid) (msgid)
1.144 + #endif
1.145 +
1.146 +diff -durN gcc-4.3.1.orig/libstdc++-v3/config/locale/uclibc/messages_members.h gcc-4.3.1/libstdc++-v3/config/locale/uclibc/messages_members.h
1.147 +--- gcc-4.3.1.orig/libstdc++-v3/config/locale/uclibc/messages_members.h 2008-06-10 14:58:43.000000000 +0200
1.148 ++++ gcc-4.3.1/libstdc++-v3/config/locale/uclibc/messages_members.h 2008-06-10 14:58:43.000000000 +0200
1.149 +@@ -36,15 +36,11 @@
1.150 + #ifdef __UCLIBC_MJN3_ONLY__
1.151 + #warning fix prototypes for *textdomain funcs
1.152 + #endif
1.153 +-#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
1.154 +-extern "C" char *__textdomain(const char *domainname);
1.155 +-extern "C" char *__bindtextdomain(const char *domainname,
1.156 +- const char *dirname);
1.157 +-#else
1.158 +-#undef __textdomain
1.159 +-#undef __bindtextdomain
1.160 +-#define __textdomain(D) ((void)0)
1.161 +-#define __bindtextdomain(D,P) ((void)0)
1.162 ++#ifndef __UCLIBC_HAS_GETTEXT_AWARENESS__
1.163 ++#undef textdomain
1.164 ++#undef bindtextdomain
1.165 ++#define textdomain(D) ((void)0)
1.166 ++#define bindtextdomain(D,P) ((void)0)
1.167 + #endif
1.168 +
1.169 + // Non-virtual member functions.
1.170 +@@ -70,7 +66,7 @@
1.171 + messages<_CharT>::open(const basic_string<char>& __s, const locale& __loc,
1.172 + const char* __dir) const
1.173 + {
1.174 +- __bindtextdomain(__s.c_str(), __dir);
1.175 ++ bindtextdomain(__s.c_str(), __dir);
1.176 + return this->do_open(__s, __loc);
1.177 + }
1.178 +
1.179 +@@ -90,7 +86,7 @@
1.180 + {
1.181 + // No error checking is done, assume the catalog exists and can
1.182 + // be used.
1.183 +- __textdomain(__s.c_str());
1.184 ++ textdomain(__s.c_str());
1.185 + return 0;
1.186 + }
1.187 +
1.188 +diff -durN gcc-4.3.1.orig/libstdc++-v3/config/locale/uclibc/monetary_members.cc gcc-4.3.1/libstdc++-v3/config/locale/uclibc/monetary_members.cc
1.189 +--- gcc-4.3.1.orig/libstdc++-v3/config/locale/uclibc/monetary_members.cc 2008-06-10 14:58:43.000000000 +0200
1.190 ++++ gcc-4.3.1/libstdc++-v3/config/locale/uclibc/monetary_members.cc 2008-06-10 14:58:43.000000000 +0200
1.191 +@@ -43,10 +43,6 @@
1.192 + #warning tailor for stub locale support
1.193 + #endif
1.194 +
1.195 +-#ifndef __UCLIBC_HAS_XLOCALE__
1.196 +-#define __nl_langinfo_l(N, L) nl_langinfo((N))
1.197 +-#endif
1.198 +-
1.199 + namespace std
1.200 + {
1.201 + // Construct and return valid pattern consisting of some combination of:
1.202 +diff -durN gcc-4.3.1.orig/libstdc++-v3/config/locale/uclibc/numeric_members.cc gcc-4.3.1/libstdc++-v3/config/locale/uclibc/numeric_members.cc
1.203 +--- gcc-4.3.1.orig/libstdc++-v3/config/locale/uclibc/numeric_members.cc 2008-06-10 14:58:43.000000000 +0200
1.204 ++++ gcc-4.3.1/libstdc++-v3/config/locale/uclibc/numeric_members.cc 2008-06-10 14:58:43.000000000 +0200
1.205 +@@ -41,9 +41,6 @@
1.206 + #ifdef __UCLIBC_MJN3_ONLY__
1.207 + #warning tailor for stub locale support
1.208 + #endif
1.209 +-#ifndef __UCLIBC_HAS_XLOCALE__
1.210 +-#define __nl_langinfo_l(N, L) nl_langinfo((N))
1.211 +-#endif
1.212 +
1.213 + namespace std
1.214 + {
1.215 +diff -durN gcc-4.3.1.orig/libstdc++-v3/config/locale/uclibc/time_members.cc gcc-4.3.1/libstdc++-v3/config/locale/uclibc/time_members.cc
1.216 +--- gcc-4.3.1.orig/libstdc++-v3/config/locale/uclibc/time_members.cc 2008-06-10 14:58:43.000000000 +0200
1.217 ++++ gcc-4.3.1/libstdc++-v3/config/locale/uclibc/time_members.cc 2008-06-10 14:58:43.000000000 +0200
1.218 +@@ -40,9 +40,6 @@
1.219 + #ifdef __UCLIBC_MJN3_ONLY__
1.220 + #warning tailor for stub locale support
1.221 + #endif
1.222 +-#ifndef __UCLIBC_HAS_XLOCALE__
1.223 +-#define __nl_langinfo_l(N, L) nl_langinfo((N))
1.224 +-#endif
1.225 +
1.226 + namespace std
1.227 + {