scc

Simple C99 Compiler
Log | Files | Refs | README | LICENSE

commit 9cdb74cddc65c7328839be3892384d5e4d095ea1
parent fe098f45fcb3847ae558bb7027c7701b6d2bc15f
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date:   Fri,  1 Jul 2016 15:56:02 +0200

[driver] output filename and error on mkstemp error

Diffstat:
driver/posix/scc.c | 3++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/driver/posix/scc.c b/driver/posix/scc.c @@ -162,7 +162,8 @@ outfilename(char *path, char *ext) if (n < 0 || n >= newsz) die("scc: wrong output filename"); if ((tmpfd = mkstemp(new)) < 0 && errno != EINVAL) - die("scc: could not create output file"); + die("scc: could not create output file '%s': %s", + new, strerror(errno)); close(tmpfd); return new;