From 650dba47fc4383cbe1d61a9dfb0c317dbb41e41d Mon Sep 17 00:00:00 2001 From: Andrew Hutchings Date: Fri, 23 Sep 2016 17:28:41 -0500 Subject: [PATCH] Fix build issues Fix jemalloc issues and a namespace issue --- CMakeLists.txt | 5 +++-- dbcon/execplan/treenode.h | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 74805c282..63ed8b563 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -75,9 +75,10 @@ if (NOT NETSNMP_FOUND) MESSAGE(FATAL_ERROR "Could not find net-snmp!") endif() -INCLUDE (FindJeMalloc) +INCLUDE (FindJeMalloc.cmake) if (NOT JEMALLOC_FOUND) - message(WARNING "jemalloc not found! Compiling with standard malloc") + message(NOTICE "jemalloc not found! Compiling with standard malloc") + SET(JEMALLOC_LIBRARIES "") endif() FIND_PROGRAM(AWK_EXECUTABLE awk DOC "path to the awk executable") diff --git a/dbcon/execplan/treenode.h b/dbcon/execplan/treenode.h index 1f1166fa3..db6302530 100644 --- a/dbcon/execplan/treenode.h +++ b/dbcon/execplan/treenode.h @@ -485,7 +485,7 @@ inline const std::string& TreeNode::getStrVal() // MCOL-299 Print scientific with 5 mantissa and no + sign for exponent int exponent = (int)floor(log10( fabs(fResult.floatVal))); // This will round down the exponent double base = fResult.floatVal * pow(10, -1.0*exponent); - if (isnan(exponent) || isnan(base)) + if (std::isnan(exponent) || std::isnan(base)) { snprintf(tmp, 312, "%f", fResult.floatVal); fResult.strVal = removeTrailing0(tmp, 312); @@ -517,7 +517,7 @@ inline const std::string& TreeNode::getStrVal() // MCOL-299 Print scientific with 9 mantissa and no + sign for exponent int exponent = (int)floor(log10( fabs(fResult.doubleVal))); // This will round down the exponent double base = fResult.doubleVal * pow(10, -1.0*exponent); - if (isnan(exponent) || isnan(base)) + if (std::isnan(exponent) || std::isnan(base)) { snprintf(tmp, 312, "%f", fResult.doubleVal); fResult.strVal = removeTrailing0(tmp, 312);