Files
sparsebundlefs-mirror/sparsebundlefs.cpp
Tor Arne Vestbø 9405bb2a93 Fix large file support on 32-bit systems
The move from off_t to size_t in 90c81b1776 was misguided. Although
it semantically makes sense to use an unsigned datatype for file sizes,
the size_t data type is only 32-bit wide on 32-bit systems, so the move
broke reading of large sparsebundles on 32-bit systems, since we could
no longer represent the file size.

We now use uint64_t explicitly, which is both unsigned, and wide enough
to represent all the files we want.

The uintmax_t datatype has been demoted to be used only for printing,
to make it clearer what width is actually expected and used in the code.

Fixes #26
2018-09-09 02:06:37 +02:00

17 KiB