From ca767bd2db064e8e16ba45d48706dcb4aa6ec42b Mon Sep 17 00:00:00 2001 From: Antoine Pitrou Date: Mon, 21 Sep 2009 21:37:02 +0000 Subject: Merged revisions 75007 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r75007 | antoine.pitrou | 2009-09-21 23:17:48 +0200 (lun., 21 sept. 2009) | 7 lines 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. ........ --- Misc/NEWS | 3 +++ Modules/_io/fileio.c | 8 ++++---- Modules/_io/textio.c | 6 +++--- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/Misc/NEWS b/Misc/NEWS index 6948fc6..4e49d8f 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -72,6 +72,9 @@ C-API Library ------- +- Issue #6236, #6348: Fix various failures in the I/O library under AIX + and other platforms, when using a non-gcc compiler. Patch by egreen. + - Issue #4606: Passing 'None' if ctypes argtype is set to POINTER(...) does now always result in NULL. diff --git a/Modules/_io/fileio.c b/Modules/_io/fileio.c index 4e7c721..438848b 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 b91852e..333c93f 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 -- cgit v0.12