]> git.ipfire.org Git - thirdparty/gnulib.git/commitdiff
utime-h: Fix error in C++ mode with MSVC.
authorBruno Haible <bruno@clisp.org>
Sun, 25 May 2025 17:11:52 +0000 (19:11 +0200)
committerBruno Haible <bruno@clisp.org>
Sun, 25 May 2025 17:11:52 +0000 (19:11 +0200)
* lib/utime.in.h (utime): Use _GL_CXXALIAS_MDA_CAST instead of
_GL_CXXALIAS_MDA.

ChangeLog
lib/utime.in.h

index f2ccb1fb940555573766cef7ebb5b41672012c75..a024ef7e40cd94e02c46f1321e1c18699f52a95c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2025-05-25  Bruno Haible  <bruno@clisp.org>
+
+       utime-h: Fix error in C++ mode with MSVC.
+       * lib/utime.in.h (utime): Use _GL_CXXALIAS_MDA_CAST instead of
+       _GL_CXXALIAS_MDA.
+
 2025-05-22  Collin Funk  <collin.funk1@gmail.com>
 
        stdckdint-h: Don't generate header if it is not needed.
index 0ac9993f9d78f1a014f9fb9ed1f1404575bf2e0c..10ba32ccec51ab9f5b3657ff751012e95fa06a5f 100644 (file)
@@ -106,7 +106,9 @@ _GL_WARN_ON_USE (utime,
 #   undef utime
 #   define utime _utime
 #  endif
-_GL_CXXALIAS_MDA (utime, int, (const char *filename, const struct utimbuf *ts));
+/* Need to cast, because on MSVC, the second parameter is of type
+   'struct _utimbuf *'.  */
+_GL_CXXALIAS_MDA_CAST (utime, int, (const char *filename, const struct utimbuf *ts));
 # else
 _GL_CXXALIAS_SYS (utime, int, (const char *filename, const struct utimbuf *ts));
 # endif