This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Re: gcc for glibc 2.3
- From: Bruno Haible <haible at ilog dot fr>
- To: libc-alpha at sources dot redhat dot com
- Date: Tue, 27 Aug 2002 22:53:24 +0200 (CEST)
- Subject: Re: gcc for glibc 2.3
On recent glibcs, gcc-3.1 and gcc-3.2 don't build out of the box for
me (on Linux/i386, with languages C and C++). libstdc++ wants the
symbols __uselocale, __strftime_l, __wcsftime_l from glibc, and the
last two are not yet there.
I've needed to use the appended patch since gcc-3.1.
Shouldn't this be fixed before glibc-2.3 ?
Bruno
*** gcc-3.1-20020423/libstdc++-v3/config/locale/gnu/time_members.cc.bak 2002-04-19 09:59:03.000000000 +0200
--- gcc-3.1-20020423/libstdc++-v3/config/locale/gnu/time_members.cc 2002-05-04 03:15:33.000000000 +0200
***************
*** 51,57 ****
_M_put(char* __s, size_t __maxlen, const char* __format,
const tm* __tm) const
{
! #if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2)
__strftime_l(__s, __maxlen, _M_c_locale_timepunct, __format, __tm);
#else
const char* __old = setlocale(LC_ALL, _M_name_timepunct);
--- 51,57 ----
_M_put(char* __s, size_t __maxlen, const char* __format,
const tm* __tm) const
{
! #if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 3)
__strftime_l(__s, __maxlen, _M_c_locale_timepunct, __format, __tm);
#else
const char* __old = setlocale(LC_ALL, _M_name_timepunct);
***************
*** 199,205 ****
_M_put(wchar_t* __s, size_t __maxlen, const wchar_t* __format,
const tm* __tm) const
{
! #if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2)
__wcsftime_l(__s, __maxlen, _M_c_locale_timepunct, __format, __tm);
#else
const char* __old = setlocale(LC_ALL, _M_name_timepunct);
--- 199,205 ----
_M_put(wchar_t* __s, size_t __maxlen, const wchar_t* __format,
const tm* __tm) const
{
! #if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 3)
__wcsftime_l(__s, __maxlen, _M_c_locale_timepunct, __format, __tm);
#else
const char* __old = setlocale(LC_ALL, _M_name_timepunct);
*** gcc-3.1-20020423/libstdc++-v3/config/locale/gnu/messages_members.cc.bak 2002-04-19 09:59:03.000000000 +0200
--- gcc-3.1-20020423/libstdc++-v3/config/locale/gnu/messages_members.cc 2002-05-04 03:15:41.000000000 +0200
***************
*** 42,48 ****
string
messages<char>::do_get(catalog, int, int, const string& __dfault) const
{
! #if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2)
__c_locale __old = __uselocale(_M_c_locale_messages);
const char* __msg = const_cast<const char*>(gettext(__dfault.c_str()));
__uselocale(__old);
--- 42,48 ----
string
messages<char>::do_get(catalog, int, int, const string& __dfault) const
{
! #if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 3)
__c_locale __old = __uselocale(_M_c_locale_messages);
const char* __msg = const_cast<const char*>(gettext(__dfault.c_str()));
__uselocale(__old);
*** gcc-3.1-20020423/libstdc++-v3/config/locale/gnu/messages_members.h.bak 2002-03-25 21:29:16.000000000 +0100
--- gcc-3.1-20020423/libstdc++-v3/config/locale/gnu/messages_members.h 2002-05-04 03:20:06.000000000 +0200
***************
*** 59,65 ****
messages<_CharT>::do_get(catalog, int, int,
const string_type& __dfault) const
{
! #if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2)
__c_locale __old = __uselocale(_M_c_locale_messages);
char* __msg = gettext(_M_convert_to_char(__dfault));
__uselocale(__old);
--- 59,65 ----
messages<_CharT>::do_get(catalog, int, int,
const string_type& __dfault) const
{
! #if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 3)
__c_locale __old = __uselocale(_M_c_locale_messages);
char* __msg = gettext(_M_convert_to_char(__dfault));
__uselocale(__old);