alter platform-dependent preprocessor macros to use the same names as the rest of the ardour codebase

This commit is contained in:
Paul Davis 2014-05-01 09:32:18 -04:00
parent 49ad78659b
commit 49423427a6
16 changed files with 61 additions and 63 deletions

View file

@ -128,9 +128,9 @@ WavesAudioBackend::~WavesAudioBackend ()
std::string std::string
WavesAudioBackend::name () const WavesAudioBackend::name () const
{ {
#ifdef __MACOS__ #ifdef __APPLE__
return std::string ("CoreAudio"); return std::string ("CoreAudio");
#elif _WINDOWS #elif PLATFORM_WINDOWS
return std::string ("ASIO"); return std::string ("ASIO");
#endif #endif
} }
@ -1062,13 +1062,13 @@ WavesAudioBackend::sample_time ()
uint64_t uint64_t
WavesAudioBackend::__get_time_nanos () WavesAudioBackend::__get_time_nanos ()
{ {
#ifdef __MACOS__ #ifdef __APPLE__
// here we exploit the time counting API which is used by the WCMRCoreAudioDeviceManager. However, // here we exploit the time counting API which is used by the WCMRCoreAudioDeviceManager. However,
// the API should be a part of WCMRCoreAudioDeviceManager to give a chance of being tied to the // the API should be a part of WCMRCoreAudioDeviceManager to give a chance of being tied to the
// audio device transport timeß. // audio device transport timeß.
return AudioConvertHostTimeToNanos (AudioGetCurrentHostTime ()); return AudioConvertHostTimeToNanos (AudioGetCurrentHostTime ());
#elif _WINDOWS #elif PLATFORM_WINDOWS
LARGE_INTEGER Count; LARGE_INTEGER Count;
QueryPerformanceCounter (&Count); QueryPerformanceCounter (&Count);
return uint64_t ((Count.QuadPart * 1000000000L / __performance_counter_frequency)); return uint64_t ((Count.QuadPart * 1000000000L / __performance_counter_frequency));
@ -1196,9 +1196,9 @@ size_t
WavesAudioBackend::__thread_stack_size () WavesAudioBackend::__thread_stack_size ()
{ {
// Align stacksize to PTHREAD_STACK_MIN. // Align stacksize to PTHREAD_STACK_MIN.
#if defined (__MACOS__) #if defined (__APPLE__)
return (((thread_stack_size () - 1) / PTHREAD_STACK_MIN) + 1) * PTHREAD_STACK_MIN; return (((thread_stack_size () - 1) / PTHREAD_STACK_MIN) + 1) * PTHREAD_STACK_MIN;
#elif defined (_WINDOWS) #elif defined (PLATFORM_WINDOWS)
return thread_stack_size (); return thread_stack_size ();
#endif #endif
} }
@ -1215,7 +1215,7 @@ WavesAudioBackend::process_thread_count ()
void void
WavesAudioBackend::_read_audio_data_from_device (const float* input_buffer, pframes_t nframes) WavesAudioBackend::_read_audio_data_from_device (const float* input_buffer, pframes_t nframes)
{ {
#if defined(_WINDOWS) #if defined(PLATFORM_WINDOWS)
const float **buffer = (const float**)input_buffer; const float **buffer = (const float**)input_buffer;
size_t copied_bytes = nframes*sizeof(float*); size_t copied_bytes = nframes*sizeof(float*);
@ -1290,7 +1290,7 @@ WavesAudioBackend::__waves_backend_factory (AudioEngine& e)
} }
#if defined(_WINDOWS) #if defined(PLATFORM_WINDOWS)
uint64_t WavesAudioBackend::__performance_counter_frequency; uint64_t WavesAudioBackend::__performance_counter_frequency;
@ -1301,7 +1301,7 @@ WavesAudioBackend::__instantiate (const std::string& arg1, const std::string& ar
{ {
// COMMENTED DBG LOGS */ std::cout << "WavesAudioBackend::__instantiate ():" << "[" << arg1 << "], [" << arg2 << "]" << std::endl; // COMMENTED DBG LOGS */ std::cout << "WavesAudioBackend::__instantiate ():" << "[" << arg1 << "], [" << arg2 << "]" << std::endl;
__instantiated_name = arg1; __instantiated_name = arg1;
#if defined(_WINDOWS) #if defined(PLATFORM_WINDOWS)
LARGE_INTEGER Frequency; LARGE_INTEGER Frequency;
QueryPerformanceFrequency(&Frequency); QueryPerformanceFrequency(&Frequency);
@ -1364,9 +1364,9 @@ WavesAudioBackend::can_monitor_input () const
std::string WavesAudioBackend::__instantiated_name; std::string WavesAudioBackend::__instantiated_name;
AudioBackendInfo WavesAudioBackend::__backend_info = { AudioBackendInfo WavesAudioBackend::__backend_info = {
#ifdef __MACOS__ #ifdef __APPLE__
"CoreAudio", "CoreAudio",
#elif _WINDOWS #elif PLATFORM_WINDOWS
"ASIO", "ASIO",
#endif #endif
__instantiate, __instantiate,

View file

@ -34,7 +34,7 @@
#include "waves_midi_device_manager.h" #include "waves_midi_device_manager.h"
#ifdef __MACOS__ #ifdef __APPLE__
#include <WCMRCoreAudioDeviceManager.h> #include <WCMRCoreAudioDeviceManager.h>
@ -44,7 +44,7 @@ class ArdourAudioDeviceManager : public WCMRCoreAudioDeviceManager
ArdourAudioDeviceManager (WCMRAudioDeviceManagerClient *client) : WCMRCoreAudioDeviceManager (client, eAllDevices) {}; ArdourAudioDeviceManager (WCMRAudioDeviceManagerClient *client) : WCMRCoreAudioDeviceManager (client, eAllDevices) {};
}; };
#elif defined (_WINDOWS) #elif defined (PLATFORM_WINDOWS)
#include <WCMRPortAudioDeviceManager.h> #include <WCMRPortAudioDeviceManager.h>
@ -364,7 +364,7 @@ class WavesMidiPort;
std::vector<WavesDataPort*> _ports; std::vector<WavesDataPort*> _ports;
static AudioBackendInfo __backend_info; static AudioBackendInfo __backend_info;
#if defined (_WINDOWS) #if defined (PLATFORM_WINDOWS)
static uint64_t __performance_counter_frequency; static uint64_t __performance_counter_frequency;
#endif #endif
uint64_t _cycle_start_time_nanos; uint64_t _cycle_start_time_nanos;

View file

@ -25,11 +25,11 @@
using namespace ARDOUR; using namespace ARDOUR;
#ifdef __MACOS__ #ifdef __APPLE__
const std::vector<std::string> WavesAudioBackend::__available_midi_options = boost::assign::list_of ("None") ("CoreMIDI"); const std::vector<std::string> WavesAudioBackend::__available_midi_options = boost::assign::list_of ("None") ("CoreMIDI");
#elif _WINDOWS #elif PLATFORM_WINDOWS
const std::vector<std::string> WavesAudioBackend::__available_midi_options = boost::assign::list_of ("None") ("Multimedia Extensions"); const std::vector<std::string> WavesAudioBackend::__available_midi_options = boost::assign::list_of ("None") ("Multimedia Extensions");

View file

@ -20,12 +20,12 @@
#include "waves_midi_device_manager.h" #include "waves_midi_device_manager.h"
#include "waves_audiobackend.h" #include "waves_audiobackend.h"
#ifdef __WINDOWS__ #ifdef PLATFORM_WINDOWS
#include "windows.h" #include "windows.h"
#include "mmsystem.h" #include "mmsystem.h"
#elif __MACOS__ #else if defined(__APPLE__)
#include <CoreMIDI/MIDIServices.h> #include <CoreMIDI/MIDIServices.h>

View file

@ -10,7 +10,7 @@
// When changing wvNS value also do the same change in Objective_C_MangledNames.h // When changing wvNS value also do the same change in Objective_C_MangledNames.h
// because CWSAUCocoaViewFactoryAsString is hard coded there // because CWSAUCocoaViewFactoryAsString is hard coded there
#define wvNS wvWavesV9_3 #define wvNS wvWavesV9_3
#ifdef __MACOS__ #ifdef __APPLE__
#define ObjCNameSpace(__className__) wvWavesV9_3_ ## __className__ #define ObjCNameSpace(__className__) wvWavesV9_3_ ## __className__
#endif #endif
@ -38,7 +38,7 @@
#define WUNUSED_PARAM(__SOME_UNUSED_PARAM__) ((void)__SOME_UNUSED_PARAM__) #define WUNUSED_PARAM(__SOME_UNUSED_PARAM__) ((void)__SOME_UNUSED_PARAM__)
#ifdef __MACOS__ #ifdef __APPLE__
const char* const OS_NAME = "Mac"; const char* const OS_NAME = "Mac";
#define WIN_ONLY(__Something_only_for_windows__) #define WIN_ONLY(__Something_only_for_windows__)
@ -81,7 +81,7 @@
#endif #endif
#ifdef _WINDOWS #ifdef PLATFORM_WINDOWS
const char* const OS_NAME = "Win"; const char* const OS_NAME = "Win";
#define WIN_ONLY(__Something_only_for_windows__) __Something_only_for_windows__ #define WIN_ONLY(__Something_only_for_windows__) __Something_only_for_windows__

View file

@ -121,10 +121,10 @@ enum WESystemFolders{
//******************************************************************************** //********************************************************************************
// Process // Process
#ifdef __MACOS__ #ifdef __APPLE__
typedef uint32_t WTProcessID; // actually pid_t which is __darwin_pid_t which is __uint32_t typedef uint32_t WTProcessID; // actually pid_t which is __darwin_pid_t which is __uint32_t
#endif #endif
#ifdef _WINDOWS #ifdef PLATFORM_WINDOWS
typedef int WTProcessID; typedef int WTProcessID;
#endif #endif
#ifdef __linux__ #ifdef __linux__
@ -147,14 +147,14 @@ enum WEManagerInitOptions
eInit_UM, eInit_UM,
eInit_BKG eInit_BKG
}; };
#ifdef __MACOS__ #ifdef __APPLE__
#if __LP64__ || NS_BUILD_32_LIKE_64 // in 64bit (or when NS_BUILD_32_LIKE_64 is specified) we decline Carbon implementation. #if __LP64__ || NS_BUILD_32_LIKE_64 // in 64bit (or when NS_BUILD_32_LIKE_64 is specified) we decline Carbon implementation.
const WEManagerInitOptions eDefaultRuntime = eMacOS_Cocoa_Runtime; const WEManagerInitOptions eDefaultRuntime = eMacOS_Cocoa_Runtime;
#else #else
const WEManagerInitOptions eDefaultRuntime = eMacOS_Carbon_Runtime; const WEManagerInitOptions eDefaultRuntime = eMacOS_Carbon_Runtime;
#endif #endif
#endif #endif
#ifdef _WINDOWS #ifdef PLATFORM_WINDOWS
const WEManagerInitOptions eDefaultRuntime = eWindowsOS_GoodOld_Runtime; const WEManagerInitOptions eDefaultRuntime = eWindowsOS_GoodOld_Runtime;
#endif #endif
#ifdef __linux__ #ifdef __linux__
@ -196,11 +196,11 @@ typedef struct WTResourceType* WTResRef;
const WTResContainerRef kIllegalContainerRef = 0; const WTResContainerRef kIllegalContainerRef = 0;
const WTResRef kIllegalResourceRef = 0; const WTResRef kIllegalResourceRef = 0;
#ifdef __MACOS__ #ifdef __APPLE__
typedef struct WTNativeResourceType* WTNativeResourceRef; // for use when need to have access to the native resource without going though resource manager caching anf conversion. typedef struct WTNativeResourceType* WTNativeResourceRef; // for use when need to have access to the native resource without going though resource manager caching anf conversion.
const WTNativeResourceRef kIllegalNativeResourceRef = 0; const WTNativeResourceRef kIllegalNativeResourceRef = 0;
#endif #endif
#ifdef _WINDOWS #ifdef PLATFORM_WINDOWS
typedef struct WTNativeResourceType* WTNativeResourceRef; //HGLOBAL // for use when need to have access to the native resource without going though resource manager caching anf conversion. typedef struct WTNativeResourceType* WTNativeResourceRef; //HGLOBAL // for use when need to have access to the native resource without going though resource manager caching anf conversion.
const WTNativeResourceRef kIllegalNativeResourceRef = 0; const WTNativeResourceRef kIllegalNativeResourceRef = 0;
#endif #endif

View file

@ -1,7 +1,7 @@
#ifndef __IncludeWindows_h__ #ifndef __IncludeWindows_h__
#define __IncludeWindows_h__ #define __IncludeWindows_h__
#ifdef _WINDOWS #ifdef PLATFORM_WINDOWS
/* Copy to include /* Copy to include
#include "IncludeWindows.h" #include "IncludeWindows.h"
@ -26,6 +26,6 @@
#include <WinSock2.h> #include <WinSock2.h>
#include <Windows.h> #include <Windows.h>
#include <objbase.h> #include <objbase.h>
#endif // #if _WINDOWS #endif // #if PLATFORM_WINDOWS
#endif // #ifndef __IncludeWindows_h__ #endif // #ifndef __IncludeWindows_h__

View file

@ -10,7 +10,7 @@
#ifndef __WCMRNativeAudio_h_ #ifndef __WCMRNativeAudio_h_
#define __WCMRNativeAudio_h_ #define __WCMRNativeAudio_h_
#if defined(_WINDOWS) #if defined(PLATFORM_WINDOWS)
#include "windows.h" #include "windows.h"
#endif #endif
#include "pthread.h" #include "pthread.h"
@ -54,7 +54,7 @@ private:
static void* __SilenceThread(void *This); static void* __SilenceThread(void *This);
void _SilenceThread(); void _SilenceThread();
#if defined(_WINDOWS) #if defined(PLATFORM_WINDOWS)
void _usleep(uint64_t usec); void _usleep(uint64_t usec);
#else #else
inline void _usleep(uint64_t usec) { ::usleep(usec); } inline void _usleep(uint64_t usec) { ::usleep(usec); }
@ -65,7 +65,7 @@ private:
float *_m_inputBuffer; float *_m_inputBuffer;
float *_m_outputBuffer; float *_m_outputBuffer;
static uint64_t __get_time_nanos (); static uint64_t __get_time_nanos ();
#if defined (_WINDOWS) #if defined (PLATFORM_WINDOWS)
HANDLE _waitableTimerForUsleep; HANDLE _waitableTimerForUsleep;
#endif #endif
}; };

View file

@ -49,10 +49,10 @@ public:
virtual WTErr ResetDevice(); virtual WTErr ResetDevice();
#ifdef _WINDOWS #ifdef PLATFORM_WINDOWS
static long StaticASIOMessageHook (void *pRefCon, long selector, long value, void* message, double* opt); static long StaticASIOMessageHook (void *pRefCon, long selector, long value, void* message, double* opt);
long ASIOMessageHook (long selector, long value, void* message, double* opt); long ASIOMessageHook (long selector, long value, void* message, double* opt);
#endif //_WINDOWS #endif //PLATFORM_WINDOWS
protected: protected:
static DWORD WINAPI __DoIdle__(LPVOID lpThreadParameter); static DWORD WINAPI __DoIdle__(LPVOID lpThreadParameter);

View file

@ -30,7 +30,7 @@ template<class T> inline T WUMinMax(const T &Smallest, const T &Biggest, const T
} }
*/ */
// Absolute value // Absolute value
#ifdef _WINDOWS #ifdef PLATFORM_WINDOWS
#include <math.h> #include <math.h>
#define __abs(x) abs(x) #define __abs(x) abs(x)
#define __labs(x) labs(x) #define __labs(x) labs(x)
@ -45,7 +45,7 @@ template<class T> inline T WUMinMax(const T &Smallest, const T &Biggest, const T
#define __labs(x) std::labs(x) #define __labs(x) std::labs(x)
#define __fabs(x) std::fabs(x) #define __fabs(x) std::fabs(x)
#endif #endif
#ifdef __MACOS__ #ifdef __APPLE__
#ifdef __GNUC__ #ifdef __GNUC__
#include <iostream> // why don't know makes it work need to check #include <iostream> // why don't know makes it work need to check
#include <cmath> #include <cmath>
@ -57,7 +57,7 @@ template<class T> inline T WUMinMax(const T &Smallest, const T &Biggest, const T
// log2: on Windows there's no proper definition for log2, whereas on other platform there is. // log2: on Windows there's no proper definition for log2, whereas on other platform there is.
#ifndef WUlog2 #ifndef WUlog2
#if defined(_WINDOWS) #if defined(PLATFORM_WINDOWS)
#define WUlog2(x) (kdOneOverLog2 * log10((x))) #define WUlog2(x) (kdOneOverLog2 * log10((x)))
#else #else
#define WUlog2(x) log2(x) #define WUlog2(x) log2(x)

View file

@ -16,10 +16,10 @@ class DllExport UMicroseconds
{ {
public: public:
#ifdef _WINDOWS #ifdef PLATFORM_WINDOWS
typedef int64_t TimeKeeper; typedef int64_t TimeKeeper;
#endif #endif
#ifdef __MACOS__ #ifdef __APPLE__
typedef uint64_t TimeKeeper; typedef uint64_t TimeKeeper;
#endif #endif
#ifdef __linux__ #ifdef __linux__
@ -52,7 +52,7 @@ public:
double MilliSeconds() const {return static_cast<double>(theTime) / double(1000);} double MilliSeconds() const {return static_cast<double>(theTime) / double(1000);}
double MicroSeconds() const {return static_cast<double>(theTime);} double MicroSeconds() const {return static_cast<double>(theTime);}
#ifdef __MACOS__ #ifdef __APPLE__
uint32_t hi(); uint32_t hi();
uint32_t lo(); uint32_t lo();
#endif #endif

View file

@ -12,7 +12,7 @@
#include <cstring> #include <cstring>
#include <cstdio> #include <cstdio>
#ifdef __MACOS__ #ifdef __APPLE__
#include <strings.h> #include <strings.h>
#endif #endif
@ -28,7 +28,7 @@
#ifdef __POSIX__ #ifdef __POSIX__
const char* const kStrNewLine = "\n"; const char* const kStrNewLine = "\n";
#endif #endif
#ifdef _WINDOWS #ifdef PLATFORM_WINDOWS
const char* const kStrNewLine = "\r\n"; const char* const kStrNewLine = "\r\n";
#endif #endif
@ -256,10 +256,10 @@ public:
const unsigned int tempBufSize = 32; const unsigned int tempBufSize = 32;
char buf[tempBufSize]; char buf[tempBufSize];
#ifdef _WINDOWS #ifdef PLATFORM_WINDOWS
_snprintf_s(buf, tempBufSize, tempBufSize - 1, "%.*f", in_precision, in_double); _snprintf_s(buf, tempBufSize, tempBufSize - 1, "%.*f", in_precision, in_double);
#endif #endif
#ifdef __MACOS__ #ifdef __APPLE__
std::snprintf(buf, tempBufSize, "%.*f", in_precision, in_double); std::snprintf(buf, tempBufSize, "%.*f", in_precision, in_double);
#endif #endif
#ifdef __linux__ #ifdef __linux__
@ -356,7 +356,7 @@ public:
// warning which we do not know how to solve yet. The function DummyFunctionsForWarningTest // warning which we do not know how to solve yet. The function DummyFunctionsForWarningTest
// in file WCFixedStringStream.cpp calls all combinations of operator<<(unsigned something) // in file WCFixedStringStream.cpp calls all combinations of operator<<(unsigned something)
// And should produce no warnings - (except the C4267 on windows). // And should produce no warnings - (except the C4267 on windows).
#if defined(__MACOS__) // both 32 & 64 bit #if defined(__APPLE__) // both 32 & 64 bit
WCFixedStringBase& operator<<(const size_t in_uint) { WCFixedStringBase& operator<<(const size_t in_uint) {
return operator<<(static_cast<unsigned long long>(in_uint)); return operator<<(static_cast<unsigned long long>(in_uint));
} }
@ -369,13 +369,13 @@ public:
// return operator<<(static_cast<const uint64_t>(in_uint)); // return operator<<(static_cast<const uint64_t>(in_uint));
// } // }
// //
#if defined(__MACOS__) || defined(_WINDOWS) || defined(__linux__) // both 32 & 64 bit #if defined(__APPLE__) || defined(PLATFORM_WINDOWS) || defined(__linux__) // both 32 & 64 bit
WCFixedStringBase& operator<<(const unsigned int in_uint) { WCFixedStringBase& operator<<(const unsigned int in_uint) {
return operator<<(static_cast<uint64_t>(in_uint)); return operator<<(static_cast<uint64_t>(in_uint));
} }
#endif #endif
// //
#if defined(_WINDOWS) || defined(__linux__) // both 32 & 64 bit #if defined(PLATFORM_WINDOWS) || defined(__linux__) // both 32 & 64 bit
WCFixedStringBase& operator<<(const unsigned long in_uint) { WCFixedStringBase& operator<<(const unsigned long in_uint) {
return operator<<(static_cast<uint64_t>(in_uint)); return operator<<(static_cast<uint64_t>(in_uint));
} }
@ -385,7 +385,7 @@ public:
{ {
if (in_int < 0) if (in_int < 0)
operator<<('-'); operator<<('-');
#ifdef _WINDOWS #ifdef PLATFORM_WINDOWS
// uintmax_t unsigned_in_num = _abs64(in_int); // uintmax_t unsigned_in_num = _abs64(in_int);
uintmax_t unsigned_in_num = in_int < 0 ? static_cast<uintmax_t>(-in_int) : static_cast<uintmax_t>(in_int); uintmax_t unsigned_in_num = in_int < 0 ? static_cast<uintmax_t>(-in_int) : static_cast<uintmax_t>(in_int);
#else #else
@ -464,10 +464,10 @@ public:
if (0 != in_to_compare) if (0 != in_to_compare)
{ {
#ifdef _WINDOWS #ifdef PLATFORM_WINDOWS
retVal = _stricmp(c_str(), in_to_compare); retVal = _stricmp(c_str(), in_to_compare);
#endif #endif
#if defined(__linux__) || defined(__MACOS__) #if defined(__linux__) || defined(__APPLE__)
retVal = strcasecmp(c_str(), in_to_compare); retVal = strcasecmp(c_str(), in_to_compare);
#endif #endif
} }

View file

@ -23,7 +23,7 @@
#include "BasicTypes/WUDefines.h" #include "BasicTypes/WUDefines.h"
#if defined(__linux__) || defined(__MACOS__) #if defined(__linux__) || defined(__APPLE__)
#define XPLATFORMOSSERVICES_UNIX 1 #define XPLATFORMOSSERVICES_UNIX 1
#endif #endif
@ -46,12 +46,12 @@ namespace wvThread
{ {
//#include "BasicTypes/WavesAPISetAligment.h" //#include "BasicTypes/WavesAPISetAligment.h"
//Packing affects the layout of classes, and commonly, if packing changes across header files, there can be problems. //Packing affects the layout of classes, and commonly, if packing changes across header files, there can be problems.
#ifdef _WINDOWS #ifdef PLATFORM_WINDOWS
#pragma pack(push) #pragma pack(push)
#pragma pack(8) #pragma pack(8)
#endif #endif
#ifdef __MACOS__ #ifdef __APPLE__
#ifdef __GNUC__ #ifdef __GNUC__
#pragma pack(push, 8) #pragma pack(push, 8)
#endif #endif
@ -86,7 +86,7 @@ namespace wvThread
bool is_null() const { return m_nMicroseconds==0; } bool is_null() const { return m_nMicroseconds==0; }
}; };
//-------------------------------------------------------- //--------------------------------------------------------
#ifdef __MACOS__ #ifdef __APPLE__
bool FindNetInterfaceByIPAddress(const char *sIP, char *sInterface); bool FindNetInterfaceByIPAddress(const char *sIP, char *sInterface);
#endif // MACOS #endif // MACOS
//-------------------------------------------------------- //--------------------------------------------------------
@ -356,11 +356,11 @@ namespace wvThread
}; };
//#include "BasicTypes/WavesAPIResetAligment.h" //#include "BasicTypes/WavesAPIResetAligment.h"
#ifdef _WINDOWS #ifdef PLATFORM_WINDOWS
#pragma pack(pop) #pragma pack(pop)
#endif #endif
#ifdef __MACOS__ #ifdef __APPLE__
#ifdef __GNUC__ #ifdef __GNUC__
#pragma pack(pop) #pragma pack(pop)
#endif #endif

View file

@ -5,7 +5,7 @@
#include "WavesPublicAPI_Defines.h" #include "WavesPublicAPI_Defines.h"
*/ */
#ifdef __MACOS__ #ifdef __APPLE__
#ifdef __GNUC__ #ifdef __GNUC__
#define WPAPI_DllExport __attribute__ ((visibility("default"))) #define WPAPI_DllExport __attribute__ ((visibility("default")))
@ -23,7 +23,7 @@
#endif #endif
#ifdef _WINDOWS #ifdef PLATFORM_WINDOWS
#define WPAPI_DllExport __declspec(dllexport) #define WPAPI_DllExport __declspec(dllexport)
#define __WPAPI_CDECL __cdecl #define __WPAPI_CDECL __cdecl
#define __WPAPI_STDCALL __stdcall #define __WPAPI_STDCALL __stdcall

View file

@ -6,7 +6,7 @@
*/ */
#ifdef __MACOS__ #ifdef __APPLE__
#include <stddef.h> #include <stddef.h>
#include </usr/include/stdint.h> // Mac has this file in /usr/includez #include </usr/include/stdint.h> // Mac has this file in /usr/includez
#endif #endif
@ -19,7 +19,7 @@
#include </usr/include/stdint.h> #include </usr/include/stdint.h>
#endif #endif
#if (defined (_WINDOWS) || defined(WIN32) || defined(WIN64)) #if (defined (PLATFORM_WINDOWS) || defined(WIN32) || defined(WIN64))
#if (_MSC_VER > 1600) || defined(__MINGW64__) #if (_MSC_VER > 1600) || defined(__MINGW64__)
// Taken from MSDN official page: // Taken from MSDN official page:
// In Visual Studio 2010 _MSC_VER is defined as 1600, In Visual Studio 2012 _MSC_VER is defined as 1700. // In Visual Studio 2010 _MSC_VER is defined as 1600, In Visual Studio 2012 _MSC_VER is defined as 1700.
@ -335,6 +335,6 @@ typedef uint32_t uintmax_t;
#endif /* (_MSC_VER < 1400) */ #endif /* (_MSC_VER < 1400) */
#endif /* #ifdef _WINDOWS */ #endif /* #ifdef PLATFORM_WINDOWS */
#endif /* __stdint_h__ */ #endif /* __stdint_h__ */

View file

@ -97,11 +97,9 @@ def build(bld):
if bld.env['build_target']== 'mingw': if bld.env['build_target']== 'mingw':
obj.defines = ['PACKAGE="' + I18N_PACKAGE + '"', obj.defines = ['PACKAGE="' + I18N_PACKAGE + '"',
'_WINDOWS',
'ARDOURBACKEND_DLL_EXPORTS' 'ARDOURBACKEND_DLL_EXPORTS'
] ]
else: else:
obj.defines = ['PACKAGE="' + I18N_PACKAGE + '"', obj.defines = ['PACKAGE="' + I18N_PACKAGE + '"',
'__MACOS__',
'ARDOURBACKEND_DLL_EXPORTS' 'ARDOURBACKEND_DLL_EXPORTS'
] ]