xplat.htmTEXTBlWdȮJNJN Cross platform issues

Back to index


CROSS PLATFORM ISSUES

This section summarises the issues in going cross-platform. By observing these simple points you should be able to build a database on one platform and use the data file on any of the others. Our release testing that validates this is described in testplan.txt.

MAC REALS - Important!!!

The default on the Mac is for 10-byte doubles. Both Symantec and CodeWarrior have a Project-level option that allows you to build with 8-byte doubles.

If you build a database that has dbReal fields, with the default 10-byte doubles:
1) your binary real data won't be cross-platform
2) the extra 2 bytes/field will cause errors on other platforms due to the record length

FIELD ALIGNMENT (for interest)

dbLong, dbUlong, dbDate, dbBLOB and dbWin3RGB fields are aligned on 4-byte boundaries. (dbBLOB & subclasses take two longints consecutively).

dbReal fields are aligned on 8-byte boundaries.

This field alignment is automatic and is implemented by inserting dummy fields in the c-tree record.

You can avoid wasting any space in your records by being aware of these alignments and the following two rules:

1) there is a leading 2-byte field inside the c-tree record

2) dbChar fields are followed by a trailing null or two (out to a 2-byte boundary). Thus a 79 char field takes 80 chars in the record. An 80 char field takes 82 chars in the record.

The easy way to minimise padding is keep like types together & declare all your dbShort fields up front.

Note: if you wanted to insert an alert to see if dummy padding fields were being inserted, have a look at OOF_tableBackend_ctree::BuildBackendtables.


Back to index


nnZ multi.txtTEXTR*ch4t xplat.htmPartSIT!PartSIT!uodmg.txtTEXTR*chN"$pZ0b8  w%w%w%    w%w%w%  "a/Q)  w%w%w%1  2  w%w%w%9  :  w%w%w%E  F  w%w%w%}   w%w%w%   w%w%w%  w%w%w%    w%w%w%   w%w%w%    w%w%w%    w%w%w%    w%w%w%  p  w%w%w%y   w%w%w%  .  w%w%w%3  b  w%w%w%g    w%w%w%  @  w%w%w%E    w%w%w%  :  w%w%w%?    w%w%w%  A  w%w%w%F  G  w%w%w%~    w%w%w%    w%w%w%    w%w%w%  nnZ0rZstylsoup&8859222