[totem-pl-parser] utilize the variadic macro support in msvc newer than VS8
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [totem-pl-parser] utilize the variadic macro support in msvc newer than VS8
- Date: Tue, 20 Apr 2010 09:15:26 +0000 (UTC)
commit a7d91e7129517a99beb589f557ce5de04923641f
Author: Shixin Zeng <zeng shixin gmail com>
Date: Mon Apr 19 17:22:09 2010 -0500
utilize the variadic macro support in msvc newer than VS8
https://bugzilla.gnome.org/show_bug.cgi?id=575373
lib/totem_internal.h | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/lib/totem_internal.h b/lib/totem_internal.h
index 9e8f255..19c73c1 100644
--- a/lib/totem_internal.h
+++ b/lib/totem_internal.h
@@ -7,7 +7,11 @@
#ifdef __GNUC__
#define asprintf(STRINGPP, FORMAT, ARGS...) totem_private_asprintf((STRINGPP), FORMAT, ##ARGS)
#elif defined (_MSC_VER)
- #define asprintf(STRINGPP, FORMATARGS) totem_private_asprintf((STRINGPP), FORMATARGS)
+ #if _MSC_VER >= 1400 /* Variadic macro is supported since VS 8 */
+ #define asprintf(STRINGPP, FORMAT, ...) totem_private_asprintf(STRINGPP, FORMAT, __VA_ARGS__)
+ #else
+ #define asprintf(STRINGPP, FORMATARGS) totem_private_asprintf((STRINGPP), FORMATARGS)
+ #endif
#else
#define asprintf(STRINGPP, FORMAT, ...) totem_private_asprintf((STRINGPP), FORMAT, __VA_ARGS__)
#endif
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]