|
Message-ID: <CAL3m8eDRh0MryVY3Ak-CiWMzigKEkJcs3UmuAsW7ZKEV11UpOQ@mail.gmail.com> Date: Sat, 18 May 2013 08:01:35 -0500 From: Strake <strake888@...il.com> To: musl@...ts.openwall.com Subject: [patch] err: print program name; was: Broken silent glibc-specific assumptions uncovered by musl On 18/05/2013, Szabolcs Nagy <nsz@...t70.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@...il.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
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.