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

added support for Visual Studio 2013 #139

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

Conversation

akoluthic
Copy link

Visual Studio 2013 has C99 support which allows Craft to be built successfully using the MSVC compiler. The only requirement, besides updating the Cmake file, is that snprintf apparently exists as _snprintf in MSVC's C compiler, so you can just #define it.

@@ -1,6 +1,10 @@
#ifndef _client_h_
#define _client_h_

#ifdef _MSC_VER
#define snprintf _snprintf
#endif

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want to define this in the headers, or in the C files?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Either one. I chose the header files because it makes for fewer overall edits. auth.c, client.c, and main.c all use this function.

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.

2 participants