Skip to content

Commit

Permalink
Add fallback definitions of DBL_EPSILPN and LDBL_EPSILON; fix mru…
Browse files Browse the repository at this point in the history
…by#3733

This is a workaround for mingw-w64 (5.3.1) bug.
  • Loading branch information
matz committed Jul 7, 2017
1 parent 718a9ce commit ce6c056
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions include/mruby.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,13 @@

#include "mrbconf.h"

#ifndef DBL_EPSILON
#define DBL_EPSILON ((double)2.22044604925031308085e-16L)
#endif
#ifndef LDBL_EPSILON
#define LDBL_EPSILON (1.08420217248550443401e-19L)
#endif

#ifdef MRB_USE_FLOAT
#define MRB_FLOAT_EPSILON FLT_EPSILON
#else
Expand Down

0 comments on commit ce6c056

Please sign in to comment.