porting software using glibc's getline()

Dmitry Marakasov amdmi3 at amdmi3.ru
Tue Sep 25 10:32:45 PDT 2007


* Markus Hitter (mah at jump-ing.de) wrote:

>> 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:
I've found implementation of getline function in tar sources that come
with FreeBSD. I guess the best thing would be to make simple port out of
it, with single .h file with static functions, which can be included in
any place where it is needed. Is it OK to place GPL sources into the
ports tree? (it would be silly to make distfile for single 3kb .h file)

-- 
Best regards,
  Dmitry Marakasov               mailto:amdmi3 at amdmi3.ru


More information about the freebsd-ports mailing list