1 --- vsnprintf.c.orig 2003-07-24 12:42:14.000000000 -0700
2 +++ vsnprintf.c 2005-02-23 16:54:44.000000000 -0800
5 __FBSDID("$FreeBSD: src/lib/libc/stdio/vsnprintf.c,v 1.22 2003/07/02 07:08:44 jkh Exp $");
7 +#include "xlocale_private.h"
13 f._bf._size = f._w = n;
16 - ret = __vfprintf(&f, fmt, ap);
17 + ret = __vfprintf(&f, __current_locale(), fmt, ap);
24 +vsnprintf_l(char * __restrict str, size_t n, locale_t loc,
25 + const char * __restrict fmt, __va_list ap)
31 + struct __sFILEX ext;
33 + NORMALIZE_LOCALE(loc);
39 + /* Stdio internals do not deal correctly with zero length buffer */
47 + f._flags = __SWR | __SSTR;
48 + f._bf._base = f._p = (unsigned char *)str;
49 + f._bf._size = f._w = n;
52 + ret = __vfprintf(&f, loc, fmt, ap);