From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28915 invoked by alias); 28 Nov 2001 10:00:25 -0000 Mailing-List: contact gdb-patches-help@sourceware.cygnus.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 28712 invoked from network); 28 Nov 2001 10:00:18 -0000 Received: from unknown (HELO miranda.axis.se) (193.13.178.2) by hostedprojects.ges.redhat.com with SMTP; 28 Nov 2001 10:00:18 -0000 Received: from ironmaiden.axis.se (ironmaiden.axis.se [10.13.8.120]) by miranda.axis.se (8.12.1/8.12.1/Debian -2) with ESMTP id fASA09XX027787; Wed, 28 Nov 2001 11:00:10 +0100 Received: from axis.com (localhost [127.0.0.1]) by ironmaiden.axis.se (8.9.3/8.9.3/Debian 8.9.3-21) with ESMTP id LAA21654; Wed, 28 Nov 2001 11:00:09 +0100 X-Authentication-Warning: ironmaiden.axis.se: Host localhost [127.0.0.1] claimed to be axis.com Message-ID: <3C04B5A9.1F054A9F@axis.com> Date: Fri, 16 Nov 2001 14:02:00 -0000 From: Orjan Friberg Organization: Axis Communications AB X-Mailer: Mozilla 4.76 [en] (X11; U; Linux 2.2.19 i686) X-Accept-Language: en MIME-Version: 1.0 To: Eli Zaretskii CC: gdb-patches@sources.redhat.com Subject: Re: [RFC]: Solib search (Was: Re: Cross solib support; continued) References: <3BEAA3A0.586B3046@axis.com> <20011108110955.A12240@nevyn.them.org> <3C03AB51.DB27B3D4@axis.com> <3405-Tue27Nov2001175932+0200-eliz@is.elta.co.il> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-SW-Source: 2001-11/txt/msg00318.txt.bz2 Message-ID: <20011116140200.kCj8afZ9Ox8YYIkFWnFCG4Q30e3X5jdi899-CkgI9aE@z> Eli Zaretskii wrote: > > This is not how one should test for an absoulte file name portably, > and incrementing in_pathname by one is not how you portably make it a > relative file name. I suggest to use IS_ABSOLUTE_PATH for the first > and this for the second: > > while (!IS_DIR_SEPARATOR (*in_pathname++)) > ; If I understand you correctly, your suggestion is: if (found_file < 0 && IS_ABSOLUTE_PATH (in_pathname)) { while (!IS_DIR_SEPARATOR (*in_pathname++)) ; } That will only get rid of the first dir separator. To me it seems it should be something like: if (found_file < 0 && IS_ABSOLUTE_PATH (in_pathname)) { while (IS_DIR_SEPARATOR (*in_pathname)) in_pathname++; } (Can't use while (IS_DIR_SEPARATOR (*in_pathname++)) as it would remove the first non-dir separator also.) -- Orjan Friberg Axis Communications AB