HP-UX Reference (11i v1 05/09) - 2 System Calls (vol 5)

c
creat64(2) creat64(2)
fstat64() The fstat64() function is identical to
fstat() except that fstat64()
returns file status in a struct stat64
instead of a struct stat. All other
functional behaviors, returns, and errors are identical.
getrlimit64 The getrlimit64()
function is identical to getrlimit() except that
getrlimit64() passes a struct rlimit64 as its second parameter
instead of a struct rlimit. All other functional behaviors, returns, and
errors are identical.
lock64() The lock64() function is identical to lockf()
except that lockf64()
accepts an off64_t for the size parameter instead of
off_t. All other func-
tional behaviors, returns, and errors are identical.
lseek64() The lseek64() function is identical to lseek()
except that lseek64()
accepts an off64_t type as the desired offset and has a return value of
off64_t. All other functional behaviors, returns, and errors are identical.
lstat64() The lstat64() function is identical to lstat()
except that lstat64()
returns file status in a struct stat64
instead of struct stat. All other
functional behaviors, returns, and errors are identical.
mmap64() The mmap64() function is identical to mmap() except that mmap64() accepts
the file offset as an off64_t.
open64() The open64() function opens files of any size. It returns a le descriptor which
can be used to grow the file past 2 GB if desired. All other functional behaviors,
returns, and errors are identical to open().
pread64() The pread64() function is identical to pread() except that pread64()
accepts the le offset as an off64_t. All other functional behaviors, returns, and
errors are identical to pread().
prealloc64() The prealloc64() function is identical to prealloc() except that
prealloc64() accepts the file offset as an off64_t. All other functional
behaviors, returns, and errors are identical to prealloc() .
pwrite64() The pwrite64() function is identical to pwrite() except that
pwrite64() accepts the file offset as an off64_t. All other functional
behaviors, returns, and errors are identical to pwrite().
setrlimit64 The setrlimit64() function is identical to
setrlimit() except that
setrlimit64() passes a struct rlimit64 as its second parameter
instead of a struct rlimit. All other functional behaviors, returns, and
errors are identical.
stat64() The stat64() function is identical to stat() except that stat64() returns
file status in a struct stat64 instead of a struct stat.
statvfs64() Refer to fstatvfs64() .
truncate64() The truncate64() function is identical to truncate() except that trun-
cate64()
accepts the length parameter as an off64_t instead of off_t. All
other functional behaviors, returns, and errors are identical to truncate() .
O_LARGEFILE Setting O_LARGEFILE in a call to open() or creat() is equivalent to cal-
ling open64() or creat64(), both of which set O_LARGEFILE in the file
status flags. This bit is automatically set by open() and creat() if
_FILE_OFFSET_BITS is set to 64. The bit may be queried by fcntl() (or
fcntl64()), which can also turn the bit on or off if desired.
APPLICATION USAGE
The standard POSIX interfaces may be used by 32-bit applications to create and access large files if com-
piled with _FILE_OFFSET_BITS set to 64.
The interfaces described here are alternatives to the standard ones, and are enabled by defining
_LARGEFILE64_SOURCE.
Section 250 Hewlett-Packard Company 2 HP-UX 11i Version 1: September 2005