Re: [exim-dev] Exim 4.75 RC3 uploaded

Top Page
Delete this message
Reply to this message
Author: Tony Finch
Date:  
To: Heiko Schlichting
CC: exim-dev
Subject: Re: [exim-dev] Exim 4.75 RC3 uploaded
I have just pushed the patch below which should fix the portability bug
you spotted. I'll pass it upstream and hopefully the Valgrind developers
will come up with a better solution :-)

Thanks for chasing it up.

Tony.
--
f.anthony.n.finch <dot@???> http://dotat.at/
South Utsire: Westerly or northwesterly 4 or 5, occasionally 6 later. Moderate
or rough. Fog patches. Moderate, occasionally very poor.


>From 1b587e48d9bb95e6e7d9b3f482a9e4460b6ab130 Mon Sep 17 00:00:00 2001

From: Tony Finch <dot@???>
Date: Thu, 3 Mar 2011 15:08:05 +0000
Subject: [PATCH] Another valgrind.h portability fix.

C89 compilers do not support variable argument macros.
Our copy of valgrind.h now differs from upstream.

Reported-by: Heiko Schlichting <heiko.schlichting@???>
---
 doc/doc-txt/ChangeLog |    3 +++
 src/src/valgrind.h    |    9 +++++++--
 2 files changed, 10 insertions(+), 2 deletions(-)


diff --git a/doc/doc-txt/ChangeLog b/doc/doc-txt/ChangeLog
index 317f78c..853f3a5 100644
--- a/doc/doc-txt/ChangeLog
+++ b/doc/doc-txt/ChangeLog
@@ -83,6 +83,9 @@ PP/16 Make DISABLE_DKIM build knob functional.
 NM/06 Bugzilla 968: child_open_uid: restore default SIGPIPE handler
       Patch by Simon Arlott


+TF/03 Fix valgrind.h portability to C89 compilers that do not support
+      variable argument macros. Our copy now differs from upstream.
+


Exim version 4.74
-----------------
diff --git a/src/src/valgrind.h b/src/src/valgrind.h
index 0bae0aa..4d41690 100644
--- a/src/src/valgrind.h
+++ b/src/src/valgrind.h
@@ -4417,8 +4417,13 @@ vg_VALGRIND_DO_CLIENT_REQUEST_EXPR(uintptr_t _zzq_default,

#if defined(NVALGRIND)

-# define VALGRIND_PRINTF(...)
-# define VALGRIND_PRINTF_BACKTRACE(...)
+/* In Exim the following two lines have been changed from the original
+ version for portability to C89 compilers that don't support variable
+ argument macros. We don't use these macros so it doesn't matter much what
+ we do with them, but the following will work OK in most situations though
+ it may cause complaints about expressions without side-effects. */
+# define VALGRIND_PRINTF (void)
+# define VALGRIND_PRINTF_BACKTRACE (void)

#else /* NVALGRIND */

--
1.7.3.GIT