From d47fcdc34902e3adae786d2b7a977f962767e8ec Mon Sep 17 00:00:00 2001 From: Joshua Warner Date: Tue, 29 Jul 2014 19:29:29 -0600 Subject: [PATCH] fix ubuntu precise mingw math.h problems --- classpath/java-lang.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/classpath/java-lang.cpp b/classpath/java-lang.cpp index ae378e45d1..9784f127a3 100644 --- a/classpath/java-lang.cpp +++ b/classpath/java-lang.cpp @@ -8,7 +8,6 @@ There is NO WARRANTY for this software. See license.txt for details. */ -#include "math.h" #include "stdlib.h" #include "time.h" #include "string.h" @@ -19,6 +18,11 @@ #include "fcntl.h" #include "ctype.h" +// Make sure M_* constants (in particular M_E) are exposed in math.h. +// This was a problem on the default mingw install on ubuntu precise +#undef __STRICT_ANSI__ +#include "math.h" + #ifdef PLATFORM_WINDOWS #include "windows.h"