PowerPC Linux support from ericvh.

Mainly adding va_copy/va_end.
Also fix bug in sprint wrapping
around top of memory.
This commit is contained in:
rsc 2004-08-22 15:39:56 +00:00
parent c8c0df440f
commit 984e353160
16 changed files with 54 additions and 17 deletions

View file

@ -23,8 +23,9 @@ vfprint(int fd, char *fmt, va_list args)
int n;
fmtfdinit(&f, fd, buf, sizeof(buf));
f.args = args;
va_copy(f.args,args);
n = dofmt(&f, fmt);
va_end(f.args);
if(n > 0 && __fmtFdFlush(&f) == 0)
return -1;
return n;