]> git.saurik.com Git - apple/libc.git/blob - stdio/FreeBSD/vprintf.c.patch
56169987574785520652c54ddf11d20f65f339d1
[apple/libc.git] / stdio / FreeBSD / vprintf.c.patch
1 --- vprintf.c.bsdnew 2009-11-11 13:33:19.000000000 -0800
2 +++ vprintf.c 2009-11-11 13:33:19.000000000 -0800
3 @@ -36,11 +36,21 @@ static char sccsid[] = "@(#)vprintf.c 8.
4 #include <sys/cdefs.h>
5 __FBSDID("$FreeBSD: src/lib/libc/stdio/vprintf.c,v 1.11 2007/01/09 00:28:08 imp Exp $");
6
7 +#include "xlocale_private.h"
8 +
9 #include <stdio.h>
10
11 int
12 vprintf(const char * __restrict fmt, __va_list ap)
13 {
14
15 - return (vfprintf(stdout, fmt, ap));
16 + return (vfprintf_l(stdout, __current_locale(), fmt, ap));
17 +}
18 +
19 +int
20 +vprintf_l(locale_t loc, const char * __restrict fmt, __va_list ap)
21 +{
22 +
23 + /* no need to call NORMALIZE_LOCALE(loc) because vfprintf_l will */
24 + return (vfprintf_l(stdout, loc, fmt, ap));
25 }