34 lines
883 B
Diff
34 lines
883 B
Diff
From: "Matteo F. Vescovi" <mfv@debian.org>
|
|
Date: Mon, 25 Jul 2016 22:17:43 +0200
|
|
Subject: fix_gcc6_issue
|
|
|
|
---
|
|
src/util/math.h | 12 ++++++++++++
|
|
1 file changed, 12 insertions(+)
|
|
|
|
diff --git a/src/util/math.h b/src/util/math.h
|
|
index 018335e..85971d1 100644
|
|
--- src/util/math.h
|
|
+++ src/util/math.h
|
|
@@ -3,8 +3,20 @@
|
|
|
|
// Causes MSVC to define M_PI and friends.
|
|
// http://msdn.microsoft.com/en-us/library/4hwaceh6.aspx
|
|
+// Our SConscript defines this but check anyway.
|
|
+#ifdef __WINDOWS__
|
|
+#ifndef _USE_MATH_DEFINES
|
|
#define _USE_MATH_DEFINES
|
|
+#endif
|
|
+#endif
|
|
+
|
|
+#include <math.h>
|
|
#include <cmath>
|
|
+// Note: Because of our fpclassify hack, we actualy need to inlude both,
|
|
+// the c and the c++ version of the math header.
|
|
+// From GCC 6.1.1 math.h depends on cmath, which failes to compile if included
|
|
+// after our fpclassify hack
|
|
+
|
|
#include <algorithm>
|
|
|
|
#include "util/assert.h"
|