Boost logo

Boost :

From: Beman Dawes (bdawes_at_[hidden])
Date: 2004-09-10 09:11:44

Something special (defining some preprocessor macro) has to be done for
32-bit POSIX-like operating systems to enable support for file sizes
greater than can be represented by 31 bits.

The exact preprocessor macro name that has to be defined varies from system
to system. Boost Filesystem currently supplies the correct macro for Linux,
but not some of the UNIX systems.

Normally we would have a regression test that identifies the systems which
fail. But we don't test large file support directly because to do so would
be a burden on those who run the regression tests; such tests would chew up
gigabytes of disk space and might also be very slow.

It recently occurred to me that sizeof(stat.st_size) > 4 is a pretty good
surrogate for an actual test on a large file. While in theory it could
yield a false positive, in practice it should identify whether or not large
file support has been correctly enabled. It should never yield a false

Accordingly, I've added a new regression test, large_file_support_test.cpp.
Initially it should pass on Windows and Linux systems, but fail on any UNIX
systems that need additional macros defined. We can then experiment with
adding additional macro definitions to get the test to pass on any systems
it is currently failing.


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