]> granicus.if.org Git - openssl/commitdiff
Use POSIX functions on Cygwin, not Win32 function
authorCorinna Vinschen <vinschen@redhat.com>
Sat, 16 Jan 2016 18:30:48 +0000 (19:30 +0100)
committerRichard Levitte <levitte@openssl.org>
Mon, 18 Jan 2016 15:16:00 +0000 (16:16 +0100)
Signed-off-by: Corinna Vinschen <vinschen@redhat.com>
Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
apps/speed.c
crypto/async/arch/async_posix.h
crypto/async/arch/async_win.h
include/openssl/async.h
test/asynctest.c

index d45a6f9bebd92d1c2bf589011ea856663c03d465..5bf1685e4960cb526f2aa8ad32eb73d03f7f5849 100644 (file)
 # include <signal.h>
 #endif
 
-#if defined(_WIN32) || defined(__CYGWIN__)
+#if defined(_WIN32)
 # include <windows.h>
-# 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>
index c247888b671e817bcbf3c398440d31a4846ba3f4..475b56faabf5741ff913501389ea0c93ad2f515e 100644 (file)
@@ -54,7 +54,7 @@
 #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)
 
 # include <unistd.h>
 
index b247f59e48c8e6e317947b5000452e94a799c43a..31f248216f1175668e728c11f9b912cda44194ea 100644 (file)
@@ -55,7 +55,7 @@
  * 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__)
+#if defined(_WIN32)
 #include <openssl/async.h>
 # define ASYNC_WIN
 # define ASYNC_ARCH
index de5ef89644aa2ee21f043e61ddbd6bbc8f99a9f6..d130a364a75760c69bcd289ffb050cf76c6a3cfa 100644 (file)
@@ -56,7 +56,7 @@
 
 #include <stdlib.h>
 
-#if defined(_WIN32) || defined(__CYGWIN__)
+#if defined(_WIN32)
 #include <windows.h>
 #define OSSL_ASYNC_FD   HANDLE
 #else
index 3e68b1d01bc88f8e31250f69723a119c80b92e4b..ace52b93e46ef478dc87d894ae992281c2d3bd26 100644 (file)
 #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
-#elif defined(_WIN32) || defined(__CYGWIN__)
+#elif defined(_WIN32)
 # define ASYNC_WIN
 #endif