]> granicus.if.org Git - python/commitdiff
Issue #6236, #6348: Fix various failures in the io module under AIX
authorAntoine Pitrou <solipsis@pitrou.net>
Mon, 21 Sep 2009 21:17:48 +0000 (21:17 +0000)
committerAntoine Pitrou <solipsis@pitrou.net>
Mon, 21 Sep 2009 21:17:48 +0000 (21:17 +0000)
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
Modules/_io/fileio.c
Modules/_io/textio.c

index 1cc8f741b3451cc4731ba66c1092fd444c15cb9e..89cbf3ca460931338eb3dc244ead5c4e0e3cac9f 100644 (file)
--- 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
index 989c86641d840e5a9b6081ba0fda11aa6a9ed0ac..e98de9e69faff16663623fe2c60462652c8ef1d8 100644 (file)
 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;
index 3b627f2245fda3d5854bc64c3f230015281c19dc..2f99a606b2e8231b4e99426cf207cfd6f0b45c8f 100644 (file)
@@ -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