]> Savannah Git Hosting - gnulib.git/commitdiff
unistd: Fix compilation error with MSVC in C++ mode.
authorBruno Haible <bruno@clisp.org>
Sat, 18 May 2024 00:49:02 +0000 (02:49 +0200)
committerBruno Haible <bruno@clisp.org>
Sat, 18 May 2024 00:49:02 +0000 (02:49 +0200)
* lib/unistd.in.h (read, write): Use _GL_CXXALIAS_MDA_CAST instead of
_GL_CXXALIAS_MDA.

ChangeLog
lib/unistd.in.h

index 535d7ba3824ca7467ef60cd2c0402a3a7d9abe36..888ab7fdd76c759e3106d5088918a37840bb257f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2024-05-17  Bruno Haible  <bruno@clisp.org>
+
+       unistd: Fix compilation error with MSVC in C++ mode.
+       * lib/unistd.in.h (read, write): Use _GL_CXXALIAS_MDA_CAST instead of
+       _GL_CXXALIAS_MDA.
+
 2024-05-17  Bruno Haible  <bruno@clisp.org>
 
        stdbit-h: Fix compilation error with MSVC in C++ mode.
index fa99d7472f41af292d0f5758503dc8408826604e..7dbed38969b4a08e45a09a8d99c59d1b86a326ea 100644 (file)
@@ -1934,11 +1934,7 @@ _GL_CXXALIASWARN (read);
 #   undef read
 #   define read _read
 #  endif
-#  ifdef __MINGW32__
-_GL_CXXALIAS_MDA (read, int, (int fd, void *buf, unsigned int count));
-#  else
-_GL_CXXALIAS_MDA (read, ssize_t, (int fd, void *buf, unsigned int count));
-#  endif
+_GL_CXXALIAS_MDA_CAST (read, ssize_t, (int fd, void *buf, unsigned int count));
 # else
 _GL_CXXALIAS_SYS (read, ssize_t, (int fd, void *buf, size_t count));
 # endif
@@ -2402,11 +2398,7 @@ _GL_CXXALIASWARN (write);
 #   undef write
 #   define write _write
 #  endif
-#  ifdef __MINGW32__
-_GL_CXXALIAS_MDA (write, int, (int fd, const void *buf, unsigned int count));
-#  else
-_GL_CXXALIAS_MDA (write, ssize_t, (int fd, const void *buf, unsigned int count));
-#  endif
+_GL_CXXALIAS_MDA_CAST (write, ssize_t, (int fd, const void *buf, unsigned int count));
 # else
 _GL_CXXALIAS_SYS (write, ssize_t, (int fd, const void *buf, size_t count));
 # endif