If CONFIG_SMALL is defined, always use function calls for k5_mutex_lock
authorKen Raeburn <raeburn@mit.edu>
Wed, 6 Aug 2008 18:16:37 +0000 (18:16 +0000)
committerKen Raeburn <raeburn@mit.edu>
Wed, 6 Aug 2008 18:16:37 +0000 (18:16 +0000)
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

src/include/k5-thread.h
src/util/support/threads.c

index a894d868f1bcb54604b24911e0ae839abaa614b4..f910c29b451b3f4d2e49c5327a5ef1feb0481a33 100644 (file)
@@ -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
index 02c14e5de0a6c9b3fe38ed4180525bb2a7cb5c9b..8dc9d462e1ff4b19b383edc7a76ec3f2e4c45801 100644 (file)
@@ -30,6 +30,7 @@
 #include <assert.h>
 #include <stdlib.h>
 #include <errno.h>
+#define THREAD_SUPPORT_IMPL
 #include "k5-thread.h"
 #include "k5-platform.h"
 #include "supp-int.h"