c4
c4 copied to clipboard
Made c4 also compile under Windows/Visual Studio.
I added two lines in c4.c surrounding the
#include <unistd.h>
with
#ifdef _WIN32
...
#endif
to make c4 compile and run under Windows/Visual Studio, since unistd.h
does not exist under Windows/Visual Studio (it is a very UNIX-specific header). Note that despite looking otherwise the macro _WIN32
is defined both when the conpilation target is 32 bit and 64 bit (cf. https://msdn.microsoft.com/en-us/library/b0084kay.aspx for reference) - thus adding this line does not add a future liability to consider when it should be planned to port c4 to 64 bit.
I also added instructions to README.md in similar spirit to the existing guidelines how to do the same "experiments" in a suitable "Command Prompt for VS 2017".