From a65cfd2affcfd35c65168edaa606ae96bcddf533 Mon Sep 17 00:00:00 2001 From: John Emmas Date: Thu, 25 Jul 2013 08:53:05 +0100 Subject: [PATCH] 'libs/rubberband' - Compiler specific includes --- libs/rubberband/src/StretchCalculator.cpp | 3 +++ libs/rubberband/src/StretcherImpl.cpp | 3 +++ libs/rubberband/src/Thread.cpp | 4 ++-- libs/rubberband/src/bsd-3rdparty/float_cast/float_cast.h | 5 ++++- libs/rubberband/src/main.cpp | 2 +- libs/rubberband/src/sysutils.h | 6 +++--- 6 files changed, 16 insertions(+), 7 deletions(-) diff --git a/libs/rubberband/src/StretchCalculator.cpp b/libs/rubberband/src/StretchCalculator.cpp index 1541759762..18ee9cc9c3 100644 --- a/libs/rubberband/src/StretchCalculator.cpp +++ b/libs/rubberband/src/StretchCalculator.cpp @@ -12,6 +12,9 @@ COPYING included with this distribution for more information. */ +#ifdef COMPILER_MSVC +#include "bsd-3rdparty/float_cast/float_cast.h" +#endif #include "StretchCalculator.h" #include diff --git a/libs/rubberband/src/StretcherImpl.cpp b/libs/rubberband/src/StretcherImpl.cpp index 200c8771a8..d15a71d68e 100644 --- a/libs/rubberband/src/StretcherImpl.cpp +++ b/libs/rubberband/src/StretcherImpl.cpp @@ -12,6 +12,9 @@ COPYING included with this distribution for more information. */ +#ifdef COMPILER_MSVC +#include "bsd-3rdparty/float_cast/float_cast.h" +#endif #include "StretcherImpl.h" #include "PercussiveAudioCurve.h" #include "HighFrequencyAudioCurve.h" diff --git a/libs/rubberband/src/Thread.cpp b/libs/rubberband/src/Thread.cpp index 49f75b5b65..959515afc7 100644 --- a/libs/rubberband/src/Thread.cpp +++ b/libs/rubberband/src/Thread.cpp @@ -16,11 +16,11 @@ #include #include -#include -#include +#ifndef COMPILER_MSVC #include #include +#endif using std::cerr; using std::endl; diff --git a/libs/rubberband/src/bsd-3rdparty/float_cast/float_cast.h b/libs/rubberband/src/bsd-3rdparty/float_cast/float_cast.h index 1ba0e03bdc..0e3d8a4040 100644 --- a/libs/rubberband/src/bsd-3rdparty/float_cast/float_cast.h +++ b/libs/rubberband/src/bsd-3rdparty/float_cast/float_cast.h @@ -35,6 +35,9 @@ ** long int lrint (double x) ; */ +#ifndef __FLOAT_CAST_H__ // Added by JE - 30-11-2009 +#define __FLOAT_CAST_H__ + #if (defined (WIN32) || defined (_WIN32)) #include @@ -69,5 +72,5 @@ #endif - +#endif // __FLOAT_CAST_H__ diff --git a/libs/rubberband/src/main.cpp b/libs/rubberband/src/main.cpp index 178685300b..5f1d2ba9c3 100644 --- a/libs/rubberband/src/main.cpp +++ b/libs/rubberband/src/main.cpp @@ -23,7 +23,7 @@ #include #include "sysutils.h" -#ifdef __MSVC__ +#ifdef COMPILER_MSVC #include "bsd-3rdparty/getopt/getopt.h" #else #include diff --git a/libs/rubberband/src/sysutils.h b/libs/rubberband/src/sysutils.h index a529afde0d..3883c59ff5 100644 --- a/libs/rubberband/src/sysutils.h +++ b/libs/rubberband/src/sysutils.h @@ -15,7 +15,7 @@ #ifndef _RUBBERBAND_SYSINFO_H_ #define _RUBBERBAND_SYSINFO_H_ -#ifdef __MSVC__ +#ifdef COMPILER_MSVC #include "bsd-3rdparty/float_cast/float_cast.h" #define R__ __restrict #endif @@ -28,11 +28,11 @@ #define R__ #endif -#ifdef __MINGW32__ +#ifdef COMPILER_MINGW #include #endif -#ifdef __MSVC__ +#ifdef COMPILER_MSVC #define alloca _alloca #endif