Boost logo

Boost :

From: Beman Dawes (bdawes_at_[hidden])
Date: 2004-02-09 21:18:08

At 01:35 AM 2/9/2004, Jonathan Ultis wrote:
>::exists is implemented using ::stat. The ::stat routine returns an
>error on file sizes larger than 2 gigs in libc-2.3.2, and several
>others. So, very large files never exists (). Using ::access seems to
>fix the problem.

Good grief! Are you saying that ::stat() cannot be used at all because it
fails for all uses when file sizes are larger than 2 gigs?

That would be a disaster. The filesystem library uses stat in at least 6
other places. I would guess that stat() is one of the most heavily used
POSIX functions dealing with files, and that software from here to
Antarctica to Mars would fail regularly if stat() failed for large files.
Hum... Didn't I just hear something about filesystems on Mars:-?

I don't mean to doubt your report, but it seems hard to believe that such a
commonly used function could fail for large files. Is there more to the


PS: Your suggestion to use access() seems quite reasonable and harmless for
exists(), but I haven't looked at the other filesystem uses to see if it
could be uniformly applied.

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