2 Copyright © 1995-2012, The AROS Development Team. All rights reserved.
5 POSIX.1-2008 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
->handle
);
72 __setfdesc(dir
->fd
, NULL
);
74 FreeDosObject(DOS_FIB
, dir
->priv
);