aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexey Zaytsev <alexey.zaytsev@gmail.com>2008-12-18 20:22:27 +0300
committerAlexey Zaytsev <alexey.zaytsev@gmail.com>2008-12-18 21:11:00 +0300
commit5cba08a5cf79205e324f4c50d3a58177693bdf92 (patch)
treeb0ea3e9a507670959110c3a16c3c98f469f76931
parentace0046beb4a2bcd461239b5a96156fa6d3e68a1 (diff)
downloadsparse-5cba08a5cf79205e324f4c50d3a58177693bdf92.tar.gz
sparse-5cba08a5cf79205e324f4c50d3a58177693bdf92.tar.xz
sparse-5cba08a5cf79205e324f4c50d3a58177693bdf92.zip
Rename dirafter to idirafter.
Dirafter was probably just a mistake. Gcc uses -idirafter. Acked-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Alexey zaytsev <alexey.zaytsev@gmail.com>
-rw-r--r--lib.c15
-rw-r--r--pre-process.c4
2 files changed, 7 insertions, 12 deletions
diff --git a/lib.c b/lib.c
index 45a4f39..dc2da14 100644
--- a/lib.c
+++ b/lib.c
@@ -321,6 +321,11 @@ static char **handle_switch_i(char *arg, char **next)
if (!path)
die("missing argument for -isystem option");
add_pre_buffer("#add_isystem \"%s/\"\n", path);
+ } else if (*next && !strcmp(arg, "idirafter")) {
+ char *path = *++next;
+ if (!path)
+ die("missing argument for -idirafter option");
+ add_pre_buffer("#add_dirafter \"%s/\"\n", path);
}
return next;
}
@@ -584,15 +589,6 @@ static char **handle_nostdinc(char *arg, char **next)
return next;
}
-static char **handle_dirafter(char *arg, char **next)
-{
- char *path = *++next;
- if (!path)
- die("missing argument for -dirafter option");
- add_pre_buffer("#add_dirafter \"%s/\"\n", path);
- return next;
-}
-
static char **handle_base_dir(char *arg, char **next)
{
gcc_base_dir = *++next;
@@ -610,7 +606,6 @@ static char **handle_switch(char *arg, char **next)
{
static struct switches cmd[] = {
{ "nostdinc", handle_nostdinc },
- { "dirafter", handle_dirafter },
{ "gcc-base-dir", handle_base_dir},
{ NULL, NULL }
};
diff --git a/pre-process.c b/pre-process.c
index 9c6ef5b..cf53893 100644
--- a/pre-process.c
+++ b/pre-process.c
@@ -682,10 +682,10 @@ static int already_tokenized(const char *path)
* angle_includepath is set equal to isys_includepath.
* -nostdinc removes all sys dirs by storing NULL in entry pointed
* to by * sys_includepath. Note that this will reset all dirs built-in
- * and added before -nostdinc by -isystem and -dirafter.
+ * and added before -nostdinc by -isystem and -idirafter.
* -isystem dir adds dir where isys_includepath points adding this dir as
* first systemdir
- * -dirafter dir adds dir to the end of the list
+ * -idirafter dir adds dir to the end of the list
*/
static void set_stream_include_path(struct stream *stream)