From 35e9099e85b1ab608e5fc9ae6318dfa2ad987dcb Mon Sep 17 00:00:00 2001 From: BenceJanosSzabo <bence.janos.szabo@ericsson.com> Date: Mon, 12 Dec 2016 13:03:06 +0100 Subject: [PATCH] Solaris NAN and INFINITY fix Change-Id: I51b963674ce11935c0a556925fe3755102da0238 Signed-off-by: BenceJanosSzabo <bence.janos.szabo@ericsson.com> --- core/config_process.l | 5 +++++ mctr2/cli/config_read.l | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/core/config_process.l b/core/config_process.l index 7f3265ae6..42a98aee3 100644 --- a/core/config_process.l +++ b/core/config_process.l @@ -53,6 +53,11 @@ #include "../common/dbgnew.hh" +#ifndef INFINITY +#include <float.h> +static const double INFINITY = (DBL_MAX*DBL_MAX); +#endif + #include "Profiler.hh" extern string_map_t *config_defines; diff --git a/mctr2/cli/config_read.l b/mctr2/cli/config_read.l index cc70a5fa6..606cde048 100644 --- a/mctr2/cli/config_read.l +++ b/mctr2/cli/config_read.l @@ -51,6 +51,11 @@ //#include "../../common/dbgnew.hh" +#ifndef INFINITY +#include <float.h> +static const double INFINITY = (DBL_MAX*DBL_MAX); +#endif + extern string_map_t *config_defines; #define yylval config_read_lval -- GitLab