[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug-gnulib] Re: robust chdir and openat (works with names longer than P
From: |
Paul Eggert |
Subject: |
[bug-gnulib] Re: robust chdir and openat (works with names longer than PATH_MAX) |
Date: |
Sun, 28 Nov 2004 21:02:57 -0800 |
User-agent: |
Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux) |
After looking at rpl_chdir's code, one possible simplification
suggests itself: use an argument of type "char *" (not "char const
*"), and temporarily modify it by setting '/' to '\0'. This would
avoid all the need for storage management within rpl_chdir, and would
simplify things quite a bit I would think. It would also remove the
FIXME about arbitrary limitations. It would of course require that we
call the function a name other than "chdir" but I think that's a good
idea for reasons discussed in my previous email.
One minor point: Solaris 9 doesn't have O_DIRECTORY.
> # 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?