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