openat: work around AIX 7.1 fstatat bug
authorPaul Eggert <eggert@cs.ucla.edu>
Tue, 30 Aug 2011 23:38:59 +0000 (16:38 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Tue, 30 Aug 2011 23:39:37 +0000 (16:39 -0700)
commit0ba19fcc5ff43167939e465af4b93f965fffcc8c
tree3bbe84dc36ba11e6332a43d360ef80f0f7eb3e8c
parentc29a7464f1218da01129bea72cbfc3dcb524881a
openat: work around AIX 7.1 fstatat bug

Problem reported by Kevin Brott for GNU tar, in the thread containing
<http://lists.gnu.org/archive/html/bug-tar/2011-08/msg00015.html>.
* lib/fstatat.c (rpl_fstatat): Do not invoke underlying fstatat if
FSTATAT_ST_SIZE_ETC_BROKEN.
(fstatat) [FSTATAT_ST_SIZE_ETC_BROKEN && HAVE_FSTATAT]: #define to
rpl_fstatat.
* m4/openat.m4 (gl_FUNC_FSTATAT): New macro, with the fstatat-relevant
part of gl_FUNC_OPENAT.  Also, check for the AIX 7.1 bug, and use
AC_CHECK_FUNCS_ONCE for fstatat.
(gl_FUNC_OPENAT): Use it.  Use AC_CHECK_FUNCS_ONCE for
fchmodat, mkdirat, openat and unlinkat.
ChangeLog
lib/fstatat.c
m4/openat.m4