mirror of
https://github.com/python/cpython.git
synced 2025-11-02 03:01:58 +00:00
Patch #708495: Port more stuff to OpenVMS.
This commit is contained in:
parent
e59e2bab8f
commit
c16f3bd8a3
11 changed files with 90 additions and 84 deletions
|
|
@ -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");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue