The differences between two files are very minimal and most of the code is common. Merge those two files and use #ifdef WIN32 to include the right bits on Windows.