From 23642b3b6b980bfd0167cd1418992368f8b9b963 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Adjemian=20=28Charybdis=29?= Date: Wed, 30 Nov 2016 22:18:44 +0100 Subject: [PATCH] Defines M_PI, M_SQRT2 and finite() in bytecode... ... Which are not in standard C/C++ (otherwise compilation of the mex for Octave with -std=c++11 fails). --- mex/sources/bytecode/ErrorHandling.hh | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/mex/sources/bytecode/ErrorHandling.hh b/mex/sources/bytecode/ErrorHandling.hh index ecb343380..760d0ec7c 100644 --- a/mex/sources/bytecode/ErrorHandling.hh +++ b/mex/sources/bytecode/ErrorHandling.hh @@ -143,6 +143,19 @@ class MSVCpp_missings }; #endif +#ifdef __MINGW32__ +#define __CROSS_COMPILATION__ +#endif + +#ifdef __MINGW64__ +#define __CROSS_COMPILATION__ +#endif + +#ifdef __CROSS_COMPILATION__ +#define M_PI 3.14159265358979323846 +#define M_SQRT2 1.41421356237309504880 +#define finite(x) !std::isfinite(x) +#endif //#define DEBUG using namespace std;