Skip to content

Commit 5e5f7d1

Browse files
committed
fix windows build: M_PI undefined
1 parent 19a11ab commit 5e5f7d1

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

src/api/dispatcher.cc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,6 @@
1919
// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
2020

2121
#define V8_USE_UNSAFE_HANDLES
22-
#if defined(OS_WIN)
23-
#define _USE_MATH_DEFINES
24-
#include <math.h>
25-
#endif
2622

2723
#include "content/nw/src/api/dispatcher.h"
2824

@@ -39,6 +35,10 @@
3935

4036
#undef LOG
4137
#undef ASSERT
38+
#if defined(OS_WIN)
39+
#define _USE_MATH_DEFINES
40+
#include <math.h>
41+
#endif
4242
#include "third_party/WebKit/Source/config.h"
4343
#include "third_party/WebKit/Source/core/frame/Frame.h"
4444
#include "third_party/WebKit/Source/web/WebFrameImpl.h"

src/api/window_bindings.cc

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@
1818
// ETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
1919
// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
2020

21-
#define _USE_MATH_DEFINES
22-
2321
#include "content/nw/src/api/window_bindings.h"
2422

2523
#include "base/values.h"
@@ -29,6 +27,11 @@
2927
#include "grit/nw_resources.h"
3028
#undef LOG
3129
using namespace WebCore;
30+
#if defined(OS_WIN)
31+
#define _USE_MATH_DEFINES
32+
#include <math.h>
33+
#endif
34+
3235

3336
#include "third_party/WebKit/Source/config.h"
3437
#include "third_party/WebKit/Source/core/html/HTMLIFrameElement.h"

0 commit comments

Comments
 (0)