scc

simple C compiler
git clone git://git.2f30.org/scc
Log | Files | Refs | README | LICENSE

commit ba49f4826cbff550e63908fb67b144a7e56f1262
parent 83046300025c0f7afc5a0635480a523410030fa0
Author: Quentin Rameau <quinq@fifth.space>
Date:   Fri,  3 Jun 2016 15:40:41 +0200

[cc1] adjust basename in tool name invocation check

Diffstat:
Mcc1/main.c | 4+++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/cc1/main.c b/cc1/main.c @@ -68,7 +68,9 @@ main(int argc, char *argv[]) usage(); /* if run as cpp, only run the preprocessor */ - if (!(base = strrchr(argv0, '/'))) + if ((base = strrchr(argv0, '/'))) + ++base; + else base = argv0; if (!strcmp(base, "cpp")) onlycpp = 1;