/pidgin/main: 1777950ff49f: cross-win32: fix pidgin code warning...

Tomasz Wasilczyk twasilczyk at pidgin.im
Tue Apr 15 20:02:10 EDT 2014


Changeset: 1777950ff49fc539d1ffd04b393054f6015e6299
Author:	 Tomasz Wasilczyk <twasilczyk at pidgin.im>
Date:	 2014-04-16 02:02 +0200
Branch:	 default
URL: https://hg.pidgin.im/pidgin/main/rev/1777950ff49f

Description:

cross-win32: fix pidgin code warnings and errors

diffstat:

 configure.ac                                   |   3 +-
 pidgin/gtkdnd-hints.c                          |   4 --
 pidgin/gtkeventloop.c                          |   4 +--
 pidgin/gtkutils.c                              |   2 +-
 pidgin/pidgin.h                                |   2 +-
 pidgin/plugins/musicmessaging/musicmessaging.c |  38 ++++++++++++++++++++-----
 6 files changed, 35 insertions(+), 18 deletions(-)

diffs (160 lines):

diff --git a/configure.ac b/configure.ac
--- a/configure.ac
+++ b/configure.ac
@@ -131,6 +131,7 @@ case "$host" in
 		;;
 	*)
 		is_win32="no"
+		AC_CHECK_HEADERS(signal.h)
 		;;
 esac
 AM_CONDITIONAL(IS_WIN32, test "x$is_win32" = "xyes")
@@ -138,7 +139,7 @@ AM_CONDITIONAL(IS_WIN32, test "x$is_win3
 dnl Checks for header files.
 AC_HEADER_STDC
 AC_HEADER_SYS_WAIT
-AC_CHECK_HEADERS(arpa/nameser_compat.h fcntl.h sys/time.h unistd.h locale.h signal.h stdint.h)
+AC_CHECK_HEADERS(arpa/nameser_compat.h fcntl.h sys/time.h unistd.h locale.h stdint.h)
 
 dnl Checks for typedefs, structures, and compiler characteristics.
 AC_C_CONST
diff --git a/pidgin/gtkdnd-hints.c b/pidgin/gtkdnd-hints.c
--- a/pidgin/gtkdnd-hints.c
+++ b/pidgin/gtkdnd-hints.c
@@ -26,10 +26,6 @@
 #include <gdk/gdk.h>
 #include <gdk-pixbuf/gdk-pixbuf.h>
 
-#ifdef _WIN32
-#include "win32dep.h"
-#endif
-
 #include "gtk3compat.h"
 
 typedef struct
diff --git a/pidgin/gtkeventloop.c b/pidgin/gtkeventloop.c
--- a/pidgin/gtkeventloop.c
+++ b/pidgin/gtkeventloop.c
@@ -22,9 +22,7 @@
 #include <glib.h>
 #include "gtkeventloop.h"
 #include "eventloop.h"
-#ifdef _WIN32
-#include "win32dep.h"
-#endif
+#include "internal.h"
 
 #define PIDGIN_READ_COND  (G_IO_IN | G_IO_HUP | G_IO_ERR)
 #define PIDGIN_WRITE_COND (G_IO_OUT | G_IO_HUP | G_IO_ERR | G_IO_NVAL)
diff --git a/pidgin/gtkutils.c b/pidgin/gtkutils.c
--- a/pidgin/gtkutils.c
+++ b/pidgin/gtkutils.c
@@ -33,7 +33,7 @@
 #ifdef USE_GTKSPELL
 # include <gtkspell/gtkspell.h>
 # ifdef _WIN32
-#  include "wspell.h"
+#  include "win32/wspell.h"
 # endif
 #endif
 
diff --git a/pidgin/pidgin.h b/pidgin/pidgin.h
--- a/pidgin/pidgin.h
+++ b/pidgin/pidgin.h
@@ -32,7 +32,7 @@
 #include <gtk/gtk.h>
 
 #ifdef _WIN32
-# include "gtkwin32dep.h"
+#  include "win32/gtkwin32dep.h"
 #endif
 
 /**
diff --git a/pidgin/plugins/musicmessaging/musicmessaging.c b/pidgin/plugins/musicmessaging/musicmessaging.c
--- a/pidgin/plugins/musicmessaging/musicmessaging.c
+++ b/pidgin/plugins/musicmessaging/musicmessaging.c
@@ -85,10 +85,20 @@ DBusGProxy *proxy;
 #define DBUS_INTERFACE_GSCORE "org.gscore.GScoreInterface"
 
 /* Define the functions to export for use with DBus */
-DBUS_EXPORT void music_messaging_change_request (const int session, const char *command, const char *parameters);
-DBUS_EXPORT void music_messaging_change_confirmed (const int session, const char *command, const char *parameters);
-DBUS_EXPORT void music_messaging_change_failed (const int session, const char *id, const char *command, const char *parameters);
-DBUS_EXPORT void music_messaging_done_session (const int session);
+DBUS_EXPORT void
+music_messaging_change_request(const int session, const char *command,
+	const char *parameters);
+
+DBUS_EXPORT void
+music_messaging_change_confirmed(const int session, const char *command,
+	const char *parameters);
+
+DBUS_EXPORT void
+music_messaging_change_failed(const int session, const char *id,
+	const char *command, const char *parameters);
+
+DBUS_EXPORT void
+music_messaging_done_session(const int session);
 
 /* This file has been generated by the #dbus-analize-functions.py
    script.  It contains dbus wrappers for the four functions declared
@@ -96,7 +106,9 @@ DBUS_EXPORT void music_messaging_done_se
 #include "music-messaging-bindings.c"
 
 /* Exported functions */
-void music_messaging_change_request(const int session, const char *command, const char *parameters)
+DBUS_EXPORT void
+music_messaging_change_request(const int session, const char *command,
+	const char *parameters)
 {
 
 	MMConversation *mmconv = (MMConversation *)g_list_nth_data(conversations, session);
@@ -120,7 +132,9 @@ void music_messaging_change_request(cons
 
 }
 
-void music_messaging_change_confirmed(const int session, const char *command, const char *parameters)
+DBUS_EXPORT void
+music_messaging_change_confirmed(const int session, const char *command,
+	const char *parameters)
 {
 
 	MMConversation *mmconv = (MMConversation *)g_list_nth_data(conversations, session);
@@ -141,7 +155,9 @@ void music_messaging_change_confirmed(co
 
 }
 
-void music_messaging_change_failed(const int session, const char *id, const char *command, const char *parameters)
+DBUS_EXPORT void
+music_messaging_change_failed(const int session, const char *id,
+	const char *command, const char *parameters)
 {
 	MMConversation *mmconv = (MMConversation *)g_list_nth_data(conversations, session);
 
@@ -163,7 +179,8 @@ void music_messaging_change_failed(const
 	}
 }
 
-void music_messaging_done_session(const int session)
+DBUS_EXPORT void
+music_messaging_done_session(const int session)
 {
 	MMConversation *mmconv = (MMConversation *)g_list_nth_data(conversations, session);
 
@@ -552,11 +569,16 @@ static void run_editor (MMConversation *
 
 static void kill_editor (MMConversation *mmconv)
 {
+#ifdef HAVE_SIGNAL_H
 	if (mmconv->pid)
 	{
 		kill(mmconv->pid, SIGINT);
 		mmconv->pid = 0;
 	}
+#else
+	purple_debug_warning("musicmessaging",
+		"kill() is not supported on this platform");
+#endif
 }
 
 static void init_conversation (PurpleConversation *conv)



More information about the Commits mailing list