And to try to answer my own question, Draft 2 says
(about dirfd() among others):

...shall be declared as functions and may also be defined as macros. Function
prototypes shall be provided.

and specifically about dirfd():

The dirfd( ) function may fail if:
[EINVAL] The dirp argument does not refer to a valid directory stream.

So: it has to be a function and not just a macro.  A prototype is needed in 
dirent.h.
dirfd() may apparently check whether its argument is not a valid directory 
stream,
returning -1 with errno set to EINVAL if not.

I don't happen to know the "correct" way to set errno within a function 
intended to
be part of libc, but I'm sure someone does.  Other than that, it looks 
straightforward.
 
 
This message posted from opensolaris.org
_______________________________________________
opensolaris-discuss mailing list
opensolaris-discuss@opensolaris.org

Reply via email to