[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Commenting: - glibc-2.0.x has not __va_copy()



Hi Jeff,

this fix is clearly bogus as __va_copy isn't related to glibc, but to the compiler (stdarg.h). Back to rev1.1 in GCC CVS this macro is there, this suggests it was in gcc-2.8.1/egcs-1.0 or later. It isn't present in gcc-2.7.2 or earlier.
I think the right thing to do is to autoconf for array based va_list (mozilla has such a beast AFAIR) and then define __va_copy accordingly:


#ifndef __va_copy
#ifdef HAVE_ARRAY_VA_LIST
#define __va_copy(dest, src) *(dest) = *(src)
#else
#define __va_copy(dest, src) (dest) = (src)
#endif
#endif

An even more sophisticated solution would be to test for the official ISO C99 va_copy too (don't remember if it has to be a macro or not) if you want to support non-gcc compilers.

Franz.





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index] []