summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Dempsky <matthew@cvs.openbsd.org>2012-04-13 08:20:16 +0000
committerMatthew Dempsky <matthew@cvs.openbsd.org>2012-04-13 08:20:16 +0000
commit99c19bd345df4ed541b7dfd8e59916f910624b18 (patch)
tree9e8be5c46fdbec17484c2f96dcab8fc53eeb1a48
parentcf4d08fbcb14db931ec122b9a36277e112324f25 (diff)
Remove 'struct _dirdesc' description and dirfd() macro defintion from
dir(5) now that the former is an opaque type within libc and the latter is a proper function. Pointed out by millert; ok jmc, guenther
-rw-r--r--share/man/man5/dir.533
1 files changed, 4 insertions, 29 deletions
diff --git a/share/man/man5/dir.5 b/share/man/man5/dir.5
index 838f811c923..aae4d266396 100644
--- a/share/man/man5/dir.5
+++ b/share/man/man5/dir.5
@@ -1,4 +1,4 @@
-.\" $OpenBSD: dir.5,v 1.15 2011/07/14 02:16:00 deraadt Exp $
+.\" $OpenBSD: dir.5,v 1.16 2012/04/13 08:20:15 matthew Exp $
.\"
.\" Copyright (c) 1983, 1991, 1993
.\" The Regents of the University of California. All rights reserved.
@@ -29,7 +29,7 @@
.\"
.\" @(#)dir.5 8.4 (Berkeley) 5/3/95
.\"
-.Dd $Mdocdate: July 14 2011 $
+.Dd $Mdocdate: April 13 2012 $
.Dt DIR 5
.Os
.Sh NAME
@@ -89,6 +89,8 @@ struct dirent {
char d_name[MAXNAMLEN + 1]; /* maximum name length */
};
+#define d_ino d_fileno /* backward compatibility */
+
/*
* File types
*/
@@ -106,33 +108,6 @@ struct dirent {
*/
#define IFTODT(mode) (((mode) & 0170000) >> 12)
#define DTTOIF(dirtype) ((dirtype) << 12)
-
-#ifdef _POSIX_SOURCE
-typedef void * DIR;
-#else
-
-#define d_ino d_fileno /* backward compatibility */
-
-/* definitions for library routines operating on directories. */
-#define DIRBLKSIZ 1024
-
-/* 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 */
- 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 */
-} DIR;
-
-#define dirfd(dirp) ((dirp)->dd_fd)
-
-#endif /* _POSIX_SOURCE */
.Ed
.Sh SEE ALSO
.Xr getdirentries 2 ,