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 12:37:10 -0800 (PST)
Dr. Uwe Girlich said:
> This assumes just because we use the gcc for compiling our C library
> must have support for %ll. I use gcc for compiling but the native linker
> for linking (GNU binutils cannot create correct shared libraries) and a
> propriatary C library without %ll support (OS is SINIX/ReliantUNIX).

Is that the MIPS-based platform where the native compiler doesn't support
64-bit integral data types at all?  If so, is it OK if we require 64-bit
integral data type support in Ethereal, or should we fix up the places
where we currently use it?

And does "without %ll support" mean no support for printing 64-bit
integral data types at all?  If so, then the solution is probably either
to

    1) use our own "snprintf()" (and possibly other formatting routines)
even if the system has "snprintf()" but that "snprintf()" doesn't
support "%ll"

or

    2) use our own routine to format 64-bit integers into strings, and use
that to generate output rather than using %ll/%q/%L/etc.

which also handles the problem of different libraries using different
formatting strings (and note that even on platforms that *do* have support
for *printf printing 64-bit integers, there's no guarantee that, just
because GCC is being used, that printing is done with "%ll" - consider
some older BSDs that use GCC but use %q rather than %ll).