diff options
| author | Charles Forsyth <charles.forsyth@gmail.com> | 2013-06-26 16:00:13 +0000 |
|---|---|---|
| committer | Charles Forsyth <charles.forsyth@gmail.com> | 2013-06-26 16:00:13 +0000 |
| commit | 86c8d15162050ac1bbb2de38961263da3a4b1f87 (patch) | |
| tree | 6fa02ef4435b87d05e7e35ac8fd8ac4d9d05adc6 | |
| parent | 5139a0a1c6f3b5a03c2e3eeb56e20a81cda5619a (diff) | |
use va_copy if defined
| -rw-r--r-- | libbio/bvprint.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/libbio/bvprint.c b/libbio/bvprint.c index c11b1dc3..15074fb0 100644 --- a/libbio/bvprint.c +++ b/libbio/bvprint.c @@ -29,8 +29,15 @@ Bvprint(Biobuf *bp, char *fmt, va_list arg) f.flush = fmtBflush; f.farg = bp; f.nfmt = 0; +#ifdef va_copy + va_copy(f.args, arg); +#else f.args = arg; +#endif n = dofmt(&f, fmt); +#ifdef va_copy + va_end(f.args); +#endif bp->ocount = (char*)f.to - (char*)f.stop; return n; } |
