Hi,
> Then maybe it would be safer to use the same size as defined in
> "linux/limits.h".
>
> #define PATH_MAX 4096 /* # chars in a path name including nul */
>
> This patch does not change anything for systems which PATH_MAX is
> defined, and this number will not create an issue for GNU/Hurd. WDYT?
It seems that there is no certain basis.
Instead, I have found a guideline as follows on the Net.
>> Note 2: Yes, some POSIX functions such as realpath() actually assume
>> that PATH_MAX is defined. This is a bug of the POSIX standard, which
>> got fixed in the latest revisions, in which one can simply pass NULL
>> to get a dynamically allocated buffer.
I would like to rewrite code like this.
#ifdef __GNU__
result = realpath(start, NULL);
#else
result = realpath(start, buffer);
#endif
Systems which have no PATH_MAX other than hurd will foll on
a comple error. What do you think?
Regards,
Shigio