From b056ba8ec2e84d85318c64c47289f4eaaafe4057 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Fri, 9 Jan 2009 05:50:59 +0000 Subject: [PATCH] =?UTF-8?q?=20=20=20=20=20=20=20=20Bug=20558458=20?= =?UTF-8?q?=E2=80=93=20Cannot=20build=20gio=20tests=20on=20Solaris=20using?= =?UTF-8?q?=20SUN=20cc?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * tests/live-g-file.c: Support compilers that don't understand ISO C varargs macros. Patch by Eric Lamarque svn path=/branches/glib-2-18/; revision=7787 --- gio/ChangeLog | 9 +++++++++ gio/tests/live-g-file.c | 14 ++++++++++++++ 2 files changed, 23 insertions(+) diff --git a/gio/ChangeLog b/gio/ChangeLog index 591bfb816..a7300acd4 100644 --- a/gio/ChangeLog +++ b/gio/ChangeLog @@ -1,3 +1,12 @@ +2009-01-09 Matthias Clasen + + Merged from trunk: + + 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 + 2009-01-09 Matthias Clasen Merged from trunk: diff --git a/gio/tests/live-g-file.c b/gio/tests/live-g-file.c index 652458961..51ebfbb86 100644 --- a/gio/tests/live-g-file.c +++ b/gio/tests/live-g-file.c @@ -104,7 +104,21 @@ 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,