Large file support in C++
问题 64bit file API is different on each platform. in windows: _fseeki64 in linux: fseeko in freebsd: yet another similar call ... How can I most effectively make it more convenient and portable? Are there any useful examples? 回答1: Most POSIX-based platforms support the " _FILE_OFFSET_BITS " preprocessor symbol. Setting it to 64 will cause the off_t type to be 64 bits instead of 32, and file manipulation functions like lseek() will automatically support the 64 bit offset through some preprocessor