#define _LARGEFILE64_SOURCE #include #include #include int Size(int fd) { struct stat st; fstat(fd, &st); return st.st_size; } int LSeek(int fd, long lo, int whence) { if (lseek64(fd, lo, whence)<0) return -1; return 0; }