<html>
<head>
<base href="https://bugs.freedesktop.org/" />
</head>
<body><span class="vcard"><a class="email" href="mailto:michael.haubenwallner@ssi-schaefer.com" title="Michael Haubenwallner <michael.haubenwallner@ssi-schaefer.com>"> <span class="fn">Michael Haubenwallner</span></a>
</span> changed
<a class="bz_bug_link
bz_status_NEW "
title="NEW - compilation error on AIX 6.1 (implicit declaration of function 'getline')"
href="https://bugs.freedesktop.org/show_bug.cgi?id=89356">bug 89356</a>
<br>
<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>What</th>
<th>Removed</th>
<th>Added</th>
</tr>
<tr>
<td style="text-align:right;">Status</td>
<td>NEEDINFO
</td>
<td>NEW
</td>
</tr>
<tr>
<td style="text-align:right;">Summary</td>
<td>compilation error on AIX (implicit declaration of function 'getline')
</td>
<td>compilation error on AIX 6.1 (implicit declaration of function 'getline')
</td>
</tr></table>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - compilation error on AIX 6.1 (implicit declaration of function 'getline')"
href="https://bugs.freedesktop.org/show_bug.cgi?id=89356#c3">Comment # 3</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - compilation error on AIX 6.1 (implicit declaration of function 'getline')"
href="https://bugs.freedesktop.org/show_bug.cgi?id=89356">bug 89356</a>
from <span class="vcard"><a class="email" href="mailto:michael.haubenwallner@ssi-schaefer.com" title="Michael Haubenwallner <michael.haubenwallner@ssi-schaefer.com>"> <span class="fn">Michael Haubenwallner</span></a>
</span></b>
<pre>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:
<a href="https://www.gnu.org/software/gnulib/manual/html_node/getdelim.html">https://www.gnu.org/software/gnulib/manual/html_node/getdelim.html</a></pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the QA Contact for the bug.</li>
</ul>
</body>
</html>