From 3c65a6806b208533f681855712e0febf4bb0ed67 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sat, 10 Apr 2010 21:11:00 +0200 Subject: [PATCH] write: Fix a C++ test error on mingw. --- ChangeLog | 5 +++++ lib/unistd.in.h | 5 ++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index d347b26bc..b8435cd3d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 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. * tests/test-vasnprintf.c (test_function): New function, extracted from test_vasnprintf. diff --git a/lib/unistd.in.h b/lib/unistd.in.h index 8e5ff9eac..7302d6d3e 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 -- 2.11.0