linux默认环境下打开、读、写超过2G的文件会返回错误。
定义如下宏可以突破这个限制,对read/write和fread/fwrite同时有效。
注意它必须定义在所有头文件之前。
#define
_FILE_OFFSET_BITS 64
#include < stdio.h >
#include < stdlib.h >
#include < sys / types.h >
#include < sys / stat.h >
#include < fcntl.h >
#include < unistd.h >
#include < stdio.h >
#include < stdlib.h >
#include < sys / types.h >
#include < sys / stat.h >
#include < fcntl.h >
#include < unistd.h >