Subject: xdr_double test program
To: None <port-arm32@netbsd.org>
From: Ben Harris <bjh21@netbsd.org>
List: port-arm32
Date: 02/18/2001 21:38:14
Could someone with an arm32 system please try this program? If it fails
(as I expect it to), I'll shove it in regress and commit a fix.
#include <err.h>
#include <stdio.h>
#include <rpc/types.h>
#include <rpc/xdr.h>
char xdrdata[] = { 0x3f, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
int
main(int argc, char **argv)
{
XDR x;
double d;
xdrmem_create(&x, xdrdata, sizeof(xdrdata), XDR_DECODE);
xdr_double(&x, &d);
if (d != 1.0)
errx(1, "double 1.0 decoded wrongly.");
exit(0);
}
--
Ben Harris <bjh21@netbsd.org>
Portmaster, NetBSD/arm26 <URL:http://www.netbsd.org/Ports/arm26/>