Open System Services System Calls Reference Manual (G06.28+, H06.05+)

System Functions (n - p) open64(2)
The le type ags are described in DESCRIPTION.
DESCRIPTION
The open64() function is similar to the open() function except that, in addition to supporting
smaller les, the open64() function supports:
OSS les 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 les, 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
#dene _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 #dene _FILE_OFFSET_BITS 64 feature test macro or an equivalent
compiler command option.
The open64() function establishes a connection between the le indicated by the path parameter
and the returned le descriptor. Subsequent I/O function calls, such as read() and write(), use
the opened le descriptor to access that le.
The returned le descriptor is the lowest-numbered le descriptor not currently open for that pro-
cess. A corresponding Guardian environment le number is also assigned.
The le offset, marking the current position within the le, is set to the beginning of the le. The
new le 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 le status ags and le access ags are designated by the oag parameter. The oag parame-
ter is constructed by a bitwise-inclusive-OR of exactly one of the le access ags (O_RDONLY,
O_WRONLY,orO_RDWR) with one or more of the le status ags.
You cannot use the open64() function to create a First-in, First-out (FIFO) special le. Use the
mkfo() function instead.
File Access Flags
The le access ags are:
O_RDONLY The le is open only for reading.
O_WRONLY The le is open only for writing.
O_RDWR The le is open for reading and writing.
You must specify exactly one of the le access ags.
527186-007 Hewlett-Packard Company 515