|
» |
|
|
|
NAMEcreat64(), fstat64(), fstatvfs64(), getrlimit64(), lockf64(), lseek64(), lstat64(), mmap64(), open64(), pread64(), prealloc64(), pwrite64(), setrlimit64(), stat64(), statvfs64(), truncate64(), ftruncate64(), O_LARGEFILE — non-POSIX standard API interfaces to support large files SYNOPSIS#include <fcntl.h> int creat64(const char *path, mode_t mode); #include <sys/stat.h> int fstat64(int fildes, struct stat64 *buf); #include <sys/statvfs.h> int fstatvfs64(const char *path, struct fstatvfs64 *buf); #include <sys/resource.h> int getrlimit64(int resource, struct rlimit64 *rlp); #include <unistd.h> int lockf64(int fildes, int function, off64_t size); #include <unistd.h> off64_t lseek64(int fildes, off64_t offset, int whence); #include <sys/stat.h> int lstat64(const char *, struct stat64 *); #include <sys/mman.h> void * mmap64(void addr, size_t len, int prot, int flags,
int fildes, off64_t off); #include <fcntl.h> int open64(const char *path, int oflag,...); #include <unistd.h> ssize_t pread64(int fildes, void *buf, size_t nbyte, off64_t offset); #include <unistd.h> int prealloc64(int fildes, off64_t size); #include <unistd.h> ssize_t pwrite64(int fildes, const void *buf, size_t nbyte,
off64_t offset); #include <sys/resource.h> int setrlimit64(int resource, const struct rlimit64 *rlp); #include <sys/stat.h> int stat64(const char *path, struct stat64 *buf); #include <sys/statvfs.h> int statvfs64(const char *path, struct statvfs64 *buf); #include <unistd.h> int truncate64(const char *path, off64_t length); #include <unistd.h> int ftruncate64(int fildes, off64_t length); DESCRIPTIONNew API's to support large files in 32-bit applications.
These API interfaces are not a part of the
POSIX standard and may be removed in the future.
- creat64()
The
creat64()
function returns a file descriptor which can be used to grow the file past
2 GB if desired. All other functional behaviors, returns, and errors are
identical to
creat(). - 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. - fstatvfs64()
The
fstatvfs64()
function is indentical to
fstatvfs()
except that
fstatvfs64()
returns file status in a struct
statvfs64
instead of a struct
statvfs. - 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. - lockf64()
The
lockf64()
function is identical to
lockf()
except that
lockf64()
accepts an
off64_t
for the size parameter instead of
off_t.
All other functional 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 file 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 file 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
truncate64()
accepts the length parameter as an
off64_t
instead of
off_t.
All other functional behaviors, returns, and errors are identical to
truncate(). - ftruncate64()
The
ftruncate64()
function is identical to
ftruncate()
except that
ftruncate64()
accepts the length parameter as an
off64_t
instead of
off_t.
All other functional behaviors, returns, and errors are identical to
ftruncate(). - O_LARGEFILE
Setting
O_LARGEFILE
in a call to
open()
or
creat()
is equivalent to calling
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 USAGEThe standard POSIX interfaces may be used by 32-bit applications
to create and access large files if compiled with
_FILE_OFFSET_BITS
set to 64. The interfaces described here are alternatives to
the standard ones, and are enabled by defining
_LARGEFILE64_SOURCE. For 64-bit applications, access to large files is automatic,
as long as the underlying file system is enabled for large files.
The interfaces on this man
page are available to 64-bit applications, for convenience
in porting, but provide no additional capabilities.
The exception is
O_LARGEFILE,
which is not visible to 64-bit applications.
|