[Beds] C Programming Question

Adrian St. John adrian at stjohn-home.net
Thu Feb 16 19:18:11 GMT 2006


On Thu, 16 Feb 2006 17:12:47 -0000, "Stephen Elliott" <techweb at ntlworld.com> wrote:

> Please could someone tell me what the following line does.
> 
> seekp = lseek(fd, 0, SEEK_CUR);
> 
> My belief is it won't move the file pointer as the offset is set to 0.
> Although it does seem to.

The only thing I can think of is that off_t is 64bit on the machine
you're using, and the native int size is only 32 bit.
Try explicitly casting the 0 to off_t.

> Many Thanks
> Stephen Elliott

Adrian.

-- 
Adrian St. John <adrian at stjohn-home.net>




More information about the Beds mailing list