putw return value
VLD/VMB
gwyn at BRL.ARPA
Wed Sep 24 07:10:40 AEST 1986
There have been various versions of putw() on UNIX systems.
Some returned the word written or EOF on failure, which was
ambiguous. Somebody then decided that putw() should return
0 on success, EOF on failure. However, the implementation
didn't follow the new spec. SVR3 has it that putw() should
return ferror() or EOF on failure. I think this is the
same as 0 or EOF. My feeling is that you should ignore the
return value of putw() since there's no telling what it
will be next week, and use ferror() to detect an error.
More information about the Comp.lang.c
mailing list