summaryrefslogtreecommitdiff
path: root/libs/pbd/pbd
diff options
context:
space:
mode:
authorJohn Emmas <johne53@tiscali.co.uk>2016-05-28 19:07:22 +0100
committerJohn Emmas <johne53@tiscali.co.uk>2016-05-28 19:07:22 +0100
commit22e031135ac2b81d8ac5d8d17d5a5a5b40281b6d (patch)
tree0ba1a82e4e1d008fb53b52287c51461c656d611d /libs/pbd/pbd
parentebeffdd2949b8d915c2bb8cc447a675d7a0de5da (diff)
Emulate 'log1p()' and 'expm1()' using 'log()' and 'exp()'
(for MSVC which didn't implement those functions until very recent versions).
Diffstat (limited to 'libs/pbd/pbd')
-rw-r--r--libs/pbd/pbd/msvc_pbd.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/libs/pbd/pbd/msvc_pbd.h b/libs/pbd/pbd/msvc_pbd.h
index 7529619f1d..5a6b550242 100644
--- a/libs/pbd/pbd/msvc_pbd.h
+++ b/libs/pbd/pbd/msvc_pbd.h
@@ -232,7 +232,15 @@ LIBPBD_API ssize_t PBD_APICALLTYPE pwrite(int handle, const void *buf, size_t
LIBPBD_API int PBD_APICALLTYPE poll(struct pollfd *fds, nfds_t nfds, int timeout);
LIBPBD_API double PBD_APICALLTYPE round(double x);
LIBPBD_API double PBD_APICALLTYPE trunc(double x);
-LIBPBD_API double PBD_APICALLTYPE log2(double x);
+
+#if defined(_MSC_VER) && (_MSC_VER < 1800)
+LIBPBD_API double PBD_APICALLTYPE expm1(double x);
+LIBPBD_API double PBD_APICALLTYPE log1p(double x);
+#endif
+
+#if defined(_MSC_VER) && (_MSC_VER < 1900)
+LIBPBD_API double PBD_APICALLTYPE log2 (double x);
+#endif
namespace PBD {