[Top][All Lists]

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

Re: Make CVS HEAD version build out of the box

From: Paul Smith
Subject: Re: Make CVS HEAD version build out of the box
Date: Tue, 02 Oct 2007 21:39:04 -0400

On Tue, 2007-10-02 at 17:26 +0200, Eli Zaretskii wrote:
> What advantage is there in using alloca?

On UNIX it's useful because there's no realistic constant value
MAXPATHLEN that is guaranteed to be large enough to hold a full
pathname; different filesystems on UNIX can have different maximum path
lengths so the only way to know is to detect the value at runtime
through pathconf() or similar.  There are _minimum_ path lengths that
are required to be supported by every POSIX-conforming filesystem, but
no maximum (that I'm aware of).

So, alloca() is nice because it's dynamic.

This doesn't seem to be as much of an issue on Windows where the max
path length appears to be much more strictly defined.

 Paul D. Smith <address@hidden>          Find some GNU make tips at:            
 "Please remain calm...I may be mad, but I am a professional." --Mad Scientist

reply via email to

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