summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2022-11-26 10:13:30 (GMT)
committerGitHub <noreply@github.com>2022-11-26 10:13:30 (GMT)
commit610b7798af40e1457b884c91997219cf75637a04 (patch)
treea4348d0ddbbc175fbc49692d53c1b9592d71cd96 /Modules
parent1fc2e2aa920aa4daa2924a3dee9dfe1843ca0e9b (diff)
downloadcpython-610b7798af40e1457b884c91997219cf75637a04.zip
cpython-610b7798af40e1457b884c91997219cf75637a04.tar.gz
cpython-610b7798af40e1457b884c91997219cf75637a04.tar.bz2
GH-95896: posixmodule.c: fix osdefs.h inclusion to not depend on compiler (GH-95897)
(cherry picked from commit ec2b76aa8b7c6313293ff9c6814e8bc31e08fcaf) Co-authored-by: TheShermanTanker <32636402+TheShermanTanker@users.noreply.github.com> Co-authored-by: Steve Dower <steve.dower@python.org>
Diffstat (limited to 'Modules')
-rw-r--r--Modules/posixmodule.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c
index f92e2ae..62b81a1 100644
--- a/Modules/posixmodule.c
+++ b/Modules/posixmodule.c
@@ -21,6 +21,9 @@
FSCTL_GET_REPARSE_POINT is not exported with WIN32_LEAN_AND_MEAN. */
# include <windows.h>
# include <pathcch.h>
+# include <lmcons.h> // UNLEN
+# include "osdefs.h" // SEP
+# define HAVE_SYMLINK
#endif
#ifdef __VXWORKS__
@@ -430,18 +433,7 @@ extern char *ctermid_r(char *);
# ifdef HAVE_PROCESS_H
# include <process.h>
# endif
-# ifndef IO_REPARSE_TAG_SYMLINK
-# define IO_REPARSE_TAG_SYMLINK (0xA000000CL)
-# endif
-# ifndef IO_REPARSE_TAG_MOUNT_POINT
-# define IO_REPARSE_TAG_MOUNT_POINT (0xA0000003L)
-# endif
-# include "osdefs.h" // SEP
# include <malloc.h>
-# include <windows.h>
-# include <shellapi.h> // ShellExecute()
-# include <lmcons.h> // UNLEN
-# define HAVE_SYMLINK
#endif /* _MSC_VER */
#ifndef MAXPATHLEN