fcntl() is as specified in ISO POSIX (2003), but with differences as listed below.
According to ISO POSIX (2003),
only an application sets
fcntl() flags, for example
O_LARGEFILE. However, this specification
also allows an implementation to set the
flag in the case where the programming environment is one of
_POSIX_V6_LPBIG_OFFBIG. See getconf and c99
in ISO POSIX (2003)
for a description of these environments.
Thus, calling fcntl() with the
F_GETFL command may return
O_LARGEFILE as well as flags explicitly
set by the application in the case that both the implementation and
the application support an off_t of at least 64 bits.