From: Alexey zaytsev <alexey.zaytsev@gmail.com>
To: Josh Triplett <josh@kernel.org>
Cc: Christoph Hellwig <hch@infradead.org>,
linux-sparse@vger.kernel.org, Sam Ravnborg <sam@ravnborg.org>,
Josh Triplett <josh@freedesktop.org>
Subject: [PATCH 4/4] Rename dirafter to idirafter.
Date: Mon, 08 Dec 2008 12:21:02 +0300 [thread overview]
Message-ID: <20081208092102.15890.51534.stgit@xl0.local> (raw)
In-Reply-To: <20081208091817.15890.27981.stgit@xl0.local>
Dirafter was probably just a mistake.
Gcc uses -idirafter.
Signed-off-by: Alexey zaytsev <alexey.zaytsev@gmail.com>
---
lib.c | 15 +++++----------
pre-process.c | 4 ++--
2 files changed, 7 insertions(+), 12 deletions(-)
diff --git a/lib.c b/lib.c
index b579834..7adff2d 100644
--- a/lib.c
+++ b/lib.c
@@ -313,6 +313,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;
}
@@ -573,15 +578,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;
@@ -599,7 +595,6 @@ 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)
next prev parent reply other threads:[~2008-12-08 9:11 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-08 9:20 [PATCH 0/4] Proper gcc header dir handling in sparse Alexey zaytsev
2008-12-08 9:20 ` [PATCH 1/4] Set gcc include path at runtime Alexey zaytsev
2008-12-09 10:08 ` Christoph Hellwig
2008-12-08 9:20 ` [PATCH 2/4] Let cgcc pass -gcc-base-dir to sparse Alexey zaytsev
2008-12-08 9:20 ` [PATCH 3/4] Document -gcc-base-dir in sparse.1 Alexey zaytsev
2008-12-08 9:21 ` Alexey zaytsev [this message]
2008-12-15 21:07 ` [PATCH 4/4] Rename dirafter to idirafter Sam Ravnborg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20081208092102.15890.51534.stgit@xl0.local \
--to=alexey.zaytsev@gmail.com \
--cc=hch@infradead.org \
--cc=josh@freedesktop.org \
--cc=josh@kernel.org \
--cc=linux-sparse@vger.kernel.org \
--cc=sam@ravnborg.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).