#include #include #include #include #include #include int main(void) { FILE *fp; off_t p, q; char c; long long size = 5000000000LL; int fd = open("junk", O_RDWR|O_CREAT, S_IREAD|S_IWRITE); lseek(fd, size, SEEK_SET); write(fd, "x", 1); close(fd); fp = fopen("junk", "r"); p = fseeko(fp, size, SEEK_SET); fprintf(stderr, "%c ", fgetc(fp)); q = ftello(fp); fprintf(stderr,"%llx %llx %llx\n",size,p, q); }