Signed-off-by: Corinna Vinschen <vinschen@redhat.com>
Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
# include <signal.h>
#endif
# include <signal.h>
#endif
-#if defined(_WIN32) || defined(__CYGWIN__)
-# if defined(__CYGWIN__) && !defined(_WIN32)
- /*
- * <windows.h> should define _WIN32, which normally is mutually exclusive
- * with __CYGWIN__, but if it didn't...
- */
-# define _WIN32
- /* this is done because Cygwin alarm() fails sometimes. */
-# endif
#endif
#include <openssl/bn.h>
#endif
#include <openssl/bn.h>
#define OPENSSL_ASYNC_ARCH_ASYNC_POSIX_H
#include <openssl/e_os2.h>
#define OPENSSL_ASYNC_ARCH_ASYNC_POSIX_H
#include <openssl/e_os2.h>
-#if defined(OPENSSL_SYS_UNIX) && defined(OPENSSL_THREADS)
+#if (defined(OPENSSL_SYS_UNIX) || defined(OPENSSL_SYS_CYGWIN)) && defined(OPENSSL_THREADS)
* This is the same detection used in cryptlib to set up the thread local
* storage that we depend on, so just copy that
*/
* This is the same detection used in cryptlib to set up the thread local
* storage that we depend on, so just copy that
*/
-#if defined(_WIN32) || defined(__CYGWIN__)
#include <openssl/async.h>
# define ASYNC_WIN
# define ASYNC_ARCH
#include <openssl/async.h>
# define ASYNC_WIN
# define ASYNC_ARCH
-#if defined(_WIN32) || defined(__CYGWIN__)
#include <windows.h>
#define OSSL_ASYNC_FD HANDLE
#else
#include <windows.h>
#define OSSL_ASYNC_FD HANDLE
#else
#include <openssl/crypto.h>
#include <../apps/apps.h>
#include <openssl/crypto.h>
#include <../apps/apps.h>
-#if defined(OPENSSL_SYS_UNIX) && defined(OPENSSL_THREADS)
+#if (defined(OPENSSL_SYS_UNIX) || defined(OPENSSL_SYS_CYGWIN)) && defined(OPENSSL_THREADS)
# include <unistd.h>
# if _POSIX_VERSION >= 200112L
# define ASYNC_POSIX
# endif
# include <unistd.h>
# if _POSIX_VERSION >= 200112L
# define ASYNC_POSIX
# endif
-#elif defined(_WIN32) || defined(__CYGWIN__)
# define ASYNC_WIN
#endif
# define ASYNC_WIN
#endif