-/* crypto/async/arch/async_posix.h */
/*
* Written by Matt Caswell (matt@openssl.org) for the OpenSSL project.
*/
* OF THE POSSIBILITY OF SUCH DAMAGE.
* ====================================================================
*/
+#ifndef OPENSSL_ASYNC_ARCH_ASYNC_POSIX_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) && !defined(OPENSSL_NO_ASYNC)
# include <unistd.h>
# define ASYNC_POSIX
# define ASYNC_ARCH
-/*
- * Some platforms complain (e.g. OS-X) that setcontext/getcontext/makecontext
- * are deprecated without the following defined. We know its deprecated but
- * there is no alternative.
- */
-# define _XOPEN_SOURCE
-# pragma GCC diagnostic ignored "-Wdeprecated-declarations"
-
# include <ucontext.h>
# include <setjmp.h>
# include "e_os.h"
return 1;
}
-# define async_fibre_makecontext(c) \
- (!getcontext(&(c)->fibre) \
- && async_fibre_init(c) \
- && (makecontext(&(c)->fibre, async_start_func, 0), 1))
# define async_fibre_init_dispatcher(d)
-int async_fibre_init(async_fibre *fibre);
+int async_fibre_makecontext(async_fibre *fibre);
void async_fibre_free(async_fibre *fibre);
# endif
#endif
+#endif /* OPENSSL_ASYNC_ARCH_ASYNC_POSIX_H */