summaryrefslogtreecommitdiffstats
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:09:24 +0200
commite21519280b3c3e0b264632fd72ce503a9d9ced73 (patch)
treeef0334565fe91d5b3d5f8a11347f8c268571c5ea
parentbe4c4237ce26d1f484add07e6e34e2650c7b7102 (diff)
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) (cherry picked from commit c35b8535768e22cd3b7743f4887a72e53a621a5f)
-rw-r--r--crypto/o_str.c2
-rw-r--r--crypto/o_time.c2
-rw-r--r--crypto/rand/randfile.c2
-rw-r--r--e_os.h2
-rw-r--r--include/openssl/e_os2.h2
5 files changed, 5 insertions, 5 deletions
diff --git a/crypto/o_str.c b/crypto/o_str.c
index 9ad7a89dca..2d321045bd 100644
--- a/crypto/o_str.c
+++ b/crypto/o_str.c
@@ -220,7 +220,7 @@ char *OPENSSL_buf2hexstr(const unsigned char *buffer, long len)
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 6d764f55e2..d990556d1e 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 ba121eefbf..af6cd385c7 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
diff --git a/e_os.h b/e_os.h
index 34223a0bcd..9af7f3758d 100644
--- a/e_os.h
+++ b/e_os.h
@@ -308,7 +308,7 @@ extern FILE *_imp___iob;
# if defined(OPENSSL_SYS_WINDOWS)
# define strcasecmp _stricmp
# define strncasecmp _strnicmp
-# if (_MSC_VER >= 1310)
+# if (_MSC_VER >= 1310) && !defined(_WIN32_WCE)
# define open _open
# define fdopen _fdopen
# define close _close
diff --git a/include/openssl/e_os2.h b/include/openssl/e_os2.h
index 97a776cdac..c7e637c4a4 100644
--- a/include/openssl/e_os2.h
+++ b/include/openssl/e_os2.h
@@ -241,7 +241,7 @@ typedef UINT64 uint64_t;
defined(__osf__) || defined(__sgi) || defined(__hpux) || \
defined(OPENSSL_SYS_VMS) || defined (__OpenBSD__)
# include <inttypes.h>
-# elif defined(_MSC_VER) && _MSC_VER<=1500
+# elif defined(_MSC_VER) && _MSC_VER<1600
/*
* minimally required typdefs for systems not supporting inttypes.h or
* stdint.h: currently just older VC++