X-Spam-Check-By: sourceware.org Message-ID: <4476DBFC.EB5AA4E@dessent.net> Date: Fri, 26 May 2006 03:44:12 -0700 From: Brian Dessent 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> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Reply-To: cygwin AT cygwin DOT com Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , 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 * 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/