site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com #include <stdio.h> #include <fcntl.h> #include <assert.h> int main(int argc, char *argv[]) { int fd = open(argv[0], O_RDWR); assert(fd != -1); off_t s = lseek(fd, 0, SEEK_END); if (s == -1) { perror("Couldn't seek to end"); return 1; } printf("File is %d bytes\n", s); return 0; } Thanks, -n8 PS: Please CC me with replies. --
-- Nathaniel Gray -- Caltech Computer Science ------> -- Mojave Project -- http://mojave.cs.caltech.edu -->
_______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... Can anybody help me understand why this fails every time with EINVAL on Leopard x86? This email sent to site_archiver@lists.apple.com
participants (1)
-
Nathaniel Gray