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

Re: [SAGE] wither NAME_MAX?



> I've recently been trying to compile a small C program on my Solaris 8
> system which uses the (I thought) standard NAME_MAX constant as the
> maximum number of chars in a file name (directory entry).  I'm including
> both limits.h and unistd.h but getting an undefined symbol error during
> compilation.  I'm using gcc v3.2.

14 = _POSIX_NAME_MAX <= NAME_MAX
Max. length of filename entry excluding '\0'.

 From IEEE Std. 1003.1b-1993, section 2.8.5 Pathname Variable Values:

"
The values in table 2.6 may be constants within an implementation 
or may vary from one pathname to another.

For example, file systms or directories may have different 
characteristics.

A defination of one of the values from table 2.6 shall be omitted 
from <limits.h> on specific implementations where the 
corresponding value is equal to or greater than the stated 
minimum, but where the value can vary depending on the file to 
which it is applied.  The actual value supported for a specific 
pathname shall be provided by the pathconf() function.
"

-- 
Anthony C Howe                            +33 6 11 89 73 78
http://www.snert.com/     ICQ: 7116561      AIM: Sir Wumpus
"Will the real email please stand up..."