summaryrefslogtreecommitdiffstats
path: root/Source/cmMathCommand.cxx
diff options
context:
space:
mode:
authorDaniel Franke <franke@edf-online.de>2018-05-18 19:59:46 (GMT)
committerBrad King <brad.king@kitware.com>2018-06-22 13:00:34 (GMT)
commit5b0f73a15a7b49461123a969bbebceff4284df9c (patch)
treefb9b32ce694a969018ffb0edf604227ea6a7a630 /Source/cmMathCommand.cxx
parent963b8d9f6c1c4bcce2a82ade137a82b17ef75780 (diff)
downloadCMake-5b0f73a15a7b49461123a969bbebceff4284df9c.zip
CMake-5b0f73a15a7b49461123a969bbebceff4284df9c.tar.gz
CMake-5b0f73a15a7b49461123a969bbebceff4284df9c.tar.bz2
math: Use 64-bit integer type for computation
Diffstat (limited to 'Source/cmMathCommand.cxx')
-rw-r--r--Source/cmMathCommand.cxx7
1 files changed, 4 insertions, 3 deletions
diff --git a/Source/cmMathCommand.cxx b/Source/cmMathCommand.cxx
index c1cd1b6..f0945b2 100644
--- a/Source/cmMathCommand.cxx
+++ b/Source/cmMathCommand.cxx
@@ -2,10 +2,11 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmMathCommand.h"
-#include <stdio.h>
-
#include "cmExprParserHelper.h"
#include "cmMakefile.h"
+#include "cm_kwiml.h"
+
+#include <stdio.h>
class cmExecutionStatus;
@@ -44,7 +45,7 @@ bool cmMathCommand::HandleExprCommand(std::vector<std::string> const& args)
}
char buffer[1024];
- sprintf(buffer, "%d", helper.GetResult());
+ sprintf(buffer, "%" KWIML_INT_PRId64, helper.GetResult());
this->Makefile->AddDefinition(outputVariable, buffer);
return true;