Thread View: comp.sys.next.programmer
1 messages
1 total messages
Started by Frank Hartlep
Tue, 08 Sep 1992 14:04
Sun's XDR routines won't work on Sun machines ...
Author: Frank Hartlep
Date: Tue, 08 Sep 1992 14:04
Date: Tue, 08 Sep 1992 14:04
48 lines
2123 bytes
2123 bytes
Excuses if this message appears repeatedly, my newsreader isn't
getting my first two tries.
... although they do on a NeXT.
Perhaps somebody can see an error in this code.
.
.
.
BufferSize += 50000;
Buffer = malloc (BufferSize);
Offset = strlen (ARCHIVED) + strlen (Description) + 1 + 4;
sprintf (Buffer, ARCHIVED "%s", Description);
xdrmem_create (&Stream, Buffer + Offset, BufferSize - Offset, XDR_ENCODE);
.
.
.
(in another function)
if (Stream->x_op == XDR_ENCODE) {
if (*Pointer != NULL) {
if (! xdr_bool (Stream, &NonNil)) <=== Bus error
return -1;
Next = 0;
if (DescriptionLoop (
Stream, Description, Descriptor, Pointer, &Next)
== -1)
return -1;
}
.
.
.
Some more info:
1. The xdr_bool does the first write to the XDR stream, so it's very
probable that something's wrong with the stream.
2. The malloc for Buffer was ok, there should be enough memory for
the stream.
3. The Stream and NonNil variables seem to be ok, too.
I'm totally clueless. The routines have been heavily used on a NeXT without
any problem, but on a Sun4 (and IPX) they never make it beyond that point.
Any ideas are greatly apreciated.
Frank
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads