Hi,
 
I have a C program that reads one line of text from the keyboard.
 
The original program was written 10 years ago and was compiled with cc on
AIX 4.x. 
I used the gets() function which was the only option available at the time.
 
Recently, I had to port the program to gcc on Linux, but I was confronted
with lots of segfaults.
So, I had to change the function to getline() which is much more stable and
secure.
 
However, I was asked to maintain the new version on AIX 5.3 as well. 
 
When recompiling the program on the AIX machine I was confronted with the
lack of getline() in AIX implementation of cc.
I do not have gcc on that machine, and installing it would be an option of
last resort .
 
I am looking for an alternative to getline(), that would be portable to both
Linux and AIX.
 
Please advise.
 
Thanks.
 

  Israel Shikler

  

 
_______________________________________________
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il

Reply via email to