> #ifndef O_BINARY > # define O_BINARY 0 > #endif > > somewhere convenient and just add O_BINARY to that call > and whereever else it's necessary. This also makes it work on DJGPP, which has binary but doesn't define _WIN32.