LLNL / Silo

Mesh and Field I/O Library and Scientific Database
https://silo.llnl.gov
Other
30 stars 24 forks source link

SIZEOF_OFF64_T checks maybe need to go away #382

Open markcmiller86 opened 4 months ago

markcmiller86 commented 4 months ago

At one time, we had quite a mix of 32 and 64 bit systems. Then, we needed to take care that when Silo was dealing with things like file sizes or file offests, the data types being used were 64 bit.

Those times are likely long passed. So, maybe we don't need to worry about whether file sizes and/or offsets are 64 bits?

Alternatively, maybe the logic should be adjusted to default to 64 bit and only do something special when not.

In particular, on macOS, the CMake check_size_type(off64_t) fails. That failure might be ok but we have CPP logic of the form #if SIZEOF_OFF64_T > 4 ... which then generates a compiler error because its undefined.

For anyone using CMake to configure silo, the solution in this case is to add -DCMAKE_C_FLAGS=-Doff64_t=off_t to the command-line used to CMake silo.