delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2008/07/22/13:02:40

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
Date: Tue, 22 Jul 2008 19:02:26 +0200
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: 1.7.0-19: Still unexplained path problems
Message-ID: <20080722170226.GN5251@calimero.vinschen.de>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <6086F48CE8E1479DB51E00035DFD5B14 AT cit DOT wayne DOT edu> <20080722094517 DOT GF5251 AT calimero DOT vinschen DOT de> <4885CCBE DOT 8090305 AT byu DOT net> <20080722135643 DOT GA21785 AT calimero DOT vinschen DOT de> <488609E0 DOT 5F425C4B AT dessent DOT net>
MIME-Version: 1.0
In-Reply-To: <488609E0.5F425C4B@dessent.net>
User-Agent: Mutt/1.5.16 (2007-06-09)
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

On Jul 22 09:25, Brian Dessent wrote:
> Corinna Vinschen wrote:
> 
> > Can you create an strace of a testcase (building git or something)
> > which shows where and how the paths are generated?  Maybe we can
> > workaround this in Cygwin itself by tweaking paths missing a / or \
> > after the colon...
> 
> Here's a testcase:
> 
> $ cat >tc.c <<EOF
> #include <windows.h>
> #include <stdio.h>
> 
> int main()
> {
>   char buf[512];
>   
>   GetModuleFileName (NULL, buf, sizeof (buf));
>   puts (buf);
>   return 0;
> }
> EOF
> 
> $ gcc -mno-cygwin tc.c
> 
> $ ./a
> \\?\C:\cygwin\home\brian\testcases\native-argv0\a.exe

Thanks for the testcase.  I was looking into the path conversion code
but it works as expected.  It didn't occur to me that the problem might
be related to using the long path name syntax when creating processes
with CreateProcessW.  Since GetModuleFileName just returns the path
litarally as it has been specified in CreateProcess, native applications
relying on the content (and not being wide path capable) have a good
chance to fail.  I applied a patch to Cygwin which avoid this.  tclsh
and insight both work fine for me now.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019