summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2015-02-22 19:34:54 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2015-02-22 19:34:54 (GMT)
commit06a13f81ea6293b9aa516a7b2f07f217f8cabb01 (patch)
tree112bf0114e64fe713b089af5e46b905d3170c712
parent12ebbc74f1421bf5979ac904178f3f4e0a0f37d6 (diff)
downloadcpython-06a13f81ea6293b9aa516a7b2f07f217f8cabb01.zip
cpython-06a13f81ea6293b9aa516a7b2f07f217f8cabb01.tar.gz
cpython-06a13f81ea6293b9aa516a7b2f07f217f8cabb01.tar.bz2
Issue #23152: Move declarations back to posixmodule.c.
Declarations of Windows-specific auxilary functions need Windows types from windows.h. Instead of including windows.h in Python.h and making it available to all Windows users, it is simpler and safer just move declarations to the single file that needs them.
-rw-r--r--Include/fileutils.h4
-rw-r--r--Modules/posixmodule.c6
2 files changed, 6 insertions, 4 deletions
diff --git a/Include/fileutils.h b/Include/fileutils.h
index 5ddd511..bb90481 100644
--- a/Include/fileutils.h
+++ b/Include/fileutils.h
@@ -42,10 +42,6 @@ struct _Py_stat_struct {
int st_ctime_nsec;
unsigned long st_file_attributes;
};
-
-PyAPI_FUNC(void) _Py_time_t_to_FILE_TIME(time_t, int, FILETIME *);
-PyAPI_FUNC(void) _Py_attribute_data_to_stat(BY_HANDLE_FILE_INFORMATION *,
- ULONG, struct _Py_stat_struct *);
#else
# define _Py_stat_struct stat
#endif
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c
index 945c9d0..e381bf1 100644
--- a/Modules/posixmodule.c
+++ b/Modules/posixmodule.c
@@ -372,6 +372,12 @@ static int win32_can_symlink = 0;
#define DWORD_MAX 4294967295U
+#ifdef MS_WINDOWS
+/* defined in fileutils.c */
+PyAPI_FUNC(void) _Py_time_t_to_FILE_TIME(time_t, int, FILETIME *);
+PyAPI_FUNC(void) _Py_attribute_data_to_stat(BY_HANDLE_FILE_INFORMATION *,
+ ULONG, struct _Py_stat_struct *);
+#endif
#ifdef MS_WINDOWS
static int