diff --git a/crypto/bio/file.c b/crypto/bio/file.c index 5d4613178..cef33b666 100644 --- a/crypto/bio/file.c +++ b/crypto/bio/file.c @@ -88,7 +88,7 @@ #define BIO_FP_APPEND 0x08 static FILE *open_file(const char *filename, const char *mode) { -#if defined(_WIN32) && defined(CP_UTF8) +#if defined(OPENSSL_WINDOWS) && defined(CP_UTF8) int sz, len_0 = (int)strlen(filename) + 1; DWORD flags; diff --git a/crypto/err/err.c b/crypto/err/err.c index 417d3227e..24824e833 100644 --- a/crypto/err/err.c +++ b/crypto/err/err.c @@ -633,7 +633,7 @@ void ERR_put_error(int library, int reason, const char *function, } if (library == ERR_LIB_SYS && reason == 0) { -#if defined(WIN32) +#if defined(OPENSSL_WINDOWS) reason = GetLastError(); #else reason = errno; diff --git a/include/openssl/base.h b/include/openssl/base.h index 4618ed202..de14ff474 100644 --- a/include/openssl/base.h +++ b/include/openssl/base.h @@ -98,7 +98,7 @@ extern "C" { #define OPENSSL_APPLE #endif -#if defined(WIN32) || defined(_WIN32) +#if defined(_WIN32) #define OPENSSL_WINDOWS #endif