From: Bruno Haible Date: Sat, 18 May 2024 00:49:02 +0000 (+0200) Subject: unistd: Fix compilation error with MSVC in C++ mode. X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=c84c4ba65c1a4948e20eb28c3396cc792bd08ae2;p=gnulib.git 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. --- diff --git a/ChangeLog b/ChangeLog index 07247c033a..8f78d27e8a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2024-05-17 Bruno Haible + + 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 tests: Fix dependencies to test-framework-sh. diff --git a/lib/unistd.in.h b/lib/unistd.in.h index b412966367..0983dbc8b1 100644 --- a/lib/unistd.in.h +++ b/lib/unistd.in.h @@ -1933,11 +1933,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 @@ -2401,11 +2397,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