delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2006/05/26/06:44:32

X-Spam-Check-By: sourceware.org
Message-ID: <4476DBFC.EB5AA4E@dessent.net>
Date: Fri, 26 May 2006 03:44:12 -0700
From: Brian Dessent <brian AT dessent DOT net>
X-Mailer: Mozilla 4.79 [en] (Windows NT 5.0; U)
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: stdio.h
References: <195b3f1f0605252214g14e70df1v9a40c38fd7e74b1f AT mail DOT gmail DOT com>
X-IsSubscribed: yes
Reply-To: cygwin AT cygwin DOT com
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

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 AT vinschen DOT 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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019