From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29661 invoked by alias); 14 Apr 2010 21:27:54 -0000 Received: (qmail 29652 invoked by uid 22791); 14 Apr 2010 21:27:53 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (216.239.44.51) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 14 Apr 2010 21:27:49 +0000 Received: from hpaq12.eem.corp.google.com (hpaq12.eem.corp.google.com [10.3.21.12]) by smtp-out.google.com with ESMTP id o3ELRlSf029943 for ; Wed, 14 Apr 2010 14:27:47 -0700 Received: from ruffy.mtv.corp.google.com (ruffy.mtv.corp.google.com [172.18.118.116]) by hpaq12.eem.corp.google.com with ESMTP id o3ELRj3l010938 for ; Wed, 14 Apr 2010 23:27:46 +0200 Received: by ruffy.mtv.corp.google.com (Postfix, from userid 67641) id 75E5B84396; Wed, 14 Apr 2010 14:27:45 -0700 (PDT) To: gdb-patches@sourceware.org Subject: [commit] Strip DOS drive letter in openp Message-Id: <20100414212745.75E5B84396@ruffy.mtv.corp.google.com> Date: Wed, 14 Apr 2010 21:27:00 -0000 From: dje@google.com (Doug Evans) X-System-Of-Record: true X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2010-04/txt/msg00456.txt.bz2 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 * 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++;