set errno when fileno is called on a FILE with no underlying fd
this is a POSIX requirement. also remove the gratuitous locking shenanigans and simply access f->fd under control of the lock. there is no advantage to not doing so, and it made the correctness non-obvious at best.
Showing
想要评论请 注册 或 登录