[openssl-commits] [openssl] master update
Richard Levitte
levitte at openssl.org
Thu Jan 18 13:48:24 UTC 2018
The branch master has been updated
via e44c7d02ddac975ec6abff7901e77a0c37f9949d (commit)
via 4d3c278c1a4f940e098edac6de3d370b94d1bb8b (commit)
via 6ce66ce073b19af46fd94f4eefdb7c4772d7dd6f (commit)
via 33cebb9c0dd6115bc357b5097f7db82b64b10919 (commit)
from e02d5886636095c26a8bff1bf8344bd0bba7ccff (commit)
- Log -----------------------------------------------------------------
commit e44c7d02ddac975ec6abff7901e77a0c37f9949d
Author: Richard Levitte <levitte at openssl.org>
Date: Thu Jan 18 14:05:33 2018 +0100
Only implement secure malloc if _POSIX_VERSION allows
Reviewed-by: Andy Polyakov <appro at openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5060)
commit 4d3c278c1a4f940e098edac6de3d370b94d1bb8b
Author: Richard Levitte <levitte at openssl.org>
Date: Mon Jan 15 19:05:01 2018 +0100
The Cygwin gcc doesn't define _WIN32, don't pretend it does
Reviewed-by: Andy Polyakov <appro at openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5060)
commit 6ce66ce073b19af46fd94f4eefdb7c4772d7dd6f
Author: Richard Levitte <levitte at openssl.org>
Date: Mon Jan 15 19:04:17 2018 +0100
Simplify Cygwin checks, part 1
Because OPENSSL_SYS_CYGWIN will keep OPENSSL_SYS_UNIX defined, there's
no point having checks of this form:
#if (defined(OPENSSL_SYS_UNIX) || defined(OPENSSL_SYS_CYGWIN))
Reviewed-by: Andy Polyakov <appro at openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5060)
commit 33cebb9c0dd6115bc357b5097f7db82b64b10919
Author: Richard Levitte <levitte at openssl.org>
Date: Thu Jan 11 22:01:44 2018 +0100
Cygwin is POSIX, don't say it isn't
More to the point, Cygwin is a POSIX API. In our library, the use of
a POSIX API is marked by defining the macro OPENSSL_SYS_UNIX.
Therefore, that macro shouldn't be undefined when building for Cygwin.
Reviewed-by: Andy Polyakov <appro at openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5060)
-----------------------------------------------------------------------
Summary of changes:
crypto/async/arch/async_posix.h | 2 +-
crypto/cryptlib.c | 4 ++--
crypto/mem_sec.c | 4 +++-
engines/e_dasync.c | 2 +-
include/openssl/e_os2.h | 1 -
5 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/crypto/async/arch/async_posix.h b/crypto/async/arch/async_posix.h
index 4d88bd1..3465815 100644
--- a/crypto/async/arch/async_posix.h
+++ b/crypto/async/arch/async_posix.h
@@ -11,7 +11,7 @@
#define OPENSSL_ASYNC_ARCH_ASYNC_POSIX_H
#include <openssl/e_os2.h>
-#if (defined(OPENSSL_SYS_UNIX) || defined(OPENSSL_SYS_CYGWIN)) \
+#if defined(OPENSSL_SYS_UNIX) \
&& defined(OPENSSL_THREADS) && !defined(OPENSSL_NO_ASYNC) \
&& !defined(__ANDROID__) && !defined(__OpenBSD__)
diff --git a/crypto/cryptlib.c b/crypto/cryptlib.c
index c2bd219..3a2b733 100644
--- a/crypto/cryptlib.c
+++ b/crypto/cryptlib.c
@@ -105,7 +105,7 @@ void OPENSSL_cpuid_setup(void)
}
#endif
-#if defined(_WIN32) && !defined(__CYGWIN__)
+#if defined(_WIN32)
# include <tchar.h>
# include <signal.h>
# ifdef __WATCOMC__
@@ -320,7 +320,7 @@ void OPENSSL_die(const char *message, const char *file, int line)
{
OPENSSL_showfatal("%s:%d: OpenSSL internal error: %s\n",
file, line, message);
-#if !defined(_WIN32) || defined(__CYGWIN__)
+#if !defined(_WIN32)
abort();
#else
/*
diff --git a/crypto/mem_sec.c b/crypto/mem_sec.c
index 0c24ed8..87c19a1 100644
--- a/crypto/mem_sec.c
+++ b/crypto/mem_sec.c
@@ -20,7 +20,9 @@
#include <string.h>
-#if defined(OPENSSL_SYS_LINUX) || defined(OPENSSL_SYS_UNIX)
+/* e_os.h includes unistd.h, which defines _POSIX_VERSION */
+#if defined(OPENSSL_SYS_UNIX) \
+ && defined(_POSIX_VERSION) && _POSIX_VERSION >= 200112L
# define IMPLEMENTED
# include <stdlib.h>
# include <assert.h>
diff --git a/engines/e_dasync.c b/engines/e_dasync.c
index 6fc7a7d..d6d1b58 100644
--- a/engines/e_dasync.c
+++ b/engines/e_dasync.c
@@ -25,7 +25,7 @@
#include <openssl/ssl.h>
#include <openssl/modes.h>
-#if (defined(OPENSSL_SYS_UNIX) || defined(OPENSSL_SYS_CYGWIN)) && defined(OPENSSL_THREADS)
+#if defined(OPENSSL_SYS_UNIX) && defined(OPENSSL_THREADS)
# undef ASYNC_POSIX
# define ASYNC_POSIX
# include <unistd.h>
diff --git a/include/openssl/e_os2.h b/include/openssl/e_os2.h
index 746dd8f..f334863 100644
--- a/include/openssl/e_os2.h
+++ b/include/openssl/e_os2.h
@@ -49,7 +49,6 @@ extern "C" {
# define OPENSSL_SYS_WIN32_UWIN
# else
# if defined(__CYGWIN__) || defined(OPENSSL_SYS_CYGWIN)
-# undef OPENSSL_SYS_UNIX
# define OPENSSL_SYS_WIN32_CYGWIN
# else
# if defined(_WIN32) || defined(OPENSSL_SYS_WIN32)
More information about the openssl-commits
mailing list