From: Matthias Clasen Date: Mon, 8 Dec 2008 04:38:54 +0000 (+0000) Subject: Support compilers that don't understand ISO C varargs macros. Patch by X-Git-Url: http://git.openbox.org/?a=commitdiff_plain;h=b2f0d44acbf4917547ba2bd5b891305bf23f16b1;p=dana%2Fcg-glib.git Support compilers that don't understand ISO C varargs macros. Patch by * tests/live-g-file.c: Support compilers that don't understand ISO C varargs macros. Patch by Eric Lamarque svn path=/trunk/; revision=7734 --- diff --git a/gio/ChangeLog b/gio/ChangeLog index 632c7d94..b5c82059 100644 --- a/gio/ChangeLog +++ b/gio/ChangeLog @@ -1,3 +1,10 @@ +2008-12-07 Matthias Clasen + + 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 Bug 526320 – should not list mounts that the user doesn't have diff --git a/gio/tests/live-g-file.c b/gio/tests/live-g-file.c index d0d4e8ac..fe11d318 100644 --- a/gio/tests/live-g-file.c +++ b/gio/tests/live-g-file.c @@ -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,