Open System Services System Calls Reference Manual (G06.29+, H06.08+, J06.03+)

System Functions (n - p) open64(2)
The file type flags are described in DESCRIPTION.
DESCRIPTION
The open64() function is similar to the open() function except that, in addition to supporting
smaller files, the open64() function supports:
OSS files larger than approximately 2 gigabytes, up to a limit of approximately 1 terabyte
(constrained by the space available on the disk volume)
Both Guardian Format 1 and Guardian Format 2 files, up to the limit described in the
Open System Services Management and Operations Guide
An application can explicitly call this function when you compile the applicaton using the
#define _LARGEFILE64_SOURCE 1 feature test macro or an equivalent compiler command
option.
An application call to creat() is automatically mapped to this function when you compile the
application using the #define _FILE_OFFSET_BITS 64 feature test macro or an equivalent
compiler command option.
The open64() function establishes a connection between the file indicated by the path parameter
and the returned file descriptor. Subsequent I/O function calls, such as read() and write( ), use
the opened file descriptor to access that file.
The returned file descriptor is the lowest-numbered file descriptor not currently open for that pro-
cess. A corresponding Guardian environment file number is also assigned.
The file offset, marking the current position within the file, is set to the beginning of the file. The
new file descriptor is set to remain open across the processing of any of the exec or tdm_exec set
of functions. (See the fcntl(2) reference page.)
The file status flags and file access flags are designated by the oflag parameter. The oflag parame-
ter is constructed by a bitwise-inclusive-OR of exactly one of the file access flags (O_RDONLY,
O_WRONLY,orO_RDWR) with one or more of the file status flags.
You cannot use the open64() function to create a First-in, First-out (FIFO) special file. Use the
mkfifo() function instead.
File Access Flags
The file access flags are:
O_RDONLY The file is open only for reading.
O_WRONLY The file is open only for writing.
O_RDWR The file is open for reading and writing.
You must specify exactly one of the file access ags.
527186-023 Hewlett-Packard Company 517