mirror of
https://github.com/frida/tinycc
synced 2024-12-26 23:09:41 +03:00
fix for the #include_next
skip include file only if include_file_name=current_file_name
This commit is contained in:
parent
c3975cf27c
commit
285292992f
4
tccpp.c
4
tccpp.c
@ -1621,7 +1621,6 @@ 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) {
|
||||
@ -1651,8 +1650,7 @@ ST_FUNC void preprocess(int is_bof)
|
||||
pstrcat(buf1, sizeof(buf1), buf);
|
||||
|
||||
if (tok == TOK_INCLUDE_NEXT)
|
||||
for (f = s1->include_stack_ptr; f >= s1->include_stack; --f)
|
||||
if (0 == PATHCMP((*f)->filename, buf1)) {
|
||||
if (0 == PATHCMP(file->filename, buf1)) {
|
||||
#ifdef INC_DEBUG
|
||||
printf("%s: #include_next skipping %s\n", file->filename, buf1);
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user