Re: robust chdir and openat (works with names longer than PATH_MAX)
From:
Alfred M. Szmidt
Subject:
Re: robust chdir and openat (works with names longer than PATH_MAX)
Date:
Mon, 29 Nov 2004 06:49:46 +0100
> # error "use this module only if your system defines PATH_MAX"
That would be the Hurd, no? Can't we just fall back to the system
chdir in this case?
I was about to ask the exact same thing! Our implementation of chdir()
doesn't have a PATH_MAX limit (see [libc]/sysdeps/mach/hurd/chdir.c,
and [libc]/hurd/hurdchdir.c).
Wouldn't it be simpler to just use this code if and only if MAXPATHLEN
is defined? Maybe this or something similar already happens in some
autoconf check, and the #error is typo, paranoia check, or something
along those lines. Could someone clarify this for me?
Thanks Jim for posting the code; and thanks Paul for keeping the Hurd
in mind!