Patch #708495: Port more stuff to OpenVMS.

This commit is contained in:
Martin v. Löwis 2003-05-03 09:14:54 +00:00
parent e59e2bab8f
commit c16f3bd8a3
11 changed files with 90 additions and 84 deletions

View file

@ -897,6 +897,10 @@ new_mmap_object(PyObject *self, PyObject *args, PyObject *kwdict)
}
#ifdef HAVE_FSTAT
# ifdef __VMS
/* on OpenVMS we must ensure that all bytes are written to the file */
fsync(fd);
# endif
if (fstat(fd, &st) == 0 && (size_t)map_size > st.st_size) {
PyErr_SetString(PyExc_ValueError,
"mmap length is greater than file size");