Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [commit] Strip DOS drive letter in openp
@ 2010-04-14 21:27 Doug Evans
  2010-04-14 21:52 ` Mark Kettenis
  0 siblings, 1 reply; 3+ messages in thread
From: Doug Evans @ 2010-04-14 21:27 UTC (permalink / raw)
  To: gdb-patches

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++;


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-04-14 22:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-04-14 21:27 [commit] Strip DOS drive letter in openp Doug Evans
2010-04-14 21:52 ` Mark Kettenis
2010-04-14 22:06   ` Doug Evans

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox