bug-gnulib
[Top][All Lists]
Advanced

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

getline on mingw


From: Bruno Haible
Subject: getline on mingw
Date: Sat, 3 Apr 2010 13:44:23 +0100
User-agent: KMail/1.9.9

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  <address@hidden>

        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




reply via email to

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