summaryrefslogtreecommitdiff
path: root/msvc_extra_headers
diff options
context:
space:
mode:
Diffstat (limited to 'msvc_extra_headers')
-rw-r--r--msvc_extra_headers/ardourext/float_cast.h.input23
-rw-r--r--msvc_extra_headers/ardourext/misc.h.input17
-rw-r--r--msvc_extra_headers/ardourext/sys/targetsxs.h.input8
3 files changed, 42 insertions, 6 deletions
diff --git a/msvc_extra_headers/ardourext/float_cast.h.input b/msvc_extra_headers/ardourext/float_cast.h.input
index a5a82e3668..2ba3bbbe62 100644
--- a/msvc_extra_headers/ardourext/float_cast.h.input
+++ b/msvc_extra_headers/ardourext/float_cast.h.input
@@ -68,6 +68,29 @@
return intgr ;
}
+ __inline long long int
+ llrint (double flt)
+ { long long int intgr;
+
+ _asm
+ { fld flt
+ fistp intgr
+ } ;
+
+ return intgr ;
+ }
+
+ __inline long long int
+ llrintf (float flt)
+ { long long int intgr;
+
+ _asm
+ { fld flt
+ fistp intgr
+ } ;
+
+ return intgr ;
+ }
#endif
#endif // __FLOAT_CAST_H__
diff --git a/msvc_extra_headers/ardourext/misc.h.input b/msvc_extra_headers/ardourext/misc.h.input
index 55eb529f24..dfe9e05336 100644
--- a/msvc_extra_headers/ardourext/misc.h.input
+++ b/msvc_extra_headers/ardourext/misc.h.input
@@ -36,10 +36,10 @@
#include <ardourext/float_cast.h>
// 'std::isnan()' is not available in MSVC. Assume '_isnan(double)'
-#define isnan(val) (bool)_isnan((double)val)
+#define isnan(val) _isnan((double)val)
// 'std::isinf()' is not available in MSVC. Assume '!_finite(double)'
-#define isinf(val) !((bool)_finite((double)val))
+#define isinf(val) !_finite((double)val)
// 'INFINITY' is not defined in MSVC. Assume 'HUGE_VAL'
#ifndef INFINITY
@@ -179,7 +179,9 @@ typedef int register_t;
// Fortunately, 'round to nearest' seems to be the default action
// under Linux, so let's copy that until we find out otherwise.
#define rint(value) round(value)
-#define round(value) floor((value) + 0.5)
+#if !defined(PBD_API) || defined(PBD_IS_IN_WIN_STATIC_LIB)
+extern double round(double x);
+#endif
// System V compatibility
typedef unsigned short ushort;
@@ -195,6 +197,15 @@ typedef _mode_t mode_t;
#endif /* NO_OLDNAMES */
#endif /* _MODE_T_ */
+// int64 abs()
+inline uint64_t abs(int64_t val)
+{
+ if (val < 0)
+ return val * (-1);
+ else
+ return val;
+}
+
// fmin() and fmax()
#define fmin(a, b) min((double)a, (double)b)
#define fmax(a, b) max((double)a, (double)b)
diff --git a/msvc_extra_headers/ardourext/sys/targetsxs.h.input b/msvc_extra_headers/ardourext/sys/targetsxs.h.input
index 2730c8cb8d..c81c8a3630 100644
--- a/msvc_extra_headers/ardourext/sys/targetsxs.h.input
+++ b/msvc_extra_headers/ardourext/sys/targetsxs.h.input
@@ -3,9 +3,11 @@
#pragma warning( disable : 4996 )
-#ifndef HAVE_LV2
-#define HAVE_SUIL
-#define HAVE_LV2
+#ifndef LV2_SUPPORT
+#define LV2_SUPPORT 1
+#define HAVE_SUIL 1
+#define HAVE_LV2 1
+//#define HAVE_NEW_LV2 1
/* Comment out the above lines to build Mixbus without LV2 support */
#endif