From: dje@google.com (Doug Evans)
To: gdb-patches@sourceware.org
Subject: [commit] Strip DOS drive letter in openp
Date: Wed, 14 Apr 2010 21:27:00 -0000 [thread overview]
Message-ID: <20100414212745.75E5B84396@ruffy.mtv.corp.google.com> (raw)
Hi.
I've checked in this patch which strips a DOS drive spec if present
before concatenating string with the search path.
This is in reference to this thread:
http://sourceware.org/ml/gdb-patches/2010-04/msg00110.html
and in particular:
http://sourceware.org/ml/gdb-patches/2010-04/msg00277.html
2010-04-14 Doug Evans <dje@google.com>
* source.c (openp): Strip DOS drive letter if present before
concatenating string to search path.
Index: source.c
===================================================================
RCS file: /cvs/src/src/gdb/source.c,v
retrieving revision 1.109
diff -u -p -r1.109 source.c
--- source.c 8 Apr 2010 21:08:39 -0000 1.109
+++ source.c 14 Apr 2010 21:18:59 -0000
@@ -724,6 +724,10 @@ openp (const char *path, int opts, const
goto done;
}
+ /* For dos paths, d:/foo -> /foo, and d:foo -> foo. */
+ if (HAS_DRIVE_SPEC (string))
+ string = STRIP_DRIVE_SPEC (string);
+
/* /foo => foo, to avoid multiple slashes that Emacs doesn't like. */
while (IS_DIR_SEPARATOR(string[0]))
string++;
next reply other threads:[~2010-04-14 21:27 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-14 21:27 Doug Evans [this message]
2010-04-14 21:52 ` Mark Kettenis
2010-04-14 22:06 ` Doug Evans
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=20100414212745.75E5B84396@ruffy.mtv.corp.google.com \
--to=dje@google.com \
--cc=gdb-patches@sourceware.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