Quick Search:

Mode

Context

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

Other Diffs

Ignore

Blank Lines Whitespace: Expand:

Diff

1.19
 
1.20
 
MAIN:ragge:20040828160429
 
cc.c
_>5858 #include <sys/wait.h>
 5959 /* C command */
 6060 
<>61 -#define FOR_X86
 62 -#ifdef FOR_X86
  61+#define MKS(x) _MKS(x)
  62+#define _MKS(x) #x
  63+
  64+/*
  65+ * Many specific definitions, should be declared elsewhere.
  66+ */
  67+#define PCC_MINOR 0
  68+#define PCC_MAJOR 1
  69+#define STDINC    "/usr/include"
  70+
  71+#if defined(__NetBSD__)
  72+#if defined(__i386__)
6373 char *cppadd[] = {
<>64 -        "-D__NetBSD__", "-D__PCC__=1", "-D__PCC_MINOR__=0",
 65 -        "-D__ELF__", "-Asystem(unix)", "-Asystem(NetBSD)", "-Acpu(i386)",
 66 -        "-Amachine(i386)", "-D__i386__", "-D__OPTIMIZE__", "-Di386", NULL,
  74+        "-D__NetBSD__", "-D__ELF__", "-D__i386__", NULL,
6775 };
<> 76+#else
  77+#error port to netbsd arch
6878 #endif
<> 79+#else
  80+#error port to new os
  81+#endif
6982 
 7083 #define SBSIZE 10000
 7184 #define MAXINC 100
     
 !
114127 int     exfail;
 115128 int     Xflag;
 116129 int     nostartfiles, Bstatic;
<> 130+int     nostdinc;
117131 
 118132 char    *pass0 = "/lib/ccom";
<>119 -char    *passp = "/usr/libexec/cpp0";
  133+char    *passp = "/lib/cpp";
120134 char    *pref = "/usr/lib/crt0.o";
 121135 char    *dynlinker = "/usr/libexec/ld.elf_so";
<> 136+char    *sysinc;
122137 
 123138 int
 124139 main(argc, argv)
     
 !
156171                 case 'f': /* Ignore -ffreestanding */
 157172                         break;
 158173 
<> 174+                case 'i':
  175+                        if (strcmp(argv[i], "-isystem") == 0) {
  176+                                sysinc = argv[++i];
  177+                        } else
  178+                                goto passa;
  179+                        break;
  180+
159181                 case 'n': /* handle -n flags */
 160182                         if (strcmp(argv[i], "-nostdinc") == 0)
<>161 -                                goto diuc;
  183+                                nostdinc++;
162184                         else if (strcmp(argv[i], "-nostartfiles") == 0)
 163185                                 nostartfiles = 1;
 164186                         else
     
 !
212234                 case 'I':
 213235                 case 'U':
 214236                 case 'C':
<>215 -diuc:                   *pv++ = argv[i];
  237+                        *pv++ = argv[i];
216238                         if (pv >= ptemp+MAXOPT)
 217239                                 {
 218240                                 error("Too many DIUC options", 0);
     
 !
311333                 savetsp = tsp;
 312334                 na = 0;
 313335                 av[na++] = "cpp";
<>314 -                av[na++] = xflag ? "-lang-asm" : "-lang-c";
 315 -                av[na++] = "-$";
  336+                av[na++] = "-D__PCC__=" MKS(PCC_MAJOR);
  337+                av[na++] = "-D__PCC_MINOR__" MKS(PCC_MINOR);
  338+                if (!nostdinc)
  339+                        av[na++] = "-S " STDINC;
  340+                if (sysinc)
  341+                        av[na++] = "-S", av[na++] = sysinc;
316342                 for (j = 0; cppadd[j]; j++)
 317343                         av[na++] = cppadd[j];
 318344                 if (tflag)
<>319 -                        av[na++] = "-traditional";
  345+                        av[na++] = "-t";
320346                 for(pv=ptemp; pv <pvt; pv++)
 321347                         av[na++] = *pv;
 322348                 av[na++] = clist[i];
<>323 -                av[na++] = Eflag ? "-" : tmp4;
  349+                if (!Eflag)
  350+                        av[na++] = tmp4;
<_324351                 av[na++]=0;
 325352                 if (callsys(passp, av))
 326353                         {exfail++; 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-11-01 09:30 +0100