diff options
Diffstat (limited to 'src/include/k5-plugin.h')
-rw-r--r-- | src/include/k5-plugin.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/include/k5-plugin.h b/src/include/k5-plugin.h index f5f4f43c21..2190c03496 100644 --- a/src/include/k5-plugin.h +++ b/src/include/k5-plugin.h @@ -65,6 +65,23 @@ #include "k5-err.h" +/* + * Plugins normally export fixed symbol names, but when statically + * linking plugins, we need a different symbol name for each plugin. + * The first argument to PLUGIN_SYMBOL_NAME acts as the + * differentiator, and is only used for static plugin linking. + * + * Although this macro (and thus this header file) are used in plugins + * whose code lies inside the krb5 tree, plugins maintained separately + * from the krb5 tree do not need it; they can just use the fixed + * symbol name unconditionally. + */ +#ifdef STATIC_PLUGINS +#define PLUGIN_SYMBOL_NAME(prefix, symbol) prefix ## _ ## symbol +#else +#define PLUGIN_SYMBOL_NAME(prefix, symbol) symbol +#endif + struct plugin_file_handle; /* opaque */ struct plugin_dir_handle { |