]>
Commit | Line | Data |
---|---|---|
1f2f436a A |
1 | --- fprintf.c.bsdnew 2009-11-11 13:33:07.000000000 -0800 |
2 | +++ fprintf.c 2009-11-11 13:33:07.000000000 -0800 | |
3 | @@ -36,6 +36,8 @@ static char sccsid[] = "@(#)fprintf.c 8. | |
3d9156a7 | 4 | #include <sys/cdefs.h> |
1f2f436a | 5 | __FBSDID("$FreeBSD: src/lib/libc/stdio/fprintf.c,v 1.11 2007/01/09 00:28:06 imp Exp $"); |
3d9156a7 A |
6 | |
7 | +#include "xlocale_private.h" | |
8 | + | |
9 | #include <stdio.h> | |
10 | #include <stdarg.h> | |
11 | ||
1f2f436a | 12 | @@ -46,7 +48,20 @@ fprintf(FILE * __restrict fp, const char |
3d9156a7 A |
13 | va_list ap; |
14 | ||
15 | va_start(ap, fmt); | |
16 | - ret = vfprintf(fp, fmt, ap); | |
17 | + ret = vfprintf_l(fp, __current_locale(), fmt, ap); | |
18 | + va_end(ap); | |
19 | + return (ret); | |
20 | +} | |
21 | + | |
22 | +int | |
23 | +fprintf_l(FILE * __restrict fp, locale_t loc, const char * __restrict fmt, ...) | |
24 | +{ | |
25 | + int ret; | |
26 | + va_list ap; | |
27 | + | |
28 | + /* no need to call NORMALIZE_LOCALE(loc), because vfprintf_l will */ | |
29 | + va_start(ap, fmt); | |
30 | + ret = vfprintf_l(fp, loc, fmt, ap); | |
31 | va_end(ap); | |
32 | return (ret); | |
33 | } |