X-Git-Url: https://git.saurik.com/apple/libc.git/blobdiff_plain/1f2f436a38f7ae2d39a943ad2898d8fed4ed2e58..5f1254882f242514d4ceaf1ecebb140dcc2a511d:/stdio/FreeBSD/asprintf.c diff --git a/stdio/FreeBSD/asprintf.c b/stdio/FreeBSD/asprintf.c index 5e089e1..90c5617 100644 --- a/stdio/FreeBSD/asprintf.c +++ b/stdio/FreeBSD/asprintf.c @@ -33,6 +33,8 @@ #include __FBSDID("$FreeBSD: src/lib/libc/stdio/asprintf.c,v 1.15 2009/03/02 04:11:42 das Exp $"); +#include "xlocale_private.h" + #include #include @@ -43,7 +45,19 @@ asprintf(char ** __restrict s, char const * __restrict fmt, ...) va_list ap; va_start(ap, fmt); - ret = vasprintf(s, fmt, ap); + ret = vasprintf_l(s, __current_locale(), fmt, ap); + va_end(ap); + return (ret); +} + +int +asprintf_l(char ** __restrict s, locale_t loc, char const * __restrict fmt, ...) +{ + int ret; + va_list ap; + + va_start(ap, fmt); + ret = vasprintf_l(s, loc, fmt, ap); va_end(ap); return (ret); }