This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Michael.Felt
Recipients Michael.Felt, xdegaye
Date 2018-01-01.16:17:03
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1514823424.4.0.467229070634.issue32390@psf.upfronthosting.co.za>
In-reply-to
Content
Did some additional research. The code can work asis when _ALL_SOURCE is undefined. Or, in other words - there does not have to be a variable syntax issue or separate code for AIX.

As you read this - please remember that since issue #32143 was 'resolved' AIX cannot compile.

* https://www.gnu.org/software/autoconf/manual/autoconf-2.64/html_node/Posix-Variants.html

describes _ALL_SOURCE as a macro for AIX3.

Looking at AIX: /usr/include/sys/types.h - by undefining _ALL_SOURCE the typedefs in the header files are equivalent enough that the new code added for os.statvfs(path) is compiled by both gcc and xlc.

As examples (from Centos)
/usr/include/bits/typesizes.h:72:#define __FSID_T_TYPE          struct { int __val[2]; }

And from AIX:
 * /usr/include/sys/types.h
  +360  / * typedef for the File System Identifier (fsid).  This must correspond
  +361    * to the "struct fsid" structure in _ALL_SOURCE below.
  +362    * /
  +363  typedef struct fsid_t {
  +364  #ifdef __64BIT_KERNEL
  +365          unsigned long val[2];
  +366  #else  / * __64BIT_KERNEL * /
  +367  #ifdef _ALL_SOURCE
  +368          unsigned int val[2];
  +369  #else  / * _ALL_SOURCE * /
  +370          unsigned int __val[2];
  +371  #endif / * _ALL_SOURCE * /
  +372  #endif / * __64BIT_KERNEL * /
  +373  } fsid_t;
 */

(Note - a variation of the text above was in the pull request https://github.com/python/cpython/pull/4972. Per reviewer request - this is removed and a discussion is now open here.)

Thank you for your comments.
History
Date User Action Args
2018-01-01 16:17:04Michael.Feltsetrecipients: + Michael.Felt, xdegaye
2018-01-01 16:17:04Michael.Feltsetmessageid: <1514823424.4.0.467229070634.issue32390@psf.upfronthosting.co.za>
2018-01-01 16:17:04Michael.Feltlinkissue32390 messages
2018-01-01 16:17:03Michael.Feltcreate