summaryrefslogtreecommitdiff
path: root/lib/locks.h
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2010-06-29 18:12:44 +0200
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2010-06-29 18:16:36 +0200
commit16aa46b90da439cd992f4067394b6f8cb4cbb1ad (patch)
tree139f6d5389d8ff41f1d85d920da068615ca0a99f /lib/locks.h
parent223a78e601447d4d82be07da7e1506809d7d0e9a (diff)
downloadgnutls-16aa46b90da439cd992f4067394b6f8cb4cbb1ad.tar.gz
simplified locking code. Locking functions always exist but are dummies if no
locks have been set.
Diffstat (limited to 'lib/locks.h')
-rw-r--r--lib/locks.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/locks.h b/lib/locks.h
index 0a91d2ffec..f76b962e58 100644
--- a/lib/locks.h
+++ b/lib/locks.h
@@ -4,6 +4,16 @@
#include <gnutls/gnutls.h>
#include <gnutls_int.h>
+#ifdef _WIN32
+# define HAVE_WIN32_LOCKS
+#else
+# ifdef HAVE_LIBPTHREAD
+# define HAVE_PTHREAD_LOCKS
+# else
+# define HAVE_NO_LOCKS
+# endif
+#endif
+
extern mutex_init_func gnutls_mutex_init;
extern mutex_deinit_func gnutls_mutex_deinit;
extern mutex_lock_func gnutls_mutex_lock;