diff options
Diffstat (limited to 'usr.bin/make/util.c')
-rw-r--r-- | usr.bin/make/util.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/usr.bin/make/util.c b/usr.bin/make/util.c index ba11f4b..e0dbfdc 100644 --- a/usr.bin/make/util.c +++ b/usr.bin/make/util.c @@ -86,6 +86,24 @@ Debug(const char *fmt, ...) } /*- + * Print a debugging message given its format and append the current + * errno description. Terminate with a newline. + */ +/* VARARGS */ +void +DebugM(const char *fmt, ...) +{ + va_list ap; + int e = errno; + + va_start(ap, fmt); + vfprintf(stderr, fmt, ap); + fprintf(stderr, ": %s\n", strerror(e)); + va_end(ap); + fflush(stderr); +} + +/*- * Error -- * Print an error message given its format. * |