Re: Announcing bglibs version 1.020
Bruce Guenter <[email protected]>
| Newsgroups | gmane.comp.sysutils.bgware |
|---|---|
| Message-ID | <[email protected]> |
On Mon, May 30, 2005 at 10:51:14AM -0500, Ville Walveranta wrote: > Compilation of 1.020 fails on FreeBSD 4.11-RELEASE system: > > ----- > iobuf/obuf_putf.c: In function `obuf_putfv': > iobuf/obuf_putf.c:11: warning: implicit declaration of function `va_copy' > iobuf/obuf_putf.c:10: warning: `ap2' might be used uninitialized in this > function > selftests.sh.tmp.34052/test.o: In function `obuf_putfv': > /usr/local/src/1MAILSYSTEM/bglibs-1.020/iobuf/obuf_putf.c:13: undefined > reference to `va_copy' > =====> Load failed! <===== va_copy is a feature of C99 (previously known as C9X) and is required to properly handle format strings used in obuf_putfv. obuf_putfv (and str_catfv) need to call a function with the given variadic arguments twice. There is, unfortunately, no standard way of copying va_args, nor can I rely on said args being unchanged after a function call, so the va_copy is necessary. What compiler does FreeBSD use (and why isn't it C99 compliant yet)? -- Bruce Guenter <[email protected]> http://em.ca/~bruceg/ http://untroubled.org/ OpenPGP key: 699980E8 / D0B7 C8DD 365D A395 29DA 2E2A E96F B2DC 6999 80E8
signature.asc
(application/pgp-signature, 189 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (GNU/Linux) iD8DBQFCmzhT6W+y3GmZgOgRAvk6AJ45QQJmQv/86bjlUDpmG0PUN/kU6ACgoOiJ EX8vWIYLuEStgF1eMsLHG78= =HMc+ -----END PGP SIGNATURE-----