-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 According to Bruno Haible on 5/2/2006 8:31 AM: > I propose this fix, using a va_copy detection macro that I wrote for gettext. > (I heard that you don't like #ifdefs inside functions?)
I like the general idea, but wonder if it will work everywhere. > 2006-05-01 Bruno Haible <[EMAIL PROTECTED]> > > * modules/stdarg: New file. > * m4/stdarg.m4: New file. > * modules/version-etc: Depend on stdarg. > * lib/version-etc.c (version_etc_va): Use va_copy. > > ================================ m4/stdarg.m4 ============================ > # stdarg.m4 serial 1 > dnl Copyright (C) 2006 Free Software Foundation, Inc. > dnl This file is free software; the Free Software Foundation > dnl gives unlimited permission to copy and/or distribute it, > dnl with or without modifications, as long as this notice is preserved. > > dnl From Bruno Haible. > dnl Provide a working va_copy in combination with <stdarg.h>. > ... > if test $gl_cv_func___va_copy = yes; then > AC_DEFINE([va_copy], [__va_copy], > [Define as a macro for copying va_list variables.]) > else > AH_VERBATIM([#define gl_va_copy(a,b) (a) = (b)]) My recollection from using the proprietary Green Hills Software compiler for PowerPC at work was that they implemented va_list as a one-element array of a struct. They provided va_copy with their latest 4.x version compiler, but in the 3.x version, my workaround for implementing va_copy for their compiler ended up looking like: #define gl_va_copy(a,b) ((a)[0] = (b)[0]) I don't know if it is worth trying to detect this in your .m4, or to ignore it since it was a proprietary compiler where a newer version does not need the workaround, but at least thought I would document the issue. - -- Life is short - so eat dessert first! Eric Blake [EMAIL PROTECTED] -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2.1 (Cygwin) Comment: Public key at home.comcast.net/~ericblake/eblake.gpg Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFEXzvK84KuGfSFAYARAm5bAJ4u7KMPg1Mv755zvuLKRt+oTuNOTQCgvu4t 2e6HMp5/VmzwiGpI2gVXYdA= =PZVU -----END PGP SIGNATURE-----
