From 802103911a1c0c9407203457da94a550c57b4dbf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Love=20H=C3=B6rnquist=20=C3=85strand?= Date: Wed, 5 Jan 2005 09:41:36 +0000 Subject: [PATCH] (krb5_is_thread_safe): return TRUE is the library was compiled with multithreading support. If not, application must global lock the library, it it uses threads that call kerberos functions at the same time. git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@14470 ec53bebd-3082-4978-b11e-865c3cabbd6b --- lib/krb5/context.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lib/krb5/context.c b/lib/krb5/context.c index e2f5a9053..00a4afca1 100644 --- a/lib/krb5/context.c +++ b/lib/krb5/context.c @@ -644,3 +644,13 @@ krb5_get_fcache_version(krb5_context context, int *version) *version = context->fcache_vno; return 0; } + +krb5_boolean KRB5_LIB_FUNCTION +krb5_is_thread_safe(void) +{ +#ifdef ENABLE_PTHREAD_SUPPORT + return TRUE; +#else + return FALSE; +#endif +}