Installation guide
7.3.5.2 The malloc and calloc Functions
Memory allocation library functions such as malloc() guarantee to return
data aligned to the maximum alignment of any object. In the 64-bit
DIGITAL UNIX environment, malloc() returns a pointer to memory that
is at least quadword aligned.
7.3.5.3 The lseek System Call
When calling the lseek() system call to set the current position in a file,
use the off_t type defined in types.h for the file offset. Passing an int
or long constant might work, but it is not portable and is not guaranteed
to continue to work. The following example shows correct uses of lseek():
lseek function:
#include <unistd.h>
off_t offset, pos;
pos = lseek( fd, offset, SEEK_SET );
pos = lseek( fd, (off_t)0, SEEK_CUR);
7.3.5.4 The fsetpos and fgetpos Functions
When setting or getting the file postions for a file with the ANSI C
functions of fsetpos() or fgetpos(), respectively, the file position is
specified by a value of type fpos_t. This type is defined as a long in the
64-bit DIGITAL UNIX environment.
7.4 Correcting C Syntax Errors
The C compiler on the DIGITAL UNIX system is different from the C
compilers on the ULTRIX system. Because of differences in the compilers,
you might encounter C syntax errors on DIGITAL UNIX systems that you
did not encounter on ULTRIX systems. This section contains information to
help you find and correct these errors. In particular, it includes a list of the
DIGITAL UNIX predefined symbol names and their meanings. This section
also provides information about using DIGITAL UNIX compiler options to
get maximum compatibility with ULTRIX compilers, and information about
differences between DIGITAL UNIX and ULTRIX C syntax for each of the
ULTRIX compilers.
7.4.1 Differences Between DIGITAL UNIX and ULTRIX Predefined
Symbols
Both the DIGITAL UNIX and ULTRIX systems supply predefined symbols
for the cc command. You use these symbols to write conditional code for
7–20 Migrating Your ULTRIX Application to a DIGITAL UNIX System