dbm(3x) discrepancy on Sun386i / Sun-3

Gerhard Fleischanderl vexpert!gfl at relay.eu.net
Tue Oct 17 05:43:28 AEST 1989


When I tried to use a dbm database from Sun386i and Sun-3 (both running
SunOS 4.0.1), I encountered a strange effect.  If the dbm file is created
on a Sun386i, I cannot read it from the Sun-3 (and vice versa) !

The dbm(3x) routines firstkey() and fetch() both report "bad block" and
dump core, when they access a dbm file created on the other architecture.
The respective ".pag" files, which are created by identical instructions,
differ in their 10 leading bytes obeying to the following pattern:

   Byte  |  1  |  2  |  3  |  4  |  5  |  6  |  7  |  8  |  9  |  10  |
---------|-----|-----|-----|-----|-----|-----|-----|-----|-----|------|
Sun386i  |  A  |  B  |  C  |  D  |  E  |  F  |  G  |  H  |  I  |  J   |
  Sun-3  |  B  |  A  |  D  |  C  |  F  |  E  |  H  |  G  |  J  |  I   |

Maybe the difference in byte ordering on 68020 and 80386, resp., is the
reason for this incompatibility.  An interesting aspect is that dbm files
created on a MicroVax (Ultrix 3.0) are identical to those from a Sun386i.

My priority question is: How can I access a dbm file, which has been
created on a Sun386i (== MicroVax), on a Sun-3?  (I need this to run the
news software in a heterogeneous network.)

Any help will be appreciated. If I will receive anything interesting, I
will summarize to the list.

Gerhard Fleischanderl

Institut fuer Angewandte Informatik, Technical University Vienna
Paniglgasse 16,  A-1040 Vienna, Austria
e-mail: gfl at vexpert.uucp



More information about the Comp.sys.sun mailing list