Fix build on Visual C++
authorChun-wei Fan <fanchunwei@src.gnome.org>
Fri, 17 Aug 2012 11:22:43 +0000 (19:22 +0800)
committerChun-wei Fan <fanchunwei@src.gnome.org>
Fri, 17 Aug 2012 11:22:43 +0000 (19:22 +0800)
-glib/gmarkup.c: Use G_VA_COPY() instead of va_copy() as va_copy() may not
 be universally available.
-gio/gtestdbus.c: Include io.h on Windows for close()

gio/gtestdbus.c
glib/gmarkup.c

index 197b2d8..e80c6e1 100644 (file)
@@ -30,6 +30,9 @@
 #ifdef HAVE_UNISTD_H
 #include <unistd.h>
 #endif
+#ifdef G_OS_WIN32
+#include <io.h>
+#endif
 
 #include <glib.h>
 
index 4fda725..86e60bb 100644 (file)
@@ -2580,7 +2580,7 @@ _g_markup_collect_attributesv (const gchar         *element_name,
 
   /* Take a copy of the va_list so that we can iterate back over it in case of
    * errors. */
-  va_copy (ap2, ap);
+  G_VA_COPY (ap2, ap);
 
   while (type != G_MARKUP_COLLECT_INVALID)
     {