From 22e031135ac2b81d8ac5d8d17d5a5a5b40281b6d Mon Sep 17 00:00:00 2001 From: John Emmas Date: Sat, 28 May 2016 19:07:22 +0100 Subject: Emulate 'log1p()' and 'expm1()' using 'log()' and 'exp()' (for MSVC which didn't implement those functions until very recent versions). --- libs/pbd/pbd/msvc_pbd.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'libs/pbd/pbd') 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 { -- cgit v1.2.3