This is the mail archive of the mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: undefined reference to `_getline'

> >   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
> <> 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:

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:
> <>

Yes - I found this almost immediately.  My concern is
that it *looks* like getline() is available, but it


Unsubscribe info:
Problem reports:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]