aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorGleb Kurtsou <gleb@FreeBSD.org>2012-05-19 12:44:27 +0000
committerGleb Kurtsou <gleb@FreeBSD.org>2012-05-19 12:44:27 +0000
commit0bb2aabf26842b91fbf14efa8e4e2030f0f4d2e4 (patch)
tree52b234943a3ae78c62d839ca39a00589e970906a /include
parent157bb65afd715f4d599226f5b72209a20db3d054 (diff)
Notes
Diffstat (limited to 'include')
-rw-r--r--include/dirent.h21
1 files changed, 3 insertions, 18 deletions
diff --git a/include/dirent.h b/include/dirent.h
index e3ef1495f77fb..941a97756ea68 100644
--- a/include/dirent.h
+++ b/include/dirent.h
@@ -55,24 +55,8 @@
/* definitions for library routines operating on directories. */
#define DIRBLKSIZ 1024
-struct _telldir; /* see telldir.h */
-struct pthread_mutex;
-
-/* structure describing an open directory. */
-typedef struct _dirdesc {
- int dd_fd; /* file descriptor associated with directory */
- long dd_loc; /* offset in current buffer */
- long dd_size; /* amount of data returned by getdirentries */
- char *dd_buf; /* data buffer */
- int dd_len; /* size of data buffer */
- long dd_seek; /* magic cookie returned by getdirentries */
- long dd_rewind; /* magic cookie for rewinding */
- int dd_flags; /* flags for readdir */
- struct pthread_mutex *dd_lock; /* lock */
- struct _telldir *dd_td; /* telldir position recording */
-} DIR;
-
-#define dirfd(dirp) ((dirp)->dd_fd)
+struct _dirdesc;
+typedef struct _dirdesc DIR;
/* flags for opendir2 */
#define DTF_HIDEW 0x0001 /* hide whiteout entries */
@@ -91,6 +75,7 @@ typedef void * DIR;
__BEGIN_DECLS
#if __POSIX_VISIBLE >= 200809 || __XSI_VISIBLE >= 700
int alphasort(const struct dirent **, const struct dirent **);
+int dirfd(DIR *);
#endif
#if __BSD_VISIBLE
DIR *__opendir2(const char *, int);