diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2015-03-24 09:27:50 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2015-03-24 09:27:50 (GMT) |
commit | f329878e74e1eefffad5c70942bc6cd2c27440d3 (patch) | |
tree | 398feb83dc1f8a2a8e15a4cd356748fe86219639 /Modules/mmapmodule.c | |
parent | 551350a79f1a85d78467740b348fa1cdeb7519e4 (diff) | |
download | cpython-f329878e74e1eefffad5c70942bc6cd2c27440d3.zip cpython-f329878e74e1eefffad5c70942bc6cd2c27440d3.tar.gz cpython-f329878e74e1eefffad5c70942bc6cd2c27440d3.tar.bz2 |
Issue #23753: Python doesn't support anymore platforms without stat() or
fstat(), these functions are always required.
Remove HAVE_STAT and HAVE_FSTAT defines, and stop supporting DONT_HAVE_STAT and
DONT_HAVE_FSTAT.
Diffstat (limited to 'Modules/mmapmodule.c')
-rw-r--r-- | Modules/mmapmodule.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/Modules/mmapmodule.c b/Modules/mmapmodule.c index 63e93b7..25056a4 100644 --- a/Modules/mmapmodule.c +++ b/Modules/mmapmodule.c @@ -1112,9 +1112,7 @@ _GetMapSize(PyObject *o, const char* param) static PyObject * new_mmap_object(PyTypeObject *type, PyObject *args, PyObject *kwdict) { -#ifdef HAVE_FSTAT struct _Py_stat_struct st; -#endif mmap_object *m_obj; PyObject *map_size_obj = NULL; Py_ssize_t map_size; @@ -1179,7 +1177,6 @@ new_mmap_object(PyTypeObject *type, PyObject *args, PyObject *kwdict) if (fd != -1) (void)fcntl(fd, F_FULLFSYNC); #endif -#ifdef HAVE_FSTAT if (fd != -1 && _Py_fstat(fd, &st) == 0 && S_ISREG(st.st_mode)) { if (map_size == 0) { if (st.st_size == 0) { @@ -1204,7 +1201,6 @@ new_mmap_object(PyTypeObject *type, PyObject *args, PyObject *kwdict) return NULL; } } -#endif m_obj = (mmap_object *)type->tp_alloc(type, 0); if (m_obj == NULL) {return NULL;} m_obj->data = NULL; |