<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Thu, Apr 24, 2014 at 2:05 AM, Mojca Miklavec <span dir="ltr"><<a href="mailto:mojca.miklavec.lists@gmail.com" target="_blank">mojca.miklavec.lists@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div class=""> </div>
The getline function is not portable.  It is GNU/Linux specific.  It<br>
is documented as such on the manpage and in the libc </blockquote><div><br></div><div>That is incorrect. From the Linux man page:</div><div><div><br></div><div>"CONFORMING TO</div><div>       Both getline() and getdelim() were  originally  GNU  extensions.   They</div>
<div>       were standardized in POSIX.1-2008."</div></div><div><br></div><div>It is now 2014: only very old (and neglected) platforms should be affected.</div><div>May I suggest that one either upgrade such systems or simply ignore them.</div>
<div><br></div><div>You may need to define some macro to enable _POSIX_C_SOURCE</div><div>(for details, check the stdio.h header).</div><div>Let me know what is needed for Solaris 11 and I will add it to interact.cc.</div>
<div><br></div><div><div>For example, getline was added to FreeBSD libc with FreeBSD 8.0.</div><div>Therefore, on __FreeBSD_version >= 800067 I understand that the</div><div>following works:</div><div><br></div><div>#define _WITH_GETLINE</div>
<div>#include <stdio.h></div></div><div><br></div><div> -- John</div><div><br></div><div>P.S. As a very last resort, the attached reversion provides an inelegant patch.</div><div>But please first check your headers to see how to make your system POSIX 2008 compliant</div>
<div>(and complain to your vendor; as this really shouldn't be necessary).</div><div><br></div><div><br></div><div><br></div><div><br></div></div></div></div>