From fdb16de38705ccff0dbf38af9956eb4165710106 Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Tue, 14 Aug 2018 13:36:10 +0200 Subject: error, warn, warnx: Use __fxprintf for wide printing [BZ #23519] Also introduce the __vfxprintf function. --- stdio-common/fxprintf.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'stdio-common') diff --git a/stdio-common/fxprintf.c b/stdio-common/fxprintf.c index c4a1146b20..8d02b71f91 100644 --- a/stdio-common/fxprintf.c +++ b/stdio-common/fxprintf.c @@ -62,18 +62,22 @@ locked_vfxprintf (FILE *fp, const char *fmt, va_list ap) } int -__fxprintf (FILE *fp, const char *fmt, ...) +__vfxprintf (FILE *fp, const char *fmt, va_list ap) { if (fp == NULL) fp = stderr; - - va_list ap; - va_start (ap, fmt); _IO_flockfile (fp); - int res = locked_vfxprintf (fp, fmt, ap); - _IO_funlockfile (fp); + return res; +} + +int +__fxprintf (FILE *fp, const char *fmt, ...) +{ + va_list ap; + va_start (ap, fmt); + int res = __vfxprintf (fp, fmt, ap); va_end (ap); return res; } -- cgit 1.4.1