Subject: | va_copy requires X/Open 6 |
From src/term.c:
/* We need strdup */
#define _XOPEN_SOURCE 500
since X/Open 5 includes POSIX 1994, that means we don't have va_copy yet - http://pubs.opengroup.org/onlinepubs/007908799/xsh/stdarg.h.html, if I'm reading the versions correctly. It's only used in one place ( tickit_term_vprintf).
With X/Open 6, we're up to POSIX 2004, so we get http://pubs.opengroup.org/onlinepubs/009695399/basedefs/stdarg.h.html which has the required va_copy() macro.
Moving <stdarg.h> before the _XOPEN_SOURCE #define might also make things compile if GNU extensions are picked up, but I *think* the correct thing to do here is
/* We need strdup */
#define _XOPEN_SOURCE 600
and in testing on FreeBSD 9.0 w/gcc 4.2, that gives me a clean compile with just the Build.PL patch for -std=gnu99.
cheers,
Tom