[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Problem with fstatat on AIX 7.1
From: |
Bruno Haible |
Subject: |
Re: Problem with fstatat on AIX 7.1 |
Date: |
Wed, 31 Aug 2011 10:10:36 +0200 |
User-agent: |
KMail/1.13.6 (Linux/2.6.37.6-0.5-desktop; KDE/4.6.0; x86_64; ; ) |
Hi Paul,
> > Return code on that as compiled comes back as "1" .
>
> OK, thanks, to move forward on that part, I installed the following
> patch into gnulib.
> ... check for the AIX 7.1 bug
But there is no AIX 7.1 bug. If fstatat would return wrong st_size fields,
the return code would have been 3, not 1. Kevin Brott reported an exit code
of 1, which means, he saved the file as "foo.c", not "fstat-test.c", as was
intended.
$ gcc -Wall fstat-test.c
$ ./a.out
$ echo $?
0
The test that you put into openat.m4 succeeds (return code 0) on AIX 7.1
for me.
$ gcc -Wall foo.c
$ ./a.out
$ echo $?
1
$ echo xxx >conftest.file
$ ./a.out
$ echo $?
0
So I think the entire patch is a workaround against a nonexistent bug.
(And if it was a real bug, it would have had to be documented in
doc/posix-functions/fstatat.texi.)
Bruno
--
In memoriam Magomed Yevloyev <http://en.wikipedia.org/wiki/Magomed_Yevloyev>