mkdir: Fix for use of posixcheck module on native Windows.
authorBruno Haible <bruno@clisp.org>
Tue, 27 Aug 2024 20:00:54 +0000 (22:00 +0200)
committerBruno Haible <bruno@clisp.org>
Tue, 17 Sep 2024 10:59:30 +0000 (12:59 +0200)
* lib/sys_stat.in.h (mkdir): Give priority to the native Windows
definition over the GNULIB_POSIXCHECK redefinition.

ChangeLog
lib/sys_stat.in.h

index 0f275f1b365a1a78c9fc0e3f3f102dca2d2c9aea..b240baa52943e51b98f41ab6a39b641d4e826d5f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2024-08-27  Bruno Haible  <bruno@clisp.org>
+
+       mkdir: Fix for use of posixcheck module on native Windows.
+       * lib/sys_stat.in.h (mkdir): Give priority to the native Windows
+       definition over the GNULIB_POSIXCHECK redefinition.
+
 2024-08-27  Bruno Haible  <bruno@clisp.org>
 
        windows-spawn: Fix clang warning.
index 1e82399c87b3bbafa355ac81d90e492aeeaa4a43..f20a69a21209edf1010f23b702d36edf41ce6f2a 100644 (file)
@@ -673,12 +673,6 @@ _GL_CXXALIAS_RPL (mkdir, int, (char const *name, mode_t mode));
 _GL_CXXALIAS_SYS (mkdir, int, (char const *name, mode_t mode));
 # endif
 _GL_CXXALIASWARN (mkdir);
-#elif defined GNULIB_POSIXCHECK
-# undef mkdir
-# if HAVE_RAW_DECL_MKDIR
-_GL_WARN_ON_USE (mkdir, "mkdir does not always support two parameters - "
-                 "use gnulib module mkdir for portability");
-# endif
 #elif @GNULIB_MDA_MKDIR@
 /* On native Windows, map 'mkdir' to '_mkdir', so that -loldnames is not
    required.  In C++ with GNULIB_NAMESPACE, avoid differences between
@@ -701,6 +695,12 @@ _GL_CXXALIAS_RPL (mkdir, int, (char const *name, mode_t mode));
 _GL_CXXALIAS_SYS (mkdir, int, (char const *name, mode_t mode));
 # endif
 _GL_CXXALIASWARN (mkdir);
+#elif defined GNULIB_POSIXCHECK
+# undef mkdir
+# if HAVE_RAW_DECL_MKDIR
+_GL_WARN_ON_USE (mkdir, "mkdir does not always support two parameters - "
+                 "use gnulib module mkdir for portability");
+# endif
 #endif