Yiorgos Adamopoulos <firstname.lastname@example.org> wrote:
> A nm /lib/libc.a | grep fileno shows (sparc-solaris2.5):
>  | 0| 76|FUNC |GLOB |0 |2 |_fileno
>  | 76| 8|FUNC |GLOB |0 |2 |_fileno_unlocked
> So therefore, fileno is a function and not a macro for
No, it is a macro unless one defines some weird cpp symbols like
__EXTENSIONS__ or _POSIX_C_SOURCE, in which case the function is
used. Try cc -E on
You can pass -v (or maybe -#) to cc to see if anything strange
is being given to cpp.
> I did a fs->_cnt = fd; and it works fine. After all, that's
> what setfileno() wants to do.
Surely you must mean fs->_file.