I'm working on a one more port of exFAT for Android. The project is here:
https://github.com/Lurker00/Android-fsI've found out that exFAT source code relies on _FILE_OFFSET_BITS=64, which should force the C library using off64_t and lseek64/pread64/pwrite64 instead of off_t/lseek/pread/pwrite. The problem is that Android, by default, used Bionic libc, which ignores this define!
I've seen a solution to typedef off_t as a 64-bit value before including any other header, but it breaks standard stream I/O functions, like fprintf. So, I've replaced all occurences of off_t with off64_t, and added conditional calls to lseek64/pread64/pwrite64.
But why exFAT is written such an non-reliable way? Why not to use required 64-bit file system calls and types explicitly?
If there is a reason, then why not to use a non-standard typedef, and wrap those calls, to localize this for the sake of easy porting?