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

Resolve issues and add support For Visual Studio 2012, 2013 and all 2017 versions to date #374

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 37 additions & 2 deletions src/string_s.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,19 @@

const char *strerror_x(int x);

#if defined(_MSC_VER) && (_MSC_VER == 1900)
#if defined(_MSC_VER) && (_MSC_VER >= 1910) && (_MSC_VER <= 1915)
/*Visual Studio 2017 (v15.0-15.8)*/
# include <stdio.h>
# include <string.h>
# define strcasecmp _stricmp
# define memcasecmp _memicmp
# ifndef PRIu64
# define PRIu64 "llu"
# define PRId64 "lld"
# define PRIx64 "llx"
# endif

#elif defined(_MSC_VER) && (_MSC_VER == 1900)
/*Visual Studio 2015*/
# include <stdio.h>
# include <string.h>
Expand All @@ -67,6 +79,30 @@ const char *strerror_x(int x);
# define PRIx64 "llx"
# endif

#elif defined(_MSC_VER) && (_MSC_VER == 1800)
/*Visual Studio 2013*/
# include <stdio.h>
# include <string.h>
# define strcasecmp _stricmp
# define memcasecmp _memicmp
# ifndef PRIu64
# define PRIu64 "llu"
# define PRId64 "lld"
# define PRIx64 "llx"
# endif

#elif defined(_MSC_VER) && (_MSC_VER == 1700)
/*Visual Studio 2012*/
# include <stdio.h>
# include <string.h>
# define strcasecmp _stricmp
# define memcasecmp _memicmp
# ifndef PRIu64
# define PRIu64 "llu"
# define PRId64 "lld"
# define PRIx64 "llx"
# endif

#elif defined(_MSC_VER) && (_MSC_VER == 1600)
/*Visual Studio 2010*/
# include <stdio.h>
Expand All @@ -79,7 +115,6 @@ const char *strerror_x(int x);
# define PRIx64 "llx"
# endif


#elif defined(_MSC_VER) && (_MSC_VER == 1200)
/* Visual Studio 6.0 */
# define sprintf_s _snprintf
Expand Down