From: marsj@ida.liu.se (Martin Sjolin)
Subject: Under what conditions do xdr_long work?
Date: Fri, 11 Mar 1994 18:01:29 GMT [thread overview]
Message-ID: <1994Mar11.180129.3253@ida.liu.se> (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
next reply other threads:[~1994-03-11 18:01 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
1994-03-11 18:01 Martin Sjolin [this message]
1994-03-13 17:37 ` Under what conditions do xdr_long work? John T. Kohl
1994-03-14 19:55 ` Eric Werme USSG
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox