[issue32390] AIX (xlc_r) compile error with Modules/posixmodule.c: Function argument assignment between types "unsigned long" and "struct fsid_t" is not allowed
Michael Felt
report at bugs.python.org
Wed Dec 20 14:49:51 EST 2017
Michael Felt <michael at felt.demon.nl> added the comment:
FYI: from /usr/include/types.h
/* typedef for the File System Identifier (fsid). This must correspond
* to the "struct fsid" structure in _ALL_SOURCE below.
*/
typedef struct fsid_t {
#ifdef __64BIT_KERNEL
unsigned long val[2];
#else /* __64BIT_KERNEL */
#ifdef _ALL_SOURCE
unsigned int val[2];
#else /* _ALL_SOURCE */
unsigned int __val[2];
#endif /* _ALL_SOURCE */
#endif /* __64BIT_KERNEL */
} fsid_t;
And, currently I am building in 32-bit mode, with a 64BIT kernel (AIX 6.1) - so I expect it to be 2 unsigned_longs.
However, I am not smart enough to find a solution: I tried:
PyStructSequence_SET_ITEM(v, 10, PyLong_FromUnsignedLong((unsigned long) st.f_fsid));
and PyStructSequence_SET_ITEM(v, 10, PyLong_FromUnsignedLong((unsigned long *) st.f_fsid));
Both return:
"./Modules/posixmodule.c", line 9328.80: 1506-117 (S) Operand must be a scalar type.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue32390>
_______________________________________
More information about the Python-bugs-list
mailing list