Fixes: Fixed Visual Studio warnings during compilation.
Changes to properly detect proper Visual Studio and fix build warnings.
This commit is contained in:
parent
14db1e07a0
commit
7b701c3fef
@ -35,12 +35,16 @@
|
|||||||
# define inline __inline
|
# define inline __inline
|
||||||
# endif // __cplusplus
|
# endif // __cplusplus
|
||||||
|
|
||||||
|
#if (defined(_MSC_VER) && _MSC_VER < 1900 /*vs2015*/)
|
||||||
// C99:
|
// C99:
|
||||||
// Microsoft didn't implement C99 in Visual Studio; but started adding it with
|
// Microsoft didn't implement C99 in Visual Studio; but started adding it with
|
||||||
// VS2013. However, VS2013 still didn't have snprintf(). The following is a
|
// VS2013. However, VS2013 still didn't have snprintf(). The following is a
|
||||||
// work-around (Note: The _CRT_SECURE_NO_WARNINGS macro must be set in the
|
// work-around (Note: The _CRT_SECURE_NO_WARNINGS macro must be set in the
|
||||||
// "CMakeLists.txt" file).
|
// "CMakeLists.txt" file).
|
||||||
|
// NOTE: This is fixed in Visual Studio 2015.
|
||||||
#define snprintf _snprintf
|
#define snprintf _snprintf
|
||||||
|
#endif
|
||||||
|
|
||||||
#define strdup _strdup
|
#define strdup _strdup
|
||||||
|
|
||||||
#endif // _WIN32
|
#endif // _WIN32
|
||||||
|
Loading…
x
Reference in New Issue
Block a user