diff --git a/v8js_convert.cc b/v8js_convert.cc index 5eec007..0478113 100644 --- a/v8js_convert.cc +++ b/v8js_convert.cc @@ -1093,6 +1093,10 @@ v8::Handle zval_to_v8js(zval *value, v8::Isolate *isolate TSRMLS_DC) case IS_LONG: v = Z_LVAL_P(value); + /* On Windows there are max and min macros, which would clobber the + * method names of std::numeric_limits< > otherwise. */ +#undef max +#undef min if (v < - std::numeric_limits::min() || v > std::numeric_limits::max()) { jsValue = V8JS_FLOAT((double)v); } else {