Ethereal-dev: Re: [Ethereal-dev] Diameter Finally up to -07

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

From: "Dr. Uwe Girlich" <Uwe.Girlich@xxxxxxxxxxx>
Date: Tue, 31 Jul 2001 08:53:21 +0200
Hello!

On Mon, Jul 30, 2001 at 10:49:43PM -0700, Guy Harris wrote:
> Does GCC 2.x run on, and generate code for, SINIX-M machines?
I use egcs-2.90.29 980515 (egcs-1.0.3 release) to compile ethereal (and all
the necessary libraries).

> If so,
> with GCC you can get support for 64-bit integral data types (that's the
> only 64-bit data type support that matters here), although you'd need
> the GCC run-time library for those functions not done with inline code
> (multiplies and divides, for example), and you won't get support in
> "printf"/"sprintf". 
Exactly. sizeof(long long) is possible and gives me 8 bytes but libc.so.1
does not know about this and so
        long long a;
        printf("sizeof(a)=%d\n", sizeof(a));

        a=0x7fffffff;
        a *= 0x100;

        printf("check llx %llx %x\n", a, 42);
        printf("check qx  %llx %x\n", a, 42);
gives:
sizeof(a)=8
check llx ffffff00 7f
check qx  ffffff00 7f
The call to printf puts 8 bytes onto the stack but printf takes only 4 bytes
and then again 4 bytes. The 42 value gets lost totally! This asks for trouble!

> With the native compiler, you might not get 64-bit integral data type
> support, however.
The native compiler does not like "long long".

Bye, Uwe