Remember me

Lost Password?

Register now!


Who's Online
111 user(s) are online (92 user(s) are browsing Forums)

Members: 0
Guests: 111



Report message:*

Re: Porting to AmigaOS4 thread

Subject: Re: Porting to AmigaOS4 thread
by NoCache on 2019/2/23 8:45:09

Any idea how to deal with lseek() method?
I need to offset filepointer by bytes to create new file with specific amount in size but the lseek result ends up with -1.

If I don't specify offset bytes, the file is created correctly but the size is incorrect as it needs to be

this is from lseek() method specs:
The lseek() function allows the file offset to be set beyond the end of
the existing end-of-file of the file. If data is later written at this
point, subsequent reads of the data in the gap return bytes of zeros
(until data is actually written into the gap).

Some devices are incapable of seeking. The value of the pointer associ-
ated with such a device is undefined.

Powered by XOOPS 2.0 © 2001-2016 The XOOPS Project