The open() system call directly returns a fdes, whereas it's more portable 'ANSI C' counterpart fopen() returns a pointer the the FILE struct.
I have seen implementation of stdio.h on HP-UX, BSD and a few more, the typedef'd struct FILE stores the value of file descriptor in differenrt ways with diff attribute names.
In such a case how do i portably extract the file descriptor from a pointer to the FILE struct as returned by fopen?
Is there any such macro in C?
Even as i am concerned about portability I also need to excercise the power and granularity provided by system calls
F1, F1, F1 ......
Thanks in Advance,
Sumanth