Skip to content

Commit

Permalink
Fixed for the old issue #34
Browse files Browse the repository at this point in the history
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).
  • Loading branch information
bavay authored Aug 16, 2021
1 parent 33626ea commit 96b85c1
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tinyexpr.c
Original file line number Diff line number Diff line change
Expand Up @@ -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},
Expand Down

0 comments on commit 96b85c1

Please sign in to comment.