cURL / Mailing Lists / curl-library / Single Mail


Re: yangtse: curl/lib sendf.c,1.125,1.126 sendf.h,1.33,1.34

From: Yang Tse <>
Date: Wed, 21 Mar 2007 11:42:51 +0100

2007/3/21, Daniel Stenberg wrote:

> > Modified Files:
> > sendf.c sendf.h
> > Log Message:
> > avoid the use of variadic macros for greater portability
> This does indeed increase portability but now the function calls are left
> as-is, and just makes the target function body empty. I bet this will cause
> lots of strings to be left in the code that previously weren't, thanks to the
> now removed variadic macros...

Yes completely true. And not a good idea to keep around strings that
aren't going to be used.

The fact was that the variadic macro was being used to 'comment out'
the 'infof' macro when CURL_DISABLE_VERBOSE_STRINGS was defined.

To not break anything I suppose that the above behaviour is the
desired one, and not the other option I've been thinking of which
would be to use DEBUGF(infof(data, x, y, z)) all over the place.

Or maybe better...

#define VERBOSEF(x) do { } while (0)
#define VERBOSEF(x) x

and surround all 'infof' which aren't already inside DEBUGF

Or just leave it as it was previously even when one of Dan's auto
builds is complaining due to the use of --disable-verbose ?

Which route is the proper one ?

Received on 2007-03-21