glib r7734 - in trunk/gio: . tests



Author: matthiasc
Date: Mon Dec  8 04:38:54 2008
New Revision: 7734
URL: http://svn.gnome.org/viewvc/glib?rev=7734&view=rev

Log:
        * tests/live-g-file.c: Support compilers that don't understand
        ISO C varargs macros. Patch by Eric Lamarque




Modified:
   trunk/gio/ChangeLog
   trunk/gio/tests/live-g-file.c

Modified: trunk/gio/tests/live-g-file.c
==============================================================================
--- trunk/gio/tests/live-g-file.c	(original)
+++ trunk/gio/tests/live-g-file.c	Mon Dec  8 04:38:54 2008
@@ -104,7 +104,19 @@
 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,



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