From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26465 invoked by alias); 8 Mar 2010 22:11:34 -0000 Received: (qmail 26457 invoked by uid 22791); 8 Mar 2010 22:11:33 -0000 X-Spam-Check-By: sourceware.org Received: from pool-96-252-118-25.bstnma.fios.verizon.net (HELO cgf.cx) (96.252.118.25) by sourceware.org (qpsmtpd/0.83/v0.83-20-g38e4449) with ESMTP; Mon, 08 Mar 2010 22:11:29 +0000 Received: from ednor.cgf.cx (ednor.casa.cgf.cx [192.168.187.5]) by cgf.cx (Postfix) with ESMTP id A764A13C0C8; Mon, 8 Mar 2010 17:11:27 -0500 (EST) Received: by ednor.cgf.cx (Postfix, from userid 201) id A22A52B352; Mon, 8 Mar 2010 17:11:27 -0500 (EST) Date: Mon, 08 Mar 2010 22:11:00 -0000 From: Christopher Faylor To: gdb-patches@sourceware.org, Pierre Muller Subject: Re: [RFA] Re: [RFC-v2] Reenable compilation with cygwin 1.5 versions Message-ID: <20100308221127.GB18247@ednor.casa.cgf.cx> Mail-Followup-To: gdb-patches@sourceware.org, Pierre Muller References: <002701cabaf2$39739ad0$ac5ad070$@muller@ics-cnrs.unistra.fr> <20100303203012.GA31597@ednor.casa.cgf.cx> <001901cabbaf$ebe7fa40$c3b7eec0$@muller@ics-cnrs.unistra.fr> <20100304163838.GC12505@ednor.casa.cgf.cx> <20100306192722.GA13824@ednor.casa.cgf.cx> <000601cabed8$be2c0610$3a841230$@muller@ics-cnrs.unistra.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <000601cabed8$be2c0610$3a841230$@muller@ics-cnrs.unistra.fr> User-Agent: Mutt/1.5.20 (2009-06-14) 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-03/txt/msg00340.txt.bz2 On Mon, Mar 08, 2010 at 05:02:24PM +0100, Pierre Muller wrote: >Are these patches OK? Although I didn't really succed in windows_create_inferior, the goal here is to reduce the amount of ifdef clutter in the code. So, I'd propose the below as a slightly less alternative to your version. cgf Index: windows-nat.c =================================================================== RCS file: /cvs/src/src/gdb/windows-nat.c,v retrieving revision 1.205 diff -d -u -p -r1.205 windows-nat.c --- windows-nat.c 6 Mar 2010 19:27:09 -0000 1.205 +++ windows-nat.c 8 Mar 2010 22:08:07 -0000 @@ -122,6 +122,7 @@ static struct target_ops windows_ops; # define CreateProcess CreateProcessA # define GetModuleFileNameEx_name "GetModuleFileNameExA" # define bad_GetModuleFileNameEx bad_GetModuleFileNameExA +# define CW_SET_DOS_FILE_WARNING -1 /* no-op this for older Cygwin */ # endif #endif @@ -706,7 +707,7 @@ windows_make_so (const char *name, LPVOI SO_NAME_MAX_PATH_SIZE); else { - char *rname = canonicalize_file_name (name); + char *rname = realpath (name, NULL); if (rname && strlen (rname) < SO_NAME_MAX_PATH_SIZE) { strcpy (so->so_name, rname); @@ -1945,6 +1946,8 @@ windows_create_inferior (struct target_o error (_("Error starting executable: %d"), errno); cygallargs = (wchar_t *) alloca (len * sizeof (wchar_t)); mbstowcs (cygallargs, allargs, len); +#else + cygallargs = allargs; #endif } else