Use POSIX functions on Cygwin, not Win32 function
Signed-off-by: Corinna Vinschen <vinschen@redhat.com> Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org>
This commit is contained in:
parent
23d526eca9
commit
8d35ceb98f
10
apps/speed.c
10
apps/speed.c
@ -94,16 +94,8 @@
|
|||||||
# include <signal.h>
|
# include <signal.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(_WIN32) || defined(__CYGWIN__)
|
#if defined(_WIN32)
|
||||||
# include <windows.h>
|
# 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
|
#endif
|
||||||
|
|
||||||
#include <openssl/bn.h>
|
#include <openssl/bn.h>
|
||||||
|
@ -54,7 +54,7 @@
|
|||||||
#define OPENSSL_ASYNC_ARCH_ASYNC_POSIX_H
|
#define OPENSSL_ASYNC_ARCH_ASYNC_POSIX_H
|
||||||
#include <openssl/e_os2.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>
|
# include <unistd.h>
|
||||||
|
|
||||||
|
@ -55,7 +55,7 @@
|
|||||||
* This is the same detection used in cryptlib to set up the thread local
|
* This is the same detection used in cryptlib to set up the thread local
|
||||||
* storage that we depend on, so just copy that
|
* storage that we depend on, so just copy that
|
||||||
*/
|
*/
|
||||||
#if defined(_WIN32) || defined(__CYGWIN__)
|
#if defined(_WIN32)
|
||||||
#include <openssl/async.h>
|
#include <openssl/async.h>
|
||||||
# define ASYNC_WIN
|
# define ASYNC_WIN
|
||||||
# define ASYNC_ARCH
|
# define ASYNC_ARCH
|
||||||
|
@ -56,7 +56,7 @@
|
|||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
#if defined(_WIN32) || defined(__CYGWIN__)
|
#if defined(_WIN32)
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#define OSSL_ASYNC_FD HANDLE
|
#define OSSL_ASYNC_FD HANDLE
|
||||||
#else
|
#else
|
||||||
|
@ -62,12 +62,12 @@
|
|||||||
#include <openssl/crypto.h>
|
#include <openssl/crypto.h>
|
||||||
#include <../apps/apps.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>
|
# include <unistd.h>
|
||||||
# if _POSIX_VERSION >= 200112L
|
# if _POSIX_VERSION >= 200112L
|
||||||
# define ASYNC_POSIX
|
# define ASYNC_POSIX
|
||||||
# endif
|
# endif
|
||||||
#elif defined(_WIN32) || defined(__CYGWIN__)
|
#elif defined(_WIN32)
|
||||||
# define ASYNC_WIN
|
# define ASYNC_WIN
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user