delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2008/03/18/06:03:23

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
Date: Tue, 18 Mar 2008 12:02:46 +0100
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: Long path name support
Message-ID: <20080318110246.GW19345@calimero.vinschen.de>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <23fce8e60803180335v5f92c39bsf34a344f9254654a AT mail DOT gmail DOT com>
MIME-Version: 1.0
In-Reply-To: <23fce8e60803180335v5f92c39bsf34a344f9254654a@mail.gmail.com>
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 Mar 18 10:35, James Abley wrote:
> I've downloaded the source and had a look, but it's probably beyond my
> current level of C experience to do much with it. I'm working on
> fixing that. I was hoping it would be a case of switching out the
> type-library being used and altering an adaption layer to happily
> marshall where required to use the *W versions rather than the *A
> versions but that was a little naive of me.

If you have a close look you'll see that the current code is much less
complicated.  It uses the NT API as much as possible.  The main
difference is that you use UNICODE_STRING and OBJECT_ATTRIBUTES
structures to define files and directories, and that you need Win32 file
names given in WCHAR all the time.  Except for this difference, which
makes the code somewhat unusual from the Win32 perspective, the path
handling isn't really more complicated than before.  As a bonus, the NT
API allows to specify files or directories in a notation which
is not available on the Win32 level:

  file = { <directory handle>, <relative file name> }

That comes in handy once in a while.

> So, how best to help? Trying out the snapshots and seeing whether they
> work for me, or something else?

The best help is testing -> debugging -> sending patches.
The second best help is testing -> debugging -> sending simple testcases
in plain C which allow to reproduce the problem plus an idea what's
going wrong.
The third best help is testing -> sending simple testcases.

>  Are the changes for long path names
> happening in a branch which I could look at and get an idea of the
> changes that are required, to submit patches?

The changes are going on in mainline.  The branch is used for the
1.5.x series for some time now.

> I've tried just swapping in later snapshots of the cygwin1.dll, but I
> get GPFs when running bash at the moment, so I'm keen to know what I'm
> doing wrong there.

I just created a snapshot (2008-03-18) which allows to use long
pathnames.  Any older snapshot isn't complete on the API level.  Even
this latest snapshot is far from complete, but it should basically work.

However, the change to long path names introduces potential
compatibility problems with older applications, which are not problems
in Cygwin per se.   PATH_MAX was 260 up to 1.5.25-11.  Now it's
4096, but paths returned to applications can be potentially up to 32K(!)
in length.  Applications using fixed buffers of size PATH_MAX are bound
to be broken now when used with longer paths.

I'm going to prepare an anouncement for people who like to play with
this snapshot.  There are so many changes in the upcoming 1.7 release,
that I need some time to prepare a list which outlines what has changed.


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