From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4038 invoked by alias); 8 Mar 2010 23:15:59 -0000 Received: (qmail 4022 invoked by uid 22791); 8 Mar 2010 23:15:58 -0000 X-SWARE-Spam-Status: No, hits=-0.3 required=5.0 tests=AWL,BAYES_00,MSGID_MULTIPLE_AT X-Spam-Check-By: sourceware.org Received: from mailhost.u-strasbg.fr (HELO mailhost.u-strasbg.fr) (130.79.200.153) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 08 Mar 2010 23:15:54 +0000 Received: from baal.u-strasbg.fr (baal.u-strasbg.fr [IPv6:2001:660:2402::41]) by mailhost.u-strasbg.fr (8.14.2/jtpda-5.5pre1) with ESMTP id o28NFpXE043939 for ; Tue, 9 Mar 2010 00:15:51 +0100 (CET) (envelope-from pierre.muller@ics-cnrs.unistra.fr) Received: from mailserver.u-strasbg.fr (ms3.u-strasbg.fr [IPv6:2001:660:2402:d::12]) by baal.u-strasbg.fr (8.14.0/jtpda-5.5pre1) with ESMTP id o28NFpNb041043 for ; Tue, 9 Mar 2010 00:15:51 +0100 (CET) (envelope-from pierre.muller@ics-cnrs.unistra.fr) Received: from d620muller (lec67-4-82-230-53-140.fbx.proxad.net [82.230.53.140]) (user=mullerp mech=LOGIN) by mailserver.u-strasbg.fr (8.14.3/jtpda-5.5pre1) with ESMTP id o28NFofN065978 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NO) for ; Tue, 9 Mar 2010 00:15:51 +0100 (CET) (envelope-from pierre.muller@ics-cnrs.unistra.fr) From: "Pierre Muller" To: 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> <20100308221127.GB18247@ednor.casa.cgf.cx> In-Reply-To: <20100308221127.GB18247@ednor.casa.cgf.cx> Subject: RE: [RFA] Re: [RFC-v2] Reenable compilation with cygwin 1.5 versions Date: Mon, 08 Mar 2010 23:15:00 -0000 Message-ID: <000c01cabf15$4ff75c70$efe61550$@muller@ics-cnrs.unistra.fr> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable 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/msg00344.txt.bz2 > -----Message d'origine----- > De=A0: gdb-patches-owner@sourceware.org [mailto:gdb-patches- > owner@sourceware.org] De la part de Christopher Faylor > Envoy=E9=A0: Monday, March 08, 2010 11:11 PM > =C0=A0: gdb-patches@sourceware.org; Pierre Muller > Objet=A0: Re: [RFA] Re: [RFC-v2] Reenable compilation with cygwin 1.5 > versions >=20 > On Mon, Mar 08, 2010 at 05:02:24PM +0100, Pierre Muller wrote: > >Are these patches OK? >=20 > 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. As long as it allows use of old Cygwin API, I am happy. I checked your patch, but it still does not work completely (but this error was also in the one I submitted ...): The problem is that cygwin_conv_path function is called 4 times in windows-nat.c, two with CCP_WIN_W_TO_POSIX, for which old API function cygwin_conv_to_full_posix_path is fine, but also 2 times with CCP_POSIX_TO_WIN_W which should call cygwin_conv_to_win32_path. I adapted your version to get a running version with old Cygwin, feel free to commit it if you find it OK. Pierre PS: Concerning the remote-fileio.c code, I fear that using the earlier simpler approach of simple cygwin_conv_path macro definition discarding the first=20 argument, might lead later to similar problems encountered here now. Index: windows-nat.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /cvs/src/src/gdb/windows-nat.c,v retrieving revision 1.205 diff -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 23:11:28 -0000 @@ -115,13 +115,19 @@ static struct target_ops windows_ops; # define GetModuleFileNameEx_name "GetModuleFileNameExW" # define bad_GetModuleFileNameEx bad_GetModuleFileNameExW # else -# define cygwin_conv_path(op, from, to, size) cygwin_conv_to_full_posix_path (from, to) +# define CCP_POSIX_TO_WIN_W 1 +# define CCP_WIN_W_TO_POSIX 3 +# define cygwin_conv_path(op, from, to, size) \ + (op =3D=3D CCP_WIN_W_TO_POSIX) ? \ + cygwin_conv_to_full_posix_path (from, to) : \ + cygwin_conv_to_win32_path (from, to) typedef char cygwin_buf_t; static DWORD WINAPI (*GetModuleFileNameEx) (HANDLE, HMODULE, LPSTR, DWORD); # define STARTUPINFO STARTUPINFOA # 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 +712,7 @@ windows_make_so (const char *name, LPVOI SO_NAME_MAX_PATH_SIZE); else { - char *rname =3D canonicalize_file_name (name); + char *rname =3D realpath (name, NULL); if (rname && strlen (rname) < SO_NAME_MAX_PATH_SIZE) { strcpy (so->so_name, rname); @@ -1945,6 +1951,8 @@ windows_create_inferior (struct target_o error (_("Error starting executable: %d"), errno); cygallargs =3D (wchar_t *) alloca (len * sizeof (wchar_t)); mbstowcs (cygallargs, allargs, len); +#else + cygallargs =3D allargs; #endif } else