patches/gcc/4.2.0/130-uclibc-locale-no__x.patch
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Mon Feb 02 22:00:18 2009 +0000 (2009-02-02)
changeset 1201 c9967a6e3b25
parent 111 2e16b9fc302d
permissions -rw-r--r--
Add a patchset for glibc 2_9. Vampirised from the gentoo repository.

/trunk/patches/glibc/2_9/500-ppc-glibc-2.9-atomic.patch | 414 414 0 0 ++++++++++
/trunk/patches/glibc/2_9/140-regex-BZ9697.patch | 111 111 0 0 +++
/trunk/patches/glibc/2_9/190-queue-header-updates.patch | 89 89 0 0 ++
/trunk/patches/glibc/2_9/370-hppa_glibc-2.7-hppa-nptl-carlos.patch | 249 249 0 0 ++++++
/trunk/patches/glibc/2_9/450-alpha-glibc-2.5-no-page-header.patch | 32 32 0 0 +
/trunk/patches/glibc/2_9/270-ldbl-nexttowardf.patch | 68 68 0 0 ++
/trunk/patches/glibc/2_9/330-2.3.3-china.patch | 35 35 0 0 +
/trunk/patches/glibc/2_9/340-new-valencian-locale.patch | 120 120 0 0 +++
/trunk/patches/glibc/2_9/410-2.9-fnmatch.patch | 64 64 0 0 ++
/trunk/patches/glibc/2_9/350-2.4-undefine-__i686.patch | 47 47 0 0 +
/trunk/patches/glibc/2_9/160-i386-x86_64-revert-clone-cfi.patch | 53 53 0 0 +
/trunk/patches/glibc/2_9/420-dont-build-timezone.patch | 19 19 0 0 +
/trunk/patches/glibc/2_9/150-regex-BZ697.patch | 28 28 0 0 +
/trunk/patches/glibc/2_9/290-no-inline-gmon.patch | 38 38 0 0 +
/trunk/patches/glibc/2_9/280-section-comments.patch | 29 29 0 0 +
/trunk/patches/glibc/2_9/180-math-tests.patch | 72 72 0 0 ++
/trunk/patches/glibc/2_9/120-_nss_dns_gethostbyaddr2_r-check-and-adjust-the-buffer-alignment.patch | 35 35 0 0 +
/trunk/patches/glibc/2_9/250-resolv-dynamic.patch | 44 44 0 0 +
/trunk/patches/glibc/2_9/300-2.9-check_native-headers.patch | 22 22 0 0 +
/trunk/patches/glibc/2_9/310-2.3.6-fix-pr631.patch | 50 50 0 0 +
/trunk/patches/glibc/2_9/130-add_prio-macros.patch | 26 26 0 0 +
/trunk/patches/glibc/2_9/260-fadvise64_64.patch | 30 30 0 0 +
/trunk/patches/glibc/2_9/440-alpha-glibc-2.4-xstat.patch | 249 249 0 0 ++++++
/trunk/patches/glibc/2_9/170-2.10-dns-no-gethostbyname4.patch | 35 35 0 0 +
/trunk/patches/glibc/2_9/230-2.3.3-localedef-fix-trampoline.patch | 74 74 0 0 ++
/trunk/patches/glibc/2_9/360-2.8-nscd-one-fork.patch | 45 45 0 0 +
/trunk/patches/glibc/2_9/480-alpha-glibc-2.8-cache-shape.patch | 18 18 0 0 +
/trunk/patches/glibc/2_9/210-2.9-strlen-hack.patch | 109 109 0 0 +++
/trunk/patches/glibc/2_9/320-2.9-assume-pipe2.patch | 59 59 0 0 +
/trunk/patches/glibc/2_9/100-ssp-compat.patch | 193 193 0 0 +++++
/trunk/patches/glibc/2_9/110-respect-env-CPPFLAGS.patch | 30 30 0 0 +
/trunk/patches/glibc/2_9/220-manual-no-perl.patch | 29 29 0 0 +
/trunk/patches/glibc/2_9/390-2.3.3_pre20040117-pt_pax.patch | 35 35 0 0 +
/trunk/patches/glibc/2_9/460-alpha-glibc-2.5-no-asm-elf-header.patch | 38 38 0 0 +
/trunk/patches/glibc/2_9/400-tests-sandbox-libdl-paths.patch | 198 198 0 0 +++++
/trunk/patches/glibc/2_9/240-i386-LOAD_PIC_REG.patch | 23 23 0 0 +
/trunk/patches/glibc/2_9/200-awk-in-C-locale.patch | 23 23 0 0 +
/trunk/patches/glibc/2_9/430-2.7-cross-compile-nptl.patch | 57 57 0 0 +
/trunk/patches/glibc/2_9/380-2.3.6-dl_execstack-PaX-support.patch | 71 71 0 0 ++
/trunk/patches/glibc/2_9/490-ptr-mangling.patch | 114 114 0 0 +++
/trunk/patches/glibc/2_9/470-alpha-glibc-2.8-creat.patch | 19 19 0 0 +
41 files changed, 3094 insertions(+)
     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  
     7 +# define __nl_langinfo_l nl_langinfo_l
     8 +# define __strcoll_l strcoll_l
     9 +# define __strftime_l strftime_l
    10 +# define __strtod_l strtod_l
    11 +# define __strtof_l strtof_l
    12 +# define __strtold_l strtold_l
    13 +# define __strxfrm_l strxfrm_l
    14 +# define __newlocale newlocale
    15 +# define __freelocale freelocale
    16 +# define __duplocale duplocale
    17 +# define __uselocale uselocale
    18 +
    19 +# ifdef _GLIBCXX_USE_WCHAR_T
    20 +#  define __iswctype_l iswctype_l
    21 +#  define __towlower_l towlower_l
    22 +#  define __towupper_l towupper_l
    23 +#  define __wcscoll_l wcscoll_l
    24 +#  define __wcsftime_l wcsftime_l
    25 +#  define __wcsxfrm_l wcsxfrm_l
    26 +#  define __wctype_l wctype_l
    27 +# endif
    28 +
    29 +#else
    30 +# define __nl_langinfo_l(N, L)       nl_langinfo((N))
    31 +# define __strcoll_l(S1, S2, L)      strcoll((S1), (S2))
    32 +# define __strtod_l(S, E, L)         strtod((S), (E))
    33 +# define __strtof_l(S, E, L)         strtof((S), (E))
    34 +# define __strtold_l(S, E, L)        strtold((S), (E))
    35 +# define __strxfrm_l(S1, S2, N, L)   strxfrm((S1), (S2), (N))
    36 +# warning should dummy __newlocale check for C|POSIX ?
    37 +# define __newlocale(a, b, c)        NULL
    38 +# define __freelocale(a)             ((void)0)
    39 +# define __duplocale(a)              __c_locale()
    40 +//# define __uselocale ?
    41 +//
    42 +# ifdef _GLIBCXX_USE_WCHAR_T
    43 +#  define __iswctype_l(C, M, L)       iswctype((C), (M))
    44 +#  define __towlower_l(C, L)          towlower((C))
    45 +#  define __towupper_l(C, L)          towupper((C))
    46 +#  define __wcscoll_l(S1, S2, L)      wcscoll((S1), (S2))
    47 +//#  define __wcsftime_l(S, M, F, T, L)  wcsftime((S), (M), (F), (T)) 
    48 +#  define __wcsxfrm_l(S1, S2, N, L)   wcsxfrm((S1), (S2), (N))
    49 +#  define __wctype_l(S, L)            wctype((S))
    50 +# endif
    51 +
    52  #endif // GLIBC 2.3 and later
    53 --- gcc/libstdc++-v3/config/locale/uclibc/c_locale.cc.uclibc200no__x~	2006-03-10 15:06:17 +0100
    54 +++ gcc/libstdc++-v3/config/locale/uclibc/c_locale.cc	2006-03-10 15:32:37 +0100
    55 @@ -39,20 +39,6 @@
    56  #include <langinfo.h>
    57  #include <bits/c++locale_internal.h>
    58  
    59 -#ifndef __UCLIBC_HAS_XLOCALE__
    60 -#define __strtol_l(S, E, B, L)      strtol((S), (E), (B))
    61 -#define __strtoul_l(S, E, B, L)     strtoul((S), (E), (B))
    62 -#define __strtoll_l(S, E, B, L)     strtoll((S), (E), (B))
    63 -#define __strtoull_l(S, E, B, L)    strtoull((S), (E), (B))
    64 -#define __strtof_l(S, E, L)         strtof((S), (E))
    65 -#define __strtod_l(S, E, L)         strtod((S), (E))
    66 -#define __strtold_l(S, E, L)        strtold((S), (E))
    67 -#warning should dummy __newlocale check for C|POSIX ?
    68 -#define __newlocale(a, b, c)        NULL
    69 -#define __freelocale(a)             ((void)0)
    70 -#define __duplocale(a)              __c_locale()
    71 -#endif
    72 -
    73  namespace std 
    74  {
    75    template<>
    76 --- gcc/libstdc++-v3/config/locale/uclibc/collate_members.cc.uclibc200no__x~	2006-03-10 15:06:17 +0100
    77 +++ gcc/libstdc++-v3/config/locale/uclibc/collate_members.cc	2006-03-10 15:32:37 +0100
    78 @@ -36,13 +36,6 @@
    79  #include <locale>
    80  #include <bits/c++locale_internal.h>
    81  
    82 -#ifndef __UCLIBC_HAS_XLOCALE__
    83 -#define __strcoll_l(S1, S2, L)      strcoll((S1), (S2))
    84 -#define __strxfrm_l(S1, S2, N, L)   strxfrm((S1), (S2), (N))
    85 -#define __wcscoll_l(S1, S2, L)      wcscoll((S1), (S2))
    86 -#define __wcsxfrm_l(S1, S2, N, L)   wcsxfrm((S1), (S2), (N))
    87 -#endif
    88 -
    89  namespace std
    90  {
    91    // These are basically extensions to char_traits, and perhaps should
    92 --- gcc/libstdc++-v3/config/locale/uclibc/monetary_members.cc.uclibc200no__x~	2006-03-10 15:06:17 +0100
    93 +++ gcc/libstdc++-v3/config/locale/uclibc/monetary_members.cc	2006-03-10 15:32:37 +0100
    94 @@ -43,10 +43,6 @@
    95  #warning tailor for stub locale support
    96  #endif
    97  
    98 -#ifndef __UCLIBC_HAS_XLOCALE__
    99 -#define __nl_langinfo_l(N, L)         nl_langinfo((N))
   100 -#endif
   101 -
   102  namespace std
   103  {
   104    // Construct and return valid pattern consisting of some combination of:
   105 --- gcc/libstdc++-v3/config/locale/uclibc/numeric_members.cc.uclibc200no__x~	2006-03-10 15:06:17 +0100
   106 +++ gcc/libstdc++-v3/config/locale/uclibc/numeric_members.cc	2006-03-10 15:32:37 +0100
   107 @@ -41,9 +41,6 @@
   108  #ifdef __UCLIBC_MJN3_ONLY__
   109  #warning tailor for stub locale support
   110  #endif
   111 -#ifndef __UCLIBC_HAS_XLOCALE__
   112 -#define __nl_langinfo_l(N, L)         nl_langinfo((N))
   113 -#endif
   114  
   115  namespace std
   116  {
   117 --- gcc/libstdc++-v3/config/locale/uclibc/time_members.cc.uclibc200no__x~	2006-03-10 15:06:17 +0100
   118 +++ gcc/libstdc++-v3/config/locale/uclibc/time_members.cc	2006-03-10 15:32:37 +0100
   119 @@ -40,9 +40,6 @@
   120  #ifdef __UCLIBC_MJN3_ONLY__
   121  #warning tailor for stub locale support
   122  #endif
   123 -#ifndef __UCLIBC_HAS_XLOCALE__
   124 -#define __nl_langinfo_l(N, L)         nl_langinfo((N))
   125 -#endif
   126  
   127  namespace std
   128  {
   129 --- gcc/libstdc++-v3/config/locale/uclibc/ctype_members.cc.uclibc200no__x~	2006-03-10 15:06:17 +0100
   130 +++ gcc/libstdc++-v3/config/locale/uclibc/ctype_members.cc	2006-03-10 15:32:37 +0100
   131 @@ -38,13 +38,6 @@
   132  #undef _LIBC
   133  #include <bits/c++locale_internal.h>
   134  
   135 -#ifndef __UCLIBC_HAS_XLOCALE__
   136 -#define __wctype_l(S, L)           wctype((S))
   137 -#define __towupper_l(C, L)         towupper((C))
   138 -#define __towlower_l(C, L)         towlower((C))
   139 -#define __iswctype_l(C, M, L)      iswctype((C), (M))
   140 -#endif
   141 -
   142  namespace std
   143  {
   144    // NB: The other ctype<char> specializations are in src/locale.cc and
   145 --- gcc/libstdc++-v3/config/locale/uclibc/messages_members.cc.uclibc200no__x~	2006-03-10 15:06:17 +0100
   146 +++ gcc/libstdc++-v3/config/locale/uclibc/messages_members.cc	2006-03-10 15:32:37 +0100
   147 @@ -39,13 +39,10 @@
   148  #ifdef __UCLIBC_MJN3_ONLY__
   149  #warning fix gettext stuff
   150  #endif
   151 -#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
   152 -extern "C" char *__dcgettext(const char *domainname,
   153 -			     const char *msgid, int category);
   154  #undef gettext
   155 -#define gettext(msgid) __dcgettext(NULL, msgid, LC_MESSAGES)
   156 +#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
   157 +#define gettext(msgid) dcgettext(NULL, msgid, LC_MESSAGES)
   158  #else
   159 -#undef gettext
   160  #define gettext(msgid) (msgid)
   161  #endif
   162  
   163 --- gcc/libstdc++-v3/config/locale/uclibc/messages_members.h.uclibc200no__x~	2006-03-10 15:06:17 +0100
   164 +++ gcc/libstdc++-v3/config/locale/uclibc/messages_members.h	2006-03-10 15:32:37 +0100
   165 @@ -36,15 +36,11 @@
   166  #ifdef __UCLIBC_MJN3_ONLY__
   167  #warning fix prototypes for *textdomain funcs
   168  #endif
   169 -#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
   170 -extern "C" char *__textdomain(const char *domainname);
   171 -extern "C" char *__bindtextdomain(const char *domainname,
   172 -				  const char *dirname);
   173 -#else
   174 -#undef __textdomain
   175 -#undef __bindtextdomain
   176 -#define __textdomain(D)           ((void)0)
   177 -#define __bindtextdomain(D,P)     ((void)0)
   178 +#ifndef __UCLIBC_HAS_GETTEXT_AWARENESS__
   179 +#undef textdomain
   180 +#undef bindtextdomain
   181 +#define textdomain(D)           ((void)0)
   182 +#define bindtextdomain(D,P)     ((void)0)
   183  #endif
   184  
   185    // Non-virtual member functions.
   186 @@ -70,7 +66,7 @@
   187      messages<_CharT>::open(const basic_string<char>& __s, const locale& __loc, 
   188  			   const char* __dir) const
   189      { 
   190 -      __bindtextdomain(__s.c_str(), __dir);
   191 +      bindtextdomain(__s.c_str(), __dir);
   192        return this->do_open(__s, __loc); 
   193      }
   194  
   195 @@ -90,7 +86,7 @@
   196      { 
   197        // No error checking is done, assume the catalog exists and can
   198        // be used.
   199 -      __textdomain(__s.c_str());
   200 +      textdomain(__s.c_str());
   201        return 0;
   202      }
   203  
   204 --- gcc/libstdc++-v3/config/locale/uclibc/c_locale.h.uclibc200no__x~	2006-03-10 15:06:17 +0100
   205 +++ gcc/libstdc++-v3/config/locale/uclibc/c_locale.h	2006-03-10 15:32:37 +0100
   206 @@ -68,6 +68,7 @@
   207  {
   208    extern "C" __typeof(uselocale) __uselocale;
   209  }
   210 +#define __uselocale uselocale
   211  #endif
   212  
   213  namespace std