tccpp: cleanup #include_next

tcc_normalize_inc_dirs: normally no problem to be absolutly
gcc compatible as long as it can be done the tiny way.

This reverts to the state before recent related commits and
reimplements a (small) part of it to fix the reported problem.


Also: Revert "parsing "..." sequence"
c3975cf27c

	&& p[1] == '.'

is not a reliable way to lookahead
This commit is contained in:
grischka
2015-11-20 12:05:55 +01:00
parent 54cf57ab1a
commit 0b3612631f
3 changed files with 46 additions and 127 deletions

2
tcc.h
View File

@ -536,10 +536,10 @@ typedef struct BufferedFile {
struct BufferedFile *prev;
int line_num; /* current line number - here to simplify code */
int line_ref; /* tcc -E: last printed line */
int inc_path_index;
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 */
int include_next_index; /* next search path */
char filename[1024]; /* filename */
unsigned char unget[4];
unsigned char buffer[1]; /* extra size for CH_EOB char */