aboutsummaryrefslogtreecommitdiffstats
path: root/lib/curl_threads.h
diff options
context:
space:
mode:
authorBertrand SIMONNET <bsimonnet@google.com>2015-07-01 15:39:44 -0700
committerBertrand SIMONNET <bsimonnet@google.com>2015-07-08 10:51:12 -0700
commite6cd738ed3716c02557fb3a47515244e949ade39 (patch)
tree8d093306c27b850f828317ed67d6efea3ec7e084 /lib/curl_threads.h
parentd43abe883892fe84137052fd27ecd956a2c7cacf (diff)
downloadexternal_curl-e6cd738ed3716c02557fb3a47515244e949ade39.tar.gz
external_curl-e6cd738ed3716c02557fb3a47515244e949ade39.tar.bz2
external_curl-e6cd738ed3716c02557fb3a47515244e949ade39.zip
Import curl 7.43
This is a simple import of curl 7.43. The only change from the official release is the fact that the Android.mk was removed to avoid build error trying to parse it. BUG: 22347561 Change-Id: I52ef6798d30b25d22d1f62770d571adec8bcf4d5
Diffstat (limited to 'lib/curl_threads.h')
-rw-r--r--lib/curl_threads.h15
1 files changed, 10 insertions, 5 deletions
diff --git a/lib/curl_threads.h b/lib/curl_threads.h
index ba81054a..0f3191ab 100644
--- a/lib/curl_threads.h
+++ b/lib/curl_threads.h
@@ -7,7 +7,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -21,13 +21,13 @@
* KIND, either express or implied.
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
#if defined(USE_THREADS_POSIX)
# define CURL_STDCALL
# define curl_mutex_t pthread_mutex_t
-# define curl_thread_t pthread_t
-# define curl_thread_t_null (pthread_t)0
+# define curl_thread_t pthread_t *
+# define curl_thread_t_null (pthread_t *)0
# define Curl_mutex_init(m) pthread_mutex_init(m, NULL)
# define Curl_mutex_acquire(m) pthread_mutex_lock(m)
# define Curl_mutex_release(m) pthread_mutex_unlock(m)
@@ -37,7 +37,12 @@
# define curl_mutex_t CRITICAL_SECTION
# define curl_thread_t HANDLE
# define curl_thread_t_null (HANDLE)0
-# define Curl_mutex_init(m) InitializeCriticalSection(m)
+# if !defined(_WIN32_WINNT) || !defined(_WIN32_WINNT_VISTA) || \
+ (_WIN32_WINNT < _WIN32_WINNT_VISTA)
+# define Curl_mutex_init(m) InitializeCriticalSection(m)
+# else
+# define Curl_mutex_init(m) InitializeCriticalSectionEx(m, 0, 1)
+# endif
# define Curl_mutex_acquire(m) EnterCriticalSection(m)
# define Curl_mutex_release(m) LeaveCriticalSection(m)
# define Curl_mutex_destroy(m) DeleteCriticalSection(m)