This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: stdio.h
Wynfield Henman wrote:
>
> I have run into problems with getline being defined in stdio.h
>
> I understand that a GNU system has it defined there but not any other system.
>
> Please look into where "getline" should be defined in stdio.h or not.
1. This issue has already been thoroughly discussed and beaten to death
in the list archives over and over again. Saying "please look into it"
sounds like you haven't actually done any of this looking yourself.
http://cygwin.com/ml/cygwin/2006-01/msg01217.html
http://cygwin.com/ml/cygwin/2006-04/msg00507.html
2. In current versions of Cygwin getline and getdelim are only defined
if the user defines _GNU_SOURCE - this is the same way it's done on
linux.
2006-02-05 Corinna Vinschen <corinna@vinschen.de>
* include/features.h: Add comment to explain what's going to
happen
here at one point.
* include/sys/stdio.h: Guard getline and getdelim prototypes
with
_GNU_SOURCE to avoid collision with old-style declarations.
3. If your code blindly uses "getline" without checking for an existing
version then it's probably broken -- as mentioned in these previous
threads, the Austin group will likely be adding the GNU version of
getline to the next revision of the POSIX standard, meaning your source
will soon be officially noncompliant.
Brian
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/