John E. Malmberg wrote:
> I could not find that Posix specification on the web, not even a draft.

POSIX:2001 is the same as the "OpenGroup Base Specification Issue 6" and
also known as "SUSv3". You find it on the web at
   http://www.opengroup.org/susv3/

> The open() would have to open or dup a file descriptor to the /dev/null 
> device to reserve a unique file descriptor, and then something needs to 
> map that file descriptor back to the pointer to the *DIR structure.

Do you need a pointer to the DIR structure, or only memorize the filename
of the directory? In the latter case, you can reuse most of the code from
gnulib/lib/fchdir.c.

Btw, does VMS have the dirfd function (as a function or as a macro)?
It should return the file descriptor to a directory that is "held inside"
a DIR structure.

Bruno



Reply via email to