From 96b85c1a77cabffddf405a72a15945815c65897f Mon Sep 17 00:00:00 2001 From: Mathias Bavay Date: Mon, 16 Aug 2021 17:55:49 +0200 Subject: [PATCH] Fixed for the old issue #34 As I got hit with the same issue when compiling tinyexpr on Windows with QtCreator (that itself was calling Visual C++ 2017 in the background) and realized that there was a solution in the issue's thread but no fix in the source code, I've implemented it (wrapped with ifdef to prevent warnings on other platforms). --- tinyexpr.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tinyexpr.c b/tinyexpr.c index a5fc9d8..bee3cfd 100755 --- a/tinyexpr.c +++ b/tinyexpr.c @@ -151,6 +151,11 @@ static double ncr(double n, double r) { } static double npr(double n, double r) {return ncr(n, r) * fac(r);} +#ifdef _MSC_VER +#pragma function (ceil) +#pragma function (floor) +#endif + static const te_variable functions[] = { /* must be in alphabetical order */ {"abs", fabs, TE_FUNCTION1 | TE_FLAG_PURE, 0},