On Tue, Oct 24, 2000 at 10:59:49AM +0000, [EMAIL PROTECTED] wrote:
>
>
> Hi,
>
>
> I am just wondering whether the values for
>
> MAXHOSTNAMELEN = 64
> and
> MAXPATHLEN = 512
>
> are correct for the Hurd.
No. There are no correct values for them. The correct thing is not to
provide any values, which is what we do.
PATH_MAX:
Posixly correct software should in this case with pathconf("...", _PC_PATH_MAX)
which will return -1 on the Hurd, which means no limit, and you have to
handle any length memory can take (malloc/realloc/loop).
MAXHOSTNAMELEN:
Any length can occure, and you should check for ENAMETOOLONG and realloc a
larger buffer. See inetutils source gethostname implementation, or other
places which do it correct.
> When compiling progs that need these values I had to exchange the variables
> with the values.
Well, this works as a hack but the proper way is described above.
Thanks,
Marcus
--
`Rhubarb is no Egyptian god.' Debian http://www.debian.org [EMAIL PROTECTED]
Marcus Brinkmann GNU http://www.gnu.org [EMAIL PROTECTED]
[EMAIL PROTECTED]
http://www.marcus-brinkmann.de