Skip to content

Commit

Permalink
Merge pull request #522 from janza/iojs-build-fix
Browse files Browse the repository at this point in the history
Define correct isnan, isinf functions
  • Loading branch information
kangax committed Feb 20, 2015
2 parents e015514 + 23e654a commit eb8f50b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ node_js:
- '0.8'
- '0.10'
- '0.11'
- 'iojs'
before_install:
- sudo chown -R $USER /usr/local
- sh install
7 changes: 6 additions & 1 deletion src/CanvasRenderingContext2d.cc
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,16 @@
#endif

// Windows doesn't support the C99 names for these
#ifndef isnan
#ifdef _MSC_VER
#define isnan(x) _isnan(x)
#define isinf(x) (!_finite(x))
#endif

#ifndef isnan
#define isnan(x) std::isnan(x)
#define isinf(x) std::isinf(x)
#endif

Persistent<FunctionTemplate> Context2d::constructor;

/*
Expand Down

0 comments on commit eb8f50b

Please sign in to comment.