This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: 1.7.0-19: Still unexplained path problems


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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]