Re: (failed) packages
Paul Emsley <email@example.com> writes:
> OK then, does one conditionalise on (e.g.) MAXHOSTNAMELEN:
> #ifdef MAXHOSTNAMELEN
> /* do it the traditional way */
> /* do it the Hurd way, typically using realloc() */
> for each occurance of MAXHOSTNAMELEN (or whatever)?
I see you didn't get an answer.
The answer is:
Use PATH_MAX. (If you have MAXHOSTNAMELEN but not PATH_MAX, then just
#define PATH_MAX MAXHOSTNAMELEN.)
If PATH_MAX is undefined, use pathconf. If pathconf returns -1 (as it
will on the Hurd), do it dynamically, with realloc or whatever else is
Of course, it's also reasonable to just always do it dynamically.