Quick Search:

Mode

Context

Displaying 3 lines of context. None | Less | More | Full

Other Diffs

Ignore

Blank Lines Whitespace: Expand:

Diff

1.215
 
1.216
 
MAIN:ragge:20120730112806
 
cc.c
_>180180 int     kflag;  /* generate PIC/pic code */
 181181 #define F_PIC   1
 182182 #define F_pic   2
<>183 -int     Mflag;  /* dependencies only */
  183+int     Mflag, MPflag, nMfiles/* dependencies only */
  184+char    *Mfiles[10];
184185 int     pgflag;
 185186 int     exfail;
 186187 int     Xflag;
     
 !
198199 int     xuchar = 0;
 199200 #endif
 200201 int     cxxflag;
<> 202+int     cppflag;
201203 
 202204 char    *passp = LIBEXECDIR PREPROCESSOR;
 203205 char    *pass0 = LIBEXECDIR COMPILER;
     
 !
337339 #define PCC_PTRDIFF_TYPE "long int"
 338340 #endif
 339341 
<> 342+#ifndef CPPROGNAME
  343+#define CPPROGNAME      "cpp"
  344+#endif
  345+
340346 int
 341347 main(int argc, char *argv[])
 342348 {
     
 !
349355         int k;
 350356 #endif
 351357 
<>352 -        if (strcmp(argv[0], "p++") == 0) {
  358+        if ((t = strrchr(argv[0], '/')))
  359+                t = copy(t+1, 0);
  360+        else
  361+                t = argv[0];
  362+        if (strcmp(t, "p++") == 0) {
353363                 cxxflag = 1;
 354364                 pass0 = passxx0;
<> 365+        } else if (strcmp(t, "cpp") == 0 || strcmp(t, CPPROGNAME) == 0) {
  366+                cppflag = 1;
  367+                Eflag = 1;
355368         }
 356369 
 357370 #ifdef os_win32
     
 !
708721                                 break;
 709722 
 710723                         case 'M':
<>711 -                                Mflag++;
  724+                                switch (argv[i][2]) {
  725+                                case '\0': Mflag++; break;
  726+                                case 'P': MPflag++; break;
  727+                                case 'F': outfile = argv[++i]; break;
  728+                                case 'T':
  729+                                case 'Q':
  730+                                        j = strlen(argv[++i]);
  731+                                        t = copy("-xM.,", j);
  732+                                        strlcat(t, argv[i], j+6);
  733+                                        t[3] = argv[i-1][2];
  734+                                        Mfiles[nMfiles++] = t;
  735+                                        break;
  736+                                default:
  737+                                        error("unknown option '%s'", argv[i]);
  738+                                }
712739                                 break;
 713740 
 714741                         case 'd':
     
 !
777804                 }
 778805         }
 779806         /* Sanity checking */
<> 807+        if (cppflag) {
  808+                if (nc == 0)
  809+                        clist[nc++] = "-";
  810+                else if (nc > 2 || (nc == 2 && outfile))
  811+                        errorx(8, "too many files");
  812+                else if (nc == 2)
  813+                        outfile = clist[--nc];
  814+        }
780815         if (nc == 0 && nl == 0)
 781816                 errorx(8, "no input files");
 782817         if (outfile && (cflag || sflag || Eflag) && nc > 1)
     
 !
860895                         av[na++] = "-D_PTHREADS";
 861896                 if (Mflag)
 862897                         av[na++] = "-M";
<> 898+                if (MPflag)
  899+                        av[na++] = "-xMP";
  900+                for (j = 0; j < nMfiles; j++)
  901+                        av[na++] = Mfiles[j];
863902                 if (Oflag)
 864903                         av[na++] = "-D__OPTIMIZE__";
 865904 #ifdef GCC_COMPAT
     
 !
15161555 #endif
 15171556                 static const char msg[] = "Can't find ";
 15181557                 execvp(prog, v);
<>1519 -                (void)write(STDERR_FILENO, msg, sizeof(msg));
 1520 -                (void)write(STDERR_FILENO, prog, strlen(prog));
 1521 -                (void)write(STDERR_FILENO, "\n", 1);
  1558+                t = write(STDERR_FILENO, msg, sizeof(msg));
  1559+                t = write(STDERR_FILENO, prog, strlen(prog));
  1560+                t = write(STDERR_FILENO, "\n", 1);
<_15221561                 _exit(100);
 15231562         }
 15241563         if (p == -1) {
FishEye: Open Source License registered to PCC.
Your maintenance has expired. You can renew your license at http://www.atlassian.com/fisheye/renew
Atlassian FishEye, CVS analysis. (Version:1.6.3 Build:build-336 2008-11-04) - Administration - Page generated 2014-09-20 14:01 +0200