Ethereal-dev: Re: [Ethereal-dev] Errors in packet-windows-common.c

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Guy Harris <gharris@xxxxxxxxx>
Date: Wed, 18 Aug 2004 13:06:20 -0700
Olivier Biot wrote:

packet-windows-common.c(1170) : error C2059: syntax error : 'bad
suffix on number'
packet-windows-common.c(1170) : error C2146: syntax error : missing
';' before identifier 'L'
packet-windows-common.c(1170) : error C2065: 'L' : undeclared
identifier

I use MSVC++ 6.0. Anyone can fix this 64-bit stuff?

A bit of Googling found some wxWindows source that seems to imply that with VC++ and, at least, newer versions of Borland C, the suffix used for a 64-bit integer constant is "i64".

wxWindows (or, at least, the version I found) has macros

	#define wxMakeLongLong(x, s)	x ## s
	#define wxMakeLongLong2(x, s)	wxMakeLongLong(x, s)
	#define wxLL(x)			wxMakeLongLong2(x, wxLongLongSuffix)

where wxLongLongSuffix is defined as ll on compilers with "long long" and as i64 on MSVC++ and Borland C.

We should probably do something similar.