Probably bad form to reply to my own message, but it looks like I found
the problem. Where many OSen define byte order in endian.h or sys/endian.h,
Solaris puts it in sys/byteorder.h (which then uses sys/isa_defs.h to check
for
sparc v[7|8|9] or i386 or ia64). Not only that, but they put a leading
underscore
on BIG_ENDIAN.
Anyways, adding a check for sys/byteorder.h and adding some more magic to
platform_defs.h.in fixed the problem.
Now all that's left is to work out the install issues and add the ability
to create Solaris "pkg" files. Then I'll confirm I don't break anything on
Linux
and submit the patch (I'm still working on getting my Indy working...)
Creating Solaris pmdas will be a task for another time ;)
-----Original Message-----
From: owner-pcp@xxxxxxxxxxx [mailto:owner-pcp@xxxxxxxxxxx]On Behalf Of
Corey Cole
Sent: Wednesday, February 27, 2002 12:18 PM
To: SGI-PCP
Subject: RE: Solaris port assistance
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
|