Support compilers that don't understand ISO C varargs macros. Patch by
authorMatthias Clasen <matthiasc@src.gnome.org>
Mon, 8 Dec 2008 04:38:54 +0000 (04:38 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Mon, 8 Dec 2008 04:38:54 +0000 (04:38 +0000)
        * tests/live-g-file.c: Support compilers that don't understand
        ISO C varargs macros. Patch by Eric Lamarque

svn path=/trunk/; revision=7734

gio/ChangeLog
gio/tests/live-g-file.c

index 632c7d9..b5c8205 100644 (file)
@@ -1,4 +1,11 @@
 2008-12-07  Matthias Clasen  <mclasen@redhat.com>
+
+       Bug 558458 – Cannot build gio tests on Solaris using SUN cc
+
+       * tests/live-g-file.c: Support compilers that don't understand
+       ISO C varargs macros. Patch by Eric Lamarque
+
+2008-12-07  Matthias Clasen  <mclasen@redhat.com>
        
        Bug 526320 – should not list mounts that the user doesn't have 
        permission to use
index d0d4e8a..fe11d31 100644 (file)
@@ -104,7 +104,19 @@ static gboolean write_test;
 static gboolean verbose;
 static gboolean posix_compat;
 
+#ifdef G_HAVE_ISO_VARARGS
+#define log(...) if (verbose)  g_print (__VA_ARGS__)
+#elif defined(G_HAVE_GNUC_VARARGS)
 #define log(msg...) if (verbose)  g_print (msg)
+#else  /* no varargs macros */
+static void log (const g_char *format, ...)
+{
+  va_list args;
+  va_start (args, format);
+  if (verbose) g_print (format, args);
+  va_end (args);
+}
+#endif
 
 static GFile *
 create_empty_file (GFile * parent, const char *filename,