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)