Fix failure-to-read-man-page in commit 899bd785c.
Fix failure-to-read-man-page in commit 899bd785c.

posix_fallocate() is not quite a drop-in replacement for fallocate(),
because it is defined to return the error code as its function result,
not in "errno".  I (tgl) missed this because RHEL6's version seems
to set errno as well.  That is not the case on more modern Linuxen,
though, as per buildfarm results.

Aside from fixing the return-convention confusion, remove the test
for ENOSYS; we expect that glibc will mask that for posix_fallocate,
though it does not for fallocate.  Keep the test for EINTR, because
POSIX specifies that as a possible result, and buildfarm results
suggest that it can happen in practice.

Back-patch to 9.4, like the previous commit.

Thomas Munro

Discussion: c6e4e0d0724c7bc740ad296e009034aebd0dacae@mail.yahoo.com

adam8157/gpdb,xinzweb/gpdb,greenplum-db/gpdb,xinzweb/gpdb,adam8157/gpdb,greenplum-db/gpdb,xinzweb/gpdb,adam8157/gpdb,adam8157/gpdb,lisakowen/gpdb,50wu/gpdb,greenplum-db/gpdb,greenplum-db/gpdb,50wu/gpdb,50wu/gpdb,lisakowen/gpdb,greenplum-db/gpdb,50wu/gpdb,greenplum-db/gpdb,xinzweb/gpdb,xinzweb/gpdb,greenplum-db/gpdb,lisakowen/gpdb,xinzweb/gpdb,xinzweb/gpdb,lisakowen/gpdb,50wu/gpdb,lisakowen/gpdb,adam8157/gpdb,lisakowen/gpdb,adam8157/gpdb,50wu/gpdb,50wu/gpdb,lisakowen/gpdb,xinzweb/gpdb,50wu/gpdb,greenplum-db/gpdb,adam8157/gpdb,lisakowen/gpdb,adam8157/gpdb