History log of /netbsd-current/lib/libc/gen/directory.3
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 1.43 17-Feb-2021 dholland

Document that rewinddir(3) might either reopen or just lseek the dir.

(Currently it depends on the underlying directory, but documenting the
exact details seems inadvisable.)

Also, Someone(TM) should check if POSIX permits this or if we ought to
improve the implementation.


# 1.42 17-Feb-2021 dholland

Fix some typos/malapropisms in directory(3).


Revision tags: netbsd-9-1-RELEASE phil-wifi-20200421 phil-wifi-20200411 is-mlppp-base phil-wifi-20200406 netbsd-9-0-RELEASE netbsd-9-0-RC2 netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base phil-wifi-20190609 pgoyette-compat-merge-20190127 pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 pgoyette-compat-0728 phil-wifi-base pgoyette-compat-0625 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base perseant-stdc-iso10646-base
# 1.41 03-Jul-2017 wiz

Remove workaround for ancient HTML generation code.


Revision tags: netbsd-8-2-RELEASE netbsd-8-1-RELEASE netbsd-8-1-RC1 netbsd-8-0-RELEASE netbsd-8-0-RC2 netbsd-8-0-RC1 matt-nb8-mediatek-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 pgoyette-localcount-20170320 bouyer-socketcan-base pgoyette-localcount-20170107 pgoyette-localcount-20161104 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
# 1.40 22-Jan-2016 pgoyette

Improved wording.


# 1.39 22-Jan-2016 plunky

clarify closing of descriptor returned by dirfd(3)


Revision tags: netbsd-7-2-RELEASE netbsd-7-1-2-RELEASE netbsd-7-1-1-RELEASE netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 netbsd-7-1-RC1 netbsd-7-0-2-RELEASE netbsd-7-nhusb-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-7-base yamt-pagecache-base9 tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base agc-symver-base yamt-pagecache-base8 yamt-pagecache-base7 yamt-pagecache-base6 tls-maxphys-base
# 1.38 08-Oct-2012 njoly

Kill some extra spaces in function arguments.


Revision tags: netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 netbsd-6-1-RC2 netbsd-6-1-RC1 netbsd-6-0-1-RELEASE matt-nb6-plus-nbase netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 yamt-pagecache-base5 yamt-pagecache-base4 netbsd-6-base yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
# 1.37 15-Oct-2011 rmind

branches: 1.37.2; 1.37.8;
Mention POSIX conformance of some functions, when they appeared, sprinkle .Xr.


Revision tags: cherry-xenmp-base bouyer-quota2-nbase bouyer-quota2-base matt-mips64-premerge-20101231
# 1.36 17-Dec-2010 njoly

Fix cross-reference, dir(5) -> dirent(3).


# 1.35 04-Jun-2010 jruoho

Fix .Xr; dirent(5) -> dirent(3).


# 1.34 17-May-2010 jruoho

Actually the previous is wrong; all of these can set the errno either via
each other or via something like malloc(3) or lseek(2).


# 1.33 17-May-2010 jruoho

Fix the note about errno in ERRORS; telldir(3), seekdir(3), and rewinddir(3)
do not set the errno.


# 1.32 16-May-2010 wiz

Sort sections. Fix typo. Fix xref. Improve wording in one case.


# 1.31 16-May-2010 jruoho

At least one markup-typo slipped through the cracks.


# 1.30 16-May-2010 jruoho

Rewrite much of the page.

Provide much more detailed and structured discussion. Notably, try to gather
some of the conditions around the famous undefined behavior; these functions
(or the implementations) are quite prone to such behavior.

Add compatibility notes. (The big change here is that in SUSv4 it is no
longer mandated that the directory streams are implemented by using file
descriptors.)

XXX: Please proofread this. Consider also adding some additional notes. For
instance, I left the semantics about "." and ".." out. The returned
errno's should be enumerated as well.


Revision tags: matt-premerge-20091211 jym-xensuspend-nbase jym-xensuspend-base
# 1.29 11-Jan-2009 christos

merge christos-time_t


Revision tags: christos-time_t-nbase christos-time_t-base
# 1.28 05-Dec-2008 wiz

New sentence, new line. Bump date for fdopendir.


# 1.27 05-Dec-2008 ad

Add fdopendir(), from Solaris/Linux.


Revision tags: netbsd-5-2-3-RELEASE netbsd-5-1-5-RELEASE netbsd-5-2-2-RELEASE netbsd-5-1-4-RELEASE netbsd-5-2-1-RELEASE netbsd-5-1-3-RELEASE netbsd-5-2-RELEASE netbsd-5-2-RC1 netbsd-5-1-2-RELEASE netbsd-5-1-1-RELEASE matt-nb5-mips64-premerge-20101231 matt-nb5-pq3-base netbsd-5-1-RELEASE netbsd-5-1-RC4 matt-nb5-mips64-k15 netbsd-5-1-RC3 netbsd-5-1-RC2 netbsd-5-1-RC1 netbsd-5-0-2-RELEASE matt-nb5-mips64-premerge-20091211 matt-nb5-mips64-u2-k2-k4-k7-k8-k9 matt-nb4-mips64-k7-u2a-k9b matt-nb5-mips64-u1-k1-k5 netbsd-5-0-1-RELEASE netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 netbsd-5-0-RC2 netbsd-5-0-RC1 netbsd-5-base matt-mips64-base2 mjf-devfs2-base netbsd-4-0-1-RELEASE wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 wrstuden-fixsa-newbase wrstuden-revivesa-base-1 yamt-pf42-base4 yamt-pf42-base3 hpcarm-cleanup-nbase yamt-pf42-baseX yamt-pf42-base2 wrstuden-revivesa-base yamt-pf42-base keiichi-mipv6-base matt-armv6-nbase matt-armv6-prevmlocking wrstuden-fixsa-base-1 netbsd-4-0-RELEASE cube-autoconf-base netbsd-4-0-RC5 netbsd-4-0-RC4 netbsd-4-0-RC3 netbsd-4-0-RC2 netbsd-4-0-RC1 matt-armv6-base matt-mips64-base hpcarm-cleanup-base wrstuden-fixsa-base abandoned-netbsd-4-base netbsd-4-base
# 1.26 18-May-2006 christos

branches: 1.26.28;
Explicitly mention that telldir values are only valid for the lifetime of
the DIR pointer. Pointed out by Klaus Klein.


# 1.25 17-May-2006 christos

PR/24324: Arne H Juul: Re-implement seekdir/telldir using a pointer of
locations per directory instead of a global hash table to avoid memory
leak issues, and incorrect results.


Revision tags: netbsd-3-1-1-RELEASE netbsd-3-0-3-RELEASE netbsd-3-1-RELEASE netbsd-3-0-2-RELEASE netbsd-3-1-RC4 netbsd-3-1-RC3 netbsd-3-1-RC2 netbsd-3-1-RC1 netbsd-3-0-1-RELEASE netbsd-3-0-RELEASE netbsd-3-0-RC6 netbsd-3-0-RC5 netbsd-3-0-RC4 netbsd-3-0-RC3 netbsd-3-0-RC2 netbsd-3-0-RC1 netbsd-2-0-3-RELEASE netbsd-2-1-RELEASE netbsd-2-1-RC6 netbsd-2-1-RC5 netbsd-2-1-RC4 netbsd-2-1-RC3 netbsd-2-1-RC2 netbsd-2-1-RC1 netbsd-2-0-2-RELEASE netbsd-3-base netbsd-2-0-1-RELEASE netbsd-2-base netbsd-2-0-RELEASE netbsd-2-0-RC5 netbsd-2-0-RC4 netbsd-2-0-RC3 netbsd-2-0-RC2 netbsd-2-0-RC1 netbsd-2-0-base
# 1.24 07-Aug-2003 agc

Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.


# 1.23 04-Jul-2003 wiz

Drop whitespace.


# 1.22 28-May-2003 kleink

Add restrict qualifiers to previous.


# 1.21 28-May-2003 christos

add mutex locking for directories and readdir_r(3). Influenced by FreeBSD.


# 1.20 16-Apr-2003 wiz

Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.


# 1.19 02-Mar-2003 enami

Cosmetic changes in sample code.


Revision tags: nathanw_sa_before_merge fvdl_fs64_base nathanw_sa_base
# 1.18 01-Oct-2002 wiz

New sentence, new line. From Robert Elz.


# 1.17 10-Aug-2002 wiz

Update Dd for recent changes.


# 1.16 10-Aug-2002 yamt

- move a example into EXAMPLES section.
- check a return value of opendir.
from openbsd.


Revision tags: netbsd-1-6-PATCH002-RELEASE netbsd-1-6-PATCH002 netbsd-1-6-PATCH002-RC4 netbsd-1-6-PATCH002-RC3 netbsd-1-6-PATCH002-RC2 netbsd-1-6-PATCH002-RC1 netbsd-1-6-PATCH001 netbsd-1-6-PATCH001-RELEASE netbsd-1-6-PATCH001-RC3 netbsd-1-6-PATCH001-RC2 netbsd-1-6-PATCH001-RC1 netbsd-1-6-RELEASE netbsd-1-6-RC3 netbsd-1-6-RC2 netbsd-1-6-RC1 netbsd-1-6-base
# 1.15 29-Apr-2002 simonb

Remove <sys/types.h> from synopsis, as per latest SUS/Posix specs.


# 1.14 07-Feb-2002 ross

generate & symbolically


# 1.13 07-Feb-2002 ross

Generate <>& symbolically.


# 1.12 16-Sep-2001 wiz

Standardize section headers, sort sections, sort SEE ALSO, punctuation
and misc. fixes.


# 1.11 16-Sep-2001 wiz

Boring whitespace fixes.


Revision tags: netbsd-1-5-PATCH003 netbsd-1-5-PATCH002 netbsd-1-5-PATCH001 netbsd-1-5-RELEASE netbsd-1-5-BETA2 netbsd-1-5-BETA netbsd-1-4-PATCH003 netbsd-1-5-ALPHA2 netbsd-1-5-base minoura-xpg4dl-base netbsd-1-4-PATCH002 wrstuden-devbsize-19991221 wrstuden-devbsize-base comdex-fall-1999-base netbsd-1-4-PATCH001 netbsd-1-4-RELEASE netbsd-1-4-base
# 1.10 22-Mar-1999 garbled

branches: 1.10.12;
Last of the .Os cleanups. .Os is defined in the tmac.doc-common file,
so we shouldn't override it with versions in the manpages. Wheee!


# 1.9 05-Feb-1998 perry

add LIBRARY section to man page


Revision tags: netbsd-1-3-PATCH003 netbsd-1-3-PATCH003-CANDIDATE2 netbsd-1-3-PATCH003-CANDIDATE1 netbsd-1-3-PATCH003-CANDIDATE0 netbsd-1-3-PATCH002 netbsd-1-3-PATCH001 netbsd-1-3-RELEASE netbsd-1-3-BETA netbsd-1-3-base
# 1.8 14-Jul-1997 kleink

Add missing `STANDARDS' compliance statements. As we #define _POSIX_VERSION
to 199009L, bump existing statements to 1003.1-1990.


Revision tags: netbsd-1-2-PATCH001 netbsd-1-2-RELEASE netbsd-1-2-BETA netbsd-1-2-base netbsd-1-1-PATCH001 netbsd-1-1-RELEASE netbsd-1-1-base
# 1.7 25-Feb-1995 cgd

clean up Id's on files previously imported...


Revision tags: netbsd-1-0-PATCH06 netbsd-1-0-PATCH05 netbsd-1-0-PATCH04 netbsd-1-0-PATCH03 netbsd-1-0-PATCH02 netbsd-1-0-PATCH1 netbsd-1-0-PATCH0 netbsd-1-0-RELEASE
# 1.6 27-Jul-1994 jtc

branches: 1.6.2;
Sync with 4.4 lite


Revision tags: netbsd-1-0-base
# 1.5 10-Jan-1994 jtc

Fix spelling errors.


# 1.4 20-Aug-1993 jtc

Fixed typo. Readdir returns a "struct dirent *", not "struct dirent".


# 1.3 20-Aug-1993 mycroft

Technically, readdir(3) returns a `struct dirent *', not a `struct direct *',
not that they aren't the same thing.


# 1.2 30-Jul-1993 mycroft

Add RCS identifiers.


# 1.1 21-Mar-1993 cgd

branches: 1.1.1;
Initial revision


# 1.41 03-Jul-2017 wiz

Remove workaround for ancient HTML generation code.


Revision tags: netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 pgoyette-localcount-20170320 bouyer-socketcan-base pgoyette-localcount-20170107 pgoyette-localcount-20161104 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
# 1.40 22-Jan-2016 pgoyette

Improved wording.


# 1.39 22-Jan-2016 plunky

clarify closing of descriptor returned by dirfd(3)


Revision tags: netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 netbsd-7-1-RC1 netbsd-7-0-2-RELEASE netbsd-7-nhusb-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-7-base yamt-pagecache-base9 tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base agc-symver-base yamt-pagecache-base8 yamt-pagecache-base7 yamt-pagecache-base6 tls-maxphys-base
# 1.38 08-Oct-2012 njoly

Kill some extra spaces in function arguments.


Revision tags: netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 netbsd-6-1-RC2 netbsd-6-1-RC1 netbsd-6-0-1-RELEASE matt-nb6-plus-nbase netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 yamt-pagecache-base5 yamt-pagecache-base4 netbsd-6-base yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
# 1.37 15-Oct-2011 rmind

branches: 1.37.2; 1.37.8;
Mention POSIX conformance of some functions, when they appeared, sprinkle .Xr.


Revision tags: cherry-xenmp-base bouyer-quota2-nbase bouyer-quota2-base matt-mips64-premerge-20101231
# 1.36 17-Dec-2010 njoly

Fix cross-reference, dir(5) -> dirent(3).


# 1.35 04-Jun-2010 jruoho

Fix .Xr; dirent(5) -> dirent(3).


# 1.34 17-May-2010 jruoho

Actually the previous is wrong; all of these can set the errno either via
each other or via something like malloc(3) or lseek(2).


# 1.33 17-May-2010 jruoho

Fix the note about errno in ERRORS; telldir(3), seekdir(3), and rewinddir(3)
do not set the errno.


# 1.32 16-May-2010 wiz

Sort sections. Fix typo. Fix xref. Improve wording in one case.


# 1.31 16-May-2010 jruoho

At least one markup-typo slipped through the cracks.


# 1.30 16-May-2010 jruoho

Rewrite much of the page.

Provide much more detailed and structured discussion. Notably, try to gather
some of the conditions around the famous undefined behavior; these functions
(or the implementations) are quite prone to such behavior.

Add compatibility notes. (The big change here is that in SUSv4 it is no
longer mandated that the directory streams are implemented by using file
descriptors.)

XXX: Please proofread this. Consider also adding some additional notes. For
instance, I left the semantics about "." and ".." out. The returned
errno's should be enumerated as well.


Revision tags: matt-premerge-20091211 jym-xensuspend-nbase jym-xensuspend-base
# 1.29 11-Jan-2009 christos

merge christos-time_t


Revision tags: christos-time_t-nbase christos-time_t-base
# 1.28 05-Dec-2008 wiz

New sentence, new line. Bump date for fdopendir.


# 1.27 05-Dec-2008 ad

Add fdopendir(), from Solaris/Linux.


Revision tags: netbsd-5-2-3-RELEASE netbsd-5-1-5-RELEASE netbsd-5-2-2-RELEASE netbsd-5-1-4-RELEASE netbsd-5-2-1-RELEASE netbsd-5-1-3-RELEASE netbsd-5-2-RELEASE netbsd-5-2-RC1 netbsd-5-1-2-RELEASE netbsd-5-1-1-RELEASE matt-nb5-mips64-premerge-20101231 matt-nb5-pq3-base netbsd-5-1-RELEASE netbsd-5-1-RC4 matt-nb5-mips64-k15 netbsd-5-1-RC3 netbsd-5-1-RC2 netbsd-5-1-RC1 netbsd-5-0-2-RELEASE matt-nb5-mips64-premerge-20091211 matt-nb5-mips64-u2-k2-k4-k7-k8-k9 matt-nb4-mips64-k7-u2a-k9b matt-nb5-mips64-u1-k1-k5 netbsd-5-0-1-RELEASE netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 netbsd-5-0-RC2 netbsd-5-0-RC1 netbsd-5-base matt-mips64-base2 mjf-devfs2-base netbsd-4-0-1-RELEASE wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 wrstuden-fixsa-newbase wrstuden-revivesa-base-1 yamt-pf42-base4 yamt-pf42-base3 hpcarm-cleanup-nbase yamt-pf42-baseX yamt-pf42-base2 wrstuden-revivesa-base yamt-pf42-base keiichi-mipv6-base matt-armv6-nbase matt-armv6-prevmlocking wrstuden-fixsa-base-1 netbsd-4-0-RELEASE cube-autoconf-base netbsd-4-0-RC5 netbsd-4-0-RC4 netbsd-4-0-RC3 netbsd-4-0-RC2 netbsd-4-0-RC1 matt-armv6-base matt-mips64-base hpcarm-cleanup-base wrstuden-fixsa-base abandoned-netbsd-4-base netbsd-4-base
# 1.26 18-May-2006 christos

branches: 1.26.28;
Explicitly mention that telldir values are only valid for the lifetime of
the DIR pointer. Pointed out by Klaus Klein.


# 1.25 17-May-2006 christos

PR/24324: Arne H Juul: Re-implement seekdir/telldir using a pointer of
locations per directory instead of a global hash table to avoid memory
leak issues, and incorrect results.


Revision tags: netbsd-3-1-1-RELEASE netbsd-3-0-3-RELEASE netbsd-3-1-RELEASE netbsd-3-0-2-RELEASE netbsd-3-1-RC4 netbsd-3-1-RC3 netbsd-3-1-RC2 netbsd-3-1-RC1 netbsd-3-0-1-RELEASE netbsd-3-0-RELEASE netbsd-3-0-RC6 netbsd-3-0-RC5 netbsd-3-0-RC4 netbsd-3-0-RC3 netbsd-3-0-RC2 netbsd-3-0-RC1 netbsd-2-0-3-RELEASE netbsd-2-1-RELEASE netbsd-2-1-RC6 netbsd-2-1-RC5 netbsd-2-1-RC4 netbsd-2-1-RC3 netbsd-2-1-RC2 netbsd-2-1-RC1 netbsd-2-0-2-RELEASE netbsd-3-base netbsd-2-0-1-RELEASE netbsd-2-base netbsd-2-0-RELEASE netbsd-2-0-RC5 netbsd-2-0-RC4 netbsd-2-0-RC3 netbsd-2-0-RC2 netbsd-2-0-RC1 netbsd-2-0-base
# 1.24 07-Aug-2003 agc

Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.


# 1.23 04-Jul-2003 wiz

Drop whitespace.


# 1.22 28-May-2003 kleink

Add restrict qualifiers to previous.


# 1.21 28-May-2003 christos

add mutex locking for directories and readdir_r(3). Influenced by FreeBSD.


# 1.20 16-Apr-2003 wiz

Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.


# 1.19 02-Mar-2003 enami

Cosmetic changes in sample code.


Revision tags: nathanw_sa_before_merge fvdl_fs64_base nathanw_sa_base
# 1.18 01-Oct-2002 wiz

New sentence, new line. From Robert Elz.


# 1.17 10-Aug-2002 wiz

Update Dd for recent changes.


# 1.16 10-Aug-2002 yamt

- move a example into EXAMPLES section.
- check a return value of opendir.
from openbsd.


Revision tags: netbsd-1-6-PATCH002-RELEASE netbsd-1-6-PATCH002 netbsd-1-6-PATCH002-RC4 netbsd-1-6-PATCH002-RC3 netbsd-1-6-PATCH002-RC2 netbsd-1-6-PATCH002-RC1 netbsd-1-6-PATCH001 netbsd-1-6-PATCH001-RELEASE netbsd-1-6-PATCH001-RC3 netbsd-1-6-PATCH001-RC2 netbsd-1-6-PATCH001-RC1 netbsd-1-6-RELEASE netbsd-1-6-RC3 netbsd-1-6-RC2 netbsd-1-6-RC1 netbsd-1-6-base
# 1.15 29-Apr-2002 simonb

Remove <sys/types.h> from synopsis, as per latest SUS/Posix specs.


# 1.14 07-Feb-2002 ross

generate & symbolically


# 1.13 07-Feb-2002 ross

Generate <>& symbolically.


# 1.12 16-Sep-2001 wiz

Standardize section headers, sort sections, sort SEE ALSO, punctuation
and misc. fixes.


# 1.11 16-Sep-2001 wiz

Boring whitespace fixes.


Revision tags: netbsd-1-5-PATCH003 netbsd-1-5-PATCH002 netbsd-1-5-PATCH001 netbsd-1-5-RELEASE netbsd-1-5-BETA2 netbsd-1-5-BETA netbsd-1-4-PATCH003 netbsd-1-5-ALPHA2 netbsd-1-5-base minoura-xpg4dl-base netbsd-1-4-PATCH002 wrstuden-devbsize-19991221 wrstuden-devbsize-base comdex-fall-1999-base netbsd-1-4-PATCH001 netbsd-1-4-RELEASE netbsd-1-4-base
# 1.10 22-Mar-1999 garbled

branches: 1.10.12;
Last of the .Os cleanups. .Os is defined in the tmac.doc-common file,
so we shouldn't override it with versions in the manpages. Wheee!


# 1.9 05-Feb-1998 perry

add LIBRARY section to man page


Revision tags: netbsd-1-3-PATCH003 netbsd-1-3-PATCH003-CANDIDATE2 netbsd-1-3-PATCH003-CANDIDATE1 netbsd-1-3-PATCH003-CANDIDATE0 netbsd-1-3-PATCH002 netbsd-1-3-PATCH001 netbsd-1-3-RELEASE netbsd-1-3-BETA netbsd-1-3-base
# 1.8 14-Jul-1997 kleink

Add missing `STANDARDS' compliance statements. As we #define _POSIX_VERSION
to 199009L, bump existing statements to 1003.1-1990.


Revision tags: netbsd-1-2-PATCH001 netbsd-1-2-RELEASE netbsd-1-2-BETA netbsd-1-2-base netbsd-1-1-PATCH001 netbsd-1-1-RELEASE netbsd-1-1-base
# 1.7 25-Feb-1995 cgd

clean up Id's on files previously imported...


Revision tags: netbsd-1-0-PATCH06 netbsd-1-0-PATCH05 netbsd-1-0-PATCH04 netbsd-1-0-PATCH03 netbsd-1-0-PATCH02 netbsd-1-0-PATCH1 netbsd-1-0-PATCH0 netbsd-1-0-RELEASE
# 1.6 27-Jul-1994 jtc

branches: 1.6.2;
Sync with 4.4 lite


Revision tags: netbsd-1-0-base
# 1.5 10-Jan-1994 jtc

Fix spelling errors.


# 1.4 20-Aug-1993 jtc

Fixed typo. Readdir returns a "struct dirent *", not "struct dirent".


# 1.3 20-Aug-1993 mycroft

Technically, readdir(3) returns a `struct dirent *', not a `struct direct *',
not that they aren't the same thing.


# 1.2 30-Jul-1993 mycroft

Add RCS identifiers.


# 1.1 21-Mar-1993 cgd

branches: 1.1.1;
Initial revision


Revision tags: pgoyette-localcount-20161104 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
# 1.40 22-Jan-2016 pgoyette

Improved wording.


# 1.39 22-Jan-2016 plunky

clarify closing of descriptor returned by dirfd(3)


Revision tags: netbsd-7-0-2-RELEASE netbsd-7-nhusb-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-7-base yamt-pagecache-base9 tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base agc-symver-base yamt-pagecache-base8 yamt-pagecache-base7 yamt-pagecache-base6 tls-maxphys-base
# 1.38 08-Oct-2012 njoly

Kill some extra spaces in function arguments.


Revision tags: netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 netbsd-6-1-RC2 netbsd-6-1-RC1 netbsd-6-0-1-RELEASE matt-nb6-plus-nbase netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 yamt-pagecache-base5 yamt-pagecache-base4 netbsd-6-base yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
# 1.37 15-Oct-2011 rmind

branches: 1.37.2; 1.37.8;
Mention POSIX conformance of some functions, when they appeared, sprinkle .Xr.


Revision tags: cherry-xenmp-base bouyer-quota2-nbase bouyer-quota2-base matt-mips64-premerge-20101231
# 1.36 17-Dec-2010 njoly

Fix cross-reference, dir(5) -> dirent(3).


# 1.35 04-Jun-2010 jruoho

Fix .Xr; dirent(5) -> dirent(3).


# 1.34 17-May-2010 jruoho

Actually the previous is wrong; all of these can set the errno either via
each other or via something like malloc(3) or lseek(2).


# 1.33 17-May-2010 jruoho

Fix the note about errno in ERRORS; telldir(3), seekdir(3), and rewinddir(3)
do not set the errno.


# 1.32 16-May-2010 wiz

Sort sections. Fix typo. Fix xref. Improve wording in one case.


# 1.31 16-May-2010 jruoho

At least one markup-typo slipped through the cracks.


# 1.30 16-May-2010 jruoho

Rewrite much of the page.

Provide much more detailed and structured discussion. Notably, try to gather
some of the conditions around the famous undefined behavior; these functions
(or the implementations) are quite prone to such behavior.

Add compatibility notes. (The big change here is that in SUSv4 it is no
longer mandated that the directory streams are implemented by using file
descriptors.)

XXX: Please proofread this. Consider also adding some additional notes. For
instance, I left the semantics about "." and ".." out. The returned
errno's should be enumerated as well.


Revision tags: matt-premerge-20091211 jym-xensuspend-nbase jym-xensuspend-base
# 1.29 11-Jan-2009 christos

merge christos-time_t


Revision tags: christos-time_t-nbase christos-time_t-base
# 1.28 05-Dec-2008 wiz

New sentence, new line. Bump date for fdopendir.


# 1.27 05-Dec-2008 ad

Add fdopendir(), from Solaris/Linux.


Revision tags: netbsd-5-2-3-RELEASE netbsd-5-1-5-RELEASE netbsd-5-2-2-RELEASE netbsd-5-1-4-RELEASE netbsd-5-2-1-RELEASE netbsd-5-1-3-RELEASE netbsd-5-2-RELEASE netbsd-5-2-RC1 netbsd-5-1-2-RELEASE netbsd-5-1-1-RELEASE matt-nb5-mips64-premerge-20101231 matt-nb5-pq3-base netbsd-5-1-RELEASE netbsd-5-1-RC4 matt-nb5-mips64-k15 netbsd-5-1-RC3 netbsd-5-1-RC2 netbsd-5-1-RC1 netbsd-5-0-2-RELEASE matt-nb5-mips64-premerge-20091211 matt-nb5-mips64-u2-k2-k4-k7-k8-k9 matt-nb4-mips64-k7-u2a-k9b matt-nb5-mips64-u1-k1-k5 netbsd-5-0-1-RELEASE netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 netbsd-5-0-RC2 netbsd-5-0-RC1 netbsd-5-base matt-mips64-base2 mjf-devfs2-base netbsd-4-0-1-RELEASE wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 wrstuden-fixsa-newbase wrstuden-revivesa-base-1 yamt-pf42-base4 yamt-pf42-base3 hpcarm-cleanup-nbase yamt-pf42-baseX yamt-pf42-base2 wrstuden-revivesa-base yamt-pf42-base keiichi-mipv6-base matt-armv6-nbase matt-armv6-prevmlocking wrstuden-fixsa-base-1 netbsd-4-0-RELEASE cube-autoconf-base netbsd-4-0-RC5 netbsd-4-0-RC4 netbsd-4-0-RC3 netbsd-4-0-RC2 netbsd-4-0-RC1 matt-armv6-base matt-mips64-base hpcarm-cleanup-base wrstuden-fixsa-base abandoned-netbsd-4-base netbsd-4-base
# 1.26 18-May-2006 christos

branches: 1.26.28;
Explicitly mention that telldir values are only valid for the lifetime of
the DIR pointer. Pointed out by Klaus Klein.


# 1.25 17-May-2006 christos

PR/24324: Arne H Juul: Re-implement seekdir/telldir using a pointer of
locations per directory instead of a global hash table to avoid memory
leak issues, and incorrect results.


Revision tags: netbsd-3-1-1-RELEASE netbsd-3-0-3-RELEASE netbsd-3-1-RELEASE netbsd-3-0-2-RELEASE netbsd-3-1-RC4 netbsd-3-1-RC3 netbsd-3-1-RC2 netbsd-3-1-RC1 netbsd-3-0-1-RELEASE netbsd-3-0-RELEASE netbsd-3-0-RC6 netbsd-3-0-RC5 netbsd-3-0-RC4 netbsd-3-0-RC3 netbsd-3-0-RC2 netbsd-3-0-RC1 netbsd-2-0-3-RELEASE netbsd-2-1-RELEASE netbsd-2-1-RC6 netbsd-2-1-RC5 netbsd-2-1-RC4 netbsd-2-1-RC3 netbsd-2-1-RC2 netbsd-2-1-RC1 netbsd-2-0-2-RELEASE netbsd-3-base netbsd-2-0-1-RELEASE netbsd-2-base netbsd-2-0-RELEASE netbsd-2-0-RC5 netbsd-2-0-RC4 netbsd-2-0-RC3 netbsd-2-0-RC2 netbsd-2-0-RC1 netbsd-2-0-base
# 1.24 07-Aug-2003 agc

Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.


# 1.23 04-Jul-2003 wiz

Drop whitespace.


# 1.22 28-May-2003 kleink

Add restrict qualifiers to previous.


# 1.21 28-May-2003 christos

add mutex locking for directories and readdir_r(3). Influenced by FreeBSD.


# 1.20 16-Apr-2003 wiz

Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.


# 1.19 02-Mar-2003 enami

Cosmetic changes in sample code.


Revision tags: nathanw_sa_before_merge fvdl_fs64_base nathanw_sa_base
# 1.18 01-Oct-2002 wiz

New sentence, new line. From Robert Elz.


# 1.17 10-Aug-2002 wiz

Update Dd for recent changes.


# 1.16 10-Aug-2002 yamt

- move a example into EXAMPLES section.
- check a return value of opendir.
from openbsd.


Revision tags: netbsd-1-6-PATCH002-RELEASE netbsd-1-6-PATCH002 netbsd-1-6-PATCH002-RC4 netbsd-1-6-PATCH002-RC3 netbsd-1-6-PATCH002-RC2 netbsd-1-6-PATCH002-RC1 netbsd-1-6-PATCH001 netbsd-1-6-PATCH001-RELEASE netbsd-1-6-PATCH001-RC3 netbsd-1-6-PATCH001-RC2 netbsd-1-6-PATCH001-RC1 netbsd-1-6-RELEASE netbsd-1-6-RC3 netbsd-1-6-RC2 netbsd-1-6-RC1 netbsd-1-6-base
# 1.15 29-Apr-2002 simonb

Remove <sys/types.h> from synopsis, as per latest SUS/Posix specs.


# 1.14 07-Feb-2002 ross

generate & symbolically


# 1.13 07-Feb-2002 ross

Generate <>& symbolically.


# 1.12 16-Sep-2001 wiz

Standardize section headers, sort sections, sort SEE ALSO, punctuation
and misc. fixes.


# 1.11 16-Sep-2001 wiz

Boring whitespace fixes.


Revision tags: netbsd-1-5-PATCH003 netbsd-1-5-PATCH002 netbsd-1-5-PATCH001 netbsd-1-5-RELEASE netbsd-1-5-BETA2 netbsd-1-5-BETA netbsd-1-4-PATCH003 netbsd-1-5-ALPHA2 netbsd-1-5-base minoura-xpg4dl-base netbsd-1-4-PATCH002 wrstuden-devbsize-19991221 wrstuden-devbsize-base comdex-fall-1999-base netbsd-1-4-PATCH001 netbsd-1-4-RELEASE netbsd-1-4-base
# 1.10 22-Mar-1999 garbled

branches: 1.10.12;
Last of the .Os cleanups. .Os is defined in the tmac.doc-common file,
so we shouldn't override it with versions in the manpages. Wheee!


# 1.9 05-Feb-1998 perry

add LIBRARY section to man page


Revision tags: netbsd-1-3-PATCH003 netbsd-1-3-PATCH003-CANDIDATE2 netbsd-1-3-PATCH003-CANDIDATE1 netbsd-1-3-PATCH003-CANDIDATE0 netbsd-1-3-PATCH002 netbsd-1-3-PATCH001 netbsd-1-3-RELEASE netbsd-1-3-BETA netbsd-1-3-base
# 1.8 14-Jul-1997 kleink

Add missing `STANDARDS' compliance statements. As we #define _POSIX_VERSION
to 199009L, bump existing statements to 1003.1-1990.


Revision tags: netbsd-1-2-PATCH001 netbsd-1-2-RELEASE netbsd-1-2-BETA netbsd-1-2-base netbsd-1-1-PATCH001 netbsd-1-1-RELEASE netbsd-1-1-base
# 1.7 25-Feb-1995 cgd

clean up Id's on files previously imported...


Revision tags: netbsd-1-0-PATCH06 netbsd-1-0-PATCH05 netbsd-1-0-PATCH04 netbsd-1-0-PATCH03 netbsd-1-0-PATCH02 netbsd-1-0-PATCH1 netbsd-1-0-PATCH0 netbsd-1-0-RELEASE
# 1.6 27-Jul-1994 jtc

branches: 1.6.2;
Sync with 4.4 lite


Revision tags: netbsd-1-0-base
# 1.5 10-Jan-1994 jtc

Fix spelling errors.


# 1.4 20-Aug-1993 jtc

Fixed typo. Readdir returns a "struct dirent *", not "struct dirent".


# 1.3 20-Aug-1993 mycroft

Technically, readdir(3) returns a `struct dirent *', not a `struct direct *',
not that they aren't the same thing.


# 1.2 30-Jul-1993 mycroft

Add RCS identifiers.


# 1.1 21-Mar-1993 cgd

branches: 1.1.1;
Initial revision