Mercurial > hg > aboriginal
diff sources/toys/ccwrap.c @ 1452:707beb993e13 1.1.0
Trivial cleanup.
author | Rob Landley <rob@landley.net> |
---|---|
date | Thu, 29 Sep 2011 19:27:00 -0500 |
parents | 5b79ffca554a |
children | 83de80c10db8 |
line wrap: on
line diff
--- a/sources/toys/ccwrap.c Thu Sep 29 19:26:26 2011 -0500 +++ b/sources/toys/ccwrap.c Thu Sep 29 19:27:00 2011 -0500 @@ -32,10 +32,6 @@ // For C++ static char nostdinc_plus[] = "-nostdinc++"; -// gcc 4.3 generates tons of spurious warnings which you can't shut off. - -#define xasprintf(...) do {(void)asprintf(__VA_ARGS__);} while(0) - // Confirm that a regular file exists, and (optionally) has the executable bit. int is_file(char *filename, int has_exe) { @@ -150,8 +146,7 @@ // Add that directory to the start of $PATH. (Better safe than sorry.) *rindex(topdir,'/') = 0; - temp = malloc(5+strlen(topdir)+1+strlen(topdir)+14+strlen(path)+1); - sprintf(temp,"PATH=%s:%s/../tools/bin:%s",topdir,topdir,path); + asprintf(&temp,"PATH=%s:%s/../tools/bin:%s",topdir,topdir,path); putenv(temp); // The directory above the wrapper script should have include, cc,