1 #ifndef __WUDefines_h__
2 #define __WUDefines_h__
5 #include "BasicTypes/WUDefines.h"
8 #include "1.0/WavesPublicAPI_Defines.h"
10 // When changing wvNS value also do the same change in Objective_C_MangledNames.h
11 // because CWSAUCocoaViewFactoryAsString is hard coded there
12 #define wvNS wvWavesV9_3
14 #define ObjCNameSpace(__className__) wvWavesV9_3_ ## __className__
17 #ifdef INSIDE_NETSHELL
20 #define DllExport WPAPI_DllExport
23 #define __CDECL __WPAPI_CDECL
24 #define __STDCALL __WPAPI_STDCALL
35 #define PASCAL_MAC_ONLY #error do not use PASCAL_MAC_ONLY. See defintions in WavesFTT.h for replacment.
36 #define CALLCON #error do not use CALLCON. See defintions in WavesFTT.h for replacment.
37 #define FUNCEXP #error do not use FUNCEXP. See defintions in WavesFTT.h for replacment.
39 #define WUNUSED_PARAM(__SOME_UNUSED_PARAM__) ((void)__SOME_UNUSED_PARAM__)
42 const char* const OS_NAME = "Mac";
44 #define WIN_ONLY(__Something_only_for_windows__)
45 #define MAC_ONLY(__Something_only_for_mac__) __Something_only_for_mac__
47 #if defined(i386) || defined(__i386) || defined(__i386__)
48 #define kNumArchBits 32
50 #if defined(__x86_64) || defined(__x86_64__)
51 #define kNumArchBits 64
54 #if (__i386 || __x86_64) && !defined(__LITTLE_ENDIAN__)
55 #define __LITTLE_ENDIAN__
57 #if !(__i386 || __x86_64) && !defined(__BIG_ENDIAN__)
58 #define __BIG_ENDIAN__
61 #define STD_EXCEPT_WIN std
64 // #define HINSTANCE void*
69 #define DllExport_WinOnly
70 #define STD_EXCEPT_WIN std
72 #define PASCAL // windows' pascal
73 #define HINSTANCE void*
77 #define THROW_SPEC(THROW_OBJ) throw (THROW_OBJ)
79 #define WUNUSED_PARAM_ON_MAC(__SOME_UNUSED_PARAM__) WUNUSED_PARAM(__SOME_UNUSED_PARAM__)
80 #define WUNUSED_PARAM_ON_WIN(__SOME_UNUSED_PARAM__)
85 const char* const OS_NAME = "Win";
87 #define WIN_ONLY(__Something_only_for_windows__) __Something_only_for_windows__
88 #define MAC_ONLY(__Something_only_for_mac__)
91 #define kNumArchBits 64
92 #else // not sure what are the VisualStudio macros for 32 bits
93 #define kNumArchBits 32
96 #define DllExport_WinOnly DllExport // help solve window specific link errors
97 #define STD_EXCEPT_WIN
99 #if !defined(__MINGW64__)
100 #define round(x) (floor(x+0.5))
103 #define __LITTLE_ENDIAN__
104 #define THROW_SPEC(THROW_OBJ) throw (...)
106 #define WUNUSED_PARAM_ON_MAC(__SOME_UNUSED_PARAM__)
107 #define WUNUSED_PARAM_ON_WIN(__SOME_UNUSED_PARAM__) WUNUSED_PARAM(__SOME_UNUSED_PARAM__)
112 const char* const OS_NAME = "Linux";
114 #define WIN_ONLY(__Something_only_for_windows__)
115 #define MAC_ONLY(__Something_only_for_mac__)
117 #define DllExport_WinOnly
118 #define STD_EXCEPT_WIN std
121 // #define HINSTANCE void*
123 #if __i386 && !defined(__LITTLE_ENDIAN__)
124 #define __LITTLE_ENDIAN__
126 #if !__i386 && !defined(__BIG_ENDIAN__)
127 #define __BIG_ENDIAN__
129 #define THROW_SPEC(THROW_OBJ) throw (THROW_OBJ)
131 #if defined(__x86_64) || defined(__LP64__)
132 #error "64 bit not suported yet on linux"
134 #define kNumArchBits 32
139 #define _WU_DECL __CDECL // the default is calling model is cdecl, but you can also set this macro from the outside to something different
143 #define _XML_DECL __CDECL // the default is calling model is cdecl, but you can also set this macro from the outside to something different
147 #error Macro kNumArchBits was not defined
150 #if kNumArchBits == 64
151 const char* const kNumArchBits_c_str = "64";
153 #if kNumArchBits == 32
154 const char* const kNumArchBits_c_str = "32";
157 #endif //__WUDefines_h__