refresh gcc-4.2.3 patches
[openwrt/svn-archive/archive.git] / toolchain / gcc / patches / 4.2.3 / 200-uclibc-locale.patch
index ea21388b7509becba76887fab91d7efc29164079..78692cc9c7c3a280e38dce341e2153c18f37bba3 100644 (file)
@@ -1,6 +1,8 @@
---- gcc/libstdc++-v3/acinclude.m4
-+++ gcc/libstdc++-v3/acinclude.m4
-@@ -1369,7 +1369,7 @@
+Index: gcc-4.2.3/libstdc++-v3/acinclude.m4
+===================================================================
+--- gcc-4.2.3.orig/libstdc++-v3/acinclude.m4   2007-06-29 01:02:05.000000000 +0200
++++ gcc-4.2.3/libstdc++-v3/acinclude.m4        2008-05-21 13:45:43.925289703 +0200
+@@ -1334,7 +1334,7 @@
  AC_DEFUN([GLIBCXX_ENABLE_CLOCALE], [
    GLIBCXX_ENABLE(clocale,auto,[@<:@=MODEL@:>@],
      [use MODEL for target locale package],
@@ -9,7 +11,7 @@
  
    # Deal with gettext issues.  Default to not using it (=no) until we detect
    # support for it later.  Let the user turn it off via --e/d, but let that
-@@ -1385,6 +1385,9 @@
+@@ -1355,6 +1355,9 @@
    # Default to "generic".
    if test $enable_clocale_flag = auto; then
      case ${target_os} in
@@ -17,9 +19,9 @@
 +        enable_clocale_flag=uclibc
 +        ;;
        linux* | gnu* | kfreebsd*-gnu | knetbsd*-gnu)
-         AC_EGREP_CPP([_GLIBCXX_ok], [
-         #include <features.h>
-@@ -1528,6 +1531,40 @@
+         enable_clocale_flag=gnu       
+         ;;
+@@ -1526,6 +1529,40 @@
        CTIME_CC=config/locale/generic/time_members.cc
        CLOCALE_INTERNAL_H=config/locale/generic/c++locale_internal.h
        ;;
    esac
  
    # This is where the testsuite looks for locale catalogs, using the
---- gcc/libstdc++-v3/config/locale/uclibc/c++locale_internal.h
-+++ gcc/libstdc++-v3/config/locale/uclibc/c++locale_internal.h
+Index: gcc-4.2.3/libstdc++-v3/config/locale/uclibc/c++locale_internal.h
+===================================================================
+--- /dev/null  1970-01-01 00:00:00.000000000 +0000
++++ gcc-4.2.3/libstdc++-v3/config/locale/uclibc/c++locale_internal.h   2008-05-21 13:45:43.925289703 +0200
 @@ -0,0 +1,63 @@
 +// Prototypes for GLIBC thread locale __-prefixed functions -*- C++ -*-
 +
 +#endif 
 +
 +#endif // GLIBC 2.3 and later
---- gcc/libstdc++-v3/config/locale/uclibc/c_locale.cc
-+++ gcc/libstdc++-v3/config/locale/uclibc/c_locale.cc
+Index: gcc-4.2.3/libstdc++-v3/config/locale/uclibc/c_locale.cc
+===================================================================
+--- /dev/null  1970-01-01 00:00:00.000000000 +0000
++++ gcc-4.2.3/libstdc++-v3/config/locale/uclibc/c_locale.cc    2008-05-21 13:45:43.925289703 +0200
 @@ -0,0 +1,160 @@
 +// Wrapper for underlying C-language localization -*- C++ -*-
 +
 +{
 +  const char* const* const locale::_S_categories = __gnu_cxx::category_names;
 +}  // namespace std
---- gcc/libstdc++-v3/config/locale/uclibc/c_locale.h
-+++ gcc/libstdc++-v3/config/locale/uclibc/c_locale.h
+Index: gcc-4.2.3/libstdc++-v3/config/locale/uclibc/c_locale.h
+===================================================================
+--- /dev/null  1970-01-01 00:00:00.000000000 +0000
++++ gcc-4.2.3/libstdc++-v3/config/locale/uclibc/c_locale.h     2008-05-21 13:45:43.925289703 +0200
 @@ -0,0 +1,117 @@
 +// Wrapper for underlying C-language localization -*- C++ -*-
 +
 +}
 +
 +#endif
---- gcc/libstdc++-v3/config/locale/uclibc/codecvt_members.cc
-+++ gcc/libstdc++-v3/config/locale/uclibc/codecvt_members.cc
+Index: gcc-4.2.3/libstdc++-v3/config/locale/uclibc/codecvt_members.cc
+===================================================================
+--- /dev/null  1970-01-01 00:00:00.000000000 +0000
++++ gcc-4.2.3/libstdc++-v3/config/locale/uclibc/codecvt_members.cc     2008-05-21 13:45:43.929287698 +0200
 @@ -0,0 +1,306 @@
 +// std::codecvt implementation details, GNU version -*- C++ -*-
 +
 +  }
 +#endif
 +}
---- gcc/libstdc++-v3/config/locale/uclibc/collate_members.cc
-+++ gcc/libstdc++-v3/config/locale/uclibc/collate_members.cc
+Index: gcc-4.2.3/libstdc++-v3/config/locale/uclibc/collate_members.cc
+===================================================================
+--- /dev/null  1970-01-01 00:00:00.000000000 +0000
++++ gcc-4.2.3/libstdc++-v3/config/locale/uclibc/collate_members.cc     2008-05-21 13:45:43.929287698 +0200
 @@ -0,0 +1,80 @@
 +// std::collate implementation details, GNU version -*- C++ -*-
 +
 +    { return __wcsxfrm_l(__to, __from, __n, _M_c_locale_collate); }
 +#endif
 +}
---- gcc/libstdc++-v3/config/locale/uclibc/ctype_members.cc
-+++ gcc/libstdc++-v3/config/locale/uclibc/ctype_members.cc
+Index: gcc-4.2.3/libstdc++-v3/config/locale/uclibc/ctype_members.cc
+===================================================================
+--- /dev/null  1970-01-01 00:00:00.000000000 +0000
++++ gcc-4.2.3/libstdc++-v3/config/locale/uclibc/ctype_members.cc       2008-05-21 13:45:43.929287698 +0200
 @@ -0,0 +1,300 @@
 +// std::ctype implementation details, GNU version -*- C++ -*-
 +
 +  }
 +#endif //  _GLIBCXX_USE_WCHAR_T
 +}
---- gcc/libstdc++-v3/config/locale/uclibc/messages_members.cc
-+++ gcc/libstdc++-v3/config/locale/uclibc/messages_members.cc
+Index: gcc-4.2.3/libstdc++-v3/config/locale/uclibc/messages_members.cc
+===================================================================
+--- /dev/null  1970-01-01 00:00:00.000000000 +0000
++++ gcc-4.2.3/libstdc++-v3/config/locale/uclibc/messages_members.cc    2008-05-21 13:45:43.929287698 +0200
 @@ -0,0 +1,100 @@
 +// std::messages implementation details, GNU version -*- C++ -*-
 +
 +    }
 +#endif
 +}
---- gcc/libstdc++-v3/config/locale/uclibc/messages_members.h
-+++ gcc/libstdc++-v3/config/locale/uclibc/messages_members.h
+Index: gcc-4.2.3/libstdc++-v3/config/locale/uclibc/messages_members.h
+===================================================================
+--- /dev/null  1970-01-01 00:00:00.000000000 +0000
++++ gcc-4.2.3/libstdc++-v3/config/locale/uclibc/messages_members.h     2008-05-21 13:45:43.929287698 +0200
 @@ -0,0 +1,118 @@
 +// std::messages implementation details, GNU version -*- C++ -*-
 +
 +         this->_S_create_c_locale(this->_M_c_locale_messages, __s); 
 +       }
 +     }
---- gcc/libstdc++-v3/config/locale/uclibc/monetary_members.cc
-+++ gcc/libstdc++-v3/config/locale/uclibc/monetary_members.cc
+Index: gcc-4.2.3/libstdc++-v3/config/locale/uclibc/monetary_members.cc
+===================================================================
+--- /dev/null  1970-01-01 00:00:00.000000000 +0000
++++ gcc-4.2.3/libstdc++-v3/config/locale/uclibc/monetary_members.cc    2008-05-21 13:45:43.933287929 +0200
 @@ -0,0 +1,692 @@
 +// std::moneypunct implementation details, GNU version -*- C++ -*-
 +
 +    }
 +#endif
 +}
---- gcc/libstdc++-v3/config/locale/uclibc/numeric_members.cc
-+++ gcc/libstdc++-v3/config/locale/uclibc/numeric_members.cc
+Index: gcc-4.2.3/libstdc++-v3/config/locale/uclibc/numeric_members.cc
+===================================================================
+--- /dev/null  1970-01-01 00:00:00.000000000 +0000
++++ gcc-4.2.3/libstdc++-v3/config/locale/uclibc/numeric_members.cc     2008-05-21 13:45:43.933287929 +0200
 @@ -0,0 +1,160 @@
 +// std::numpunct implementation details, GNU version -*- C++ -*-
 +
 +    { delete _M_data; }
 + #endif
 +}
---- gcc/libstdc++-v3/config/locale/uclibc/time_members.cc
-+++ gcc/libstdc++-v3/config/locale/uclibc/time_members.cc
+Index: gcc-4.2.3/libstdc++-v3/config/locale/uclibc/time_members.cc
+===================================================================
+--- /dev/null  1970-01-01 00:00:00.000000000 +0000
++++ gcc-4.2.3/libstdc++-v3/config/locale/uclibc/time_members.cc        2008-05-21 13:45:43.933287929 +0200
 @@ -0,0 +1,406 @@
 +// std::time_get, std::time_put implementation, GNU version -*- C++ -*-
 +
 +    }
 +#endif
 +}
---- gcc/libstdc++-v3/config/locale/uclibc/time_members.h
-+++ gcc/libstdc++-v3/config/locale/uclibc/time_members.h
+Index: gcc-4.2.3/libstdc++-v3/config/locale/uclibc/time_members.h
+===================================================================
+--- /dev/null  1970-01-01 00:00:00.000000000 +0000
++++ gcc-4.2.3/libstdc++-v3/config/locale/uclibc/time_members.h 2008-05-21 13:45:43.933287929 +0200
 @@ -0,0 +1,68 @@
 +// std::time_get, std::time_put implementation, GNU version -*- C++ -*-
 +
 +      delete _M_data; 
 +      _S_destroy_c_locale(_M_c_locale_timepunct); 
 +    }
---- gcc/libstdc++-v3/configure
-+++ gcc/libstdc++-v3/configure
-@@ -5764,7 +5764,7 @@
+Index: gcc-4.2.3/libstdc++-v3/configure
+===================================================================
+--- gcc-4.2.3.orig/libstdc++-v3/configure      2008-05-21 13:45:41.725287971 +0200
++++ gcc-4.2.3/libstdc++-v3/configure   2008-05-21 13:45:44.017287734 +0200
+@@ -5769,7 +5769,7 @@
    enableval="$enable_clocale"
  
        case "$enableval" in
         *) { { echo "$as_me:$LINENO: error: Unknown argument to enable/disable clocale" >&5
  echo "$as_me: error: Unknown argument to enable/disable clocale" >&2;}
     { (exit 1); exit 1; }; } ;;
-@@ -5789,6 +5789,9 @@
+@@ -5802,6 +5802,9 @@
    # Default to "generic".
    if test $enable_clocale_flag = auto; then
      case ${target_os} in
 +        enable_clocale_flag=uclibc
 +      ;;
        linux* | gnu* | kfreebsd*-gnu | knetbsd*-gnu)
-         cat >conftest.$ac_ext <<_ACEOF
- /* confdefs.h.  */
-@@ -6019,6 +6022,76 @@
+         enable_clocale_flag=gnu
+         ;;
+@@ -6190,6 +6193,76 @@
        CTIME_CC=config/locale/generic/time_members.cc
        CLOCALE_INTERNAL_H=config/locale/generic/c++locale_internal.h
        ;;
    esac
  
    # This is where the testsuite looks for locale catalogs, using the
---- gcc/libstdc++-v3/include/c_compatibility/wchar.h
-+++ gcc/libstdc++-v3/include/c_compatibility/wchar.h
+Index: gcc-4.2.3/libstdc++-v3/include/c_compatibility/wchar.h
+===================================================================
+--- gcc-4.2.3.orig/libstdc++-v3/include/c_compatibility/wchar.h        2005-08-17 04:28:44.000000000 +0200
++++ gcc-4.2.3/libstdc++-v3/include/c_compatibility/wchar.h     2008-05-21 13:45:44.021288244 +0200
 @@ -101,7 +101,9 @@
  using std::wmemcpy;
  using std::wmemmove;
  
  #if _GLIBCXX_USE_C99
  using std::wcstold;
---- gcc/libstdc++-v3/include/c_std/std_cwchar.h
-+++ gcc/libstdc++-v3/include/c_std/std_cwchar.h
+Index: gcc-4.2.3/libstdc++-v3/include/c_std/std_cwchar.h
+===================================================================
+--- gcc-4.2.3.orig/libstdc++-v3/include/c_std/std_cwchar.h     2006-12-07 10:33:51.000000000 +0100
++++ gcc-4.2.3/libstdc++-v3/include/c_std/std_cwchar.h  2008-05-21 13:45:44.021288244 +0200
 @@ -182,7 +182,9 @@
    using ::wcscoll;
    using ::wcscpy;