Mon, 04 Nov 2019 01:18:24 +0000
Merged in default (pull request #617)
Convert XMPP stuff to GIO
Approved-by: Gary Kramlich
| libpurple/protocols/jabber/bosh.c | file | annotate | diff | comparison | revisions |
--- a/finch/gntaccount.c Sun Nov 03 16:35:44 2019 -0500 +++ b/finch/gntaccount.c Mon Nov 04 01:18:24 2019 +0000 @@ -482,7 +482,7 @@ if (account) value = purple_account_get_int(account, purple_account_option_get_setting(option), value); - snprintf(str, sizeof(str), "%d", value); + g_snprintf(str, sizeof(str), "%d", value); gnt_entry_set_flag(GNT_ENTRY(entry), GNT_ENTRY_FLAG_INT); gnt_entry_set_text(GNT_ENTRY(entry), str); }
--- a/finch/gntrequest.c Sun Nov 03 16:35:44 2019 -0500 +++ b/finch/gntrequest.c Mon Nov 04 01:18:24 2019 +0000 @@ -462,7 +462,7 @@ int val = purple_request_field_int_get_default_value(field); GntWidget *entry; - snprintf(str, sizeof(str), "%d", val); + g_snprintf(str, sizeof(str), "%d", val); entry = gnt_entry_new(str); gnt_entry_set_flag(GNT_ENTRY(entry), GNT_ENTRY_FLAG_INT); return entry;
--- a/libpurple/media/backend-fs2.c Sun Nov 03 16:35:44 2019 -0500 +++ b/libpurple/media/backend-fs2.c Mon Nov 04 01:18:24 2019 +0000 @@ -473,7 +473,6 @@ { GObjectClass *gobject_class = (GObjectClass*)klass; GList *features; - GList *it; gobject_class->dispose = purple_media_backend_fs2_dispose; gobject_class->finalize = purple_media_backend_fs2_finalize;
--- a/libpurple/prefs.c Sun Nov 03 16:35:44 2019 -0500 +++ b/libpurple/prefs.c Mon Nov 04 01:18:24 2019 +0000 @@ -1308,11 +1308,6 @@ { struct purple_pref *oldpref, *newpref; -/* win32dep.h causes rename to be defined as wpurple_rename, so we need to undefine it here */ -#if defined(_WIN32) && defined(rename) -#undef rename -#endif - PURPLE_PREFS_UI_OP_CALL(rename, oldname, newname); oldpref = find_pref(oldname);
--- a/libpurple/protocols/bonjour/bonjour_ft.c Sun Nov 03 16:35:44 2019 -0500 +++ b/libpurple/protocols/bonjour/bonjour_ft.c Mon Nov 04 01:18:24 2019 +0000 @@ -1027,8 +1027,9 @@ memset(dstaddr, 0, 41); p = dstaddr; - for(i = 0; i < 20; i++, p += 2) - snprintf(p, 3, "%02x", hashval[i]); + for (i = 0; i < 20; i++, p += 2) { + g_snprintf(p, 3, "%02x", hashval[i]); + } xf->proxy_info = purple_proxy_info_new(); purple_proxy_info_set_proxy_type(xf->proxy_info, PURPLE_PROXY_SOCKS5);
--- a/libpurple/protocols/bonjour/mdns_common.c Sun Nov 03 16:35:44 2019 -0500 +++ b/libpurple/protocols/bonjour/mdns_common.c Mon Nov 04 01:18:24 2019 +0000 @@ -85,7 +85,7 @@ const char *jid, *aim, *email; /* Convert the port to a string */ - snprintf(portstring, sizeof(portstring), "%d", data->port_p2pj); + g_snprintf(portstring, sizeof(portstring), "%d", data->port_p2pj); jid = purple_account_get_string(data->account, "jid", NULL); aim = purple_account_get_string(data->account, "AIM", NULL);
--- a/libpurple/protocols/bonjour/xmpp.c Sun Nov 03 16:35:44 2019 -0500 +++ b/libpurple/protocols/bonjour/xmpp.c Mon Nov 04 01:18:24 2019 +0000 @@ -1467,6 +1467,5 @@ !IN6_IS_ADDR_LINKLOCAL(&in6_addr)) return; - snprintf(ip + strlen(ip), len_remain, "%%%d", - interface_param); + g_snprintf(ip + strlen(ip), len_remain, "%%%d", interface_param); }
--- a/libpurple/protocols/gg/oauth/oauth.c Sun Nov 03 16:35:44 2019 -0500 +++ b/libpurple/protocols/gg/oauth/oauth.c Mon Nov 04 01:18:24 2019 +0000 @@ -104,9 +104,9 @@ nonce[sizeof(nonce) - 1] = 0; } - if (gg_oauth_static_timestamp == NULL) - snprintf(timestamp, sizeof(timestamp), "%ld", time(NULL)); - else { + if (gg_oauth_static_timestamp == NULL) { + g_snprintf(timestamp, sizeof(timestamp), "%ld", time(NULL)); + } else { strncpy(timestamp, gg_oauth_static_timestamp, sizeof(timestamp) - 1); timestamp[sizeof(timestamp) - 1] = 0; }
--- a/libpurple/protocols/jabber/bosh.c Sun Nov 03 16:35:44 2019 -0500 +++ b/libpurple/protocols/jabber/bosh.c Mon Nov 04 01:18:24 2019 +0000 @@ -44,7 +44,6 @@ SoupSession *payload_reqs; gchar *url; - gboolean is_creating; gboolean is_ssl; gboolean is_terminating; @@ -160,7 +159,6 @@ g_source_remove(conn->send_timer); soup_session_abort(conn->payload_reqs); - conn->is_creating = FALSE; g_clear_object(&conn->payload_reqs); g_string_free(conn->send_buff, TRUE); @@ -387,8 +385,6 @@ const gchar *sid, *ver, *inactivity_str; int inactivity = 0; - bosh_conn->is_creating = FALSE; - if (purple_debug_is_verbose() && purple_debug_is_unsafe()) { purple_debug_misc("jabber-bosh", "received (session creation): %s\n", msg->response_body->data); @@ -464,12 +460,6 @@ SoupMessage *req; GString *data; - g_return_if_fail(conn != NULL); - - if (conn->sid || conn->is_creating) { - return; - } - purple_debug_misc("jabber-bosh", "Requesting Session Create for %p\n", conn); @@ -492,7 +482,6 @@ req = jabber_bosh_connection_http_request_new(conn, data); g_string_free(data, FALSE); - conn->is_creating = TRUE; soup_session_queue_message(conn->payload_reqs, req, jabber_bosh_connection_session_created, conn); }
--- a/libpurple/protocols/jabber/roster.c Sun Nov 03 16:35:44 2019 -0500 +++ b/libpurple/protocols/jabber/roster.c Mon Nov 04 01:18:24 2019 +0000 @@ -436,14 +436,12 @@ const char *old_group, const char *new_group) { GSList *buddies, *groups = NULL; - PurpleBuddy *b; if(!old_group || !new_group || purple_strequal(old_group, new_group)) return; buddies = purple_blist_find_buddies(purple_connection_get_account(gc), name); while(buddies) { - b = buddies->data; groups = g_slist_append(groups, (char*)new_group); buddies = g_slist_delete_link(buddies, buddies); }
--- a/libpurple/protocols/novell/nmconn.c Sun Nov 03 16:35:44 2019 -0500 +++ b/libpurple/protocols/novell/nmconn.c Mon Nov 04 01:18:24 2019 +0000 @@ -23,7 +23,6 @@ #include <errno.h> #include <string.h> #include <ctype.h> -#include <time.h> #include "nmconn.h" #ifdef _WIN32 @@ -184,8 +183,6 @@ if (conn) { g_slist_free_full(conn->requests, (GDestroyNotify)nm_release_request); conn->requests = NULL; - g_free(conn->ssl_conn); - conn->ssl_conn = NULL; g_free(conn->addr); conn->addr = NULL; g_free(conn); @@ -198,12 +195,7 @@ if (conn == NULL || buff == NULL) return -1; - if (!conn->use_ssl) - return (write(conn->fd, buff, len)); - else if (conn->ssl_conn && conn->ssl_conn->write) - return (conn->ssl_conn->write(conn->ssl_conn->data, buff, len)); - else - return -1; + return conn->write(conn->data, buff, len); } int @@ -212,12 +204,7 @@ if (conn == NULL || buff == NULL) return -1; - if (!conn->use_ssl) - return (read(conn->fd, buff, len)); - else if (conn->ssl_conn && conn->ssl_conn->read) - return ((conn->ssl_conn->read)(conn->ssl_conn->data, buff, len)); - else - return -1; + return conn->read(conn->data, buff, len); } NMERR_T @@ -465,8 +452,8 @@ /* Create a request struct, add it to our queue, and return it */ if (rc == NM_OK) { - NMRequest *new_request = nm_create_request(cmd, conn->trans_id, - time(0), cb, NULL, data); + NMRequest *new_request = + nm_create_request(cmd, conn->trans_id, cb, NULL, data); nm_conn_add_request_item(conn, new_request); /* Set the out param if it was sent in, otherwise release the request */ @@ -673,21 +660,3 @@ } return NULL; } - -const char * -nm_conn_get_addr(NMConn * conn) -{ - if (conn == NULL) - return NULL; - else - return conn->addr; -} - -int -nm_conn_get_port(NMConn * conn) -{ - if (conn == NULL) - return -1; - else - return conn->port; -}
--- a/libpurple/protocols/novell/nmconn.h Sun Nov 03 16:35:44 2019 -0500 +++ b/libpurple/protocols/novell/nmconn.h Mon Nov 04 01:18:24 2019 +0000 @@ -22,7 +22,6 @@ #define PURPLE_NOVELL_NMCONN_H typedef struct _NMConn NMConn; -typedef struct _NMSSLConn NMSSLConn; #include "nmfield.h" #include "nmuser.h" @@ -39,39 +38,18 @@ /* The port that we are connecting to. */ int port; - /* The file descriptor of the socket for the connection. */ - int fd; - /* The transaction counter. */ int trans_id; /* A list of requests currently awaiting a response. */ GSList *requests; - /* Are we connected? TRUE if so, FALSE if not. */ - gboolean connected; - - /* Are we running in secure mode? */ - gboolean use_ssl; - - /* Have we been redirected? */ - gboolean redirect; - - /* SSL connection */ - NMSSLConn *ssl_conn; - -}; - -struct _NMSSLConn -{ - /* Data to pass to the callbacks */ gpointer data; /* Callbacks for reading/writing */ nm_ssl_read_cb read; nm_ssl_write_cb write; - }; /** @@ -224,23 +202,4 @@ */ NMRequest *nm_conn_find_request(NMConn * conn, int trans_id); -/** - * Get the server address for the connection. - * - * @param conn The connection. - * - * @return The server address for the connection. - * - */ -const char *nm_conn_get_addr(NMConn * conn); - -/** - * Get the port for the connection. - * - * @param conn The connection. - * - * @return The port that we are connected to. - */ -int nm_conn_get_port(NMConn * conn); - #endif /* PURPLE_NOVELL_NMCONN_H */
--- a/libpurple/protocols/novell/nmrequest.c Sun Nov 03 16:35:44 2019 -0500 +++ b/libpurple/protocols/novell/nmrequest.c Mon Nov 04 01:18:24 2019 +0000 @@ -26,16 +26,15 @@ { int trans_id; char *cmd; - int gmt; gpointer data; gpointer user_define; nm_response_cb callback; int ref_count; - NMERR_T ret_code; }; -NMRequest *nm_create_request(const char *cmd, int trans_id, int gmt, nm_response_cb cb, - gpointer resp_data, gpointer user_define) +NMRequest * +nm_create_request(const char *cmd, int trans_id, nm_response_cb cb, + gpointer resp_data, gpointer user_define) { NMRequest *req; @@ -45,7 +44,6 @@ req = g_new0(NMRequest, 1); req->cmd = g_strdup(cmd); req->trans_id = trans_id; - req->gmt = gmt; req->callback = cb; req->data = resp_data; req->user_define = user_define; @@ -141,20 +139,3 @@ return req->callback; } - - -void -nm_request_set_ret_code(NMRequest * req, NMERR_T rc) -{ - if (req) - req->ret_code = rc; -} - -NMERR_T -nm_request_get_ret_code(NMRequest * req) -{ - if (req) - return req->ret_code; - else - return (NMERR_T) - 1; -}
--- a/libpurple/protocols/novell/nmrequest.h Sun Nov 03 16:35:44 2019 -0500 +++ b/libpurple/protocols/novell/nmrequest.h Mon Nov 04 01:18:24 2019 +0000 @@ -30,12 +30,11 @@ * * @param cmd The request command string (e.g. "login") * @param trans_id The request transaction id - * @param gmt The time in seconds that the request was created * * @return The new request object */ -NMRequest *nm_create_request(const char *cmd, int trans_id, int gmt, nm_response_cb cb, - gpointer resp_data, gpointer user_define); +NMRequest *nm_create_request(const char *cmd, int trans_id, nm_response_cb cb, + gpointer resp_data, gpointer user_define); /** * Release a request object. @@ -85,15 +84,6 @@ void nm_request_set_user_define(NMRequest * req, gpointer user_define); /** - * Set the return code. This is the return code that we received in - * the server response fields. - * - * @param req The request object - * @param rc The return code to set - */ -void nm_request_set_ret_code(NMRequest * req, NMERR_T rc); - -/** * Get the transaction id for this request. * * @param req The request object @@ -138,13 +128,4 @@ */ nm_response_cb nm_request_get_callback(NMRequest * req); -/** - * Get the return code - * - * @param req The request object - * - * @return The return code (from the response fields) - */ -NMERR_T nm_request_get_ret_code(NMRequest * req); - #endif /* PURPLE_NOVELL_NMREQUEST_H */
--- a/libpurple/protocols/novell/nmuser.c Sun Nov 03 16:35:44 2019 -0500 +++ b/libpurple/protocols/novell/nmuser.c Mon Nov 04 01:18:24 2019 +0000 @@ -71,8 +71,6 @@ user->name = g_strdup(name); user->conn = nm_create_conn(server_addr, port); - user->conn->addr = g_strdup(server_addr); - user->conn->port = port; user->evt_callback = event_callback; user->client_data = data;
--- a/libpurple/protocols/novell/nmuser.h Sun Nov 03 16:35:44 2019 -0500 +++ b/libpurple/protocols/novell/nmuser.h Mon Nov 04 01:18:24 2019 +0000 @@ -81,9 +81,6 @@ /* Our connection information */ NMConn *conn; - /* Our public IP address */ - char *address; - /* This is the contact list */ NMFolder *root_folder; @@ -110,15 +107,6 @@ GSList *allow_list; GSList *deny_list; - /* Pending requests. If we need to go to the server to more info - * before processing a request we will queue it up and process when - * we get a response - */ - GSList *pending_requests; - - /* Pending events. Same as above except for events. */ - GSList *pending_events; - /* Generic pointer to data needed by the client * using the API */
--- a/libpurple/protocols/novell/novell.c Sun Nov 03 16:35:44 2019 -0500 +++ b/libpurple/protocols/novell/novell.c Mon Nov 04 01:18:24 2019 +0000 @@ -1680,7 +1680,7 @@ gc = data; user = purple_connection_get_protocol_data(gc); - user->conn->ssl_conn->data = NULL; + user->conn->data = NULL; purple_connection_ssl_error (gc, error); } @@ -1743,7 +1743,6 @@ rc = nm_send_login(user, pwd, my_addr, ua, _login_resp_cb, NULL); if (rc == NM_OK) { - conn->connected = TRUE; purple_ssl_input_add(gsc, novell_ssl_recv_cb, gc); } else { purple_connection_error(gc, @@ -2205,16 +2204,13 @@ purple_connection_update_progress(gc, _("Connecting"), 1, NOVELL_CONNECT_STEPS); - user->conn->use_ssl = TRUE; - - user->conn->ssl_conn = g_new0(NMSSLConn, 1); - user->conn->ssl_conn->read = (nm_ssl_read_cb) purple_ssl_read; - user->conn->ssl_conn->write = (nm_ssl_write_cb) purple_ssl_write; - - user->conn->ssl_conn->data = purple_ssl_connect(user->client_data, - user->conn->addr, user->conn->port, - novell_ssl_connected_cb, novell_ssl_connect_error, gc); - if (user->conn->ssl_conn->data == NULL) { + user->conn->read = (nm_ssl_read_cb)purple_ssl_read; + user->conn->write = (nm_ssl_write_cb)purple_ssl_write; + + user->conn->data = purple_ssl_connect( + user->client_data, user->conn->addr, user->conn->port, + novell_ssl_connected_cb, novell_ssl_connect_error, gc); + if (user->conn->data == NULL) { purple_connection_error(gc, PURPLE_CONNECTION_ERROR_NO_SSL_SUPPORT, _("SSL support unavailable")); @@ -2234,8 +2230,8 @@ user = purple_connection_get_protocol_data(gc); if (user) { conn = user->conn; - if (conn && conn->ssl_conn) { - purple_ssl_close(user->conn->ssl_conn->data); + if (conn) { + purple_ssl_close(user->conn->data); } nm_deinitialize_user(user); }
--- a/libpurple/protocols/silc/util.c Sun Nov 03 16:35:44 2019 -0500 +++ b/libpurple/protocols/silc/util.c Mon Nov 04 01:18:24 2019 +0000 @@ -247,7 +247,7 @@ if ((st.st_mode & 0777) != 0600) { purple_debug_warning("silc", "Wrong permissions in your private key file `%s'!\n" "Trying to change them ...\n", file_private_key); - if ((fd == -1) || (fchmod(fd, S_IRUSR | S_IWUSR)) == -1) { + if ((fd == -1) || (g_fchmod(fd, S_IRUSR | S_IWUSR)) == -1) { purple_debug_error("silc", "Failed to change permissions for private key file!\n" "Permissions for your private key file must be 0600.\n");
--- a/libpurple/protocols/zephyr/ZVariables.c Sun Nov 03 16:35:44 2019 -0500 +++ b/libpurple/protocols/zephyr/ZVariables.c Mon Nov 04 01:18:24 2019 +0000 @@ -87,7 +87,7 @@ g_free(varfile); return(EIO); /* can't rely on errno */ } - if (rename(varfilebackup, varfile)) { + if (g_rename(varfilebackup, varfile)) { g_free(varfilebackup); g_free(varfile); return (errno); @@ -127,7 +127,7 @@ g_free(varfile); return(EIO); /* errno isn't reliable */ } - if (rename(varfilebackup, varfile)) { + if (g_rename(varfilebackup, varfile)) { g_free(varfilebackup); g_free(varfile); return (errno);
--- a/libpurple/win32/libc_interface.c Sun Nov 03 16:35:44 2019 -0500 +++ b/libpurple/win32/libc_interface.c Mon Nov 04 01:18:24 2019 +0000 @@ -488,18 +488,3 @@ return res; } - -/* time.h */ - -struct tm * wpurple_localtime_r (const time_t *time, struct tm *resultp) { - struct tm* tmptm; - - if(!time) - return NULL; - tmptm = localtime(time); - if(resultp && tmptm) - return memcpy(resultp, tmptm, sizeof(struct tm)); - else - return NULL; -} -
--- a/libpurple/win32/libc_interface.h Sun Nov 03 16:35:44 2019 -0500 +++ b/libpurple/win32/libc_interface.h Mon Nov 04 01:18:24 2019 +0000 @@ -103,8 +103,6 @@ (unsigned int)ntohl( netlong ) /* string.h */ -#define hstrerror( herror ) \ -wpurple_strerror( errno ) #define strerror( errornum ) \ wpurple_strerror( errornum ) #define g_strerror( errornum ) \ @@ -120,15 +118,9 @@ #define close( fd ) \ wpurple_close( fd ) -#ifndef sleep -#define sleep(x) Sleep((x)*1000) -#endif - #define gethostname( name, size ) \ wpurple_gethostname( name, size ) -#define fsync(fd) _commit(fd) - /* sys/time.h */ #define gettimeofday( timeval, timezone ) \ wpurple_gettimeofday( timeval, timezone ) @@ -136,24 +128,10 @@ /* stdio.h */ #if !defined(__MINGW64_VERSION_MAJOR) || __MINGW64_VERSION_MAJOR < 3 || \ !defined(IS_WIN32_CROSS_COMPILED) -# undef snprintf -# define snprintf _snprintf # undef vsnprintf # define vsnprintf _vsnprintf #endif -#define rename( oldname, newname ) \ -g_rename( oldname, newname ) - -/* sys/stat.h */ -#define fchmod(a,b) - -/* time.h */ -/* XXX: it may be also defined by pthread.h */ -#undef localtime_r -#define localtime_r( time, resultp ) \ -wpurple_localtime_r( time, resultp ) - G_END_DECLS #endif /* PURPLE_WIN32_LIBC_INTERFACE_H */
--- a/libpurple/win32/libc_internal.h Sun Nov 03 16:35:44 2019 -0500 +++ b/libpurple/win32/libc_internal.h Mon Nov 04 01:18:24 2019 +0000 @@ -101,10 +101,6 @@ #endif int wpurple_gettimeofday(struct timeval *p, struct timezone *z); -/* time.h */ -struct tm *wpurple_localtime_r(const time_t *time, struct tm *resultp); - - /* unistd.h */ int wpurple_read(int fd, void *buf, unsigned int size); int wpurple_write(int fd, const void *buf, unsigned int size);
--- a/libpurple/xmlnode.c Sun Nov 03 16:35:44 2019 -0500 +++ b/libpurple/xmlnode.c Mon Nov 04 01:18:24 2019 +0000 @@ -711,7 +711,7 @@ xpd->error = TRUE; va_start(args, msg); - vsnprintf(errmsg, sizeof(errmsg), msg, args); + g_vsnprintf(errmsg, sizeof(errmsg), msg, args); va_end(args); purple_debug_error("xmlnode", "Error parsing xml file: %s", errmsg);
--- a/meson.build Sun Nov 03 16:35:44 2019 -0500 +++ b/meson.build Mon Nov 04 01:18:24 2019 +0000 @@ -94,7 +94,7 @@ conf.set('WIN32_LEAN_AND_MEAN', true) conf.set('LIBPIDGIN_DLL_NAMEW', - 'L"libpidgin-@0@.dll"'.format(purple_soversion)) + 'L"libpidgin3-@0@.dll"'.format(purple_soversion)) else IS_WIN32 = false ws2_32 = []
--- a/pidgin/gtknotify.c Sun Nov 03 16:35:44 2019 -0500 +++ b/pidgin/gtknotify.c Mon Nov 04 01:18:24 2019 +0000 @@ -1157,7 +1157,9 @@ userinfo_hash(PurpleAccount *account, const char *who) { char key[256]; - snprintf(key, sizeof(key), "%s - %s", purple_account_get_username(account), purple_normalize(account, who)); + g_snprintf(key, sizeof(key), "%s - %s", + purple_account_get_username(account), + purple_normalize(account, who)); return g_utf8_strup(key, -1); }
--- a/pidgin/gtkutils.c Sun Nov 03 16:35:44 2019 -0500 +++ b/pidgin/gtkutils.c Mon Nov 04 01:18:24 2019 +0000 @@ -2425,10 +2425,10 @@ gtk_style_context_get_background_color(context, gtk_style_context_get_state(context), &bg); - snprintf(dim_grey_string, sizeof(dim_grey_string), "#%02x%02x%02x", - (unsigned int)((fg.red + bg.red) * 0.5 * 255), - (unsigned int)((fg.green + bg.green) * 0.5 * 255), - (unsigned int)((fg.blue + bg.blue) * 0.5 * 255)); + g_snprintf(dim_grey_string, sizeof(dim_grey_string), "#%02x%02x%02x", + (unsigned int)((fg.red + bg.red) * 0.5 * 255), + (unsigned int)((fg.green + bg.green) * 0.5 * 255), + (unsigned int)((fg.blue + bg.blue) * 0.5 * 255)); return dim_grey_string; }
--- a/pidgin/libpidgin.c Sun Nov 03 16:35:44 2019 -0500 +++ b/pidgin/libpidgin.c Mon Nov 04 01:18:24 2019 +0000 @@ -526,31 +526,35 @@ * useful signals like SIGCHLD, so we unblock all the ones we * * declare a handler for. thanks JSeymour and Vann. */ if (sigemptyset(&sigset)) { - snprintf(errmsg, sizeof(errmsg), "Warning: couldn't initialise empty signal set"); + g_snprintf(errmsg, sizeof(errmsg), + "Warning: couldn't initialise empty signal set"); perror(errmsg); } for(sig_indx = 0; catch_sig_list[sig_indx] != -1; ++sig_indx) { if(signal(catch_sig_list[sig_indx], sighandler) == SIG_ERR) { - snprintf(errmsg, sizeof(errmsg), "Warning: couldn't set signal %d for catching", - catch_sig_list[sig_indx]); + g_snprintf(errmsg, sizeof(errmsg), + "Warning: couldn't set signal %d for catching", + catch_sig_list[sig_indx]); perror(errmsg); } if(sigaddset(&sigset, catch_sig_list[sig_indx])) { - snprintf(errmsg, sizeof(errmsg), "Warning: couldn't include signal %d for unblocking", - catch_sig_list[sig_indx]); + g_snprintf(errmsg, sizeof(errmsg), + "Warning: couldn't include signal %d for unblocking", + catch_sig_list[sig_indx]); perror(errmsg); } } for(sig_indx = 0; ignore_sig_list[sig_indx] != -1; ++sig_indx) { if(signal(ignore_sig_list[sig_indx], SIG_IGN) == SIG_ERR) { - snprintf(errmsg, sizeof(errmsg), "Warning: couldn't set signal %d to ignore", - ignore_sig_list[sig_indx]); + g_snprintf(errmsg, sizeof(errmsg), + "Warning: couldn't set signal %d to ignore", + ignore_sig_list[sig_indx]); perror(errmsg); } } if (sigprocmask(SIG_UNBLOCK, &sigset, NULL)) { - snprintf(errmsg, sizeof(errmsg), "Warning: couldn't unblock signals"); + g_snprintf(errmsg, sizeof(errmsg), "Warning: couldn't unblock signals"); perror(errmsg); } }
--- a/pidgin/meson.build Sun Nov 03 16:35:44 2019 -0500 +++ b/pidgin/meson.build Mon Nov 04 01:18:24 2019 +0000 @@ -156,13 +156,7 @@ install_headers(libpidgin_headers, subdir : 'pidgin-3') - libpidgin_inc = include_directories('.') - libpidgin = shared_library('pidgin3', - libpidgin_SOURCES, - package_revision, - include_directories : [toplevel_inc], - version : PURPLE_LIB_VERSION, - dependencies : [ + _libpidgin_dependencies = [ glib, gstreamer_video, gtk, @@ -171,9 +165,18 @@ math, libsoup, talkatu_dep, - x11, libpurple_dep, - ], + ] + if x11.found() + _libpidgin_dependencies += x11 + endif + libpidgin_inc = include_directories('.') + libpidgin = shared_library('pidgin3', + libpidgin_SOURCES, + package_revision, + include_directories : [toplevel_inc], + version : PURPLE_LIB_VERSION, + dependencies : _libpidgin_dependencies, install : true) libpidgin_dep = declare_dependency( include_directories : [toplevel_inc, libpidgin_inc],
--- a/pidgin/win32/untar.c Sun Nov 03 16:35:44 2019 -0500 +++ b/pidgin/win32/untar.c Mon Nov 04 01:18:24 2019 +0000 @@ -392,8 +392,8 @@ memset(nbuf, 0, sizeof nbuf); if ((tblk)->prefix[0]) { - snprintf(nbuf, sizeof(nbuf), "%s/%s", - (tblk)->prefix, (tblk)->filename); + g_snprintf(nbuf, sizeof(nbuf), "%s/%s", (tblk)->prefix, + (tblk)->filename); } else {