pidgin: 72ce62bc: incomplete win32 fixes

datallah at pidgin.im datallah at pidgin.im
Thu Feb 25 00:15:50 EST 2010


-----------------------------------------------------------------
Revision: 72ce62bc89529d54f8c67643075ba757ed609e0b
Ancestor: 9c9a290ca4fa389180eb9fe26bf745b04f4aa057
Author: datallah at pidgin.im
Date: 2010-02-25T05:09:02
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/72ce62bc89529d54f8c67643075ba757ed609e0b

Modified files:
        libpurple/example/nullclient.c

ChangeLog: 

incomplete win32 fixes

-------------- next part --------------
============================================================
--- libpurple/example/nullclient.c	587f78d7b0f0c1d170ac1eac35d526ca62efa8f8
+++ libpurple/example/nullclient.c	23ee636379a805df74c7580277b9937b7078cce7
@@ -27,7 +27,11 @@
 
 #include <signal.h>
 #include <string.h>
+#ifndef _WIN32
 #include <unistd.h>
+#else
+#include "win32/win32dep.h"
+#endif
 
 #include "defines.h"
 
@@ -80,7 +84,11 @@ static guint glib_input_add(gint fd, Pur
 	if (condition & PURPLE_INPUT_WRITE)
 		cond |= PURPLE_GLIB_WRITE_COND;
 
+#if defined _WIN32 && !defined WINPIDGIN_USE_GLIB_IO_CHANNEL
+	channel = wpurple_g_io_channel_win32_new_socket(fd);
+#else
 	channel = g_io_channel_unix_new(fd);
+#endif
 	closure->result = g_io_add_watch_full(channel, G_PRIORITY_DEFAULT, cond,
 					      purple_glib_io_invoke, closure, purple_glib_io_destroy);
 
@@ -253,12 +261,14 @@ int main(int argc, char *argv[])
 	PurpleSavedStatus *status;
 	char *res;
 
+#ifndef _WIN32
 	/* libpurple's built-in DNS resolution forks processes to perform
 	 * blocking lookups without blocking the main process.  It does not
 	 * handle SIGCHLD itself, so if the UI does not you quickly get an army
 	 * of zombie subprocesses marching around.
 	 */
 	signal(SIGCHLD, SIG_IGN);
+#endif
 
 	init_libpurple();
 


More information about the Commits mailing list