aboutsummaryrefslogtreecommitdiff
path: root/sys/cmd/cc/lex.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/cmd/cc/lex.c')
-rw-r--r--sys/cmd/cc/lex.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/cmd/cc/lex.c b/sys/cmd/cc/lex.c
index 8ce4e79..4cc1259 100644
--- a/sys/cmd/cc/lex.c
+++ b/sys/cmd/cc/lex.c
@@ -635,8 +635,8 @@ Dispatch:
}
sym = lookup(&lx->sym, tok.val.s);
- if (sym) {
- io = makeio();
+ if (sym && ((uintptr)sym->name != (uintptr)lx->io->path)) {
+ io = makeio(sym->name);
printf("EXPANDING MACRO %s\n", sym->name);
io->buf.end += expandmacro(lx, sym, io->b);
*io->buf.end++ = EOF;