GCancellable: Fix build on Win32
authorDieter Verfaillie <dieterv@optionexplicit.be>
Thu, 30 Jun 2011 13:32:32 +0000 (09:32 -0400)
committerColin Walters <walters@verbum.org>
Thu, 30 Jun 2011 13:32:32 +0000 (09:32 -0400)
https://bugzilla.gnome.org/show_bug.cgi?id=653522

gio/gcancellable.c

index 40185f73f4a4af4e302b9263a6fab49f20c2eafd..f5cfdd90e515c404034520bfc5385f54fa0a5336 100644 (file)
@@ -198,16 +198,16 @@ g_cancellable_class_init (GCancellableClass *klass)
 static void
 g_cancellable_write_cancelled (GCancellable *cancellable)
 {
-#ifdef G_OS_WIN32
-  if (priv->event)
-    SetEvent (priv->event);
-#else
   gssize c;
   GCancellablePrivate *priv;
   const char ch = 'x';
 
   priv = cancellable->priv;
 
+#ifdef G_OS_WIN32
+  if (priv->event)
+    SetEvent (priv->event);
+#else
 
   if (priv->cancel_pipe[0] == -1)
     return;
@@ -225,12 +225,12 @@ g_cancellable_write_cancelled (GCancellable *cancellable)
 
       return;
     }
-#endif
+#endif /* HAVE_EVENTFD */
 
   do
     c = write (priv->cancel_pipe[1], &ch, 1);
   while (c == -1 && errno == EINTR);
-#endif
+#endif /* G_OS_WIN32 */
 }
 
 #ifndef G_OS_WIN32