delorie.com/archives/browse.cgi | search |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sources.redhat.com/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/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 |
X-MimeOLE: | Produced By Microsoft Exchange V6.0.6375.0 |
content-class: | urn:content-classes:message |
MIME-Version: | 1.0 |
Subject: | RE: undefined reference to `_getline' |
Date: | Fri, 24 Oct 2003 00:14:57 -0400 |
Message-ID: | <3D848382FB72E249812901444C6BDB1DE4DF10@exchange.timesys.com> |
X-MS-Has-Attach: | |
X-MS-TNEF-Correlator: | |
From: | "Robb, Sam" <sam DOT robb AT timesys DOT com> |
To: | <cygwin AT cygwin DOT com> |
X-MIME-Autoconverted: | from quoted-printable to 8bit by delorie.com id h9O4Gbp6028623 |
> > In porting soem code to run under Cygwin, I ran > > into a problem finding getline(). The following > > code snippet demonstrates the problem: > > getline() is a glibc-ism, a nonstandard GNU extension. It's > not listed anywhere that I can see at > <http://cygwin.com/cygwin-api/cygwin-api.html> so I'd say it's safe to > assume that it's not supported by Cygwin. It's declared in /usr/include/stdio.h, and it doesn't look like it's guarded by any relevant #define: $ gcc -E /usr/include/stdio.h | grep getline ssize_t __attribute__((__cdecl__)) __getline (char **, size_t *, FILE *); Grumble. Looking through the archives shows that getline() isn't exported: http://www.cygwin.com/ml/cygwin/2003-06/msg01328.html Can't understand how I missed this on my first search. cgf, et al - is there a reason why getline and getdelim aren't exported, or is this just another example of good ol' fashion Cygwin meanness? > I'm pretty sure you could > work around this by rolling your own. In fact, a little googling > returned the following: > <http://www.klid.dk/pub/gnu/gnu-utils/gnu/txtutil1.22/lib/getline.c> Yes - I found this almost immediately. My concern is that it *looks* like getline() is available, but it isn't. -Samrobb -- 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/
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |