X-Git-Url: https://git.saurik.com/apple/libc.git/blobdiff_plain/3d9156a7a519a5e3aa1b92e9d9d4b991f1aed7ff..51282358e8fdbfc483c0c34e7eae9b89b51f2570:/gdtoa/FreeBSD/gdtoa-strtof.c.patch diff --git a/gdtoa/FreeBSD/gdtoa-strtof.c.patch b/gdtoa/FreeBSD/gdtoa-strtof.c.patch index 754a83a..6e31620 100644 --- a/gdtoa/FreeBSD/gdtoa-strtof.c.patch +++ b/gdtoa/FreeBSD/gdtoa-strtof.c.patch @@ -1,6 +1,6 @@ ---- gdtoa-strtof.c.orig 2005-01-20 20:12:37.000000000 -0800 -+++ gdtoa-strtof.c 2005-02-17 12:49:28.000000000 -0800 -@@ -29,13 +29,15 @@ +--- gdtoa-strtof.c.orig 2008-10-28 12:35:19.000000000 -0700 ++++ gdtoa-strtof.c 2008-10-28 13:19:34.000000000 -0700 +@@ -29,13 +29,15 @@ THIS SOFTWARE. /* Please send bug reports to David M. Gay (dmg at acm dot org, * with " at " changed at "@" and " dot " changed to "."). */ @@ -17,18 +17,23 @@ +strtof_l(CONST char *s, char **sp, locale_t loc) #endif { - static FPI fpi = { 24, 1-127-24+1, 254-127-24+1, 1, SI }; -@@ -44,7 +46,8 @@ - int k; - union { ULong L[1]; float f; } u; + static FPI fpi0 = { 24, 1-127-24+1, 254-127-24+1, 1, SI }; +@@ -49,9 +51,13 @@ strtof(CONST char *s, char **sp) + #define fpi &fpi0 + #endif -- k = strtodg(s, sp, &fpi, &exp, bits); +- k = strtodg(s, sp, fpi, &exp, bits); + NORMALIZE_LOCALE(loc); -+ k = strtodg(s, sp, &fpi, &exp, bits, loc); ++ k = strtodg(s, sp, fpi, &exp, bits, loc); switch(k & STRTOG_Retmask) { case STRTOG_NoNumber: ++ u.L[0] = 0; ++ return u.f; // avoid setting sign ++ case STRTOG_Zero: -@@ -71,3 +74,13 @@ + u.L[0] = 0; + break; +@@ -76,3 +82,13 @@ strtof(CONST char *s, char **sp) u.L[0] |= 0x80000000L; return u.f; }