aboriginal

changeset 1452:707beb993e13 1.1.0

Trivial cleanup.
author Rob Landley <rob@landley.net>
date Thu, 29 Sep 2011 19:27:00 -0500
parents 2ad7480aa7ca
children 0d4c7853b913
files sources/toys/ccwrap.c
diffstat 1 files changed, 1 insertions(+), 6 deletions(-) [+]
line diff
     1.1 --- a/sources/toys/ccwrap.c	Thu Sep 29 19:26:26 2011 -0500
     1.2 +++ b/sources/toys/ccwrap.c	Thu Sep 29 19:27:00 2011 -0500
     1.3 @@ -32,10 +32,6 @@
     1.4  // For C++
     1.5  static char nostdinc_plus[] = "-nostdinc++";
     1.6  
     1.7 -// gcc 4.3 generates tons of spurious warnings which you can't shut off.
     1.8 -
     1.9 -#define xasprintf(...) do {(void)asprintf(__VA_ARGS__);} while(0)
    1.10 -
    1.11  // Confirm that a regular file exists, and (optionally) has the executable bit.
    1.12  int is_file(char *filename, int has_exe)
    1.13  {
    1.14 @@ -150,8 +146,7 @@
    1.15  
    1.16  		// Add that directory to the start of $PATH.  (Better safe than sorry.)
    1.17  		*rindex(topdir,'/') = 0;
    1.18 -		temp = malloc(5+strlen(topdir)+1+strlen(topdir)+14+strlen(path)+1);
    1.19 -		sprintf(temp,"PATH=%s:%s/../tools/bin:%s",topdir,topdir,path);
    1.20 +		asprintf(&temp,"PATH=%s:%s/../tools/bin:%s",topdir,topdir,path);
    1.21  		putenv(temp);
    1.22  
    1.23  		// The directory above the wrapper script should have include, cc,