[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnu-arch-users] Arch On Cygwin(Win32)

From: Robert Collins
Subject: Re: [Gnu-arch-users] Arch On Cygwin(Win32)
Date: Tue, 18 Nov 2003 06:57:30 +1100

On Tue, 2003-11-18 at 03:52, John Kinson wrote:
> I'd been spending some time making the same changes to Cygwin, but gave 
> up when the scale of the task became apparent.  Cygwin uses both 
> PATH_MAX and MAX_PATH literals, and the side effects from changing these 
> caused core dumps in other areas.  This is a high-risk change to Cygwin, 
> which has already been pointed out.

What did you change them to? Did you find that methods on objects where
getting called with invalid 'this' pointers? And that the problem only
occured on stack based objects with a footprint > ~ 4K ?

If so, check the assembly, I strongly suspect it's a g++ issue, and have
a second hand report (good quality 2nd hand, but as there is no formal
test case..) that it is, and has been fixed in g++ 3.3.x. We should be
able to get a fix into cygwin gcc relatively easily, once we have a test

> Having looked at the POSIX spec though, I'm not sure Cygwin should be 
> changed at all.  The spec states (see 
> that PATH_MAX should have a Minimum Acceptable Value of _POSIX_PATH_MAX. 
>   _POSIX_PATH_MAX is defined by POSIX to be 256.
> POSIX also states the following:

Actually, cygwin doesn't come close to the posix minumum. The MAX_PATH
define from the win32 headers applies to the paths used by cygwin. So
when you mount (for instance) c:\documents and settings\John as
/home/john/, you've lost ~20 characters silently. Add in server based
resources (mounted via \\ ... \ ....  and it gets worse.

>  I just hacked 
> successfully safe_mkdir to call CreateDirectoryW as a proof of concept, 
> and this would seem *much* easier than the Cygwin patch...  Any 
> drawbacks to this approach?

It's ugly. It won't work. That should be enough.

Ugly I covered in my other email. As for working: you need to address
all the external tools:

as a minimum.

Tell me that porting all of them to use win32 IO calls is easier than
fixing it in one place?

GPG key available at: <>.

Attachment: signature.asc
Description: This is a digitally signed message part

reply via email to

[Prev in Thread] Current Thread [Next in Thread]