mirror of
https://github.com/rtlsdrblog/rtl-sdr-blog.git
synced 2025-01-30 03:44:55 +01:00
tools: allow built-in functions for newer versions of MSVC
This commit is contained in:
parent
8b4d755ba1
commit
5c376fc79c
@ -45,8 +45,10 @@
|
|||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
#define sleep Sleep
|
#define sleep Sleep
|
||||||
|
#if defined(_MSC_VER) && (_MSC_VER < 1800)
|
||||||
#define round(x) (x > 0.0 ? floor(x + 0.5): ceil(x - 0.5))
|
#define round(x) (x > 0.0 ? floor(x + 0.5): ceil(x - 0.5))
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#define ADSB_RATE 2000000
|
#define ADSB_RATE 2000000
|
||||||
#define ADSB_FREQ 1090000000
|
#define ADSB_FREQ 1090000000
|
||||||
|
@ -62,7 +62,7 @@
|
|||||||
#include <io.h>
|
#include <io.h>
|
||||||
#include "getopt/getopt.h"
|
#include "getopt/getopt.h"
|
||||||
#define usleep(x) Sleep(x/1000)
|
#define usleep(x) Sleep(x/1000)
|
||||||
#ifdef _MSC_VER
|
#if defined(_MSC_VER) && (_MSC_VER < 1800)
|
||||||
#define round(x) (x > 0.0 ? floor(x + 0.5): ceil(x - 0.5))
|
#define round(x) (x > 0.0 ? floor(x + 0.5): ceil(x - 0.5))
|
||||||
#endif
|
#endif
|
||||||
#define _USE_MATH_DEFINES
|
#define _USE_MATH_DEFINES
|
||||||
@ -271,7 +271,7 @@ int cic_9_tables[][10] = {
|
|||||||
{9, -199, -362, 5303, -25505, 77489, -25505, 5303, -362, -199},
|
{9, -199, -362, 5303, -25505, 77489, -25505, 5303, -362, -199},
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
#if defined(_MSC_VER) && (_MSC_VER < 1800)
|
||||||
double log2(double n)
|
double log2(double n)
|
||||||
{
|
{
|
||||||
return log(n) / log(2.0);
|
return log(n) / log(2.0);
|
||||||
|
@ -53,7 +53,7 @@
|
|||||||
#include <io.h>
|
#include <io.h>
|
||||||
#include "getopt/getopt.h"
|
#include "getopt/getopt.h"
|
||||||
#define usleep(x) Sleep(x/1000)
|
#define usleep(x) Sleep(x/1000)
|
||||||
#ifdef _MSC_VER
|
#if defined(_MSC_VER) && (_MSC_VER < 1800)
|
||||||
#define round(x) (x > 0.0 ? floor(x + 0.5): ceil(x - 0.5))
|
#define round(x) (x > 0.0 ? floor(x + 0.5): ceil(x - 0.5))
|
||||||
#endif
|
#endif
|
||||||
#define _USE_MATH_DEFINES
|
#define _USE_MATH_DEFINES
|
||||||
@ -220,7 +220,7 @@ int cic_9_tables[][10] = {
|
|||||||
{9, -199, -362, 5303, -25505, 77489, -25505, 5303, -362, -199},
|
{9, -199, -362, 5303, -25505, 77489, -25505, 5303, -362, -199},
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
#if defined(_MSC_VER) && (_MSC_VER < 1800)
|
||||||
double log2(double n)
|
double log2(double n)
|
||||||
{
|
{
|
||||||
return log(n) / log(2.0);
|
return log(n) / log(2.0);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user