Fread on Lion does not read when length > 2G
问题 Since Macosx Lion fread does not read file with length > 2G (int size, 2'147'483'648 bytes). It worked for years with macosx snow leopard. I wrote a program to test it : #include <stdio.h> #include <stdlib.h> #include <string.h> int main(int argc, char *argv[]) { FILE *fin = NULL, *fout = NULL; char *ptr = NULL; size_t len; fpos_t flen; if (!(fin = fopen(argv[1], "rb"))) { printf("The input file: %s could not be opened\n", argv[1]); return -1; } if ((fout = fopen(argv[2], "rb"))) { printf(