Re: XView bug/PPC machines available for developers?
On Thu, Sep 21, 2000 at 11:33:49PM +0200, Martin Buck wrote:
> BTW, I never heard any complaints about XView's varargs usage on ppc back
> in the glibc 2.0 days (but then, I don't know wheter somebody actually
> compiled it for ppc at that time). However, for glibc 2.1, somebody
> submitted a patch that changed the following in lib/libxview/attr/attr.c:94
> and a few other places:
PPC didn't particularly exist as a port in the glibc 2.0 days - we
pretty much always used a 2.1 snapshot.
> #if (__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1)
> __va_copy(valist, valist1);
> __va_copy(avlist, avlist1);
> #else
> valist = valist1;
> avlist = avlist1;
> #endif
>
> If I look at the definition of __va_copy, it's
> #define __va_copy(dest, src) (dest) = (src)
> on all platforms except ppc, where it is
> #define __va_copy(dest, src) *(dest) = *(src)
> Is ppc varargs really that different from the rest of the world's, or could
> this be a bug in gcc's header files?
That would be me.
One of the things explicitly not specified in the C standard is the
ability to copy va_list structures with an equality operator. va_list
is allowed to be an array, rather than pointer, type - on powerpc, it
is, for the significant performance gain.
va_copy() is the only safe way to duplicate a va_list.
Dan
/--------------------------------\ /--------------------------------\
| Daniel Jacobowitz |__| SCS Class of 2002 |
| Debian GNU/Linux Developer __ Carnegie Mellon University |
| dan@debian.org | | dmj+@andrew.cmu.edu |
\--------------------------------/ \--------------------------------/
Reply to: