Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!rice!sun-spots-request From: andyb@coat.com Newsgroups: comp.sys.sun Subject: Ndbm databases across architectures Keywords: Software Message-ID: <5526@brazos.Rice.edu> Date: 6 Mar 90 18:07:39 GMT Sender: root@rice.edu Organization: Sun-Spots Lines: 19 Approved: Sun-Spots@rice.edu X-Sun-Spots-Digest: Volume 9, Issue 67, message 8 Our network has a mixture of Sun 386's and Sparcs. Most directories are NFS mounted so they can be accessed from any machine. I have just discovered that ndbm databases that have been created on a 386 cannot be accessed from a Sparc. Inspection of the .pag file shows that it contains pointers or offsets (used by the dbm routines); these pointers are architecture-dependent ints. When I try to read the file from the wrong kind of machine, the pointer is interpreted with its bytes swapped, and the dbm routines blow up. Is this a known problem? Does anyone have a workaround? Live justly, love gently, walk humbly. Andy Behrens andyb@coat.com also: andyb%coat.com@dartmouth.edu uucp: {uunet,rutgers}!dartvax!coat.com!andyb Burlington Coat, PO Box 729, Lebanon, N.H. 03766 (603) 448-5000