[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: double format and xdr



On Sun, Oct 10, 1999 at 04:57:10AM +0200, Alexander Schulz wrote:
> Hello,
> 
> I am trying to run pvm on the shark but I ran into problems.
> All Data is transfered normally, except doubles. Those doubles are encoded
> with xdr_double which is in libc. I found only very little documentation
> about this function.

XDR is Sun's eXternal Data Representation format.  It's what sunrpc is
based around.

> So what happens is this: the double is always word-swaped when it comes out
> of xdr_double. When I xchange the higher and lower 32bit every time, the
> values are transfered correctly.

This sounds familiar.  ARM's double is stored `the wrong way around', and
evidently xdr_double() is not taking account of this.  This is a bug in
libc -- which version of libc do you have?

-- 
Matthew Wilcox <willy@bofh.ai>
"Windows and MacOS are products, contrived by engineers in the service of
specific companies. Unix, by contrast, is not so much a product as it is a
painstakingly compiled oral history of the hacker subculture." - N Stephenson


Reply to: