[issue6236] os.popen causes illegal seek on AIX in Python 3.1rc

egreen report at bugs.python.org
Mon Sep 21 20:43:34 CEST 2009


egreen <egreen at operamail.com> added the comment:

The problem is that the fileio struct in Modules/_io/fileio.c defines
the 2-bit seekable field as int.

>From the C99 standard, §6.7.2: for bit-fields, it is
implementation-defined whether the specifier int designates the same
type as signed int or the same type as unsigned int.

Contrary to gcc, both xlc and suncc default to unsigned.

Adding 'signed' solves the problem (and also issue #6348).

Patch attached.

----------
nosy: +egreen
Added file: http://bugs.python.org/file14944/fileio-seekable.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue6236>
_______________________________________


More information about the Python-bugs-list mailing list