I'd assumed that since SGI-MIPS machines were big-endian and
x86 (and Alpha) machines were little-endian that this issue had
already been solved. Not only that, but I believe there's also
been a successful build on Sparc-Linux. Then again, what is it
they say about assume? ;)
What bothers me is that int32 and uint32 values work fine, but float,
which is also 32 bits on Solaris, doesn't. I mean, I can understand
U64 and double, but why float?
I broke down and ordered Sun's Solaris porting guide, hoping that might
have a tidbit or two. Until then, I'm checking out Sun white papers...
-----Original Message-----
From: owner-pcp@xxxxxxxxxxx [mailto:owner-pcp@xxxxxxxxxxx]On Behalf Of
Max Matveev
Sent: Wednesday, February 27, 2002 12:51 AM
To: Corey Cole
Cc: SGI-PCP
Subject: Re: Solaris port assistance
>>>>> "CC" == Corey Cole <ccole@xxxxxxxxxxxxx> writes:
CC> For example, I'll fetch disk.all.write (a fairly static value on
CC> the target machine). I get 1261 (4ED) on the linux box, but
CC> 17078775686895763456 (ED04000000000000) on the Solaris machine.
Welcome to the endianess hell - you might want to write your own
__htonll and __htonf routines to make sure that stuff you put of the wire
and stuff you read from the wire matches internal Solaris
represenation.
Start with stuffing a value like 0x123456789ABCDEF0 into Solaris long
long and print using %llx or some other solaris incation for long long
prints. Repeat on Linux, figure out the differences and write
routines.
max
|