提交 580b8d8c 编写于 作者: R Rich Felker

unbreak vwarn: print ": " before errno message

patch by Strake. this seems to be a regression caused by fixing the
behavior of perror("") to match perror(0) at some point in the past.
上级 e449974d
......@@ -8,8 +8,11 @@ extern char *__progname;
void vwarn(const char *fmt, va_list ap)
{
fprintf (stderr, "%s: ", __progname);
if (fmt) vfprintf(stderr, fmt, ap);
perror("");
if (fmt) {
vfprintf(stderr, fmt, ap);
fputs (": ", stderr);
}
perror(0);
}
void vwarnx(const char *fmt, va_list ap)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册