From: Chun-wei Fan Date: Thu, 18 Jul 2013 09:22:53 +0000 (+0800) Subject: gsourceclosure.c: Fix build on Windows X-Git-Tag: 2.37.5~27 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=114b1ccf78849988567011c36dd5e868a66a3431;p=platform%2Fupstream%2Fglib.git gsourceclosure.c: Fix build on Windows GPid is a HANDLE (aka void *) on Windows, not an int, so treat pid accordingly on Windows, as using pid as a gulong directly would likely be undesirable on Windows https://bugzilla.gnome.org/show_bug.cgi?id=704447 --- diff --git a/gobject/gsourceclosure.c b/gobject/gsourceclosure.c index a16b6c5..f6be8de 100644 --- a/gobject/gsourceclosure.c +++ b/gobject/gsourceclosure.c @@ -117,8 +117,14 @@ g_child_watch_closure_callback (GPid pid, g_value_init (&result_value, G_TYPE_BOOLEAN); +#ifdef G_OS_UNIX g_value_init (¶ms[0], G_TYPE_ULONG); g_value_set_ulong (¶ms[0], pid); +#endif +#ifdef G_OS_WIN32 + g_value_init (¶ms[0], G_TYPE_POINTER); + g_value_set_pointer (¶ms[0], pid); +#endif g_value_init (¶ms[1], G_TYPE_INT); g_value_set_int (¶ms[1], status);