MinGW seems to define _POSIX_THREAD_SAFE_FUNCTIONS without defining flockfile() and funlockfile(). (dm)