"Dimitrie O. Paun" dpaun@rogers.com writes:
So, let's say I do: #ifndef __UNIX__ #include <io.h> #endif
Well, this will not work if I want to compile with msvcrt, because __UNIX__ will be defined anyway. So what do I have to test for?
I think it would work. What you have to do is something like:
#ifndef __UNIX__ #include <io.h> #else #include <unistd.h> #endif
(you could also use #ifdef _MSC_VER instead, since unistd.h should work everywhere except on MSVC)
This would require us to add a unistd.h to our msvcrt headers, but that's much less problematic than having two versions of io.h.