From: Bruno Haible Date: Sat, 10 Apr 2010 19:11:00 +0000 (+0200) Subject: write: Fix a C++ test error on mingw. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3c65a6806b208533f681855712e0febf4bb0ed67;p=pspp write: Fix a C++ test error on mingw. --- diff --git a/ChangeLog b/ChangeLog index d347b26bc7..b8435cd3de 100644 --- 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 index 8e5ff9eac1..7302d6d3e1 100644 --- a/lib/unistd.in.h +++ b/lib/unistd.in.h @@ -1268,7 +1268,10 @@ _GL_FUNCDECL_RPL (write, ssize_t, (int fd, const void *buf, size_t count) _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