Skip to content

Commit 99c23fa

Browse files
committed
Merge pull request #229 from stesie/isnan-macro-workaround
provide isnan macro, if missing, closes #227
2 parents fb42475 + e9c0a3a commit 99c23fa

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

php_v8js_macros.h

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,13 @@
22
+----------------------------------------------------------------------+
33
| PHP Version 5 |
44
+----------------------------------------------------------------------+
5-
| Copyright (c) 1997-2013 The PHP Group |
5+
| Copyright (c) 1997-2016 The PHP Group |
66
+----------------------------------------------------------------------+
77
| http://www.opensource.org/licenses/mit-license.php MIT License |
88
+----------------------------------------------------------------------+
99
| Author: Jani Taskinen <jani.taskinen@iki.fi> |
1010
| Author: Patrick Reilly <preilly@php.net> |
11+
| Author: Stefan Siegl <stesie@php.net> |
1112
+----------------------------------------------------------------------+
1213
*/
1314

@@ -27,6 +28,13 @@
2728
#include <vector>
2829
#include <mutex>
2930

31+
#include <cmath>
32+
#ifndef isnan
33+
/* php.h requires the isnan() macro, which is removed by c++ <cmath> header,
34+
* work around: re-define the macro to std::isnan function */
35+
#define isnan(a) std::isnan(a)
36+
#endif
37+
3038
extern "C" {
3139
#include "php.h"
3240
#include "php_v8js.h"

0 commit comments

Comments
 (0)