This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [v3 PATCH]: Fix bootstrap failure on powerpc-apple-darwin7.9.0
- From: Roger Sayle <roger at eyesopen dot com>
- To: Paolo Carlini <pcarlini at suse dot de>
- Cc: libstdc++ at gcc dot gnu dot org, <gcc-patches at gcc dot gnu dot org>
- Date: Sun, 30 Jul 2006 10:10:35 -0600 (MDT)
- Subject: Re: [v3 PATCH]: Fix bootstrap failure on powerpc-apple-darwin7.9.0
On Sun, 30 Jul 2006, Paolo Carlini wrote:
> Could you please test _Tp instead, more consistent with the rest of the
> library? Pre-approved of course.
Thanks. _Tp works fine (given that this is used elsewhere this should
be no big surprise). Retested with a top-level "make bootstrap" on
powerpc-apple-darwin7.9.0. Committed to mainline as revision 115823.
Thanks again for the speedy review.
2006-07-30 Roger Sayle <roger@eyesopen.com>
* include/ext/codevt_specializations.h (__iconv_adaptor): Use
identifier _Tp instead of _T in template argument to avoid conflict.
Index: include/ext/codecvt_specializations.h
===================================================================
*** include/ext/codecvt_specializations.h (revision 115817)
--- include/ext/codecvt_specializations.h (working copy)
*************** _GLIBCXX_BEGIN_NAMESPACE(std)
*** 301,312 ****
// argument to iconv(): SUSv2 and others use 'const char**', but glibc 2.2
// uses 'char**', which matches the POSIX 1003.1-2001 standard.
// Using this adaptor, g++ will do the work for us.
! template<typename _T>
inline size_t
! __iconv_adaptor(size_t(*__func)(iconv_t, _T, size_t*, char**, size_t*),
iconv_t __cd, char** __inbuf, size_t* __inbytes,
char** __outbuf, size_t* __outbytes)
! { return __func(__cd, (_T)__inbuf, __inbytes, __outbuf, __outbytes); }
template<typename _InternT, typename _ExternT>
codecvt_base::result
--- 301,312 ----
// argument to iconv(): SUSv2 and others use 'const char**', but glibc 2.2
// uses 'char**', which matches the POSIX 1003.1-2001 standard.
// Using this adaptor, g++ will do the work for us.
! template<typename _Tp>
inline size_t
! __iconv_adaptor(size_t(*__func)(iconv_t, _Tp, size_t*, char**, size_t*),
iconv_t __cd, char** __inbuf, size_t* __inbytes,
char** __outbuf, size_t* __outbytes)
! { return __func(__cd, (_Tp)__inbuf, __inbytes, __outbuf, __outbytes); }
template<typename _InternT, typename _ExternT>
codecvt_base::result
Roger
--