Installation guide

Use typedef types in structures and set up the types as appropriate
for the system. You can automatically do this by using information in
the limits.h header file.
Be careful when building unions between the int and pointer data
types, because they are not the same size.
7.3.3.2 Member Alignment
Members of structures and unions are said to be aligned on their natural
boundaries. That is, char is aligned on a byte boundary, short on a word
boundary, int on a longword boundary, and long and pointer on
quadword boundaries.
This means that additional space can be used for padding member
alignment in structures and unions. For example, on 32-bit systems the
size of the following structure is 16 bytes. On 64-bit systems, the size of the
structure is 32 bytes: 8 bytes for each pointer and 4 bytes of padding after
the member, size, for the alignment of the pointer, left.
struct TextCountNode {
char *text;
int size,
struct TextCountNode *left;
struct TextCountNode *right;
};
7.3.3.3 Alignment
In the 64-bit environment, structures are aligned according to the strictest
aligned member. This aids in aligning other structure members on their
required boundaries. Structures are also padded to ensure proper
alignment. Padding can be added within the structure or at the end of the
structure, to terminate the structure on the same alignment boundary on
which it started. Therefore, observe the following alignment guidelines
when working with structures in a 64-bit environment:
Always use the sizeof operator to determine the size of a structure.
Do not assume the size of a structure is the accumulated size of all of
the objects defined in it. Additional space might be needed for padding
the member alignment.
Minimize the amount of padding needed in a structure by reordering
the members.
In the following example, the size of CountedString is 16 bytes (*text =
8 bytes, count = 4 bytes, tail padding = 4 bytes). This structure is aligned
on a quadword boundary because the pointer requires quadword alignment.
7–14 Migrating Your ULTRIX Application to a DIGITAL UNIX System