summaryrefslogtreecommitdiffstats
path: root/Modules/mmapmodule.c
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2003-05-03 09:14:54 (GMT)
committerMartin v. Löwis <martin@v.loewis.de>2003-05-03 09:14:54 (GMT)
commitc16f3bd8a391a68427a95e15a3c1894198ff0377 (patch)
tree113dca8c40c8a42cb665e6bcc4af44f9f68bd230 /Modules/mmapmodule.c
parente59e2bab8fe0fc3d20e815ac0f9b83d361d0d715 (diff)
downloadcpython-c16f3bd8a391a68427a95e15a3c1894198ff0377.zip
cpython-c16f3bd8a391a68427a95e15a3c1894198ff0377.tar.gz
cpython-c16f3bd8a391a68427a95e15a3c1894198ff0377.tar.bz2
Patch #708495: Port more stuff to OpenVMS.
Diffstat (limited to 'Modules/mmapmodule.c')
-rw-r--r--Modules/mmapmodule.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/Modules/mmapmodule.c b/Modules/mmapmodule.c
index c2c723c..56033e8 100644
--- a/Modules/mmapmodule.c
+++ b/Modules/mmapmodule.c
@@ -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");