FILENAME_MAX & _POSIX_PATH_MAX relationship?

Henry Spencer henry at zoo.toronto.edu
Sun Apr 21 16:08:44 AEST 1991


Submitted-by: henry at zoo.toronto.edu (Henry Spencer)

In article <129469 at uunet.UU.NET> lewine at dg.uucp writes:
>... Most applications do not care 
>about the longest pathname the are guaranteed to be able to create.
>They need to know the longest pathname that will be encoundered.
>In other words, how much storage should be allocated for the user's
>response to a "File: " prompt.  Or, how large should the buffer be
>for getcwd().  Or, what is the longest path a file tree walk will
>encounter.  _POSIX_PATH_MAX, PATH_MAX and pathconf() do not give
>any insight into those questions.

Maybe because there is no answer to these questions?  There is *no limit*
to these lengths in some Unix systems, notably V6 and V7 of hallowed memory.
Programmers who hope to allocate fixed-sized arrays for these purposes are
simply demonstrating their laziness and ignorance.
-- 
And the bean-counter replied,           | Henry Spencer @ U of Toronto Zoology
"beans are more important".             |  henry at zoo.toronto.edu  utzoo!henry


Volume-Number: Volume 23, Number 36



More information about the Comp.std.unix mailing list