Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: "Pierre Muller" <pierre.muller@ics-cnrs.unistra.fr>
To: <gdb-patches@sourceware.org>
Subject: RE: [RFA] Re: [RFC-v2] Reenable compilation with cygwin 1.5  versions
Date: Mon, 08 Mar 2010 23:15:00 -0000	[thread overview]
Message-ID: <000c01cabf15$4ff75c70$efe61550$@muller@ics-cnrs.unistra.fr> (raw)
In-Reply-To: <20100308221127.GB18247@ednor.casa.cgf.cx>

> -----Message d'origine-----
> De : gdb-patches-owner@sourceware.org [mailto:gdb-patches-
> owner@sourceware.org] De la part de Christopher Faylor
> Envoyé : Monday, March 08, 2010 11:11 PM
> À : gdb-patches@sourceware.org; Pierre Muller
> Objet : Re: [RFA] Re: [RFC-v2] Reenable compilation with cygwin 1.5
> versions
> 
> 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.

 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 
argument, might lead later to similar problems encountered
here now.



Index: windows-nat.c
===================================================================
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 == 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 = 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 +1951,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


  reply	other threads:[~2010-03-08 23:15 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-03 16:54 [RFC] " Pierre Muller
2010-03-03 17:14 ` Corinna Vinschen
2010-03-03 20:30 ` Christopher Faylor
2010-03-04 15:32   ` [RFC-v2] " Pierre Muller
2010-03-04 16:38     ` Christopher Faylor
2010-03-06 19:27       ` Christopher Faylor
2010-03-08 16:02         ` [RFA] " Pierre Muller
2010-03-08 22:11           ` Christopher Faylor
2010-03-08 23:15             ` Pierre Muller [this message]
2010-03-09 19:12               ` Christopher Faylor

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='000c01cabf15$4ff75c70$efe61550$@muller@ics-cnrs.unistra.fr' \
    --to=pierre.muller@ics-cnrs.unistra.fr \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox