bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: stat() replacement with _LARGE_FILES on AIX


From: Eric Blake
Subject: Re: stat() replacement with _LARGE_FILES on AIX
Date: Fri, 30 Oct 2009 06:35:13 -0600
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.23) Gecko/20090812 Thunderbird/2.0.0.23 Mnenhy/0.7.6.666

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

According to Michael Haubenwallner on 10/30/2009 6:21 AM:
> Hi,
> 
> using stat() replacement on AIX results in these build errors (seen in
> gzip-1.3.13 on AIX5.3), because AIX defines 'stat' to 'stat64' when
> _LARGE_FILES is defined (by AC_SYS_LARGEFILE):

Thanks for the report.

> As far as I know, only AIX does use _LARGE_FILES, so the attached patch,
> which works with both gcc and xlc for gzip-1.3.13, should be safe.

If stat is defined, we can't be positive it was defined to stat64 or some
other spelling, like __stat64.  I'd feel safer blindly replacing all known
spellings, as and when we encounter them.

So that I can fully understand the situation on AIX, what does the system
header show for stat64()?  Is there a struct stat64?  I guess if the
#define stat stat64 occurs before either declaration of stat() or struct
stat, that would explain what you are seeing.

I think I will probably apply your patch with minor modifications (the
parenthesis in #if defined are unnecessary), but seeing the system header
will make it more comfortable to explain why we're doing this.

- --
Don't work too hard, make some time for fun as well!

Eric Blake             address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkrq3YEACgkQ84KuGfSFAYCPYwCdFs3SKryS7otpm3jY0fakEPrw
+GIAoJGAEb1xn6y4rpueokh/MvObYlJk
=yT3y
-----END PGP SIGNATURE-----




reply via email to

[Prev in Thread] Current Thread [Next in Thread]