diff options
author | Brian Smith <brian@briansmith.org> | 2015-07-31 23:11:31 +0300 |
---|---|---|
committer | Adam Langley <agl@google.com> | 2015-08-01 01:34:34 +0300 |
commit | 8a36e53abbf8560054c711c052b0a50c45d8a69a (patch) | |
tree | b54febe577b21a0e5e765188dd25ac035b479c55 /crypto/err | |
parent | b748373286adf65d22fd7f937125fc9b7a57ffac (diff) |
Avoid using |WIN32| and use |OPENSSL_WINDOWS| instead.
MSVC and clang-cl automatically define |_WIN32| but |WIN32| is only
defined if a Windows header file has been included or if -DWIN32 was
passed on the command line. Thus, it is always better to test |_WIN32|
than |WIN32|. The convention in BoringSSL is to test |OPENSSL_WINDOWS|
instead, except for the place where |OPENSSL_WINDOWS| is defined.
Change-Id: Icf3e03958895be32efe800e689d5ed6a2fed215f
Reviewed-on: https://boringssl-review.googlesource.com/5553
Reviewed-by: David Benjamin <davidben@chromium.org>
Reviewed-by: Adam Langley <agl@google.com>
Diffstat (limited to 'crypto/err')
-rw-r--r-- | crypto/err/err.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/err/err.c b/crypto/err/err.c index 417d3227..24824e83 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; |