# HG changeset patch # User Stu Tomlinson # Date 1124569028 0 # Node ID 519dc2186438356970477cd49014a685e5408a0c # Parent cdd9d1011d9743f16a3ee8ed5c74c4605183d3ff [gaim-migrate @ 13521] Bits and pieces all over the place. I was hunting down compiler warnings all over the place, with crazy CFLAGS. I think I might have got a bit carried away. I made the perl stuff compile with gcc 2.x (which don't support mixed declerations and statements), I think what I did was safe but readily admit I have no clue how all the perl stuff works. Rename gaim_presence_add_presence() to gaim_presence_add_list() (to match the header file - obviously nothing actually _uses_ this) Implement gaim_savedstatus_get_handle() because it's in the header file. Remove gaim_account_set_presence() from account.h - it's not actually implemented anywhere, so it can't be that important. committer: Tailor Script diff -r cdd9d1011d97 -r 519dc2186438 configure.ac --- a/configure.ac Fri Aug 19 20:06:37 2005 +0000 +++ b/configure.ac Sat Aug 20 20:17:08 2005 +0000 @@ -1237,7 +1237,7 @@ AC_CHECK_PROG(DOT, dot, true, false) if test $DOT = false; then - enable_dot = no; + enable_dot="no"; AC_MSG_WARN([*** dot not found, graphs will not be available]) else AC_DEFINE_UNQUOTED(HAVE_DOT, 1, [whether or not we have dot]) diff -r cdd9d1011d97 -r 519dc2186438 gaim.spec.in --- a/gaim.spec.in Fri Aug 19 20:06:37 2005 +0000 +++ b/gaim.spec.in Sat Aug 20 20:17:08 2005 +0000 @@ -153,6 +153,7 @@ %dir %{_libdir}/gaim %attr(755, root, root) %{_libdir}/libgaim-remote.so.* +%attr(755, root, root) %{_libdir}/libgaimperl.so %attr(755, root, root) %{perl_vendorlib} %{_bindir}/* @@ -187,8 +188,13 @@ %dir %{_includedir}/gaim %{_includedir}/gaim/*.h %{_libdir}/pkgconfig/gaim.pc +%{_datadir}/aclocal/gaim.m4 %changelog +* Sat Aug 20 2005 +- Include libgaimperl.so +- Include gaim.m4 in gaim-devel + * Thu Apr 28 2005 - Use perl_vendorlib & perl_archlib for better 64bit compat (Jeff Mahoney) - Clean up Requires, most should be auto-detected diff -r cdd9d1011d97 -r 519dc2186438 m4macros/Makefile.am --- a/m4macros/Makefile.am Fri Aug 19 20:06:37 2005 +0000 +++ b/m4macros/Makefile.am Sat Aug 20 20:17:08 2005 +0000 @@ -1,6 +1,6 @@ installed_m4=gaim.m4 -EXTRA_DIT=$(installed_m4) +EXTRA_DIST=$(installed_m4) m4datadir=$(datadir)/aclocal m4data_DATA=$(installed_m4) diff -r cdd9d1011d97 -r 519dc2186438 plugins/Makefile.am --- a/plugins/Makefile.am Fri Aug 19 20:06:37 2005 +0000 +++ b/plugins/Makefile.am Sat Aug 20 20:17:08 2005 +0000 @@ -1,4 +1,4 @@ -DIST_SUBDIRS = docklet gevolution gaim-remote gestures perl ssl tcl ticker +DIST_SUBDIRS = docklet gevolution gaim-remote gestures musicmessaging perl ssl tcl ticker if BUILD_GEVOLUTION GEVOLUTION_DIR = gevolution diff -r cdd9d1011d97 -r 519dc2186438 plugins/history.c --- a/plugins/history.c Fri Aug 19 20:06:37 2005 +0000 +++ b/plugins/history.c Sat Aug 20 20:17:08 2005 +0000 @@ -191,6 +191,7 @@ NULL, NULL, NULL, + NULL, NULL }; diff -r cdd9d1011d97 -r 519dc2186438 plugins/iconaway.c --- a/plugins/iconaway.c Fri Aug 19 20:06:37 2005 +0000 +++ b/plugins/iconaway.c Sat Aug 20 20:17:08 2005 +0000 @@ -86,11 +86,6 @@ return TRUE; } -static GaimGtkPluginUiInfo ui_info = -{ - NULL /**< get_config_frame */ -}; - static GaimPluginInfo info = { GAIM_PLUGIN_MAGIC, @@ -116,7 +111,7 @@ NULL, /**< unload */ NULL, /**< destroy */ - &ui_info, /**< ui_info */ + NULL, /**< ui_info */ NULL, /**< extra_info */ NULL, NULL diff -r cdd9d1011d97 -r 519dc2186438 plugins/perl/Makefile.am --- a/plugins/perl/Makefile.am Fri Aug 19 20:06:37 2005 +0000 +++ b/plugins/perl/Makefile.am Sat Aug 20 20:17:08 2005 +0000 @@ -83,7 +83,8 @@ EXTRA_DIST = \ Makefile.mingw \ common/Makefile.mingw \ - $(common_sources) + $(common_sources) \ + libgaimperl.c common/Makefile: common/Makefile.PL @if test "x${top_srcdir}" != "x${top_builddir}"; then \ diff -r cdd9d1011d97 -r 519dc2186438 plugins/perl/common/Account.xs --- a/plugins/perl/common/Account.xs Fri Aug 19 20:06:37 2005 +0000 +++ b/plugins/perl/common/Account.xs Sat Aug 20 20:17:08 2005 +0000 @@ -7,11 +7,6 @@ gaim_account_get_presence(account) Gaim::Account account -void -gaim_account_set_presence(account, presence) - Gaim::Account account - Gaim::Presence presence - Gaim::Account gaim_account_new(username, protocol_id) const char * username diff -r cdd9d1011d97 -r 519dc2186438 plugins/perl/common/module.h --- a/plugins/perl/common/module.h Fri Aug 19 20:06:37 2005 +0000 +++ b/plugins/perl/common/module.h Sat Aug 20 20:17:08 2005 +0000 @@ -52,7 +52,8 @@ #include "sslconn.h" #include "status.h" #include "stringref.h" -#include "util.h" +/* Ewww. perl has it's own util.h which is in the include path :( */ +#include "src/util.h" #include "value.h" #include "xmlnode.h" diff -r cdd9d1011d97 -r 519dc2186438 plugins/perl/perl-common.c --- a/plugins/perl/perl-common.c Fri Aug 19 20:06:37 2005 +0000 +++ b/plugins/perl/perl-common.c Sat Aug 20 20:17:08 2005 +0000 @@ -34,7 +34,7 @@ static MGVTBL vtbl_free_object = { - NULL, NULL, NULL, NULL, magic_free_object + NULL, NULL, NULL, NULL, magic_free_object, NULL, NULL }; static SV * @@ -178,12 +178,13 @@ int count = 0, i, ret_value = 1; SV *sv_args[argc]; STRLEN na; - PERL_SET_CONTEXT(my_perl); + dSP; + PERL_SET_CONTEXT(my_perl); /* * Set up the perl environment, push arguments onto the * perl stack, then call the given function */ - dSP; + SPAGAIN; ENTER; SAVETMPS; PUSHMARK(sp); diff -r cdd9d1011d97 -r 519dc2186438 plugins/perl/perl.c --- a/plugins/perl/perl.c Fri Aug 19 20:06:37 2005 +0000 +++ b/plugins/perl/perl.c Sat Aug 20 20:17:08 2005 +0000 @@ -404,8 +404,9 @@ execute_perl("Gaim::PerlLoader::load_n_eval", 2, atmp); { + dSP; PERL_SET_CONTEXT(my_perl); - dSP; + SPAGAIN; ENTER; SAVETMPS; PUSHMARK(sp); @@ -434,8 +435,9 @@ static void destroy_package(const char *package) { - PERL_SET_CONTEXT(my_perl); dSP; + PERL_SET_CONTEXT(my_perl); + SPAGAIN; ENTER; SAVETMPS; @@ -466,8 +468,9 @@ if (gps->unload_sub != NULL) { - PERL_SET_CONTEXT(my_perl); dSP; + PERL_SET_CONTEXT(my_perl); + SPAGAIN; ENTER; SAVETMPS; PUSHMARK(sp); diff -r cdd9d1011d97 -r 519dc2186438 plugins/spellchk.c --- a/plugins/spellchk.c Fri Aug 19 20:06:37 2005 +0000 +++ b/plugins/spellchk.c Sat Aug 20 20:17:08 2005 +0000 @@ -1650,7 +1650,6 @@ GHashTable *hashes; char bad[82] = ""; char good[256] = ""; - char completestr[BUFSIZ] = ""; int pnt = 0; gsize size; gboolean complete = TRUE; @@ -1674,8 +1673,7 @@ } else if(!strncasecmp(buf, "COMPLETE ", 9)) { - strncpy(completestr, buf + 9, BUFSIZ - 1); - complete = (gboolean)strtol(completestr, NULL, 10); + complete = *(buf+9) == '0' ? FALSE : TRUE; } else if (!strncasecmp(buf, "GOOD ", 5)) { diff -r cdd9d1011d97 -r 519dc2186438 plugins/ticker/ticker.c --- a/plugins/ticker/ticker.c Fri Aug 19 20:06:37 2005 +0000 +++ b/plugins/ticker/ticker.c Sat Aug 20 20:17:08 2005 +0000 @@ -311,11 +311,6 @@ return TRUE; } -static GaimGtkPluginUiInfo ui_info = -{ - NULL /**< get_config_frame */ -}; - static GaimPluginInfo info = { GAIM_PLUGIN_MAGIC, @@ -341,7 +336,7 @@ plugin_unload, /**< unload */ NULL, /**< destroy */ - &ui_info, /**< ui_info */ + NULL, /**< ui_info */ NULL, /**< extra_info */ NULL, NULL diff -r cdd9d1011d97 -r 519dc2186438 src/account.h --- a/src/account.h Fri Aug 19 20:06:37 2005 +0000 +++ b/src/account.h Sat Aug 20 20:17:08 2005 +0000 @@ -263,16 +263,6 @@ void gaim_account_set_status_types(GaimAccount *account, GList *status_types); /** - * Sets the account's presence. - * - * @param account The account. - * @param presence The presence. - * - * TODO: This function does not seem to be implemented anywhere... - */ -void gaim_account_set_presence(GaimAccount *account, GaimPresence *presence); - -/** * Activates or deactivates a status. All changes to the statuses of * an account go through this function or gaim_account_set_status_vargs * or gaim_account_set_status_list. diff -r cdd9d1011d97 -r 519dc2186438 src/protocols/Makefile.am --- a/src/protocols/Makefile.am Fri Aug 19 20:06:37 2005 +0000 +++ b/src/protocols/Makefile.am Sat Aug 20 20:17:08 2005 +0000 @@ -1,3 +1,3 @@ -DIST_SUBDIRS = gg irc jabber msn napster novell oscar sametime silc toc trepia yahoo zephyr +DIST_SUBDIRS = gg irc jabber msn napster novell oscar sametime silc toc simple trepia yahoo zephyr SUBDIRS = $(DYNAMIC_PRPLS) $(STATIC_PRPLS) diff -r cdd9d1011d97 -r 519dc2186438 src/protocols/irc/dcc_send.c --- a/src/protocols/irc/dcc_send.c Fri Aug 19 20:06:37 2005 +0000 +++ b/src/protocols/irc/dcc_send.c Sat Aug 20 20:17:08 2005 +0000 @@ -185,7 +185,7 @@ xd->rxlen += len; while (1) { - int acked; + size_t acked; if (xd->rxlen < 4) break; diff -r cdd9d1011d97 -r 519dc2186438 src/protocols/irc/parse.c --- a/src/protocols/irc/parse.c Fri Aug 19 20:06:37 2005 +0000 +++ b/src/protocols/irc/parse.c Sat Aug 20 20:17:08 2005 +0000 @@ -139,7 +139,7 @@ { "voice", ":", irc_cmd_op, N_("voice <nick1> [nick2] ...: Grant channel voice status to someone. You must be a channel operator to do this.") }, { "wallops", ":", irc_cmd_wallops, N_("wallops <message>: If you don't know what this is, you probably can't use it.") }, { "whois", "tt", irc_cmd_whois, N_("whois [server] <nick>: Get information on a user.") }, - { NULL, NULL, NULL } + { NULL, NULL, NULL, NULL } }; static GaimCmdRet irc_parse_gaim_cmd(GaimConversation *conv, const gchar *cmd, diff -r cdd9d1011d97 -r 519dc2186438 src/protocols/jabber/buddy.c --- a/src/protocols/jabber/buddy.c Fri Aug 19 20:06:37 2005 +0000 +++ b/src/protocols/jabber/buddy.c Sat Aug 20 20:17:08 2005 +0000 @@ -370,7 +370,7 @@ * Send only if there's actually any *information* to send */ vc_node = xmlnode_from_str(info, -1); - avatar_file == gaim_buddy_icons_get_full_path(gaim_account_get_buddy_icon(gc->account)); + avatar_file = gaim_buddy_icons_get_full_path(gaim_account_get_buddy_icon(gc->account)); if(!vc_node && avatar_file) { vc_node = xmlnode_new("vCard"); diff -r cdd9d1011d97 -r 519dc2186438 src/protocols/novell/nmuser.c --- a/src/protocols/novell/nmuser.c Fri Aug 19 20:06:37 2005 +0000 +++ b/src/protocols/novell/nmuser.c Sat Aug 20 20:17:08 2005 +0000 @@ -2072,7 +2072,7 @@ gunichar uc; gstr = g_string_sized_new(strlen(text)*2); - pch = text; + pch = (unsigned char *)text; while (*pch) { if ((*pch) <= 0x7F) { switch (*pch) { diff -r cdd9d1011d97 -r 519dc2186438 src/protocols/silc/silc.c --- a/src/protocols/silc/silc.c Fri Aug 19 20:06:37 2005 +0000 +++ b/src/protocols/silc/silc.c Sat Aug 20 20:17:08 2005 +0000 @@ -181,7 +181,7 @@ /* Get session detachment data, if available */ memset(¶ms, 0, sizeof(params)); dfile = silcgaim_session_file(gaim_account_get_username(sg->account)); - params.detach_data = silc_file_readfile(dfile, ¶ms.detach_data_len); + params.detach_data = (unsigned char *)silc_file_readfile(dfile, ¶ms.detach_data_len); if (params.detach_data) params.detach_data[params.detach_data_len] = 0; @@ -524,7 +524,7 @@ tmp = silc_file_readfile(val, &tmp_len); if (tmp) { tmp[tmp_len] = 0; - if (silc_vcard_decode(tmp, tmp_len, &vcard)) + if (silc_vcard_decode((unsigned char *)tmp, tmp_len, &vcard)) silc_client_attribute_add(client, conn, SILC_ATTRIBUTE_USER_INFO, (void *)&vcard, @@ -835,7 +835,7 @@ typedef struct { char *nick; - unsigned char *message; + char *message; SilcUInt32 message_len; SilcMessageFlags flags; } *SilcGaimIM; @@ -880,7 +880,7 @@ /* Send the message */ silc_client_send_private_message(client, conn, client_entry, im->flags, - im->message, im->message_len, TRUE); + (unsigned char *)im->message, im->message_len, TRUE); gaim_conv_im_write(GAIM_CONV_IM(convo), conn->local_entry->nickname, im->message, 0, time(NULL)); @@ -955,7 +955,7 @@ /* Send private message directly */ ret = silc_client_send_private_message(client, conn, clients[0], - mflags, (char *)msg, + mflags, (unsigned char *)msg, strlen(msg), TRUE); silc_free(nickname); diff -r cdd9d1011d97 -r 519dc2186438 src/protocols/simple/simple.c --- a/src/protocols/simple/simple.c Fri Aug 19 20:06:37 2005 +0000 +++ b/src/protocols/simple/simple.c Sat Aug 20 20:17:08 2005 +0000 @@ -1307,8 +1307,6 @@ { GaimAccountUserSplit *split; GaimAccountOption *option; - - gaim_debug_register_category("simple"); split = gaim_account_user_split_new(_("Server"), "blubb.com", '@'); prpl_info.user_splits = g_list_append(prpl_info.user_splits, split); diff -r cdd9d1011d97 -r 519dc2186438 src/protocols/yahoo/yahoo.c --- a/src/protocols/yahoo/yahoo.c Fri Aug 19 20:06:37 2005 +0000 +++ b/src/protocols/yahoo/yahoo.c Sat Aug 20 20:17:08 2005 +0000 @@ -2110,7 +2110,7 @@ if (yd->rxlen < YAHOO_PACKET_HDRLEN) return; - if (strncmp(yd->rxqueue, "YMSG", MIN(4, yd->rxlen)) != 0) { + if (strncmp((char *)yd->rxqueue, "YMSG", MIN(4, yd->rxlen)) != 0) { /* HEY! This isn't even a YMSG packet. What * are you trying to pull? */ guchar *start; @@ -2156,7 +2156,7 @@ yd->rxlen -= YAHOO_PACKET_HDRLEN + pktlen; if (yd->rxlen) { - char *tmp = g_memdup(yd->rxqueue + YAHOO_PACKET_HDRLEN + pktlen, yd->rxlen); + guchar *tmp = g_memdup(yd->rxqueue + YAHOO_PACKET_HDRLEN + pktlen, yd->rxlen); g_free(yd->rxqueue); yd->rxqueue = tmp; } else { diff -r cdd9d1011d97 -r 519dc2186438 src/protocols/yahoo/yahoochat.c --- a/src/protocols/yahoo/yahoochat.c Fri Aug 19 20:06:37 2005 +0000 +++ b/src/protocols/yahoo/yahoochat.c Sat Aug 20 20:17:08 2005 +0000 @@ -1316,7 +1316,7 @@ if (!yrl->started) { yrl->started = TRUE; - start = g_strstr_len(yrl->rxqueue, yrl->rxlen, "\r\n\r\n"); + start = (guchar *)g_strstr_len((char *)yrl->rxqueue, yrl->rxlen, "\r\n\r\n"); if (!start || (start - yrl->rxqueue + 4) >= yrl->rxlen) return; start += 4; @@ -1330,7 +1330,7 @@ (GDestroyNotify)yahoo_chatxml_state_destroy); } - if (!g_markup_parse_context_parse(yrl->parse, start, (yrl->rxlen - (start - yrl->rxqueue)), NULL)) { + if (!g_markup_parse_context_parse(yrl->parse, (char *)start, (yrl->rxlen - (start - yrl->rxqueue)), NULL)) { yahoo_roomlist_cleanup(list, yrl); return; diff -r cdd9d1011d97 -r 519dc2186438 src/protocols/yahoo/ycht.c --- a/src/protocols/yahoo/ycht.c Fri Aug 19 20:06:37 2005 +0000 +++ b/src/protocols/yahoo/ycht.c Sat Aug 20 20:17:08 2005 +0000 @@ -193,7 +193,7 @@ /***************************************************************************** * Functions dealing with YCHT packets and their contents directly. *****************************************************************************/ -static void ycht_packet_dump(const char *data, int len) +static void ycht_packet_dump(const guchar *data, int len) { #ifdef YAHOO_YCHT_DEBUG int i; @@ -431,7 +431,7 @@ if (ycht->rxlen < YCHT_HEADER_LEN) return; - if (strncmp("YCHT", ycht->rxqueue, 4) != 0) + if (strncmp("YCHT", (char *)ycht->rxqueue, 4) != 0) gaim_debug_error("yahoo", "YCHT: protocol error.\n"); pos += 4; /* YCHT */ @@ -453,11 +453,11 @@ ycht_packet_dump(ycht->rxqueue, YCHT_HEADER_LEN + pktlen); pkt = ycht_packet_new(version, service, status); - ycht_packet_read(pkt, ycht->rxqueue + pos, pktlen); + ycht_packet_read(pkt, (char *)ycht->rxqueue + pos, pktlen); ycht->rxlen -= YCHT_HEADER_LEN + pktlen; if (ycht->rxlen) { - char *tmp = g_memdup(ycht->rxqueue + YCHT_HEADER_LEN + pktlen, ycht->rxlen); + guchar *tmp = g_memdup(ycht->rxqueue + YCHT_HEADER_LEN + pktlen, ycht->rxlen); g_free(ycht->rxqueue); ycht->rxqueue = tmp; } else { diff -r cdd9d1011d97 -r 519dc2186438 src/protocols/zephyr/ZInit.c --- a/src/protocols/zephyr/ZInit.c Fri Aug 19 20:06:37 2005 +0000 +++ b/src/protocols/zephyr/ZInit.c Sat Aug 20 20:17:08 2005 +0000 @@ -36,7 +36,8 @@ char addr[4], hostname[MAXHOSTNAMELEN]; struct in_addr servaddr; struct sockaddr_in sin; - int s, sinsize = sizeof(sin); + int s; + socklen_t sinsize = sizeof(sin); Code_t code; ZNotice_t notice; #ifdef ZEPHYR_USES_KERBEROS diff -r cdd9d1011d97 -r 519dc2186438 src/protocols/zephyr/ZOpenPort.c --- a/src/protocols/zephyr/ZOpenPort.c Fri Aug 19 20:06:37 2005 +0000 +++ b/src/protocols/zephyr/ZOpenPort.c Sat Aug 20 20:17:08 2005 +0000 @@ -19,7 +19,7 @@ unsigned short *port; { struct sockaddr_in bindin; - int len; + socklen_t len; (void) ZClosePort(); diff -r cdd9d1011d97 -r 519dc2186438 src/protocols/zephyr/Zinternal.c --- a/src/protocols/zephyr/Zinternal.c Fri Aug 19 20:06:37 2005 +0000 +++ b/src/protocols/zephyr/Zinternal.c Sat Aug 20 20:17:08 2005 +0000 @@ -233,7 +233,8 @@ ZNotice_t notice; ZPacket_t packet; struct sockaddr_in olddest, from; - int from_len, packet_len, zvlen, part, partof; + int packet_len, zvlen, part, partof; + socklen_t from_len; char *slash; Code_t retval; fd_set fds; @@ -595,7 +596,7 @@ Code_t retval; static char version[BUFSIZ]; /* default init should be all \0 */ struct sockaddr_in name; - int namelen = sizeof(name); + socklen_t namelen = sizeof(name); if (!notice->z_sender) notice->z_sender = ZGetSender(); diff -r cdd9d1011d97 -r 519dc2186438 src/savedstatuses.c --- a/src/savedstatuses.c Fri Aug 19 20:06:37 2005 +0000 +++ b/src/savedstatuses.c Sat Aug 20 20:17:08 2005 +0000 @@ -455,6 +455,14 @@ return saved_status->message; } +void * +gaim_savedstatuses_get_handle(void) +{ + static int handle; + + return &handle; +} + void gaim_savedstatuses_init(void) { diff -r cdd9d1011d97 -r 519dc2186438 src/status.c --- a/src/status.c Fri Aug 19 20:06:37 2005 +0000 +++ b/src/status.c Sat Aug 20 20:17:08 2005 +0000 @@ -1249,7 +1249,7 @@ } void -gaim_presence_add_presence(GaimPresence *presence, const GList *source_list) +gaim_presence_add_list(GaimPresence *presence, const GList *source_list) { const GList *l;