Quick Links: |
Provide Unix timstamp and offset type width detection macros. More...
BDLS_FILESYSTEMUTIL_UNIXPLATFORM_64_BIT_OFF | 1 if off_t is 64 bits, else |
BDLS_FILESYSTEMUTIL_UNIXPLATFORM_64_BIT_OFF64 | 1 if off64_t exists, else |
BDLS_FILESYSTEMUTIL_UNIXPLATFORM_32_BIT_OFF | 1 (off_t is 32 bits) |
stat
nanosecond member name bdls_filesystemutil
provides: stat
structure, that holds the nanosecond part of the file timestamp. stat
structure defined in sys/stat.h
contains the st_mtim.tv_nsec
member. This is determined by the feature tests specified in POSIX.1-2008 - see https://linux.die.net/man/2/fstat. BDLS_FILESYSTEMUTIL_UNIXPLATFORM_STAT_NS_MEMBER
: This macro is defined toBDLS_FILESYSTEMUTIL_UNIXPLATFORM_64_BIT_OFF
: The presence of this macrooff_t
type provided by the sys/types.h
BDLS_FILESYSTEMUTIL_UNIXPLATFORM_64_BIT_OFF64
: The presence of this macrooff64_t
type, and provides associated xxx64
fileBDLS_FILESYSTEMUTIL_UNIXPLATFORM_32_BIT_OFF
: The presence of this macrooff_t
type and associated 32-bit file_FILE_OFFSET_BITS
macro is defined to 64
, and OS
: Mode
: 32
or 64
. This column lists the number of bits in a machine word associated with the platform. A program compiled for an x86 processor would be 32
, and one compiled for an x86_64 processor would be 64
, for example.FOB=64
: _FILE_OFFSET_BITS
macro is defined to the value 64
, or is otherwise defined to another value or undefined. A value of Yes
indicates _FILE_OFFSET_BITS
is defined to 64
, and a value of No
indicates that it is not. Note that this macro is not a part of any Unix standard, but nevertheless is supported by several Unixes. On most Unix platforms, defining _FILE_OFFSET_BITS
to a value other than 64
has no meaning.LF
: Large File Source
. This column lists whether or not a macro is defined that indicates the current program is compiled in the "Transitional-Compilation Environment." A value of Yes
indicates the transitional-compilation environment is enabled, and a value of No
indicates that it is not. Different macros enable this environment on different Unixes, if they support it. This environment is enabled on AIX if the _LARGE_FILE
macro is defined, and it is enabled on Linux, Solaris, and SunOS if the _LARGEFILE64_SOURCE
macro is defined. Neither Cygwin, Darwin, nor FreeBSD support this environment, because they natively support large (64-bit) file operations in all compilation modes.Off Type
: off_t
(64-bit) if the program natively supports large (64-bit) file operations, off64_t
if the program does not natively support these operations, but provides the transitional-compilation environment, and off_t
(32-bit) if the program neither natively support large (64-bit) file operations nor provides the transitional-compilation environment. Note that a 32-bit off_t
is used as a "last resort" when no 64-bit offset type is available on the platform. A program may be unable to operate on files larger than approximately 2 Gigabytes if a 32-bit off_t
is used.Off Bits
: 64
indicates that the offset type has 64 bits, and a value of 32
indicates that the offset type has 32 bits.Macro Defined
: *_32_BIT_OFF
indicates that the BDLS_FILESYSTEMUTIL_UNIXPLATFORM_32_BIT_OFF
macro is defined, and that a program should use the off_t
offset type and associated file-system functions, a value of "*_64_BIT_OFF" indicates that the BDLS_FILESYSTEMUTIL_UNIXPLATFORM_64_BIT_OFF
macro is defined, and that a program should use the off_t
offset type and associated file-system tunctions, and a value of *_64_BIT_OFF64
indicates that the BDLS_FILESYSTEMUTIL_UNIXPLATFORM_64_BIT_OFF64
macro is defined, and that a program should use the off64_t
offset type, and associated file-system functions from the transitional-compilation environment.N/A
in any cell of the table indicates that the value of that cell does affect the determination of the value of the associated Off Type
, Off-Type Bits
and Macro Defined
cells. |---------|------|--------|-----|----------|----------|---------------| | OS | Mode | FOB=64 | LF | Off Type | Off Bits | Macro Defined | |=========+======+========+=====+==========+==========+===============| | AIX | 32 | N/A | No | 'off64_t'| 64 | *_64_BIT_OFF64| | AIX | 32 | N/A | Yes | 'off_t' | 64 | *_64_BIT_OFF | | AIX | 64 | N/A | N/A | 'off_t' | 64 | *_64_BIT_OFF | | Cygiwn | N/A | N/A | N/A | 'off_t' | 64 | *_64_BIT_OFF | | Darwin | N/A | N/A | N/A | 'off_t' | 64 | *_64_BIT_OFF | | FreeBSD | N/A | N/A | N/A | 'off_t' | 64 | *_64_BIT_OFF | | Linux | 32 | No | No | 'off_t' | 32 | *_32_BIT_OFF | | Linux | 32 | No | Yes | 'off64_t'| 64 | *_64_BIT_OFF64| | Linux | 32 | Yes | N/A | 'off_t' | 64 | *_64_BIT_OFF | | Linux | 64 | N/A | N/A | 'off_t' | 64 | *_64_BIT_OFF | | SunOS | 32 | No | No | 'off_t' | 32 | *_32_BIT_OFF | | SunOS | 32 | No | Yes | 'off64_t'| 64 | *_64_BIT_OFF64| | SunOS | 32 | Yes | N/A | 'off_t' | 64 | *_64_BIT_OFF | | SunOS | 64 | N/A | N/A | 'off_t' | 64 | *_64_BIT_OFF | | Solaris | 32 | No | No | 'off_t' | 32 | *_32_BIT_OFF | | Solaris | 32 | No | Yes | 'off64_t'| 64 | *_64_BIT_OFF64| | Solaris | 32 | Yes | N/A | 'off_t' | 64 | *_64_BIT_OFF | | Solaris | 64 | N/A | N/A | 'off_t' | 64 | *_64_BIT_OFF | |---------+------+--------+-----+----------+----------+---------------+