summaryrefslogtreecommitdiff
path: root/libc/misc/dirent/dirstream.h
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2002-05-11 00:26:15 +0000
committerEric Andersen <andersen@codepoet.org>2002-05-11 00:26:15 +0000
commita4f07581502ee212aa45e7b0049fdd126dd10b40 (patch)
tree935a2f668e5fb5306e0e12f380924d2311da5ee5 /libc/misc/dirent/dirstream.h
parentd2be3a1d010ea7e953d15a2e705373735723c06e (diff)
Implement readdir_r. Audit for proper thread safety and locking.
-Erik
Diffstat (limited to 'libc/misc/dirent/dirstream.h')
-rw-r--r--libc/misc/dirent/dirstream.h21
1 files changed, 4 insertions, 17 deletions
diff --git a/libc/misc/dirent/dirstream.h b/libc/misc/dirent/dirstream.h
index dc5c5732a..268ed1c91 100644
--- a/libc/misc/dirent/dirstream.h
+++ b/libc/misc/dirent/dirstream.h
@@ -30,17 +30,6 @@ Cambridge, MA 02139, USA. */
#include <pthread.h>
#endif
-
-#ifdef __UCLIBC_HAVE_LFS__
-#ifndef __USE_LARGEFILE64
-# define __USE_LARGEFILE64
-#endif
-# define stuff_t __off64_t
-#else
-# define stuff_t __off_t
-#endif
-
-
/* For now, syscall readdir () only supports one entry at a time. It
* will be changed in the future.
#define NUMENT 3
@@ -59,22 +48,20 @@ struct __dirstream {
int dd_fd;
/* offset of the next dir entry in buffer */
- stuff_t dd_nextloc;
+ size_t dd_nextloc;
/* bytes of valid entries in buffer */
- stuff_t dd_size;
+ size_t dd_size;
/* -> directory buffer */
void *dd_buf;
/* offset of the next dir entry in directory. */
- stuff_t dd_nextoff;
+ off_t dd_nextoff;
/* total size of buffer */
- stuff_t dd_max;
+ size_t dd_max;
- enum {unknown, have_getdents, no_getdents} dd_getdents;
-
/* lock */
#ifdef _POSIX_THREADS
pthread_mutex_t *dd_lock;