[cairo-bugs] [Bug 89356] compilation error on AIX 6.1 (implicit declaration of function 'getline')

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Thu Mar 5 01:39:04 PST 2015


https://bugs.freedesktop.org/show_bug.cgi?id=89356

Michael Haubenwallner <michael.haubenwallner at ssi-schaefer.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEEDINFO                    |NEW
            Summary|compilation error on AIX    |compilation error on AIX
                   |(implicit declaration of    |6.1 (implicit declaration
                   |function 'getline')         |of function 'getline')

--- Comment #3 from Michael Haubenwallner <michael.haubenwallner at ssi-schaefer.com> ---
The explanation is quite simple: AIX 6.1 <stdio.h> contains these lines:

  #ifdef _GETDELIM
  extern ssize_t  getdelim(char **, size_t *, int, FILE *);
  extern ssize_t  getline(char **, size_t *, FILE *);
  #endif /* GETDELIM */

But the configure check for getline is on the library-level only, not on the
compiler-level.

However, on AIX 7.1 these lines have changed a little:

  #ifndef _NOGETDELIM
  extern ssize_t  getdelim();
  extern ssize_t  getline();
  #endif /* _NOGETDELIM */

So actually this define is necessary for AIX 6.1 (cannot check for earlier
versions), but not for AIX 7.1.

For moving this define into some shared header: Indeed the proper place would
be "config.h" as a result of some extra configure check, but I doubt that's
really worth the effort here - unless more platforms come up with a similar
problem.
OTOH, gnulib does check for missing getdelim declaration as well:
https://www.gnu.org/software/gnulib/manual/html_node/getdelim.html

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cairographics.org/archives/cairo-bugs/attachments/20150305/3431407a/attachment.html>


More information about the cairo-bugs mailing list