Use std::isnan and std::isinf when on linux#6
Conversation
|
I'll try it on Ubuntu and I'll merge if ok (in the weekend)... Thanks @toddbluhm |
|
The first commit is bad. It broke on our CI server, but I think the second commit using |
|
Can you squash the commits? |
|
Done |
|
Actually I take that back, its failing on our CI server still (Ubuntu). Not sure how it worked that one time... |
|
Okay, so it looks like the reason my CI system was failing was due to that fact that we are using node v4 and our CI server defaults to gcc 4.6 and g++ 4.6 and the version of NAN used in this package requires a C++11 compiler (>= g++ 4.8). Once I updated gcc and g++ to 4.9 on our CI it installed just fine. It worked that one time because I had not updated our CI to use node v4...it was still using node 0.10. As soon as I updated to node v4, it wanted the updated versions of gcc and g++. |
|
ok, so can i close this pr without merging? |
|
This PR is good and should be merged. It fixes the issue with using this lib in an Alpine linux distribution. The one caveat is that it requires having gcc/g++ >=4.8. But since this is also the same requirement that node v4 with node-gyp has, it should not be a problem for people who use this lib. If they need to support an older version, they can use the old node-memwatch lib. |
Use std::isnan and std::isinf when on linux.
|
Ok, tested on Ubuntu, works fine. |
Not sure if this applies to all linux distributions, but when trying to install this in a docker Alpine Linux distro I was having issues with
isnanandisinfon Alpine Linux. The solution was to simply add thestdnamespace.I know that adding the name space will break on Mac OS X so I added a check, and if on linux, then add the
stdnamespace.I would be great if someone could try this out on another version of linux and see if this breaks its.