Re: 64 bit printf() format prefix compatibility problem

From: Robert Collins <robertc@dont-contact.us>
Date: 10 Aug 2003 19:14:41 +1000

On Sun, 2003-08-10 at 19:06, Serassio Guido wrote:
> Hi,
>
> I have a residual Windows <==> gcc compatibility problem:
>
> gcc uses "ll" as 64 bit formatting prefix for printf, where MSVC uses "I64".
>
> This a problem in the profiling code.
>
> Now I'm using this work around:
>
> in squid.h:
>
> #if defined(_SQUID_MSWIN_) && defined(_MSC_VER) /* Microsoft C Compiler ONLY */
> #define INT64PRFX "I64"
> #else
> #define INT64PRFX "ll"
> #endif /* _SQUID_MSWIN_ && _MSC_VER */
>
> and where I need a 64 bit printf():
>
> storeAppendPrintf(sentry, " (Cumulated time: %" INT64PRFX "u, %.2f sec)\n",
> show->delta, time_frame);
>
> Any other hints about ?

That'll do for now.

long term, we can do an operator << to the store, and let c++ take care
of this.

Cheers,
Rob

-- 
GPG key available at: <http://members.aardvark.net.au/lifeless/keys.txt>.

Received on Sun Aug 10 2003 - 03:14:09 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:20:27 MST