Alternative for getline() function in AIX 5.3

2010-07-27 Thread Israel Shikler
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

Re: Alternative for getline() function in AIX 5.3

2010-07-27 Thread Nadav Har'El
On Tue, Jul 27, 2010, Israel Shikler wrote about Alternative for getline() function in AIX 5.3: I am looking for an alternative to getline(), that would be portable to both Linux and AIX. The first obvious alternative is to use fgets(). fgets(), unlike gets(), is secure because you give it the

Re: Alternative for getline() function in AIX 5.3

2010-07-27 Thread Shlomi Fish
On Tuesday 27 Jul 2010 13:15:13 Israel Shikler wrote: 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.

Re: Alternative for getline() function in AIX 5.3

2010-07-27 Thread Omer Zak
On Tue, 2010-07-27 at 14:02 +0300, Nadav Har'El wrote: On Tue, Jul 27, 2010, Israel Shikler wrote about Alternative for getline() function in AIX 5.3: I am looking for an alternative to getline(), that would be portable to both Linux and AIX. [... snipped ...] The second alternative is to

Re: Alternative for getline() function in AIX 5.3

2010-07-27 Thread Oleg Goldshmidt
Nadav Har'El n...@math.technion.ac.il writes: The second alternative is to make use of the wonderful fact that Linux is free software, and just take the source code of getline() and incorporate it in your program! I can't imagine that getline() is more than a couple of dozen lines - it's not

Re: Alternative for getline() function in AIX 5.3

2010-07-27 Thread Oleg Goldshmidt
Omer Zak w...@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

Re: Alternative for getline() function in AIX 5.3

2010-07-27 Thread Omer Zak
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 w...@zak.co.il writes: #ifdef __GNUC__ // use getline() #else /* __GNUC__ */ // use

Re: Alternative for getline() function in AIX 5.3

2010-07-27 Thread Oleg Goldshmidt
Omer Zak w...@zak.co.il writes: What I mean is to use whatever preprocessor symbol that is defined when building using gcc, but undefined on AIX; or vice versa. I see. I suspect you may need both __GNUC__ and _GNU_SOURCE to be defined for getline() to work in the context though: the first will

Re: Server Disk Problem

2010-07-27 Thread Etzion Bar-Noy
As I have said - if he could mount it, he can read the superblock. Ez On Tue, Jul 27, 2010 at 3:50 AM, Amos Shapira amos.shap...@gmail.comwrote: 2010/7/27 Etzion Bar-Noy eza...@tournament.org.il Are you checking the correct device? If fsck.ext3 can't find superblock, the system could not

Re: Alternative for getline() function in AIX 5.3

2010-07-27 Thread Etzion Bar-Noy
IBM supply a set of GNU utilities, including GCC-related software (and GCC, as well, if I recall correctly, but an old one) in an additional CD supplied with AIX. This is called something around Utilities for Linux or some other lie. So you do not need to force gcc to compile under AIX, but only

Re: Server Disk Problem

2010-07-27 Thread Amos Shapira
On 28 July 2010 06:37, Etzion Bar-Noy eza...@tournament.org.il wrote: As I have said - if he could mount it, he can read the superblock. I missed the mounted part, only that he is looking for a secondary superblock. Still: 1. If he's still looking for a secondary superblock (as fsck recommend)

Re: Playing TAU lectures from videos.tau.ac.il

2010-07-27 Thread Ariel Biener
First and foremost I think that you don't understand my question. I'll emphasize it again. I'm NOT interested in a way to access the TAU videos without username and password. I AM interested in a way to access the TAU videos WITH my [1] legitimate username and password, from a Linux system.

Re: Playing TAU lectures from videos.tau.ac.il

2010-07-27 Thread Ariel Biener
I'll bite. What this thread asks is not how to redistribute these films for free or for pay [FreeDist], but rather how to legitimately view them on Linux while fully respecting the copyrights. Apparently, the TAU workers did not do enough work to ensure portability and interoperability for

Re: TAU lectures, BG Airport departures/arrivals, Kupat Holim lab results -- Linux

2010-07-27 Thread Ariel Biener
Going to the state comptroller is a avenue to be used after you have exhausted other possible options. I have no idea about other sites, but if you do have a problem with TAU websites or browser compatibility, the least would be to open a ticket with TAU helpdesk, and let TAU fix the problem