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: Long path name support


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/


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