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 <[EMAIL PROTECTED]>          Find some GNU make tips at:
 http://www.gnu.org                      http://make.mad-scientist.us
 "Please remain calm...I may be mad, but I am a professional." --Mad Scientist


_______________________________________________
Make-w32 mailing list
Make-w32@gnu.org
http://lists.gnu.org/mailman/listinfo/make-w32

Reply via email to