[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: gethostname max len
From: |
Kevin Ryde |
Subject: |
Re: gethostname max len |
Date: |
Sun, 28 Mar 2004 08:48:35 +1000 |
User-agent: |
Gnus/5.110002 (No Gnus v0.2) Emacs/21.3 (gnu/linux) |
"Nelson H. F. Beebe" <address@hidden> writes:
>
> One correspondent suggested using PATH_MAX.
Not quite, I think the topic drifted. PATH_MAX is of course unrelated
to gethostname.
> (1) There has been great historic variability in the name of the
> parameter that holds the size of the longest possible path; see
> below.
I don't think there's many places depending on path length. getcwd
for instance has a malloc strategy.
The readdir_r I'm proposing will depend on NAME_MAX, but it follows
what the glibc manual says, so it can't be all bad.
The alternative to readdir_r is a mutex to protect the DIR. A single
global mutex might hurt parallelism though, if readdir goes away for a
longish time talking NFS or whatever.