porting software using glibc's getline()

Markus Hitter mah at jump-ing.de
Mon Sep 24 14:26:05 PDT 2007


Am 21.09.2007 um 18:22 schrieb Dmitry Marakasov:

> I have a problem porting a piece of software that use
> getline(char**, int*, FILE*). This function is only present in
> glibc so I wonder what do I do in this case?

Ideally, you'd replace getline()'s usage with something similar, like  
fgets(3).


If this isn't reasonable, get inspired by glibc's sources and write  
your own. Another inspiration might come from here:

<http://www.lst.inf.ethz.ch/teaching/lectures/ss07/2100/ 
filesystem_lab/html/getline_8h-source.html>


HTH,
Markus

- - - - - - - - - - - - - - - - - - -
Dipl. Ing. Markus Hitter
http://www.jump-ing.de/






More information about the freebsd-ports mailing list