[BACK]Return to main.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / make

Diff for /src/usr.bin/make/main.c between version 1.118 and 1.119

version 1.118, 2015/12/29 19:04:46 version 1.119, 2016/01/04 10:59:23
Line 367 
Line 367 
                 switch (c) {                  switch (c) {
                 case 'C':                  case 'C':
                         if (chdir(optarg) == -1)                          if (chdir(optarg) == -1)
                                 err(1, "chdir(%s)", optarg);                                  err(2, "chdir(%s)", optarg);
                         break;                          break;
                 case -1:                  case -1:
                         optind++;       /* skip over non-option */                          optind++;       /* skip over non-option */
Line 466 
Line 466 
         if (r == NULL) {          if (r == NULL) {
                 static struct utsname utsname;                  static struct utsname utsname;
   
                 if (uname(&utsname) == -1) {                  if (uname(&utsname) == -1)
                         perror("make: uname");                          err(2, "uname");
                         exit(2);  
                 }  
                 r = utsname.machine;                  r = utsname.machine;
         }          }
         return r;          return r;
Line 514 
Line 512 
   
         /* curdir is cwd... */          /* curdir is cwd... */
         cwd = dogetcwd();          cwd = dogetcwd();
         if (cwd == NULL) {          if (cwd == NULL)
                 (void)fprintf(stderr, "make: %s.\n", strerror(errno));                  err(2, "%s", strerror(errno));
                 exit(2);  
         }  
   
         if (stat(cwd, &sa) == -1) {          if (stat(cwd, &sa) == -1)
                 (void)fprintf(stderr, "make: %s: %s.\n", cwd, strerror(errno));                  err(2, "%s: %s", cwd, strerror(errno));
                 exit(2);  
         }  
   
         /* ...but we can use the alias $PWD if we can prove it is the same          /* ...but we can use the alias $PWD if we can prove it is the same
          * directory */           * directory */

Legend:
Removed from v.1.118  
changed lines
  Added in v.1.119