PolarSSL: pthread support for entropy

Added pthread support for polarssl entropy if --enable-threaded-resolver
config flag is set and pthread.h can be found.
This commit is contained in:
Willem Sparreboom
2013-01-28 18:31:22 +01:00
committed by Daniel Stenberg
parent db3f3c14f2
commit c35a10483d
5 changed files with 249 additions and 17 deletions

View File

@@ -25,6 +25,11 @@
#ifdef USE_POLARSSL
/* Called on first use PolarSSL, setup threading if supported */
int polarssl_init(void);
void polarssl_cleanup(void);
CURLcode Curl_polarssl_connect(struct connectdata *conn, int sockindex);
CURLcode Curl_polarssl_connect_nonblocking(struct connectdata *conn,
@@ -43,8 +48,8 @@ size_t Curl_polarssl_version(char *buffer, size_t size);
int Curl_polarssl_shutdown(struct connectdata *conn, int sockindex);
/* API setup for PolarSSL */
#define curlssl_init() (1)
#define curlssl_cleanup() Curl_nop_stmt
#define curlssl_init() polarssl_init()
#define curlssl_cleanup() polarssl_cleanup()
#define curlssl_connect Curl_polarssl_connect
#define curlssl_connect_nonblocking Curl_polarssl_connect_nonblocking
#define curlssl_session_free(x) Curl_polarssl_session_free(x)