Skip to content

Made c4 also compile under Windows/Visual Studio.#33

Open
nubok wants to merge 1 commit into
rswier:masterfrom
nubok:master
Open

Made c4 also compile under Windows/Visual Studio.#33
nubok wants to merge 1 commit into
rswier:masterfrom
nubok:master

Conversation

@nubok
Copy link
Copy Markdown
Contributor

@nubok nubok commented Aug 22, 2017

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".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant