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