diff options
author | Eric Andersen <andersen@codepoet.org> | 2001-11-14 11:09:46 +0000 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 2001-11-14 11:09:46 +0000 |
commit | 62653059d61eae9c559b514bb126df9e2e845273 (patch) | |
tree | a295a9292cd4d22e4932e0054afd83cb268fbf15 /libc/misc/dirent/dirstream.h | |
parent | a5cc55111f77315fc7e04613772237b52a3dbfdf (diff) |
Scrub up some lingering problems preventing readdir64 from working
and creating several *64 problems, particualrly when client apps
used -D_FILE_OFFSET_BITS=64 -D__USE_FILE_OFFSET64. All better now.
-Erik
Diffstat (limited to 'libc/misc/dirent/dirstream.h')
-rw-r--r-- | libc/misc/dirent/dirstream.h | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/libc/misc/dirent/dirstream.h b/libc/misc/dirent/dirstream.h index 8131ffce7..dc5c5732a 100644 --- a/libc/misc/dirent/dirstream.h +++ b/libc/misc/dirent/dirstream.h @@ -24,12 +24,23 @@ Cambridge, MA 02139, USA. */ #define _DIRSTREAM_H 1 +#include <features.h> #include <sys/types.h> -#include <dirent.h> #ifdef _POSIX_THREADS #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 @@ -48,19 +59,19 @@ struct __dirstream { int dd_fd; /* offset of the next dir entry in buffer */ - off_t dd_nextloc; + stuff_t dd_nextloc; /* bytes of valid entries in buffer */ - size_t dd_size; + stuff_t dd_size; /* -> directory buffer */ void *dd_buf; /* offset of the next dir entry in directory. */ - off_t dd_nextoff; + stuff_t dd_nextoff; /* total size of buffer */ - size_t dd_max; + stuff_t dd_max; enum {unknown, have_getdents, no_getdents} dd_getdents; |