From 9b8551d0a5a8c9210cceeb570ab35efa1a111974 Mon Sep 17 00:00:00 2001 From: Daniel Eischen Date: Wed, 6 Dec 2000 03:14:28 +0000 Subject: Add a LIST_HEAD to DIR for a queue of telldir positions. Also add a location count (used as the magic for telldir) to DIR. A future change will also add a mutex/lock. --- include/dirent.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'include/dirent.h') diff --git a/include/dirent.h b/include/dirent.h index 97095135a406..d24c1467bed6 100644 --- a/include/dirent.h +++ b/include/dirent.h @@ -42,6 +42,7 @@ * the getdirentries(2) system call. */ #include +#include #ifdef _POSIX_SOURCE typedef void * DIR; @@ -52,6 +53,8 @@ typedef void * DIR; /* definitions for library routines operating on directories. */ #define DIRBLKSIZ 1024 +struct _ddloc; + /* structure describing an open directory. */ typedef struct _dirdesc { int dd_fd; /* file descriptor associated with directory */ @@ -62,6 +65,8 @@ typedef struct _dirdesc { long dd_seek; /* magic cookie returned by getdirentries */ long dd_rewind; /* magic cookie for rewinding */ int dd_flags; /* flags for readdir */ + long dd_loccnt; /* Index of entry for sequential readdir's */ + LIST_HEAD(, _ddloc) dd_locq; /* telldir position recording */ } DIR; #define dirfd(dirp) ((dirp)->dd_fd) @@ -89,7 +94,7 @@ void rewinddir __P((DIR *)); int closedir __P((DIR *)); #ifndef _POSIX_SOURCE DIR *__opendir2 __P((const char *, int)); -long telldir __P((const DIR *)); +long telldir __P((DIR *)); void seekdir __P((DIR *, long)); int scandir __P((const char *, struct dirent ***, int (*)(struct dirent *), int (*)(const void *, const void *))); -- cgit v1.2.3