Mail Archives: djgpp-workers/2000/11/27/08:17:29
On Mon, 27 Nov 2000, Martin Stromberg wrote:
> > > + cur_pos = lseek(fd, 0, SEEK_CUR);
> >
> > This should check if cur_pos is -1, and if so, bail out. This might
> > happen, e.g., if fd is invalid.
>
> Not to mention the case of FAT32 and overflowing the off_t type. I
> suggest you use offset_t and llseek().
Right, thanks for catching this. Yes, llseek and offset_t should be used
instead.
> Is there somewhere we can put such DJGPP developing niceties (Do not
> use lseek() and off_t in libc. Use llseek() and offset_t instead.)?
There's no place AFAIK with guidelines for developers and internals
gotchas. How about starting a file (in src/docs/kb/, say) that would
hold this stuff (and be @include'd by kb.txi)? We could then just add
these snippets to it as they come up in our discussions.
- Raw text -