bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

getcwd on mingw


From: Bruno Haible
Subject: getcwd on mingw
Date: Sat, 3 Apr 2010 11:31:48 +0100
User-agent: KMail/1.9.9

On mingw, I'm seeing this error in the C++ namespace tests:

../gllib/unistd.h:794: error: invalid conversion from `char*(*)(char*, int)' to 
`char*(*)(char*, size_t)'

This should fix it:


2010-04-03  Bruno Haible  <address@hidden>

        unistd: Fix C++ test error on mingw.
        * lib/unistd.in.h (getcwd): Use _GL_CXXALIAS_SYS_CAST.

--- lib/unistd.in.h.orig        Sat Apr  3 12:28:38 2010
+++ lib/unistd.in.h     Sat Apr  3 12:28:19 2010
@@ -525,7 +525,9 @@
 _GL_FUNCDECL_RPL (getcwd, char *, (char *buf, size_t size));
 _GL_CXXALIAS_RPL (getcwd, char *, (char *buf, size_t size));
 # else
-_GL_CXXALIAS_SYS (getcwd, char *, (char *buf, size_t size));
+/* Need to cast, because on mingw, the second parameter is
+                                                   int size.  */
+_GL_CXXALIAS_SYS_CAST (getcwd, char *, (char *buf, size_t size));
 # endif
 _GL_CXXALIASWARN (getcwd);
 #elif defined GNULIB_POSIXCHECK




reply via email to

[Prev in Thread] Current Thread [Next in Thread]