delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/11/17/05:56:50

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/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
Date: Mon, 17 Nov 2003 11:56:35 +0100
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: For masochists: the leap o faith
Message-ID: <20031117105635.GD18706@cygbert.vinschen.de>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <3FB4D81C DOT 6010808 AT cygwin DOT com> <3FB53BAE DOT 3000803 AT cygwin DOT com> <20031114220708 DOT GA26100 AT redhat DOT com> <3FB55BCE DOT 8030304 AT cygwin DOT com> <20031115044347 DOT GA29583 AT redhat DOT com> <1068883645 DOT 1109 DOT 122 DOT camel AT localhost> <20031115164534 DOT GB3039 AT redhat DOT com> <20031115165229 DOT GA3296 AT redhat DOT com> <Pine DOT GSO DOT 4 DOT 56 DOT 0311151259270 DOT 922 AT eos> <1068930608 DOT 1109 DOT 172 DOT camel AT localhost>
Mime-Version: 1.0
In-Reply-To: <1068930608.1109.172.camel@localhost>
User-Agent: Mutt/1.4.1i

On Sun, Nov 16, 2003 at 08:10:08AM +1100, Robert Collins wrote:
> Chris has noted that posixly correct behaviour and common practice may
> diverge. I think for this scenario, that posix behaviour allows the most
> accurate representation of the variety programs may encounter on cygwin
> at runtime. Therefore we'll get the best results (and perhaps uncover a
> few portability bugs) going that way.
> 
> We have two choices (no particular order of preference):
> a) make MAX_PATH and posix friends the maximum length path cygwin will
> accept/return. Return ENAMETOOLONG on path calls on win9x, or winnt
> FAT[32] calls. Update pathconf to return appropriate values.
> b) blow away MAX_PATH and MAXPATHLEN so that programs using cygwin
> fallback to pathconf, or 'good enough for me' static arrays.  Update
> pathconf to return appropriate values.

Well, I guess you meant PATH_MAX here.  Just to reiterate, MAX_PATH is
a Windows specific constant, giving a maximum size for path names when
using ASCII mode.  Even this MAX_PATH constant doesn't actually reflect
the maximum path length possible in all cases:  CreateDirectory for
instance can only create directories with a path length up to 248
characters.  So even on native Windows, the constant is used as an upper
limit, e. g. usable for static buffer sizes in applications.  Having
said that, however, you must not change MAX_PATH.

I would prefer to change PATH_MAX and MAXPATHLEN to an arbitrary big
value as, e. g. the same as on Linux, 4096, or even the biggest possible
plus one: 32768.  The latter is probably the better value.  So my choice
is a)

Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Developer                                mailto:cygwin AT cygwin DOT com
Red Hat, Inc.

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