Replace __MSVC__ define (which needs to be defined manually in the build) with _MSC_VER (which the compiler defines itself) throughout
This commit is contained in:
@@ -35,7 +35,7 @@
|
||||
|
||||
#include "system/sysutils.h"
|
||||
|
||||
#ifdef __MSVC__
|
||||
#ifdef _MSC_VER
|
||||
#include "getopt/getopt.h"
|
||||
#else
|
||||
#include <getopt.h>
|
||||
@@ -52,7 +52,7 @@ using namespace RubberBand;
|
||||
using RubberBand::gettimeofday;
|
||||
#endif
|
||||
|
||||
#ifdef __MSVC__
|
||||
#ifdef _MSC_VER
|
||||
using RubberBand::usleep;
|
||||
#endif
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#ifdef __MSVC__
|
||||
#ifdef _MSC_VER
|
||||
// Ugh --cc
|
||||
#define snprintf sprintf_s
|
||||
#endif
|
||||
|
||||
@@ -237,7 +237,7 @@ system_get_process_status(int pid)
|
||||
#ifdef _WIN32
|
||||
void system_memorybarrier()
|
||||
{
|
||||
#ifdef __MSVC__
|
||||
#ifdef _MSC_VER
|
||||
MemoryBarrier();
|
||||
#else /* (mingw) */
|
||||
LONG Barrier = 0;
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
#ifndef _RUBBERBAND_SYSUTILS_H_
|
||||
#define _RUBBERBAND_SYSUTILS_H_
|
||||
|
||||
#ifdef __MSVC__
|
||||
#ifdef _MSC_VER
|
||||
# if _MSC_VER < 1800
|
||||
# include "float_cast/float_cast.h"
|
||||
# endif
|
||||
@@ -43,7 +43,7 @@
|
||||
# define R__
|
||||
#endif
|
||||
|
||||
#if defined(__MSVC__)
|
||||
#if defined(_MSC_VER)
|
||||
# include <malloc.h>
|
||||
# include <process.h>
|
||||
# define alloca _alloca
|
||||
@@ -65,11 +65,11 @@
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if defined(__MSVC__) && _MSC_VER < 1700
|
||||
#if defined(_MSC_VER) && _MSC_VER < 1700
|
||||
# define uint8_t unsigned __int8
|
||||
# define uint16_t unsigned __int16
|
||||
# define uint32_t unsigned __int32
|
||||
#elif defined(__MSVC__)
|
||||
#elif defined(_MSC_VER)
|
||||
# define ssize_t long
|
||||
# include <stdint.h>
|
||||
#else
|
||||
@@ -93,9 +93,9 @@ struct timeval { long tv_sec; long tv_usec; };
|
||||
void gettimeofday(struct timeval *p, void *tz);
|
||||
#endif // _WIN32
|
||||
|
||||
#ifdef __MSVC__
|
||||
#ifdef _MSC_VER
|
||||
void usleep(unsigned long);
|
||||
#endif // __MSVC__
|
||||
#endif // _MSC_VER
|
||||
|
||||
inline double mod(double x, double y) { return x - (y * floor(x / y)); }
|
||||
inline float modf(float x, float y) { return x - (y * float(floor(x / y))); }
|
||||
|
||||
Reference in New Issue
Block a user