cURL / Mailing Lists / curl-library / Single Mail

curl-library

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

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Wed, 21 Mar 2007 13:29:15 +0100 (CET)

On Wed, 21 Mar 2007, Yang Tse wrote:

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

Yeps.

> 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...
>
> #ifdef CURL_DISABLE_VERBOSE_STRINGS
> #define VERBOSEF(x) do { } while (0)
> #else
> #define VERBOSEF(x) x
> #endif
>
> and surround all 'infof' which aren't already inside DEBUGF

I'm not really comfortable with that. I went with DEBUGF() like that and can
live with them mostly because they're not used that frequently. infof() calls
are scattered literally all over so I wouldn't like to see them wrapped in
VERBOSEF() macros. In my eyes they make the code a bit uglier and harder to
read/follow.

> 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 ?
> http://curl.haxx.se/auto/log.cgi?id=20070320113520-30561

I think we can leave them, and instead work on improving the header magic to
hide those warnings since gcc has an extension for it, C99 support it and for
others I guess we more or less will have to use the empty function body
version...

-- 
  Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
Received on 2007-03-21