From: Antoine Pitrou Date: Mon, 21 Sep 2009 21:17:48 +0000 (+0000) Subject: Issue #6236, #6348: Fix various failures in the io module under AIX X-Git-Tag: v2.7a1~474 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2a46658beef7de998dfcf85ca5e9ddf97f63a8bf;p=thirdparty%2FPython%2Fcpython.git Issue #6236, #6348: Fix various failures in the io module under AIX and other platforms, when using a non-gcc compiler. Patch by egreen. In addition, I made explicit the signedness of all bitfields in the IO library. --- diff --git a/Misc/NEWS b/Misc/NEWS index 1cc8f741b345..89cbf3ca4609 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -379,6 +379,9 @@ Core and Builtins Library ------- +- Issue #6236, #6348: Fix various failures in the `io` module under AIX + and other platforms, when using a non-gcc compiler. Patch by egreen. + - Issue #6954: Fixed crash when using DISTUTILS_DEBUG flag in Distutils. - Issue #6851: Fix urllib.urlopen crash on secondairy threads on OSX 10.6 diff --git a/Modules/_io/fileio.c b/Modules/_io/fileio.c index 989c86641d84..e98de9e69faf 100644 --- a/Modules/_io/fileio.c +++ b/Modules/_io/fileio.c @@ -45,10 +45,10 @@ typedef struct { PyObject_HEAD int fd; - unsigned readable : 1; - unsigned writable : 1; - int seekable : 2; /* -1 means unknown */ - int closefd : 1; + unsigned int readable : 1; + unsigned int writable : 1; + signed int seekable : 2; /* -1 means unknown */ + unsigned int closefd : 1; PyObject *weakreflist; PyObject *dict; } fileio; diff --git a/Modules/_io/textio.c b/Modules/_io/textio.c index 3b627f2245fd..2f99a606b2e8 100644 --- a/Modules/_io/textio.c +++ b/Modules/_io/textio.c @@ -190,9 +190,9 @@ typedef struct { PyObject_HEAD PyObject *decoder; PyObject *errors; - int pendingcr:1; - int translate:1; - unsigned int seennl:3; + signed int pendingcr: 1; + signed int translate: 1; + unsigned int seennl: 3; } nldecoder_object; static int