Alternative for getline() function in AIX 5.3
Omer Zak
w1 at zak.co.il
Tue Jul 27 22:14:35 IDT 2010
What I mean is to use whatever preprocessor symbol that is defined when
building using gcc, but undefined on AIX; or vice versa.
On Tue, 2010-07-27 at 21:53 +0300, Oleg Goldshmidt wrote:
> 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().
--
Bottom posters are filthy heretics and infidels and ought to be burned
on the stake after having been tarred, feathered and having rotten eggs
thrown at their faces!
My own blog is at http://www.zak.co.il/tddpirate/
My opinions, as expressed in this E-mail message, are mine alone.
They do not represent the official policy of any organization with which
I may be affiliated in any way.
WARNING TO SPAMMERS: at http://www.zak.co.il/spamwarning.html
More information about the Linux-il
mailing list