write: Fix a C++ test error on mingw.
authorBruno Haible <bruno@clisp.org>
Sat, 10 Apr 2010 19:11:00 +0000 (21:11 +0200)
committerIan Beckwith <ianb@erislabs.net>
Mon, 19 Apr 2010 15:29:07 +0000 (16:29 +0100)
(cherry picked from commit 3c65a6806b208533f681855712e0febf4bb0ed67)

ChangeLog
lib/unistd.in.h

index 0df65cb..18f1bc3 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2010-04-10  Bruno Haible  <bruno@clisp.org>
 
+       write: Fix a C++ test error on mingw.
+       * lib/unistd.in.h (write): Use _GL_CXXALIAS_SYS_CAST.
+
+2010-04-10  Bruno Haible  <bruno@clisp.org>
+
        vasnprintf test: Reduce code duplication.
        * tests/test-vasnprintf.c (test_function): New function, extracted from
        test_vasnprintf.
index 8e5ff9e..7302d6d 100644 (file)
@@ -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