From: Alan Cox Date: Thu, 16 Nov 2017 17:14:36 +0000 (+0000) Subject: cc: temporaries in current directory X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=7e33e04399e2bff99374b82e35e6e551e8f43e5a;p=FUZIX.git cc: temporaries in current directory --- diff --git a/Applications/SmallC/frontend.c b/Applications/SmallC/frontend.c index 61224b2d..bee3b651 100644 --- a/Applications/SmallC/frontend.c +++ b/Applications/SmallC/frontend.c @@ -169,7 +169,12 @@ static char *pathmod(char *p, char *f, char *t, int rmif) if (*rmptr++ == NULL) memory(); } - return p; + /* Traditionally compilers dump the work files in the current dir + even if the source is /foo/bar/baz.c - follow this */ + x = strrchr(p,'/'); + if (x == NULL) + return p; + return x+1; } static void add_argument(char *p)