bpo-40653: Move _dirnameW out of #ifdef HAVE_SYMLINK/#endif (GH-20144)
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c
index 2ddf30d..ddff283 100644
--- a/Modules/posixmodule.c
+++ b/Modules/posixmodule.c
@@ -8156,8 +8156,6 @@
}
#endif /* defined(HAVE_READLINK) || defined(MS_WINDOWS) */
-#ifdef HAVE_SYMLINK
-
#if defined(MS_WINDOWS)
/* Remove the last portion of the path - return 0 on success */
@@ -8180,6 +8178,12 @@
return 0;
}
+#endif
+
+#ifdef HAVE_SYMLINK
+
+#if defined(MS_WINDOWS)
+
/* Is this path absolute? */
static int
_is_absW(const WCHAR *path)