head 1.38; access; symbols netbsd-10-0-RELEASE:1.37.2.1 netbsd-10-0-RC6:1.37.2.1 netbsd-10-0-RC5:1.37.2.1 netbsd-10-0-RC4:1.37.2.1 netbsd-10-0-RC3:1.37.2.1 netbsd-10-0-RC2:1.37.2.1 netbsd-10-0-RC1:1.37.2.1 netbsd-10:1.37.0.2 netbsd-10-base:1.37 netbsd-9-3-RELEASE:1.36 cjep_sun2x-base1:1.36 cjep_sun2x:1.36.0.22 cjep_sun2x-base:1.36 cjep_staticlib_x-base1:1.36 netbsd-9-2-RELEASE:1.36 cjep_staticlib_x:1.36.0.20 cjep_staticlib_x-base:1.36 netbsd-9-1-RELEASE:1.36 phil-wifi-20200421:1.36 phil-wifi-20200411:1.36 is-mlppp:1.36.0.18 is-mlppp-base:1.36 phil-wifi-20200406:1.36 netbsd-8-2-RELEASE:1.36 netbsd-9-0-RELEASE:1.36 netbsd-9-0-RC2:1.36 netbsd-9-0-RC1:1.36 phil-wifi-20191119:1.36 netbsd-9:1.36.0.16 netbsd-9-base:1.36 phil-wifi-20190609:1.36 netbsd-8-1-RELEASE:1.36 netbsd-8-1-RC1:1.36 pgoyette-compat-merge-20190127:1.36 pgoyette-compat-20190127:1.36 pgoyette-compat-20190118:1.36 pgoyette-compat-1226:1.36 pgoyette-compat-1126:1.36 pgoyette-compat-1020:1.36 pgoyette-compat-0930:1.36 pgoyette-compat-0906:1.36 netbsd-7-2-RELEASE:1.35 pgoyette-compat-0728:1.36 netbsd-8-0-RELEASE:1.36 phil-wifi:1.36.0.14 phil-wifi-base:1.36 pgoyette-compat-0625:1.36 netbsd-8-0-RC2:1.36 pgoyette-compat-0521:1.36 pgoyette-compat-0502:1.36 pgoyette-compat-0422:1.36 netbsd-8-0-RC1:1.36 pgoyette-compat-0415:1.36 pgoyette-compat-0407:1.36 pgoyette-compat-0330:1.36 pgoyette-compat-0322:1.36 pgoyette-compat-0315:1.36 netbsd-7-1-2-RELEASE:1.35 pgoyette-compat:1.36.0.12 pgoyette-compat-base:1.36 netbsd-7-1-1-RELEASE:1.35 matt-nb8-mediatek:1.36.0.10 matt-nb8-mediatek-base:1.36 perseant-stdc-iso10646:1.36.0.8 perseant-stdc-iso10646-base:1.36 netbsd-8:1.36.0.6 netbsd-8-base:1.36 prg-localcount2-base3:1.36 prg-localcount2-base2:1.36 prg-localcount2-base1:1.36 prg-localcount2:1.36.0.4 prg-localcount2-base:1.36 pgoyette-localcount-20170426:1.36 bouyer-socketcan-base1:1.36 pgoyette-localcount-20170320:1.36 netbsd-7-1:1.35.0.18 netbsd-7-1-RELEASE:1.35 netbsd-7-1-RC2:1.35 netbsd-7-nhusb-base-20170116:1.35 bouyer-socketcan:1.36.0.2 bouyer-socketcan-base:1.36 pgoyette-localcount-20170107:1.36 netbsd-7-1-RC1:1.35 pgoyette-localcount-20161104:1.35 netbsd-7-0-2-RELEASE:1.35 localcount-20160914:1.35 netbsd-7-nhusb:1.35.0.16 netbsd-7-nhusb-base:1.35 pgoyette-localcount-20160806:1.35 pgoyette-localcount-20160726:1.35 pgoyette-localcount:1.35.0.14 pgoyette-localcount-base:1.35 netbsd-7-0-1-RELEASE:1.35 netbsd-7-0:1.35.0.12 netbsd-7-0-RELEASE:1.35 netbsd-7-0-RC3:1.35 netbsd-7-0-RC2:1.35 netbsd-7-0-RC1:1.35 netbsd-5-2-3-RELEASE:1.30 netbsd-5-1-5-RELEASE:1.30 netbsd-6-0-6-RELEASE:1.34 netbsd-6-1-5-RELEASE:1.34 netbsd-7:1.35.0.10 netbsd-7-base:1.35 yamt-pagecache-base9:1.35 yamt-pagecache-tag8:1.34.6.1 netbsd-6-1-4-RELEASE:1.34 netbsd-6-0-5-RELEASE:1.34 tls-earlyentropy:1.35.0.8 tls-earlyentropy-base:1.35 riastradh-xf86-video-intel-2-7-1-pre-2-21-15:1.35 riastradh-drm2-base3:1.35 netbsd-6-1-3-RELEASE:1.34 netbsd-6-0-4-RELEASE:1.34 netbsd-5-2-2-RELEASE:1.30 netbsd-5-1-4-RELEASE:1.30 netbsd-6-1-2-RELEASE:1.34 netbsd-6-0-3-RELEASE:1.34 netbsd-5-2-1-RELEASE:1.30 netbsd-5-1-3-RELEASE:1.30 netbsd-6-1-1-RELEASE:1.34 riastradh-drm2-base2:1.35 riastradh-drm2-base1:1.35 riastradh-drm2:1.35.0.4 riastradh-drm2-base:1.35 netbsd-6-1:1.34.0.14 netbsd-6-0-2-RELEASE:1.34 netbsd-6-1-RELEASE:1.34 netbsd-6-1-RC4:1.34 netbsd-6-1-RC3:1.34 agc-symver:1.35.0.6 agc-symver-base:1.35 netbsd-6-1-RC2:1.34 netbsd-6-1-RC1:1.34 yamt-pagecache-base8:1.35 netbsd-5-2:1.30.0.24 netbsd-6-0-1-RELEASE:1.34 yamt-pagecache-base7:1.35 netbsd-5-2-RELEASE:1.30 netbsd-5-2-RC1:1.30 matt-nb6-plus-nbase:1.34 yamt-pagecache-base6:1.35 netbsd-6-0:1.34.0.12 netbsd-6-0-RELEASE:1.34 netbsd-6-0-RC2:1.34 tls-maxphys:1.35.0.2 tls-maxphys-base:1.35 matt-nb6-plus:1.34.0.10 matt-nb6-plus-base:1.34 netbsd-6-0-RC1:1.34 yamt-pagecache-base5:1.34 yamt-pagecache-base4:1.34 netbsd-6:1.34.0.8 netbsd-6-base:1.34 netbsd-5-1-2-RELEASE:1.30 netbsd-5-1-1-RELEASE:1.30 yamt-pagecache-base3:1.34 yamt-pagecache-base2:1.34 yamt-pagecache:1.34.0.6 yamt-pagecache-base:1.34 cherry-xenmp:1.34.0.4 cherry-xenmp-base:1.34 uebayasi-xip-base7:1.34 bouyer-quota2-nbase:1.34 bouyer-quota2:1.34.0.2 bouyer-quota2-base:1.34 matt-mips64-premerge-20101231:1.34 matt-nb5-mips64-premerge-20101231:1.30 matt-nb5-pq3:1.30.0.22 matt-nb5-pq3-base:1.30 netbsd-5-1:1.30.0.20 uebayasi-xip-base6:1.34 uebayasi-xip-base5:1.34 netbsd-5-1-RELEASE:1.30 uebayasi-xip-base4:1.34 uebayasi-xip-base3:1.34 netbsd-5-1-RC4:1.30 matt-nb5-mips64-k15:1.30 uebayasi-xip-base2:1.33 netbsd-5-1-RC3:1.30 netbsd-5-1-RC2:1.30 uebayasi-xip-base1:1.33 netbsd-5-1-RC1:1.30 uebayasi-xip:1.33.0.2 uebayasi-xip-base:1.33 netbsd-5-0-2-RELEASE:1.30 matt-nb5-mips64-premerge-20091211:1.30 matt-premerge-20091211:1.33 matt-nb5-mips64-u2-k2-k4-k7-k8-k9:1.30 matt-nb4-mips64-k7-u2a-k9b:1.30 matt-nb5-mips64-u1-k1-k5:1.30 matt-nb5-mips64:1.30.0.18 netbsd-5-0-1-RELEASE:1.30 jym-xensuspend-nbase:1.33 netbsd-5-0:1.30.0.16 netbsd-5-0-RELEASE:1.30 netbsd-5-0-RC4:1.30 netbsd-5-0-RC3:1.30 netbsd-5-0-RC2:1.30 jym-xensuspend:1.32.0.2 jym-xensuspend-base:1.33 netbsd-5-0-RC1:1.30 christos-time_t-nbase:1.31 christos-time_t:1.30.0.14 christos-time_t-base:1.31 netbsd-5:1.30.0.12 netbsd-5-base:1.30 matt-mips64-base2:1.30 matt-mips64:1.29.0.16 mjf-devfs2:1.30.0.10 mjf-devfs2-base:1.30 netbsd-4-0-1-RELEASE:1.29 wrstuden-revivesa-base-3:1.30 wrstuden-revivesa-base-2:1.30 wrstuden-fixsa-newbase:1.29 wrstuden-revivesa-base-1:1.30 simonb-wapbl-nbase:1.30 yamt-pf42-base4:1.30 simonb-wapbl:1.30.0.8 simonb-wapbl-base:1.30 yamt-pf42-base3:1.30 hpcarm-cleanup-nbase:1.30 yamt-pf42-baseX:1.30 yamt-pf42-base2:1.30 wrstuden-revivesa:1.30.0.6 wrstuden-revivesa-base:1.30 yamt-pf42:1.30.0.4 yamt-pf42-base:1.30 keiichi-mipv6:1.30.0.2 keiichi-mipv6-base:1.30 matt-armv6-nbase:1.30 matt-armv6-prevmlocking:1.29 wrstuden-fixsa-base-1:1.29 netbsd-4-0:1.29.0.14 netbsd-4-0-RELEASE:1.29 cube-autoconf:1.29.0.12 cube-autoconf-base:1.29 netbsd-4-0-RC5:1.29 netbsd-4-0-RC4:1.29 netbsd-4-0-RC3:1.29 netbsd-4-0-RC2:1.29 netbsd-4-0-RC1:1.29 matt-armv6:1.29.0.10 matt-armv6-base:1.29 matt-mips64-base:1.29 hpcarm-cleanup:1.29.0.8 hpcarm-cleanup-base:1.30 netbsd-3-1-1-RELEASE:1.22 netbsd-3-0-3-RELEASE:1.22 wrstuden-fixsa:1.29.0.6 wrstuden-fixsa-base:1.29 abandoned-netbsd-4-base:1.29 abandoned-netbsd-4:1.29.0.2 netbsd-3-1:1.22.0.6 netbsd-3-1-RELEASE:1.22 netbsd-3-0-2-RELEASE:1.22 netbsd-3-1-RC4:1.22 netbsd-3-1-RC3:1.22 netbsd-3-1-RC2:1.22 netbsd-3-1-RC1:1.22 netbsd-4:1.29.0.4 netbsd-4-base:1.29 netbsd-3-0-1-RELEASE:1.22 netbsd-3-0:1.22.0.4 netbsd-3-0-RELEASE:1.22 netbsd-3-0-RC6:1.22 netbsd-3-0-RC5:1.22 netbsd-3-0-RC4:1.22 netbsd-3-0-RC3:1.22 netbsd-3-0-RC2:1.22 netbsd-3-0-RC1:1.22 netbsd-2-0-3-RELEASE:1.21 netbsd-2-1:1.21.0.6 netbsd-2-1-RELEASE:1.21 netbsd-2-1-RC6:1.21 netbsd-2-1-RC5:1.21 netbsd-2-1-RC4:1.21 netbsd-2-1-RC3:1.21 netbsd-2-1-RC2:1.21 netbsd-2-1-RC1:1.21 netbsd-2-0-2-RELEASE:1.21 netbsd-3:1.22.0.2 netbsd-3-base:1.22 netbsd-2-0-1-RELEASE:1.21 netbsd-2:1.21.0.4 netbsd-2-base:1.21 netbsd-2-0-RELEASE:1.21 netbsd-2-0-RC5:1.21 netbsd-2-0-RC4:1.21 netbsd-2-0-RC3:1.21 netbsd-2-0-RC2:1.21 netbsd-2-0-RC1:1.21 netbsd-2-0:1.21.0.2 netbsd-2-0-base:1.21 netbsd-1-6-PATCH002-RELEASE:1.17 netbsd-1-6-PATCH002:1.17 netbsd-1-6-PATCH002-RC4:1.17 netbsd-1-6-PATCH002-RC3:1.17 netbsd-1-6-PATCH002-RC2:1.17 netbsd-1-6-PATCH002-RC1:1.17 netbsd-1-6-PATCH001:1.17 netbsd-1-6-PATCH001-RELEASE:1.17 netbsd-1-6-PATCH001-RC3:1.17 netbsd-1-6-PATCH001-RC2:1.17 netbsd-1-6-PATCH001-RC1:1.17 nathanw_sa_before_merge:1.17 nathanw_sa_end:1.17 fvdl_fs64_base:1.17 nathanw_sa_base:1.17 netbsd-1-6-RELEASE:1.17 netbsd-1-6-RC3:1.17 netbsd-1-6-RC2:1.17 netbsd-1-6-RC1:1.17 netbsd-1-6:1.17.0.8 netbsd-1-6-base:1.17 netbsd-1-5-PATCH003:1.17 netbsd-1-5-PATCH002:1.17 netbsd-1-5-PATCH001:1.17 nathanw_sa:1.17.0.6 netbsd-1-5-RELEASE:1.17 netbsd-1-5-BETA2:1.17 netbsd-1-5-BETA:1.17 netbsd-1-4-PATCH003:1.14 netbsd-1-5-ALPHA2:1.17 netbsd-1-5:1.17.0.4 netbsd-1-5-base:1.17 minoura-xpg4dl:1.17.0.2 minoura-xpg4dl-base:1.17 netbsd-1-4-PATCH002:1.14 wrstuden-devbsize-19991221:1.14 wrstuden-devbsize:1.14.0.6 wrstuden-devbsize-base:1.14 comdex-fall-1999:1.14.0.4 comdex-fall-1999-base:1.14 netbsd-1-4-PATCH001:1.14 netbsd-1-4-RELEASE:1.14 netbsd-1-4:1.14.0.2 netbsd-1-4-base:1.14 netbsd-1-3-PATCH003:1.13 netbsd-1-3-PATCH003-CANDIDATE2:1.13 netbsd-1-3-PATCH003-CANDIDATE1:1.13 netbsd-1-3-PATCH003-CANDIDATE0:1.13 netbsd-1-3-PATCH002:1.13 netbsd-1-3-PATCH001:1.13 lite-2:1.1.1.3 netbsd-1-3-RELEASE:1.13 netbsd-1-3-BETA:1.13 netbsd-1-3:1.13.0.2 netbsd-1-3-base:1.13 netbsd-1-2-PATCH001:1.10 nsswitch:1.10.0.2 netbsd-1-2-RELEASE:1.10 netbsd-1-2-BETA:1.10 netbsd-1-2-base:1.10 netbsd-1-2:1.10.0.4 netbsd-1-1-PATCH001:1.9 netbsd-1-1-RELEASE:1.9 netbsd-1-1:1.9.0.2 netbsd-1-1-base:1.9 netbsd-1-0-PATCH06:1.6 netbsd-1-0-PATCH05:1.6 netbsd-1-0-PATCH04:1.6 netbsd-1-0-PATCH03:1.6 netbsd-1-0-PATCH02:1.6 netbsd-1-0-PATCH1:1.6 netbsd-1-0-PATCH0:1.6 netbsd-1-0-RELEASE:1.6 netbsd-1-0:1.6.0.2 lite-1:1.1.1.2 CSRG:1.1.1 netbsd-1-0-base:1.5 netbsd-0-9-RELEASE:1.2 netbsd-0-9-BETA:1.2 netbsd-0-9-ALPHA2:1.2 netbsd-0-9-ALPHA:1.2 netbsd-0-9:1.2.0.2 netbsd-0-9-base:1.2 netbsd-0-8:1.1.1.1 netbsd-alpha-1:1.1.1.1 patchkit-0-2-2:1.1.1.1 WFJ-386bsd-01:1.1.1.1 WFJ-920714:1.1.1; locks; strict; comment @ * @; 1.38 date 2022.12.28.11.51.21; author nia; state Exp; branches; next 1.37; commitid 5lG6JbEQvbCgPj7E; 1.37 date 2021.12.30.16.20.19; author nros; state Exp; branches 1.37.2.1; next 1.36; commitid qjfj1hY3aY39ZGmD; 1.36 date 2016.12.16.04.45.04; author mrg; state Exp; branches; next 1.35; commitid zafaNcksRTmahayz; 1.35 date 2012.07.30.23.11.13; author yamt; state Exp; branches 1.35.14.1; next 1.34; 1.34 date 2010.09.26.02.26.59; author yamt; state Exp; branches 1.34.6.1; next 1.33; 1.33 date 2009.02.24.18.41.40; author christos; state Exp; branches 1.33.2.1; next 1.32; 1.32 date 2009.01.11.03.04.12; author christos; state Exp; branches 1.32.2.1; next 1.31; 1.31 date 2008.12.05.13.08.53; author ad; state Exp; branches; next 1.30; 1.30 date 2008.01.09.20.55.03; author christos; state Exp; branches 1.30.14.1; next 1.29; 1.29 date 2006.05.17.20.32.19; author christos; state Exp; branches 1.29.10.1; next 1.28; 1.28 date 2006.03.26.18.22.40; author christos; state Exp; branches; next 1.27; 1.27 date 2006.01.24.19.33.35; author christos; state Exp; branches; next 1.26; 1.26 date 2006.01.24.13.58.58; author christos; state Exp; branches; next 1.25; 1.25 date 2005.09.14.20.20.15; author christos; state Exp; branches; next 1.24; 1.24 date 2005.09.13.01.44.32; author christos; state Exp; branches; next 1.23; 1.23 date 2005.08.19.02.05.59; author christos; state Exp; branches; next 1.22; 1.22 date 2005.02.03.04.39.32; author perry; state Exp; branches; next 1.21; 1.21 date 2003.08.07.09.44.10; author agc; state Exp; branches; next 1.20; 1.20 date 2003.05.28.20.04.12; author christos; state Exp; branches; next 1.19; 1.19 date 2003.04.29.23.08.13; author bjh21; state Exp; branches; next 1.18; 1.18 date 2003.04.28.23.16.12; author bjh21; state Exp; branches; next 1.17; 1.17 date 2000.04.16.14.43.56; author mrg; state Exp; branches; next 1.16; 1.16 date 2000.01.10.16.58.37; author kleink; state Exp; branches; next 1.15; 1.15 date 99.12.22.21.26.17; author kleink; state Exp; branches; next 1.14; 1.14 date 98.05.06.19.05.51; author kleink; state Exp; branches; next 1.13; 1.13 date 97.10.10.13.18.37; author fvdl; state Exp; branches; next 1.12; 1.12 date 97.10.10.02.21.02; author fvdl; state Exp; branches; next 1.11; 1.11 date 97.07.13.18.01.06; author christos; state Exp; branches; next 1.10; 1.10 date 95.12.05.03.09.19; author jtc; state Exp; branches; next 1.9; 1.9 date 95.03.26.20.13.37; author jtc; state Exp; branches; next 1.8; 1.8 date 94.12.28.02.43.00; author mycroft; state Exp; branches; next 1.7; 1.7 date 94.10.26.00.55.50; author cgd; state Exp; branches; next 1.6; 1.6 date 94.08.29.18.11.08; author mycroft; state Exp; branches 1.6.2.1; next 1.5; 1.5 date 93.12.15.00.50.19; author jtc; state Exp; branches; next 1.4; 1.4 date 93.12.10.19.16.09; author jtc; state Exp; branches; next 1.3; 1.3 date 93.08.01.18.44.56; author mycroft; state Exp; branches; next 1.2; 1.2 date 93.06.04.17.00.03; author proven; state Exp; branches; next 1.1; 1.1 date 93.03.21.09.45.37; author cgd; state Exp; branches 1.1.1.1; next ; 1.37.2.1 date 2022.12.28.18.00.15; author martin; state Exp; branches; next ; commitid sMtbldF2Jwj0Sl7E; 1.35.14.1 date 2017.01.07.08.56.02; author pgoyette; state Exp; branches; next ; commitid uEL0C1YuiJrlV0Bz; 1.34.6.1 date 2012.10.30.18.58.33; author yamt; state Exp; branches; next ; 1.33.2.1 date 2010.10.22.07.11.52; author uebayasi; state Exp; branches; next ; 1.32.2.1 date 2009.05.13.19.18.19; author jym; state Exp; branches; next ; 1.30.14.1 date 2008.12.28.20.29.05; author christos; state Exp; branches; next ; 1.29.10.1 date 2008.03.23.00.26.44; author matt; state Exp; branches; next ; 1.6.2.1 date 94.08.29.18.11.08; author mycroft; state dead; branches; next 1.6.2.2; 1.6.2.2 date 94.08.29.18.11.09; author mycroft; state Exp; branches; next ; 1.1.1.1 date 93.03.21.09.45.37; author cgd; state Exp; branches; next 1.1.1.2; 1.1.1.2 date 94.08.29.18.12.01; author mycroft; state Exp; branches; next 1.1.1.3; 1.1.1.3 date 98.02.02.07.22.54; author perry; state Exp; branches; next ; desc @@ 1.38 log @scandir(3) and alphasort(3) are part of POSIX-2008, so don't require _NETBSD_SOURCE to use them. @ text @/* $NetBSD: dirent.h,v 1.37 2021/12/30 16:20:19 nros Exp $ */ /*- * Copyright (c) 1989, 1993 * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * @@(#)dirent.h 8.2 (Berkeley) 7/28/94 */ #ifndef _DIRENT_H_ #define _DIRENT_H_ #include #include /* * The kernel defines the format of directory entries returned by * the getdents(2) system call. */ #include #if defined(_XOPEN_SOURCE) || defined(_NETBSD_SOURCE) #define d_ino d_fileno /* backward compatibility */ #endif typedef struct _dirdesc DIR; #if defined(_NETBSD_SOURCE) /* definitions for library routines operating on directories. */ #define DIRBLKSIZ 1024 /* structure describing an open directory. */ struct _dirdesc { /* * dd_fd should be kept intact to preserve ABI compat. see dirfd(). */ int dd_fd; /* file descriptor associated with directory */ /* * the rest is hidden from user. */ long dd_loc; /* offset in current buffer */ long dd_size; /* amount of data returned by getdents */ char *dd_buf; /* data buffer */ int dd_len; /* size of data buffer */ off_t dd_seek; /* magic cookie returned by getdents */ void *dd_internal; /* state for seekdir/telldir */ int dd_flags; /* flags for readdir */ void *dd_lock; /* lock for concurrent access */ }; #define dirfd(dirp) ((dirp)->dd_fd) /* flags for __opendir2() */ #define DTF_HIDEW 0x0001 /* hide whiteout entries */ #define DTF_NODUP 0x0002 /* don't return duplicate names */ #define DTF_REWIND 0x0004 /* rewind after reading union stack */ #define __DTF_READALL 0x0008 /* everything has been read */ #define __DTF_RETRY_ON_BADCOOKIE 0x0001 /* retry on EINVAL (only valid with __DTF_READALL) */ #include #endif #ifndef _KERNEL #include __BEGIN_DECLS int closedir(DIR *); void rewinddir(DIR *); #ifndef __LIBC12_SOURCE__ DIR *opendir(const char *) __RENAME(__opendir30); struct dirent *readdir(DIR *) __RENAME(__readdir30); int readdir_r(DIR * __restrict, struct dirent * __restrict, struct dirent ** __restrict) __RENAME(__readdir_r30); #endif #if defined(_XOPEN_SOURCE) || defined(_NETBSD_SOURCE) void seekdir(DIR *, long); long telldir(DIR *); #endif /* defined(_NETBSD_SOURCE) || defined(_XOPEN_SOURCE) */ #if (_POSIX_C_SOURCE - 0) >= 200809L || (_XOPEN_SOURCE - 0) >= 700 || \ defined(_NETBSD_SOURCE) #ifndef __LIBC12_SOURCE__ DIR *fdopendir(int); int scandir(const char *, struct dirent ***, int (*)(const struct dirent *), int (*)(const struct dirent **, const struct dirent **)) __RENAME(__scandir30); int alphasort(const struct dirent **, const struct dirent **) __RENAME(__alphasort30); #endif #endif #if defined(_NETBSD_SOURCE) #ifndef __LIBC12_SOURCE__ DIR *__opendir2(const char *, int) __RENAME(__opendir230); int getdents(int, char *, size_t) __RENAME(__getdents30); #endif #endif /* defined(_NETBSD_SOURCE) */ __END_DECLS #endif /* !_KERNEL */ #endif /* !_DIRENT_H_ */ @ 1.37 log @Make fdopendir visible according to POSIX.1 spec. @ text @d1 1 a1 1 /* $NetBSD: dirent.h,v 1.36 2016/12/16 04:45:04 mrg Exp $ */ d111 6 a121 4 int scandir(const char *, struct dirent ***, int (*)(const struct dirent *), int (*)(const struct dirent **, const struct dirent **)) __RENAME(__scandir30); a122 2 int alphasort(const struct dirent **, const struct dirent **) __RENAME(__alphasort30); @ 1.37.2.1 log @Pull up following revision(s) (requested by nia in ticket #28): include/dirent.h: revision 1.38 scandir(3) and alphasort(3) are part of POSIX-2008, so don't require _NETBSD_SOURCE to use them. @ text @d1 1 a1 1 /* $NetBSD: dirent.h,v 1.37 2021/12/30 16:20:19 nros Exp $ */ d111 5 d120 1 a123 6 #endif #if defined(_NETBSD_SOURCE) #ifndef __LIBC12_SOURCE__ DIR *__opendir2(const char *, int) __RENAME(__opendir230); int getdents(int, char *, size_t) __RENAME(__getdents30); #endif @ 1.36 log @scandir/alphasort take "const struct dirent **" not "const void *" in modern unix. since we claim to be 'IEEE Std 1003.1-2008', make it so. @ text @d1 1 a1 1 /* $NetBSD: dirent.h,v 1.35 2012/07/30 23:11:13 yamt Exp $ */ d107 6 a114 1 DIR *fdopendir(int); @ 1.35 log @comments @ text @d1 1 a1 1 /* $NetBSD: dirent.h,v 1.34 2010/09/26 02:26:59 yamt Exp $ */ d112 2 a113 1 int (*)(const struct dirent *), int (*)(const void *, const void *)) d116 2 a117 1 int alphasort(const void *, const void *) __RENAME(__alphasort30); @ 1.35.14.1 log @Sync with HEAD. (Note that most of these changes are simply $NetBSD$ tag issues.) @ text @d1 1 a1 1 /* $NetBSD: dirent.h,v 1.36 2016/12/16 04:45:04 mrg Exp $ */ d112 1 a112 2 int (*)(const struct dirent *), int (*)(const struct dirent **, const struct dirent **)) d115 1 a115 2 int alphasort(const struct dirent **, const struct dirent **) __RENAME(__alphasort30); @ 1.34 log @fix rewinddir on nfs. fix PR/42879 (and probably PR/40229.) @ text @d1 1 a1 1 /* $NetBSD$ */ d59 3 d63 3 @ 1.34.6.1 log @sync with head @ text @d1 1 a1 1 /* $NetBSD: dirent.h,v 1.34 2010/09/26 02:26:59 yamt Exp $ */ a58 3 /* * dd_fd should be kept intact to preserve ABI compat. see dirfd(). */ a59 3 /* * the rest is hidden from user. */ @ 1.33 log @version alphasort. @ text @d1 1 a1 1 /* $NetBSD: dirent.h,v 1.32 2009/01/11 03:04:12 christos Exp $ */ d77 2 @ 1.33.2.1 log @Sync with HEAD (-D20101022). @ text @d1 1 a1 1 /* $NetBSD$ */ a76 2 #define __DTF_RETRY_ON_BADCOOKIE 0x0001 /* retry on EINVAL (only valid with __DTF_READALL) */ @ 1.32 log @merge christos-time_t @ text @d1 1 a1 1 /* $NetBSD: dirent.h,v 1.30.14.1 2008/12/28 20:29:05 christos Exp $ */ d107 1 a108 1 int alphasort(const void *, const void *); @ 1.32.2.1 log @Sync with HEAD. Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html @ text @d1 1 a1 1 /* $NetBSD: dirent.h,v 1.33 2009/02/24 18:41:40 christos Exp $ */ a106 1 int alphasort(const void *, const void *) __RENAME(__alphasort30); d108 1 @ 1.31 log @Add fdopendir(), from Solaris/Linux. @ text @d1 1 a1 1 /* $NetBSD: dirent.h,v 1.30 2008/01/09 20:55:03 christos Exp $ */ @ 1.30 log @tell about getdents, not getdirentries @ text @d1 1 a1 1 /* $NetBSD: dirent.h,v 1.29 2006/05/17 20:32:19 christos Exp $ */ d101 1 @ 1.30.14.1 log @sync with head. @ text @d1 1 a1 1 /* $NetBSD: dirent.h,v 1.31 2008/12/05 13:08:53 ad Exp $ */ a100 1 DIR *fdopendir(int); @ 1.29 log @rename dd_rewind to dd_internal so that it can be re-used to implement telldir/seekdir/rewinddir differently. While there change the prototype to telldir to take a non-const DIR, per: http://www.opengroup.org/onlinepubs/009695399/basedefs/dirent.h.html @ text @d1 1 a1 1 /* $NetBSD: dirent.h,v 1.28 2006/03/26 18:22:40 christos Exp $ */ d42 1 a42 1 * the getdirentries(2) system call. @ 1.29.10.1 log @sync with HEAD @ text @d1 1 a1 1 /* dirent.h,v 1.30 2008/01/09 20:55:03 christos Exp */ d42 1 a42 1 * the getdents(2) system call. @ 1.28 log @PR/33124: Murray Armfield: readdir_r is missing a restrict qualifier. http://www.opengroup.org/onlinepubs/000095399/basedefs/dirent.h.html @ text @d1 1 a1 1 /* $NetBSD: dirent.h,v 1.27 2006/01/24 19:33:35 christos Exp $ */ d65 1 a65 1 long dd_rewind; /* magic cookie for rewinding */ d97 1 a97 1 long telldir(const DIR *); @ 1.27 log @remove functions that we should not be exposing. @ text @d1 1 a1 1 /* $NetBSD: dirent.h,v 1.26 2006/01/24 13:58:58 christos Exp $ */ d92 1 a92 1 int readdir_r(DIR *, struct dirent * __restrict, @ 1.26 log @expose unlocked versions of readdir and telldir. @ text @d1 1 a1 1 /* $NetBSD: dirent.h,v 1.25 2005/09/14 20:20:15 christos Exp $ */ a99 2 void __seekdir(DIR *, long); long __telldir(const DIR *); a100 1 struct dirent *__readdir(DIR *) __RENAME(____readdir30); @ 1.25 log @Fix opendir30 screwup and sort the compat defs for clarity. @ text @d1 1 a1 1 /* $NetBSD: dirent.h,v 1.24 2005/09/13 01:44:32 christos Exp $ */ d101 1 d103 1 @ 1.24 log @compat code reorg @ text @d1 1 a1 1 /* $NetBSD: dirent.h,v 1.23 2005/08/19 02:05:59 christos Exp $ */ a90 1 DIR *__opendir30(const char *) __RENAME(__opendir30); @ 1.23 log @64 bit inode changes @ text @d1 1 a1 1 /* $NetBSD: dirent.h,v 1.22 2005/02/03 04:39:32 perry Exp $ */ d89 1 a89 9 #ifdef __LIBC12_SOURCE__ DIR *opendir(const char *); struct dirent12 *readdir(DIR *); int readdir_r(DIR *, struct dirent12 * __restrict, struct dirent12 ** __restrict); struct dirent *__readdir30(DIR *); int __readdir_r30(DIR *, struct dirent * __restrict, struct dirent ** __restrict); #else d102 1 a102 11 #ifdef __LIBC12_SOURCE__ DIR *__opendir2(const char *, int); DIR *__opendir230(const char *, int); int scandir(const char *, struct dirent12 ***, int (*)(const struct dirent12 *), int (*)(const void *, const void *)); int __scandir30(const char *, struct dirent ***, int (*)(const struct dirent *), int (*)(const void *, const void *)); int getdents(int, char *, size_t); int getdirentries(int, char *, int, long *); int __getdents30(int, char *, size_t); #else @ 1.22 log @de-__P -- the hack is long since useless. Discussed with christos, matt, kleink, others. Approved by christos. @ text @d1 1 a1 1 /* $NetBSD: dirent.h,v 1.21 2003/08/07 09:44:10 agc Exp $ */ d88 2 d91 13 a103 3 struct dirent *readdir(DIR *); int readdir_r(DIR *, struct dirent * __restrict, struct dirent ** __restrict); void rewinddir(DIR *); d109 2 d112 10 a121 1 void __seekdir(DIR *, long); d123 4 a126 1 int (*)(const struct dirent *), int (*)(const void *, const void *)); a127 2 int getdirentries(int, char *, int, long *); int getdents(int, char *, size_t); @ 1.21 log @Move UCB-licensed code from 4-clause to 3-clause licence. Patches provided by Joel Baker in PR 22270, verified by myself. @ text @d1 1 a1 1 /* $NetBSD: dirent.h,v 1.20 2003/05/28 20:04:12 christos Exp $ */ d87 5 a91 6 int closedir __P((DIR *)); DIR *opendir __P((const char *)); struct dirent *readdir __P((DIR *)); int readdir_r __P((DIR *, struct dirent * __restrict, struct dirent ** __restrict)); void rewinddir __P((DIR *)); d93 2 a94 2 void seekdir __P((DIR *, long)); long telldir __P((const DIR *)); d97 7 a103 7 DIR *__opendir2 __P((const char *, int)); void __seekdir __P((DIR *, long)); int scandir __P((const char *, struct dirent ***, int (*)(const struct dirent *), int (*)(const void *, const void *))); int alphasort __P((const void *, const void *)); int getdirentries __P((int, char *, int, long *)); int getdents __P((int, char *, size_t)); @ 1.20 log @add mutex locking and dirent_r. @ text @d1 1 a1 1 /* $NetBSD: dirent.h,v 1.19 2003/04/29 23:08:13 bjh21 Exp $ */ d15 1 a15 5 * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by the University of * California, Berkeley and its contributors. * 4. Neither the name of the University nor the names of its contributors @ 1.19 log @Fix things so that _NETBSD_SOURCE correctly exposes the dirfd() and the insides of struct _dirdesc. Also make the existence of struct _dirdesc visible to POSIX applications since this is less ugly than pretending that DIR is a void *. @ text @d1 1 a1 1 /* $NetBSD: dirent.h,v 1.18 2003/04/28 23:16:12 bjh21 Exp $ */ d71 1 d94 2 @ 1.18 log @Add a new feature-test macro, _NETBSD_SOURCE. If this is defined by the application, all NetBSD interfaces are made visible, even if some other feature-test macro (like _POSIX_C_SOURCE) is defined. defined _NETBSD_SOURCE if none of _ANSI_SOURCE, _POSIX_C_SOURCE and _XOPEN_SOURCE is defined, so as to preserve existing behaviour. This has two major advantages: + Programs that require non-POSIX facilities but define _POSIX_C_SOURCE can trivially be overruled by putting -D_NETBSD_SOURCE in their CFLAGS. + It makes most of the #ifs simpler, in that they're all now ORs of the various macros, rather than having checks for (!defined(_ANSI_SOURCE) || !defined(_POSIX_C_SOURCE) || !defined(_XOPEN_SOURCE)) all over the place. I've tried not to change the semantics of the headers in any case where _NETBSD_SOURCE wasn't defined, but there were some places where the current semantics were clearly mad, and retaining them was harder than correcting them. In particular, I've mostly normalised things so that _ANSI_SOURCE gets you the smallest set of stuff, then _POSIX_C_SOURCE, _XOPEN_SOURCE and _NETBSD_SOURCE in that order. Tested by building for vax, encouraged by thorpej, and uncontested in tech-userlevel for a week. @ text @d1 1 a1 1 /* $NetBSD: dirent.h,v 1.17 2000/04/16 14:43:56 mrg Exp $ */ d54 3 a56 3 #if defined(_POSIX_C_SOURCE) || defined(_XOPEN_SOURCE) typedef void * DIR; #else d62 1 a62 1 typedef struct _dirdesc { d71 1 a71 1 } DIR; d83 1 a83 1 #endif /* _POSIX_C_SOURCE || _XOPEN_SOURCE */ @ 1.17 log @make scandir(3)'s 3rd argument take a function that takes a *const* struct dirent *, rather than non-const. this makes scandir(3) the same as the scandir implementations in libiberty and glibc, and the select function has no need to modify the dirent. @ text @d1 1 a1 1 /* $NetBSD: dirent.h,v 1.16 2000/01/10 16:58:37 kleink Exp $ */ d50 1 a50 1 #if !defined(_POSIX_C_SOURCE) || defined(_XOPEN_SOURCE) d94 1 a94 1 #if !defined(_POSIX_C_SOURCE) || defined(_XOPEN_SOURCE) d97 2 a98 2 #endif /* !defined(_POSIX_C_SOURCE) || defined(_XOPEN_SOURCE) */ #if !defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE) d106 1 a106 1 #endif /* !defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE) */ @ 1.16 log @Move to for the purpose of avoiding conflicts due to std C headers including it, and a kernel module written in C++ would benfit as well. @ text @d1 1 a1 1 /* $NetBSD: dirent.h,v 1.15 1999/12/22 21:26:17 kleink Exp $ */ d102 1 a102 1 int (*)(struct dirent *), int (*)(const void *, const void *))); @ 1.15 log @For the benefit of G++'s null pointer constant implementation, #define NULL as __null with egcs 1.0 (GCC 2.90) and above. As several headers are affected by this change, move the definition into a new header file, , to ease maintenance. @ text @d1 1 a1 1 /* $NetBSD: dirent.h,v 1.14 1998/05/06 19:05:51 kleink Exp $ */ d81 1 a81 1 #include @ 1.14 log @Reorganize name space protection. @ text @d1 1 a1 1 /* $NetBSD: dirent.h,v 1.13 1997/10/10 13:18:37 fvdl Exp $ */ d81 1 a81 3 #ifndef NULL #define NULL 0 #endif @ 1.13 log @oops. Checked in wrong dirent.h version. Add missing getdents prototype to this one. @ text @d1 1 a1 1 /* $NetBSD: dirent.h,v 1.12 1997/10/10 02:21:02 fvdl Exp $ */ d41 1 d50 5 a54 1 #ifdef _POSIX_SOURCE a57 2 #define d_ino d_fileno /* backward compatibility */ d75 1 a75 1 /* flags for opendir2 */ d85 1 a85 1 #endif /* _POSIX_SOURCE */ d92 1 d96 5 a100 2 int closedir __P((DIR *)); #ifndef _POSIX_SOURCE a101 1 long telldir __P((const DIR *)); a102 1 void seekdir __P((DIR *, long)); d108 1 a108 1 #endif /* not POSIX */ @ 1.12 log @Correct comment: getdirentries() -> getdents() @ text @d1 1 a1 1 /* $NetBSD: dirent.h,v 1.11 1997/07/13 18:01:06 christos Exp $ */ d102 1 @ 1.11 log @Added missing __seekdir prototype @ text @d1 1 a1 1 /* $NetBSD: dirent.h,v 1.10 1995/12/05 03:09:19 jtc Exp $ */ d62 1 a62 1 long dd_size; /* amount of data returned by getdirentries */ d65 1 a65 1 long dd_seek; /* magic cookie returned by getdirentries */ @ 1.10 log @Changed to unconditionally include as required by X/Open XPG4.2. @ text @d1 1 a1 1 /* $NetBSD: dirent.h,v 1.9 1995/03/26 20:13:37 jtc Exp $ */ d96 1 @ 1.9 log @KERNEL -> _KERNEL @ text @d1 1 a1 1 /* $NetBSD: dirent.h,v 1.8 1994/12/28 02:43:00 mycroft Exp $ */ d40 2 @ 1.8 log @Sync with CSRG. @ text @d1 1 a1 1 /* $NetBSD: dirent.h,v 1.7 1994/10/26 00:55:50 cgd Exp $ */ d82 1 a82 1 #ifndef KERNEL d102 1 a102 1 #endif /* !KERNEL */ @ 1.7 log @new RCS ID format. @ text @d1 1 a1 1 /* $NetBSD$ */ d35 1 a35 1 * @@(#)dirent.h 8.1 (Berkeley) 6/8/93 d65 1 d70 6 d92 1 @ 1.6 log @Update to 4.4-Lite version. @ text @d1 2 d35 1 a35 2 * from: @@(#)dirent.h 8.1 (Berkeley) 6/8/93 * $Id: $ @ 1.6.2.1 log @file dirent.h was added on branch netbsd-1-0 on 1994-08-29 18:11:09 +0000 @ text @d1 95 @ 1.6.2.2 log @Update to 4.4-Lite version. @ text @a0 95 /*- * Copyright (c) 1989, 1993 * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by the University of * California, Berkeley and its contributors. * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * from: @@(#)dirent.h 8.1 (Berkeley) 6/8/93 * $Id: dirent.h,v 1.6 1994/08/29 18:11:08 mycroft Exp $ */ #ifndef _DIRENT_H_ #define _DIRENT_H_ /* * The kernel defines the format of directory entries returned by * the getdirentries(2) system call. */ #include #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 */ long dd_seek; /* magic cookie returned by getdirentries */ long dd_rewind; /* magic cookie for rewinding */ } DIR; #define dirfd(dirp) ((dirp)->dd_fd) #ifndef NULL #define NULL 0 #endif #endif /* _POSIX_SOURCE */ #ifndef KERNEL #include __BEGIN_DECLS DIR *opendir __P((const char *)); struct dirent *readdir __P((DIR *)); void rewinddir __P((DIR *)); int closedir __P((DIR *)); #ifndef _POSIX_SOURCE long telldir __P((const DIR *)); void seekdir __P((DIR *, long)); int scandir __P((const char *, struct dirent ***, int (*)(struct dirent *), int (*)(const void *, const void *))); int alphasort __P((const void *, const void *)); int getdirentries __P((int, char *, int, long *)); #endif /* not POSIX */ __END_DECLS #endif /* !KERNEL */ #endif /* !_DIRENT_H_ */ @ 1.5 log @Struct dirent definition moved to . @ text @d2 2 a3 2 * Copyright (c) 1989 The Regents of the University of California. * All rights reserved. d33 2 a34 2 * from: @@(#)dirent.h 5.18 (Berkeley) 2/23/91 * $Id: dirent.h,v 1.4 1993/12/10 19:16:09 jtc Exp $ d40 4 d46 9 d56 1 a56 1 typedef struct { d63 1 a63 1 void *dd_ddloc; /* Linked list of ddloc structs for telldir/seekdir */ a65 7 #ifndef _POSIX_SOURCE #define d_ino d_fileno /* backward compatibility */ /* definitions for library routines operating on directories. */ #define DIRBLKSIZ 1024 d71 1 d74 1 d92 2 @ 1.4 log @Expand "u_long" & "u_short" to "unsigned long" and "unsigned short". Some programs (like NSCA httpd) include without first including so the u_foo types aren't declared. I don't think POSIX.1 allows us to include in either. @ text @d34 1 a34 1 * $Id: dirent.h,v 1.3 1993/08/01 18:44:56 mycroft Exp $ d40 1 a40 19 /* * A directory entry has a struct dirent at the front of it, containing its * inode number, the length of the entry, and the length of the name * contained in the entry. These are followed by the name padded to a 4 * byte boundary with null bytes. All names are guaranteed null terminated. * The maximum length of a name in a directory is MAXNAMLEN. */ struct dirent { unsigned long d_fileno; /* file number of entry */ unsigned short d_reclen; /* length of this record */ unsigned short d_namlen; /* length of string in d_name */ #ifdef _POSIX_SOURCE char d_name[255 + 1]; /* name must be no longer than this */ #else #define MAXNAMLEN 255 char d_name[MAXNAMLEN + 1]; /* name must be no longer than this */ #endif }; a67 1 #ifndef KERNEL a83 2 #endif /* !KERNEL */ @ 1.3 log @Add RCS identifiers. @ text @d34 1 a34 1 * $Id: $ d49 3 a51 3 u_long d_fileno; /* file number of entry */ u_short d_reclen; /* length of this record */ u_short d_namlen; /* length of string in d_name */ a59 9 #ifdef _POSIX_SOURCE typedef void * DIR; #else #define d_ino d_fileno /* backward compatibility */ /* definitions for library routines operating on directories. */ #define DIRBLKSIZ 1024 d61 1 a61 1 typedef struct _dirdesc { d71 7 d83 1 a84 1 #endif /* _POSIX_SOURCE */ a86 1 @ 1.2 log @Removed bugs and memory leaks from the directory functions. @ text @d33 2 a34 1 * @@(#)dirent.h 5.18 (Berkeley) 2/23/91 @ 1.1 log @Initial revision @ text @d76 1 @ 1.1.1.1 log @initial import of 386bsd-0.1 sources @ text @@ 1.1.1.2 log @Import original 4.4-Lite version. @ text @d2 2 a3 2 * Copyright (c) 1989, 1993 * The Regents of the University of California. All rights reserved. d33 1 a33 1 * @@(#)dirent.h 8.1 (Berkeley) 6/8/93 d40 5 a44 2 * The kernel defines the format of directory entries returned by * the getdirentries(2) system call. d46 12 a57 1 #include a75 1 long dd_rewind; /* magic cookie for rewinding */ @ 1.1.1.3 log @import lite-2 @ text @d33 1 a33 1 * @@(#)dirent.h 8.2 (Berkeley) 7/28/94 a62 1 int dd_flags; /* flags for readdir */ a66 6 /* flags for opendir2 */ #define DTF_HIDEW 0x0001 /* hide whiteout entries */ #define DTF_NODUP 0x0002 /* don't return duplicate names */ #define DTF_REWIND 0x0004 /* rewind after reading union stack */ #define __DTF_READALL 0x0008 /* everything has been read */ a82 1 DIR *__opendir2 __P((const char *, int)); @