1 // lseek should work with >2G offset
9 #define A(c) ((c) || (t_error(#c " failed: %s\n", strerror(errno)), 0))
13 off_t a[] = {0x7fffffff, 0x80000000, 0x80000001, 0xffffffff, 0x100000001, 0x1ffffffff, 0 };
19 A((f = tmpfile()) != 0);
20 A((fd = fileno(f)) != -1);
21 for (i = 0; a[i]; i++) {
22 r = lseek(fd, a[i], SEEK_SET);
24 t_error("lseek(fd, 0x%llx, SEEK_SET) got 0x%llx\n", (long long)a[i], (long long)r);