fdopendir: work around FreeBSD bug
authorEric Blake <eblake@redhat.com>
Mon, 29 Mar 2010 21:08:59 +0000 (15:08 -0600)
committerEric Blake <eblake@redhat.com>
Tue, 30 Mar 2010 14:26:01 +0000 (08:26 -0600)
commit497bb5fc57d14e07115482157ed318d078a83083
treed71ded5712c568c3c924a42a0782eaec56a4c1c9
parente046ffb123d352dec87f91fc638490572ef4d31d
fdopendir: work around FreeBSD bug

Without a declaration, at least tar would core dump on 64-bit
FreeBSD because gcc only used 32 bits of the resulting pointer.

* m4/dirent_h.m4 (gl_DIRENT_H_DEFAULTS): New witness.
* m4/fdopendir.m4 (gl_FUNC_FDOPENDIR): Set it.
* modules/dirent (Makefile.am): Substitute it.
* lib/dirent.in.h (fdopendir): Supply missing FreeBSD
declaration.
* doc/posix-functions/fdopendir.texi (fdopendir): Document the
fix.
Reported by Christian Weisgerber <naddy@mips.inka.de>.

Signed-off-by: Eric Blake <eblake@redhat.com>
ChangeLog
doc/posix-functions/fdopendir.texi
lib/dirent.in.h
m4/dirent_h.m4
m4/fdopendir.m4
modules/dirent