Windows build: Fix AppVeyor build

This commit is contained in:
Shahram Najm 2022-12-26 15:24:20 +00:00
parent 7694e418bb
commit 0dd6764d7b
2 changed files with 2 additions and 3 deletions

View File

@ -339,13 +339,10 @@ if( EC_OS_NAME MATCHES "windows" )
# Suppress warnings about using 'insecure' functions. Fixing this would require changes all over
# the codebase which would damage portability.
ecbuild_add_c_flags("/D_CRT_SECURE_NO_WARNINGS")
ecbuild_add_cxx_flags("/D_CRT_SECURE_NO_WARNINGS")
# Suppress warnings about using well-known C functions.
ecbuild_add_c_flags("/D_CRT_NONSTDC_NO_DEPRECATE")
ecbuild_add_cxx_flags("/D_CRT_NONSTDC_NO_DEPRECATE")
# Suppress C4267: warns about possible loss of data when converting 'size_t' to 'int'.
ecbuild_add_c_flags("/wd4267")
ecbuild_add_cxx_flags("/wd4267")
endif()
###############################################################################

View File

@ -96,6 +96,8 @@ 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)