Linux藍海帝國 <jeremy007.bbs@ptt.cc> wrote:
> 小弟在 linux i686 平台上撰寫存取檔案的程式
> 遇到一個大檔案, 使用已知的 fopen 等相關標準函式庫, 發現無法正常操作
> 此檔案的大小超過 10 GB
> 對於小於 4 GB 的檔案, 小弟習慣用 fopen/fseek/fread 等標準函式存取
> 對於大檔案, 有沒有對應的存取函式, 或是程式撰寫方式呢 ?
On many architectures both off_t and long are 32-bit types, but compilation with
#define _FILE_OFFSET_BITS 64
will turn off_t into a 64-bit type.