aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/tokenize.c
diff options
authorSam Ravnborg <sam@ravnborg.org>2005-01-18 16:15:25 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-07 21:06:15 -0700
commit99efcabf79a1d6c5c48fa29abc8a895009b4aa72 (patch)
tree0350282f9f05435c3c7417bb63090a205be4e571 /tokenize.c
parent423e91dbdcd2ee723ea8955ace6cf8749525f21a (diff)
downloadsparse-dev-99efcabf79a1d6c5c48fa29abc8a895009b4aa72.tar.gz
[PATCH] make include path handling gcc compatible
Search include paths in same order as gcc does. In other words search directories specified with -I before system directories. This fixes a bug reported by a few persons after the kernel switched over to use -isystem to specify where to find compiler specific include files. Sparse now supports the following include path relevant options: -I dir Add dir to list of directories to search for. Search dir before system dirs. Used for both <> and "" includes. -I- Split include path - previous -I dir paths only used for include "". Also disable searching same dir as input file. -isystem dir Add dir first in row of system dirs to search. -dirafter dir Add dir in end of system dirs to search. -nostdinc Discard all defined system dirs The -iwithprefix, -iprefix and -iwithprefixbefore options are not not supported and silently ignored. gcc discourage use of these options.
Diffstat (limited to 'tokenize.c')
-rw-r--r--tokenize.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/tokenize.c b/tokenize.c
index ad521897..b0eb2648 100644
--- a/tokenize.c
+++ b/tokenize.c
@@ -185,6 +185,7 @@ int init_stream(const char *name, int fd, const char **next_path)
current->name = name;
current->fd = fd;
current->next_path = next_path;
+ current->path = NULL;
current->constant = CONSTANT_FILE_MAYBE;
input_stream_nr = stream+1;
return stream;