From: Ken Raeburn Date: Wed, 6 Aug 2008 18:16:37 +0000 (+0000) Subject: If CONFIG_SMALL is defined, always use function calls for k5_mutex_lock X-Git-Tag: krb5-1.7-alpha1~521 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=459a6c1e9b12278d1b4f990cc4f23c3754ab06c8;p=krb5.git If CONFIG_SMALL is defined, always use function calls for k5_mutex_lock and _unlock. On ppc darwin builds with debug info, this makes lib*.dylib a total of about 46K (~3%) smaller; "size" reports a reduction in text and/or "other" sizes for libgssapi_krb5, libkdb5, libkdb_ldap, and libkrb5. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20623 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/include/k5-thread.h b/src/include/k5-thread.h index a894d868f..f910c29b4 100644 --- a/src/include/k5-thread.h +++ b/src/include/k5-thread.h @@ -761,7 +761,7 @@ extern int KRB5_CALLCONV krb5int_mutex_unlock (k5_mutex_t *); For now, plugins should use the exported functions, and not the above macros, and use krb5int_mutex_alloc for allocations. */ -#ifdef PLUGIN +#if defined(PLUGIN) || (defined(CONFIG_SMALL) && !defined(THREAD_SUPPORT_IMPL)) #undef k5_mutex_lock #define k5_mutex_lock krb5int_mutex_lock #undef k5_mutex_unlock diff --git a/src/util/support/threads.c b/src/util/support/threads.c index 02c14e5de..8dc9d462e 100644 --- a/src/util/support/threads.c +++ b/src/util/support/threads.c @@ -30,6 +30,7 @@ #include #include #include +#define THREAD_SUPPORT_IMPL #include "k5-thread.h" #include "k5-platform.h" #include "supp-int.h"