From a214a35be724887851c345fc04dde18c93d797a3 Mon Sep 17 00:00:00 2001 From: Shahram Najm Date: Mon, 26 Dec 2022 15:39:21 +0000 Subject: [PATCH] Windows build: Fix AppVeyor build --- src/grib_api_internal.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/grib_api_internal.h b/src/grib_api_internal.h index 553a44374..5bd5fb053 100644 --- a/src/grib_api_internal.h +++ b/src/grib_api_internal.h @@ -55,6 +55,11 @@ extern "C" { #endif #endif +#ifdef ECCODES_ON_WINDOWS + #define _CRT_SECURE_NO_WARNINGS + #define _CRT_NONSTDC_NO_DEPRECATE +#endif + #include #include #include @@ -96,8 +101,6 @@ extern "C" { #define mkdir(dirname, mode) _mkdir(dirname) #ifdef _MSC_VER - #define _CRT_SECURE_NO_WARNINGS - #define _CRT_NONSTDC_NO_DEPRECATE #define access(path, mode) _access(path, mode) #define chmod(path, mode) _chmod(path, mode) #define strdup(str) _strdup(str)