1 --- printfcommon.h.orig 2009-11-12 13:29:57.000000000 -0800
2 +++ printfcommon.h 2009-11-12 23:50:26.000000000 -0800
3 @@ -79,14 +79,14 @@ io_init(struct io_state *iop, FILE *fp)
4 * remain valid until io_flush() is called.
7 -io_print(struct io_state *iop, const CHAR * __restrict ptr, int len)
8 +io_print(struct io_state *iop, const CHAR * __restrict ptr, int len, locale_t loc)
11 iop->iov[iop->uio.uio_iovcnt].iov_base = (char *)ptr;
12 iop->iov[iop->uio.uio_iovcnt].iov_len = len;
13 iop->uio.uio_resid += len;
14 if (++iop->uio.uio_iovcnt >= NIOV)
15 - return (__sprint(iop->fp, &iop->uio));
16 + return (__sprint(iop->fp, loc, &iop->uio));
20 @@ -107,13 +107,13 @@ static const CHAR zeroes[PADSIZE] =
21 * or the zeroes array.
24 -io_pad(struct io_state *iop, int howmany, const CHAR * __restrict with)
25 +io_pad(struct io_state *iop, int howmany, const CHAR * __restrict with, locale_t loc)
30 n = (howmany >= PADSIZE) ? PADSIZE : howmany;
31 - if (io_print(iop, with, n))
32 + if (io_print(iop, with, n, loc))
36 @@ -126,7 +126,7 @@ io_pad(struct io_state *iop, int howmany
39 io_printandpad(struct io_state *iop, const CHAR *p, const CHAR *ep,
40 - int len, const CHAR * __restrict with)
41 + int len, const CHAR * __restrict with, locale_t loc)
45 @@ -134,19 +134,19 @@ io_printandpad(struct io_state *iop, con
49 - if (io_print(iop, p, p_len))
50 + if (io_print(iop, p, p_len, loc))
55 - return (io_pad(iop, len - p_len, with));
56 + return (io_pad(iop, len - p_len, with, loc));
60 -io_flush(struct io_state *iop)
61 +io_flush(struct io_state *iop, locale_t loc)
64 - return (__sprint(iop->fp, &iop->uio));
65 + return (__sprint(iop->fp, loc, &iop->uio));
69 @@ -205,7 +205,7 @@ __ultoa(u_long val, CHAR *endp, int base
74 + LIBC_ABORT("__ultoa: invalid base=%d", base);
78 @@ -255,7 +255,7 @@ __ujtoa(uintmax_t val, CHAR *endp, int b
83 + LIBC_ABORT("__ujtoa: invalid base=%d", base);