Remove /* foo.c */ comments
[oweals/openssl.git] / crypto / async / async_locl.h
index 1a98f36b79ffa2ed2cd5443d9f8775fb543f7c34..0710f9e74cf2b6568e18e8f1994a6055a260d9e7 100644 (file)
@@ -1,4 +1,3 @@
-/* crypto/async/async_locl.h */
 /*
  * Written by Matt Caswell (matt@openssl.org) for the OpenSSL project.
  */
  * ====================================================================
  */
 
+/*
+ * Must do this before including any header files, because on MacOS/X <stlib.h>
+ * includes <signal.h> which includes <ucontext.h>
+ */
+#if defined(__APPLE__) && defined(__MACH__) && !defined(_XOPEN_SOURCE)
+# define _XOPEN_SOURCE          /* Otherwise incomplete ucontext_t structure */
+# pragma GCC diagnostic ignored "-Wdeprecated-declarations"
+#endif
+
 #include <openssl/async.h>
 #include <openssl/crypto.h>
 
@@ -78,7 +86,7 @@ struct async_job_st {
     OSSL_ASYNC_FD wake_fd;
 };
 
-DECLARE_STACK_OF(ASYNC_JOB)
+DEFINE_STACK_OF(ASYNC_JOB)
 
 struct async_pool_st {
     STACK_OF(ASYNC_JOB) *jobs;
@@ -86,6 +94,10 @@ struct async_pool_st {
     size_t max_size;
 };
 
+int async_global_init(void);
+int async_local_init(void);
+void async_local_cleanup(void);
+void async_global_cleanup(void);
 void async_start_func(void);
 int async_pipe(OSSL_ASYNC_FD *pipefds);
 int async_close_fd(OSSL_ASYNC_FD fd);