aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
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 /token.h
parentEvaluate asm outputs as assignments. (diff)
downloadsparse-99efcabf79a1d6c5c48fa29abc8a895009b4aa72.tar.gz
sparse-99efcabf79a1d6c5c48fa29abc8a895009b4aa72.tar.bz2
sparse-99efcabf79a1d6c5c48fa29abc8a895009b4aa72.zip
[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 'token.h')
-rw-r--r--token.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/token.h b/token.h
index c7bca7a..31c884c 100644
--- a/token.h
+++ b/token.h
@@ -35,6 +35,7 @@ extern const char *includepath[];
struct stream {
int fd;
const char *name;
+ const char *path; // inputfile path - see set_stream_include_path()
const char **next_path;
/* Use these to check for "already parsed" */