From 477f2e5fa91e4f93ae5341a5fc5b700f98b42c45 Mon Sep 17 00:00:00 2001 From: "H. Peter Anvin" Date: Fri, 30 May 2008 10:09:45 -0700 Subject: [PATCH] preproc.c: %include: use expand_smacros() not expand_smacros_in_string() Call expand_smacros() early instead of expand_smacros_in_string() late. expand_smacros_in_string() seems like a prodigiously bad idea and a sheer brainfart in my opinion. --- preproc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/preproc.c b/preproc.c index c42cdfd8..3b4c12f8 100644 --- a/preproc.c +++ b/preproc.c @@ -2061,7 +2061,7 @@ static int do_directive(Token * tline) return DIRECTIVE_FOUND; case PP_INCLUDE: - tline = tline->next; + tline = expand_smacros(tline->next); skip_white_(tline); if (!tline || (tline->type != TOK_STRING && tline->type != TOK_INTERNAL_STRING)) { @@ -2077,7 +2077,6 @@ static int do_directive(Token * tline) p[strlen(p) - 1] = '\0'; /* remove the trailing quote */ } else p = tline->text; /* internal_string is easier */ - expand_macros_in_string(&p); inc = nasm_malloc(sizeof(Include)); inc->next = istk; inc->conds = NULL; -- 2.11.4.GIT