]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-40653: Move _dirnameW out of GH-ifdef HAVE_SYMLINK/GH-endif (GH-20144)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Mon, 18 May 2020 16:34:21 +0000 (09:34 -0700)
committerGitHub <noreply@github.com>
Mon, 18 May 2020 16:34:21 +0000 (09:34 -0700)
(cherry picked from commit 7f21c9ac872acc2114aee3313d132b016550ff42)

Co-authored-by: Minmin Gong <gongminmin@msn.com>
Misc/NEWS.d/next/Build/2020-05-17-03-33-00.bpo-40653.WI8UGn.rst [new file with mode: 0644]
Modules/posixmodule.c

diff --git a/Misc/NEWS.d/next/Build/2020-05-17-03-33-00.bpo-40653.WI8UGn.rst b/Misc/NEWS.d/next/Build/2020-05-17-03-33-00.bpo-40653.WI8UGn.rst
new file mode 100644 (file)
index 0000000..1e6c5cb
--- /dev/null
@@ -0,0 +1 @@
+Move _dirnameW out of HAVE_SYMLINK to fix a potential compiling issue.
\ No newline at end of file
index 977e49f432a34410697c4684e2148fce8d6a5b12..43d4302b92de7567df6a94a8e1d41b55b46d0dba 100644 (file)
@@ -7301,8 +7301,6 @@ win_readlink(PyObject *self, PyObject *args, PyObject *kwargs)
 
 
 
-#ifdef HAVE_SYMLINK
-
 #if defined(MS_WINDOWS)
 
 /* Grab CreateSymbolicLinkW dynamically from kernel32 */
@@ -7341,6 +7339,12 @@ _dirnameW(WCHAR *path)
     return 0;
 }
 
+#endif
+
+#ifdef HAVE_SYMLINK
+
+#if defined(MS_WINDOWS)
+
 /* Is this path absolute? */
 static int
 _is_absW(const WCHAR *path)