Quick Search:

Mode

Context

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

Other Diffs

Ignore

Blank Lines Whitespace: Expand:

Diff

1.149
 
1.150
 
MAIN:gmcgarry:20090314221050
 
cc.c
_>128128 char    *tmp4;
 129129 char    *outfile, *ermfile;
 130130 char *Bprefix(char *);
<>131 -char *copy(char *, int),*setsuf(char *, char);
  131+char *copy(char *, int);
  132+char *setsuf(char *, char);
132133 int getsuf(char *);
 133134 int main(int, char *[]);
 134135 void error(char *, ...);
     
 !
145146 #endif
 146147 char    *av[MAXAV];
 147148 char    *clist[MAXFIL];
<> 149+char    *olist[MAXFIL];
148150 char    *llist[MAXLIB];
 149151 char    *aslist[MAXAV];
 150152 char    alist[20];
     
 !
602604                                         error("Too many source files");
 603605                                         exit(1);
 604606                                 }
<>605 -                                t = setsuf(t, 'o');
606607                         }
 607608 
 608609                         /* Check for duplicate .o files. */
 609610                         for (j = getsuf(t) == 'o' ? 0 : nl; j < nl; j++) {
 610611                                 if (strcmp(llist[j], t) == 0)
 611612                                         break;
 612613                         }
<>613 -                        if (j == nl) {
  614+                        if ((c=getsuf(t))!='c' && c!='S' &&
  615+                            c!='s' && c!='i' && j==nl) {
614616                                 llist[nl++] = t;
 615617                                 if (nl >= MAXLIB) {
 616618                                         error("Too many object/library files");
     
 !
628630                 errorx(8, "-o given with -c || -E || -S and more than one file");
 629631         if (outfile && clist[0] && strcmp(outfile, clist[0]) == 0)
 630632                 errorx(8, "output file will be clobbered");
<>631 -#if 0
 632 -        if (proflag)
 633 -                pref = "/lib/mcrt0.o";
 634 -#endif
 635 -        if(nc==0)
  633+        if (nc==0)
636634                 goto nocom;
 637635         if (pflag==0) {
 638636                 if (!sflag)
     
 !
864862                 av[na++] = "-o";
 865863                 if (outfile && cflag)
 866864                         ermfile = av[na++] = outfile;
<> 865+                else if (cflag)
  866+                        ermfile = av[na++] = olist[i] = setsuf(clist[i], 'o');
867867                 else
<>868 -                        ermfile = av[na++] = setsuf(clist[i], 'o');
  868+                        ermfile = av[na++] = olist[i] = gettmp();
869869                 av[na++] = assource;
 870870                 if (dflag)
 871871                         av[na++] = alist;
     
 !
886886          * Linker
 887887          */
 888888 nocom:
<>889 -        if (cflag==0 && nl!=0) {
  889+        if (cflag==0 && nc+nl != 0) {
890890                 j = 0;
 891891                 av[j++] = ld;
 892892 #ifndef MSLINKER
     
 !
978978                         }
 979979                 }
 980980                 i = 0;
<> 981+                while (i<nc) {
  982+                        av[j++] = olist[i++];
  983+                        if (j >= MAXAV)
  984+                                error("Too many ld options");
  985+                }
  986+                i = 0;
981987                 while(i<nl) {
 982988                         av[j++] = llist[i++];
 983989                         if (j >= MAXAV)
     
 !
10411047                 av[j++] = 0;
 10421048                 eflag |= callsys(ld, av);
 10431049                 if (nc==1 && nxo==1 && eflag==0)
<>1044 -                        cunlink(setsuf(clist[0], 'o'));
  1050+                        cunlink(olist[0]);
10451051                 else if (nc > 0 && eflag == 0) {
 10461052                         /* remove .o files XXX ugly */
 10471053                         for (i = 0; i < nc; i++)
<>1048 -                                cunlink(setsuf(clist[i], 'o'));
  1054+                                cunlink(olist[i]);
<_10491055                 }
 10501056         }
 10511057         dexit(eflag);
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-23 10:23 +0200