Have g++ define _FILE_OFFSET_BITS=64 on Solaris

Rainer Orth ro@CeBiTec.Uni-Bielefeld.DE
Fri Jun 22 07:53:00 GMT 2018


Hi Franz,

> No idea about possible problems, but isn't it usually recommended to use
> either _FILE_OFFSET_BITS=64 or _LARGEFILE{64}_SOURCE=1, not both at the
> same time?

quite the contrary: for regular largefile support, you're supposed to
use `getconf LFS_CFLAGS', i.e. -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64, while `getconf LFS64_CFLAGS'
(-D_LARGEFILE64_SOURCE) enables the transitional largefile interfaces
(e.g. explicit stat64 calls and struct stat64 instead of making stat and
struct stat largefile-aware).

For all the gory details, see the lfcompile(7), lfcompile64(7), and
lf64(7) man pages:

	https://docs.oracle.com/cd/E88353_01/html/E37853/index.html

	Rainer

-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University



More information about the Libstdc++ mailing list