Hans Leidekker hans@it.vu.nl writes:
Anything wrong with this one?
This should fix apps built with MinGW (bug report 2826).
You should at least restore the file position before returning, though it would probably be better to not change the file position at all, this is not thread safe.