diff options
author | Matthew Dempsky <matthew@cvs.openbsd.org> | 2012-03-22 04:11:54 +0000 |
---|---|---|
committer | Matthew Dempsky <matthew@cvs.openbsd.org> | 2012-03-22 04:11:54 +0000 |
commit | 4bd1c1b3376106a40617444eadb8bfa9d7180184 (patch) | |
tree | 1fd8f9b1dca1924371657235bbe62fa41efbf922 /lib/libc/gen/telldir.h | |
parent | 9cbdf225b653b25b2358b6b036c8769599792695 (diff) |
Make DIR a private type within libc, give it the same underlying
typedef regardless of __BSD_VISIBLE, and eliminate the dirfd() macro.
ok guenther@
Diffstat (limited to 'lib/libc/gen/telldir.h')
-rw-r--r-- | lib/libc/gen/telldir.h | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/lib/libc/gen/telldir.h b/lib/libc/gen/telldir.h index 0101db5c216..7209278a648 100644 --- a/lib/libc/gen/telldir.h +++ b/lib/libc/gen/telldir.h @@ -1,4 +1,4 @@ -/* $OpenBSD: telldir.h,v 1.4 2010/10/28 15:02:41 millert Exp $ */ +/* $OpenBSD: telldir.h,v 1.5 2012/03/22 04:11:53 matthew Exp $ */ /* * Copyright (c) 1983, 1993 * The Regents of the University of California. All rights reserved. @@ -58,6 +58,20 @@ struct _telldir { long td_last; /* last tell/seekdir */ }; +/* structure describing an open directory. */ +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 */ + off_t dd_seek; /* magic cookie returned by getdirentries */ + off_t dd_rewind; /* magic cookie for rewinding */ + int dd_unused; /* was flags for readdir */ + struct _telldir *dd_td; /* telldir position recording */ + void *dd_lock; /* mutex to protect struct */ +}; + long _telldir_unlocked(DIR *); void __seekdir(DIR *, long); |