#endif /* MS_WIN32 */
#ifdef UNIX
-#ifndef MREMAP_MAYMOVE
+#ifndef HAVE_MREMAP
} else {
PyErr_SetString(PyExc_SystemError,
"mmap: resizing not available--no mremap()");
} else {
void *newmap;
+#ifdef MREMAP_MAYMOVE
newmap = mremap(self->data, self->size, new_size, MREMAP_MAYMOVE);
+#else
+ newmap = mremap(self->data, self->size, new_size, 0);
+#endif
if (newmap == (void *)-1)
{
PyErr_SetFromErrno(mmap_module_error);
self->size = new_size;
Py_INCREF(Py_None);
return Py_None;
-#endif /* MREMAP_MAYMOVE */
+#endif /* HAVE_MREMAP */
#endif /* UNIX */
}
}
PyObject *map_size_obj = NULL;
int map_size;
int fd, flags = MAP_SHARED, prot = PROT_WRITE | PROT_READ;
- char * filename;
- int namelen;
char *keywords[] = {"file", "size", "flags", "prot", NULL};
if (!PyArg_ParseTupleAndKeywords(args, kwdict,