From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,1064b0b019242d0f,start X-Google-Attributes: gidfee84,public X-Google-ArrivalTime: 1994-03-11 10:01:29 PST Newsgroups: comp.unix.osf.osf1 Path: gmd.de!newsserver.jvnc.net!yale.edu!yale!zip.eecs.umich.edu!panix!MathWorks.Com!europa.eng.gtefsd.com!howland.reston.ans.net!pipex!sunic!liuida!marsj From: marsj@ida.liu.se (Martin Sjolin) Subject: Under what conditions do xdr_long work? Message-ID: <1994Mar11.180129.3253@ida.liu.se> Keywords: xdr_long, RPC, UDP, OSF V1.3 Sender: news@ida.liu.se Organization: Department of Computer Science, University of Linkoping Date: Fri, 11 Mar 1994 18:01:29 GMT 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