]> git.saurik.com Git - apple/libc.git/blame - stdio/FreeBSD/printf.c.patch
Libc-594.9.5.tar.gz
[apple/libc.git] / stdio / FreeBSD / printf.c.patch
CommitLineData
3d9156a7
A
1--- printf.c.orig 2003-05-20 15:22:43.000000000 -0700
2+++ printf.c 2005-02-23 16:34:28.000000000 -0800
3@@ -40,6 +40,8 @@
4 #include <sys/cdefs.h>
5 __FBSDID("$FreeBSD: src/lib/libc/stdio/printf.c,v 1.10 2002/09/06 11:23:55 tjr Exp $");
6
7+#include "xlocale_private.h"
8+
9 #include <stdio.h>
10 #include <stdarg.h>
11
12@@ -50,7 +52,20 @@
13 va_list ap;
14
15 va_start(ap, fmt);
16- ret = vfprintf(stdout, fmt, ap);
17+ ret = vfprintf_l(stdout, __current_locale(), fmt, ap);
18+ va_end(ap);
19+ return (ret);
20+}
21+
22+int
23+printf_l(locale_t loc, char const * __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(stdout, loc, fmt, ap);
31 va_end(ap);
32 return (ret);
33 }