From 993b4917861962a698020ce783c10f55c20edb58 Mon Sep 17 00:00:00 2001 From: anders_k Date: Wed, 31 Oct 2018 20:07:01 +0000 Subject: [PATCH] Added dummy CRT stubs for VS 2010-15 (bug #1159) git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@7032 212acab6-be3b-0410-9dea-997c60f758d6 --- Contrib/Library/RegTool/RegTool.cpp | 4 ++++ Contrib/MakeLangId/MakeLangId.cpp | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/Contrib/Library/RegTool/RegTool.cpp b/Contrib/Library/RegTool/RegTool.cpp index 7de36d4e..136eb2b8 100644 --- a/Contrib/Library/RegTool/RegTool.cpp +++ b/Contrib/Library/RegTool/RegTool.cpp @@ -6,6 +6,10 @@ #define STR_SIZE 1024 +#if defined(_MSC_VER) && _MSC_VER-0 >= 1600 && _MSC_VER-0 <= 1800 // MSVC complains about math stuff we are not even using (bug #1159) +EXTERN_C int _fltused = 0; +EXTERN_C double _hypot(double x, double y) { return 0.0; } +#endif /* All A/W functions need this ugly hack so we can call them in template functions. diff --git a/Contrib/MakeLangId/MakeLangId.cpp b/Contrib/MakeLangId/MakeLangId.cpp index 69453211..4b426f01 100644 --- a/Contrib/MakeLangId/MakeLangId.cpp +++ b/Contrib/MakeLangId/MakeLangId.cpp @@ -28,6 +28,11 @@ https://wayback.archive.org/web/20021221200122/http://msdn.microsoft.com/library #include #include "resource.h" +#if defined(_MSC_VER) && _MSC_VER-0 >= 1600 && _MSC_VER-0 <= 1800 // MSVC complains about math stuff we are not even using (bug #1159) +EXTERN_C int _fltused = 0; +EXTERN_C double _hypot(double x, double y) { return 0.0; } +#endif + #ifndef LOCALE_SNAME #define LOCALE_SNAME 0x005C #endif