delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2008/10/31/09:01:41

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
Message-ID: <f60fe000810310700y2ad69cc0gf8e1a795403bccf5@mail.gmail.com>
Date: Fri, 31 Oct 2008 10:00:50 -0400
From: "Mark J. Reed" <markjreed AT gmail DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: canonicalize_file_name
In-Reply-To: <490B0243.2040504@byu.net>
MIME-Version: 1.0
References: <001b01c93a65$97134460$4001a8c0 AT mycomputer> <49099F53 DOT 9060105 AT byu DOT net> <20081030121050 DOT GL6478 AT calimero DOT vinschen DOT de> <007f01c93abc$68806f40$4001a8c0 AT mycomputer> <20081031082454 DOT GB12818 AT calimero DOT vinschen DOT de> <f60fe000810310403k287b12few441d09d720f1d24d AT mail DOT gmail DOT com> <20081031111722 DOT GA14239 AT calimero DOT vinschen DOT de> <490B0243 DOT 2040504 AT byu DOT net>
X-IsSubscribed: yes
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 Fri, Oct 31, 2008 at 9:04 AM, Eric Blake wrote:
> POSIX 200x (which is on track to be approved later this year) has modified
> the requirements on realpath() that NULL be a universally accepted
> argument.

Oh, good.

> Not all vendors comply with this yet, but at some point, it
> will no longer be a GNU extension, but a POSIX-mandated requirement that
> realpath() be able to malloc its result.  This is part of the overall
> paradigm change in POSIX 200x that recognizes that it is legal to have
> paths longer than PATH_MAX

I haven't tested it, but IIRC,  GNU's version doesn't currently
support such paths, either.  It allocates the buffer for you if you
pass in NULL, but it still only allocates PATH_MAX bytes.

Thanks for the info.  Anything to improve that interaction is a
welcome change.  The idea of a "maximum path length" is demonstrably
bogus, while string functions that take a destination buffer but no
size parameter are just plain dangerous.

-- 
Mark J. Reed <markjreed AT gmail DOT com>

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