aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorseyko <seyko2@gmail.com>2015-10-17 15:32:33 +0300
committerseyko <seyko2@gmail.com>2015-10-17 15:32:33 +0300
commitad524bb6c7de7134e1111343468949f74a19c0d8 (patch)
tree4bd3a46c8c49ac5e9eb5140506d85372280ef2e9
parent285292992f2aba288fb82cbd881a5882ac8cb44e (diff)
downloadtinycc-ad524bb6c7de7134e1111343468949f74a19c0d8.tar.gz
tinycc-ad524bb6c7de7134e1111343468949f74a19c0d8.tar.bz2
reverse a previous patch
a next version of the patch will follow
-rw-r--r--tccpp.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/tccpp.c b/tccpp.c
index 2564556..7ec0d44 100644
--- a/tccpp.c
+++ b/tccpp.c
@@ -1621,6 +1621,7 @@ ST_FUNC void preprocess(int is_bof)
for (i = -2; i < n; ++i) {
char buf1[sizeof file->filename];
CachedInclude *e;
+ BufferedFile **f;
const char *path;
if (i == -2) {
@@ -1650,7 +1651,8 @@ ST_FUNC void preprocess(int is_bof)
pstrcat(buf1, sizeof(buf1), buf);
if (tok == TOK_INCLUDE_NEXT)
- if (0 == PATHCMP(file->filename, buf1)) {
+ for (f = s1->include_stack_ptr; f >= s1->include_stack; --f)
+ if (0 == PATHCMP((*f)->filename, buf1)) {
#ifdef INC_DEBUG
printf("%s: #include_next skipping %s\n", file->filename, buf1);
#endif