From 294097ed71af31961af5ded01883a93b24152d52 Mon Sep 17 00:00:00 2001 From: tjr Date: Tue, 13 Aug 2002 09:30:41 +0000 Subject: Basic support for wide character I/O: getwc(), fgetwc(), getwchar(), putwc(), fputwc(), putwchar(), ungetwc(), fwide(). --- lib/libc/stdio/asprintf.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib/libc/stdio/asprintf.c') diff --git a/lib/libc/stdio/asprintf.c b/lib/libc/stdio/asprintf.c index 57116e6..1eddf57 100644 --- a/lib/libc/stdio/asprintf.c +++ b/lib/libc/stdio/asprintf.c @@ -43,6 +43,7 @@ asprintf(char **str, char const *fmt, ...) int ret; va_list ap; FILE f; + struct __sFILEX ext; va_start(ap, fmt); f._file = -1; @@ -54,6 +55,8 @@ asprintf(char **str, char const *fmt, ...) return (-1); } f._bf._size = f._w = 127; /* Leave room for the NULL */ + f._extra = &ext; + INITEXTRA(&f); ret = __vfprintf(&f, fmt, ap); /* Use unlocked __vfprintf */ *f._p = '\0'; va_end(ap); -- cgit v1.1