2 Copyright © 1995-2003, The AROS Development Team. All rights reserved.
5 POSIX function dirfd().
9 #include <aros/debug.h>
11 /*****************************************************************************
22 get directory stream file descriptor
25 dir - directory stream dir.
28 on error -1 is returned.
31 This descriptor is the one used internally by the directory stream. As
32 a result, it is only useful for functions which do not depend on or
33 alter the file position, such as fstat(2) and fchdir(2). It will be
34 automatically closed when closedir(3) is called.
41 open(), readdir(), closedir(), rewinddir(), seekdir(),
46 ******************************************************************************/
48 D(bug("dirfd(d_type=%d)=%d\n", dir
->ent
.d_type
, dir
->fd
));
49 if (dir
->ent
.d_type
== DT_DIR
)