summaryrefslogtreecommitdiff
path: root/crypto
diff options
context:
space:
mode:
authoraSoujyuTanaka <soujyu.tanaka@access-company.com>2020-04-12 04:10:57 +0900
committerRichard Levitte <levitte@openssl.org>2020-07-15 23:03:22 +0200
commitc35b8535768e22cd3b7743f4887a72e53a621a5f (patch)
treee1c7c98e196ea7c071dbc062e08d9aee898d2319 /crypto
parenta1736f37aee855fecf463b9f15519e12c333ecfc (diff)
downloadopenssl-new-c35b8535768e22cd3b7743f4887a72e53a621a5f.tar.gz
Enable WinCE build without deceiving _MSC_VER.
Reviewed-by: Mark J. Cox <mark@awe.com> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/11526)
Diffstat (limited to 'crypto')
-rw-r--r--crypto/o_str.c2
-rw-r--r--crypto/o_time.c2
-rw-r--r--crypto/rand/randfile.c2
3 files changed, 3 insertions, 3 deletions
diff --git a/crypto/o_str.c b/crypto/o_str.c
index 8aa1a2a4dd..cfc401427d 100644
--- a/crypto/o_str.c
+++ b/crypto/o_str.c
@@ -287,7 +287,7 @@ char *OPENSSL_buf2hexstr(const unsigned char *buf, long buflen)
int openssl_strerror_r(int errnum, char *buf, size_t buflen)
{
-#if defined(_MSC_VER) && _MSC_VER>=1400
+#if defined(_MSC_VER) && _MSC_VER>=1400 && !defined(_WIN32_WCE)
return !strerror_s(buf, buflen, errnum);
#elif defined(_GNU_SOURCE)
char *err;
diff --git a/crypto/o_time.c b/crypto/o_time.c
index f0e3e472e0..695f5c2938 100644
--- a/crypto/o_time.c
+++ b/crypto/o_time.c
@@ -41,7 +41,7 @@ struct tm *OPENSSL_gmtime(const time_t *timer, struct tm *result)
if (gmtime_r(timer, result) == NULL)
return NULL;
ts = result;
-#elif defined (OPENSSL_SYS_WINDOWS) && defined(_MSC_VER) && _MSC_VER >= 1400
+#elif defined (OPENSSL_SYS_WINDOWS) && defined(_MSC_VER) && _MSC_VER >= 1400 && !defined(_WIN32_WCE)
if (gmtime_s(result, timer))
return NULL;
ts = result;
diff --git a/crypto/rand/randfile.c b/crypto/rand/randfile.c
index 7dde54b187..cbc2720918 100644
--- a/crypto/rand/randfile.c
+++ b/crypto/rand/randfile.c
@@ -26,7 +26,7 @@
#ifndef OPENSSL_NO_POSIX_IO
# include <sys/stat.h>
# include <fcntl.h>
-# ifdef _WIN32
+# if defined(_WIN32) && !defined(_WIN32_WCE)
# include <windows.h>
# include <io.h>
# define stat _stat