Installation guide
comparison, an assignment, or a function call where the correct function
prototype is in scope, standard C promotion rules will be in effect and the
correct value will be assigned.
To minimize assignment and argument errors in your code, use function
prototypes because the number and type arguments are checked.
7.3.2.2 Integer and Long Constants—Shift Operations
A bit shift operation on an integer constant will yield a 32-bit constant. If
you need a result of type long, then you need to use the L or UL suffix for
long integer constants. The following example results in value being
assigned a 32-bit constant:
long value;
value = 10 << 2;
The top 32 bits of value will depend on the type of the value shifted.
Signed values are sign extended; unsigned values are zero extended. If you
want a 64-bit constant, be sure to use the L or the UL suffix. (Note that
only the left operand of a shift operator determines the result type. The
type of shift count operand is irrelevant.)
7.3.3 Structures
The 64-bit data size of the long and pointer types affects the size,
member alignment, alignment, and bit fields of structures.
7.3.3.1 Size
The size of structures and unions on DIGITAL UNIX systems can be
different from those on 32-bit systems. For example, the following
structure, TextNode, doubles in size on a 64-bit system because the
pointer types are double in size (from 4 bytes to 8 bytes):
struct TextNode{
char *text;
struct TextNode *left;
struct TextNode *right;
};
If you are sharing data defined in structures between 32-bit and 64-bit
systems, be careful about using the long and pointer data types as
members in shared structures. These data types introduce sizes that are
not available on 32-bit systems.
To increase your application’s portability, do the following in your
application:
Migrating Your ULTRIX Application to a DIGITAL UNIX System 7–13