diff options
author | Ken Raeburn <raeburn@mit.edu> | 2006-03-08 02:56:48 +0000 |
---|---|---|
committer | Ken Raeburn <raeburn@mit.edu> | 2006-03-08 02:56:48 +0000 |
commit | 70585b725f15e984d0c08ce4c1540f09a8c711c6 (patch) | |
tree | 7331b10b6853979fad3e59f1e665bdbbfaf315df /src/util | |
parent | 8f09bfe9fa0e51c2bd1e2f533eb25655e88ca43b (diff) | |
download | krb5-70585b725f15e984d0c08ce4c1540f09a8c711c6.tar.gz krb5-70585b725f15e984d0c08ce4c1540f09a8c711c6.tar.xz krb5-70585b725f15e984d0c08ce4c1540f09a8c711c6.zip |
krb5.h, which is built after util/et, which is built after the support
code.
Fix: Put service location decls in k5-locate.h, pull plugin support
decls out of k5-int.h into k5-plugin.h, and make it stand on its own,
which includes changing the return type from krb5_error_code to
int32_t.
Oops: The plugin support code included k5-int.h, which includes
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17707 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/util')
-rw-r--r-- | src/util/support/ChangeLog | 10 | ||||
-rw-r--r-- | src/util/support/plugins.c | 30 |
2 files changed, 32 insertions, 8 deletions
diff --git a/src/util/support/ChangeLog b/src/util/support/ChangeLog index 4ec482f243..6de0648623 100644 --- a/src/util/support/ChangeLog +++ b/src/util/support/ChangeLog @@ -1,3 +1,13 @@ +2006-03-07 Ken Raeburn <raeburn@mit.edu> + + * plugins.c: Don't include k5-int.h, it depends on krb5.h which + hasn't been built yet. Instead, include k5-plugin.h and a bunch + of system headers. + (krb5int_open_plugin, krb5int_get_plugin_data, + krb5int_get_plugin_func, krb5int_open_plugin_dir, + krb5int_get_plugin_dir_data, krb5int_get_plugin_dir_func): Change + return types from krb5_error_code to int32_t. + 2006-03-06 Ken Raeburn <raeburn@mit.edu> * plugins.c: New file. diff --git a/src/util/support/plugins.c b/src/util/support/plugins.c index bc93aa2b4c..206ccb5df6 100644 --- a/src/util/support/plugins.c +++ b/src/util/support/plugins.c @@ -27,8 +27,22 @@ * Plugin module support, and shims around dlopen/whatever. */ -#include "k5-int.h" +#include "k5-plugin.h" #include <dlfcn.h> +#include <stdio.h> +#include <sys/types.h> +#ifdef HAVE_SYS_STAT_H +#include <sys/stat.h> +#endif +#ifdef HAVE_SYS_PARAM_H +#include <sys/param.h> +#endif +#include <errno.h> +#include <stdlib.h> +#include <string.h> +#ifdef HAVE_UNISTD_H +#include <unistd.h> +#endif #include <stdarg.h> static void Tprintf (const char *fmt, ...) @@ -54,7 +68,7 @@ struct plugin_file_handle { #endif }; -krb5_error_code KRB5_CALLCONV +int32_t KRB5_CALLCONV krb5int_open_plugin (const char *filename, struct plugin_file_handle **h) { struct plugin_file_handle *htmp; @@ -78,7 +92,7 @@ krb5int_open_plugin (const char *filename, struct plugin_file_handle **h) return 0; } -krb5_error_code KRB5_CALLCONV +int32_t KRB5_CALLCONV krb5int_get_plugin_data (struct plugin_file_handle *h, const char *csymname, void **ptr) { @@ -95,7 +109,7 @@ krb5int_get_plugin_data (struct plugin_file_handle *h, const char *csymname, return 0; } -krb5_error_code KRB5_CALLCONV +int32_t KRB5_CALLCONV krb5int_get_plugin_func (struct plugin_file_handle *h, const char *csymname, void (**ptr)()) { @@ -105,7 +119,7 @@ krb5int_get_plugin_func (struct plugin_file_handle *h, const char *csymname, handling is the same for both data and functions. (And the casting we do here works, etc.) */ void *dptr; - krb5_error_code err; + int32_t err; err = krb5int_get_plugin_data (h, csymname, &dptr); if (err == 0) @@ -137,7 +151,7 @@ krb5int_close_plugin (struct plugin_file_handle *h) #endif #endif -krb5_error_code KRB5_CALLCONV +int32_t KRB5_CALLCONV krb5int_open_plugin_dir (const char *dirname, struct plugin_dir_handle *dirhandle) { @@ -235,7 +249,7 @@ krb5int_free_plugin_dir_data (void **ptrs) free(ptrs); } -krb5_error_code KRB5_CALLCONV +int32_t KRB5_CALLCONV krb5int_get_plugin_dir_data (struct plugin_dir_handle *dirhandle, const char *symname, void ***ptrs) @@ -297,7 +311,7 @@ krb5int_free_plugin_dir_func (void (**ptrs)(void)) free(ptrs); } -krb5_error_code KRB5_CALLCONV +int32_t KRB5_CALLCONV krb5int_get_plugin_dir_func (struct plugin_dir_handle *dirhandle, const char *symname, void (***ptrs)(void)) |