2 Copyright © 1995-2009, The AROS Development Team. All rights reserved.
5 POSIX function closedir().
9 #include <proto/exec.h>
16 /*****************************************************************************
30 dir - the directory stream pointing to the directory being closed
33 The closedir() function returns 0 on success or -1 on
43 close(), opendir(), readdir(), rewinddir(), seekdir(),
48 ******************************************************************************/
58 desc
= __getfdesc(dir
->fd
);
65 if (--desc
->fcb
->opencount
== 0)
67 UnLock(desc
->fcb
->fh
);
71 __setfdesc(dir
->fd
, NULL
);
73 FreeDosObject(DOS_FIB
, dir
->priv
);