]> granicus.if.org Git - python/commitdiff
Mark Hammond <mhammond@skippinet.com.au>:
authorFred Drake <fdrake@acm.org>
Wed, 5 Apr 2000 14:15:31 +0000 (14:15 +0000)
committerFred Drake <fdrake@acm.org>
Wed, 5 Apr 2000 14:15:31 +0000 (14:15 +0000)
This patch fixes the mmap module on Windows 9x.

Modules/mmapmodule.c

index a17f55e223d3e10b47e0beb1c2e499a86b27ee11..9f814083e23bf8daed754cb497579ecc35afb39f 100644 (file)
@@ -752,12 +752,8 @@ new_mmap_object (PyObject * self, PyObject * args)
                    PyErr_SetFromErrno(mmap_module_error);
                    return NULL;
                }
-//
-//             fh = OpenFile (filename, &file_info, OF_READWRITE);
-//             if (fh == HFILE_ERROR) {
-//                     PyErr_SetFromWindowsErr(GetLastError());
-//                     return NULL;
-//             }
+               /* Win9x appears to need us seeked to zero */
+               fseek(&_iob[fileno], 0, SEEK_SET);
        }
 
        m_obj = PyObject_NEW (mmap_object, &mmap_object_type);