Loading...
--- Libc/Libc-763.13/stdio/FreeBSD/vscanf.c
+++ Libc/Libc-997.90.3/stdio/FreeBSD/vscanf.c
@@ -36,6 +36,8 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD: src/lib/libc/stdio/vscanf.c,v 1.13 2007/01/09 00:28:08 imp Exp $");
+#include "xlocale_private.h"
+
#include "namespace.h"
#include <stdio.h>
#include "un-namespace.h"
@@ -50,7 +52,22 @@
int retval;
FLOCKFILE(stdin);
- retval = __svfscanf(stdin, fmt, ap);
+ retval = __svfscanf_l(stdin, __current_locale(), fmt, ap);
FUNLOCKFILE(stdin);
return (retval);
}
+
+int
+vscanf_l(loc, fmt, ap)
+ locale_t loc;
+ const char * __restrict fmt;
+ __va_list ap;
+{
+ int retval;
+
+ NORMALIZE_LOCALE(loc);
+ FLOCKFILE(stdin);
+ retval = __svfscanf_l(stdin, loc, fmt, ap);
+ FUNLOCKFILE(stdin);
+ return (retval);
+}