1 --- asprintf.c.orig 2003-05-20 15:22:40.000000000 -0700
2 +++ asprintf.c 2005-02-23 16:17:23.000000000 -0800
5 __FBSDID("$FreeBSD: src/lib/libc/stdio/asprintf.c,v 1.13 2002/09/26 13:09:48 tjr Exp $");
7 +#include "xlocale_private.h"
16 - ret = __vfprintf(&f, fmt, ap); /* Use unlocked __vfprintf */
17 + ret = __vfprintf(&f, __current_locale(), fmt, ap); /* Use unlocked __vfprintf */
26 + *str = (char *)f._bf._base;
31 +asprintf_l(char **str, locale_t loc, char const *fmt, ...)
36 + struct __sFILEX ext;
38 + NORMALIZE_LOCALE(loc);
40 + f._flags = __SWR | __SSTR | __SALC;
41 + f._bf._base = f._p = (unsigned char *)malloc(128);
42 + if (f._bf._base == NULL) {
47 + f._bf._size = f._w = 127; /* Leave room for the NUL */
51 + ret = __vfprintf(&f, loc, fmt, ap); /* Use unlocked __vfprintf */