Paul Emsley <[EMAIL PROTECTED]> writes: > OK then, does one conditionalise on (e.g.) MAXHOSTNAMELEN: > > #ifdef MAXHOSTNAMELEN > /* do it the traditional way */ > #else > /* do it the Hurd way, typically using realloc() */ > #endif > > 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 appropriate. Of course, it's also reasonable to just always do it dynamically. Thomas

