]> granicus.if.org Git - python/commitdiff
Issue #23152: Move declarations back to posixmodule.c.
authorSerhiy Storchaka <storchaka@gmail.com>
Sun, 22 Feb 2015 19:34:54 +0000 (21:34 +0200)
committerSerhiy Storchaka <storchaka@gmail.com>
Sun, 22 Feb 2015 19:34:54 +0000 (21:34 +0200)
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.

Include/fileutils.h
Modules/posixmodule.c

index 5ddd5116223445bcee9017927a797ab4062f2f59..bb9048116d7b27d66b56fede6bfd4878af0b28b1 100644 (file)
@@ -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
index 945c9d01ecfa165d2549183ec9ba82372abe7197..e381bf1bbbad7af1e63327284f6b50e8cd386e98 100644 (file)
@@ -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