* No getline() in stdio.h?
@ 2005-07-07 8:12 George Morgan
2005-07-07 8:39 ` Corinna Vinschen
2005-07-07 12:00 ` Eric Blake
0 siblings, 2 replies; 10+ messages in thread
From: George Morgan @ 2005-07-07 8:12 UTC (permalink / raw)
To: cygwin
Ok, I was reading about the virtues of using getline and then looked in cygwin's
stdio.h and it is not there! Did it get removed? Yeah, I found the __getline
but when I changed my C code to use that the linker does not find it. This is
with cygwin DLL version 1.5.18 and gcc 3.4.4. Maybe I need to use an older
compiler?
George Morgan
--
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/
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: No getline() in stdio.h?
2005-07-07 8:12 No getline() in stdio.h? George Morgan
@ 2005-07-07 8:39 ` Corinna Vinschen
2005-07-07 12:00 ` Eric Blake
1 sibling, 0 replies; 10+ messages in thread
From: Corinna Vinschen @ 2005-07-07 8:39 UTC (permalink / raw)
To: cygwin
On Jul 7 04:12, George Morgan wrote:
> Ok, I was reading about the virtues of using getline and then looked in cygwin's
> stdio.h and it is not there! Did it get removed? Yeah, I found the __getline
> but when I changed my C code to use that the linker does not find it. This is
> with cygwin DLL version 1.5.18 and gcc 3.4.4. Maybe I need to use an older
> compiler?
No chance for now. __getline and __getdelim are newlib symbols
which aren't exported by Cygwin so far. I can add them to the exported
symbols for the next Cygwin release, but please note that these
functions are GNU extensions which are not covered by a standard.
You're going to write non-portable programs by using it.
Corinna
--
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Project Co-Leader mailto:cygwin@cygwin.com
Red Hat, Inc.
--
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/
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: No getline() in stdio.h?
2005-07-07 8:12 No getline() in stdio.h? George Morgan
2005-07-07 8:39 ` Corinna Vinschen
@ 2005-07-07 12:00 ` Eric Blake
2005-07-07 12:28 ` Gerrit P. Haase
1 sibling, 1 reply; 10+ messages in thread
From: Eric Blake @ 2005-07-07 12:00 UTC (permalink / raw)
To: George Morgan; +Cc: cygwin
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
According to George Morgan on 7/7/2005 2:12 AM:
> Ok, I was reading about the virtues of using getline and then looked in cygwin's
> stdio.h and it is not there! Did it get removed? Yeah, I found the __getline
> but when I changed my C code to use that the linker does not find it. This is
> with cygwin DLL version 1.5.18 and gcc 3.4.4. Maybe I need to use an older
> compiler?
An alternative is to investigate using the gnulib module in your code.
gnulib is currently designed for CVS use only (so there is no cygwin
distribution), but projects like coreutils use gnulib getline() and other
modules to make up for non-standard functions that are missing in various
platform libraries. http://www.gnu.org/software/gnulib/
- --
Life is short - so eat dessert first!
Eric Blake ebb9@byu.net
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFCzRlQ84KuGfSFAYARAk5bAKCaN1Goo+luR4zh9ejKTHtruv4S+wCgtaDz
WUsIG1mCDoFMMlbU31cDpnc=
=etoO
-----END PGP SIGNATURE-----
--
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/
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: No getline() in stdio.h?
2005-07-07 12:00 ` Eric Blake
@ 2005-07-07 12:28 ` Gerrit P. Haase
2005-07-07 12:35 ` Corinna Vinschen
` (2 more replies)
0 siblings, 3 replies; 10+ messages in thread
From: Gerrit P. Haase @ 2005-07-07 12:28 UTC (permalink / raw)
To: Eric Blake; +Cc: George Morgan, cygwin
Eric Blake wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> According to George Morgan on 7/7/2005 2:12 AM:
>
>>Ok, I was reading about the virtues of using getline and then looked in cygwin's
>>stdio.h and it is not there! Did it get removed? Yeah, I found the __getline
>>but when I changed my C code to use that the linker does not find it. This is
>>with cygwin DLL version 1.5.18 and gcc 3.4.4. Maybe I need to use an older
>>compiler?
>
>
> An alternative is to investigate using the gnulib module in your code.
> gnulib is currently designed for CVS use only (so there is no cygwin
> distribution), but projects like coreutils use gnulib getline() and other
> modules to make up for non-standard functions that are missing in various
> platform libraries. http://www.gnu.org/software/gnulib/
Same approach as libgen? Are dirname() and basename() included?
I would appreciate if at least the included functions could be listed in
the manual. However, it isn't. Do you have the archive handy and if
so, would you please dump a list of included symbols
(nm libgnulib.a | grep ' T ')?
Gerrit
--
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/
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: No getline() in stdio.h?
2005-07-07 12:28 ` Gerrit P. Haase
@ 2005-07-07 12:35 ` Corinna Vinschen
2005-07-07 16:40 ` Gerrit P. Haase
2005-07-07 12:36 ` Gerrit P. Haase
2005-07-07 13:01 ` Eric Blake
2 siblings, 1 reply; 10+ messages in thread
From: Corinna Vinschen @ 2005-07-07 12:35 UTC (permalink / raw)
To: cygwin
On Jul 7 14:26, Gerrit P. Haase wrote:
> Eric Blake wrote:
> >An alternative is to investigate using the gnulib module in your code.
> >gnulib is currently designed for CVS use only (so there is no cygwin
> >distribution), but projects like coreutils use gnulib getline() and other
> >modules to make up for non-standard functions that are missing in various
> >platform libraries. http://www.gnu.org/software/gnulib/
>
> Same approach as libgen? Are dirname() and basename() included?
Er... dirname and basename are provided by Cygwin.
Corinna
--
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Project Co-Leader mailto:cygwin@cygwin.com
Red Hat, Inc.
--
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/
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: No getline() in stdio.h?
2005-07-07 12:28 ` Gerrit P. Haase
2005-07-07 12:35 ` Corinna Vinschen
@ 2005-07-07 12:36 ` Gerrit P. Haase
2005-07-07 13:12 ` Eric Blake
2005-07-07 13:01 ` Eric Blake
2 siblings, 1 reply; 10+ messages in thread
From: Gerrit P. Haase @ 2005-07-07 12:36 UTC (permalink / raw)
To: cygwin; +Cc: Eric Blake, George Morgan
Gerrit P. Haase wrote:
> Eric Blake wrote:
>
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>
>> According to George Morgan on 7/7/2005 2:12 AM:
>>
>>> Ok, I was reading about the virtues of using getline and then looked
>>> in cygwin's
>>> stdio.h and it is not there! Did it get removed? Yeah, I found the
>>> __getline
>>> but when I changed my C code to use that the linker does not find
>>> it. This is
>>> with cygwin DLL version 1.5.18 and gcc 3.4.4. Maybe I need to use an
>>> older
>>> compiler?
>>
>>
>>
>> An alternative is to investigate using the gnulib module in your code.
>> gnulib is currently designed for CVS use only (so there is no cygwin
>> distribution), but projects like coreutils use gnulib getline() and other
>> modules to make up for non-standard functions that are missing in various
>> platform libraries. http://www.gnu.org/software/gnulib/
>
>
>
> Same approach as libgen? Are dirname() and basename() included?
>
> I would appreciate if at least the included functions could be listed in
> the manual. However, it isn't. Do you have the archive handy and if
> so, would you please dump a list of included symbols
> (nm libgnulib.a | grep ' T ')?
Nevermind, I found it. It seems dirname() and basename() are there too:
http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/gnulib/gnulib/MODULES.html?rev=HEAD&content-type=text/html
Wouldn't it be nice to have it as a Cygwin package?
Gerrit
--
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/
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: No getline() in stdio.h?
2005-07-07 12:36 ` Gerrit P. Haase
@ 2005-07-07 13:12 ` Eric Blake
0 siblings, 0 replies; 10+ messages in thread
From: Eric Blake @ 2005-07-07 13:12 UTC (permalink / raw)
To: Gerrit P. Haase; +Cc: cygwin, George Morgan
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
According to Gerrit P. Haase on 7/7/2005 6:35 AM:
>>> An alternative is to investigate using the gnulib module in your code.
>
> Wouldn't it be nice to have it as a Cygwin package?
Unfortunately, the gnulib maintainers aren't ready for it to be a package
at the moment; follow this thread:
http://lists.gnu.org/archive/html/bug-gnulib/2005-07/msg00007.html
The problem is that no-one has prepared a ./configure script, there is no
Makefile, and the only thing useful if it were packaged would be a
beefed-up gnulib-tool that does a fresh CVS checkout as needed (since
gnulib uses source-level sharing of source that is constantly being
improved in CVS). But patches are certainly welcome, if someone wants to
pursue the course (and yes, I agree that it might make a cool cygwin
package if gnulib-tool could be installed with the ability to refresh
modules from CVS).
- --
Life is short - so eat dessert first!
Eric Blake ebb9@byu.net
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFCzSot84KuGfSFAYARAi+9AJ0aIQTd9xY5/b0ZCkJGf0slokEfwwCfZdRS
DQcwgiHc0g3K4dxV3VFijJU=
=CBLp
-----END PGP SIGNATURE-----
--
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/
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: No getline() in stdio.h?
2005-07-07 12:28 ` Gerrit P. Haase
2005-07-07 12:35 ` Corinna Vinschen
2005-07-07 12:36 ` Gerrit P. Haase
@ 2005-07-07 13:01 ` Eric Blake
2 siblings, 0 replies; 10+ messages in thread
From: Eric Blake @ 2005-07-07 13:01 UTC (permalink / raw)
To: Gerrit P. Haase; +Cc: George Morgan, cygwin
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
According to Gerrit P. Haase on 7/7/2005 6:26 AM:
>>http://www.gnu.org/software/gnulib/
>
> Same approach as libgen? Are dirname() and basename() included?
Gnulib uses source code sharing. There is no libgnulib.a, just a lot of
small modules that can be individually selected using `gnulib-tool
- --import', using a line in configure.ac `gl_MODULES(<modulename>...)'.
>
> I would appreciate if at least the included functions could be listed in
> the manual. However, it isn't. Do you have the archive handy and if
> so, would you please dump a list of included symbols
> (nm libgnulib.a | grep ' T ')?
The list of modules is constantly being updated, the best bet is to check
this link from the gnulib homepage:
http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/gnulib/gnulib/MODULES.html?rev=HEAD&content-type=text/html
As an example, CVS head of m4 uses gl_MODULES(assert error exit free
gettext mkstemp obstack progname regex stdbool strtol xalloc xalloc-die
xstrndup). Coreutils uses a bigger subset of available modules (and to
keep this thread cygwin-related, I will note that some of my patches to
upstream coreutils have made their way into gnulib, so that other programs
also have the same cygwin porting issues fixed simply by using gnulib).
Other gnulib-using projects include findutils and GNU tar.
- --
Life is short - so eat dessert first!
Eric Blake ebb9@byu.net
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFCzSec84KuGfSFAYARAvMTAJ4/O6lNEDNgtsK0c3By+Vft15XD3wCfb3uZ
d+7zHx1KnX1G/mPWOFB6suY=
=X7Kg
-----END PGP SIGNATURE-----
--
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/
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2005-07-07 16:57 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-07-07 8:12 No getline() in stdio.h? George Morgan
2005-07-07 8:39 ` Corinna Vinschen
2005-07-07 12:00 ` Eric Blake
2005-07-07 12:28 ` Gerrit P. Haase
2005-07-07 12:35 ` Corinna Vinschen
2005-07-07 16:40 ` Gerrit P. Haase
2005-07-07 16:57 ` Christopher Faylor
2005-07-07 12:36 ` Gerrit P. Haase
2005-07-07 13:12 ` Eric Blake
2005-07-07 13:01 ` Eric Blake
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).