1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-08-08 17:42:12 +03:00

error, warn, warnx: Use __fxprintf for wide printing [BZ #23519]

Also introduce the __vfxprintf function.
This commit is contained in:
Florian Weimer
2018-08-14 13:36:10 +02:00
parent 599cf39766
commit fdb16de387
7 changed files with 129 additions and 145 deletions

View File

@@ -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;
_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);
_IO_flockfile (fp);
int res = locked_vfxprintf (fp, fmt, ap);
_IO_funlockfile (fp);
int res = __vfxprintf (fp, fmt, ap);
va_end (ap);
return res;
}