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 /Include | |
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 'Include')
-rw-r--r-- | Include/fileutils.h | 6 | ||||
-rw-r--r-- | Include/pyport.h | 22 |
2 files changed, 0 insertions, 28 deletions
diff --git a/Include/fileutils.h b/Include/fileutils.h index cfcc403..577ad88 100644 --- a/Include/fileutils.h +++ b/Include/fileutils.h @@ -15,14 +15,11 @@ PyAPI_FUNC(char*) Py_EncodeLocale( const wchar_t *text, size_t *error_pos); -#if defined(HAVE_STAT) && !defined(MS_WINDOWS) PyAPI_FUNC(int) _Py_wstat( const wchar_t* path, struct stat *buf); -#endif #ifndef Py_LIMITED_API -#if defined(HAVE_FSTAT) || defined(MS_WINDOWS) #ifdef MS_WINDOWS struct _Py_stat_struct { @@ -49,14 +46,11 @@ struct _Py_stat_struct { PyAPI_FUNC(int) _Py_fstat( int fd, struct _Py_stat_struct *stat); -#endif /* HAVE_FSTAT || MS_WINDOWS */ #endif /* Py_LIMITED_API */ -#ifdef HAVE_STAT PyAPI_FUNC(int) _Py_stat( PyObject *path, struct stat *statbuf); -#endif /* HAVE_STAT */ #ifndef Py_LIMITED_API PyAPI_FUNC(int) _Py_open( diff --git a/Include/pyport.h b/Include/pyport.h index 69deb9f..e4b2cf0 100644 --- a/Include/pyport.h +++ b/Include/pyport.h @@ -357,28 +357,6 @@ typedef int Py_ssize_clean_t; * stat() and fstat() fiddling * *******************************/ -/* We expect that stat and fstat exist on most systems. - * It's confirmed on Unix, Mac and Windows. - * If you don't have them, add - * #define DONT_HAVE_STAT - * and/or - * #define DONT_HAVE_FSTAT - * to your pyconfig.h. Python code beyond this should check HAVE_STAT and - * HAVE_FSTAT instead. - * Also - * #define HAVE_SYS_STAT_H - * if <sys/stat.h> exists on your platform, and - * #define HAVE_STAT_H - * if <stat.h> does. - */ -#ifndef DONT_HAVE_STAT -#define HAVE_STAT -#endif - -#ifndef DONT_HAVE_FSTAT -#define HAVE_FSTAT -#endif - #ifdef HAVE_SYS_STAT_H #include <sys/stat.h> #elif defined(HAVE_STAT_H) |