Mercurial > pidgin.yaz
changeset 5449:9442e8d0b21d
[gaim-migrate @ 5836]
Decklin Foster writes:
"this makes --enable-static-prpls compile again.
i'm so lazy. it's only been what, well over a week since the new plugin
api broke this? :) i'm not sure if everything here is "correct" but i'm
sure someone can look over it. mainly, because i made _load return TRUE
all the time, for the sake of consistency/completeness i changed the
other applicable functions to do so as well. my feeling is, the only
time these things are going to be called in the static case is from
static_proto_init (since there's no plugin UI or whatever) and therefore
they always "succeed".
oh, yeah, and someone please test it *without* static prpls turned on.
like i said, i'm lazy. :)"
it works for me with no static prpls.
committer: Tailor Script <tailor@pidgin.im>
author | Luke Schierer <lschiere@pidgin.im> |
---|---|
date | Mon, 19 May 2003 17:27:03 +0000 |
parents | aed28286e4fc |
children | bb1e160467b6 |
files | configure.ac configure.in src/core.h src/plugin.c src/plugin.h |
diffstat | 5 files changed, 14 insertions(+), 16 deletions(-) [+] |
line wrap: on
line diff
--- a/configure.ac Mon May 19 16:00:24 2003 +0000 +++ b/configure.ac Mon May 19 17:27:03 2003 +0000 @@ -94,8 +94,8 @@ load_proto= for i in $STATIC_PRPLS ; do STATIC_LINK_LIBS="$STATIC_LINK_LIBS protocols/$i/lib$i.a" - extern_init="$extern_init extern void ${i}_init(struct prpl *);" - load_proto="$load_proto load_protocol(${i}_init);" + extern_init="$extern_init extern gboolean gaim_init_${i}_plugin();" + load_proto="$load_proto gaim_init_${i}_plugin();" case $i in gg) static_gg=yes ;; irc) static_irc=yes ;;
--- a/configure.in Mon May 19 16:00:24 2003 +0000 +++ b/configure.in Mon May 19 17:27:03 2003 +0000 @@ -84,8 +84,8 @@ load_proto= for i in $STATIC_PRPLS ; do STATIC_LINK_LIBS="$STATIC_LINK_LIBS protocols/$i/lib$i.a" - extern_init="$extern_init extern void ${i}_init(struct prpl *);" - load_proto="$load_proto load_protocol(${i}_init, sizeof(struct prpl));" + extern_init="$extern_init extern gboolean gaim_init_${i}_plugin();" + load_proto="$load_proto gaim_init_${i}_plugin();" case $i in gg) static_gg=yes ;; irc) static_irc=yes ;;
--- a/src/core.h Mon May 19 16:00:24 2003 +0000 +++ b/src/core.h Mon May 19 17:27:03 2003 +0000 @@ -40,9 +40,7 @@ #include <stdio.h> #include <time.h> #include <glib.h> -#ifdef GAIM_PLUGINS #include <gmodule.h> -#endif struct gaim_account; struct group;
--- a/src/plugin.c Mon May 19 16:00:24 2003 +0000 +++ b/src/plugin.c Mon May 19 17:27:03 2003 +0000 @@ -140,6 +140,8 @@ return NULL; } +#endif /* GAIM_PLUGINS */ + static gint compare_prpl(GaimPlugin *a, GaimPlugin *b) { @@ -150,8 +152,6 @@ ? GAIM_PLUGIN_PROTOCOL_INFO(b)->protocol : -1))); } -#endif /* GAIM_PLUGINS */ - GaimPlugin * gaim_plugin_new(gboolean native, const char *path) { @@ -298,7 +298,7 @@ return TRUE; #else - return FALSE; + return TRUE; #endif /* !GAIM_PLUGINS */ } @@ -383,6 +383,8 @@ unload_cb(plugin, unload_cb_data); return TRUE; +#else + return TRUE; #endif /* GAIM_PLUGINS */ } @@ -401,13 +403,14 @@ return TRUE; #else - return NULL; + return TRUE; #endif /* !GAIM_PLUGINS */ } void gaim_plugin_destroy(GaimPlugin *plugin) { +#ifdef GAIM_PLUGINS g_return_if_fail(plugin != NULL); if (gaim_plugin_is_loaded(plugin)) @@ -468,6 +471,7 @@ if (plugin->error != NULL) g_free(plugin->error); g_free(plugin); +#endif /* !GAIM_PLUGINS */ } gboolean @@ -568,7 +572,6 @@ gboolean gaim_plugin_register(GaimPlugin *plugin) { -#ifdef GAIM_PLUGINS g_return_val_if_fail(plugin != NULL, FALSE); if (g_list_find(plugins, plugin)) @@ -621,9 +624,6 @@ plugins = g_list_append(plugins, plugin); return TRUE; -#else - return FALSE; -#endif /* !GAIM_PLUGINS */ } gboolean
--- a/src/plugin.h Mon May 19 16:00:24 2003 +0000 +++ b/src/plugin.h Mon May 19 17:27:03 2003 +0000 @@ -117,7 +117,7 @@ /** * Handles the initialization of modules. */ -#ifdef STATIC_MODULE +#ifndef GAIM_PLUGINS # define GAIM_INIT_PLUGIN(pluginname, initfunc, plugininfo) \ gboolean gaim_init_##pluginname##_plugin(void) { \ GaimPlugin *plugin = gaim_plugin_new(TRUE, NULL); \ @@ -125,7 +125,7 @@ initfunc((plugin)); \ return gaim_plugin_register(plugin); \ } -#else /* if !STATIC_MODULE */ +#else /* GAIM_PLUGINS */ # define GAIM_INIT_PLUGIN(pluginname, initfunc, plugininfo) \ G_MODULE_EXPORT gboolean gaim_init_plugin(GaimPlugin *plugin) { \ plugin->info = &(plugininfo); \