]> git.saurik.com Git - apple/libc.git/blobdiff - gdtoa/FreeBSD/machdep_ldisx.c
Libc-825.24.tar.gz
[apple/libc.git] / gdtoa / FreeBSD / machdep_ldisx.c
index 0ceea1b29de9551470c152815bbe03b162f9b0b7..64b14d456ba8021ef3f2f2089b059986449c3b89 100644 (file)
@@ -33,6 +33,8 @@
 #include <sys/cdefs.h>
 __FBSDID("$FreeBSD: src/lib/libc/gdtoa/machdep_ldisx.c,v 1.2 2003/04/09 05:58:43 das Exp $");
 
+#include "xlocale_private.h"
+
 #include "gdtoaimp.h"
 
 long double
@@ -40,6 +42,16 @@ strtold(const char * __restrict s, char ** __restrict sp)
 {
        long double result;
 
-       strtopx(s, sp, &result);
+       strtopx(s, sp, &result, __current_locale());
+       return result;
+}
+
+long double
+strtold_l(const char * __restrict s, char ** __restrict sp, locale_t loc)
+{
+       long double result;
+
+       NORMALIZE_LOCALE(loc);
+       strtopx(s, sp, &result, loc);
        return result;
 }