64 bit printf() format prefix compatibility problem

From: Serassio Guido <guido.serassio@dont-contact.us>
Date: Sun, 10 Aug 2003 11:06:52 +0200

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 ?

Regards

Guido

-
========================================================
Guido Serassio
Acme Consulting S.r.l.
Via Gorizia, 69 10136 - Torino - ITALY
Tel. : +39.011.3249426 Fax. : +39.011.3293665
Email: guido.serassio@acmeconsulting.it
WWW: http://www.acmeconsulting.it/
Received on Sun Aug 10 2003 - 03:07:27 MDT

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