Seeing a wiki tutorial page for doing this, I had a go at compiling OpenTTD for my Windows 8.1 64bit OS yesterday but I couldn't because MinGW's implementation of the POSIX header file "unistd.h" does not implement: fdatasync(int) which is called by "ini.cpp" at line 84.
To makesure there wasn't something I was doing wrong I sent an email to the MinGW users mailing list and Gisle replied:
So I think the Wiki page for the MinGW tutorial should be disabled until MinGW can compile OpenTTD.fsync() nor fdatasync() isn't part of MingW, but can easily
be replaced by:
#include <io.h>
extern __inline__ int fdatasync (int fd)
{
return _commit(fd);
}
(or a macro).
The POSIX distinction between fsync() and fdatasync() is probably
not important for OpenTTD. Looking at:
http://git.openttd.org/?p=trunk.git;a=b ... da;hb=HEAD
the code around 'WITH_FDATASYNC' looks fishy.
Ref:
https://msdn.microsoft.com/en-us/librar ... 2147217396