---- wcstof.c.orig 2007-03-16 01:15:20.000000000 -0700
-+++ wcstof.c 2007-03-16 03:04:01.000000000 -0700
-@@ -27,44 +27,64 @@
+--- wcstof.c.orig 2008-10-09 11:50:52.000000000 -0700
++++ wcstof.c 2008-10-29 00:51:43.000000000 -0700
+@@ -27,44 +27,67 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD: src/lib/libc/locale/wcstof.c,v 1.3 2004/04/07 09:47:56 tjr Exp $");
/*
* See wcstod() for comments as to the logic used.
*/
++
++extern size_t __wcs_end_offset(const char * __restrict buf, const char * __restrict end, locale_t loc);
++
float
-wcstof(const wchar_t * __restrict nptr, wchar_t ** __restrict endptr)
+wcstof_l(const wchar_t * __restrict nptr, wchar_t ** __restrict endptr,
if (endptr != NULL)
- *endptr = (wchar_t *)nptr + (end - buf);
-+ *endptr = (end == buf) ? (wchar_t *)nptr0 : ((wchar_t *)first + (end - buf));
++ *endptr = (end == buf) ? (wchar_t *)nptr0 : ((wchar_t *)first + __wcs_end_offset(buf, end, loc));
- free(buf);
+ _simple_sfree(b);