diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2015-03-24 10:27:50 +0100 |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2015-03-24 10:27:50 +0100 |
commit | f329878e74e1eefffad5c70942bc6cd2c27440d3 (patch) | |
tree | 398feb83dc1f8a2a8e15a4cd356748fe86219639 /Python/marshal.c | |
parent | 551350a79f1a85d78467740b348fa1cdeb7519e4 (diff) | |
download | cpython-git-f329878e74e1eefffad5c70942bc6cd2c27440d3.tar.gz |
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 'Python/marshal.c')
-rw-r--r-- | Python/marshal.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/Python/marshal.c b/Python/marshal.c index 93d9d1d477..3472882fb5 100644 --- a/Python/marshal.c +++ b/Python/marshal.c @@ -1481,7 +1481,6 @@ PyMarshal_ReadLongFromFile(FILE *fp) return res; } -#if defined(HAVE_FSTAT) || defined(MS_WINDOWS) /* Return size of file in bytes; < 0 if unknown or INT_MAX if too big */ static off_t getfilesize(FILE *fp) @@ -1496,7 +1495,6 @@ getfilesize(FILE *fp) else return (off_t)st.st_size; } -#endif /* If we can get the size of the file up-front, and it's reasonably small, * read it in one gulp and delegate to ...FromString() instead. Much quicker @@ -1509,7 +1507,6 @@ PyMarshal_ReadLastObjectFromFile(FILE *fp) { /* REASONABLE_FILE_LIMIT is by defn something big enough for Tkinter.pyc. */ #define REASONABLE_FILE_LIMIT (1L << 18) -#if defined(HAVE_FSTAT) || defined(MS_WINDOWS) off_t filesize; filesize = getfilesize(fp); if (filesize > 0 && filesize <= REASONABLE_FILE_LIMIT) { @@ -1522,7 +1519,6 @@ PyMarshal_ReadLastObjectFromFile(FILE *fp) } } -#endif /* We don't have fstat, or we do but the file is larger than * REASONABLE_FILE_LIMIT or malloc failed -- read a byte at a time. */ |