From 7f4864e58d4ee438a83cbf15f76e7d7aa171016c Mon Sep 17 00:00:00 2001 From: Dan Winship Date: Fri, 26 Sep 2008 16:19:35 +0000 Subject: Bug 505361 - gunixinputstream.c assumes poll() available Bug 509446 - portable blocking gio cancellation * gcancellable.c (g_cancellable_make_pollfd): New method to make a GPollFD for a cancellable (which is slightly more complicated on Windows than Unix). * gunixinputstream.c (g_unix_input_stream_read): * gunixoutputstream.c (g_unix_output_stream_write): Use g_cancellable_make_pollfd() and g_poll() rather than using poll() directly. * tests/unix-streams.c: test of GUnixInputStream, GUnixOutputStream, and GCancellable. svn path=/trunk/; revision=7553 --- gio/gcancellable.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'gio/gcancellable.h') diff --git a/gio/gcancellable.h b/gio/gcancellable.h index 364311f28..c327fe7e9 100644 --- a/gio/gcancellable.h +++ b/gio/gcancellable.h @@ -68,7 +68,11 @@ GCancellable *g_cancellable_new (void); gboolean g_cancellable_is_cancelled (GCancellable *cancellable); gboolean g_cancellable_set_error_if_cancelled (GCancellable *cancellable, GError **error); + int g_cancellable_get_fd (GCancellable *cancellable); +void g_cancellable_make_pollfd (GCancellable *cancellable, + GPollFD *pollfd); + GCancellable *g_cancellable_get_current (void); void g_cancellable_push_current (GCancellable *cancellable); void g_cancellable_pop_current (GCancellable *cancellable); -- cgit v1.2.1