* [patch] err: print program name; was: Broken silent glibc-specific assumptions uncovered by musl
@ 2013-05-18 13:01 Strake
2013-05-18 14:22 ` Rich Felker
0 siblings, 1 reply; 2+ messages in thread
From: Strake @ 2013-05-18 13:01 UTC (permalink / raw)
To: musl
On 18/05/2013, Szabolcs Nagy <nsz@port70.net> wrote:
> - musl's err does not print __progname, it might annoy one
Well, as we have it now:
From f96370aac0c33ae437f0b8f3fa0a946ace330eaa Mon Sep 17 00:00:00 2001
From: Strake <strake888@gmail.com>
Date: Sat, 18 May 2013 07:59:03 -0500
Subject: [PATCH] err: print program name
---
src/legacy/err.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/legacy/err.c b/src/legacy/err.c
index 0f74853..7b167b3 100644
--- a/src/legacy/err.c
+++ b/src/legacy/err.c
@@ -3,14 +3,18 @@
#include <stdarg.h>
#include <stdlib.h>
+extern char *__progname;
+
void vwarn(const char *fmt, va_list ap)
{
+ fprintf (stderr, "%s: ", __progname);
if (fmt) vfprintf(stderr, fmt, ap);
perror("");
}
void vwarnx(const char *fmt, va_list ap)
{
+ fprintf (stderr, "%s: ", __progname);
if (fmt) vfprintf(stderr, fmt, ap);
putc('\n', stderr);
}
--
1.7.11.1
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-05-18 14:22 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-18 13:01 [patch] err: print program name; was: Broken silent glibc-specific assumptions uncovered by musl Strake
2013-05-18 14:22 ` Rich Felker
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/musl/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).