1 --- vdprintf.c.orig 2009-12-15 17:43:09.000000000 -0800
2 +++ vdprintf.c 2009-12-15 18:09:12.000000000 -0800
5 __FBSDID("$FreeBSD: src/lib/libc/stdio/vdprintf.c,v 1.1 2009/03/04 03:38:51 das Exp $");
7 +#include "xlocale_private.h"
12 @@ -37,11 +39,16 @@ __FBSDID("$FreeBSD: src/lib/libc/stdio/v
16 -vdprintf(int fd, const char * __restrict fmt, va_list ap)
17 +vdprintf_l(int fd, locale_t loc, const char * __restrict fmt, va_list ap)
20 unsigned char buf[BUFSIZ];
22 + struct __sFILEX ext;
26 + NORMALIZE_LOCALE(loc);
30 @@ -59,8 +66,13 @@ vdprintf(int fd, const char * __restrict
32 bzero(&f._mbstate, sizeof(f._mbstate));
34 - if ((ret = __vfprintf(&f, fmt, ap)) < 0)
35 + if ((ret = __vfprintf(&f, loc, fmt, ap)) < 0)
38 return (__fflush(&f) ? EOF : ret);
42 +vdprintf(int fd, const char * __restrict fmt, va_list ap) {
43 + return vdprintf_l(fd, __current_locale(), fmt, ap);