X-Git-Url: https://git.saurik.com/apple/libc.git/blobdiff_plain/5f4d86c1219d56604890d932a3152b3b5dd15b55..34e8f8296870d0e8695f90e1a54240a589d41312:/locale/FreeBSD/wcstof.c.patch diff --git a/locale/FreeBSD/wcstof.c.patch b/locale/FreeBSD/wcstof.c.patch index 2cbf6d9..ffc6ef6 100644 --- a/locale/FreeBSD/wcstof.c.patch +++ b/locale/FreeBSD/wcstof.c.patch @@ -1,6 +1,6 @@ ---- 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 __FBSDID("$FreeBSD: src/lib/libc/locale/wcstof.c,v 1.3 2004/04/07 09:47:56 tjr Exp $"); @@ -14,6 +14,9 @@ /* * 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, @@ -67,7 +70,7 @@ 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);