Loading...
stdio/FreeBSD/vscanf.c.patch /dev/null Libc-763.13
--- /dev/null
+++ Libc/Libc-763.13/stdio/FreeBSD/vscanf.c.patch
@@ -0,0 +1,35 @@
+--- vscanf.c.bsdnew	2009-11-11 13:33:19.000000000 -0800
++++ vscanf.c	2009-11-11 13:33:19.000000000 -0800
+@@ -36,6 +36,8 @@ static char sccsid[] = "@(#)vscanf.c	8.1
+ #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 @@ vscanf(fmt, ap)
+ 	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);
+ }