Ethereal-dev: Re: [Ethereal-dev] FT_INT64 and Bitmasks

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 Feb 2004 01:42:44 -0800
On Tue, Feb 17, 2004 at 11:26:13PM +0100, Michael Tuexen wrote:
> is there a reason why FT_UINT64 does not work with bitmasks?

Because the code used for shorter integers isn't used for 64-bit
integers, to avoid requiring 64-bit integer support in the compiler, and
the code to handle 64-bit integers wasn't given bitfield support.

We currently require 64-bit integer support anyway, so it's not clear
that we should continue to avoid using 64-bit integers for FT_{U}INT64;
however, note that we *CANNOT* rely on "%ll{d,o,x}" to format 64-bit
integers, as other modifiers (%L, %q, etc.) are used on some platforms. 
(Ethereal currently *does* rely on "%ll" working, but it won't work on
some platforms....)