win32: move some code into #ifdef G_OS_UNIX

Fix various bits of code/declarations that are only used by G_OS_UNIX
but were still visible to G_OS_WIN32.

https://bugzilla.gnome.org/show_bug.cgi?id=688109
This commit is contained in:
Dan Winship
2012-11-11 11:32:40 -05:00
parent 731b469908
commit f248c86b0a
4 changed files with 16 additions and 7 deletions

View File

@@ -963,6 +963,7 @@ write_message_async_cb (GObject *source_object,
* write-lock is not held on entry
* output_pending is PENDING_WRITE on entry
*/
#ifdef G_OS_UNIX
static gboolean
on_socket_ready (GSocket *socket,
GIOCondition condition,
@@ -972,6 +973,7 @@ on_socket_ready (GSocket *socket,
write_message_continue_writing (data);
return FALSE; /* remove source */
}
#endif
/* called in private thread shared by all GDBusConnection instances
*
@@ -982,15 +984,17 @@ static void
write_message_continue_writing (MessageToWriteData *data)
{
GOutputStream *ostream;
GSimpleAsyncResult *simple;
#ifdef G_OS_UNIX
GSimpleAsyncResult *simple;
GUnixFDList *fd_list;
#endif
#ifdef G_OS_UNIX
/* Note: we can't access data->simple after calling g_async_result_complete () because the
* callback can free @data and we're not completing in idle. So use a copy of the pointer.
*/
simple = data->simple;
#endif
ostream = g_io_stream_get_output_stream (data->worker->stream);
#ifdef G_OS_UNIX
@@ -1106,7 +1110,9 @@ write_message_continue_writing (MessageToWriteData *data)
write_message_async_cb,
data);
}
#ifdef G_OS_UNIX
out:
#endif
;
}