Alternative for getline() function in AIX 5.3

Alternative for getline() function in AIX 5.3

Oleg Goldshmidt pub at goldshmidt.org
Tue Jul 27 21:53:38 IDT 2010


Omer Zak <w1 at zak.co.il> writes:

> #ifdef __GNUC__
>   // use getline()
> #else /* __GNUC__ */
>   // use gets() or fgets()
> #endif /* __GNUC__ */

I am not sure what you meant here, Omer, but IIRC __GNUC__ means
gcc-specific code, and the OP does not have gcc on AIX. I am probably
missing something... Nor does AIX have _GNU_SOURCE, I believe.

I'd say if you wrote your code with fgets() forget about getline(). 

-- 
Oleg Goldshmidt | pub at goldshmidt.org



More information about the Linux-il mailing list