lewikk@grasshopper.aud.alcatel.com (Kevin K. Lewis) writes:
[...]
> fileno(fs) = fd;
> ^^^^^^^^^^^^^^^
[...]
>I put
>#undef fileno
>#define fileno(p) ((p)->_file)
[...]
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
[10] | 0| 76|FUNC |WEAK |0 |2 |fileno
[1] | 0| 0|FILE |LOCL |0 |ABS |fileno.c
:
So therefore, fileno is a function and not a macro for Solaris2.5. I
did a fs->_cnt = fd; and it works fine. After all, that's what
setfileno() wants to do.
--
Yiorgos Adamopoulos adamo@noc.ntua.gr
National Technical University of Athens, NOC
|