[glib] Fix build on Visual C++



commit 2954f70d39198e67ff6a364a4f5c275381af1a75
Author: Chun-wei Fan <fanchunwei src gnome org>
Date:   Fri Aug 17 19:22:43 2012 +0800

    Fix build on Visual C++
    
    -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 |    3 +++
 glib/gmarkup.c  |    2 +-
 2 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/gio/gtestdbus.c b/gio/gtestdbus.c
index 197b2d8..e80c6e1 100644
--- a/gio/gtestdbus.c
+++ b/gio/gtestdbus.c
@@ -30,6 +30,9 @@
 #ifdef HAVE_UNISTD_H
 #include <unistd.h>
 #endif
+#ifdef G_OS_WIN32
+#include <io.h>
+#endif
 
 #include <glib.h>
 
diff --git a/glib/gmarkup.c b/glib/gmarkup.c
index 4fda725..86e60bb 100644
--- a/glib/gmarkup.c
+++ b/glib/gmarkup.c
@@ -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)
     {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]