Changed some MSVC compatibility defines based on MSVC version. (#724)
This commit is contained in:
parent
17f01469ad
commit
9fac29d154
@ -199,8 +199,10 @@ static void usleep(const int64_t &t)
|
|||||||
// misc support
|
// misc support
|
||||||
#if defined(_MSC_VER)
|
#if defined(_MSC_VER)
|
||||||
#define va_copy(d,s) ((d) = (s))
|
#define va_copy(d,s) ((d) = (s))
|
||||||
#define snprintf _snprintf
|
|
||||||
#define strcasecmp _stricmp
|
#define strcasecmp _stricmp
|
||||||
|
#if (_MSC_VER < MSC_VER_VS2015)
|
||||||
|
#define snprintf _snprintf
|
||||||
|
#endif
|
||||||
#if (_MSC_VER <= MSC_VER_VS2013)
|
#if (_MSC_VER <= MSC_VER_VS2013)
|
||||||
#define strtoll _strtoi64
|
#define strtoll _strtoi64
|
||||||
#endif
|
#endif
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
#define COMPILER_H
|
#define COMPILER_H
|
||||||
|
|
||||||
#include "config-host.h"
|
#include "config-host.h"
|
||||||
|
#include "unicorn/platform.h"
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
// MSVC support
|
// MSVC support
|
||||||
@ -13,7 +14,10 @@
|
|||||||
|
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include <float.h>
|
#include <float.h>
|
||||||
|
|
||||||
|
#if _MSC_VER < MSC_VER_VS2013
|
||||||
#define isinf(x) (!_finite(x))
|
#define isinf(x) (!_finite(x))
|
||||||
|
#endif
|
||||||
|
|
||||||
static double rint( double x )
|
static double rint( double x )
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user