From 497bb5fc57d14e07115482157ed318d078a83083 Mon Sep 17 00:00:00 2001 From: Eric Blake Date: Mon, 29 Mar 2010 15:08:59 -0600 Subject: 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 . Signed-off-by: Eric Blake --- doc/posix-functions/fdopendir.texi | 3 +++ 1 file changed, 3 insertions(+) (limited to 'doc') diff --git a/doc/posix-functions/fdopendir.texi b/doc/posix-functions/fdopendir.texi index fae7bb751a..89b1a6a21c 100644 --- a/doc/posix-functions/fdopendir.texi +++ b/doc/posix-functions/fdopendir.texi @@ -17,6 +17,9 @@ is not multithread-safe. Also, the replacement does not guarantee that @samp{dirfd(fdopendir(n))==n} (dirfd might fail, or return a different file descriptor than n). @item +This function exists but is not declared on some platforms: +FreeBSD 7.3. +@item This function does not reject non-directory file descriptors on some platforms: GNU/Hurd. -- cgit v1.2.1