X-Recipient: archive-cygwin@delorie.com
X-Spam-Check-By: sourceware.org
Message-ID: <488609E0.5F425C4B@dessent.net>
Date: Tue, 22 Jul 2008 09:25:04 -0700
From: Brian Dessent <brian@dessent.net>
X-Mailer: Mozilla 4.79 [en] (Windows NT 5.0; U)
MIME-Version: 1.0
To: cygwin@cygwin.com
Subject: Re: 1.7.0-19: Still unexplained path problems
References: <6086F48CE8E1479DB51E00035DFD5B14@cit.wayne.edu> <20080722094517.GF5251@calimero.vinschen.de> <4885CCBE.8090305@byu.net> <20080722135643.GA21785@calimero.vinschen.de>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-IsSubscribed: yes
Reply-To: cygwin@cygwin.com
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

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

You can also reproduce this just by running "tclsh".  The problem is
that tcl is a native app and uses the w32api directly, and so these
native paths leak into it and it's un-equipped to use them properly.

Brian

--
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/

