A different case is this error: ../gllib/stdio.h:803: error: `getline' was not declared in this scope
Here we really want to do "#define getline rpl_getline" even if the system does not declare the function, for the reason mentioned in the documentation: "Some platforms provide a function by this name but with the wrong signature, for example in -linet." So the fix is this: 2010-04-03 Bruno Haible <br...@clisp.org> stdio: Make C++ tests work on mingw. * lib/stdio.in.h (getline): Don't use _GL_CXXALIASWARN if the system does not declare the function. --- lib/stdio.in.h.orig Sat Apr 3 14:33:08 2010 +++ lib/stdio.in.h Sat Apr 3 14:31:26 2010 @@ -525,7 +525,9 @@ _GL_CXXALIAS_SYS (getline, ssize_t, (char **lineptr, size_t *linesize, FILE *stream)); # endif +# if @HAVE_DECL_GETLINE@ _GL_CXXALIASWARN (getline); +# endif #elif defined GNULIB_POSIXCHECK # undef getline # if HAVE_RAW_DECL_GETLINE