aboutsummaryrefslogtreecommitdiff
path: root/tcc.h
diff options
context:
space:
mode:
authorLarry Doolittle <ldoolitt@recycle.lbl.gov>2017-04-25 12:32:41 -0700
committerLarry Doolittle <ldoolitt@recycle.lbl.gov>2017-04-25 12:32:41 -0700
commit37999a4fbf3487b363fd0c2f9b7ab622401b202a (patch)
tree7301dc7732f5348de1d489346e8c63874ad757ac /tcc.h
parent7acf9aa86275a24b468786d6ea9f308ae33f011c (diff)
downloadtinycc-37999a4fbf3487b363fd0c2f9b7ab622401b202a.tar.gz
tinycc-37999a4fbf3487b363fd0c2f9b7ab622401b202a.tar.bz2
Simple-minded fix for bug #50847
bug #50847: #line directive corrupts #include search path Keep a second copy of the filename, that isn't changed by the #line directive, and use that on the initial search path for #include files.
Diffstat (limited to 'tcc.h')
-rw-r--r--tcc.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/tcc.h b/tcc.h
index 41ad1ab..ae7bb30 100644
--- a/tcc.h
+++ b/tcc.h
@@ -546,6 +546,7 @@ typedef struct BufferedFile {
int *ifdef_stack_ptr; /* ifdef_stack value at the start of the file */
int include_next_index; /* next search path */
char filename[1024]; /* filename */
+ char filename2[1024]; /* filename not modified by # line directive */
unsigned char unget[4];
unsigned char buffer[1]; /* extra size for CH_EOB char */
} BufferedFile;