203-uclibc-locale-no__x.patch 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213
  1. --- gcc/libstdc++-v3/config/locale/uclibc/c++locale_internal.h.uclibc200no__x~ 2006-03-10 15:06:17 +0100
  2. +++ gcc/libstdc++-v3/config/locale/uclibc/c++locale_internal.h 2006-03-10 15:32:37 +0100
  3. @@ -60,4 +60,49 @@
  4. extern "C" __typeof(wctype_l) __wctype_l;
  5. #endif
  6. +# define __nl_langinfo_l nl_langinfo_l
  7. +# define __strcoll_l strcoll_l
  8. +# define __strftime_l strftime_l
  9. +# define __strtod_l strtod_l
  10. +# define __strtof_l strtof_l
  11. +# define __strtold_l strtold_l
  12. +# define __strxfrm_l strxfrm_l
  13. +# define __newlocale newlocale
  14. +# define __freelocale freelocale
  15. +# define __duplocale duplocale
  16. +# define __uselocale uselocale
  17. +
  18. +# ifdef _GLIBCXX_USE_WCHAR_T
  19. +# define __iswctype_l iswctype_l
  20. +# define __towlower_l towlower_l
  21. +# define __towupper_l towupper_l
  22. +# define __wcscoll_l wcscoll_l
  23. +# define __wcsftime_l wcsftime_l
  24. +# define __wcsxfrm_l wcsxfrm_l
  25. +# define __wctype_l wctype_l
  26. +# endif
  27. +
  28. +#else
  29. +# define __nl_langinfo_l(N, L) nl_langinfo((N))
  30. +# define __strcoll_l(S1, S2, L) strcoll((S1), (S2))
  31. +# define __strtod_l(S, E, L) strtod((S), (E))
  32. +# define __strtof_l(S, E, L) strtof((S), (E))
  33. +# define __strtold_l(S, E, L) strtold((S), (E))
  34. +# define __strxfrm_l(S1, S2, N, L) strxfrm((S1), (S2), (N))
  35. +# warning should dummy __newlocale check for C|POSIX ?
  36. +# define __newlocale(a, b, c) NULL
  37. +# define __freelocale(a) ((void)0)
  38. +# define __duplocale(a) __c_locale()
  39. +//# define __uselocale ?
  40. +//
  41. +# ifdef _GLIBCXX_USE_WCHAR_T
  42. +# define __iswctype_l(C, M, L) iswctype((C), (M))
  43. +# define __towlower_l(C, L) towlower((C))
  44. +# define __towupper_l(C, L) towupper((C))
  45. +# define __wcscoll_l(S1, S2, L) wcscoll((S1), (S2))
  46. +//# define __wcsftime_l(S, M, F, T, L) wcsftime((S), (M), (F), (T))
  47. +# define __wcsxfrm_l(S1, S2, N, L) wcsxfrm((S1), (S2), (N))
  48. +# define __wctype_l(S, L) wctype((S))
  49. +# endif
  50. +
  51. #endif // GLIBC 2.3 and later
  52. --- gcc/libstdc++-v3/config/locale/uclibc/c_locale.cc.uclibc200no__x~ 2006-03-10 15:06:17 +0100
  53. +++ gcc/libstdc++-v3/config/locale/uclibc/c_locale.cc 2006-03-10 15:32:37 +0100
  54. @@ -39,20 +39,6 @@
  55. #include <langinfo.h>
  56. #include <bits/c++locale_internal.h>
  57. -#ifndef __UCLIBC_HAS_XLOCALE__
  58. -#define __strtol_l(S, E, B, L) strtol((S), (E), (B))
  59. -#define __strtoul_l(S, E, B, L) strtoul((S), (E), (B))
  60. -#define __strtoll_l(S, E, B, L) strtoll((S), (E), (B))
  61. -#define __strtoull_l(S, E, B, L) strtoull((S), (E), (B))
  62. -#define __strtof_l(S, E, L) strtof((S), (E))
  63. -#define __strtod_l(S, E, L) strtod((S), (E))
  64. -#define __strtold_l(S, E, L) strtold((S), (E))
  65. -#warning should dummy __newlocale check for C|POSIX ?
  66. -#define __newlocale(a, b, c) NULL
  67. -#define __freelocale(a) ((void)0)
  68. -#define __duplocale(a) __c_locale()
  69. -#endif
  70. -
  71. namespace std
  72. {
  73. template<>
  74. --- gcc/libstdc++-v3/config/locale/uclibc/collate_members.cc.uclibc200no__x~ 2006-03-10 15:06:17 +0100
  75. +++ gcc/libstdc++-v3/config/locale/uclibc/collate_members.cc 2006-03-10 15:32:37 +0100
  76. @@ -36,13 +36,6 @@
  77. #include <locale>
  78. #include <bits/c++locale_internal.h>
  79. -#ifndef __UCLIBC_HAS_XLOCALE__
  80. -#define __strcoll_l(S1, S2, L) strcoll((S1), (S2))
  81. -#define __strxfrm_l(S1, S2, N, L) strxfrm((S1), (S2), (N))
  82. -#define __wcscoll_l(S1, S2, L) wcscoll((S1), (S2))
  83. -#define __wcsxfrm_l(S1, S2, N, L) wcsxfrm((S1), (S2), (N))
  84. -#endif
  85. -
  86. namespace std
  87. {
  88. // These are basically extensions to char_traits, and perhaps should
  89. --- gcc/libstdc++-v3/config/locale/uclibc/monetary_members.cc.uclibc200no__x~ 2006-03-10 15:06:17 +0100
  90. +++ gcc/libstdc++-v3/config/locale/uclibc/monetary_members.cc 2006-03-10 15:32:37 +0100
  91. @@ -43,10 +43,6 @@
  92. #warning tailor for stub locale support
  93. #endif
  94. -#ifndef __UCLIBC_HAS_XLOCALE__
  95. -#define __nl_langinfo_l(N, L) nl_langinfo((N))
  96. -#endif
  97. -
  98. namespace std
  99. {
  100. // Construct and return valid pattern consisting of some combination of:
  101. --- gcc/libstdc++-v3/config/locale/uclibc/numeric_members.cc.uclibc200no__x~ 2006-03-10 15:06:17 +0100
  102. +++ gcc/libstdc++-v3/config/locale/uclibc/numeric_members.cc 2006-03-10 15:32:37 +0100
  103. @@ -41,9 +41,6 @@
  104. #ifdef __UCLIBC_MJN3_ONLY__
  105. #warning tailor for stub locale support
  106. #endif
  107. -#ifndef __UCLIBC_HAS_XLOCALE__
  108. -#define __nl_langinfo_l(N, L) nl_langinfo((N))
  109. -#endif
  110. namespace std
  111. {
  112. --- gcc/libstdc++-v3/config/locale/uclibc/time_members.cc.uclibc200no__x~ 2006-03-10 15:06:17 +0100
  113. +++ gcc/libstdc++-v3/config/locale/uclibc/time_members.cc 2006-03-10 15:32:37 +0100
  114. @@ -40,9 +40,6 @@
  115. #ifdef __UCLIBC_MJN3_ONLY__
  116. #warning tailor for stub locale support
  117. #endif
  118. -#ifndef __UCLIBC_HAS_XLOCALE__
  119. -#define __nl_langinfo_l(N, L) nl_langinfo((N))
  120. -#endif
  121. namespace std
  122. {
  123. --- gcc/libstdc++-v3/config/locale/uclibc/ctype_members.cc.uclibc200no__x~ 2006-03-10 15:06:17 +0100
  124. +++ gcc/libstdc++-v3/config/locale/uclibc/ctype_members.cc 2006-03-10 15:32:37 +0100
  125. @@ -38,13 +38,6 @@
  126. #undef _LIBC
  127. #include <bits/c++locale_internal.h>
  128. -#ifndef __UCLIBC_HAS_XLOCALE__
  129. -#define __wctype_l(S, L) wctype((S))
  130. -#define __towupper_l(C, L) towupper((C))
  131. -#define __towlower_l(C, L) towlower((C))
  132. -#define __iswctype_l(C, M, L) iswctype((C), (M))
  133. -#endif
  134. -
  135. namespace std
  136. {
  137. // NB: The other ctype<char> specializations are in src/locale.cc and
  138. --- gcc/libstdc++-v3/config/locale/uclibc/messages_members.cc.uclibc200no__x~ 2006-03-10 15:06:17 +0100
  139. +++ gcc/libstdc++-v3/config/locale/uclibc/messages_members.cc 2006-03-10 15:32:37 +0100
  140. @@ -39,13 +39,10 @@
  141. #ifdef __UCLIBC_MJN3_ONLY__
  142. #warning fix gettext stuff
  143. #endif
  144. -#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
  145. -extern "C" char *__dcgettext(const char *domainname,
  146. - const char *msgid, int category);
  147. #undef gettext
  148. -#define gettext(msgid) __dcgettext(NULL, msgid, LC_MESSAGES)
  149. +#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
  150. +#define gettext(msgid) dcgettext(NULL, msgid, LC_MESSAGES)
  151. #else
  152. -#undef gettext
  153. #define gettext(msgid) (msgid)
  154. #endif
  155. --- gcc/libstdc++-v3/config/locale/uclibc/messages_members.h.uclibc200no__x~ 2006-03-10 15:06:17 +0100
  156. +++ gcc/libstdc++-v3/config/locale/uclibc/messages_members.h 2006-03-10 15:32:37 +0100
  157. @@ -36,15 +36,11 @@
  158. #ifdef __UCLIBC_MJN3_ONLY__
  159. #warning fix prototypes for *textdomain funcs
  160. #endif
  161. -#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
  162. -extern "C" char *__textdomain(const char *domainname);
  163. -extern "C" char *__bindtextdomain(const char *domainname,
  164. - const char *dirname);
  165. -#else
  166. -#undef __textdomain
  167. -#undef __bindtextdomain
  168. -#define __textdomain(D) ((void)0)
  169. -#define __bindtextdomain(D,P) ((void)0)
  170. +#ifndef __UCLIBC_HAS_GETTEXT_AWARENESS__
  171. +#undef textdomain
  172. +#undef bindtextdomain
  173. +#define textdomain(D) ((void)0)
  174. +#define bindtextdomain(D,P) ((void)0)
  175. #endif
  176. // Non-virtual member functions.
  177. @@ -70,7 +66,7 @@
  178. messages<_CharT>::open(const basic_string<char>& __s, const locale& __loc,
  179. const char* __dir) const
  180. {
  181. - __bindtextdomain(__s.c_str(), __dir);
  182. + bindtextdomain(__s.c_str(), __dir);
  183. return this->do_open(__s, __loc);
  184. }
  185. @@ -90,7 +86,7 @@
  186. {
  187. // No error checking is done, assume the catalog exists and can
  188. // be used.
  189. - __textdomain(__s.c_str());
  190. + textdomain(__s.c_str());
  191. return 0;
  192. }
  193. --- gcc/libstdc++-v3/config/locale/uclibc/c_locale.h.uclibc200no__x~ 2006-03-10 15:06:17 +0100
  194. +++ gcc/libstdc++-v3/config/locale/uclibc/c_locale.h 2006-03-10 15:32:37 +0100
  195. @@ -68,6 +68,7 @@
  196. {
  197. extern "C" __typeof(uselocale) __uselocale;
  198. }
  199. +#define __uselocale uselocale
  200. #endif
  201. namespace std