version 1.30, 2006/01/24 19:33:10 |
version 1.31, 2006/05/17 20:36:50 |
Line 53 __RCSID("$NetBSD$"); |
|
Line 53 __RCSID("$NetBSD$"); |
|
#include <string.h> |
#include <string.h> |
#include <unistd.h> |
#include <unistd.h> |
|
|
|
#include "dirent_private.h" |
|
|
/* |
/* |
* Open a directory. |
* Open a directory. |
*/ |
*/ |
DIR * |
DIR * |
opendir(name) |
opendir(const char *name) |
const char *name; |
|
{ |
{ |
|
|
_DIAGASSERT(name != NULL); |
_DIAGASSERT(name != NULL); |
|
|
} |
} |
|
|
DIR * |
DIR * |
__opendir2(name, flags) |
__opendir2(const char *name, int flags) |
const char *name; |
|
int flags; |
|
{ |
{ |
DIR *dirp = NULL; |
DIR *dirp = NULL; |
int fd; |
int fd; |
|
|
mutex_init((mutex_t *)dirp->dd_lock, NULL); |
mutex_init((mutex_t *)dirp->dd_lock, NULL); |
} |
} |
#endif |
#endif |
dirp->dd_rewind = _telldir_unlocked(dirp); |
dirp->dd_internal = NULL; |
|
(void)_telldir_unlocked(dirp); |
return (dirp); |
return (dirp); |
error: |
error: |
serrno = errno; |
serrno = errno; |