From: Bruno Haible Date: Tue, 27 Aug 2024 20:00:54 +0000 (+0200) Subject: mkdir: Fix for use of posixcheck module on native Windows. X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=59b225ae801e031c9e015bc28ab8415d9d1843c0;p=gnulib.git 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. --- diff --git a/ChangeLog b/ChangeLog index 446cd67aac..2e60f867e3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2024-08-27 Bruno Haible + + 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 windows-spawn: Fix clang warning. diff --git a/lib/sys_stat.in.h b/lib/sys_stat.in.h index 531232bbc1..d2ecdb9da9 100644 --- a/lib/sys_stat.in.h +++ b/lib/sys_stat.in.h @@ -675,12 +675,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 @@ -703,6 +697,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