Mail Archives: djgpp-workers/2000/01/16/04:27:54
On Thu, 13 Jan 100, Martin Stromberg wrote:
> The problem is that the INT21 call registers used for offset (input
> and output) is totally only 32 bits, so we have this mapping:
> register contents -> offset
> 0 0
> . .
> . .
> . .
> 2^32-2 2^32-2
> 2^32-1 -1 (failure)
>
> So my tests showed calling lseek(fd, -2, SEEK_SET) would result in the
> file growing to maxsize (as if lseek(fd, 2^32-2 , SEEK_SET) was
> called). Please try this and verify my findings, if possible.
Unfortunately, I don't have any access to a system with FAT32 volumes
(FAT32 considerably slows down disk I/O, so I routinely refuse
Windows's suggestion to convert).
So, if I understand correctly, you are suggesting to implement lseek
of -2 as lseek of -3 followed by lseek of +1, is that right?
- Raw text -