Yiorgos Adamopoulos <adamo@noc.ntua.gr> wrote:
> A nm /lib/libc.a | grep fileno shows (sparc-solaris2.5):
> :
> [11] | 0| 76|FUNC |GLOB |0 |2 |_fileno
> [6] | 76| 8|FUNC |GLOB |0 |2 |_fileno_unlocked
>
> So therefore, fileno is a function and not a macro for
> Solaris2.5.
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
#include <stdio.h>
fileno(stuff);
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.
-- bart
|