On SunOS, long and pointer data types are 32 bits. Table 1 shows the alignment differences. But if you use assembly language, you need to code to the alignment restrictions described below. In a mixed environment, be careful about using long and pointer data types as members in shared structures. In turn, the structures themselves are aligned according to the strictest aligned member.
Guidelines Always use the sizeof operator to determine the size of a structure.
You cannot assume that the size of a structure is equal to the sum of its members. Order members within a structure in a way that minimizes the amount of padding needed to ensure proper alignment. To ensure the same behavior on both systems, change bit field definitions of type long to type int. The guide also describes how to perform bit shift operations that achieve the intended result. Unless you follow certain guidelines, you can encounter problems depending on how the variables are assigned and used in your application.