Boost logo

Boost :

From: Vincent N. Virgilio (virgilio_at_[hidden])
Date: 2004-05-07 23:09:24

David Judson wrote:

> At 08:01 AM 5/3/2004, you wrote:
>> David Judson <djudson_at_[hidden]> writes:
>> > In a number of places in the filesystem library on Linux, the ::stat
>> > file system call is used. When this call is executed on a file whose
>> > size is larger than 2GB, it fails because the file size cannot fit
>> > into the default "stat" structure. This problem happens even when the
>> > size information in the stat structure is not used. For example the
>> > stat information is used in the directory iterator to look for sub
>> > directories.
>> >
>> > This can be corrected by setting the macro _FILE_OFFSET_BITS to
>> > 64. What is the best way to set this macro on Linux?
>> You can add it to your BUILD variable with
>> bjam ... "-sBUILD=<define>_FILE_OFFSET_BITS ..." ...
>> Or you can put <define>_FILE_OFFSET_BITS in your project requirements
>> or default-BUILD.
> Thanks - that works for me
>> > I have looked at the jam rules and cannot locate the appropriate
>> > place to include the definition. Also, what process should be
>> > followed if I want to have this macro defined either by default or
>> > at least as an option in the boost source tree so that I don't have
>> > to modify the build rules each time I install boost?
>> I don't understand what you have in mind.
> I'm thought that it was likely that other users would run up against
> this same problem. I am suggesting that large file support should be
> enabled by default when building boost on Linux.
>> --
>> Dave Abrahams
>> Boost Consulting

This caught my eye since I have code that depends on Large File Support
(LFS). Though, for reasons alluded to below, I get LFS via C stdio
instead of C++ streams.

For the record, the LFS standard is here:

I wonder if there would be complications if LFS were enabled in Boost by

For instance, how would it work with the GNU standard C++ library? My
dated understanding is that some (all?) versions of GNU C++ streams do
not support LFS.

Vince Virgilio

Boost list run by bdawes at, gregod at, cpdaniel at, john at