lf64

transitional interfaces for the 64-bit file offsets 

Miscellaneous Information


DESCRIPTION

The data types, interfaces, and macros described on this page provide explicit access to 64-bit file offsets. They are accessible through the transitional compilation environment described on the lfcompile64 reference page. The function prototype and semantics of a transitional interface are equivalent to those of the standard version of the call, except that relevant data types are 64-bit entities.

Data Types

The following tables list the standard data or struct types in the left-hand column and their corresponding explicit 64-bit file offset types in the right-hand column, grouped by header. The absence of an entry in the left-hand column indicates that there is no existing explicit 32-bit type that corresponds to the 64-bit type listed in the right-hand column. Note that in a 64-bit application, the standard definition is equivalent to the 64-bit file offset definition.

  <sys/dirent.h>
     struct dirent                 struct dirent64
        ino_t d_ino;                  ino64_t d_ino;
        off_t d_off;                  off64_t d_off;
  <sys/fcntl.h>
     struct flock                  struct flock64
        off_t l_start;                off64_t l_start;
        off_t l_len;                  off64_t l_len;
        off_t l_len;                  off64_t l_len;
     F_SETLK                       F_SETLK64
     F_SETLKW                      F_SETLKW64
     F_GETLK                       F_GETLK64
     F_FREESP                      F_FREESP64
  <sys/stdio.h>
     fpos_t                        fpos64_t
  <sys/stat.h>
     struct stat                   struct stat64
        ino_t st_ino;                 ino64_t st_ino;
        off_t st_size;                off64_t st_size;
        blkcnt_t st_blocks;           blkcnt64_t st_blocks;
  <sys/statvfs.h>
     struct statvfs                struct statvfs64
        fsblkcnt_t f_blocks;          fsblkcnt64_t f_blocks;
        fsblkcnt_t f_bfree;           fsblkcnt64_t f_bfree;
        fsblkcnt_t f_bavial;          fsblkcnt64_t f_bavial;
        fsfilcnt_t  f_files;          fsfilcnt64_t  f_files;
        fsfilcnt_t  f_ffree;          fsfilcnt64_t  f_ffree;
        fsfilcnt_t  f_favail;         fsfilcnt64_t  f_favail;
  <sys/types.h>
  <sys/types.h>
     off_t;                        off64_t;
     ino_t;                        ino64_t;
     blkcnt_t;                     blkcnt64_t;
     fsblkcnt_t;                   fsblkcnt64_t;
     fsfilcnt_t;                   fsfilcnt64_t;
  <unistd.h>
                                   _LFS64_LARGEFILE
                                   _LFS64_STDIO

System Interfaces

The following lists display the standard API and the corresponding transitional interfaces for 64-bit file offsets. The interfaces are grouped by header.

  <dirent.h>
     struct dirent *readdir();     struct dirent64 *readdir64();
     struct dirent *readdir_r();   struct dirent64 *readdir64_r();
     int alphasort(                int alphasort64(
        struct direct **,             struct direct64 **,
        struct direct **);            struct direct64 **);
     struct direct *readdir()      struct direct64 *readdir64();
    int scandir(...,               int scandir64(...,
      struct direct *(*[]);,        struct direct64 *(*[]);,
     ...);                         ...);
  <fcntl.h>
     int creat();                  int creat64();
     int open();                   int open64();
  <ftw.h>
     int ftw(...,                  int ftw64(...,
       const struct stat *,          const struct stat64 *,
       ...);                         ...);
     int nftw(..                   int nftw64(...,
       const struct stat *,          const struct stat64 *,
       ...);                         ...);
  <stdio.h>
     int fgetpos();                int fgetpos64();
     FILE *fopen();                FILE *fopen64();
     FILE *freopen();              FILE *freopen64();
     int fseeko(...,               int fseeko64(...,
       off_t, ...);                  off64_t, ...);
     int fsetpos(...,              int fsetpos64(...,
       const fpos_t *);              const fpos64_t *);
       off_t ftello();               off64_t ftello64();
       FILE *tmpfile();              FILE *tmpfile64();
  <stdlib.h>
     int mkstemp();                int mkstemp64();
     int mkstemp();                int mkstemp64();
  <sys/mman.h>
     void mmap(..., off_t);        void mmap64(..., off64_t);
  <sys/stat.h>
     int fstat(...,                int fstat64(...,
       struct stat *);               struct stat64 *);
     int lstat(...,                int lstat64(...,
       struct stat *);               struct stat64 *);
     int stat(...,                 int stat64(...,
       struct stat *);               struct stat64 *);
  <sys/statvfs.h>
     int statvfs(...,              int statvfs64(...,
       struct statvfs *);            struct statvfs64 *);
     int fstatvfs(...,             int fstatvfs64(...,
       struct statvfs *);            struct statvfs64 *);
  <unistd.h>
     int lockf(..., off_t);        int lockf64(...,
                                     off64_t);
     off_t lseek(..., off_t,       off64_t lseek64(...,
       ...);                         off64_t, ...);
     int ftruncate(..., off_t);    int ftruncate64(...,
                                     off64_t);
     int truncate(..., off_t);     int truncate64(...,
                                      off64_t);
     off_t tell(...);              off64_t tell64(...);
     ssize_t pread(..., off_t);    ssize_t pread64(..., off64_t);
     ssize_t pwrite(..., off_t);   ssize_t pwrite64(..., off64_t);

CONFORMANCE

Large File Specification, revision 1.5.


AVAILABILITY

PTC MKS Toolkit for Professional Developers
PTC MKS Toolkit for Professional Developers 64-Bit Edition
PTC MKS Toolkit for Enterprise Developers
PTC MKS Toolkit for Enterprise Developers 64-Bit Edition


SEE ALSO

Miscellaneous:
lfcompile, lfcompile64


PTC MKS Toolkit 10.1 patch 1 Documentation Build 2.