libpurple/example/nullclient.c

changeset 38352
7b6c89006e93
parent 37153
c0eccc6696da
child 38422
21407727dac8
equal deleted inserted replaced
38348:7687aa5f7880 38352:7b6c89006e93
28 28
29 #include <signal.h> 29 #include <signal.h>
30 #include <string.h> 30 #include <string.h>
31 #ifdef _WIN32 31 #ifdef _WIN32
32 # include <conio.h> 32 # include <conio.h>
33 # include "win32/win32dep.h"
34 #else 33 #else
35 # include <unistd.h> 34 # include <unistd.h>
36 #endif 35 #endif
37 36
38 #include "defines.h" 37 #include "defines.h"
84 if (condition & PURPLE_INPUT_READ) 83 if (condition & PURPLE_INPUT_READ)
85 cond |= PURPLE_GLIB_READ_COND; 84 cond |= PURPLE_GLIB_READ_COND;
86 if (condition & PURPLE_INPUT_WRITE) 85 if (condition & PURPLE_INPUT_WRITE)
87 cond |= PURPLE_GLIB_WRITE_COND; 86 cond |= PURPLE_GLIB_WRITE_COND;
88 87
89 #if defined _WIN32 && !defined WINPIDGIN_USE_GLIB_IO_CHANNEL 88 #ifdef _WIN32
90 channel = wpurple_g_io_channel_win32_new_socket(fd); 89 channel = g_io_channel_win32_new_socket(fd);
91 #else 90 #else
92 channel = g_io_channel_unix_new(fd); 91 channel = g_io_channel_unix_new(fd);
93 #endif 92 #endif
94 closure->result = g_io_add_watch_full(channel, G_PRIORITY_DEFAULT, 93 closure->result = g_io_add_watch_full(channel, G_PRIORITY_DEFAULT,
95 cond, purple_glib_io_invoke, closure, purple_glib_io_destroy); 94 cond, purple_glib_io_invoke, closure, purple_glib_io_destroy);

mercurial