summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKen Raeburn <raeburn@mit.edu>2008-08-06 18:16:37 +0000
committerKen Raeburn <raeburn@mit.edu>2008-08-06 18:16:37 +0000
commit459a6c1e9b12278d1b4f990cc4f23c3754ab06c8 (patch)
treef33560ba3be78535e32f9bcb1f640d9d658131c8 /src
parent5bfda276e4a92a0dad9767b823d898b3efd68b5c (diff)
downloadkrb5-459a6c1e9b12278d1b4f990cc4f23c3754ab06c8.tar.gz
krb5-459a6c1e9b12278d1b4f990cc4f23c3754ab06c8.tar.xz
krb5-459a6c1e9b12278d1b4f990cc4f23c3754ab06c8.zip
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
Diffstat (limited to 'src')
-rw-r--r--src/include/k5-thread.h2
-rw-r--r--src/util/support/threads.c1
2 files changed, 2 insertions, 1 deletions
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 <assert.h>
#include <stdlib.h>
#include <errno.h>
+#define THREAD_SUPPORT_IMPL
#include "k5-thread.h"
#include "k5-platform.h"
#include "supp-int.h"