If you're having problems with assignment's of
va_list's to va_list's, the reason is probably
because PowerPC linux'es like to make the va_list
an array. GCC will throw out an error
like "incompatible types in assignment" if you
try to do such an assignment. The solution is
to replace something that looks like this:
va_list ap_one; va_list ap_two;
/*** ... ***/
ap_two = ap_one;
With:
va_list ap_one; va_list ap_two;
/*** ... ***/
memcpy( ap_two, ap_one, sizeof(va_list) );_
-David (dtm@waterw.com) dtm@waterw.com |
If you're using a later version of gcc (egcs anything, or gcc 2.8.x),
you can just use
__va_copy(ap_two, ap_one);
which is portable (any machine running gcc :-) ) and copies ap_one to ap_two.
Something much like it will be in the next revision of the ISO C standard. geoffk@discus.anu.edu.au |