Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
libcephfs: Improve portability by replacing loff_t type usage with off_t #6301
Hey @gregsfortytwo thanks for taking a look at this!
Here's the background info on the thinking behind this.
The suggestion is based on GNU libc File Position Primitives. The off_t and off64_t specs define:
In features.h __USE_FILE_OFFSET64 is defined as
Since __USE_FILE_OFFSET64 is already enforced, off_t should always be 64-bit on glibc platforms.
The compatibilty logic was aliasing off_t with loff_t. With loff_t dep removed, we can toss the compat code because it just assumed that FreeBSD and Apple are 64-bit. musl libc is also 64-bit. off64_t is not used in the header so we can toss it too.