2 Copyright © 1995-2009, The AROS Development Team. All rights reserved.
5 POSIX function closedir().
9 #include <proto/exec.h>
15 #include "__dirdesc.h"
17 /*****************************************************************************
31 dir - the directory stream pointing to the directory being closed
34 The closedir() function returns 0 on success or -1 on
44 close(), opendir(), readdir(), rewinddir(), seekdir(),
49 ******************************************************************************/
59 desc
= __getfdesc(dir
->fd
);
66 if (--desc
->fcb
->opencount
== 0)
68 UnLock(desc
->fcb
->fh
);
72 __setfdesc(dir
->fd
, NULL
);
74 FreeDosObject(DOS_FIB
, dir
->priv
);