aboutsummaryrefslogtreecommitdiff
path: root/tcc.h
diff options
context:
space:
mode:
authorgrischka <grischka>2013-01-06 17:20:44 +0100
committergrischka <grischka>2013-01-06 17:20:44 +0100
commit2358b378b3cd526956713f033f5a0ecaa5f63951 (patch)
tree5b67d60c2992994e629276cbd0ff313d5219c716 /tcc.h
parente92dbe46869085d04544904b21c02991c226a828 (diff)
downloadtinycc-2358b378b3cd526956713f033f5a0ecaa5f63951.tar.gz
tinycc-2358b378b3cd526956713f033f5a0ecaa5f63951.tar.bz2
tccpp: alternative fix for #include_next infinite loop bug
This replaces commit 3d409b08893873b917ccb8c34398bc41a4e84d7c - revert old fix in libtcc.c - #include_next: look up the file in the include stack to see if it is already included. Also: - streamline include code - remove 'type' from struct CachedInclude (obsolete because we check full filename anyway) - remove inc_type & inc_filename from struct Bufferedfile (obsolete) - fix bug with TOK_FLAG_ENDIF not being reset - unrelated: get rid of an 'variable potentially uninitialized' warning
Diffstat (limited to 'tcc.h')
-rw-r--r--tcc.h5
1 files changed, 1 insertions, 4 deletions
diff --git a/tcc.h b/tcc.h
index 8e79430..5489b49 100644
--- a/tcc.h
+++ b/tcc.h
@@ -422,9 +422,7 @@ typedef struct BufferedFile {
int ifndef_macro; /* #ifndef macro / #endif search */
int ifndef_macro_saved; /* saved ifndef_macro */
int *ifdef_stack_ptr; /* ifdef_stack value at the start of the file */
- char inc_type; /* type of include */
- char inc_filename[512]; /* filename specified by the user */
- char filename[1024]; /* current filename - here to simplify code */
+ char filename[1024]; /* filename */
unsigned char buffer[IO_BUF_SIZE + 1]; /* extra size for CH_EOB char */
} BufferedFile;
@@ -460,7 +458,6 @@ typedef struct InlineFunc {
typedef struct CachedInclude {
int ifndef_macro;
int hash_next; /* -1 if none */
- char type; /* '"' or '>' to give include type */
char filename[1]; /* path specified in #include */
} CachedInclude;