OpenSDE Packages Database (without history before r20070)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

229 lines
8.2 KiB

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