X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=msvc_extra_headers%2Fardourext%2Fmisc.h.input;h=9bcba6f327dacd8d13762db2f0bd815ae9c42674;hb=341758674b1c6b6e38bfe9e59e04062a70adca86;hp=79fb5aafab2e4c7894219dc5335e8cf9d5b80d91;hpb=cf806123ca5faaef483f898daba3f7bd38ec62eb;p=ardour.git diff --git a/msvc_extra_headers/ardourext/misc.h.input b/msvc_extra_headers/ardourext/misc.h.input index 79fb5aafab..9bcba6f327 100644 --- a/msvc_extra_headers/ardourext/misc.h.input +++ b/msvc_extra_headers/ardourext/misc.h.input @@ -193,7 +193,7 @@ typedef _mode_t mode_t; // int64 abs() #ifdef __cplusplus // Normal 'C' doesn't permit over-ridden functions !! -inline uint64_t abs(int64_t val) +inline int64_t abs(int64_t val) throw() { if (val < 0) return val * (-1); @@ -247,13 +247,12 @@ inline uint64_t abs(int64_t val) extern bool operator == (const Type& lhs, const Type& rhs); #endif -// round().... Unlike Linux, Windows doesn't seem to support the -// concept of a system-wide (or programmable) rounding direction. -// 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) #if !defined(LIBPBD_API) || defined(PBD_IS_IN_WIN_STATIC_LIB) extern double round(double x); + +// log2().... MSVC doesn't offer the C99 function 'log2()' +// so let's emulate it. +extern double log2(double x); #endif #endif /* __ardour_msvc_extensions_h__ */