From 37999a4fbf3487b363fd0c2f9b7ab622401b202a Mon Sep 17 00:00:00 2001 From: Larry Doolittle Date: Tue, 25 Apr 2017 12:32:41 -0700 Subject: 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. --- tcc.h | 1 + 1 file changed, 1 insertion(+) (limited to 'tcc.h') 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; -- cgit v1.3.1