Re: lseek to end?
Re: lseek to end?
- Subject: Re: lseek to end?
- From: email@hidden (Peter Seebach)
- Date: Sat, 05 Apr 2008 19:52:18 -0500
In message <email@hidden>, Nathaniel Gray w
rites:
>Can anybody help me understand why this fails every time with EINVAL
>on Leopard x86?
Prototypes. Compile with warnings on; you'd have gotten the answer from
the compiler.
>#include <stdio.h>
>#include <fcntl.h>
>#include <assert.h>
You don't have unistd.h.
> off_t s = lseek(fd, 0, SEEK_END);
Since you didn't declare it, lseek is declared implicit int, and 0 is not
promoted to 64 bits.
The rest follows.
-s
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden