It was quite simple actually. LibTIFF calls the standard
lseek() POSIX function to move file pointers:
off_t lseek(int fildes, off_t offset, int whence)On all UNIX and Linux platforms, off_t is nowadays defined as a 64-bit signed integer, which provides support for 64-bit filesystems. However, on Windows off_t is still a 32-bit signed integer, which doesn't allow for file positions (and hence for file sizes) larger than 2 GB. This is a consequence of MS's attempt at deprecating all POSIX standard routines (another absurd attempt at imposing nonstandard rules to break the standards).
The obvious solution is using
_lseeki64 in the Windows version, with a custom modification to LibTIFF. Very easy to identify and fix, but my workload has not allowed me to fix this problem as soon as I should...