From a27e7f772b5399ea664aafc10f026b67931bf3b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Blissing?= Date: Thu, 12 Sep 2024 18:01:39 +0200 Subject: [PATCH] Prevent multiple defined _CRT_SECURE_NO_WARNINGS macro --- core/save-bmp.cpp | 2 ++ core/save-tiff.cpp | 2 ++ core/shape-description.cpp | 3 +++ ext/import-svg.cpp | 4 ++++ ext/save-png.cpp | 3 +++ main.cpp | 4 ++++ 6 files changed, 18 insertions(+) diff --git a/core/save-bmp.cpp b/core/save-bmp.cpp index bf8e8e47..d71a2a6f 100644 --- a/core/save-bmp.cpp +++ b/core/save-bmp.cpp @@ -1,5 +1,7 @@ +#ifndef _CRT_SECURE_NO_WARNINGS #define _CRT_SECURE_NO_WARNINGS +#endif #include "save-bmp.h" diff --git a/core/save-tiff.cpp b/core/save-tiff.cpp index 62c379c6..2c400d5d 100644 --- a/core/save-tiff.cpp +++ b/core/save-tiff.cpp @@ -1,5 +1,7 @@ +#ifndef _CRT_SECURE_NO_WARNINGS #define _CRT_SECURE_NO_WARNINGS +#endif #include "save-tiff.h" diff --git a/core/shape-description.cpp b/core/shape-description.cpp index c2664d54..639ffa18 100644 --- a/core/shape-description.cpp +++ b/core/shape-description.cpp @@ -1,5 +1,8 @@ +#ifndef _CRT_SECURE_NO_WARNINGS #define _CRT_SECURE_NO_WARNINGS +#endif + #include "shape-description.h" #include diff --git a/ext/import-svg.cpp b/ext/import-svg.cpp index 6a696ffd..8a445288 100644 --- a/ext/import-svg.cpp +++ b/ext/import-svg.cpp @@ -1,6 +1,10 @@ #define _USE_MATH_DEFINES + +#ifndef _CRT_SECURE_NO_WARNINGS #define _CRT_SECURE_NO_WARNINGS +#endif + #include "import-svg.h" #ifndef MSDFGEN_DISABLE_SVG diff --git a/ext/save-png.cpp b/ext/save-png.cpp index cfbb1b7d..976cb966 100644 --- a/ext/save-png.cpp +++ b/ext/save-png.cpp @@ -1,5 +1,8 @@ +#ifndef _CRT_SECURE_NO_WARNINGS #define _CRT_SECURE_NO_WARNINGS +#endif + #include "save-png.h" #include diff --git a/main.cpp b/main.cpp index 6dc20d07..129bcffb 100644 --- a/main.cpp +++ b/main.cpp @@ -9,7 +9,11 @@ #ifdef MSDFGEN_STANDALONE #define _USE_MATH_DEFINES + +#ifndef _CRT_SECURE_NO_WARNINGS #define _CRT_SECURE_NO_WARNINGS +#endif + #include #include #include