This patch adds -. to cpp and teaches cc to pass this through when -p is active. Reference: /n/sources/patch/applied/cpp-add-dash-dot Date: Thu Aug 16 00:33:53 CES 2007 Signed-off-by: nwfilardo@gmail.com --- /sys/src/cmd/cc/lex.c Thu Aug 16 00:33:55 2007 +++ /sys/src/cmd/cc/lex.c Thu Aug 16 00:33:54 2007 @@ -30,6 +30,7 @@ * -v verbose printing * -w print warnings * -X abort on error + * -. Inhibit search for includes in source directory */ void @@ -241,6 +242,10 @@ close(fd[1]); av[0] = CPP; i = 1; + if(debug['.']){ + sprint(opt, "-."); + av[i++] = strdup(opt); + } if(debug['+']) { sprint(opt, "-+"); av[i++] = strdup(opt); --- /sys/src/cmd/cpp/nlist.c Thu Aug 16 00:33:56 2007 +++ /sys/src/cmd/cpp/nlist.c Thu Aug 16 00:33:55 2007 @@ -63,6 +63,7 @@ static Token deftoken[1] = {{ NAME, 0, 0, 0, 7, (uchar*)"defined" }}; static Tokenrow deftr = { deftoken, deftoken, deftoken+1, 1 }; int debuginclude = 0; + int nodot = 0; char xx[2] = { 0, 0}; for (kp=kwtab; kp->kw; kp++) { @@ -148,6 +149,9 @@ case 'P': nolineinfo++; break; + case '.': + nodot++; + break; default: xx[0] = ARGC(); error(FATAL, "Unknown argument '%s'", xx); @@ -176,6 +180,8 @@ setobjname(fp); includelist[NINCLUDE-1].always = 0; includelist[NINCLUDE-1].file = dp; + if(nodot) + includelist[NINCLUDE-1].deleted = 1; setsource(fp, fd, NULL); if (debuginclude) { for (i=0; i