projects
/
musl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
setjmp: optimize x86 longjmp epilogues
[musl]
/
src
/
legacy
/
err.c
diff --git
a/src/legacy/err.c
b/src/legacy/err.c
index
0f74853
..
0d6ab52
100644
(file)
--- a/
src/legacy/err.c
+++ b/
src/legacy/err.c
@@
-3,14
+3,21
@@
#include <stdarg.h>
#include <stdlib.h>
#include <stdarg.h>
#include <stdlib.h>
+extern char *__progname;
+
void vwarn(const char *fmt, va_list ap)
{
void vwarn(const char *fmt, va_list ap)
{
- if (fmt) vfprintf(stderr, fmt, ap);
- perror("");
+ fprintf (stderr, "%s: ", __progname);
+ if (fmt) {
+ vfprintf(stderr, fmt, ap);
+ fputs (": ", stderr);
+ }
+ perror(0);
}
void vwarnx(const char *fmt, va_list ap)
{
}
void vwarnx(const char *fmt, va_list ap)
{
+ fprintf (stderr, "%s: ", __progname);
if (fmt) vfprintf(stderr, fmt, ap);
putc('\n', stderr);
}
if (fmt) vfprintf(stderr, fmt, ap);
putc('\n', stderr);
}