# HG changeset patch # User Bruno Haible # Date 1270926660 -7200 # Node ID 670e389ef70e290db3172448a9b381b528e8a4f6 # Parent 563239444f8f5f2eb183b66c4a9b42f1634c2d16 write: Fix a C++ test error on mingw. diff --git a/ChangeLog b/ChangeLog --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2010-04-10 Bruno Haible + + write: Fix a C++ test error on mingw. + * lib/unistd.in.h (write): Use _GL_CXXALIAS_SYS_CAST. + 2010-04-10 Bruno Haible vasnprintf test: Reduce code duplication. diff --git a/lib/unistd.in.h b/lib/unistd.in.h --- a/lib/unistd.in.h +++ b/lib/unistd.in.h @@ -1268,7 +1268,10 @@ _GL_ARG_NONNULL ((2))); _GL_CXXALIAS_RPL (write, ssize_t, (int fd, const void *buf, size_t count)); # else -_GL_CXXALIAS_SYS (write, ssize_t, (int fd, const void *buf, size_t count)); +/* Need to cast, because on mingw, the third parameter is + unsigned int count + and the return type is 'int'. */ +_GL_CXXALIAS_SYS_CAST (write, ssize_t, (int fd, const void *buf, size_t count)); # endif _GL_CXXALIASWARN (write); #endif