[mpich2-commits] r5528 - mpich2/trunk/src/include

balaji at mcs.anl.gov balaji at mcs.anl.gov
Thu Oct 22 09:42:47 CDT 2009


Author: balaji
Date: 2009-10-22 09:42:47 -0500 (Thu, 22 Oct 2009)
New Revision: 5528

Modified:
   mpich2/trunk/src/include/mpiu_valgrind.h
Log:
r5514 had fixed a bug with the incorrect endif placement in r5508, but
introduced a portability issue (turns out C89 only specifies ... in
functions, not macros). This commit fixes the portability issue.

Thanks to Dave for catching this.


Modified: mpich2/trunk/src/include/mpiu_valgrind.h
===================================================================
--- mpich2/trunk/src/include/mpiu_valgrind.h	2009-10-21 23:45:31 UTC (rev 5527)
+++ mpich2/trunk/src/include/mpiu_valgrind.h	2009-10-22 14:42:47 UTC (rev 5528)
@@ -62,7 +62,15 @@
 #  define MPIU_VG_CHECK_MEM_IS_ADDRESSABLE(addr_,len_) do{}while(0)
 #  define MPIU_VG_CREATE_BLOCK(addr_,len_,desc_)       do{}while(0)
 #  define MPIU_VG_RUNNING_ON_VALGRIND()                (0)/*always false*/
-#  define MPIU_VG_PRINTF_BACKTRACE(...)                do{}while(0)
+#  if defined(HAVE_MACRO_VA_ARGS)
+#    define MPIU_VG_PRINTF_BACKTRACE(...)              do{}while(0)
+#  else
+#    define MPIU_VG_PRINTF_BACKTRACE MPIU_VG_printf_do_nothing_func
+static inline void MPIU_VG_printf_do_nothing_func(char *fmt, ...)
+{
+    /* do nothing */
+}
+#  endif /* defined(HAVE_MACRO_VA_ARGS) */
 #  define MPIU_VG_CREATE_MEMPOOL(pool, rzB, is_zeroed) do{}while(0)
 #  define MPIU_VG_DESTROY_MEMPOOL(pool)                do{}while(0)
 #  define MPIU_VG_MEMPOOL_ALLOC(pool, addr, size)      do{}while(0)



More information about the mpich2-commits mailing list