freebsd-dev/include
John Baldwin 9f72c0322c Fix some edge cases with rewinddir():
- In the unionfs case, opendir() and fdopendir() read the directory's full
  contents and cache it.  This cache is not refreshed when rewinddir() is
  called, so rewinddir() will not notice updates to a directory.  Fix this
  by splitting the code to fetch a directory's contents out of
  __opendir_common() into a new _filldir() function and call this from
  rewinddir() when operating on a unionfs directory.
- If rewinddir() is called on a directory opened with fdopendir() before
  any directory entries are fetched, rewinddir() will not adjust the seek
  location of the backing file descriptor.  If the file descriptor passed
  to fdopendir() had a non-zero offset, the rewinddir() will not rewind to
  the beginning.  Fix this by always seeking back to 0 in rewinddir().
  This means the dd_rewind hack can also be removed.

While here, add missing locking to rewinddir().

CR:   	    	https://phabric.freebsd.org/D312
Reviewed by:	jilles
MFC after:	1 week
2014-07-11 16:16:26 +00:00
..
arpa Use src.opts.mk in preference to bsd.own.mk except where we need stuff 2014-05-06 04:22:01 +00:00
gssapi Fix gssapi/gssapi_krb5.h after Heimdal 1.5.1 import. 2013-06-30 07:46:22 +00:00
protocols Add proper prerequisites for even two more headers. 2013-05-21 21:50:11 +00:00
rpc Replace Sun Industry Standards Source License for Sun RPC code with a 2013-11-25 19:08:38 +00:00
rpcsvc Replace Sun RPC license with a 3-clause BSD license. This license change 2013-12-09 04:26:50 +00:00
xlocale Fix strcasecmp_l() and strncasecmp_l() POSIX 2008 compliance. 2014-05-30 01:09:07 +00:00
_ctype.h
a.out.h
ar.h
assert.h
bitstring.h
complex.h I'm happy to finally commit stephen@'s implementations of cacos, 2013-05-30 04:49:26 +00:00
cpio.h
ctype.h
db.h
dirent.h Fix some edge cases with rewinddir(): 2014-07-11 16:16:26 +00:00
dlfcn.h
elf-hints.h
elf.h
err.h
fmtmsg.h
fnmatch.h
fstab.h
fts.h Allow certain headers to be included more easily. 2013-05-21 21:20:10 +00:00
ftw.h
getopt.h
glob.h
grp.h include: Remove checks for __BSD_VISIBLE where redundant with __XSI_VISIBLE 2014-05-11 13:48:21 +00:00
gssapi.h
hesiod.h
iconv.h Add ICONV_{GET,SET}_ILSEQ_INVALID iconvctl. GNU iconv returns EILSEQ 2013-11-25 01:26:06 +00:00
ieeefp.h
ifaddrs.h Allow certain headers to be included more easily. 2013-05-21 21:20:10 +00:00
inttypes.h Rename __wchar_t so it no longer conflicts with __wchar_t from clang 3.4 2014-04-01 14:46:11 +00:00
iso646.h
kenv.h
langinfo.h langinfo.h: Hide YESSTR and NOSTR in strict POSIX mode. 2014-04-19 12:38:01 +00:00
libgen.h
limits.h
link.h
locale.h
Makefile Don't install GSS-API headers when the GSSAPI option has been disabled. 2014-06-13 10:08:18 +00:00
malloc_np.h Update jemalloc to version 3.5.0. 2014-01-23 02:47:36 +00:00
malloc.h
memory.h
mk-osreldate.sh Set proper permissions on the generated osreldate.h file; a file readable 2013-09-30 21:01:04 +00:00
monetary.h
mpool.h
mqueue.h
ndbm.h
netconfig.h
netdb.h
nl_types.h
nlist.h
nss.h
nsswitch.h
paths.h Assume that the -f argument is /dev/gpioc0 if it is not passed. 2013-09-17 11:48:47 +00:00
printf.h
proc_service.h
pthread_np.h
pthread.h Add a dummy statement to the beginning of the pthread_cleanup_pop() macro 2013-10-22 19:53:52 +00:00
pwd.h
ranlib.h
readpassphrase.h
regex.h
res_update.h
resolv.h
runetype.h
search.h
semaphore.h
setjmp.h include: Remove checks for __BSD_VISIBLE where redundant with __XSI_VISIBLE 2014-05-11 13:48:21 +00:00
signal.h include: Remove checks for __BSD_VISIBLE where redundant with __XSI_VISIBLE 2014-05-11 13:48:21 +00:00
spawn.h
stab.h
stdalign.h
stdbool.h
stddef.h Rename __wchar_t so it no longer conflicts with __wchar_t from clang 3.4 2014-04-01 14:46:11 +00:00
stdio.h include: Don't expose L_cuserid in strict C standard compliance mode. 2014-05-11 16:34:17 +00:00
stdlib.h Add support for some block functions that come from OS X. These are 2014-04-02 16:07:48 +00:00
stdnoreturn.h
string.h include: Remove checks for __BSD_VISIBLE where redundant with __XSI_VISIBLE 2014-05-11 13:48:21 +00:00
stringlist.h - sl_find does not modify 'name' 2013-04-23 13:03:03 +00:00
strings.h Fix strcasecmp_l() and strncasecmp_l() POSIX 2008 compliance. 2014-05-30 01:09:07 +00:00
sysexits.h
tar.h
termios.h include: Remove checks for __BSD_VISIBLE where redundant with __XSI_VISIBLE 2014-05-11 13:48:21 +00:00
tgmath.h Enable improved <tgmath.h> for Clang even when not using C11. 2013-04-27 21:18:34 +00:00
time.h
timeconv.h
timers.h
ttyent.h Add a new flag to /etc/ttys: onifconsole. This is equivalent to "on" if the 2014-01-20 18:15:06 +00:00
uchar.h Fix <uchar.h> in for C++11. 2013-05-25 16:58:12 +00:00
ulimit.h
unistd.h include: Remove checks for __BSD_VISIBLE where redundant with __XSI_VISIBLE 2014-05-11 13:48:21 +00:00
unwind.h
utime.h
utmpx.h
uuid.h
varargs.h
wchar.h include: Remove checks for __BSD_VISIBLE where redundant with __XSI_VISIBLE 2014-05-11 13:48:21 +00:00
wctype.h
wordexp.h
xlocale.h