Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
* Under what conditions do xdr_long work?
@ 1994-03-11 18:01 Martin Sjolin
  1994-03-13 17:37 ` John T. Kohl
  1994-03-14 19:55 ` Eric Werme USSG
  0 siblings, 2 replies; 3+ messages in thread
From: Martin Sjolin @ 1994-03-11 18:01 UTC (permalink / raw)


I have almost finished porting finished porting LINCKS, an object-centered 
multi-user database system, to a OSF1/Alpha. I have everything up and
running after a one day work. But, I have problems understanding under
what conditions xdr_long works!  We use callrpc/registerrpc for 
communication between the different processes in the database server.

On HP-UX, Sun, Linux, Ultrix, SGI, etc sizeof(long) == sizeof(int).
Of course, I changed the existing xdr_long to use xdr_int instead. 
Everything works, but then I would like to use long integer and started 
to play with the xdr_long routines ...

Now, why is that:

1). using xdrmem_create/xdrstdio_create to create a xdr stream
    and then using xdr_long to encode a long (64bits) integer
    worked(!), but

2). then I tried to use xdr_long within our xdr routines called
    by callrpc/registerrpc (using UDP/IP as transport medium),
    and of course the callrpc fails!

3). In the man page for xdr_long it says using xdr_long for
    long 'C' integers ...

Now, I very well aware that xdr_long should *not* work for 64-bits
long, but why this behaviour? Does xdr_long perform a test on what 
kind of xdr stream is used? And is this documented somewhere?

A somewhat confused

Martin.
PS. For more information about LINCKS, mail me or to lincks@ida.liu.se

-- 
Martin Sj\"olin     | e-mail: marsj@ida.liu.se  | phone : +46 13 28 24 10
Department of Computer and Information Science  | fax   : +46 13 28 26 66
University of Link\"oping, S-581 83 Link\"oping, SWEDEN                   



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~1994-03-14 19:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1994-03-11 18:01 Under what conditions do xdr_long work? Martin Sjolin
1994-03-13 17:37 ` John T. Kohl
1994-03-14 19:55 ` Eric Werme USSG

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox