Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

nubok
Copy link
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.

None yet

1 participant